{"version":3,"sources":["jsdelivr-header.js","/npm/quill-task-list@1.1.0/task_list.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,MAAM,KAAO,MAAM,OAAO,gBACpB,SAAW,MAAM,OAAO,qBACxB,UAAY,MAAM,OAAO,aACzB,OAAS,MAAM,OAAO,eACtB,MAAQ,MAAM,OAAO,SAE3B,MAAM,qBAAqB,SACzB,MAAA,CAAO,EAAM,GACP,IAAS,SAAS,UAAa,EAIjC,MAAM,OAAO,EAAM,GAHnB,KAAK,YAAY,UAAU,OAAO,KAAK,QAAQ,OAKnD,CAGA,KAAA,GACE,MAAM,EAAQ,MAAM,QAEpB,OADA,EAAM,QAAQ,UAAU,OAAO,WACxB,CACT,EAGF,aAAa,SAAW,iBACxB,aAAa,QAAU,KAEvB,MAAM,iBAAiB,KACrB,aAAO,CAAO,GACZ,OAAO,MAAM,OAAO,SACtB,CAEA,cAAO,CAAQ,GACb,MAAO,QACT,EAGF,SAAS,SAAW,YACpB,SAAS,QAAU,KACnB,SAAS,UAAY,YACrB,SAAS,aAAe,iBACxB,SAAS,gBAAkB,CAAC,cAE5B,MAAM,uBAAuB,OAC3B,WAAA,CAAY,EAAO,GACjB,MAAM,EAAO,GAEb,KAAK,MAAM,UAAU,iBAAiB,SAAU,IAC1C,EAAE,OAAO,QAAQ,uBACnB,EAAE,OAAO,UAAU,OAAO,WAE1B,KAAK,MAAM,gBAAe,IAAI,OAAQ,OAAO,IAC/C,GAEJ,EAGF,MAAM,SAAS,CACb,oBAAqB,SACrB,yBAA0B,aAC1B,oBAAqB,iBAIvB,MAAM,OAAO,YAAY,aAAe","file":"/npm/quill-task-list@1.1.0/task_list.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/quill-task-list@1.1.0/task_list.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","const List = Quill.import('formats/list');\nconst ListItem = Quill.import('formats/list/item');\nconst Parchment = Quill.import('parchment');\nconst Module = Quill.import('core/module');\nconst Delta = Quill.import('delta');\n\nclass TaskListItem extends ListItem {\n  format(name, value) {\n    if (name === TaskList.blotName && !value) {\n      this.replaceWith(Parchment.create(this.statics.scope));\n    }\n    else {\n      super.format(name, value);\n    }\n  }\n\n  // when inserting a new list item, remove the 'checked' css class\n  clone() {\n    const clone = super.clone();\n    clone.domNode.classList.remove('checked');\n    return clone;\n  }\n}\n\nTaskListItem.blotName = 'task-list-item';\nTaskListItem.tagName = 'LI';\n\nclass TaskList extends List {\n  static create(value) {\n    return super.create('bullet');\n  }\n\n  static formats(domNode) {\n    return 'bullet';\n  }\n}\n\nTaskList.blotName = 'task-list';\nTaskList.tagName = 'UL';\nTaskList.className = 'task-list';\nTaskList.defaultChild = 'task-list-item';\nTaskList.allowedChildren = [TaskListItem];\n\nclass TaskListModule extends Module {\n  constructor(quill, options) {\n    super(quill, options);\n\n    this.quill.container.addEventListener('click', (e) => {\n      if (e.target.matches('ul.task-list > li')) {\n        e.target.classList.toggle('checked');\n        // dummy update so that quill detects a change\n        this.quill.updateContents(new Delta().retain(1));\n      }\n    });\n  }\n}\n\nQuill.register({\n  'formats/task-list': TaskList,\n  'formats/task-list/item': TaskListItem,\n  'modules/task-list': TaskListModule\n});\n\n// https://github.com/quilljs/quill/blob/develop/assets/icons/list-check.svg\nQuill.import('ui/icons')['task-list'] = `\n  <svg class=\"\" viewbox=\"0 0 18 18\">\n    <line class=\"ql-stroke\" x1=\"9\" x2=\"15\" y1=\"4\" y2=\"4\"></line>\n    <polyline class=\"ql-stroke\" points=\"3 4 4 5 6 3\"></polyline>\n    <line class=\"ql-stroke\" x1=\"9\" x2=\"15\" y1=\"14\" y2=\"14\"></line>\n    <polyline class=\"ql-stroke\" points=\"3 14 4 15 6 13\"></polyline>\n    <line class=\"ql-stroke\" x1=\"9\" x2=\"15\" y1=\"9\" y2=\"9\"></line>\n    <polyline class=\"ql-stroke\" points=\"3 9 4 10 6 8\"></polyline>\n  </svg>\n`;\n"]}