@copio/sdk 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn.js +1 -1
- package/dist/{chunk-QPUCXOOR.js → chunk-HS6GDZIS.js} +2 -2
- package/dist/{chunk-K7RTGT3Q.js → chunk-IZOWC74B.js} +2 -2
- package/dist/core.js +1 -1
- package/dist/custom-elements.json +507 -507
- package/dist/index.js +1 -1
- package/dist/types/sdk/version.d.ts +1 -1
- package/package.json +25 -3
- package/sdk/version.js +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as I,b as p,c as T,l as O}from"./chunk-N7Q34F2P.js";import{a as C}from"./chunk-SH4P4XSZ.js";import{a as w}from"./chunk-36F637QU.js";import{a as d}from"./chunk-B7HT2X67.js";import{a as f}from"./chunk-E7JYVRJA.js";import{a as F,b as S}from"./chunk-G65H4ZTJ.js";var l=class{#e=null;#t=new Map;#s=new Map;constructor(e=w()){this.#e=e}get adapter(){return this.#e}get store(){return this.#e?.store??null}async init(){return this.#e.init()}listDocsSync(){return typeof this.#e.listDocsSync=="function"?this.#e.listDocsSync().map(t=>{let s=this.#i(t.pages);return{id:t.id,name:t.name||"",pageCount:s.length,pages:s}}):[]}async listDocs(){return(await this.#e.listDocs()).map(t=>{let s=this.#i(t.pages);return{id:t.id,name:t.name||"",pageCount:s.length,pages:s}})}getDocSync(e){if(!e)return null;if(typeof this.#e.getDocSync=="function"){let r=this.#e.getDocSync(e);return r?{id:r.id,name:r.name||"",pages:this.#i(r.pages)}:null}let s=this.listDocsSync().find(r=>r.id===e);return s?{id:s.id,name:s.name,pages:s.pages||[]}:null}async getDoc(e){return this.getDocSync(e)}async createDoc(e="Untitled Document",t=[]){let s=p(),r=this.#i(t),n={id:s,name:e||"Untitled Document",pages:r};return await this.#e.saveDoc(s,n),n}async saveDoc(e,t){if(!e)throw new Error("Cannot save document without an ID");let s=this.#i(t.pages);await this.#e.saveDoc(e,{id:e,name:t.name||"",pages:s})}async renameDoc(e,t){let s=await this.getDoc(e);if(!s)throw new Error(`Document "${e}" not found`);s.name=t,await this.saveDoc(e,s)}async deleteDoc(e,{soft:t=!0,timeoutMs:s=5e3}={}){if(!e)return;let r=this.getDocSync(e);if(r){if(this.#o(e),await this.#e.deleteDoc(e),t&&s>0){let n=setTimeout(async()=>{this.#t.delete(e)},s);this.#t.set(e,{doc:r,timerId:n})}return{id:e,name:r.name,undo:()=>this.undoDeleteDoc(e)}}}#o(e){if(this.#t.has(e)){let t=this.#t.get(e);clearTimeout(t.timerId),this.#t.delete(e)}}async undoDeleteDoc(e){let t=this.#t.get(e);return t?(clearTimeout(t.timerId),this.#t.delete(e),await this.#e.saveDoc(e,t.doc),t.doc):null}isSoftDeletedDoc(e){return this.#t.has(e)}async addPages(e,t){let s=await this.getDoc(e);if(!s)throw new Error(`Document "${e}" not found`);let r=Array.isArray(t)?t:[t];s.pages.push(...r),await this.saveDoc(e,s)}async updatePage(e,t,s){let r=await this.getDoc(e);if(!r)throw new Error(`Document "${e}" not found`);let n=r.pages.findIndex(i=>i.id===t);if(n===-1)throw new Error(`Page "${t}" not found in document "${e}"`);r.pages[n]={...r.pages[n],...s},await this.saveDoc(e,r)}async reorderPages(e,t){let s=await this.getDoc(e);if(!s)throw new Error(`Document "${e}" not found`);let r=new Map(s.pages.map(i=>[i.id,i])),n=[];for(let i of t)r.has(i)&&(n.push(r.get(i)),r.delete(i));for(let i of r.values())n.push(i);s.pages=n,await this.saveDoc(e,s)}async deletePage(e,t,{soft:s=!0,timeoutMs:r=5e3}={}){let n=await this.getDoc(e);if(!n)throw new Error(`Document "${e}" not found`);let i=n.pages.findIndex(u=>u.id===t);if(i===-1)return;let[a]=n.pages.splice(i,1);await this.saveDoc(e,n);let h=`${e}:${t}`;if(this.#d(h),!s||r<=0){if(typeof this.#e.deletePage=="function")try{await this.#e.deletePage(e,t)}catch(u){console.warn("[DocRepository] Adapter deletePage error:",u)}return}let c=setTimeout(async()=>{if(this.#s.delete(h),typeof this.#e.deletePage=="function")try{await this.#e.deletePage(e,t)}catch(u){console.warn("[DocRepository] Adapter deletePage error:",u)}},r);return this.#s.set(h,{docId:e,pageId:t,page:a,index:i,timerId:c}),{docId:e,pageId:t,undo:()=>this.undoDeletePage(e,t)}}#d(e){if(this.#s.has(e)){let t=this.#s.get(e);clearTimeout(t.timerId),this.#s.delete(e)}}async undoDeletePage(e,t){let s=`${e}:${t}`,r=this.#s.get(s);if(!r)return null;clearTimeout(r.timerId),this.#s.delete(s);let n=await this.getDoc(e);if(!n)return null;let i=Math.min(r.index,n.pages.length);return n.pages.splice(i,0,r.page),await this.saveDoc(e,n),r.page}isSoftDeletedPage(e,t){return this.#s.has(`${e}:${t}`)}subscribe(e){return this.#e.subscribe(e)}async getAllDocs(){let e=await this.listDocs(),t={};for(let s of e)t[s.id]=s;return t}async exportAll(){let e=await this.listDocs(),t={};for(let s of e)t[s.id]={name:s.name,pages:JSON.stringify(s.pages)};return t}async importDocs(e){let t=0;for(let[s,r]of Object.entries(e||{})){await this.getDoc(s)||t++;let i=this.#i(r.pages);await this.saveDoc(s,{name:r.name||"",pages:i})}return t}#i(e){if(Array.isArray(e))return[...e];if(typeof e=="string")try{return JSON.parse(e)}catch{return[]}return[]}},R=new l;var B="2026-11-01T15:53:54.232Z",U="0.1.0";function x(o={}){let e=o&&o.crop&&typeof o.crop=="object"?{x:Math.max(0,Math.min(1,Number(o.crop.x)||0)),y:Math.max(0,Math.min(1,Number(o.crop.y)||0)),w:Math.max(0,Math.min(1,Number(o.crop.w)||1)),h:Math.max(0,Math.min(1,Number(o.crop.h)||1))}:null,t=0;if(o&&o.rotate!==void 0){let r=(Math.round(Number(o.rotate)/90)*90%360+360)%360;(r===90||r===180||r===270)&&(t=r)}let s=o&&o.filter==="bw"?"bw":"none";return{crop:e,rotate:t,filter:s}}function L(o){return o?!!(o.crop||o.rotate&&o.rotate!==0||o.filter&&o.filter!=="none"):!1}var m=class{constructor(e){this.id=e.id,this.src=e.src,this.originalSrc=e.originalSrc||e.src,this.edits=x(e.edits),this.name=e.name||"Page",this.type=e.type||"image",this.orientation=e.orientation||1,this.ocrText=e.ocrText||null,this.ocrConfidence=e.ocrConfidence??null}get isModified(){return L(this.edits)}toJSON(){return{id:this.id,src:this.src,originalSrc:this.originalSrc,edits:this.edits,name:this.name,type:this.type,orientation:this.orientation,ocrText:this.ocrText,ocrConfidence:this.ocrConfidence}}},E=class{constructor(e){this.id=e.id,this.name=e.name||"Untitled Document",this.pages=Array.isArray(e.pages)?e.pages.map(t=>t instanceof m?t:new m(t)):[],this.createdAt=e.createdAt||Date.now(),this.updatedAt=e.updatedAt||Date.now()}get pageCount(){return this.pages.length}toJSON(){return{id:this.id,name:this.name,pages:this.pages.map(e=>e.toJSON()),createdAt:this.createdAt,updatedAt:this.updatedAt}}},P=class{constructor(e={}){this.mode=e.mode==="single"?"single":"batch",this.aspect=e.aspect||"auto",this.docId=e.docId||null,this.maxPages=Math.max(0,Number(e.maxPages)||0),this.stage="viewfinder",this.activePageIndex=0,this.history=[],this.future=[]}pushHistory(e){this.history.push(e),this.future=[],this.history.length>50&&this.history.shift()}undo(){if(this.history.length===0)return null;let e=this.history.pop();return this.future.push(e),e}redo(){if(this.future.length===0)return null;let e=this.future.pop();return this.history.push(e),e}};var $={PAGE_ADDED:"copio:page-added",PAGE_REMOVED:"copio:page-removed",PAGES_CHANGED:"copio:pages-changed",SCAN_COMPLETE:"copio:scan-complete",EXPORT_PROGRESS:"copio:export-progress",EXPORT_COMPLETE:"copio:export-complete",OCR_COMPLETE:"copio:ocr-complete",SYNC_CONNECTED:"copio:sync-connected",ERROR:"copio:error"};function k(o,e,t={}){let s=new CustomEvent(e,{bubbles:!0,composed:!0,cancelable:!0,detail:t});return o&&typeof o.dispatchEvent=="function"&&o.dispatchEvent(s),s}var _=["crop","rotate","filter","ocr","export","sync"],v=["pdf","zip","png","jpg"],A=["eng"],b={};function pe(o,e){!o||!e||(b[o]=e,typeof globalThis<"u"&&(globalThis.__copio_services__=globalThis.__copio_services__||{},globalThis.__copio_services__[o]=e))}function g(o){return b[o]?b[o]:typeof globalThis<"u"&&globalThis.__copio_services__?.[o]?globalThis.__copio_services__[o]:null}function z(o){return o?o instanceof Set?new Set(o):Array.isArray(o)?new Set(o.map(e=>String(e).trim().toLowerCase()).filter(Boolean)):typeof o=="string"?new Set(o.split(/[\s,]+/).map(e=>e.trim().toLowerCase()).filter(Boolean)):new Set(_):new Set(_)}function y(o,e){return o?Array.isArray(o)?o.map(t=>String(t).trim().toLowerCase()).filter(Boolean):typeof o=="string"?o.split(/[\s,]+/).map(t=>t.trim().toLowerCase()).filter(Boolean):[...e]:[...e]}var N=class{#e=new Set(_);#t=[...v];#s=[...A];#o=0;#d="";#i=null;#r=null;#l={};#n=!0;#h=!0;#a=null;#c=new Map;#u=new Map;constructor(e={}){this.#i=e.storage||w(e),this.#r=e.repository||new l(this.#i),e.services&&(this.#l={...e.services}),e.imageProcessor?(this.#a=e.imageProcessor,this.#l.imageProcessor=e.imageProcessor):this.getService("imageProcessor")?this.#a=this.getService("imageProcessor"):typeof document<"u"?this.#a=new O:this.#a=new C,e.features!==void 0&&this.setFeatures(e.features),e.exportFormats!==void 0&&(this.#t=y(e.exportFormats,v)),e.ocrLanguages!==void 0&&(this.#s=y(e.ocrLanguages,A)),e.maxPages!==void 0&&(this.#o=Math.max(0,Number(e.maxPages)||0)),e.assetBase!==void 0&&S(e.assetBase),e.licenseKey!==void 0&&(this.#d=String(e.licenseKey||"")),e.ocr!==void 0?this.ocr=!!e.ocr:e.features!==void 0&&!this.hasFeature("ocr")&&(this.ocr=!1),e.pdf!==void 0?this.pdf=!!e.pdf:e.exportFormats!==void 0&&!this.#t.includes("pdf")&&(this.pdf=!1)}async init(){return this.#i.init()}setService(e,t){this.#l[e]=t}getService(e){return this.#l[e]||g(e)}hasFeature(e){return e?this.#e.has(String(e).trim().toLowerCase()):!1}get features(){return Array.from(this.#e)}setFeatures(e){this.#e=z(e),this.hasFeature("ocr")?(this.#n=!0,this.getService("ocr")instanceof d&&this.setService("ocr",g("ocr"))):(this.#n=!1,this.setService("ocr",new d))}enableFeature(e){if(e){let t=String(e).trim().toLowerCase();this.#e.add(t),t==="ocr"&&(this.#n=!0,this.getService("ocr")instanceof d&&this.setService("ocr",g("ocr")))}}disableFeature(e){if(e){let t=String(e).trim().toLowerCase();this.#e.delete(t),t==="ocr"&&(this.#n=!1,this.setService("ocr",new d))}}get ocr(){return this.#n&&this.hasFeature("ocr")}set ocr(e){this.#n=!!e,this.#n?(this.enableFeature("ocr"),this.getService("ocr")instanceof d&&this.setService("ocr",g("ocr"))):(this.disableFeature("ocr"),this.setService("ocr",new d))}get pdf(){return this.#h&&this.#t.includes("pdf")}set pdf(e){this.#h=!!e,this.#h?(this.#t.includes("pdf")||this.#t.push("pdf"),this.getService("pdf")instanceof f&&this.setService("pdf",g("pdf"))):(this.#t=this.#t.filter(t=>t!=="pdf"),this.setService("pdf",new f))}get exportFormats(){return[...this.#t]}set exportFormats(e){this.#t=y(e,v),this.#t.includes("pdf")?(this.#h=!0,this.getService("pdf")instanceof f&&this.setService("pdf",g("pdf"))):(this.#h=!1,this.setService("pdf",new f))}get ocrLanguages(){return[...this.#s]}set ocrLanguages(e){this.#s=y(e,A)}get maxPages(){return this.#o}set maxPages(e){this.#o=Math.max(0,Number(e)||0)}get assetBase(){return F()}set assetBase(e){S(e)}get licenseKey(){return this.#d}set licenseKey(e){this.#d=String(e||"")}get storage(){return this.#i}setStorage(e){e&&(this.#i=e,this.#r=new l(this.#i))}#g(e,t){this.#c.has(e)||this.#c.set(e,[]);let s=this.#c.get(e);s.push(t),s.length>50&&s.shift(),this.#u.has(e)&&(this.#u.get(e).length=0)}get imageProcessor(){return this.#a}setImageProcessor(e){e&&(this.#a=e,this.setService("imageProcessor",e))}get docs(){return this.#r}async listDocuments(){return this.#r.listDocs()}async getDocument(e){return this.#r.getDoc(e)}async createDocument(e,t){return this.#r.createDoc(e,t)}async deleteDocument(e,t={}){return this.#r.deleteDoc(e,t)}async undoDeleteDocument(e){return this.#r.undoDeleteDoc(e)}async renameDocument(e,t){return this.#r.renameDoc(e,t)}async addPages(e,t){return this.#r.addPages(e,t)}async deletePage(e,t,s={}){return this.#g(e,{type:"delete",pageId:t}),this.#r.deletePage(e,t,s)}async undoDeletePage(e,t){return this.#r.undoDeletePage(e,t)}async updatePage(e,t,s){return this.#r.updatePage(e,t,s)}async reorderPages(e,t){let s=await this.getDocument(e),r=s?.pages?s.pages.map(n=>n.id):[];return this.#g(e,{type:"reorder",priorOrder:r,newOrder:[...t]}),this.#r.reorderPages(e,t)}async#p(e){if(e)return e;let t=await this.listDocuments();return t.length>0?t[0].id:null}async applyEdit(e,t,s){let r=await this.#p(e),n=r?await this.getDocument(r):null;if(!n||!n.pages)throw new Error(`Document with ID "${r||e}" not found`);let i=n.pages.find(M=>M.id===t);if(!i)throw new Error(`Page with ID "${t}" not found in document "${r}"`);let a={...i.edits||{crop:null,rotate:0,filter:"none"}},h=i.src,c=x({...a,...s}),u=i.originalSrc||i.src,D=u;return this.#a&&(D=await this.#a.renderEdits(u,c)),await this.updatePage(r,t,{originalSrc:u,src:D,edits:c}),this.#g(r,{type:"edit",pageId:t,priorEdits:a,priorSrc:h,newEdits:c,newSrc:D}),{...i,originalSrc:u,src:D,edits:c}}async undo(e){let t=await this.#p(e),s=t?this.#c.get(t):null;if(!s||s.length===0)return null;let r=s.pop();return this.#u.has(t)||this.#u.set(t,[]),this.#u.get(t).push(r),r.type==="edit"?(await this.updatePage(t,r.pageId,{edits:r.priorEdits,src:r.priorSrc}),{type:"edit",pageId:r.pageId,restoredEdits:r.priorEdits}):r.type==="delete"?(await this.undoDeletePage(t,r.pageId),{type:"delete",pageId:r.pageId}):r.type==="reorder"?(await this.#r.reorderPages(t,r.priorOrder),{type:"reorder",priorOrder:r.priorOrder}):r}async redo(e){let t=await this.#p(e),s=t?this.#u.get(t):null;if(!s||s.length===0)return null;let r=s.pop();return this.#c.has(t)||this.#c.set(t,[]),this.#c.get(t).push(r),r.type==="edit"?(await this.updatePage(t,r.pageId,{edits:r.newEdits,src:r.newSrc}),{type:"edit",pageId:r.pageId,appliedEdits:r.newEdits}):r.type==="delete"?(await this.deletePage(t,r.pageId),{type:"delete",pageId:r.pageId}):r.type==="reorder"?(await this.reorderPages(t,r.newOrder),{type:"reorder",newOrder:r.newOrder}):r}subscribe(e){return this.#r.subscribe(e)}async addFiles(e,t=null){if(!e||e.length===0)return[];let s=Array.from(e),r=[];for(let i of s)if(i.type==="application/pdf"){let a=this.getService("pdf");if(a&&typeof a.renderPdfPagesToDataUrls=="function"){let h=await a.renderPdfPagesToDataUrls(i);for(let c of h)r.push({id:p(),src:c,originalSrc:c,edits:{crop:null,rotation:0,filter:"none"},type:"image",name:i.name||"PDF Page"})}else console.warn("PDF import service (PdfPort) not registered. Skipping PDF file.")}else if(i.type&&i.type.startsWith("image/")){let a=await T(i),h=null;try{h=await I(i)}catch{}r.push({id:p(),src:a,originalSrc:a,edits:{crop:null,rotation:0,filter:"none"},type:"image",name:i.name||"Captured Image",orientation:h})}if(r.length===0)return[];let n=t;if(n)await this.getDocument(n)||await this.#r.saveDoc(n,{name:"Scanned Document",pages:[]});else{let i=await this.listDocuments();i.length>0?n=i[0].id:n=(await this.createDocument("Scanned Document",[])).id}if(this.#o>0){let i=(await this.getDocument(n))?.pages||[],a=Math.max(0,this.#o-i.length);if(a<=0)throw new Error(`Maximum page limit (${this.#o}) reached`);r.splice(a)}return await this.addPages(n,r),r}async getPages(e=null){let t=e;if(!t){let r=await this.listDocuments();if(r.length===0)return[];t=r[0].id}return(await this.getDocument(t))?.pages||[]}async clear(e=null){let t=e;if(!t){let r=await this.listDocuments();if(r.length===0)return;t=r[0].id}let s=await this.getDocument(t);if(!(!s||!s.pages))for(let r of s.pages)await this.deletePage(t,r.id)}async#f(e){if(Array.isArray(e))return{docName:"document",pages:e,docId:null};if(typeof e=="string"){let s=await this.getDocument(e);return{docName:s?.name||"document",pages:s?.pages||[],docId:e}}let t=await this.listDocuments();if(t.length>0){let s=await this.getDocument(t[0].id);return{docName:s?.name||"document",pages:s?.pages||[],docId:t[0].id}}return{docName:"document",pages:[],docId:null}}async exportPdf(e,t={}){if(!this.hasFeature("export")){let i=new Error('Feature "export" is disabled');throw Object.assign(i,{code:"FEATURE_DISABLED"}),i}if(!this.#h||!this.#t.includes("pdf")){let i=new Error('Feature "pdf" is disabled');throw Object.assign(i,{code:"FEATURE_DISABLED"}),i}let{docName:s,pages:r}=await this.#f(e),n=this.getService("pdf")||this.getService("export");if(!n||typeof n.exportDocumentAsPdf!="function")throw new Error("Export service (PdfPort) is not registered. Import @copio/sdk or register an exportService.");return n.exportDocumentAsPdf(s,r,{download:!1,showProgress:!1,...t})}async exportZip(e,t={}){if(!this.hasFeature("export")){let i=new Error('Feature "export" is disabled');throw Object.assign(i,{code:"FEATURE_DISABLED"}),i}let{docName:s,pages:r}=await this.#f(e),n=this.getService("export");if(!n||typeof n.exportDocumentAsImages!="function")throw new Error("Export service is not registered. Import @copio/sdk or register an exportService.");return n.exportDocumentAsImages(s,r,{download:!1,showProgress:!1,...t})}async runOcr(e,t=null,s={}){if(!this.#n||!this.hasFeature("ocr")){let c=new Error('Feature "ocr" is disabled');throw Object.assign(c,{code:"FEATURE_DISABLED"}),c}let{pages:r}=await this.#f(e),n=r;t&&(n=r.filter(c=>c.id===t));let i=this.getService("ocr");if(!i||typeof i.recognizeDocumentPages!="function")throw new Error("OCR service (OcrPort) is not registered. Import @copio/sdk or register an ocrService.");let a=s.lang||this.#s[0]||"eng",h=await i.recognizeDocumentPages(n,{lang:a,...s});return{text:h.combinedText,...h}}async sync(e={}){if(!this.hasFeature("sync")){let s=new Error('Feature "sync" is disabled');throw Object.assign(s,{code:"FEATURE_DISABLED"}),s}let t=this.getService("sync");if(!t)throw new Error("Sync service (SyncPort) is not registered. Import @copio/sdk or register a syncService.");return new t(this.#r,e.onStateChange)}};export{l as a,R as b,B as c,U as d,x as e,L as f,m as g,E as h,P as i,$ as j,k,_ as l,v as m,A as n,pe as o,g as p,N as q};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as I,b as p,c as T,l as O}from"./chunk-N7Q34F2P.js";import{a as C}from"./chunk-SH4P4XSZ.js";import{a as w}from"./chunk-36F637QU.js";import{a as d}from"./chunk-B7HT2X67.js";import{a as f}from"./chunk-E7JYVRJA.js";import{a as F,b as S}from"./chunk-G65H4ZTJ.js";var l=class{#e=null;#t=new Map;#s=new Map;constructor(e=w()){this.#e=e}get adapter(){return this.#e}get store(){return this.#e?.store??null}async init(){return this.#e.init()}listDocsSync(){return typeof this.#e.listDocsSync=="function"?this.#e.listDocsSync().map(t=>{let s=this.#i(t.pages);return{id:t.id,name:t.name||"",pageCount:s.length,pages:s}}):[]}async listDocs(){return(await this.#e.listDocs()).map(t=>{let s=this.#i(t.pages);return{id:t.id,name:t.name||"",pageCount:s.length,pages:s}})}getDocSync(e){if(!e)return null;if(typeof this.#e.getDocSync=="function"){let r=this.#e.getDocSync(e);return r?{id:r.id,name:r.name||"",pages:this.#i(r.pages)}:null}let s=this.listDocsSync().find(r=>r.id===e);return s?{id:s.id,name:s.name,pages:s.pages||[]}:null}async getDoc(e){return this.getDocSync(e)}async createDoc(e="Untitled Document",t=[]){let s=p(),r=this.#i(t),n={id:s,name:e||"Untitled Document",pages:r};return await this.#e.saveDoc(s,n),n}async saveDoc(e,t){if(!e)throw new Error("Cannot save document without an ID");let s=this.#i(t.pages);await this.#e.saveDoc(e,{id:e,name:t.name||"",pages:s})}async renameDoc(e,t){let s=await this.getDoc(e);if(!s)throw new Error(`Document "${e}" not found`);s.name=t,await this.saveDoc(e,s)}async deleteDoc(e,{soft:t=!0,timeoutMs:s=5e3}={}){if(!e)return;let r=this.getDocSync(e);if(r){if(this.#o(e),await this.#e.deleteDoc(e),t&&s>0){let n=setTimeout(async()=>{this.#t.delete(e)},s);this.#t.set(e,{doc:r,timerId:n})}return{id:e,name:r.name,undo:()=>this.undoDeleteDoc(e)}}}#o(e){if(this.#t.has(e)){let t=this.#t.get(e);clearTimeout(t.timerId),this.#t.delete(e)}}async undoDeleteDoc(e){let t=this.#t.get(e);return t?(clearTimeout(t.timerId),this.#t.delete(e),await this.#e.saveDoc(e,t.doc),t.doc):null}isSoftDeletedDoc(e){return this.#t.has(e)}async addPages(e,t){let s=await this.getDoc(e);if(!s)throw new Error(`Document "${e}" not found`);let r=Array.isArray(t)?t:[t];s.pages.push(...r),await this.saveDoc(e,s)}async updatePage(e,t,s){let r=await this.getDoc(e);if(!r)throw new Error(`Document "${e}" not found`);let n=r.pages.findIndex(i=>i.id===t);if(n===-1)throw new Error(`Page "${t}" not found in document "${e}"`);r.pages[n]={...r.pages[n],...s},await this.saveDoc(e,r)}async reorderPages(e,t){let s=await this.getDoc(e);if(!s)throw new Error(`Document "${e}" not found`);let r=new Map(s.pages.map(i=>[i.id,i])),n=[];for(let i of t)r.has(i)&&(n.push(r.get(i)),r.delete(i));for(let i of r.values())n.push(i);s.pages=n,await this.saveDoc(e,s)}async deletePage(e,t,{soft:s=!0,timeoutMs:r=5e3}={}){let n=await this.getDoc(e);if(!n)throw new Error(`Document "${e}" not found`);let i=n.pages.findIndex(u=>u.id===t);if(i===-1)return;let[a]=n.pages.splice(i,1);await this.saveDoc(e,n);let h=`${e}:${t}`;if(this.#d(h),!s||r<=0){if(typeof this.#e.deletePage=="function")try{await this.#e.deletePage(e,t)}catch(u){console.warn("[DocRepository] Adapter deletePage error:",u)}return}let c=setTimeout(async()=>{if(this.#s.delete(h),typeof this.#e.deletePage=="function")try{await this.#e.deletePage(e,t)}catch(u){console.warn("[DocRepository] Adapter deletePage error:",u)}},r);return this.#s.set(h,{docId:e,pageId:t,page:a,index:i,timerId:c}),{docId:e,pageId:t,undo:()=>this.undoDeletePage(e,t)}}#d(e){if(this.#s.has(e)){let t=this.#s.get(e);clearTimeout(t.timerId),this.#s.delete(e)}}async undoDeletePage(e,t){let s=`${e}:${t}`,r=this.#s.get(s);if(!r)return null;clearTimeout(r.timerId),this.#s.delete(s);let n=await this.getDoc(e);if(!n)return null;let i=Math.min(r.index,n.pages.length);return n.pages.splice(i,0,r.page),await this.saveDoc(e,n),r.page}isSoftDeletedPage(e,t){return this.#s.has(`${e}:${t}`)}subscribe(e){return this.#e.subscribe(e)}async getAllDocs(){let e=await this.listDocs(),t={};for(let s of e)t[s.id]=s;return t}async exportAll(){let e=await this.listDocs(),t={};for(let s of e)t[s.id]={name:s.name,pages:JSON.stringify(s.pages)};return t}async importDocs(e){let t=0;for(let[s,r]of Object.entries(e||{})){await this.getDoc(s)||t++;let i=this.#i(r.pages);await this.saveDoc(s,{name:r.name||"",pages:i})}return t}#i(e){if(Array.isArray(e))return[...e];if(typeof e=="string")try{return JSON.parse(e)}catch{return[]}return[]}},R=new l;var B="2026-11-01T16:24:14.013Z",U="0.1.2";function x(o={}){let e=o&&o.crop&&typeof o.crop=="object"?{x:Math.max(0,Math.min(1,Number(o.crop.x)||0)),y:Math.max(0,Math.min(1,Number(o.crop.y)||0)),w:Math.max(0,Math.min(1,Number(o.crop.w)||1)),h:Math.max(0,Math.min(1,Number(o.crop.h)||1))}:null,t=0;if(o&&o.rotate!==void 0){let r=(Math.round(Number(o.rotate)/90)*90%360+360)%360;(r===90||r===180||r===270)&&(t=r)}let s=o&&o.filter==="bw"?"bw":"none";return{crop:e,rotate:t,filter:s}}function L(o){return o?!!(o.crop||o.rotate&&o.rotate!==0||o.filter&&o.filter!=="none"):!1}var m=class{constructor(e){this.id=e.id,this.src=e.src,this.originalSrc=e.originalSrc||e.src,this.edits=x(e.edits),this.name=e.name||"Page",this.type=e.type||"image",this.orientation=e.orientation||1,this.ocrText=e.ocrText||null,this.ocrConfidence=e.ocrConfidence??null}get isModified(){return L(this.edits)}toJSON(){return{id:this.id,src:this.src,originalSrc:this.originalSrc,edits:this.edits,name:this.name,type:this.type,orientation:this.orientation,ocrText:this.ocrText,ocrConfidence:this.ocrConfidence}}},E=class{constructor(e){this.id=e.id,this.name=e.name||"Untitled Document",this.pages=Array.isArray(e.pages)?e.pages.map(t=>t instanceof m?t:new m(t)):[],this.createdAt=e.createdAt||Date.now(),this.updatedAt=e.updatedAt||Date.now()}get pageCount(){return this.pages.length}toJSON(){return{id:this.id,name:this.name,pages:this.pages.map(e=>e.toJSON()),createdAt:this.createdAt,updatedAt:this.updatedAt}}},P=class{constructor(e={}){this.mode=e.mode==="single"?"single":"batch",this.aspect=e.aspect||"auto",this.docId=e.docId||null,this.maxPages=Math.max(0,Number(e.maxPages)||0),this.stage="viewfinder",this.activePageIndex=0,this.history=[],this.future=[]}pushHistory(e){this.history.push(e),this.future=[],this.history.length>50&&this.history.shift()}undo(){if(this.history.length===0)return null;let e=this.history.pop();return this.future.push(e),e}redo(){if(this.future.length===0)return null;let e=this.future.pop();return this.history.push(e),e}};var $={PAGE_ADDED:"copio:page-added",PAGE_REMOVED:"copio:page-removed",PAGES_CHANGED:"copio:pages-changed",SCAN_COMPLETE:"copio:scan-complete",EXPORT_PROGRESS:"copio:export-progress",EXPORT_COMPLETE:"copio:export-complete",OCR_COMPLETE:"copio:ocr-complete",SYNC_CONNECTED:"copio:sync-connected",ERROR:"copio:error"};function k(o,e,t={}){let s=new CustomEvent(e,{bubbles:!0,composed:!0,cancelable:!0,detail:t});return o&&typeof o.dispatchEvent=="function"&&o.dispatchEvent(s),s}var _=["crop","rotate","filter","ocr","export","sync"],v=["pdf","zip","png","jpg"],A=["eng"],b={};function pe(o,e){!o||!e||(b[o]=e,typeof globalThis<"u"&&(globalThis.__copio_services__=globalThis.__copio_services__||{},globalThis.__copio_services__[o]=e))}function g(o){return b[o]?b[o]:typeof globalThis<"u"&&globalThis.__copio_services__?.[o]?globalThis.__copio_services__[o]:null}function z(o){return o?o instanceof Set?new Set(o):Array.isArray(o)?new Set(o.map(e=>String(e).trim().toLowerCase()).filter(Boolean)):typeof o=="string"?new Set(o.split(/[\s,]+/).map(e=>e.trim().toLowerCase()).filter(Boolean)):new Set(_):new Set(_)}function y(o,e){return o?Array.isArray(o)?o.map(t=>String(t).trim().toLowerCase()).filter(Boolean):typeof o=="string"?o.split(/[\s,]+/).map(t=>t.trim().toLowerCase()).filter(Boolean):[...e]:[...e]}var N=class{#e=new Set(_);#t=[...v];#s=[...A];#o=0;#d="";#i=null;#r=null;#l={};#n=!0;#h=!0;#a=null;#c=new Map;#u=new Map;constructor(e={}){this.#i=e.storage||w(e),this.#r=e.repository||new l(this.#i),e.services&&(this.#l={...e.services}),e.imageProcessor?(this.#a=e.imageProcessor,this.#l.imageProcessor=e.imageProcessor):this.getService("imageProcessor")?this.#a=this.getService("imageProcessor"):typeof document<"u"?this.#a=new O:this.#a=new C,e.features!==void 0&&this.setFeatures(e.features),e.exportFormats!==void 0&&(this.#t=y(e.exportFormats,v)),e.ocrLanguages!==void 0&&(this.#s=y(e.ocrLanguages,A)),e.maxPages!==void 0&&(this.#o=Math.max(0,Number(e.maxPages)||0)),e.assetBase!==void 0&&S(e.assetBase),e.licenseKey!==void 0&&(this.#d=String(e.licenseKey||"")),e.ocr!==void 0?this.ocr=!!e.ocr:e.features!==void 0&&!this.hasFeature("ocr")&&(this.ocr=!1),e.pdf!==void 0?this.pdf=!!e.pdf:e.exportFormats!==void 0&&!this.#t.includes("pdf")&&(this.pdf=!1)}async init(){return this.#i.init()}setService(e,t){this.#l[e]=t}getService(e){return this.#l[e]||g(e)}hasFeature(e){return e?this.#e.has(String(e).trim().toLowerCase()):!1}get features(){return Array.from(this.#e)}setFeatures(e){this.#e=z(e),this.hasFeature("ocr")?(this.#n=!0,this.getService("ocr")instanceof d&&this.setService("ocr",g("ocr"))):(this.#n=!1,this.setService("ocr",new d))}enableFeature(e){if(e){let t=String(e).trim().toLowerCase();this.#e.add(t),t==="ocr"&&(this.#n=!0,this.getService("ocr")instanceof d&&this.setService("ocr",g("ocr")))}}disableFeature(e){if(e){let t=String(e).trim().toLowerCase();this.#e.delete(t),t==="ocr"&&(this.#n=!1,this.setService("ocr",new d))}}get ocr(){return this.#n&&this.hasFeature("ocr")}set ocr(e){this.#n=!!e,this.#n?(this.enableFeature("ocr"),this.getService("ocr")instanceof d&&this.setService("ocr",g("ocr"))):(this.disableFeature("ocr"),this.setService("ocr",new d))}get pdf(){return this.#h&&this.#t.includes("pdf")}set pdf(e){this.#h=!!e,this.#h?(this.#t.includes("pdf")||this.#t.push("pdf"),this.getService("pdf")instanceof f&&this.setService("pdf",g("pdf"))):(this.#t=this.#t.filter(t=>t!=="pdf"),this.setService("pdf",new f))}get exportFormats(){return[...this.#t]}set exportFormats(e){this.#t=y(e,v),this.#t.includes("pdf")?(this.#h=!0,this.getService("pdf")instanceof f&&this.setService("pdf",g("pdf"))):(this.#h=!1,this.setService("pdf",new f))}get ocrLanguages(){return[...this.#s]}set ocrLanguages(e){this.#s=y(e,A)}get maxPages(){return this.#o}set maxPages(e){this.#o=Math.max(0,Number(e)||0)}get assetBase(){return F()}set assetBase(e){S(e)}get licenseKey(){return this.#d}set licenseKey(e){this.#d=String(e||"")}get storage(){return this.#i}setStorage(e){e&&(this.#i=e,this.#r=new l(this.#i))}#g(e,t){this.#c.has(e)||this.#c.set(e,[]);let s=this.#c.get(e);s.push(t),s.length>50&&s.shift(),this.#u.has(e)&&(this.#u.get(e).length=0)}get imageProcessor(){return this.#a}setImageProcessor(e){e&&(this.#a=e,this.setService("imageProcessor",e))}get docs(){return this.#r}async listDocuments(){return this.#r.listDocs()}async getDocument(e){return this.#r.getDoc(e)}async createDocument(e,t){return this.#r.createDoc(e,t)}async deleteDocument(e,t={}){return this.#r.deleteDoc(e,t)}async undoDeleteDocument(e){return this.#r.undoDeleteDoc(e)}async renameDocument(e,t){return this.#r.renameDoc(e,t)}async addPages(e,t){return this.#r.addPages(e,t)}async deletePage(e,t,s={}){return this.#g(e,{type:"delete",pageId:t}),this.#r.deletePage(e,t,s)}async undoDeletePage(e,t){return this.#r.undoDeletePage(e,t)}async updatePage(e,t,s){return this.#r.updatePage(e,t,s)}async reorderPages(e,t){let s=await this.getDocument(e),r=s?.pages?s.pages.map(n=>n.id):[];return this.#g(e,{type:"reorder",priorOrder:r,newOrder:[...t]}),this.#r.reorderPages(e,t)}async#p(e){if(e)return e;let t=await this.listDocuments();return t.length>0?t[0].id:null}async applyEdit(e,t,s){let r=await this.#p(e),n=r?await this.getDocument(r):null;if(!n||!n.pages)throw new Error(`Document with ID "${r||e}" not found`);let i=n.pages.find(M=>M.id===t);if(!i)throw new Error(`Page with ID "${t}" not found in document "${r}"`);let a={...i.edits||{crop:null,rotate:0,filter:"none"}},h=i.src,c=x({...a,...s}),u=i.originalSrc||i.src,D=u;return this.#a&&(D=await this.#a.renderEdits(u,c)),await this.updatePage(r,t,{originalSrc:u,src:D,edits:c}),this.#g(r,{type:"edit",pageId:t,priorEdits:a,priorSrc:h,newEdits:c,newSrc:D}),{...i,originalSrc:u,src:D,edits:c}}async undo(e){let t=await this.#p(e),s=t?this.#c.get(t):null;if(!s||s.length===0)return null;let r=s.pop();return this.#u.has(t)||this.#u.set(t,[]),this.#u.get(t).push(r),r.type==="edit"?(await this.updatePage(t,r.pageId,{edits:r.priorEdits,src:r.priorSrc}),{type:"edit",pageId:r.pageId,restoredEdits:r.priorEdits}):r.type==="delete"?(await this.undoDeletePage(t,r.pageId),{type:"delete",pageId:r.pageId}):r.type==="reorder"?(await this.#r.reorderPages(t,r.priorOrder),{type:"reorder",priorOrder:r.priorOrder}):r}async redo(e){let t=await this.#p(e),s=t?this.#u.get(t):null;if(!s||s.length===0)return null;let r=s.pop();return this.#c.has(t)||this.#c.set(t,[]),this.#c.get(t).push(r),r.type==="edit"?(await this.updatePage(t,r.pageId,{edits:r.newEdits,src:r.newSrc}),{type:"edit",pageId:r.pageId,appliedEdits:r.newEdits}):r.type==="delete"?(await this.deletePage(t,r.pageId),{type:"delete",pageId:r.pageId}):r.type==="reorder"?(await this.reorderPages(t,r.newOrder),{type:"reorder",newOrder:r.newOrder}):r}subscribe(e){return this.#r.subscribe(e)}async addFiles(e,t=null){if(!e||e.length===0)return[];let s=Array.from(e),r=[];for(let i of s)if(i.type==="application/pdf"){let a=this.getService("pdf");if(a&&typeof a.renderPdfPagesToDataUrls=="function"){let h=await a.renderPdfPagesToDataUrls(i);for(let c of h)r.push({id:p(),src:c,originalSrc:c,edits:{crop:null,rotation:0,filter:"none"},type:"image",name:i.name||"PDF Page"})}else console.warn("PDF import service (PdfPort) not registered. Skipping PDF file.")}else if(i.type&&i.type.startsWith("image/")){let a=await T(i),h=null;try{h=await I(i)}catch{}r.push({id:p(),src:a,originalSrc:a,edits:{crop:null,rotation:0,filter:"none"},type:"image",name:i.name||"Captured Image",orientation:h})}if(r.length===0)return[];let n=t;if(n)await this.getDocument(n)||await this.#r.saveDoc(n,{name:"Scanned Document",pages:[]});else{let i=await this.listDocuments();i.length>0?n=i[0].id:n=(await this.createDocument("Scanned Document",[])).id}if(this.#o>0){let i=(await this.getDocument(n))?.pages||[],a=Math.max(0,this.#o-i.length);if(a<=0)throw new Error(`Maximum page limit (${this.#o}) reached`);r.splice(a)}return await this.addPages(n,r),r}async getPages(e=null){let t=e;if(!t){let r=await this.listDocuments();if(r.length===0)return[];t=r[0].id}return(await this.getDocument(t))?.pages||[]}async clear(e=null){let t=e;if(!t){let r=await this.listDocuments();if(r.length===0)return;t=r[0].id}let s=await this.getDocument(t);if(!(!s||!s.pages))for(let r of s.pages)await this.deletePage(t,r.id)}async#f(e){if(Array.isArray(e))return{docName:"document",pages:e,docId:null};if(typeof e=="string"){let s=await this.getDocument(e);return{docName:s?.name||"document",pages:s?.pages||[],docId:e}}let t=await this.listDocuments();if(t.length>0){let s=await this.getDocument(t[0].id);return{docName:s?.name||"document",pages:s?.pages||[],docId:t[0].id}}return{docName:"document",pages:[],docId:null}}async exportPdf(e,t={}){if(!this.hasFeature("export")){let i=new Error('Feature "export" is disabled');throw Object.assign(i,{code:"FEATURE_DISABLED"}),i}if(!this.#h||!this.#t.includes("pdf")){let i=new Error('Feature "pdf" is disabled');throw Object.assign(i,{code:"FEATURE_DISABLED"}),i}let{docName:s,pages:r}=await this.#f(e),n=this.getService("pdf")||this.getService("export");if(!n||typeof n.exportDocumentAsPdf!="function")throw new Error("Export service (PdfPort) is not registered. Import @copio/sdk or register an exportService.");return n.exportDocumentAsPdf(s,r,{download:!1,showProgress:!1,...t})}async exportZip(e,t={}){if(!this.hasFeature("export")){let i=new Error('Feature "export" is disabled');throw Object.assign(i,{code:"FEATURE_DISABLED"}),i}let{docName:s,pages:r}=await this.#f(e),n=this.getService("export");if(!n||typeof n.exportDocumentAsImages!="function")throw new Error("Export service is not registered. Import @copio/sdk or register an exportService.");return n.exportDocumentAsImages(s,r,{download:!1,showProgress:!1,...t})}async runOcr(e,t=null,s={}){if(!this.#n||!this.hasFeature("ocr")){let c=new Error('Feature "ocr" is disabled');throw Object.assign(c,{code:"FEATURE_DISABLED"}),c}let{pages:r}=await this.#f(e),n=r;t&&(n=r.filter(c=>c.id===t));let i=this.getService("ocr");if(!i||typeof i.recognizeDocumentPages!="function")throw new Error("OCR service (OcrPort) is not registered. Import @copio/sdk or register an ocrService.");let a=s.lang||this.#s[0]||"eng",h=await i.recognizeDocumentPages(n,{lang:a,...s});return{text:h.combinedText,...h}}async sync(e={}){if(!this.hasFeature("sync")){let s=new Error('Feature "sync" is disabled');throw Object.assign(s,{code:"FEATURE_DISABLED"}),s}let t=this.getService("sync");if(!t)throw new Error("Sync service (SyncPort) is not registered. Import @copio/sdk or register a syncService.");return new t(this.#r,e.onStateChange)}};export{l as a,R as b,B as c,U as d,x as e,L as f,m as g,E as h,P as i,$ as j,k,_ as l,v as m,A as n,pe as o,g as p,N as q};
|
|
2
|
+
//# sourceMappingURL=chunk-HS6GDZIS.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as R,k as Bt,q as nt}from"./chunk-QPUCXOOR.js";import{a as re,b as O,c as K}from"./chunk-XEN5VKAV.js";import{a as It,b as ce,c as Tt,h as ue,i as Pt,j as Mt,k as at}from"./chunk-N7Q34F2P.js";import{a as Nt}from"./chunk-IUBYFIV6.js";import{a as Ce,b as st,d as Y}from"./chunk-V2FP4EEH.js";import{b as _t,e as Rt,h as Ot}from"./chunk-G65H4ZTJ.js";function zt(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(i);e&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,o)}return t}function Z(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?zt(Object(t),!0).forEach(function(o){uo(i,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):zt(Object(t)).forEach(function(o){Object.defineProperty(i,o,Object.getOwnPropertyDescriptor(t,o))})}return i}function He(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?He=function(e){return typeof e}:He=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(i)}function uo(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function ee(){return ee=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=t[o])}return i},ee.apply(this,arguments)}function fo(i,e){if(i==null)return{};var t={},o=Object.keys(i),r,a;for(a=0;a<o.length;a++)r=o[a],!(e.indexOf(r)>=0)&&(t[r]=i[r]);return t}function go(i,e){if(i==null)return{};var t=fo(i,e),o,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(i);for(r=0;r<a.length;r++)o=a[r],!(e.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(i,o)&&(t[o]=i[o])}return t}var mo="1.15.6";function J(i){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(i)}var te=J(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Oe=J(/Edge/i),Lt=J(/firefox/i),Te=J(/safari/i)&&!J(/chrome/i)&&!J(/android/i),wt=J(/iP(ad|od|hone)/i),Xt=J(/chrome/i)&&J(/android/i),Gt={capture:!1,passive:!1};function E(i,e,t){i.addEventListener(e,t,!te&&Gt)}function w(i,e,t){i.removeEventListener(e,t,!te&&Gt)}function Ge(i,e){if(e){if(e[0]===">"&&(e=e.substring(1)),i)try{if(i.matches)return i.matches(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e)}catch{return!1}return!1}}function Yt(i){return i.host&&i!==document&&i.host.nodeType?i.host:i.parentNode}function G(i,e,t,o){if(i){t=t||document;do{if(e!=null&&(e[0]===">"?i.parentNode===t&&Ge(i,e):Ge(i,e))||o&&i===t)return i;if(i===t)break}while(i=Yt(i))}return null}var Ft=/\s+/g;function q(i,e,t){if(i&&e)if(i.classList)i.classList[t?"add":"remove"](e);else{var o=(" "+i.className+" ").replace(Ft," ").replace(" "+e+" "," ");i.className=(o+(t?" "+e:"")).replace(Ft," ")}}function m(i,e,t){var o=i&&i.style;if(o){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(t=i.currentStyle),e===void 0?t:t[e];!(e in o)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),o[e]=t+(typeof t=="string"?"":"px")}}function ve(i,e){var t="";if(typeof i=="string")t=i;else do{var o=m(i,"transform");o&&o!=="none"&&(t=o+" "+t)}while(!e&&(i=i.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function Kt(i,e,t){if(i){var o=i.getElementsByTagName(e),r=0,a=o.length;if(t)for(;r<a;r++)t(o[r],r);return o}return[]}function V(){var i=document.scrollingElement;return i||document.documentElement}function _(i,e,t,o,r){if(!(!i.getBoundingClientRect&&i!==window)){var a,n,s,l,c,p,d;if(i!==window&&i.parentNode&&i!==V()?(a=i.getBoundingClientRect(),n=a.top,s=a.left,l=a.bottom,c=a.right,p=a.height,d=a.width):(n=0,s=0,l=window.innerHeight,c=window.innerWidth,p=window.innerHeight,d=window.innerWidth),(e||t)&&i!==window&&(r=r||i.parentNode,!te))do if(r&&r.getBoundingClientRect&&(m(r,"transform")!=="none"||t&&m(r,"position")!=="static")){var u=r.getBoundingClientRect();n-=u.top+parseInt(m(r,"border-top-width")),s-=u.left+parseInt(m(r,"border-left-width")),l=n+a.height,c=s+a.width;break}while(r=r.parentNode);if(o&&i!==window){var v=ve(r||i),f=v&&v.a,y=v&&v.d;v&&(n/=y,s/=f,d/=f,p/=y,l=n+p,c=s+d)}return{top:n,left:s,bottom:l,right:c,width:d,height:p}}}function $t(i,e,t){for(var o=se(i,!0),r=_(i)[e];o;){var a=_(o)[t],n=void 0;if(t==="top"||t==="left"?n=r>=a:n=r<=a,!n)return o;if(o===V())break;o=se(o,!1)}return!1}function xe(i,e,t,o){for(var r=0,a=0,n=i.children;a<n.length;){if(n[a].style.display!=="none"&&n[a]!==b.ghost&&(o||n[a]!==b.dragged)&&G(n[a],t.draggable,i,!1)){if(r===e)return n[a];r++}a++}return null}function Et(i,e){for(var t=i.lastElementChild;t&&(t===b.ghost||m(t,"display")==="none"||e&&!Ge(t,e));)t=t.previousElementSibling;return t||null}function U(i,e){var t=0;if(!i||!i.parentNode)return-1;for(;i=i.previousElementSibling;)i.nodeName.toUpperCase()!=="TEMPLATE"&&i!==b.clone&&(!e||Ge(i,e))&&t++;return t}function jt(i){var e=0,t=0,o=V();if(i)do{var r=ve(i),a=r.a,n=r.d;e+=i.scrollLeft*a,t+=i.scrollTop*n}while(i!==o&&(i=i.parentNode));return[e,t]}function bo(i,e){for(var t in i)if(i.hasOwnProperty(t)){for(var o in e)if(e.hasOwnProperty(o)&&e[o]===i[t][o])return Number(t)}return-1}function se(i,e){if(!i||!i.getBoundingClientRect)return V();var t=i,o=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var r=m(t);if(t.clientWidth<t.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return V();if(o||e)return t;o=!0}}while(t=t.parentNode);return V()}function vo(i,e){if(i&&e)for(var t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return i}function lt(i,e){return Math.round(i.top)===Math.round(e.top)&&Math.round(i.left)===Math.round(e.left)&&Math.round(i.height)===Math.round(e.height)&&Math.round(i.width)===Math.round(e.width)}var Pe;function Vt(i,e){return function(){if(!Pe){var t=arguments,o=this;t.length===1?i.call(o,t[0]):i.apply(o,t),Pe=setTimeout(function(){Pe=void 0},e)}}}function xo(){clearTimeout(Pe),Pe=void 0}function Zt(i,e,t){i.scrollLeft+=e,i.scrollTop+=t}function Qt(i){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(i).cloneNode(!0):t?t(i).clone(!0)[0]:i.cloneNode(!0)}function Jt(i,e,t){var o={};return Array.from(i.children).forEach(function(r){var a,n,s,l;if(!(!G(r,e.draggable,i,!1)||r.animated||r===t)){var c=_(r);o.left=Math.min((a=o.left)!==null&&a!==void 0?a:1/0,c.left),o.top=Math.min((n=o.top)!==null&&n!==void 0?n:1/0,c.top),o.right=Math.max((s=o.right)!==null&&s!==void 0?s:-1/0,c.right),o.bottom=Math.max((l=o.bottom)!==null&&l!==void 0?l:-1/0,c.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var j="Sortable"+new Date().getTime();function yo(){var i=[],e;return{captureAnimationState:function(){if(i=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(r){if(!(m(r,"display")==="none"||r===b.ghost)){i.push({target:r,rect:_(r)});var a=Z({},i[i.length-1].rect);if(r.thisAnimationDuration){var n=ve(r,!0);n&&(a.top-=n.f,a.left-=n.e)}r.fromRect=a}})}},addAnimationState:function(o){i.push(o)},removeAnimationState:function(o){i.splice(bo(i,{target:o}),1)},animateAll:function(o){var r=this;if(!this.options.animation){clearTimeout(e),typeof o=="function"&&o();return}var a=!1,n=0;i.forEach(function(s){var l=0,c=s.target,p=c.fromRect,d=_(c),u=c.prevFromRect,v=c.prevToRect,f=s.rect,y=ve(c,!0);y&&(d.top-=y.f,d.left-=y.e),c.toRect=d,c.thisAnimationDuration&<(u,d)&&!lt(p,d)&&(f.top-d.top)/(f.left-d.left)===(p.top-d.top)/(p.left-d.left)&&(l=Eo(f,u,v,r.options)),lt(d,p)||(c.prevFromRect=p,c.prevToRect=d,l||(l=r.options.animation),r.animate(c,f,d,l)),l&&(a=!0,n=Math.max(n,l),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},l),c.thisAnimationDuration=l)}),clearTimeout(e),a?e=setTimeout(function(){typeof o=="function"&&o()},n):typeof o=="function"&&o(),i=[]},animate:function(o,r,a,n){if(n){m(o,"transition",""),m(o,"transform","");var s=ve(this.el),l=s&&s.a,c=s&&s.d,p=(r.left-a.left)/(l||1),d=(r.top-a.top)/(c||1);o.animatingX=!!p,o.animatingY=!!d,m(o,"transform","translate3d("+p+"px,"+d+"px,0)"),this.forRepaintDummy=wo(o),m(o,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),m(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){m(o,"transition",""),m(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},n)}}}}function wo(i){return i.offsetWidth}function Eo(i,e,t,o){return Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*o.animation}var fe=[],ct={initializeByDefault:!0},Be={mount:function(e){for(var t in ct)ct.hasOwnProperty(t)&&!(t in e)&&(e[t]=ct[t]);fe.forEach(function(o){if(o.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),fe.push(e)},pluginEvent:function(e,t,o){var r=this;this.eventCanceled=!1,o.cancel=function(){r.eventCanceled=!0};var a=e+"Global";fe.forEach(function(n){t[n.pluginName]&&(t[n.pluginName][a]&&t[n.pluginName][a](Z({sortable:t},o)),t.options[n.pluginName]&&t[n.pluginName][e]&&t[n.pluginName][e](Z({sortable:t},o)))})},initializePlugins:function(e,t,o,r){fe.forEach(function(s){var l=s.pluginName;if(!(!e.options[l]&&!s.initializeByDefault)){var c=new s(e,t,e.options);c.sortable=e,c.options=e.options,e[l]=c,ee(o,c.defaults)}});for(var a in e.options)if(e.options.hasOwnProperty(a)){var n=this.modifyOption(e,a,e.options[a]);typeof n<"u"&&(e.options[a]=n)}},getEventProperties:function(e,t){var o={};return fe.forEach(function(r){typeof r.eventProperties=="function"&&ee(o,r.eventProperties.call(t[r.pluginName],e))}),o},modifyOption:function(e,t,o){var r;return fe.forEach(function(a){e[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[t]=="function"&&(r=a.optionListeners[t].call(e[a.pluginName],o))}),r}};function ko(i){var e=i.sortable,t=i.rootEl,o=i.name,r=i.targetEl,a=i.cloneEl,n=i.toEl,s=i.fromEl,l=i.oldIndex,c=i.newIndex,p=i.oldDraggableIndex,d=i.newDraggableIndex,u=i.originalEvent,v=i.putSortable,f=i.extraEventProperties;if(e=e||t&&t[j],!!e){var y,C=e.options,A="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!te&&!Oe?y=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(o,!0,!0)),y.to=n||t,y.from=s||t,y.item=r||t,y.clone=a,y.oldIndex=l,y.newIndex=c,y.oldDraggableIndex=p,y.newDraggableIndex=d,y.originalEvent=u,y.pullMode=v?v.lastPutMode:void 0;var k=Z(Z({},f),Be.getEventProperties(o,e));for(var D in k)y[D]=k[D];t&&t.dispatchEvent(y),C[A]&&C[A].call(e,y)}}var So=["evt"],$=function(e,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=o.evt,a=go(o,So);Be.pluginEvent.bind(b)(e,t,Z({dragEl:h,parentEl:P,ghostEl:x,rootEl:I,nextEl:he,lastDownEl:qe,cloneEl:T,cloneHidden:ne,dragStarted:De,putSortable:B,activeSortable:b.active,originalEvent:r,oldIndex:be,oldDraggableIndex:Me,newIndex:W,newDraggableIndex:ae,hideGhostForTarget:io,unhideGhostForTarget:ro,cloneNowHidden:function(){ne=!0},cloneNowShown:function(){ne=!1},dispatchSortableEvent:function(s){F({sortable:t,name:s,originalEvent:r})}},a))};function F(i){ko(Z({putSortable:B,cloneEl:T,targetEl:h,rootEl:I,oldIndex:be,oldDraggableIndex:Me,newIndex:W,newDraggableIndex:ae},i))}var h,P,x,I,he,qe,T,ne,be,W,Me,ae,Le,B,me=!1,Ye=!1,Ke=[],de,X,dt,pt,Ht,qt,De,ge,_e,Re=!1,Fe=!1,We,L,ht=[],bt=!1,Ve=[],Qe=typeof document<"u",$e=wt,Wt=Oe||te?"cssFloat":"float",Co=Qe&&!Xt&&!wt&&"draggable"in document.createElement("div"),eo=(function(){if(Qe){if(te)return!1;var i=document.createElement("x");return i.style.cssText="pointer-events:auto",i.style.pointerEvents==="auto"}})(),to=function(e,t){var o=m(e),r=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),a=xe(e,0,t),n=xe(e,1,t),s=a&&m(a),l=n&&m(n),c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+_(a).width,p=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+_(n).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&s.float&&s.float!=="none"){var d=s.float==="left"?"left":"right";return n&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return a&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||c>=r&&o[Wt]==="none"||n&&o[Wt]==="none"&&c+p>r)?"vertical":"horizontal"},Do=function(e,t,o){var r=o?e.left:e.top,a=o?e.right:e.bottom,n=o?e.width:e.height,s=o?t.left:t.top,l=o?t.right:t.bottom,c=o?t.width:t.height;return r===s||a===l||r+n/2===s+c/2},Ao=function(e,t){var o;return Ke.some(function(r){var a=r[j].options.emptyInsertThreshold;if(!(!a||Et(r))){var n=_(r),s=e>=n.left-a&&e<=n.right+a,l=t>=n.top-a&&t<=n.bottom+a;if(s&&l)return o=r}}),o},oo=function(e){function t(a,n){return function(s,l,c,p){var d=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(a==null&&(n||d))return!0;if(a==null||a===!1)return!1;if(n&&a==="clone")return a;if(typeof a=="function")return t(a(s,l,c,p),n)(s,l,c,p);var u=(n?s:l).options.group.name;return a===!0||typeof a=="string"&&a===u||a.join&&a.indexOf(u)>-1}}var o={},r=e.group;(!r||He(r)!="object")&&(r={name:r}),o.name=r.name,o.checkPull=t(r.pull,!0),o.checkPut=t(r.put),o.revertClone=r.revertClone,e.group=o},io=function(){!eo&&x&&m(x,"display","none")},ro=function(){!eo&&x&&m(x,"display","")};Qe&&!Xt&&document.addEventListener("click",function(i){if(Ye)return i.preventDefault(),i.stopPropagation&&i.stopPropagation(),i.stopImmediatePropagation&&i.stopImmediatePropagation(),Ye=!1,!1},!0);var pe=function(e){if(h){e=e.touches?e.touches[0]:e;var t=Ao(e.clientX,e.clientY);if(t){var o={};for(var r in e)e.hasOwnProperty(r)&&(o[r]=e[r]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[j]._onDragOver(o)}}},Io=function(e){h&&h.parentNode[j]._isOutsideThisEl(e.target)};function b(i,e){if(!(i&&i.nodeType&&i.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));this.el=i,this.options=e=ee({},e),i[j]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(i.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return to(i,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(n,s){n.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:b.supportPointer!==!1&&"PointerEvent"in window&&(!Te||wt),emptyInsertThreshold:5};Be.initializePlugins(this,i,t);for(var o in t)!(o in e)&&(e[o]=t[o]);oo(e);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=e.forceFallback?!1:Co,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?E(i,"pointerdown",this._onTapStart):(E(i,"mousedown",this._onTapStart),E(i,"touchstart",this._onTapStart)),this.nativeDraggable&&(E(i,"dragover",this),E(i,"dragenter",this)),Ke.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ee(this,yo())}b.prototype={constructor:b,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(ge=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,h):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,o=this.el,r=this.options,a=r.preventOnFilter,n=e.type,s=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(s||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,p=r.filter;if(No(o),!h&&!(/mousedown|pointerdown/.test(n)&&e.button!==0||r.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Te&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=G(l,r.draggable,o,!1),!(l&&l.animated)&&qe!==l)){if(be=U(l),Me=U(l,r.draggable),typeof p=="function"){if(p.call(this,e,l,this)){F({sortable:t,rootEl:c,name:"filter",targetEl:l,toEl:o,fromEl:o}),$("filter",t,{evt:e}),a&&e.preventDefault();return}}else if(p&&(p=p.split(",").some(function(d){if(d=G(c,d.trim(),o,!1),d)return F({sortable:t,rootEl:d,name:"filter",targetEl:l,fromEl:o,toEl:o}),$("filter",t,{evt:e}),!0}),p)){a&&e.preventDefault();return}r.handle&&!G(c,r.handle,o,!1)||this._prepareDragStart(e,s,l)}}},_prepareDragStart:function(e,t,o){var r=this,a=r.el,n=r.options,s=a.ownerDocument,l;if(o&&!h&&o.parentNode===a){var c=_(o);if(I=a,h=o,P=h.parentNode,he=h.nextSibling,qe=o,Le=n.group,b.dragged=h,de={target:h,clientX:(t||e).clientX,clientY:(t||e).clientY},Ht=de.clientX-c.left,qt=de.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,h.style["will-change"]="all",l=function(){if($("delayEnded",r,{evt:e}),b.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Lt&&r.nativeDraggable&&(h.draggable=!0),r._triggerDragStart(e,t),F({sortable:r,name:"choose",originalEvent:e}),q(h,n.chosenClass,!0)},n.ignore.split(",").forEach(function(p){Kt(h,p.trim(),ut)}),E(s,"dragover",pe),E(s,"mousemove",pe),E(s,"touchmove",pe),n.supportPointer?(E(s,"pointerup",r._onDrop),!this.nativeDraggable&&E(s,"pointercancel",r._onDrop)):(E(s,"mouseup",r._onDrop),E(s,"touchend",r._onDrop),E(s,"touchcancel",r._onDrop)),Lt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),$("delayStart",this,{evt:e}),n.delay&&(!n.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Oe||te))){if(b.eventCanceled){this._onDrop();return}n.supportPointer?(E(s,"pointerup",r._disableDelayedDrag),E(s,"pointercancel",r._disableDelayedDrag)):(E(s,"mouseup",r._disableDelayedDrag),E(s,"touchend",r._disableDelayedDrag),E(s,"touchcancel",r._disableDelayedDrag)),E(s,"mousemove",r._delayedDragTouchMoveHandler),E(s,"touchmove",r._delayedDragTouchMoveHandler),n.supportPointer&&E(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(l,n.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){h&&ut(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;w(e,"mouseup",this._disableDelayedDrag),w(e,"touchend",this._disableDelayedDrag),w(e,"touchcancel",this._disableDelayedDrag),w(e,"pointerup",this._disableDelayedDrag),w(e,"pointercancel",this._disableDelayedDrag),w(e,"mousemove",this._delayedDragTouchMoveHandler),w(e,"touchmove",this._delayedDragTouchMoveHandler),w(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?E(document,"pointermove",this._onTouchMove):t?E(document,"touchmove",this._onTouchMove):E(document,"mousemove",this._onTouchMove):(E(h,"dragend",this),E(I,"dragstart",this._onDragStart));try{document.selection?Ue(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(me=!1,I&&h){$("dragStarted",this,{evt:t}),this.nativeDraggable&&E(document,"dragover",Io);var o=this.options;!e&&q(h,o.dragClass,!1),q(h,o.ghostClass,!0),b.active=this,e&&this._appendGhost(),F({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(X){this._lastX=X.clientX,this._lastY=X.clientY,io();for(var e=document.elementFromPoint(X.clientX,X.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(X.clientX,X.clientY),e!==t);)t=e;if(h.parentNode[j]._isOutsideThisEl(e),t)do{if(t[j]){var o=void 0;if(o=t[j]._onDragOver({clientX:X.clientX,clientY:X.clientY,target:e,rootEl:t}),o&&!this.options.dragoverBubble)break}e=t}while(t=Yt(t));ro()}},_onTouchMove:function(e){if(de){var t=this.options,o=t.fallbackTolerance,r=t.fallbackOffset,a=e.touches?e.touches[0]:e,n=x&&ve(x,!0),s=x&&n&&n.a,l=x&&n&&n.d,c=$e&&L&&jt(L),p=(a.clientX-de.clientX+r.x)/(s||1)+(c?c[0]-ht[0]:0)/(s||1),d=(a.clientY-de.clientY+r.y)/(l||1)+(c?c[1]-ht[1]:0)/(l||1);if(!b.active&&!me){if(o&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(x){n?(n.e+=p-(dt||0),n.f+=d-(pt||0)):n={a:1,b:0,c:0,d:1,e:p,f:d};var u="matrix(".concat(n.a,",").concat(n.b,",").concat(n.c,",").concat(n.d,",").concat(n.e,",").concat(n.f,")");m(x,"webkitTransform",u),m(x,"mozTransform",u),m(x,"msTransform",u),m(x,"transform",u),dt=p,pt=d,X=a}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!x){var e=this.options.fallbackOnBody?document.body:I,t=_(h,!0,$e,!0,e),o=this.options;if($e){for(L=e;m(L,"position")==="static"&&m(L,"transform")==="none"&&L!==document;)L=L.parentNode;L!==document.body&&L!==document.documentElement?(L===document&&(L=V()),t.top+=L.scrollTop,t.left+=L.scrollLeft):L=V(),ht=jt(L)}x=h.cloneNode(!0),q(x,o.ghostClass,!1),q(x,o.fallbackClass,!0),q(x,o.dragClass,!0),m(x,"transition",""),m(x,"transform",""),m(x,"box-sizing","border-box"),m(x,"margin",0),m(x,"top",t.top),m(x,"left",t.left),m(x,"width",t.width),m(x,"height",t.height),m(x,"opacity","0.8"),m(x,"position",$e?"absolute":"fixed"),m(x,"zIndex","100000"),m(x,"pointerEvents","none"),b.ghost=x,e.appendChild(x),m(x,"transform-origin",Ht/parseInt(x.style.width)*100+"% "+qt/parseInt(x.style.height)*100+"%")}},_onDragStart:function(e,t){var o=this,r=e.dataTransfer,a=o.options;if($("dragStart",this,{evt:e}),b.eventCanceled){this._onDrop();return}$("setupClone",this),b.eventCanceled||(T=Qt(h),T.removeAttribute("id"),T.draggable=!1,T.style["will-change"]="",this._hideClone(),q(T,this.options.chosenClass,!1),b.clone=T),o.cloneId=Ue(function(){$("clone",o),!b.eventCanceled&&(o.options.removeCloneOnHide||I.insertBefore(T,h),o._hideClone(),F({sortable:o,name:"clone"}))}),!t&&q(h,a.dragClass,!0),t?(Ye=!0,o._loopId=setInterval(o._emulateDragOver,50)):(w(document,"mouseup",o._onDrop),w(document,"touchend",o._onDrop),w(document,"touchcancel",o._onDrop),r&&(r.effectAllowed="move",a.setData&&a.setData.call(o,r,h)),E(document,"drop",o),m(h,"transform","translateZ(0)")),me=!0,o._dragStartId=Ue(o._dragStarted.bind(o,t,e)),E(document,"selectstart",o),De=!0,window.getSelection().removeAllRanges(),Te&&m(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,o=e.target,r,a,n,s=this.options,l=s.group,c=b.active,p=Le===l,d=s.sort,u=B||c,v,f=this,y=!1;if(bt)return;function C(Se,po){$(Se,f,Z({evt:e,isOwner:p,axis:v?"vertical":"horizontal",revert:n,dragRect:r,targetRect:a,canSort:d,fromSortable:u,target:o,completed:k,onMove:function(At,ho){return je(I,t,h,r,At,_(At),e,ho)},changed:D},po))}function A(){C("dragOverAnimationCapture"),f.captureAnimationState(),f!==u&&u.captureAnimationState()}function k(Se){return C("dragOverCompleted",{insertion:Se}),Se&&(p?c._hideClone():c._showClone(f),f!==u&&(q(h,B?B.options.ghostClass:c.options.ghostClass,!1),q(h,s.ghostClass,!0)),B!==f&&f!==b.active?B=f:f===b.active&&B&&(B=null),u===f&&(f._ignoreWhileAnimating=o),f.animateAll(function(){C("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==u&&(u.animateAll(),u._ignoreWhileAnimating=null)),(o===h&&!h.animated||o===t&&!o.animated)&&(ge=null),!s.dragoverBubble&&!e.rootEl&&o!==document&&(h.parentNode[j]._isOutsideThisEl(e.target),!Se&&pe(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),y=!0}function D(){W=U(h),ae=U(h,s.draggable),F({sortable:f,name:"change",toEl:t,newIndex:W,newDraggableIndex:ae,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),o=G(o,s.draggable,t,!0),C("dragOver"),b.eventCanceled)return y;if(h.contains(e.target)||o.animated&&o.animatingX&&o.animatingY||f._ignoreWhileAnimating===o)return k(!1);if(Ye=!1,c&&!s.disabled&&(p?d||(n=P!==I):B===this||(this.lastPutMode=Le.checkPull(this,c,h,e))&&l.checkPut(this,c,h,e))){if(v=this._getDirection(e,o)==="vertical",r=_(h),C("dragOverValid"),b.eventCanceled)return y;if(n)return P=I,A(),this._hideClone(),C("revert"),b.eventCanceled||(he?I.insertBefore(h,he):I.appendChild(h)),k(!0);var g=Et(t,s.draggable);if(!g||_o(e,v,this)&&!g.animated){if(g===h)return k(!1);if(g&&t===e.target&&(o=g),o&&(a=_(o)),je(I,t,h,r,o,a,e,!!o)!==!1)return A(),g&&g.nextSibling?t.insertBefore(h,g.nextSibling):t.appendChild(h),P=t,D(),k(!0)}else if(g&&Mo(e,v,this)){var S=xe(t,0,s,!0);if(S===h)return k(!1);if(o=S,a=_(o),je(I,t,h,r,o,a,e,!1)!==!1)return A(),t.insertBefore(h,S),P=t,D(),k(!0)}else if(o.parentNode===t){a=_(o);var N=0,z,ye=h.parentNode!==t,H=!Do(h.animated&&h.toRect||r,o.animated&&o.toRect||a,v),we=v?"top":"left",oe=$t(o,"top","top")||$t(h,"top","top"),Ee=oe?oe.scrollTop:void 0;ge!==o&&(z=a[we],Re=!1,Fe=!H&&s.invertSwap||ye),N=Ro(e,o,a,v,H?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,Fe,ge===o);var Q;if(N!==0){var le=U(h);do le-=N,Q=P.children[le];while(Q&&(m(Q,"display")==="none"||Q===x))}if(N===0||Q===o)return k(!1);ge=o,_e=N;var ke=o.nextElementSibling,ie=!1;ie=N===1;var ze=je(I,t,h,r,o,a,e,ie);if(ze!==!1)return(ze===1||ze===-1)&&(ie=ze===1),bt=!0,setTimeout(Po,30),A(),ie&&!ke?t.appendChild(h):o.parentNode.insertBefore(h,ie?ke:o),oe&&Zt(oe,0,Ee-oe.scrollTop),P=h.parentNode,z!==void 0&&!Fe&&(We=Math.abs(z-_(o)[we])),D(),k(!0)}if(t.contains(h))return k(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){w(document,"mousemove",this._onTouchMove),w(document,"touchmove",this._onTouchMove),w(document,"pointermove",this._onTouchMove),w(document,"dragover",pe),w(document,"mousemove",pe),w(document,"touchmove",pe)},_offUpEvents:function(){var e=this.el.ownerDocument;w(e,"mouseup",this._onDrop),w(e,"touchend",this._onDrop),w(e,"pointerup",this._onDrop),w(e,"pointercancel",this._onDrop),w(e,"touchcancel",this._onDrop),w(document,"selectstart",this)},_onDrop:function(e){var t=this.el,o=this.options;if(W=U(h),ae=U(h,o.draggable),$("drop",this,{evt:e}),P=h&&h.parentNode,W=U(h),ae=U(h,o.draggable),b.eventCanceled){this._nulling();return}me=!1,Fe=!1,Re=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),vt(this.cloneId),vt(this._dragStartId),this.nativeDraggable&&(w(document,"drop",this),w(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Te&&m(document.body,"user-select",""),m(h,"transform",""),e&&(De&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),x&&x.parentNode&&x.parentNode.removeChild(x),(I===P||B&&B.lastPutMode!=="clone")&&T&&T.parentNode&&T.parentNode.removeChild(T),h&&(this.nativeDraggable&&w(h,"dragend",this),ut(h),h.style["will-change"]="",De&&!me&&q(h,B?B.options.ghostClass:this.options.ghostClass,!1),q(h,this.options.chosenClass,!1),F({sortable:this,name:"unchoose",toEl:P,newIndex:null,newDraggableIndex:null,originalEvent:e}),I!==P?(W>=0&&(F({rootEl:P,name:"add",toEl:P,fromEl:I,originalEvent:e}),F({sortable:this,name:"remove",toEl:P,originalEvent:e}),F({rootEl:P,name:"sort",toEl:P,fromEl:I,originalEvent:e}),F({sortable:this,name:"sort",toEl:P,originalEvent:e})),B&&B.save()):W!==be&&W>=0&&(F({sortable:this,name:"update",toEl:P,originalEvent:e}),F({sortable:this,name:"sort",toEl:P,originalEvent:e})),b.active&&((W==null||W===-1)&&(W=be,ae=Me),F({sortable:this,name:"end",toEl:P,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){$("nulling",this),I=h=P=x=he=T=qe=ne=de=X=De=W=ae=be=Me=ge=_e=B=Le=b.dragged=b.ghost=b.clone=b.active=null,Ve.forEach(function(e){e.checked=!0}),Ve.length=dt=pt=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":h&&(this._onDragOver(e),To(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,o=this.el.children,r=0,a=o.length,n=this.options;r<a;r++)t=o[r],G(t,n.draggable,this.el,!1)&&e.push(t.getAttribute(n.dataIdAttr)||Bo(t));return e},sort:function(e,t){var o={},r=this.el;this.toArray().forEach(function(a,n){var s=r.children[n];G(s,this.options.draggable,r,!1)&&(o[a]=s)},this),t&&this.captureAnimationState(),e.forEach(function(a){o[a]&&(r.removeChild(o[a]),r.appendChild(o[a]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return G(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var o=this.options;if(t===void 0)return o[e];var r=Be.modifyOption(this,e,t);typeof r<"u"?o[e]=r:o[e]=t,e==="group"&&oo(o)},destroy:function(){$("destroy",this);var e=this.el;e[j]=null,w(e,"mousedown",this._onTapStart),w(e,"touchstart",this._onTapStart),w(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(w(e,"dragover",this),w(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ke.splice(Ke.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ne){if($("hideClone",this),b.eventCanceled)return;m(T,"display","none"),this.options.removeCloneOnHide&&T.parentNode&&T.parentNode.removeChild(T),ne=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(ne){if($("showClone",this),b.eventCanceled)return;h.parentNode==I&&!this.options.group.revertClone?I.insertBefore(T,h):he?I.insertBefore(T,he):I.appendChild(T),this.options.group.revertClone&&this.animate(h,T),m(T,"display",""),ne=!1}}};function To(i){i.dataTransfer&&(i.dataTransfer.dropEffect="move"),i.cancelable&&i.preventDefault()}function je(i,e,t,o,r,a,n,s){var l,c=i[j],p=c.options.onMove,d;return window.CustomEvent&&!te&&!Oe?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=e,l.from=i,l.dragged=t,l.draggedRect=o,l.related=r||e,l.relatedRect=a||_(e),l.willInsertAfter=s,l.originalEvent=n,i.dispatchEvent(l),p&&(d=p.call(c,l,n)),d}function ut(i){i.draggable=!1}function Po(){bt=!1}function Mo(i,e,t){var o=_(xe(t.el,0,t.options,!0)),r=Jt(t.el,t.options,x),a=10;return e?i.clientX<r.left-a||i.clientY<o.top&&i.clientX<o.right:i.clientY<r.top-a||i.clientY<o.bottom&&i.clientX<o.left}function _o(i,e,t){var o=_(Et(t.el,t.options.draggable)),r=Jt(t.el,t.options,x),a=10;return e?i.clientX>r.right+a||i.clientY>o.bottom&&i.clientX>o.left:i.clientY>r.bottom+a||i.clientX>o.right&&i.clientY>o.top}function Ro(i,e,t,o,r,a,n,s){var l=o?i.clientY:i.clientX,c=o?t.height:t.width,p=o?t.top:t.left,d=o?t.bottom:t.right,u=!1;if(!n){if(s&&We<c*r){if(!Re&&(_e===1?l>p+c*a/2:l<d-c*a/2)&&(Re=!0),Re)u=!0;else if(_e===1?l<p+We:l>d-We)return-_e}else if(l>p+c*(1-r)/2&&l<d-c*(1-r)/2)return Oo(e)}return u=u||n,u&&(l<p+c*a/2||l>d-c*a/2)?l>p+c/2?1:-1:0}function Oo(i){return U(h)<U(i)?1:-1}function Bo(i){for(var e=i.tagName+i.className+i.src+i.href+i.textContent,t=e.length,o=0;t--;)o+=e.charCodeAt(t);return o.toString(36)}function No(i){Ve.length=0;for(var e=i.getElementsByTagName("input"),t=e.length;t--;){var o=e[t];o.checked&&Ve.push(o)}}function Ue(i){return setTimeout(i,0)}function vt(i){return clearTimeout(i)}Qe&&E(document,"touchmove",function(i){(b.active||me)&&i.cancelable&&i.preventDefault()});b.utils={on:E,off:w,css:m,find:Kt,is:function(e,t){return!!G(e,t,e,!1)},extend:vo,throttle:Vt,closest:G,toggleClass:q,clone:Qt,index:U,nextTick:Ue,cancelNextTick:vt,detectDirection:to,getChild:xe,expando:j};b.get=function(i){return i[j]};b.mount=function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(b.utils=Z(Z({},b.utils),o.utils)),Be.mount(o)})};b.create=function(i,e){return new b(i,e)};b.version=mo;var M=[],Ae,xt,yt=!1,ft,gt,Ze,Ie;function zo(){function i(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return i.prototype={dragStarted:function(t){var o=t.originalEvent;this.sortable.nativeDraggable?E(document,"dragover",this._handleAutoScroll):this.options.supportPointer?E(document,"pointermove",this._handleFallbackAutoScroll):o.touches?E(document,"touchmove",this._handleFallbackAutoScroll):E(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var o=t.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?w(document,"dragover",this._handleAutoScroll):(w(document,"pointermove",this._handleFallbackAutoScroll),w(document,"touchmove",this._handleFallbackAutoScroll),w(document,"mousemove",this._handleFallbackAutoScroll)),Ut(),Xe(),xo()},nulling:function(){Ze=xt=Ae=yt=Ie=ft=gt=null,M.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,o){var r=this,a=(t.touches?t.touches[0]:t).clientX,n=(t.touches?t.touches[0]:t).clientY,s=document.elementFromPoint(a,n);if(Ze=t,o||this.options.forceAutoScrollFallback||Oe||te||Te){mt(t,this.options,s,o);var l=se(s,!0);yt&&(!Ie||a!==ft||n!==gt)&&(Ie&&Ut(),Ie=setInterval(function(){var c=se(document.elementFromPoint(a,n),!0);c!==l&&(l=c,Xe()),mt(t,r.options,c,o)},10),ft=a,gt=n)}else{if(!this.options.bubbleScroll||se(s,!0)===V()){Xe();return}mt(t,this.options,se(s,!1),!1)}}},ee(i,{pluginName:"scroll",initializeByDefault:!0})}function Xe(){M.forEach(function(i){clearInterval(i.pid)}),M=[]}function Ut(){clearInterval(Ie)}var mt=Vt(function(i,e,t,o){if(e.scroll){var r=(i.touches?i.touches[0]:i).clientX,a=(i.touches?i.touches[0]:i).clientY,n=e.scrollSensitivity,s=e.scrollSpeed,l=V(),c=!1,p;xt!==t&&(xt=t,Xe(),Ae=e.scroll,p=e.scrollFn,Ae===!0&&(Ae=se(t,!0)));var d=0,u=Ae;do{var v=u,f=_(v),y=f.top,C=f.bottom,A=f.left,k=f.right,D=f.width,g=f.height,S=void 0,N=void 0,z=v.scrollWidth,ye=v.scrollHeight,H=m(v),we=v.scrollLeft,oe=v.scrollTop;v===l?(S=D<z&&(H.overflowX==="auto"||H.overflowX==="scroll"||H.overflowX==="visible"),N=g<ye&&(H.overflowY==="auto"||H.overflowY==="scroll"||H.overflowY==="visible")):(S=D<z&&(H.overflowX==="auto"||H.overflowX==="scroll"),N=g<ye&&(H.overflowY==="auto"||H.overflowY==="scroll"));var Ee=S&&(Math.abs(k-r)<=n&&we+D<z)-(Math.abs(A-r)<=n&&!!we),Q=N&&(Math.abs(C-a)<=n&&oe+g<ye)-(Math.abs(y-a)<=n&&!!oe);if(!M[d])for(var le=0;le<=d;le++)M[le]||(M[le]={});(M[d].vx!=Ee||M[d].vy!=Q||M[d].el!==v)&&(M[d].el=v,M[d].vx=Ee,M[d].vy=Q,clearInterval(M[d].pid),(Ee!=0||Q!=0)&&(c=!0,M[d].pid=setInterval(function(){o&&this.layer===0&&b.active._onTouchMove(Ze);var ke=M[this.layer].vy?M[this.layer].vy*s:0,ie=M[this.layer].vx?M[this.layer].vx*s:0;typeof p=="function"&&p.call(b.dragged.parentNode[j],ie,ke,i,Ze,M[this.layer].el)!=="continue"||Zt(M[this.layer].el,ie,ke)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&u!==l&&(u=se(u,!1)));yt=c}},30),ao=function(e){var t=e.originalEvent,o=e.putSortable,r=e.dragEl,a=e.activeSortable,n=e.dispatchSortableEvent,s=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var c=o||a;s();var p=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(p.clientX,p.clientY);l(),c&&!c.el.contains(d)&&(n("spill"),this.onSpill({dragEl:r,putSortable:o}))}};function kt(){}kt.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var r=xe(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),o&&o.animateAll()},drop:ao};ee(kt,{pluginName:"revertOnSpill"});function St(){}St.prototype={onSpill:function(e){var t=e.dragEl,o=e.putSortable,r=o||this.sortable;r.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),r.animateAll()},drop:ao};ee(St,{pluginName:"removeOnSpill"});b.mount(new zo);b.mount(St,kt);var no=b;var so=`
|
|
1
|
+
import{j as R,k as Bt,q as nt}from"./chunk-HS6GDZIS.js";import{a as re,b as O,c as K}from"./chunk-XEN5VKAV.js";import{a as It,b as ce,c as Tt,h as ue,i as Pt,j as Mt,k as at}from"./chunk-N7Q34F2P.js";import{a as Nt}from"./chunk-IUBYFIV6.js";import{a as Ce,b as st,d as Y}from"./chunk-V2FP4EEH.js";import{b as _t,e as Rt,h as Ot}from"./chunk-G65H4ZTJ.js";function zt(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(i);e&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,o)}return t}function Z(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?zt(Object(t),!0).forEach(function(o){uo(i,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):zt(Object(t)).forEach(function(o){Object.defineProperty(i,o,Object.getOwnPropertyDescriptor(t,o))})}return i}function He(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?He=function(e){return typeof e}:He=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(i)}function uo(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function ee(){return ee=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=t[o])}return i},ee.apply(this,arguments)}function fo(i,e){if(i==null)return{};var t={},o=Object.keys(i),r,a;for(a=0;a<o.length;a++)r=o[a],!(e.indexOf(r)>=0)&&(t[r]=i[r]);return t}function go(i,e){if(i==null)return{};var t=fo(i,e),o,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(i);for(r=0;r<a.length;r++)o=a[r],!(e.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(i,o)&&(t[o]=i[o])}return t}var mo="1.15.6";function J(i){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(i)}var te=J(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Oe=J(/Edge/i),Lt=J(/firefox/i),Te=J(/safari/i)&&!J(/chrome/i)&&!J(/android/i),wt=J(/iP(ad|od|hone)/i),Xt=J(/chrome/i)&&J(/android/i),Gt={capture:!1,passive:!1};function E(i,e,t){i.addEventListener(e,t,!te&&Gt)}function w(i,e,t){i.removeEventListener(e,t,!te&&Gt)}function Ge(i,e){if(e){if(e[0]===">"&&(e=e.substring(1)),i)try{if(i.matches)return i.matches(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e)}catch{return!1}return!1}}function Yt(i){return i.host&&i!==document&&i.host.nodeType?i.host:i.parentNode}function G(i,e,t,o){if(i){t=t||document;do{if(e!=null&&(e[0]===">"?i.parentNode===t&&Ge(i,e):Ge(i,e))||o&&i===t)return i;if(i===t)break}while(i=Yt(i))}return null}var Ft=/\s+/g;function q(i,e,t){if(i&&e)if(i.classList)i.classList[t?"add":"remove"](e);else{var o=(" "+i.className+" ").replace(Ft," ").replace(" "+e+" "," ");i.className=(o+(t?" "+e:"")).replace(Ft," ")}}function m(i,e,t){var o=i&&i.style;if(o){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(t=i.currentStyle),e===void 0?t:t[e];!(e in o)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),o[e]=t+(typeof t=="string"?"":"px")}}function ve(i,e){var t="";if(typeof i=="string")t=i;else do{var o=m(i,"transform");o&&o!=="none"&&(t=o+" "+t)}while(!e&&(i=i.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function Kt(i,e,t){if(i){var o=i.getElementsByTagName(e),r=0,a=o.length;if(t)for(;r<a;r++)t(o[r],r);return o}return[]}function V(){var i=document.scrollingElement;return i||document.documentElement}function _(i,e,t,o,r){if(!(!i.getBoundingClientRect&&i!==window)){var a,n,s,l,c,p,d;if(i!==window&&i.parentNode&&i!==V()?(a=i.getBoundingClientRect(),n=a.top,s=a.left,l=a.bottom,c=a.right,p=a.height,d=a.width):(n=0,s=0,l=window.innerHeight,c=window.innerWidth,p=window.innerHeight,d=window.innerWidth),(e||t)&&i!==window&&(r=r||i.parentNode,!te))do if(r&&r.getBoundingClientRect&&(m(r,"transform")!=="none"||t&&m(r,"position")!=="static")){var u=r.getBoundingClientRect();n-=u.top+parseInt(m(r,"border-top-width")),s-=u.left+parseInt(m(r,"border-left-width")),l=n+a.height,c=s+a.width;break}while(r=r.parentNode);if(o&&i!==window){var v=ve(r||i),f=v&&v.a,y=v&&v.d;v&&(n/=y,s/=f,d/=f,p/=y,l=n+p,c=s+d)}return{top:n,left:s,bottom:l,right:c,width:d,height:p}}}function $t(i,e,t){for(var o=se(i,!0),r=_(i)[e];o;){var a=_(o)[t],n=void 0;if(t==="top"||t==="left"?n=r>=a:n=r<=a,!n)return o;if(o===V())break;o=se(o,!1)}return!1}function xe(i,e,t,o){for(var r=0,a=0,n=i.children;a<n.length;){if(n[a].style.display!=="none"&&n[a]!==b.ghost&&(o||n[a]!==b.dragged)&&G(n[a],t.draggable,i,!1)){if(r===e)return n[a];r++}a++}return null}function Et(i,e){for(var t=i.lastElementChild;t&&(t===b.ghost||m(t,"display")==="none"||e&&!Ge(t,e));)t=t.previousElementSibling;return t||null}function U(i,e){var t=0;if(!i||!i.parentNode)return-1;for(;i=i.previousElementSibling;)i.nodeName.toUpperCase()!=="TEMPLATE"&&i!==b.clone&&(!e||Ge(i,e))&&t++;return t}function jt(i){var e=0,t=0,o=V();if(i)do{var r=ve(i),a=r.a,n=r.d;e+=i.scrollLeft*a,t+=i.scrollTop*n}while(i!==o&&(i=i.parentNode));return[e,t]}function bo(i,e){for(var t in i)if(i.hasOwnProperty(t)){for(var o in e)if(e.hasOwnProperty(o)&&e[o]===i[t][o])return Number(t)}return-1}function se(i,e){if(!i||!i.getBoundingClientRect)return V();var t=i,o=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var r=m(t);if(t.clientWidth<t.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return V();if(o||e)return t;o=!0}}while(t=t.parentNode);return V()}function vo(i,e){if(i&&e)for(var t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return i}function lt(i,e){return Math.round(i.top)===Math.round(e.top)&&Math.round(i.left)===Math.round(e.left)&&Math.round(i.height)===Math.round(e.height)&&Math.round(i.width)===Math.round(e.width)}var Pe;function Vt(i,e){return function(){if(!Pe){var t=arguments,o=this;t.length===1?i.call(o,t[0]):i.apply(o,t),Pe=setTimeout(function(){Pe=void 0},e)}}}function xo(){clearTimeout(Pe),Pe=void 0}function Zt(i,e,t){i.scrollLeft+=e,i.scrollTop+=t}function Qt(i){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(i).cloneNode(!0):t?t(i).clone(!0)[0]:i.cloneNode(!0)}function Jt(i,e,t){var o={};return Array.from(i.children).forEach(function(r){var a,n,s,l;if(!(!G(r,e.draggable,i,!1)||r.animated||r===t)){var c=_(r);o.left=Math.min((a=o.left)!==null&&a!==void 0?a:1/0,c.left),o.top=Math.min((n=o.top)!==null&&n!==void 0?n:1/0,c.top),o.right=Math.max((s=o.right)!==null&&s!==void 0?s:-1/0,c.right),o.bottom=Math.max((l=o.bottom)!==null&&l!==void 0?l:-1/0,c.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var j="Sortable"+new Date().getTime();function yo(){var i=[],e;return{captureAnimationState:function(){if(i=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(r){if(!(m(r,"display")==="none"||r===b.ghost)){i.push({target:r,rect:_(r)});var a=Z({},i[i.length-1].rect);if(r.thisAnimationDuration){var n=ve(r,!0);n&&(a.top-=n.f,a.left-=n.e)}r.fromRect=a}})}},addAnimationState:function(o){i.push(o)},removeAnimationState:function(o){i.splice(bo(i,{target:o}),1)},animateAll:function(o){var r=this;if(!this.options.animation){clearTimeout(e),typeof o=="function"&&o();return}var a=!1,n=0;i.forEach(function(s){var l=0,c=s.target,p=c.fromRect,d=_(c),u=c.prevFromRect,v=c.prevToRect,f=s.rect,y=ve(c,!0);y&&(d.top-=y.f,d.left-=y.e),c.toRect=d,c.thisAnimationDuration&<(u,d)&&!lt(p,d)&&(f.top-d.top)/(f.left-d.left)===(p.top-d.top)/(p.left-d.left)&&(l=Eo(f,u,v,r.options)),lt(d,p)||(c.prevFromRect=p,c.prevToRect=d,l||(l=r.options.animation),r.animate(c,f,d,l)),l&&(a=!0,n=Math.max(n,l),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},l),c.thisAnimationDuration=l)}),clearTimeout(e),a?e=setTimeout(function(){typeof o=="function"&&o()},n):typeof o=="function"&&o(),i=[]},animate:function(o,r,a,n){if(n){m(o,"transition",""),m(o,"transform","");var s=ve(this.el),l=s&&s.a,c=s&&s.d,p=(r.left-a.left)/(l||1),d=(r.top-a.top)/(c||1);o.animatingX=!!p,o.animatingY=!!d,m(o,"transform","translate3d("+p+"px,"+d+"px,0)"),this.forRepaintDummy=wo(o),m(o,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),m(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){m(o,"transition",""),m(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},n)}}}}function wo(i){return i.offsetWidth}function Eo(i,e,t,o){return Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*o.animation}var fe=[],ct={initializeByDefault:!0},Be={mount:function(e){for(var t in ct)ct.hasOwnProperty(t)&&!(t in e)&&(e[t]=ct[t]);fe.forEach(function(o){if(o.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),fe.push(e)},pluginEvent:function(e,t,o){var r=this;this.eventCanceled=!1,o.cancel=function(){r.eventCanceled=!0};var a=e+"Global";fe.forEach(function(n){t[n.pluginName]&&(t[n.pluginName][a]&&t[n.pluginName][a](Z({sortable:t},o)),t.options[n.pluginName]&&t[n.pluginName][e]&&t[n.pluginName][e](Z({sortable:t},o)))})},initializePlugins:function(e,t,o,r){fe.forEach(function(s){var l=s.pluginName;if(!(!e.options[l]&&!s.initializeByDefault)){var c=new s(e,t,e.options);c.sortable=e,c.options=e.options,e[l]=c,ee(o,c.defaults)}});for(var a in e.options)if(e.options.hasOwnProperty(a)){var n=this.modifyOption(e,a,e.options[a]);typeof n<"u"&&(e.options[a]=n)}},getEventProperties:function(e,t){var o={};return fe.forEach(function(r){typeof r.eventProperties=="function"&&ee(o,r.eventProperties.call(t[r.pluginName],e))}),o},modifyOption:function(e,t,o){var r;return fe.forEach(function(a){e[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[t]=="function"&&(r=a.optionListeners[t].call(e[a.pluginName],o))}),r}};function ko(i){var e=i.sortable,t=i.rootEl,o=i.name,r=i.targetEl,a=i.cloneEl,n=i.toEl,s=i.fromEl,l=i.oldIndex,c=i.newIndex,p=i.oldDraggableIndex,d=i.newDraggableIndex,u=i.originalEvent,v=i.putSortable,f=i.extraEventProperties;if(e=e||t&&t[j],!!e){var y,C=e.options,A="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!te&&!Oe?y=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(o,!0,!0)),y.to=n||t,y.from=s||t,y.item=r||t,y.clone=a,y.oldIndex=l,y.newIndex=c,y.oldDraggableIndex=p,y.newDraggableIndex=d,y.originalEvent=u,y.pullMode=v?v.lastPutMode:void 0;var k=Z(Z({},f),Be.getEventProperties(o,e));for(var D in k)y[D]=k[D];t&&t.dispatchEvent(y),C[A]&&C[A].call(e,y)}}var So=["evt"],$=function(e,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=o.evt,a=go(o,So);Be.pluginEvent.bind(b)(e,t,Z({dragEl:h,parentEl:P,ghostEl:x,rootEl:I,nextEl:he,lastDownEl:qe,cloneEl:T,cloneHidden:ne,dragStarted:De,putSortable:B,activeSortable:b.active,originalEvent:r,oldIndex:be,oldDraggableIndex:Me,newIndex:W,newDraggableIndex:ae,hideGhostForTarget:io,unhideGhostForTarget:ro,cloneNowHidden:function(){ne=!0},cloneNowShown:function(){ne=!1},dispatchSortableEvent:function(s){F({sortable:t,name:s,originalEvent:r})}},a))};function F(i){ko(Z({putSortable:B,cloneEl:T,targetEl:h,rootEl:I,oldIndex:be,oldDraggableIndex:Me,newIndex:W,newDraggableIndex:ae},i))}var h,P,x,I,he,qe,T,ne,be,W,Me,ae,Le,B,me=!1,Ye=!1,Ke=[],de,X,dt,pt,Ht,qt,De,ge,_e,Re=!1,Fe=!1,We,L,ht=[],bt=!1,Ve=[],Qe=typeof document<"u",$e=wt,Wt=Oe||te?"cssFloat":"float",Co=Qe&&!Xt&&!wt&&"draggable"in document.createElement("div"),eo=(function(){if(Qe){if(te)return!1;var i=document.createElement("x");return i.style.cssText="pointer-events:auto",i.style.pointerEvents==="auto"}})(),to=function(e,t){var o=m(e),r=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),a=xe(e,0,t),n=xe(e,1,t),s=a&&m(a),l=n&&m(n),c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+_(a).width,p=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+_(n).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&s.float&&s.float!=="none"){var d=s.float==="left"?"left":"right";return n&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return a&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||c>=r&&o[Wt]==="none"||n&&o[Wt]==="none"&&c+p>r)?"vertical":"horizontal"},Do=function(e,t,o){var r=o?e.left:e.top,a=o?e.right:e.bottom,n=o?e.width:e.height,s=o?t.left:t.top,l=o?t.right:t.bottom,c=o?t.width:t.height;return r===s||a===l||r+n/2===s+c/2},Ao=function(e,t){var o;return Ke.some(function(r){var a=r[j].options.emptyInsertThreshold;if(!(!a||Et(r))){var n=_(r),s=e>=n.left-a&&e<=n.right+a,l=t>=n.top-a&&t<=n.bottom+a;if(s&&l)return o=r}}),o},oo=function(e){function t(a,n){return function(s,l,c,p){var d=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(a==null&&(n||d))return!0;if(a==null||a===!1)return!1;if(n&&a==="clone")return a;if(typeof a=="function")return t(a(s,l,c,p),n)(s,l,c,p);var u=(n?s:l).options.group.name;return a===!0||typeof a=="string"&&a===u||a.join&&a.indexOf(u)>-1}}var o={},r=e.group;(!r||He(r)!="object")&&(r={name:r}),o.name=r.name,o.checkPull=t(r.pull,!0),o.checkPut=t(r.put),o.revertClone=r.revertClone,e.group=o},io=function(){!eo&&x&&m(x,"display","none")},ro=function(){!eo&&x&&m(x,"display","")};Qe&&!Xt&&document.addEventListener("click",function(i){if(Ye)return i.preventDefault(),i.stopPropagation&&i.stopPropagation(),i.stopImmediatePropagation&&i.stopImmediatePropagation(),Ye=!1,!1},!0);var pe=function(e){if(h){e=e.touches?e.touches[0]:e;var t=Ao(e.clientX,e.clientY);if(t){var o={};for(var r in e)e.hasOwnProperty(r)&&(o[r]=e[r]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[j]._onDragOver(o)}}},Io=function(e){h&&h.parentNode[j]._isOutsideThisEl(e.target)};function b(i,e){if(!(i&&i.nodeType&&i.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));this.el=i,this.options=e=ee({},e),i[j]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(i.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return to(i,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(n,s){n.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:b.supportPointer!==!1&&"PointerEvent"in window&&(!Te||wt),emptyInsertThreshold:5};Be.initializePlugins(this,i,t);for(var o in t)!(o in e)&&(e[o]=t[o]);oo(e);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=e.forceFallback?!1:Co,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?E(i,"pointerdown",this._onTapStart):(E(i,"mousedown",this._onTapStart),E(i,"touchstart",this._onTapStart)),this.nativeDraggable&&(E(i,"dragover",this),E(i,"dragenter",this)),Ke.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ee(this,yo())}b.prototype={constructor:b,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(ge=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,h):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,o=this.el,r=this.options,a=r.preventOnFilter,n=e.type,s=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(s||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,p=r.filter;if(No(o),!h&&!(/mousedown|pointerdown/.test(n)&&e.button!==0||r.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Te&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=G(l,r.draggable,o,!1),!(l&&l.animated)&&qe!==l)){if(be=U(l),Me=U(l,r.draggable),typeof p=="function"){if(p.call(this,e,l,this)){F({sortable:t,rootEl:c,name:"filter",targetEl:l,toEl:o,fromEl:o}),$("filter",t,{evt:e}),a&&e.preventDefault();return}}else if(p&&(p=p.split(",").some(function(d){if(d=G(c,d.trim(),o,!1),d)return F({sortable:t,rootEl:d,name:"filter",targetEl:l,fromEl:o,toEl:o}),$("filter",t,{evt:e}),!0}),p)){a&&e.preventDefault();return}r.handle&&!G(c,r.handle,o,!1)||this._prepareDragStart(e,s,l)}}},_prepareDragStart:function(e,t,o){var r=this,a=r.el,n=r.options,s=a.ownerDocument,l;if(o&&!h&&o.parentNode===a){var c=_(o);if(I=a,h=o,P=h.parentNode,he=h.nextSibling,qe=o,Le=n.group,b.dragged=h,de={target:h,clientX:(t||e).clientX,clientY:(t||e).clientY},Ht=de.clientX-c.left,qt=de.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,h.style["will-change"]="all",l=function(){if($("delayEnded",r,{evt:e}),b.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Lt&&r.nativeDraggable&&(h.draggable=!0),r._triggerDragStart(e,t),F({sortable:r,name:"choose",originalEvent:e}),q(h,n.chosenClass,!0)},n.ignore.split(",").forEach(function(p){Kt(h,p.trim(),ut)}),E(s,"dragover",pe),E(s,"mousemove",pe),E(s,"touchmove",pe),n.supportPointer?(E(s,"pointerup",r._onDrop),!this.nativeDraggable&&E(s,"pointercancel",r._onDrop)):(E(s,"mouseup",r._onDrop),E(s,"touchend",r._onDrop),E(s,"touchcancel",r._onDrop)),Lt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),$("delayStart",this,{evt:e}),n.delay&&(!n.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Oe||te))){if(b.eventCanceled){this._onDrop();return}n.supportPointer?(E(s,"pointerup",r._disableDelayedDrag),E(s,"pointercancel",r._disableDelayedDrag)):(E(s,"mouseup",r._disableDelayedDrag),E(s,"touchend",r._disableDelayedDrag),E(s,"touchcancel",r._disableDelayedDrag)),E(s,"mousemove",r._delayedDragTouchMoveHandler),E(s,"touchmove",r._delayedDragTouchMoveHandler),n.supportPointer&&E(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(l,n.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){h&&ut(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;w(e,"mouseup",this._disableDelayedDrag),w(e,"touchend",this._disableDelayedDrag),w(e,"touchcancel",this._disableDelayedDrag),w(e,"pointerup",this._disableDelayedDrag),w(e,"pointercancel",this._disableDelayedDrag),w(e,"mousemove",this._delayedDragTouchMoveHandler),w(e,"touchmove",this._delayedDragTouchMoveHandler),w(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?E(document,"pointermove",this._onTouchMove):t?E(document,"touchmove",this._onTouchMove):E(document,"mousemove",this._onTouchMove):(E(h,"dragend",this),E(I,"dragstart",this._onDragStart));try{document.selection?Ue(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(me=!1,I&&h){$("dragStarted",this,{evt:t}),this.nativeDraggable&&E(document,"dragover",Io);var o=this.options;!e&&q(h,o.dragClass,!1),q(h,o.ghostClass,!0),b.active=this,e&&this._appendGhost(),F({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(X){this._lastX=X.clientX,this._lastY=X.clientY,io();for(var e=document.elementFromPoint(X.clientX,X.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(X.clientX,X.clientY),e!==t);)t=e;if(h.parentNode[j]._isOutsideThisEl(e),t)do{if(t[j]){var o=void 0;if(o=t[j]._onDragOver({clientX:X.clientX,clientY:X.clientY,target:e,rootEl:t}),o&&!this.options.dragoverBubble)break}e=t}while(t=Yt(t));ro()}},_onTouchMove:function(e){if(de){var t=this.options,o=t.fallbackTolerance,r=t.fallbackOffset,a=e.touches?e.touches[0]:e,n=x&&ve(x,!0),s=x&&n&&n.a,l=x&&n&&n.d,c=$e&&L&&jt(L),p=(a.clientX-de.clientX+r.x)/(s||1)+(c?c[0]-ht[0]:0)/(s||1),d=(a.clientY-de.clientY+r.y)/(l||1)+(c?c[1]-ht[1]:0)/(l||1);if(!b.active&&!me){if(o&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(x){n?(n.e+=p-(dt||0),n.f+=d-(pt||0)):n={a:1,b:0,c:0,d:1,e:p,f:d};var u="matrix(".concat(n.a,",").concat(n.b,",").concat(n.c,",").concat(n.d,",").concat(n.e,",").concat(n.f,")");m(x,"webkitTransform",u),m(x,"mozTransform",u),m(x,"msTransform",u),m(x,"transform",u),dt=p,pt=d,X=a}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!x){var e=this.options.fallbackOnBody?document.body:I,t=_(h,!0,$e,!0,e),o=this.options;if($e){for(L=e;m(L,"position")==="static"&&m(L,"transform")==="none"&&L!==document;)L=L.parentNode;L!==document.body&&L!==document.documentElement?(L===document&&(L=V()),t.top+=L.scrollTop,t.left+=L.scrollLeft):L=V(),ht=jt(L)}x=h.cloneNode(!0),q(x,o.ghostClass,!1),q(x,o.fallbackClass,!0),q(x,o.dragClass,!0),m(x,"transition",""),m(x,"transform",""),m(x,"box-sizing","border-box"),m(x,"margin",0),m(x,"top",t.top),m(x,"left",t.left),m(x,"width",t.width),m(x,"height",t.height),m(x,"opacity","0.8"),m(x,"position",$e?"absolute":"fixed"),m(x,"zIndex","100000"),m(x,"pointerEvents","none"),b.ghost=x,e.appendChild(x),m(x,"transform-origin",Ht/parseInt(x.style.width)*100+"% "+qt/parseInt(x.style.height)*100+"%")}},_onDragStart:function(e,t){var o=this,r=e.dataTransfer,a=o.options;if($("dragStart",this,{evt:e}),b.eventCanceled){this._onDrop();return}$("setupClone",this),b.eventCanceled||(T=Qt(h),T.removeAttribute("id"),T.draggable=!1,T.style["will-change"]="",this._hideClone(),q(T,this.options.chosenClass,!1),b.clone=T),o.cloneId=Ue(function(){$("clone",o),!b.eventCanceled&&(o.options.removeCloneOnHide||I.insertBefore(T,h),o._hideClone(),F({sortable:o,name:"clone"}))}),!t&&q(h,a.dragClass,!0),t?(Ye=!0,o._loopId=setInterval(o._emulateDragOver,50)):(w(document,"mouseup",o._onDrop),w(document,"touchend",o._onDrop),w(document,"touchcancel",o._onDrop),r&&(r.effectAllowed="move",a.setData&&a.setData.call(o,r,h)),E(document,"drop",o),m(h,"transform","translateZ(0)")),me=!0,o._dragStartId=Ue(o._dragStarted.bind(o,t,e)),E(document,"selectstart",o),De=!0,window.getSelection().removeAllRanges(),Te&&m(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,o=e.target,r,a,n,s=this.options,l=s.group,c=b.active,p=Le===l,d=s.sort,u=B||c,v,f=this,y=!1;if(bt)return;function C(Se,po){$(Se,f,Z({evt:e,isOwner:p,axis:v?"vertical":"horizontal",revert:n,dragRect:r,targetRect:a,canSort:d,fromSortable:u,target:o,completed:k,onMove:function(At,ho){return je(I,t,h,r,At,_(At),e,ho)},changed:D},po))}function A(){C("dragOverAnimationCapture"),f.captureAnimationState(),f!==u&&u.captureAnimationState()}function k(Se){return C("dragOverCompleted",{insertion:Se}),Se&&(p?c._hideClone():c._showClone(f),f!==u&&(q(h,B?B.options.ghostClass:c.options.ghostClass,!1),q(h,s.ghostClass,!0)),B!==f&&f!==b.active?B=f:f===b.active&&B&&(B=null),u===f&&(f._ignoreWhileAnimating=o),f.animateAll(function(){C("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==u&&(u.animateAll(),u._ignoreWhileAnimating=null)),(o===h&&!h.animated||o===t&&!o.animated)&&(ge=null),!s.dragoverBubble&&!e.rootEl&&o!==document&&(h.parentNode[j]._isOutsideThisEl(e.target),!Se&&pe(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),y=!0}function D(){W=U(h),ae=U(h,s.draggable),F({sortable:f,name:"change",toEl:t,newIndex:W,newDraggableIndex:ae,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),o=G(o,s.draggable,t,!0),C("dragOver"),b.eventCanceled)return y;if(h.contains(e.target)||o.animated&&o.animatingX&&o.animatingY||f._ignoreWhileAnimating===o)return k(!1);if(Ye=!1,c&&!s.disabled&&(p?d||(n=P!==I):B===this||(this.lastPutMode=Le.checkPull(this,c,h,e))&&l.checkPut(this,c,h,e))){if(v=this._getDirection(e,o)==="vertical",r=_(h),C("dragOverValid"),b.eventCanceled)return y;if(n)return P=I,A(),this._hideClone(),C("revert"),b.eventCanceled||(he?I.insertBefore(h,he):I.appendChild(h)),k(!0);var g=Et(t,s.draggable);if(!g||_o(e,v,this)&&!g.animated){if(g===h)return k(!1);if(g&&t===e.target&&(o=g),o&&(a=_(o)),je(I,t,h,r,o,a,e,!!o)!==!1)return A(),g&&g.nextSibling?t.insertBefore(h,g.nextSibling):t.appendChild(h),P=t,D(),k(!0)}else if(g&&Mo(e,v,this)){var S=xe(t,0,s,!0);if(S===h)return k(!1);if(o=S,a=_(o),je(I,t,h,r,o,a,e,!1)!==!1)return A(),t.insertBefore(h,S),P=t,D(),k(!0)}else if(o.parentNode===t){a=_(o);var N=0,z,ye=h.parentNode!==t,H=!Do(h.animated&&h.toRect||r,o.animated&&o.toRect||a,v),we=v?"top":"left",oe=$t(o,"top","top")||$t(h,"top","top"),Ee=oe?oe.scrollTop:void 0;ge!==o&&(z=a[we],Re=!1,Fe=!H&&s.invertSwap||ye),N=Ro(e,o,a,v,H?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,Fe,ge===o);var Q;if(N!==0){var le=U(h);do le-=N,Q=P.children[le];while(Q&&(m(Q,"display")==="none"||Q===x))}if(N===0||Q===o)return k(!1);ge=o,_e=N;var ke=o.nextElementSibling,ie=!1;ie=N===1;var ze=je(I,t,h,r,o,a,e,ie);if(ze!==!1)return(ze===1||ze===-1)&&(ie=ze===1),bt=!0,setTimeout(Po,30),A(),ie&&!ke?t.appendChild(h):o.parentNode.insertBefore(h,ie?ke:o),oe&&Zt(oe,0,Ee-oe.scrollTop),P=h.parentNode,z!==void 0&&!Fe&&(We=Math.abs(z-_(o)[we])),D(),k(!0)}if(t.contains(h))return k(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){w(document,"mousemove",this._onTouchMove),w(document,"touchmove",this._onTouchMove),w(document,"pointermove",this._onTouchMove),w(document,"dragover",pe),w(document,"mousemove",pe),w(document,"touchmove",pe)},_offUpEvents:function(){var e=this.el.ownerDocument;w(e,"mouseup",this._onDrop),w(e,"touchend",this._onDrop),w(e,"pointerup",this._onDrop),w(e,"pointercancel",this._onDrop),w(e,"touchcancel",this._onDrop),w(document,"selectstart",this)},_onDrop:function(e){var t=this.el,o=this.options;if(W=U(h),ae=U(h,o.draggable),$("drop",this,{evt:e}),P=h&&h.parentNode,W=U(h),ae=U(h,o.draggable),b.eventCanceled){this._nulling();return}me=!1,Fe=!1,Re=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),vt(this.cloneId),vt(this._dragStartId),this.nativeDraggable&&(w(document,"drop",this),w(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Te&&m(document.body,"user-select",""),m(h,"transform",""),e&&(De&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),x&&x.parentNode&&x.parentNode.removeChild(x),(I===P||B&&B.lastPutMode!=="clone")&&T&&T.parentNode&&T.parentNode.removeChild(T),h&&(this.nativeDraggable&&w(h,"dragend",this),ut(h),h.style["will-change"]="",De&&!me&&q(h,B?B.options.ghostClass:this.options.ghostClass,!1),q(h,this.options.chosenClass,!1),F({sortable:this,name:"unchoose",toEl:P,newIndex:null,newDraggableIndex:null,originalEvent:e}),I!==P?(W>=0&&(F({rootEl:P,name:"add",toEl:P,fromEl:I,originalEvent:e}),F({sortable:this,name:"remove",toEl:P,originalEvent:e}),F({rootEl:P,name:"sort",toEl:P,fromEl:I,originalEvent:e}),F({sortable:this,name:"sort",toEl:P,originalEvent:e})),B&&B.save()):W!==be&&W>=0&&(F({sortable:this,name:"update",toEl:P,originalEvent:e}),F({sortable:this,name:"sort",toEl:P,originalEvent:e})),b.active&&((W==null||W===-1)&&(W=be,ae=Me),F({sortable:this,name:"end",toEl:P,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){$("nulling",this),I=h=P=x=he=T=qe=ne=de=X=De=W=ae=be=Me=ge=_e=B=Le=b.dragged=b.ghost=b.clone=b.active=null,Ve.forEach(function(e){e.checked=!0}),Ve.length=dt=pt=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":h&&(this._onDragOver(e),To(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,o=this.el.children,r=0,a=o.length,n=this.options;r<a;r++)t=o[r],G(t,n.draggable,this.el,!1)&&e.push(t.getAttribute(n.dataIdAttr)||Bo(t));return e},sort:function(e,t){var o={},r=this.el;this.toArray().forEach(function(a,n){var s=r.children[n];G(s,this.options.draggable,r,!1)&&(o[a]=s)},this),t&&this.captureAnimationState(),e.forEach(function(a){o[a]&&(r.removeChild(o[a]),r.appendChild(o[a]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return G(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var o=this.options;if(t===void 0)return o[e];var r=Be.modifyOption(this,e,t);typeof r<"u"?o[e]=r:o[e]=t,e==="group"&&oo(o)},destroy:function(){$("destroy",this);var e=this.el;e[j]=null,w(e,"mousedown",this._onTapStart),w(e,"touchstart",this._onTapStart),w(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(w(e,"dragover",this),w(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ke.splice(Ke.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ne){if($("hideClone",this),b.eventCanceled)return;m(T,"display","none"),this.options.removeCloneOnHide&&T.parentNode&&T.parentNode.removeChild(T),ne=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(ne){if($("showClone",this),b.eventCanceled)return;h.parentNode==I&&!this.options.group.revertClone?I.insertBefore(T,h):he?I.insertBefore(T,he):I.appendChild(T),this.options.group.revertClone&&this.animate(h,T),m(T,"display",""),ne=!1}}};function To(i){i.dataTransfer&&(i.dataTransfer.dropEffect="move"),i.cancelable&&i.preventDefault()}function je(i,e,t,o,r,a,n,s){var l,c=i[j],p=c.options.onMove,d;return window.CustomEvent&&!te&&!Oe?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=e,l.from=i,l.dragged=t,l.draggedRect=o,l.related=r||e,l.relatedRect=a||_(e),l.willInsertAfter=s,l.originalEvent=n,i.dispatchEvent(l),p&&(d=p.call(c,l,n)),d}function ut(i){i.draggable=!1}function Po(){bt=!1}function Mo(i,e,t){var o=_(xe(t.el,0,t.options,!0)),r=Jt(t.el,t.options,x),a=10;return e?i.clientX<r.left-a||i.clientY<o.top&&i.clientX<o.right:i.clientY<r.top-a||i.clientY<o.bottom&&i.clientX<o.left}function _o(i,e,t){var o=_(Et(t.el,t.options.draggable)),r=Jt(t.el,t.options,x),a=10;return e?i.clientX>r.right+a||i.clientY>o.bottom&&i.clientX>o.left:i.clientY>r.bottom+a||i.clientX>o.right&&i.clientY>o.top}function Ro(i,e,t,o,r,a,n,s){var l=o?i.clientY:i.clientX,c=o?t.height:t.width,p=o?t.top:t.left,d=o?t.bottom:t.right,u=!1;if(!n){if(s&&We<c*r){if(!Re&&(_e===1?l>p+c*a/2:l<d-c*a/2)&&(Re=!0),Re)u=!0;else if(_e===1?l<p+We:l>d-We)return-_e}else if(l>p+c*(1-r)/2&&l<d-c*(1-r)/2)return Oo(e)}return u=u||n,u&&(l<p+c*a/2||l>d-c*a/2)?l>p+c/2?1:-1:0}function Oo(i){return U(h)<U(i)?1:-1}function Bo(i){for(var e=i.tagName+i.className+i.src+i.href+i.textContent,t=e.length,o=0;t--;)o+=e.charCodeAt(t);return o.toString(36)}function No(i){Ve.length=0;for(var e=i.getElementsByTagName("input"),t=e.length;t--;){var o=e[t];o.checked&&Ve.push(o)}}function Ue(i){return setTimeout(i,0)}function vt(i){return clearTimeout(i)}Qe&&E(document,"touchmove",function(i){(b.active||me)&&i.cancelable&&i.preventDefault()});b.utils={on:E,off:w,css:m,find:Kt,is:function(e,t){return!!G(e,t,e,!1)},extend:vo,throttle:Vt,closest:G,toggleClass:q,clone:Qt,index:U,nextTick:Ue,cancelNextTick:vt,detectDirection:to,getChild:xe,expando:j};b.get=function(i){return i[j]};b.mount=function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(b.utils=Z(Z({},b.utils),o.utils)),Be.mount(o)})};b.create=function(i,e){return new b(i,e)};b.version=mo;var M=[],Ae,xt,yt=!1,ft,gt,Ze,Ie;function zo(){function i(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return i.prototype={dragStarted:function(t){var o=t.originalEvent;this.sortable.nativeDraggable?E(document,"dragover",this._handleAutoScroll):this.options.supportPointer?E(document,"pointermove",this._handleFallbackAutoScroll):o.touches?E(document,"touchmove",this._handleFallbackAutoScroll):E(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var o=t.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?w(document,"dragover",this._handleAutoScroll):(w(document,"pointermove",this._handleFallbackAutoScroll),w(document,"touchmove",this._handleFallbackAutoScroll),w(document,"mousemove",this._handleFallbackAutoScroll)),Ut(),Xe(),xo()},nulling:function(){Ze=xt=Ae=yt=Ie=ft=gt=null,M.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,o){var r=this,a=(t.touches?t.touches[0]:t).clientX,n=(t.touches?t.touches[0]:t).clientY,s=document.elementFromPoint(a,n);if(Ze=t,o||this.options.forceAutoScrollFallback||Oe||te||Te){mt(t,this.options,s,o);var l=se(s,!0);yt&&(!Ie||a!==ft||n!==gt)&&(Ie&&Ut(),Ie=setInterval(function(){var c=se(document.elementFromPoint(a,n),!0);c!==l&&(l=c,Xe()),mt(t,r.options,c,o)},10),ft=a,gt=n)}else{if(!this.options.bubbleScroll||se(s,!0)===V()){Xe();return}mt(t,this.options,se(s,!1),!1)}}},ee(i,{pluginName:"scroll",initializeByDefault:!0})}function Xe(){M.forEach(function(i){clearInterval(i.pid)}),M=[]}function Ut(){clearInterval(Ie)}var mt=Vt(function(i,e,t,o){if(e.scroll){var r=(i.touches?i.touches[0]:i).clientX,a=(i.touches?i.touches[0]:i).clientY,n=e.scrollSensitivity,s=e.scrollSpeed,l=V(),c=!1,p;xt!==t&&(xt=t,Xe(),Ae=e.scroll,p=e.scrollFn,Ae===!0&&(Ae=se(t,!0)));var d=0,u=Ae;do{var v=u,f=_(v),y=f.top,C=f.bottom,A=f.left,k=f.right,D=f.width,g=f.height,S=void 0,N=void 0,z=v.scrollWidth,ye=v.scrollHeight,H=m(v),we=v.scrollLeft,oe=v.scrollTop;v===l?(S=D<z&&(H.overflowX==="auto"||H.overflowX==="scroll"||H.overflowX==="visible"),N=g<ye&&(H.overflowY==="auto"||H.overflowY==="scroll"||H.overflowY==="visible")):(S=D<z&&(H.overflowX==="auto"||H.overflowX==="scroll"),N=g<ye&&(H.overflowY==="auto"||H.overflowY==="scroll"));var Ee=S&&(Math.abs(k-r)<=n&&we+D<z)-(Math.abs(A-r)<=n&&!!we),Q=N&&(Math.abs(C-a)<=n&&oe+g<ye)-(Math.abs(y-a)<=n&&!!oe);if(!M[d])for(var le=0;le<=d;le++)M[le]||(M[le]={});(M[d].vx!=Ee||M[d].vy!=Q||M[d].el!==v)&&(M[d].el=v,M[d].vx=Ee,M[d].vy=Q,clearInterval(M[d].pid),(Ee!=0||Q!=0)&&(c=!0,M[d].pid=setInterval(function(){o&&this.layer===0&&b.active._onTouchMove(Ze);var ke=M[this.layer].vy?M[this.layer].vy*s:0,ie=M[this.layer].vx?M[this.layer].vx*s:0;typeof p=="function"&&p.call(b.dragged.parentNode[j],ie,ke,i,Ze,M[this.layer].el)!=="continue"||Zt(M[this.layer].el,ie,ke)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&u!==l&&(u=se(u,!1)));yt=c}},30),ao=function(e){var t=e.originalEvent,o=e.putSortable,r=e.dragEl,a=e.activeSortable,n=e.dispatchSortableEvent,s=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var c=o||a;s();var p=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(p.clientX,p.clientY);l(),c&&!c.el.contains(d)&&(n("spill"),this.onSpill({dragEl:r,putSortable:o}))}};function kt(){}kt.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var r=xe(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),o&&o.animateAll()},drop:ao};ee(kt,{pluginName:"revertOnSpill"});function St(){}St.prototype={onSpill:function(e){var t=e.dragEl,o=e.putSortable,r=o||this.sortable;r.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),r.animateAll()},drop:ao};ee(St,{pluginName:"removeOnSpill"});b.mount(new zo);b.mount(St,kt);var no=b;var so=`
|
|
2
2
|
.cropper-container {
|
|
3
3
|
direction: ltr;
|
|
4
4
|
font-size: 0;
|
|
@@ -2598,4 +2598,4 @@ import{j as R,k as Bt,q as nt}from"./chunk-QPUCXOOR.js";import{a as re,b as O,c
|
|
|
2598
2598
|
* @author owenm <owen23355@gmail.com>
|
|
2599
2599
|
* @license MIT
|
|
2600
2600
|
*/
|
|
2601
|
-
//# sourceMappingURL=chunk-
|
|
2601
|
+
//# sourceMappingURL=chunk-IZOWC74B.js.map
|
package/dist/core.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o,b as p,c as q,d as r,e as x,f as y,g as z,h as A,i as B,j as C,k as D,l as E,m as F,n as G,o as H,p as I,q as J}from"./chunk-
|
|
1
|
+
import{a as o,b as p,c as q,d as r,e as x,f as y,g as z,h as A,i as B,j as C,k as D,l as E,m as F,n as G,o as H,p as I,q as J}from"./chunk-HS6GDZIS.js";import"./chunk-4GEMGDRU.js";import{a as e,b as f,c as g,d as h,e as i,f as j,g as k,h as l,j as m,k as n,l as v}from"./chunk-N7Q34F2P.js";import{a as w}from"./chunk-SH4P4XSZ.js";import{a as u}from"./chunk-HN3336JN.js";import{a as d}from"./chunk-36F637QU.js";import{a as c}from"./chunk-4JPEWIT4.js";import{a as s}from"./chunk-B7HT2X67.js";import"./chunk-N4R55VRR.js";import{a as t}from"./chunk-E7JYVRJA.js";import"./chunk-YHLOPPXM.js";import"./chunk-G65H4ZTJ.js";import{a as b}from"./chunk-OI4WCW7E.js";import{a}from"./chunk-LI54F6PA.js";import"./chunk-4C666HHU.js";export{q as BUILD_DATE,C as COPIO_EVENTS,v as Canvas2DAdapter,J as CopioEngine,F as DEFAULT_EXPORT_FORMATS,E as DEFAULT_FEATURES,G as DEFAULT_OCR_LANGUAGES,o as DocRepository,A as Document,u as ImageProcessorPort,c as IndexedDbStorageAdapter,b as MemoryStorageAdapter,w as NullImageProcessorAdapter,s as NullOcrAdapter,t as NullPdfAdapter,z as Page,B as ScanSession,a as StoragePort,r as VERSION,n as applyEdits,h as applySauvolaToImageData,d as createDefaultAdapter,D as dispatchCopioEvent,p as docRepository,e as extractExif,g as fileToBase64,k as getCroppedSrc,I as getRegisteredService,y as hasActiveEdits,x as normalizeEditStack,l as normalizeEdits,f as randomId,H as registerService,m as renderEditsToCanvas,j as rotateSrc,i as thresholdSrc};
|
|
2
2
|
//# sourceMappingURL=core.js.map
|