nam-rich-text-editor 9.0.0 → 9.0.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/README.md +24 -6
- package/dist/RichTextEditor.d.ts +2 -1
- package/dist/RichTextEditorComponent.d.ts +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/main.d.ts +1 -1
- package/dist/rich-text-editor.es.js +2814 -1319
- package/dist/rich-text-editor.umd.js +24 -7
- package/package.json +9 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Je,dt){typeof exports=="object"&&typeof module<"u"?dt(exports):typeof define=="function"&&define.amd?define(["exports"],dt):(Je=typeof globalThis<"u"?globalThis:Je||self,dt(Je.RichTextEditor={}))})(this,(function(Je){"use strict";function dt(){const v=document.createElement("select");return v.innerHTML=`
|
|
2
2
|
<option value="Arial">Arial</option>
|
|
3
3
|
<option value="Times New Roman">Times New Roman</option>
|
|
4
4
|
<option value="Courier New">Courier New</option>
|
|
5
5
|
<option value="Georgia">Georgia</option>
|
|
6
6
|
<option value="Verdana">Verdana</option>
|
|
7
|
-
`,
|
|
7
|
+
`,v.style.border="1px solid #e1e1e1",v.style.backgroundColor="#ffffff",v.style.padding="4px",v.style.borderRadius="3px",v.style.color="#000000",v.onchange=()=>document.execCommand("fontName",!1,v.value),v}function Qn(){const v=document.createElement("select");return v.innerHTML=`
|
|
8
8
|
<option value="1">8pt</option>
|
|
9
9
|
<option value="2">10pt</option>
|
|
10
10
|
<option value="3" selected>12pt</option>
|
|
@@ -12,25 +12,25 @@
|
|
|
12
12
|
<option value="5">18pt</option>
|
|
13
13
|
<option value="6">24pt</option>
|
|
14
14
|
<option value="7">36pt</option>
|
|
15
|
-
`,
|
|
15
|
+
`,v.style.border="1px solid #e1e1e1",v.style.backgroundColor="#ffffff",v.style.padding="4px",v.style.borderRadius="3px",v.style.color="#000000",v.onchange=()=>document.execCommand("fontSize",!1,v.value),v}function Jn(){const v=document.createElement("select");return v.title="Heading",v.style.border="1px solid #e1e1e1",v.style.backgroundColor="#ffffff",v.style.padding="4px",v.style.borderRadius="3px",v.style.color="#000000",v.innerHTML=`
|
|
16
16
|
<option value="p">Normal</option>
|
|
17
17
|
<option value="h1">Heading 1</option>
|
|
18
18
|
<option value="h2">Heading 2</option>
|
|
19
19
|
<option value="h3">Heading 3</option>
|
|
20
20
|
<option value="h4">Heading 4</option>
|
|
21
|
-
`,d.onchange=()=>{const w=d.value,g=w==="p"?"P":w.toUpperCase();document.execCommand("formatBlock",!1,`<${g}>`)},d}const An={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const kt=([d,w,g])=>{const f=document.createElementNS("http://www.w3.org/2000/svg",d);return Object.keys(w).forEach(x=>{f.setAttribute(x,String(w[x]))}),g?.length&&g.forEach(x=>{const M=kt(x);f.appendChild(M)}),f},te=(d,w={})=>{const f={...An,...w};return kt(["svg",f,d])};const jn=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8"}]];const Fn=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]];const Ln=[["line",{x1:"19",x2:"10",y1:"4",y2:"4"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20"}]];const Hn=[["path",{d:"M21 5H11"}],["path",{d:"M21 12H11"}],["path",{d:"M21 19H11"}],["path",{d:"m7 8-4 4 4 4"}]];const Bn=[["path",{d:"M21 5H11"}],["path",{d:"M21 12H11"}],["path",{d:"M21 19H11"}],["path",{d:"m3 8 4 4-4 4"}]];const Nn=[["path",{d:"M11 5h10"}],["path",{d:"M11 12h10"}],["path",{d:"M11 19h10"}],["path",{d:"M4 4h1v5"}],["path",{d:"M4 9h2"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02"}]];const Yn=[["path",{d:"M3 5h.01"}],["path",{d:"M3 12h.01"}],["path",{d:"M3 19h.01"}],["path",{d:"M8 5h13"}],["path",{d:"M8 12h13"}],["path",{d:"M8 19h13"}]];const Vn=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"}]];const Wn=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"}]];const Xn=[["path",{d:"M21 7v6h-6"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7"}]];const qn=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12"}]];const Gn=[["path",{d:"M21 5H3"}],["path",{d:"M17 12H7"}],["path",{d:"M19 19H5"}]];const Un=[["path",{d:"M21 5H3"}],["path",{d:"M21 12H9"}],["path",{d:"M21 19H7"}]];const $n=[["path",{d:"M3 5h18"}],["path",{d:"M3 12h18"}],["path",{d:"M3 19h18"}]];const Kn=[["path",{d:"M21 5H3"}],["path",{d:"M15 12H3"}],["path",{d:"M17 19H3"}]];const Jn=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20"}]];const Qn=[["path",{d:"M3 7v6h6"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13"}]];function Zn(){const d=document.createDocumentFragment();return[{command:"bold",icon:jn,title:"Bold"},{command:"italic",icon:Ln,title:"Italic"},{command:"underline",icon:Jn,title:"Underline"},{command:"strikeThrough",icon:qn,title:"Strikethrough"}].forEach(g=>{const f=document.createElement("button"),x=te(g.icon,{width:16,height:16});f.appendChild(x),f.title=g.title,f.style.fontWeight=g.command==="bold"?"bold":"normal",f.style.fontStyle=g.command==="italic"?"italic":"normal",f.style.textDecoration=g.command==="underline"?"underline":"none",f.style.border="1px solid #e1e1e1",f.style.backgroundColor="#ffffff",f.style.padding="6px 10px",f.style.borderRadius="3px",f.style.cursor="pointer",f.style.color="#000000",f.onmouseover=()=>f.style.backgroundColor="#f0f0f0",f.onmouseout=()=>f.style.backgroundColor="#ffffff",f.onclick=()=>document.execCommand(g.command),d.appendChild(f)}),d}let ye=null;function fe(d){if(d){ye=d.cloneRange();return}const w=window.getSelection();if(!w||w.rangeCount===0){ye=null;return}ye=w.getRangeAt(0).cloneRange()}function Mt(){const d=window.getSelection();d&&(d.removeAllRanges(),ye&&d.addRange(ye.cloneRange()))}function _t(d,w){const g=window.getSelection();if(!g||g.rangeCount===0)return;const f=g.getRangeAt(0);if(!f.collapsed){const A=document.createElement("span");A.style[d]=w;const D=f.extractContents();A.appendChild(D),f.insertNode(A),g.removeAllRanges();const $=document.createRange();$.selectNodeContents(A),g.addRange($),fe($);return}const x=document.createElement("span");x.style[d]=w,x.appendChild(document.createTextNode("")),f.insertNode(x),g.removeAllRanges();const M=document.createRange();M.setStart(x.firstChild,0),M.setEnd(x.firstChild,0),g.addRange(M),fe(M)}function er(d){_t("color",d)}function tr(d){_t("backgroundColor",d)}function nr(){const d=document.createDocumentFragment(),w=document.createElement("input");w.type="color",w.style.display="none",w.title="Text Color";const g=document.createElement("button");g.textContent="A",g.style.color="#000",g.style.fontSize="16px",g.style.fontWeight="bold",g.style.border="1px solid #ccc",g.style.borderRadius="4px",g.style.padding="4px 8px",g.style.cursor="pointer",g.style.backgroundColor="#fff",g.title="Text Color",g.onclick=()=>w.click(),w.onchange=()=>{Mt(),er(w.value),g.style.color=w.value},d.appendChild(g),d.appendChild(w);const f=document.createElement("input");f.type="color",f.style.display="none",f.title="Background Color";const x=document.createElement("button");return x.textContent="BA",x.style.color="#000",x.style.fontSize="14px",x.style.fontWeight="bold",x.style.border="1px solid #ccc",x.style.borderRadius="4px",x.style.padding="4px 6px",x.style.cursor="pointer",x.style.backgroundColor="#fff",x.title="Background Color",x.onclick=()=>f.click(),f.onchange=()=>{Mt(),tr(f.value),x.style.backgroundColor=f.value,x.style.color="#000"},d.appendChild(x),d.appendChild(f),d}function rr(){const d=document.createDocumentFragment();return[{command:"justifyLeft",icon:Kn,title:"Align Left"},{command:"justifyCenter",icon:Gn,title:"Align Center"},{command:"justifyRight",icon:Un,title:"Align Right"},{command:"justifyFull",icon:$n,title:"Justify"}].forEach(g=>{const f=document.createElement("button"),x=te(g.icon,{width:16,height:16});f.appendChild(x),f.title=g.title,f.style.border="1px solid #e1e1e1",f.style.backgroundColor="#ffffff",f.style.padding="6px 10px",f.style.borderRadius="3px",f.style.cursor="pointer",f.style.color="#000000",f.onmouseover=()=>f.style.backgroundColor="#f0f0f0",f.onmouseout=()=>f.style.backgroundColor="#ffffff",f.onclick=()=>document.execCommand(g.command),d.appendChild(f)}),d}function or(){const d=document.createDocumentFragment();return[{command:"insertUnorderedList",icon:Yn,title:"Bullet List"},{command:"insertOrderedList",icon:Nn,title:"Numbered List"}].forEach(g=>{const f=document.createElement("button"),x=te(g.icon,{width:16,height:16});f.appendChild(x),f.title=g.title,f.style.border="1px solid #e1e1e1",f.style.backgroundColor="#ffffff",f.style.padding="6px 10px",f.style.borderRadius="3px",f.style.cursor="pointer",f.style.color="#000000",f.onmouseover=()=>f.style.backgroundColor="#f0f0f0",f.onmouseout=()=>f.style.backgroundColor="#ffffff",f.onclick=()=>document.execCommand(g.command),d.appendChild(f)}),d}function ir(){const d=document.createDocumentFragment();return[{command:"indent",icon:Bn,title:"Increase Indent"},{command:"outdent",icon:Hn,title:"Decrease Indent"}].forEach(g=>{const f=document.createElement("button"),x=te(g.icon,{width:16,height:16});f.appendChild(x),f.title=g.title,f.style.border="1px solid #e1e1e1",f.style.backgroundColor="#ffffff",f.style.padding="6px 10px",f.style.borderRadius="3px",f.style.cursor="pointer",f.style.color="#000000",f.onmouseover=()=>f.style.backgroundColor="#f0f0f0",f.onmouseout=()=>f.style.backgroundColor="#ffffff",f.onclick=()=>document.execCommand(g.command),d.appendChild(f)}),d}function ar(){const d=document.createDocumentFragment();return[{command:"undo",icon:Qn,title:"Undo"},{command:"redo",icon:Xn,title:"Redo"}].forEach(g=>{const f=document.createElement("button"),x=te(g.icon,{width:16,height:16});f.appendChild(x),f.title=g.title,f.style.border="1px solid #e1e1e1",f.style.backgroundColor="#ffffff",f.style.padding="6px 10px",f.style.borderRadius="3px",f.style.cursor="pointer",f.style.color="#000000",f.onmouseover=()=>f.style.backgroundColor="#f0f0f0",f.onmouseout=()=>f.style.backgroundColor="#ffffff",f.onclick=()=>document.execCommand(g.command),d.appendChild(f)}),d}function sr(){const d=document.createElement("button"),w=te(Fn,{width:16,height:16});return d.appendChild(w),d.title="Insert Image",d.style.border="1px solid #e1e1e1",d.style.backgroundColor="#ffffff",d.style.padding="6px 10px",d.style.borderRadius="3px",d.style.cursor="pointer",d.style.color="#000000",d.onmouseover=()=>d.style.backgroundColor="#f0f0f0",d.onmouseout=()=>d.style.backgroundColor="#ffffff",d}function cr(){const d=document.createElement("button"),w=te(Vn,{width:16,height:16}),g=te(Wn,{width:16,height:16});d.appendChild(w),d.title="Toggle Fullscreen",d.style.border="1px solid #e1e1e1",d.style.backgroundColor="#ffffff",d.style.padding="6px 10px",d.style.borderRadius="3px",d.style.cursor="pointer",d.style.color="#000000",d.onmouseover=()=>d.style.backgroundColor="#f0f0f0",d.onmouseout=()=>d.style.backgroundColor="#ffffff";let f=!1;return d.onclick=()=>{const x=document.querySelector(".editor-container");if(!x)return;const M=x.querySelector(".editor");f?(x.style.position="",x.style.top="",x.style.left="",x.style.width="",x.style.height="",x.style.zIndex="",x.style.backgroundColor="",x.style.display="",x.style.flexDirection="",M&&(M.style.flexGrow="",M.style.overflowY="",M.style.border="",M.style.borderRadius="",M.style.boxShadow=""),d.replaceChild(w,g),f=!1):(x.style.position="fixed",x.style.top="0",x.style.left="0",x.style.width="100vw",x.style.height="100vh",x.style.zIndex="9999",x.style.backgroundColor="#ffffff",x.style.display="flex",x.style.flexDirection="column",M&&(M.style.flexGrow="1",M.style.overflowY="auto",M.style.border="none",M.style.borderRadius="0",M.style.boxShadow="none"),d.replaceChild(g,w),f=!0)},d}function lr(){const d=document.createElement("div");d.style.display="flex",d.style.flexWrap="wrap",d.style.gap="8px",d.style.marginBottom="10px",d.style.padding="12px",d.style.border="1px solid #e1e1e1",d.style.backgroundColor="#ffffff",d.style.borderRadius="4px",d.style.boxShadow="0 1px 3px rgba(0,0,0,0.1)";const w=me();w.innerHTML=`
|
|
21
|
+
`,v.onchange=()=>{const y=v.value,E=y==="p"?"P":y.toUpperCase();document.execCommand("formatBlock",!1,`<${E}>`)},v}const Zn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const sn=([v,y,E])=>{const g=document.createElementNS("http://www.w3.org/2000/svg",v);return Object.keys(y).forEach(w=>{g.setAttribute(w,String(y[w]))}),E?.length&&E.forEach(w=>{const O=sn(w);g.appendChild(O)}),g},Ye=(v,y={})=>{const g={...Zn,...y};return sn(["svg",g,v])};const er=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8"}]];const tr=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]];const nr=[["line",{x1:"19",x2:"10",y1:"4",y2:"4"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20"}]];const rr=[["path",{d:"M21 5H11"}],["path",{d:"M21 12H11"}],["path",{d:"M21 19H11"}],["path",{d:"m7 8-4 4 4 4"}]];const or=[["path",{d:"M21 5H11"}],["path",{d:"M21 12H11"}],["path",{d:"M21 19H11"}],["path",{d:"m3 8 4 4-4 4"}]];const ir=[["path",{d:"M11 5h10"}],["path",{d:"M11 12h10"}],["path",{d:"M11 19h10"}],["path",{d:"M4 4h1v5"}],["path",{d:"M4 9h2"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02"}]];const ar=[["path",{d:"M3 5h.01"}],["path",{d:"M3 12h.01"}],["path",{d:"M3 19h.01"}],["path",{d:"M8 5h13"}],["path",{d:"M8 12h13"}],["path",{d:"M8 19h13"}]];const sr=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"}]];const cr=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"}]];const ur=[["path",{d:"M21 7v6h-6"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7"}]];const lr=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12"}]];const fr=[["path",{d:"M21 5H3"}],["path",{d:"M17 12H7"}],["path",{d:"M19 19H5"}]];const pr=[["path",{d:"M21 5H3"}],["path",{d:"M21 12H9"}],["path",{d:"M21 19H7"}]];const dr=[["path",{d:"M3 5h18"}],["path",{d:"M3 12h18"}],["path",{d:"M3 19h18"}]];const hr=[["path",{d:"M21 5H3"}],["path",{d:"M15 12H3"}],["path",{d:"M17 19H3"}]];const vr=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20"}]];const gr=[["path",{d:"M3 7v6h6"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13"}]];function mr(){const v=document.createDocumentFragment();return[{command:"bold",icon:er,title:"Bold"},{command:"italic",icon:nr,title:"Italic"},{command:"underline",icon:vr,title:"Underline"},{command:"strikeThrough",icon:lr,title:"Strikethrough"}].forEach(E=>{const g=document.createElement("button"),w=Ye(E.icon,{width:16,height:16});g.appendChild(w),g.title=E.title,g.style.fontWeight=E.command==="bold"?"bold":"normal",g.style.fontStyle=E.command==="italic"?"italic":"normal",g.style.textDecoration=E.command==="underline"?"underline":"none",g.style.border="1px solid #e1e1e1",g.style.backgroundColor="#ffffff",g.style.padding="6px 10px",g.style.borderRadius="3px",g.style.cursor="pointer",g.style.color="#000000",g.onmouseover=()=>g.style.backgroundColor="#f0f0f0",g.onmouseout=()=>g.style.backgroundColor="#ffffff",g.onclick=()=>document.execCommand(E.command),v.appendChild(g)}),v}let ht=null;function st(v){if(v){ht=v.cloneRange();return}const y=window.getSelection();if(!y||y.rangeCount===0){ht=null;return}ht=y.getRangeAt(0).cloneRange()}function cn(){const v=window.getSelection();v&&(v.removeAllRanges(),ht&&v.addRange(ht.cloneRange()))}function un(v,y){const E=window.getSelection();if(!E||E.rangeCount===0)return;const g=E.getRangeAt(0);if(!g.collapsed){const J=document.createElement("span");J.style[v]=y;const L=g.extractContents();J.appendChild(L),g.insertNode(J),E.removeAllRanges();const de=document.createRange();de.selectNodeContents(J),E.addRange(de),st(de);return}const w=document.createElement("span");w.style[v]=y,w.appendChild(document.createTextNode("")),g.insertNode(w),E.removeAllRanges();const O=document.createRange();O.setStart(w.firstChild,0),O.setEnd(w.firstChild,0),E.addRange(O),st(O)}function yr(v){un("color",v)}function br(v){un("backgroundColor",v)}function xr(){const v=document.createDocumentFragment(),y=document.createElement("input");y.type="color",y.style.display="none",y.title="Text Color";const E=document.createElement("button");E.textContent="A",E.style.color="#000",E.style.fontSize="16px",E.style.fontWeight="bold",E.style.border="1px solid #ccc",E.style.borderRadius="4px",E.style.padding="4px 8px",E.style.cursor="pointer",E.style.backgroundColor="#fff",E.title="Text Color",E.onclick=()=>y.click(),y.onchange=()=>{cn(),yr(y.value),E.style.color=y.value},v.appendChild(E),v.appendChild(y);const g=document.createElement("input");g.type="color",g.style.display="none",g.title="Background Color";const w=document.createElement("button");return w.textContent="BA",w.style.color="#000",w.style.fontSize="14px",w.style.fontWeight="bold",w.style.border="1px solid #ccc",w.style.borderRadius="4px",w.style.padding="4px 6px",w.style.cursor="pointer",w.style.backgroundColor="#fff",w.title="Background Color",w.onclick=()=>g.click(),g.onchange=()=>{cn(),br(g.value),w.style.backgroundColor=g.value,w.style.color="#000"},v.appendChild(w),v.appendChild(g),v}function Er(){const v=document.createDocumentFragment();return[{command:"justifyLeft",icon:hr,title:"Align Left"},{command:"justifyCenter",icon:fr,title:"Align Center"},{command:"justifyRight",icon:pr,title:"Align Right"},{command:"justifyFull",icon:dr,title:"Justify"}].forEach(E=>{const g=document.createElement("button"),w=Ye(E.icon,{width:16,height:16});g.appendChild(w),g.title=E.title,g.style.border="1px solid #e1e1e1",g.style.backgroundColor="#ffffff",g.style.padding="6px 10px",g.style.borderRadius="3px",g.style.cursor="pointer",g.style.color="#000000",g.onmouseover=()=>g.style.backgroundColor="#f0f0f0",g.onmouseout=()=>g.style.backgroundColor="#ffffff",g.onclick=()=>document.execCommand(E.command),v.appendChild(g)}),v}function wr(){const v=document.createDocumentFragment();return[{command:"insertUnorderedList",icon:ar,title:"Bullet List"},{command:"insertOrderedList",icon:ir,title:"Numbered List"}].forEach(E=>{const g=document.createElement("button"),w=Ye(E.icon,{width:16,height:16});g.appendChild(w),g.title=E.title,g.style.border="1px solid #e1e1e1",g.style.backgroundColor="#ffffff",g.style.padding="6px 10px",g.style.borderRadius="3px",g.style.cursor="pointer",g.style.color="#000000",g.onmouseover=()=>g.style.backgroundColor="#f0f0f0",g.onmouseout=()=>g.style.backgroundColor="#ffffff",g.onclick=()=>document.execCommand(E.command),v.appendChild(g)}),v}function _r(){const v=document.createDocumentFragment();return[{command:"indent",icon:or,title:"Increase Indent"},{command:"outdent",icon:rr,title:"Decrease Indent"}].forEach(E=>{const g=document.createElement("button"),w=Ye(E.icon,{width:16,height:16});g.appendChild(w),g.title=E.title,g.style.border="1px solid #e1e1e1",g.style.backgroundColor="#ffffff",g.style.padding="6px 10px",g.style.borderRadius="3px",g.style.cursor="pointer",g.style.color="#000000",g.onmouseover=()=>g.style.backgroundColor="#f0f0f0",g.onmouseout=()=>g.style.backgroundColor="#ffffff",g.onclick=()=>document.execCommand(E.command),v.appendChild(g)}),v}function Tr(){const v=document.createDocumentFragment();return[{command:"undo",icon:gr,title:"Undo"},{command:"redo",icon:ur,title:"Redo"}].forEach(E=>{const g=document.createElement("button"),w=Ye(E.icon,{width:16,height:16});g.appendChild(w),g.title=E.title,g.style.border="1px solid #e1e1e1",g.style.backgroundColor="#ffffff",g.style.padding="6px 10px",g.style.borderRadius="3px",g.style.cursor="pointer",g.style.color="#000000",g.onmouseover=()=>g.style.backgroundColor="#f0f0f0",g.onmouseout=()=>g.style.backgroundColor="#ffffff",g.onclick=()=>document.execCommand(E.command),v.appendChild(g)}),v}function Sr(){const v=document.createElement("button"),y=Ye(tr,{width:16,height:16});return v.appendChild(y),v.title="Insert Image",v.style.border="1px solid #e1e1e1",v.style.backgroundColor="#ffffff",v.style.padding="6px 10px",v.style.borderRadius="3px",v.style.cursor="pointer",v.style.color="#000000",v.onmouseover=()=>v.style.backgroundColor="#f0f0f0",v.onmouseout=()=>v.style.backgroundColor="#ffffff",v}function kr(){const v=document.createElement("button"),y=Ye(sr,{width:16,height:16}),E=Ye(cr,{width:16,height:16});v.appendChild(y),v.title="Toggle Fullscreen",v.style.border="1px solid #e1e1e1",v.style.backgroundColor="#ffffff",v.style.padding="6px 10px",v.style.borderRadius="3px",v.style.cursor="pointer",v.style.color="#000000",v.onmouseover=()=>v.style.backgroundColor="#f0f0f0",v.onmouseout=()=>v.style.backgroundColor="#ffffff";let g=!1;return v.onclick=()=>{const w=document.querySelector(".editor-container");if(!w)return;const O=w.querySelector(".editor");g?(w.style.position="",w.style.top="",w.style.left="",w.style.width="",w.style.height="",w.style.zIndex="",w.style.backgroundColor="",w.style.display="",w.style.flexDirection="",O&&(O.style.flexGrow="",O.style.overflowY="",O.style.border="",O.style.borderRadius="",O.style.boxShadow=""),v.replaceChild(y,E),g=!1):(w.style.position="fixed",w.style.top="0",w.style.left="0",w.style.width="100vw",w.style.height="100vh",w.style.zIndex="9999",w.style.backgroundColor="#ffffff",w.style.display="flex",w.style.flexDirection="column",O&&(O.style.flexGrow="1",O.style.overflowY="auto",O.style.border="none",O.style.borderRadius="0",O.style.boxShadow="none"),v.replaceChild(E,y),g=!0)},v}function Rr(){const v=document.createElement("div");v.style.display="flex",v.style.flexWrap="wrap",v.style.gap="8px",v.style.marginBottom="10px",v.style.padding="12px",v.style.border="1px solid #e1e1e1",v.style.backgroundColor="#ffffff",v.style.borderRadius="4px",v.style.boxShadow="0 1px 3px rgba(0,0,0,0.1)";const y=dt();y.innerHTML=`
|
|
22
22
|
<option value="Arial">Arial</option>
|
|
23
23
|
<option value="Times New Roman">Times New Roman</option>
|
|
24
24
|
<option value="Courier New">Courier New</option>
|
|
25
25
|
<option value="Georgia">Georgia</option>
|
|
26
26
|
<option value="Verdana">Verdana</option>
|
|
27
|
-
`,
|
|
27
|
+
`,y.style.border="1px solid #e1e1e1",y.style.backgroundColor="#ffffff",y.style.padding="4px",y.style.borderRadius="3px",y.style.color="#000000",y.onchange=()=>document.execCommand("fontName",!1,y.value),v.appendChild(y);const E=Jn();E.title="Heading",E.style.border="1px solid #e1e1e1",E.style.backgroundColor="#ffffff",E.style.padding="4px",E.style.borderRadius="3px",E.style.color="#000000",E.innerHTML=`
|
|
28
28
|
<option value="p">Normal</option>
|
|
29
29
|
<option value="h1">Heading 1</option>
|
|
30
30
|
<option value="h2">Heading 2</option>
|
|
31
31
|
<option value="h3">Heading 3</option>
|
|
32
32
|
<option value="h4">Heading 4</option>
|
|
33
|
-
`,
|
|
33
|
+
`,E.onchange=()=>{const se=E.value,ne=se==="p"?"P":se.toUpperCase();document.execCommand("formatBlock",!1,`<${ne}>`)},v.appendChild(E),document.addEventListener("selectionchange",()=>{try{const se=window.getSelection();if(!se||!se.anchorNode)return;let ne=se.anchorNode;for(;ne&&ne.nodeType!==Node.ELEMENT_NODE;)ne=ne.parentNode;if(!ne)return;let ce=ne;for(;ce&&ce!==document.body&&ce!==v.parentElement;){const fe=ce.tagName?.toUpperCase?.();if(fe==="H1"||fe==="H2"||fe==="H3"||fe==="H4"||fe==="P"){E.value=fe==="P"?"p":fe.toLowerCase();return}ce=ce.parentElement}E.value="p"}catch{}});const g=Qn();g.innerHTML=`
|
|
34
34
|
<option value="1">8pt</option>
|
|
35
35
|
<option value="2">10pt</option>
|
|
36
36
|
<option value="3" selected>12pt</option>
|
|
@@ -38,4 +38,21 @@
|
|
|
38
38
|
<option value="5">18pt</option>
|
|
39
39
|
<option value="6">24pt</option>
|
|
40
40
|
<option value="7">36pt</option>
|
|
41
|
-
`,f.style.border="1px solid #e1e1e1",f.style.backgroundColor="#ffffff",f.style.padding="4px",f.style.borderRadius="3px",f.style.color="#000000",f.onchange=()=>document.execCommand("fontSize",!1,f.value),d.appendChild(f);const x=Zn();d.appendChild(x);const M=nr();d.appendChild(M);const A=rr();d.appendChild(A);const D=or();d.appendChild(D);const $=ir();d.appendChild($);const F=ar();d.appendChild(F);const R=sr();d.appendChild(R);const xe=cr();return d.appendChild(xe),d}function ur(d,w){const g=document.createElement("div");return g.classList.add("editor"),g.contentEditable="true",g.style.color="#000000",g.style.border="1px solid #e1e1e1",g.style.minHeight="400px",g.style.padding="15px",g.style.fontFamily="Arial, sans-serif",g.style.fontSize="14px",g.style.lineHeight="1.5",g.style.outline="none",g.style.backgroundColor="#ffffff",g.style.borderRadius="4px",g.style.boxShadow="inset 0 1px 3px rgba(0,0,0,0.1)",g.style.direction="ltr",g.style.textAlign="left",g.innerHTML="<p>Start typing here...</p>",g.addEventListener("dragover",f=>{f.preventDefault(),f.stopPropagation()}),g.addEventListener("drop",f=>{f.preventDefault(),f.stopPropagation();const x=f.dataTransfer?.files;if(x&&x.length>0)for(let M=0;M<x.length;M++){const A=x[M];if(A.type.startsWith("image/")){const D=new FileReader;D.onload=$=>{const F=document.createElement("img");F.src=$.target?.result,F.style.maxWidth="100%",F.style.width="100%",F.style.height="auto",F.style.cursor="pointer",F.draggable=!1;const R=document.createElement("div");R.className="editor-image-wrapper",R.style.display="inline-block",R.style.position="relative",R.style.maxWidth="100%",R.style.width="auto",R.style.height="auto",R.contentEditable="false",R.style.userSelect="none",R.style.boxSizing="border-box",R.style.touchAction="none",R.appendChild(F),g.appendChild(R)},D.readAsDataURL(A)}}}),g.addEventListener("click",f=>{const x=f.target;let M=x;x.tagName==="IMG"&&(M=x.parentElement),M&&M.classList.contains("editor-image-wrapper")&&w(M)}),g.addEventListener("keyup",()=>fe()),g.addEventListener("mouseup",()=>fe()),g.addEventListener("focus",()=>fe()),window.addEventListener("selectionchange",()=>{try{const f=window.getSelection();if(!f||!f.anchorNode)return;let x=f.anchorNode;for(;x&&x.nodeType!==Node.ELEMENT_NODE;)x=x.parentNode;if(!x)return;g.contains(x)&&fe()}catch{}}),g}function pr(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}var be={exports:{}},dr=be.exports,Ct;function fr(){return Ct||(Ct=1,(function(d,w){(function(g,f){d.exports=f()})(dr,(function(){function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?g(Object(n),!0).forEach((function(r){$(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function x(t){return x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(t)}function M(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,U(r.key),r)}}function D(t,e,n){return e&&A(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function $(t,e,n){return(e=U(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function F(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xe(t,e)}function R(t){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(t)}function xe(t,e){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},xe(t,e)}function Y(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function B(t){var e=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var n,r=R(t);if(e){var o=R(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(function(i,a){if(a&&(typeof a=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Y(i)})(this,n)}}function X(){return X=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=(function(i,a){for(;!Object.prototype.hasOwnProperty.call(i,a)&&(i=R(i))!==null;);return i})(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},X.apply(this,arguments)}function U(t){var e=(function(n,r){if(typeof n!="object"||n===null)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var i=o.call(n,r);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(t,"string");return typeof e=="symbol"?e:e+""}var Ot=function(t){return!(!t||!t.Window)&&t instanceof t.Window},It=void 0,se=void 0;function Dt(t){It=t;var e=t.document.createTextNode("");e.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(e)===e&&(t=t.wrap(t)),se=t}function K(t){return Ot(t)?t:(t.ownerDocument||t).defaultView||se.window}typeof window<"u"&&window&&Dt(window);var ze=function(t){return!!t&&x(t)==="object"},zt=function(t){return typeof t=="function"},v={window:function(t){return t===se||Ot(t)},docFrag:function(t){return ze(t)&&t.nodeType===11},object:ze,func:zt,number:function(t){return typeof t=="number"},bool:function(t){return typeof t=="boolean"},string:function(t){return typeof t=="string"},element:function(t){if(!t||x(t)!=="object")return!1;var e=K(t)||se;return/object|function/.test(typeof Element>"u"?"undefined":x(Element))?t instanceof Element||t instanceof e.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:function(t){return ze(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return ze(t)&&t.length!==void 0&&zt(t.splice)}};function Je(t){var e=t.interaction;if(e.prepared.name==="drag"){var n=e.prepared.axis;n==="x"?(e.coords.cur.page.y=e.coords.start.page.y,e.coords.cur.client.y=e.coords.start.client.y,e.coords.velocity.client.y=0,e.coords.velocity.page.y=0):n==="y"&&(e.coords.cur.page.x=e.coords.start.page.x,e.coords.cur.client.x=e.coords.start.client.x,e.coords.velocity.client.x=0,e.coords.velocity.page.x=0)}}function Rt(t){var e=t.iEvent,n=t.interaction;if(n.prepared.name==="drag"){var r=n.prepared.axis;if(r==="x"||r==="y"){var o=r==="x"?"y":"x";e.page[o]=n.coords.start.page[o],e.client[o]=n.coords.start.client[o],e.delta[o]=0}}}var Re={id:"actions/drag",install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.draggable=Re.draggable,e.map.drag=Re,e.methodDict.drag="draggable",r.actions.drag=Re.defaults},listeners:{"interactions:before-action-move":Je,"interactions:action-resume":Je,"interactions:action-move":Rt,"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.buttons,o=n.options.drag;if(o&&o.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||(r&n.options.drag.mouseButtons)!=0))return t.action={name:"drag",axis:o.lockAxis==="start"?o.startAxis:o.lockAxis},!1}},draggable:function(t){return v.object(t)?(this.options.drag.enabled=t.enabled!==!1,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):v.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:Je,move:Rt,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return t.search("drag")===0}},At=Re,V={init:function(t){var e=t;V.document=e.document,V.DocumentFragment=e.DocumentFragment||he,V.SVGElement=e.SVGElement||he,V.SVGSVGElement=e.SVGSVGElement||he,V.SVGElementInstance=e.SVGElementInstance||he,V.Element=e.Element||he,V.HTMLElement=e.HTMLElement||V.Element,V.Event=e.Event,V.Touch=e.Touch||he,V.PointerEvent=e.PointerEvent||e.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function he(){}var j=V,W={init:function(t){var e=j.Element,n=t.navigator||{};W.supportsTouch="ontouchstart"in t||v.func(t.DocumentTouch)&&j.document instanceof t.DocumentTouch,W.supportsPointerEvent=n.pointerEnabled!==!1&&!!j.PointerEvent,W.isIOS=/iP(hone|od|ad)/.test(n.platform),W.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),W.isIe9=/MSIE 9/.test(n.userAgent),W.isOperaMobile=n.appName==="Opera"&&W.supportsTouch&&/Presto/.test(n.userAgent),W.prefixedMatchesSelector="matches"in e.prototype?"matches":"webkitMatchesSelector"in e.prototype?"webkitMatchesSelector":"mozMatchesSelector"in e.prototype?"mozMatchesSelector":"oMatchesSelector"in e.prototype?"oMatchesSelector":"msMatchesSelector",W.pEventTypes=W.supportsPointerEvent?j.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,W.wheelEvent=j.document&&"onmousewheel"in j.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},q=W;function ce(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function jt(t,e){for(;v.element(t);){if(ne(t,e))return t;t=J(t)}return null}function J(t){var e=t.parentNode;if(v.docFrag(e)){for(;(e=e.host)&&v.docFrag(e););return e}return e}function ne(t,e){return se!==It&&(e=e.replace(/\/deep\//g," ")),t[q.prefixedMatchesSelector](e)}var Qe=function(t){return t.parentNode||t.host};function Ft(t,e){for(var n,r=[],o=t;(n=Qe(o))&&o!==e&&n!==o.ownerDocument;)r.unshift(o),o=n;return r}function Ze(t,e,n){for(;v.element(t);){if(ne(t,e))return!0;if((t=J(t))===n)return ne(t,e)}return!1}function Lt(t){return t.correspondingUseElement||t}function et(t){var e=t instanceof j.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}function tt(t){var e,n=et(t);if(!q.isIOS7&&n){var r={x:(e=(e=K(t))||se).scrollX||e.document.documentElement.scrollLeft,y:e.scrollY||e.document.documentElement.scrollTop};n.left+=r.x,n.right+=r.x,n.top+=r.y,n.bottom+=r.y}return n}function Ht(t){for(var e=[];t;)e.push(t),t=J(t);return e}function Bt(t){return!!v.string(t)&&(j.document.querySelector(t),!0)}function k(t,e){for(var n in e)t[n]=e[n];return t}function Nt(t,e,n){return t==="parent"?J(n):t==="self"?e.getRect(n):jt(n,t)}function we(t,e,n,r){var o=t;return v.string(o)?o=Nt(o,e,n):v.func(o)&&(o=o.apply(void 0,r)),v.element(o)&&(o=tt(o)),o}function Ae(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function nt(t){return!t||"x"in t&&"y"in t||((t=k({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function je(t,e,n){t.left&&(e.left+=n.x),t.right&&(e.right+=n.x),t.top&&(e.top+=n.y),t.bottom&&(e.bottom+=n.y),e.width=e.right-e.left,e.height=e.bottom-e.top}function Ee(t,e,n){var r=n&&t.options[n];return Ae(we(r&&r.origin||t.options.origin,t,e,[t&&e]))||{x:0,y:0}}function le(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(c){return!0},r=arguments.length>3?arguments[3]:void 0;if(r=r||{},v.string(t)&&t.search(" ")!==-1&&(t=Yt(t)),v.array(t))return t.forEach((function(c){return le(c,e,n,r)})),r;if(v.object(t)&&(e=t,t=""),v.func(e)&&n(t))r[t]=r[t]||[],r[t].push(e);else if(v.array(e))for(var o=0,i=e;o<i.length;o++){var a=i[o];le(t,a,n,r)}else if(v.object(e))for(var s in e)le(Yt(s).map((function(c){return"".concat(t).concat(c)})),e[s],n,r);return r}function Yt(t){return t.trim().split(/ +/)}var Se=function(t,e){return Math.sqrt(t*t+e*e)},mr=["webkit","moz"];function Fe(t,e){t.__set||(t.__set={});var n=function(o){if(mr.some((function(i){return o.indexOf(i)===0})))return 1;typeof t[o]!="function"&&o!=="__set"&&Object.defineProperty(t,o,{get:function(){return o in t.__set?t.__set[o]:t.__set[o]=e[o]},set:function(i){t.__set[o]=i},configurable:!0})};for(var r in e)n(r);return t}function Le(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp}function Vt(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function Wt(t){return t instanceof j.Event||t instanceof j.Touch}function He(t,e,n){return t=t||"page",(n=n||{}).x=e[t+"X"],n.y=e[t+"Y"],n}function Xt(t,e){return e=e||{x:0,y:0},q.isOperaMobile&&Wt(t)?(He("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):He("page",t,e),e}function Te(t){return v.number(t.pointerId)?t.pointerId:t.identifier}function yr(t,e,n){var r=e.length>1?qt(e):e[0];Xt(r,t.page),(function(o,i){i=i||{},q.isOperaMobile&&Wt(o)?He("screen",o,i):He("client",o,i)})(r,t.client),t.timeStamp=n}function rt(t){var e=[];return v.array(t)?(e[0]=t[0],e[1]=t[1]):t.type==="touchend"?t.touches.length===1?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):t.touches.length===0&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function qt(t){for(var e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},n=0;n<t.length;n++){var r=t[n];for(var o in e)e[o]+=r[o]}for(var i in e)e[i]/=t.length;return e}function ot(t){if(!t.length)return null;var e=rt(t),n=Math.min(e[0].pageX,e[1].pageX),r=Math.min(e[0].pageY,e[1].pageY),o=Math.max(e[0].pageX,e[1].pageX),i=Math.max(e[0].pageY,e[1].pageY);return{x:n,y:r,left:n,top:r,right:o,bottom:i,width:o-n,height:i-r}}function it(t,e){var n=e+"X",r=e+"Y",o=rt(t),i=o[0][n]-o[1][n],a=o[0][r]-o[1][r];return Se(i,a)}function at(t,e){var n=e+"X",r=e+"Y",o=rt(t),i=o[1][n]-o[0][n],a=o[1][r]-o[0][r];return 180*Math.atan2(a,i)/Math.PI}function Gt(t){return v.string(t.pointerType)?t.pointerType:v.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof j.Touch?"touch":"mouse"}function Ut(t){var e=v.func(t.composedPath)?t.composedPath():t.path;return[Lt(e?e[0]:t.target),Lt(t.currentTarget)]}var Be=(function(){function t(e){M(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=e}return D(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t})();Object.defineProperty(Be.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var $t=function(t,e){for(var n=0;n<e.length;n++){var r=e[n];t.push(r)}return t},Kt=function(t){return $t([],t)},ke=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1},Me=function(t,e){return t[ke(t,e)]},ve=(function(t){F(n,t);var e=B(n);function n(r,o,i){var a;M(this,n),(a=e.call(this,o._interaction)).dropzone=void 0,a.dragEvent=void 0,a.relatedTarget=void 0,a.draggable=void 0,a.propagationStopped=!1,a.immediatePropagationStopped=!1;var s=i==="dragleave"?r.prev:r.cur,c=s.element,u=s.dropzone;return a.type=i,a.target=c,a.currentTarget=c,a.dropzone=u,a.dragEvent=o,a.relatedTarget=o.target,a.draggable=o.interactable,a.timeStamp=o.timeStamp,a}return D(n,[{key:"reject",value:function(){var r=this,o=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&o.cur.dropzone===this.dropzone&&o.cur.element===this.target)if(o.prev.dropzone=this.dropzone,o.prev.element=this.target,o.rejected=!0,o.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var i=o.activeDrops,a=ke(i,(function(c){var u=c.dropzone,l=c.element;return u===r.dropzone&&l===r.target}));o.activeDrops.splice(a,1);var s=new n(o,this.dragEvent,"dropdeactivate");s.dropzone=this.dropzone,s.target=this.target,this.dropzone.fire(s)}else this.dropzone.fire(new n(o,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n})(Be);function Jt(t,e){for(var n=0,r=t.slice();n<r.length;n++){var o=r[n],i=o.dropzone,a=o.element;e.dropzone=i,e.target=a,i.fire(e),e.propagationStopped=e.immediatePropagationStopped=!1}}function st(t,e){for(var n=(function(i,a){for(var s=[],c=0,u=i.interactables.list;c<u.length;c++){var l=u[c];if(l.options.drop.enabled){var p=l.options.drop.accept;if(!(v.element(p)&&p!==a||v.string(p)&&!ne(a,p)||v.func(p)&&!p({dropzone:l,draggableElement:a})))for(var h=0,y=l.getAllElements();h<y.length;h++){var m=y[h];m!==a&&s.push({dropzone:l,element:m,rect:l.getRect(m)})}}}return s})(t,e),r=0;r<n.length;r++){var o=n[r];o.rect=o.dropzone.getRect(o.element)}return n}function Qt(t,e,n){for(var r=t.dropState,o=t.interactable,i=t.element,a=[],s=0,c=r.activeDrops;s<c.length;s++){var u=c[s],l=u.dropzone,p=u.element,h=u.rect,y=l.dropCheck(e,n,o,i,p,h);a.push(y?p:null)}var m=(function(b){for(var S,E,T,P=[],I=0;I<b.length;I++){var _=b[I],O=b[S];if(_&&I!==S)if(O){var H=Qe(_),z=Qe(O);if(H!==_.ownerDocument)if(z!==_.ownerDocument)if(H!==z){P=P.length?P:Ft(O);var N=void 0;if(O instanceof j.HTMLElement&&_ instanceof j.SVGElement&&!(_ instanceof j.SVGSVGElement)){if(_===z)continue;N=_.ownerSVGElement}else N=_;for(var G=Ft(N,O.ownerDocument),ee=0;G[ee]&&G[ee]===P[ee];)ee++;var $e=[G[ee-1],G[ee],P[ee]];if($e[0])for(var De=$e[0].lastChild;De;){if(De===$e[1]){S=I,P=G;break}if(De===$e[2])break;De=De.previousSibling}}else T=O,(parseInt(K(E=_).getComputedStyle(E).zIndex,10)||0)>=(parseInt(K(T).getComputedStyle(T).zIndex,10)||0)&&(S=I);else S=I}else S=I}return S})(a);return r.activeDrops[m]||null}function ct(t,e,n){var r=t.dropState,o={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return n.type==="dragstart"&&(o.activate=new ve(r,n,"dropactivate"),o.activate.target=null,o.activate.dropzone=null),n.type==="dragend"&&(o.deactivate=new ve(r,n,"dropdeactivate"),o.deactivate.target=null,o.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(o.leave=new ve(r,n,"dragleave"),n.dragLeave=o.leave.target=r.prev.element,n.prevDropzone=o.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(o.enter=new ve(r,n,"dragenter"),n.dragEnter=r.cur.element,n.dropzone=r.cur.dropzone)),n.type==="dragend"&&r.cur.dropzone&&(o.drop=new ve(r,n,"drop"),n.dropzone=r.cur.dropzone,n.relatedTarget=r.cur.element),n.type==="dragmove"&&r.cur.dropzone&&(o.move=new ve(r,n,"dropmove"),n.dropzone=r.cur.dropzone)),o}function lt(t,e){var n=t.dropState,r=n.activeDrops,o=n.cur,i=n.prev;e.leave&&i.dropzone.fire(e.leave),e.enter&&o.dropzone.fire(e.enter),e.move&&o.dropzone.fire(e.move),e.drop&&o.dropzone.fire(e.drop),e.deactivate&&Jt(r,e.deactivate),n.prev.dropzone=o.dropzone,n.prev.element=o.element}function Zt(t,e){var n=t.interaction,r=t.iEvent,o=t.event;if(r.type==="dragmove"||r.type==="dragend"){var i=n.dropState;e.dynamicDrop&&(i.activeDrops=st(e,n.element));var a=r,s=Qt(n,a,o);i.rejected=i.rejected&&!!s&&s.dropzone===i.cur.dropzone&&s.element===i.cur.element,i.cur.dropzone=s&&s.dropzone,i.cur.element=s&&s.element,i.events=ct(n,0,a)}}var en={id:"actions/drop",install:function(t){var e=t.actions,n=t.interactStatic,r=t.Interactable,o=t.defaults;t.usePlugin(At),r.prototype.dropzone=function(i){return(function(a,s){if(v.object(s)){if(a.options.drop.enabled=s.enabled!==!1,s.listeners){var c=le(s.listeners),u=Object.keys(c).reduce((function(p,h){return p[/^(enter|leave)/.test(h)?"drag".concat(h):/^(activate|deactivate|move)/.test(h)?"drop".concat(h):h]=c[h],p}),{}),l=a.options.drop.listeners;l&&a.off(l),a.on(u),a.options.drop.listeners=u}return v.func(s.ondrop)&&a.on("drop",s.ondrop),v.func(s.ondropactivate)&&a.on("dropactivate",s.ondropactivate),v.func(s.ondropdeactivate)&&a.on("dropdeactivate",s.ondropdeactivate),v.func(s.ondragenter)&&a.on("dragenter",s.ondragenter),v.func(s.ondragleave)&&a.on("dragleave",s.ondragleave),v.func(s.ondropmove)&&a.on("dropmove",s.ondropmove),/^(pointer|center)$/.test(s.overlap)?a.options.drop.overlap=s.overlap:v.number(s.overlap)&&(a.options.drop.overlap=Math.max(Math.min(1,s.overlap),0)),"accept"in s&&(a.options.drop.accept=s.accept),"checker"in s&&(a.options.drop.checker=s.checker),a}return v.bool(s)?(a.options.drop.enabled=s,a):a.options.drop})(this,i)},r.prototype.dropCheck=function(i,a,s,c,u,l){return(function(p,h,y,m,b,S,E){var T=!1;if(!(E=E||p.getRect(S)))return!!p.options.drop.checker&&p.options.drop.checker(h,y,T,p,S,m,b);var P=p.options.drop.overlap;if(P==="pointer"){var I=Ee(m,b,"drag"),_=Xt(h);_.x+=I.x,_.y+=I.y;var O=_.x>E.left&&_.x<E.right,H=_.y>E.top&&_.y<E.bottom;T=O&&H}var z=m.getRect(b);if(z&&P==="center"){var N=z.left+z.width/2,G=z.top+z.height/2;T=N>=E.left&&N<=E.right&&G>=E.top&&G<=E.bottom}return z&&v.number(P)&&(T=Math.max(0,Math.min(E.right,z.right)-Math.max(E.left,z.left))*Math.max(0,Math.min(E.bottom,z.bottom)-Math.max(E.top,z.top))/(z.width*z.height)>=P),p.options.drop.checker&&(T=p.options.drop.checker(h,y,T,p,S,m,b)),T})(this,i,a,s,c,u,l)},n.dynamicDrop=function(i){return v.bool(i)?(t.dynamicDrop=i,n):t.dynamicDrop},k(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,o.actions.drop=en.defaults},listeners:{"interactions:before-action-start":function(t){var e=t.interaction;e.prepared.name==="drag"&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,e){var n=t.interaction,r=(t.event,t.iEvent);if(n.prepared.name==="drag"){var o=n.dropState;o.activeDrops=[],o.events={},o.activeDrops=st(e,n.element),o.events=ct(n,0,r),o.events.activate&&(Jt(o.activeDrops,o.events.activate),e.fire("actions/drop:start",{interaction:n,dragEvent:r}))}},"interactions:action-move":Zt,"interactions:after-action-move":function(t,e){var n=t.interaction,r=t.iEvent;if(n.prepared.name==="drag"){var o=n.dropState;lt(n,o.events),e.fire("actions/drop:move",{interaction:n,dragEvent:r}),o.events={}}},"interactions:action-end":function(t,e){if(t.interaction.prepared.name==="drag"){var n=t.interaction,r=t.iEvent;Zt(t,e),lt(n,n.dropState.events),e.fire("actions/drop:end",{interaction:n,dragEvent:r})}},"interactions:stop":function(t){var e=t.interaction;if(e.prepared.name==="drag"){var n=e.dropState;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}}},getActiveDrops:st,getDrop:Qt,getDropEvents:ct,fireDropEvents:lt,filterEventType:function(t){return t.search("drag")===0||t.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},br=en;function ut(t){var e=t.interaction,n=t.iEvent,r=t.phase;if(e.prepared.name==="gesture"){var o=e.pointers.map((function(u){return u.pointer})),i=r==="start",a=r==="end",s=e.interactable.options.deltaSource;if(n.touches=[o[0],o[1]],i)n.distance=it(o,s),n.box=ot(o),n.scale=1,n.ds=0,n.angle=at(o,s),n.da=0,e.gesture.startDistance=n.distance,e.gesture.startAngle=n.angle;else if(a||e.pointers.length<2){var c=e.prevEvent;n.distance=c.distance,n.box=c.box,n.scale=c.scale,n.ds=0,n.angle=c.angle,n.da=0}else n.distance=it(o,s),n.box=ot(o),n.scale=n.distance/e.gesture.startDistance,n.angle=at(o,s),n.ds=n.scale-e.gesture.scale,n.da=n.angle-e.gesture.angle;e.gesture.distance=n.distance,e.gesture.angle=n.angle,v.number(n.scale)&&n.scale!==1/0&&!isNaN(n.scale)&&(e.gesture.scale=n.scale)}}var pt={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.gesturable=function(o){return v.object(o)?(this.options.gesture.enabled=o.enabled!==!1,this.setPerAction("gesture",o),this.setOnEvents("gesture",o),this):v.bool(o)?(this.options.gesture.enabled=o,this):this.options.gesture},e.map.gesture=pt,e.methodDict.gesture="gesturable",r.actions.gesture=pt.defaults},listeners:{"interactions:action-start":ut,"interactions:action-move":ut,"interactions:action-end":ut,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var e=t.interactable.options.gesture;if(e&&e.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return t.search("gesture")===0}},xr=pt;function wr(t,e,n,r,o,i,a){if(!e)return!1;if(e===!0){var s=v.number(i.width)?i.width:i.right-i.left,c=v.number(i.height)?i.height:i.bottom-i.top;if(a=Math.min(a,Math.abs((t==="left"||t==="right"?s:c)/2)),s<0&&(t==="left"?t="right":t==="right"&&(t="left")),c<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){var u=s>=0?i.left:i.right;return n.x<u+a}if(t==="top"){var l=c>=0?i.top:i.bottom;return n.y<l+a}if(t==="right")return n.x>(s>=0?i.right:i.left)-a;if(t==="bottom")return n.y>(c>=0?i.bottom:i.top)-a}return!!v.element(r)&&(v.element(e)?e===r:Ze(r,e,o))}function tn(t){var e=t.iEvent,n=t.interaction;if(n.prepared.name==="resize"&&n.resizeAxes){var r=e;n.interactable.options.resize.square?(n.resizeAxes==="y"?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=n.resizeAxes,n.resizeAxes==="x"?r.delta.y=0:n.resizeAxes==="y"&&(r.delta.x=0))}}var Q,ue,Z={id:"actions/resize",before:["actions/drag"],install:function(t){var e=t.actions,n=t.browser,r=t.Interactable,o=t.defaults;Z.cursors=(function(i){return i.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}})(n),Z.defaultMargin=n.supportsTouch||n.supportsPointerEvent?20:10,r.prototype.resizable=function(i){return(function(a,s,c){return v.object(s)?(a.options.resize.enabled=s.enabled!==!1,a.setPerAction("resize",s),a.setOnEvents("resize",s),v.string(s.axis)&&/^x$|^y$|^xy$/.test(s.axis)?a.options.resize.axis=s.axis:s.axis===null&&(a.options.resize.axis=c.defaults.actions.resize.axis),v.bool(s.preserveAspectRatio)?a.options.resize.preserveAspectRatio=s.preserveAspectRatio:v.bool(s.square)&&(a.options.resize.square=s.square),a):v.bool(s)?(a.options.resize.enabled=s,a):a.options.resize})(this,i,t)},e.map.resize=Z,e.methodDict.resize="resizable",o.actions.resize=Z.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){(function(e){var n=e.iEvent,r=e.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var o=n,i=r.rect;r._rects={start:k({},i),corrected:k({},i),previous:k({},i),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},o.edges=r.prepared.edges,o.rect=r._rects.corrected,o.deltaRect=r._rects.delta}})(t),tn(t)},"interactions:action-move":function(t){(function(e){var n=e.iEvent,r=e.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var o=n,i=r.interactable.options.resize.invert,a=i==="reposition"||i==="negate",s=r.rect,c=r._rects,u=c.start,l=c.corrected,p=c.delta,h=c.previous;if(k(h,l),a){if(k(l,s),i==="reposition"){if(l.top>l.bottom){var y=l.top;l.top=l.bottom,l.bottom=y}if(l.left>l.right){var m=l.left;l.left=l.right,l.right=m}}}else l.top=Math.min(s.top,u.bottom),l.bottom=Math.max(s.bottom,u.top),l.left=Math.min(s.left,u.right),l.right=Math.max(s.right,u.left);for(var b in l.width=l.right-l.left,l.height=l.bottom-l.top,l)p[b]=l[b]-h[b];o.edges=r.prepared.edges,o.rect=l,o.deltaRect=p}})(t),tn(t)},"interactions:action-end":function(t){var e=t.iEvent,n=t.interaction;if(n.prepared.name==="resize"&&n.prepared.edges){var r=e;r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}},"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.element,o=t.rect,i=t.buttons;if(o){var a=k({},e.coords.cur.page),s=n.options.resize;if(s&&s.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||(i&s.mouseButtons)!=0)){if(v.object(s.edges)){var c={left:!1,right:!1,top:!1,bottom:!1};for(var u in c)c[u]=wr(u,s.edges[u],a,e._latestPointer.eventTarget,r,o,s.margin||Z.defaultMargin);c.left=c.left&&!c.right,c.top=c.top&&!c.bottom,(c.left||c.right||c.top||c.bottom)&&(t.action={name:"resize",edges:c})}else{var l=s.axis!=="y"&&a.x>o.right-Z.defaultMargin,p=s.axis!=="x"&&a.y>o.bottom-Z.defaultMargin;(l||p)&&(t.action={name:"resize",axes:(l?"x":"")+(p?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var e=t.edges,n=t.axis,r=t.name,o=Z.cursors,i=null;if(n)i=o[r+n];else if(e){for(var a="",s=0,c=["top","bottom","left","right"];s<c.length;s++){var u=c[s];e[u]&&(a+=u)}i=o[a]}return i},filterEventType:function(t){return t.search("resize")===0},defaultMargin:null},Er=Z,Sr={id:"actions",install:function(t){t.usePlugin(xr),t.usePlugin(Er),t.usePlugin(At),t.usePlugin(br)}},nn=0,re={request:function(t){return Q(t)},cancel:function(t){return ue(t)},init:function(t){if(Q=t.requestAnimationFrame,ue=t.cancelAnimationFrame,!Q)for(var e=["ms","moz","webkit","o"],n=0;n<e.length;n++){var r=e[n];Q=t["".concat(r,"RequestAnimationFrame")],ue=t["".concat(r,"CancelAnimationFrame")]||t["".concat(r,"CancelRequestAnimationFrame")]}Q=Q&&Q.bind(t),ue=ue&&ue.bind(t),Q||(Q=function(o){var i=Date.now(),a=Math.max(0,16-(i-nn)),s=t.setTimeout((function(){o(i+a)}),a);return nn=i+a,s},ue=function(o){return clearTimeout(o)})}},C={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(t){C.isScrolling=!0,re.cancel(C.i),t.autoScroll=C,C.interaction=t,C.prevTime=C.now(),C.i=re.request(C.scroll)},stop:function(){C.isScrolling=!1,C.interaction&&(C.interaction.autoScroll=null),re.cancel(C.i)},scroll:function(){var t=C.interaction,e=t.interactable,n=t.element,r=t.prepared.name,o=e.options[r].autoScroll,i=rn(o.container,e,n),a=C.now(),s=(a-C.prevTime)/1e3,c=o.speed*s;if(c>=1){var u={x:C.x*c,y:C.y*c};if(u.x||u.y){var l=on(i);v.window(i)?i.scrollBy(u.x,u.y):i&&(i.scrollLeft+=u.x,i.scrollTop+=u.y);var p=on(i),h={x:p.x-l.x,y:p.y-l.y};(h.x||h.y)&&e.fire({type:"autoscroll",target:n,interactable:e,delta:h,interaction:t,container:i})}C.prevTime=a}C.isScrolling&&(re.cancel(C.i),C.i=re.request(C.scroll))},check:function(t,e){var n;return(n=t.options[e].autoScroll)==null?void 0:n.enabled},onInteractionMove:function(t){var e=t.interaction,n=t.pointer;if(e.interacting()&&C.check(e.interactable,e.prepared.name))if(e.simulation)C.x=C.y=0;else{var r,o,i,a,s=e.interactable,c=e.element,u=e.prepared.name,l=s.options[u].autoScroll,p=rn(l.container,s,c);if(v.window(p))a=n.clientX<C.margin,r=n.clientY<C.margin,o=n.clientX>p.innerWidth-C.margin,i=n.clientY>p.innerHeight-C.margin;else{var h=et(p);a=n.clientX<h.left+C.margin,r=n.clientY<h.top+C.margin,o=n.clientX>h.right-C.margin,i=n.clientY>h.bottom-C.margin}C.x=o?1:a?-1:0,C.y=i?1:r?-1:0,C.isScrolling||(C.margin=l.margin,C.speed=l.speed,C.start(e))}}};function rn(t,e,n){return(v.string(t)?Nt(t,e,n):t)||K(n)}function on(t){return v.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var Tr={id:"auto-scroll",install:function(t){var e=t.defaults,n=t.actions;t.autoScroll=C,C.now=function(){return t.now()},n.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=C.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,C.stop(),C.interaction&&(C.interaction=null)},"interactions:stop":C.stop,"interactions:action-move":function(t){return C.onInteractionMove(t)}}},kr=Tr;function _e(t,e){var n=!1;return function(){return n||(se.console.warn(e),n=!0),t.apply(this,arguments)}}function dt(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t}function Mr(t){return v.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function _r(t){return v.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Cr={id:"auto-start/interactableMethods",install:function(t){var e=t.Interactable;e.prototype.getAction=function(n,r,o,i){var a=(function(s,c,u,l,p){var h=s.getRect(l),y=c.buttons||{0:1,1:4,3:8,4:16}[c.button],m={action:null,interactable:s,interaction:u,element:l,rect:h,buttons:y};return p.fire("auto-start:check",m),m.action})(this,r,o,i,t);return this.options.actionChecker?this.options.actionChecker(n,r,a,this,i,o):a},e.prototype.ignoreFrom=_e((function(n){return this._backCompatOption("ignoreFrom",n)}),"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=_e((function(n){return this._backCompatOption("allowFrom",n)}),"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=_r,e.prototype.styleCursor=Mr}};function an(t,e,n,r,o){return e.testIgnoreAllow(e.options[t.name],n,r)&&e.options[t.name].enabled&&Ne(e,n,t,o)?t:null}function Pr(t,e,n,r,o,i,a){for(var s=0,c=r.length;s<c;s++){var u=r[s],l=o[s],p=u.getAction(e,n,t,l);if(p){var h=an(p,u,l,i,a);if(h)return{action:h,interactable:u,element:l}}}return{action:null,interactable:null,element:null}}function sn(t,e,n,r,o){var i=[],a=[],s=r;function c(l){i.push(l),a.push(s)}for(;v.element(s);){i=[],a=[],o.interactables.forEachMatch(s,c);var u=Pr(t,e,n,i,a,r,o);if(u.action&&!u.interactable.options[u.action.name].manualStart)return u;s=J(s)}return{action:null,interactable:null,element:null}}function cn(t,e,n){var r=e.action,o=e.interactable,i=e.element;r=r||{name:null},t.interactable=o,t.element=i,dt(t.prepared,r),t.rect=o&&r.name?o.getRect(i):null,un(t,n),n.fire("autoStart:prepared",{interaction:t})}function Ne(t,e,n,r){var o=t.options,i=o[n.name].max,a=o[n.name].maxPerElement,s=r.autoStart.maxInteractions,c=0,u=0,l=0;if(!(i&&a&&s))return!1;for(var p=0,h=r.interactions.list;p<h.length;p++){var y=h[p],m=y.prepared.name;if(y.interacting()&&(++c>=s||y.interactable===t&&((u+=m===n.name?1:0)>=i||y.element===e&&(l++,m===n.name&&l>=a))))return!1}return s>0}function ln(t,e){return v.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function ft(t,e,n){var r=n.autoStart.cursorElement;r&&r!==t&&(r.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,n.autoStart.cursorElement=e?t:null}function un(t,e){var n=t.interactable,r=t.element,o=t.prepared;if(t.pointerType==="mouse"&&n&&n.options.styleCursor){var i="";if(o.name){var a=n.options[o.name].cursorChecker;i=v.func(a)?a(o,n,r,t._interacting):e.actions.map[o.name].getCursor(o)}ft(t.element,i||"",e)}else e.autoStart.cursorElement&&ft(e.autoStart.cursorElement,"",e)}var Or={id:"auto-start/base",before:["actions"],install:function(t){var e=t.interactStatic,n=t.defaults;t.usePlugin(Cr),n.base.actionChecker=null,n.base.styleCursor=!0,k(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=function(r){return ln(r,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:Ne,cursorElement:null}},listeners:{"interactions:down":function(t,e){var n=t.interaction,r=t.pointer,o=t.event,i=t.eventTarget;n.interacting()||cn(n,sn(n,r,o,i,e),e)},"interactions:move":function(t,e){(function(n,r){var o=n.interaction,i=n.pointer,a=n.event,s=n.eventTarget;o.pointerType!=="mouse"||o.pointerIsDown||o.interacting()||cn(o,sn(o,i,a,s,r),r)})(t,e),(function(n,r){var o=n.interaction;if(o.pointerIsDown&&!o.interacting()&&o.pointerWasMoved&&o.prepared.name){r.fire("autoStart:before-start",n);var i=o.interactable,a=o.prepared.name;a&&i&&(i.options[a].manualStart||!Ne(i,o.element,o.prepared,r)?o.stop():(o.start(o.prepared,i,o.element),un(o,r)))}})(t,e)},"interactions:stop":function(t,e){var n=t.interaction,r=n.interactable;r&&r.options.styleCursor&&ft(n.element,"",e)}},maxInteractions:ln,withinInteractionLimit:Ne,validateAction:an},ht=Or,Ir={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,e){var n=t.interaction,r=t.eventTarget,o=t.dx,i=t.dy;if(n.prepared.name==="drag"){var a=Math.abs(o),s=Math.abs(i),c=n.interactable.options.drag,u=c.startAxis,l=a>s?"x":a<s?"y":"xy";if(n.prepared.axis=c.lockAxis==="start"?l[0]:c.lockAxis,l!=="xy"&&u!=="xy"&&u!==l){n.prepared.name=null;for(var p=r,h=function(m){if(m!==n.interactable){var b=n.interactable.options.drag;if(!b.manualStart&&m.testIgnoreAllow(b,p,r)){var S=m.getAction(n.downPointer,n.downEvent,n,p);if(S&&S.name==="drag"&&(function(E,T){if(!T)return!1;var P=T.options.drag.startAxis;return E==="xy"||P==="xy"||P===E})(l,m)&&ht.validateAction(S,m,p,r,e))return m}}};v.element(p);){var y=e.interactables.forEachMatch(p,h);if(y){n.prepared.name="drag",n.interactable=y,n.element=p;break}p=J(p)}}}}}};function vt(t){var e=t.prepared&&t.prepared.name;if(!e)return null;var n=t.interactable.options;return n[e].hold||n[e].delay}var Dr={id:"auto-start/hold",install:function(t){var e=t.defaults;t.usePlugin(ht),e.perAction.hold=0,e.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var e=t.interaction,n=vt(e);n>0&&(e.autoStartHoldTimer=setTimeout((function(){e.start(e.prepared,e.interactable,e.element)}),n))},"interactions:move":function(t){var e=t.interaction,n=t.duplicate;e.autoStartHoldTimer&&e.pointerWasMoved&&!n&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var e=t.interaction;vt(e)>0&&(e.prepared.name=null)}},getHoldDuration:vt},zr=Dr,Rr={id:"auto-start",install:function(t){t.usePlugin(ht),t.usePlugin(zr),t.usePlugin(Ir)}},Ar=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):v.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function jr(t){var e=t.interaction,n=t.event;e.interactable&&e.interactable.checkAndPreventDefault(n)}var pn={id:"core/interactablePreventDefault",install:function(t){var e=t.Interactable;e.prototype.preventDefault=Ar,e.prototype.checkAndPreventDefault=function(n){return(function(r,o,i){var a=r.options.preventDefault;if(a!=="never")if(a!=="always"){if(o.events.supportsPassive&&/^touch(start|move)$/.test(i.type)){var s=K(i.target).document,c=o.getDocOptions(s);if(!c||!c.events||c.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(i.type)||v.element(i.target)&&ne(i.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||i.preventDefault()}else i.preventDefault()})(this,t,n)},t.interactions.docEvents.push({type:"dragstart",listener:function(n){for(var r=0,o=t.interactions.list;r<o.length;r++){var i=o[r];if(i.element&&(i.element===n.target||ce(i.element,n.target)))return void i.interactable.checkAndPreventDefault(n)}}})},listeners:["down","move","up","cancel"].reduce((function(t,e){return t["interactions:".concat(e)]=jr,t}),{})};function Ye(t,e){if(e.phaselessTypes[t])return!0;for(var n in e.map)if(t.indexOf(n)===0&&t.substr(n.length)in e.phases)return!0;return!1}function ge(t){var e={};for(var n in t){var r=t[n];v.plainObject(r)?e[n]=ge(r):v.array(r)?e[n]=Kt(r):e[n]=r}return e}var gt=(function(){function t(e){M(this,t),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=e,this.result=Ve(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return D(t,[{key:"start",value:function(e,n){var r,o,i=e.phase,a=this.interaction,s=(function(u){var l=u.interactable.options[u.prepared.name],p=l.modifiers;return p&&p.length?p:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map((function(h){var y=l[h];return y&&y.enabled&&{options:y,methods:y._methods}})).filter((function(h){return!!h}))})(a);this.prepareStates(s),this.startEdges=k({},a.edges),this.edges=k({},this.startEdges),this.startOffset=(r=a.rect,o=n,r?{left:o.x-r.left,top:o.y-r.top,right:r.right-o.x,bottom:r.bottom-o.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var c=this.fillArg({phase:i,pageCoords:n,preEnd:!1});return this.result=Ve(),this.startAll(c),this.result=this.setAll(c)}},{key:"fillArg",value:function(e){var n=this.interaction;return e.interaction=n,e.interactable=n.interactable,e.element=n.element,e.rect||(e.rect=n.rect),e.edges||(e.edges=this.startEdges),e.startOffset=this.startOffset,e}},{key:"startAll",value:function(e){for(var n=0,r=this.states;n<r.length;n++){var o=r[n];o.methods.start&&(e.state=o,o.methods.start(e))}}},{key:"setAll",value:function(e){var n=e.phase,r=e.preEnd,o=e.skipModifiers,i=e.rect,a=e.edges;e.coords=k({},e.pageCoords),e.rect=k({},i),e.edges=k({},a);for(var s=o?this.states.slice(o):this.states,c=Ve(e.coords,e.rect),u=0;u<s.length;u++){var l,p=s[u],h=p.options,y=k({},e.coords),m=null;(l=p.methods)!=null&&l.set&&this.shouldDo(h,r,n)&&(e.state=p,m=p.methods.set(e),je(e.edges,e.rect,{x:e.coords.x-y.x,y:e.coords.y-y.y})),c.eventProps.push(m)}k(this.edges,e.edges),c.delta.x=e.coords.x-e.pageCoords.x,c.delta.y=e.coords.y-e.pageCoords.y,c.rectDelta.left=e.rect.left-i.left,c.rectDelta.right=e.rect.right-i.right,c.rectDelta.top=e.rect.top-i.top,c.rectDelta.bottom=e.rect.bottom-i.bottom;var b=this.result.coords,S=this.result.rect;if(b&&S){var E=c.rect.left!==S.left||c.rect.right!==S.right||c.rect.top!==S.top||c.rect.bottom!==S.bottom;c.changed=E||b.x!==c.coords.x||b.y!==c.coords.y}return c}},{key:"applyToInteraction",value:function(e){var n=this.interaction,r=e.phase,o=n.coords.cur,i=n.coords.start,a=this.result,s=this.startDelta,c=a.delta;r==="start"&&k(this.startDelta,a.delta);for(var u=0,l=[[i,s],[o,c]];u<l.length;u++){var p=l[u],h=p[0],y=p[1];h.page.x+=y.x,h.page.y+=y.y,h.client.x+=y.x,h.client.y+=y.y}var m=this.result.rectDelta,b=e.rect||n.rect;b.left+=m.left,b.right+=m.right,b.top+=m.top,b.bottom+=m.bottom,b.width=b.right-b.left,b.height=b.bottom-b.top}},{key:"setAndApply",value:function(e){var n=this.interaction,r=e.phase,o=e.preEnd,i=e.skipModifiers,a=this.setAll(this.fillArg({preEnd:o,phase:r,pageCoords:e.modifiedCoords||n.coords.cur.page}));if(this.result=a,!a.changed&&(!i||i<this.states.length)&&n.interacting())return!1;if(e.modifiedCoords){var s=n.coords.cur.page,c={x:e.modifiedCoords.x-s.x,y:e.modifiedCoords.y-s.y};a.coords.x+=c.x,a.coords.y+=c.y,a.delta.x+=c.x,a.delta.y+=c.y}this.applyToInteraction(e)}},{key:"beforeEnd",value:function(e){var n=e.interaction,r=e.event,o=this.states;if(o&&o.length){for(var i=!1,a=0;a<o.length;a++){var s=o[a];e.state=s;var c=s.options,u=s.methods,l=u.beforeEnd&&u.beforeEnd(e);if(l)return this.endResult=l,!1;i=i||!i&&this.shouldDo(c,!0,e.phase,!0)}i&&n.move({event:r,preEnd:!0})}}},{key:"stop",value:function(e){var n=e.interaction;if(this.states&&this.states.length){var r=k({states:this.states,interactable:n.interactable,element:n.element,rect:null},e);this.fillArg(r);for(var o=0,i=this.states;o<i.length;o++){var a=i[o];r.state=a,a.methods.stop&&a.methods.stop(r)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(e){this.states=[];for(var n=0;n<e.length;n++){var r=e[n],o=r.options,i=r.methods,a=r.name;this.states.push({options:o,methods:i,index:n,name:a})}return this.states}},{key:"restoreInteractionCoords",value:function(e){var n=e.interaction,r=n.coords,o=n.rect,i=n.modification;if(i.result){for(var a=i.startDelta,s=i.result,c=s.delta,u=s.rectDelta,l=0,p=[[r.start,a],[r.cur,c]];l<p.length;l++){var h=p[l],y=h[0],m=h[1];y.page.x-=m.x,y.page.y-=m.y,y.client.x-=m.x,y.client.y-=m.y}o.left-=u.left,o.right-=u.right,o.top-=u.top,o.bottom-=u.bottom}}},{key:"shouldDo",value:function(e,n,r,o){return!(!e||e.enabled===!1||o&&!e.endOnly||e.endOnly&&!n||r==="start"&&!e.setStart)}},{key:"copyFrom",value:function(e){this.startOffset=e.startOffset,this.startDelta=e.startDelta,this.startEdges=e.startEdges,this.edges=e.edges,this.states=e.states.map((function(n){return ge(n)})),this.result=Ve(k({},e.result.coords),k({},e.result.rect))}},{key:"destroy",value:function(){for(var e in this)this[e]=null}}]),t})();function Ve(t,e){return{rect:e,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function oe(t,e){var n=t.defaults,r={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},o=function(i){var a=i||{};for(var s in a.enabled=a.enabled!==!1,n)s in a||(a[s]=n[s]);var c={options:a,methods:r,name:e,enable:function(){return a.enabled=!0,c},disable:function(){return a.enabled=!1,c}};return c};return e&&typeof e=="string"&&(o._defaults=n,o._methods=r),o}function Ce(t){var e=t.iEvent,n=t.interaction.modification.result;n&&(e.modifiers=n.eventProps)}var Fr={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var e=t.interaction;e.modification=new gt(e)},"interactions:before-action-start":function(t){var e=t.interaction,n=t.interaction.modification;n.start(t,e.coords.start.page),e.edges=n.edges,n.applyToInteraction(t)},"interactions:before-action-move":function(t){var e=t.interaction,n=e.modification,r=n.setAndApply(t);return e.edges=n.edges,r},"interactions:before-action-end":function(t){var e=t.interaction,n=e.modification,r=n.beforeEnd(t);return e.edges=n.startEdges,r},"interactions:action-start":Ce,"interactions:action-move":Ce,"interactions:action-end":Ce,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},dn=Fr,fn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},mt=(function(t){F(n,t);var e=B(n);function n(r,o,i,a,s,c,u){var l;M(this,n),(l=e.call(this,r)).relatedTarget=null,l.screenX=void 0,l.screenY=void 0,l.button=void 0,l.buttons=void 0,l.ctrlKey=void 0,l.shiftKey=void 0,l.altKey=void 0,l.metaKey=void 0,l.page=void 0,l.client=void 0,l.delta=void 0,l.rect=void 0,l.x0=void 0,l.y0=void 0,l.t0=void 0,l.dt=void 0,l.duration=void 0,l.clientX0=void 0,l.clientY0=void 0,l.velocity=void 0,l.speed=void 0,l.swipe=void 0,l.axes=void 0,l.preEnd=void 0,s=s||r.element;var p=r.interactable,h=(p&&p.options||fn).deltaSource,y=Ee(p,s,i),m=a==="start",b=a==="end",S=m?Y(l):r.prevEvent,E=m?r.coords.start:b?{page:S.page,client:S.client,timeStamp:r.coords.cur.timeStamp}:r.coords.cur;return l.page=k({},E.page),l.client=k({},E.client),l.rect=k({},r.rect),l.timeStamp=E.timeStamp,b||(l.page.x-=y.x,l.page.y-=y.y,l.client.x-=y.x,l.client.y-=y.y),l.ctrlKey=o.ctrlKey,l.altKey=o.altKey,l.shiftKey=o.shiftKey,l.metaKey=o.metaKey,l.button=o.button,l.buttons=o.buttons,l.target=s,l.currentTarget=s,l.preEnd=c,l.type=u||i+(a||""),l.interactable=p,l.t0=m?r.pointers[r.pointers.length-1].downTime:S.t0,l.x0=r.coords.start.page.x-y.x,l.y0=r.coords.start.page.y-y.y,l.clientX0=r.coords.start.client.x-y.x,l.clientY0=r.coords.start.client.y-y.y,l.delta=m||b?{x:0,y:0}:{x:l[h].x-S[h].x,y:l[h].y-S[h].y},l.dt=r.coords.delta.timeStamp,l.duration=l.timeStamp-l.t0,l.velocity=k({},r.coords.velocity[h]),l.speed=Se(l.velocity.x,l.velocity.y),l.swipe=b||a==="inertiastart"?l.getSwipe():null,l}return D(n,[{key:"getSwipe",value:function(){var r=this._interaction;if(r.prevEvent.speed<600||this.timeStamp-r.prevEvent.timeStamp>150)return null;var o=180*Math.atan2(r.prevEvent.velocityY,r.prevEvent.velocityX)/Math.PI;o<0&&(o+=360);var i=112.5<=o&&o<247.5,a=202.5<=o&&o<337.5;return{up:a,down:!a&&22.5<=o&&o<157.5,left:i,right:!i&&(292.5<=o||o<67.5),angle:o,speed:r.prevEvent.speed,velocity:{x:r.prevEvent.velocityX,y:r.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),n})(Be);Object.defineProperties(mt.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var Lr=D((function t(e,n,r,o,i){M(this,t),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=e,this.pointer=n,this.event=r,this.downTime=o,this.downTarget=i})),Hr=(function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t})({}),hn=(function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t})({}),Br=0,Nr=(function(){function t(e){var n=this,r=e.pointerType,o=e.scopeFire;M(this,t),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=_e((function(l){this.move(l)}),"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=Br++,this._scopeFire=o,this.pointerType=r;var i=this;this._proxy={};var a=function(l){Object.defineProperty(n._proxy,l,{get:function(){return i[l]}})};for(var s in Hr)a(s);var c=function(l){Object.defineProperty(n._proxy,l,{value:function(){return i[l].apply(i,arguments)}})};for(var u in hn)c(u);this._scopeFire("interactions:new",{interaction:this})}return D(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(e,n,r){var o=this.updatePointer(e,n,r,!0),i=this.pointers[o];this._scopeFire("interactions:down",{pointer:e,event:n,eventTarget:r,pointerIndex:o,pointerInfo:i,type:"down",interaction:this})}},{key:"start",value:function(e,n,r){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(e.name==="gesture"?2:1)||!n.options[e.name].enabled)&&(dt(this.prepared,e),this.interactable=n,this.element=r,this.rect=n.getRect(r),this.edges=this.prepared.edges?k({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(e,n,r){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(e,n,r,!1);var o,i,a=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(o=this.coords.cur.client.x-this.coords.start.client.x,i=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Se(o,i)>this.pointerMoveTolerance);var s,c,u,l=this.getPointerIndex(e),p={pointer:e,pointerIndex:l,pointerInfo:this.pointers[l],event:n,type:"move",eventTarget:r,dx:o,dy:i,duplicate:a,interaction:this};a||(s=this.coords.velocity,c=this.coords.delta,u=Math.max(c.timeStamp/1e3,.001),s.page.x=c.page.x/u,s.page.y=c.page.y/u,s.client.x=c.client.x/u,s.client.y=c.client.y/u,s.timeStamp=u),this._scopeFire("interactions:move",p),a||this.simulation||(this.interacting()&&(p.type=null,this.move(p)),this.pointerWasMoved&&Le(this.coords.prev,this.coords.cur))}},{key:"move",value:function(e){e&&e.event||Vt(this.coords.delta),(e=k({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},e||{})).phase="move",this._doPhase(e)}},{key:"pointerUp",value:function(e,n,r,o){var i=this.getPointerIndex(e);i===-1&&(i=this.updatePointer(e,n,r,!1));var a=/cancel$/i.test(n.type)?"cancel":"up";this._scopeFire("interactions:".concat(a),{pointer:e,pointerIndex:i,pointerInfo:this.pointers[i],event:n,eventTarget:r,type:a,curEventTarget:o,interaction:this}),this.simulation||this.end(n),this.removePointer(e,n)}},{key:"documentBlur",value:function(e){this.end(e),this._scopeFire("interactions:blur",{event:e,type:"blur",interaction:this})}},{key:"end",value:function(e){var n;this._ending=!0,e=e||this._latestPointer.event,this.interacting()&&(n=this._doPhase({event:e,interaction:this,phase:"end"})),this._ending=!1,n===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(e){var n=Te(e);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:ke(this.pointers,(function(r){return r.id===n}))}},{key:"getPointerInfo",value:function(e){return this.pointers[this.getPointerIndex(e)]}},{key:"updatePointer",value:function(e,n,r,o){var i,a,s,c=Te(e),u=this.getPointerIndex(e),l=this.pointers[u];return o=o!==!1&&(o||/(down|start)$/i.test(n.type)),l?l.pointer=e:(l=new Lr(c,e,n,null,null),u=this.pointers.length,this.pointers.push(l)),yr(this.coords.cur,this.pointers.map((function(p){return p.pointer})),this._now()),i=this.coords.delta,a=this.coords.prev,s=this.coords.cur,i.page.x=s.page.x-a.page.x,i.page.y=s.page.y-a.page.y,i.client.x=s.client.x-a.client.x,i.client.y=s.client.y-a.client.y,i.timeStamp=s.timeStamp-a.timeStamp,o&&(this.pointerIsDown=!0,l.downTime=this.coords.cur.timeStamp,l.downTarget=r,Fe(this.downPointer,e),this.interacting()||(Le(this.coords.start,this.coords.cur),Le(this.coords.prev,this.coords.cur),this.downEvent=n,this.pointerWasMoved=!1)),this._updateLatestPointer(e,n,r),this._scopeFire("interactions:update-pointer",{pointer:e,event:n,eventTarget:r,down:o,pointerInfo:l,pointerIndex:u,interaction:this}),u}},{key:"removePointer",value:function(e,n){var r=this.getPointerIndex(e);if(r!==-1){var o=this.pointers[r];this._scopeFire("interactions:remove-pointer",{pointer:e,event:n,eventTarget:null,pointerIndex:r,pointerInfo:o,interaction:this}),this.pointers.splice(r,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(e,n,r){this._latestPointer.pointer=e,this._latestPointer.event=n,this._latestPointer.eventTarget=r}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(e,n,r,o){return new mt(this,e,this.prepared.name,n,this.element,r,o)}},{key:"_fireEvent",value:function(e){var n;(n=this.interactable)==null||n.fire(e),(!this.prevEvent||e.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=e)}},{key:"_doPhase",value:function(e){var n=e.event,r=e.phase,o=e.preEnd,i=e.type,a=this.rect;if(a&&r==="move"&&(je(this.edges,a,this.coords.delta[this.interactable.options.deltaSource]),a.width=a.right-a.left,a.height=a.bottom-a.top),this._scopeFire("interactions:before-action-".concat(r),e)===!1)return!1;var s=e.iEvent=this._createPreparedEvent(n,r,o,i);return this._scopeFire("interactions:action-".concat(r),e),r==="start"&&(this.prevEvent=s),this._fireEvent(s),this._scopeFire("interactions:after-action-".concat(r),e),!0}},{key:"_now",value:function(){return Date.now()}}]),t})();function vn(t){gn(t.interaction)}function gn(t){if(!(function(n){return!(!n.offset.pending.x&&!n.offset.pending.y)})(t))return!1;var e=t.offset.pending;return yt(t.coords.cur,e),yt(t.coords.delta,e),je(t.edges,t.rect,e),e.x=0,e.y=0,!0}function Yr(t){var e=t.x,n=t.y;this.offset.pending.x+=e,this.offset.pending.y+=n,this.offset.total.x+=e,this.offset.total.y+=n}function yt(t,e){var n=t.page,r=t.client,o=e.x,i=e.y;n.x+=o,n.y+=i,r.x+=o,r.y+=i}hn.offsetBy="";var Vr={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=Yr},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return(function(e){e.pointerIsDown&&(yt(e.coords.cur,e.offset.total),e.offset.pending.x=0,e.offset.pending.y=0)})(t.interaction)},"interactions:before-action-start":vn,"interactions:before-action-move":vn,"interactions:before-action-end":function(t){var e=t.interaction;if(gn(e))return e.move({offset:!0}),e.end(),!1},"interactions:stop":function(t){var e=t.interaction;e.offset.total.x=0,e.offset.total.y=0,e.offset.pending.x=0,e.offset.pending.y=0}}},mn=Vr,Wr=(function(){function t(e){M(this,t),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=e}return D(t,[{key:"start",value:function(e){var n=this.interaction,r=We(n);if(!r||!r.enabled)return!1;var o=n.coords.velocity.client,i=Se(o.x,o.y),a=this.modification||(this.modification=new gt(n));if(a.copyFrom(n.modification),this.t0=n._now(),this.allowResume=r.allowResume,this.v0=i,this.currentOffset={x:0,y:0},this.startCoords=n.coords.cur.page,this.modifierArg=a.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-n.coords.cur.timeStamp<50&&i>r.minSpeed&&i>r.endSpeed)this.startInertia();else{if(a.result=a.setAll(this.modifierArg),!a.result.changed)return!1;this.startSmoothEnd()}return n.modification.result.rect=null,n.offsetBy(this.targetOffset),n._doPhase({interaction:n,event:e,phase:"inertiastart"}),n.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),n.modification.result.rect=null,this.active=!0,n.simulation=this,!0}},{key:"startInertia",value:function(){var e=this,n=this.interaction.coords.velocity.client,r=We(this.interaction),o=r.resistance,i=-Math.log(r.endSpeed/this.v0)/o;this.targetOffset={x:(n.x-i)/o,y:(n.y-i)/o},this.te=i,this.lambda_v0=o/this.v0,this.one_ve_v0=1-r.endSpeed/this.v0;var a=this.modification,s=this.modifierArg;s.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},a.result=a.setAll(s),a.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+a.result.delta.x,y:this.targetOffset.y+a.result.delta.y}),this.onNextFrame((function(){return e.inertiaTick()}))}},{key:"startSmoothEnd",value:function(){var e=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame((function(){return e.smoothEndTick()}))}},{key:"onNextFrame",value:function(e){var n=this;this.timeout=re.request((function(){n.active&&e()}))}},{key:"inertiaTick",value:function(){var e,n,r,o,i,a,s,c=this,u=this.interaction,l=We(u).resistance,p=(u._now()-this.t0)/1e3;if(p<this.te){var h,y=1-(Math.exp(-l*p)-this.lambda_v0)/this.one_ve_v0;this.isModified?(e=0,n=0,r=this.targetOffset.x,o=this.targetOffset.y,i=this.modifiedOffset.x,a=this.modifiedOffset.y,h={x:yn(s=y,e,r,i),y:yn(s,n,o,a)}):h={x:this.targetOffset.x*y,y:this.targetOffset.y*y};var m={x:h.x-this.currentOffset.x,y:h.y-this.currentOffset.y};this.currentOffset.x+=m.x,this.currentOffset.y+=m.y,u.offsetBy(m),u.move(),this.onNextFrame((function(){return c.inertiaTick()}))}else u.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var e=this,n=this.interaction,r=n._now()-this.t0,o=We(n).smoothEndDuration;if(r<o){var i={x:bn(r,0,this.targetOffset.x,o),y:bn(r,0,this.targetOffset.y,o)},a={x:i.x-this.currentOffset.x,y:i.y-this.currentOffset.y};this.currentOffset.x+=a.x,this.currentOffset.y+=a.y,n.offsetBy(a),n.move({skipModifiers:this.modifierCount}),this.onNextFrame((function(){return e.smoothEndTick()}))}else n.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(e){var n=e.pointer,r=e.event,o=e.eventTarget,i=this.interaction;i.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),i.updatePointer(n,r,o,!0),i._doPhase({interaction:i,event:r,phase:"resume"}),Le(i.coords.prev,i.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,re.cancel(this.timeout)}}]),t})();function We(t){var e=t.interactable,n=t.prepared;return e&&e.options&&n.name&&e.options[n.name].inertia}var Xr={id:"inertia",before:["modifiers","actions"],install:function(t){var e=t.defaults;t.usePlugin(mn),t.usePlugin(dn),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,e.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var e=t.interaction;e.inertia=new Wr(e)},"interactions:before-action-end":function(t){var e=t.interaction,n=t.event;return(!e._interacting||e.simulation||!e.inertia.start(n))&&null},"interactions:down":function(t){var e=t.interaction,n=t.eventTarget,r=e.inertia;if(r.active)for(var o=n;v.element(o);){if(o===e.element){r.resume(t);break}o=J(o)}},"interactions:stop":function(t){var e=t.interaction.inertia;e.active&&e.stop()},"interactions:before-action-resume":function(t){var e=t.interaction.modification;e.stop(t),e.start(t,t.interaction.coords.cur.page),e.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":Ce,"interactions:action-inertiastart":Ce,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function yn(t,e,n,r){var o=1-t;return o*o*e+2*o*t*n+t*t*r}function bn(t,e,n,r){return-n*(t/=r)*(t-2)+e}var qr=Xr;function xn(t,e){for(var n=0;n<e.length;n++){var r=e[n];if(t.immediatePropagationStopped)break;r(t)}}var wn=(function(){function t(e){M(this,t),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=k({},e||{})}return D(t,[{key:"fire",value:function(e){var n,r=this.global;(n=this.types[e.type])&&xn(e,n),!e.propagationStopped&&r&&(n=r[e.type])&&xn(e,n)}},{key:"on",value:function(e,n){var r=le(e,n);for(e in r)this.types[e]=$t(this.types[e]||[],r[e])}},{key:"off",value:function(e,n){var r=le(e,n);for(e in r){var o=this.types[e];if(o&&o.length)for(var i=0,a=r[e];i<a.length;i++){var s=a[i],c=o.indexOf(s);c!==-1&&o.splice(c,1)}}}},{key:"getRect",value:function(e){return null}}]),t})(),Gr=(function(){function t(e){M(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=e,Fe(this,e)}return D(t,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),t})();function Pe(t){return v.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function Xe(t,e){return t===e||(typeof t=="boolean"?!!e.capture===t&&!e.passive:!!t.capture==!!e.capture&&!!t.passive==!!e.passive)}var Ur={id:"events",install:function(t){var e,n=[],r={},o=[],i={add:a,remove:s,addDelegate:function(l,p,h,y,m){var b=Pe(m);if(!r[h]){r[h]=[];for(var S=0;S<o.length;S++){var E=o[S];a(E,h,c),a(E,h,u,!0)}}var T=r[h],P=Me(T,(function(I){return I.selector===l&&I.context===p}));P||(P={selector:l,context:p,listeners:[]},T.push(P)),P.listeners.push({func:y,options:b})},removeDelegate:function(l,p,h,y,m){var b,S=Pe(m),E=r[h],T=!1;if(E)for(b=E.length-1;b>=0;b--){var P=E[b];if(P.selector===l&&P.context===p){for(var I=P.listeners,_=I.length-1;_>=0;_--){var O=I[_];if(O.func===y&&Xe(O.options,S)){I.splice(_,1),I.length||(E.splice(b,1),s(p,h,c),s(p,h,u,!0)),T=!0;break}}if(T)break}}},delegateListener:c,delegateUseCapture:u,delegatedEvents:r,documents:o,targets:n,supportsOptions:!1,supportsPassive:!1};function a(l,p,h,y){if(l.addEventListener){var m=Pe(y),b=Me(n,(function(S){return S.eventTarget===l}));b||(b={eventTarget:l,events:{}},n.push(b)),b.events[p]||(b.events[p]=[]),Me(b.events[p],(function(S){return S.func===h&&Xe(S.options,m)}))||(l.addEventListener(p,h,i.supportsOptions?m:m.capture),b.events[p].push({func:h,options:m}))}}function s(l,p,h,y){if(l.addEventListener&&l.removeEventListener){var m=ke(n,(function(H){return H.eventTarget===l})),b=n[m];if(b&&b.events)if(p!=="all"){var S=!1,E=b.events[p];if(E){if(h==="all"){for(var T=E.length-1;T>=0;T--){var P=E[T];s(l,p,P.func,P.options)}return}for(var I=Pe(y),_=0;_<E.length;_++){var O=E[_];if(O.func===h&&Xe(O.options,I)){l.removeEventListener(p,h,i.supportsOptions?I:I.capture),E.splice(_,1),E.length===0&&(delete b.events[p],S=!0);break}}}S&&!Object.keys(b.events).length&&n.splice(m,1)}else for(p in b.events)b.events.hasOwnProperty(p)&&s(l,p,"all")}}function c(l,p){for(var h=Pe(p),y=new Gr(l),m=r[l.type],b=Ut(l)[0],S=b;v.element(S);){for(var E=0;E<m.length;E++){var T=m[E],P=T.selector,I=T.context;if(ne(S,P)&&ce(I,b)&&ce(I,S)){var _=T.listeners;y.currentTarget=S;for(var O=0;O<_.length;O++){var H=_[O];Xe(H.options,h)&&H.func(y)}}}S=J(S)}}function u(l){return c(l,!0)}return(e=t.document)==null||e.createElement("div").addEventListener("test",null,{get capture(){return i.supportsOptions=!0},get passive(){return i.supportsPassive=!0}}),t.events=i,i}},bt={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var e=0,n=bt.methodOrder;e<n.length;e++){var r=n[e],o=bt[r](t);if(o)return o}return null},simulationResume:function(t){var e=t.pointerType,n=t.eventType,r=t.eventTarget,o=t.scope;if(!/down|start/i.test(n))return null;for(var i=0,a=o.interactions.list;i<a.length;i++){var s=a[i],c=r;if(s.simulation&&s.simulation.allowResume&&s.pointerType===e)for(;c;){if(c===s.element)return s;c=J(c)}}return null},mouseOrPen:function(t){var e,n=t.pointerId,r=t.pointerType,o=t.eventType,i=t.scope;if(r!=="mouse"&&r!=="pen")return null;for(var a=0,s=i.interactions.list;a<s.length;a++){var c=s[a];if(c.pointerType===r){if(c.simulation&&!En(c,n))continue;if(c.interacting())return c;e||(e=c)}}if(e)return e;for(var u=0,l=i.interactions.list;u<l.length;u++){var p=l[u];if(!(p.pointerType!==r||/down/i.test(o)&&p.simulation))return p}return null},hasPointer:function(t){for(var e=t.pointerId,n=0,r=t.scope.interactions.list;n<r.length;n++){var o=r[n];if(En(o,e))return o}return null},idle:function(t){for(var e=t.pointerType,n=0,r=t.scope.interactions.list;n<r.length;n++){var o=r[n];if(o.pointers.length===1){var i=o.interactable;if(i&&(!i.options.gesture||!i.options.gesture.enabled))continue}else if(o.pointers.length>=2)continue;if(!o.interacting()&&e===o.pointerType)return o}return null}};function En(t,e){return t.pointers.some((function(n){return n.id===e}))}var $r=bt,xt=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Sn(t,e){return function(n){var r=e.interactions.list,o=Gt(n),i=Ut(n),a=i[0],s=i[1],c=[];if(/^touch/.test(n.type)){e.prevTouchTime=e.now();for(var u=0,l=n.changedTouches;u<l.length;u++){var p=l[u],h={pointer:p,pointerId:Te(p),pointerType:o,eventType:n.type,eventTarget:a,curEventTarget:s,scope:e},y=Tn(h);c.push([h.pointer,h.eventTarget,h.curEventTarget,y])}}else{var m=!1;if(!q.supportsPointerEvent&&/mouse/.test(n.type)){for(var b=0;b<r.length&&!m;b++)m=r[b].pointerType!=="mouse"&&r[b].pointerIsDown;m=m||e.now()-e.prevTouchTime<500||n.timeStamp===0}if(!m){var S={pointer:n,pointerId:Te(n),pointerType:o,eventType:n.type,curEventTarget:s,eventTarget:a,scope:e},E=Tn(S);c.push([S.pointer,S.eventTarget,S.curEventTarget,E])}}for(var T=0;T<c.length;T++){var P=c[T],I=P[0],_=P[1],O=P[2];P[3][t](I,n,_,O)}}}function Tn(t){var e=t.pointerType,n=t.scope,r={interaction:$r.search(t),searchDetails:t};return n.fire("interactions:find",r),r.interaction||n.interactions.new({pointerType:e})}function wt(t,e){var n=t.doc,r=t.scope,o=t.options,i=r.interactions.docEvents,a=r.events,s=a[e];for(var c in r.browser.isIOS&&!o.events&&(o.events={passive:!1}),a.delegatedEvents)s(n,c,a.delegateListener),s(n,c,a.delegateUseCapture,!0);for(var u=o&&o.events,l=0;l<i.length;l++){var p=i[l];s(n,p.type,p.listener,u)}}var Kr={id:"core/interactions",install:function(t){for(var e={},n=0;n<xt.length;n++){var r=xt[n];e[r]=Sn(r,t)}var o,i=q.pEventTypes;function a(){for(var s=0,c=t.interactions.list;s<c.length;s++){var u=c[s];if(u.pointerIsDown&&u.pointerType==="touch"&&!u._interacting)for(var l=function(){var y=h[p];t.documents.some((function(m){return ce(m.doc,y.downTarget)}))||u.removePointer(y.pointer,y.event)},p=0,h=u.pointers;p<h.length;p++)l()}}(o=j.PointerEvent?[{type:i.down,listener:a},{type:i.down,listener:e.pointerDown},{type:i.move,listener:e.pointerMove},{type:i.up,listener:e.pointerUp},{type:i.cancel,listener:e.pointerUp}]:[{type:"mousedown",listener:e.pointerDown},{type:"mousemove",listener:e.pointerMove},{type:"mouseup",listener:e.pointerUp},{type:"touchstart",listener:a},{type:"touchstart",listener:e.pointerDown},{type:"touchmove",listener:e.pointerMove},{type:"touchend",listener:e.pointerUp},{type:"touchcancel",listener:e.pointerUp}]).push({type:"blur",listener:function(s){for(var c=0,u=t.interactions.list;c<u.length;c++)u[c].documentBlur(s)}}),t.prevTouchTime=0,t.Interaction=(function(s){F(u,s);var c=B(u);function u(){return M(this,u),c.apply(this,arguments)}return D(u,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(l){t.interactions.pointerMoveTolerance=l}},{key:"_now",value:function(){return t.now()}}]),u})(Nr),t.interactions={list:[],new:function(s){s.scopeFire=function(u,l){return t.fire(u,l)};var c=new t.Interaction(s);return t.interactions.list.push(c),c},listeners:e,docEvents:o,pointerMoveTolerance:1},t.usePlugin(pn)},listeners:{"scope:add-document":function(t){return wt(t,"add")},"scope:remove-document":function(t){return wt(t,"remove")},"interactable:unset":function(t,e){for(var n=t.interactable,r=e.interactions.list.length-1;r>=0;r--){var o=e.interactions.list[r];o.interactable===n&&(o.stop(),e.fire("interactions:destroy",{interaction:o}),o.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(r,1))}}},onDocSignal:wt,doOnInteractions:Sn,methodNames:xt},Jr=Kr,ie=(function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t})(ie||{}),Qr=(function(){function t(e,n,r,o){M(this,t),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new wn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=n.actions,this.target=e,this._context=n.context||r,this._win=K(Bt(e)?this._context:e),this._doc=this._win.document,this._scopeEvents=o,this.set(n)}return D(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(e,n){return v.func(n.onstart)&&this.on("".concat(e,"start"),n.onstart),v.func(n.onmove)&&this.on("".concat(e,"move"),n.onmove),v.func(n.onend)&&this.on("".concat(e,"end"),n.onend),v.func(n.oninertiastart)&&this.on("".concat(e,"inertiastart"),n.oninertiastart),this}},{key:"updatePerActionListeners",value:function(e,n,r){var o,i=this,a=(o=this._actions.map[e])==null?void 0:o.filterEventType,s=function(c){return(a==null||a(c))&&Ye(c,i._actions)};(v.array(n)||v.object(n))&&this._onOff(ie.Off,e,n,void 0,s),(v.array(r)||v.object(r))&&this._onOff(ie.On,e,r,void 0,s)}},{key:"setPerAction",value:function(e,n){var r=this._defaults;for(var o in n){var i=o,a=this.options[e],s=n[i];i==="listeners"&&this.updatePerActionListeners(e,a.listeners,s),v.array(s)?a[i]=Kt(s):v.plainObject(s)?(a[i]=k(a[i]||{},ge(s)),v.object(r.perAction[i])&&"enabled"in r.perAction[i]&&(a[i].enabled=s.enabled!==!1)):v.bool(s)&&v.object(r.perAction[i])?a[i].enabled=s:a[i]=s}}},{key:"getRect",value:function(e){return e=e||(v.element(this.target)?this.target:null),v.string(this.target)&&(e=e||this._context.querySelector(this.target)),tt(e)}},{key:"rectChecker",value:function(e){var n=this;return v.func(e)?(this.getRect=function(r){var o=k({},e.apply(n,r));return"width"in o||(o.width=o.right-o.left,o.height=o.bottom-o.top),o},this):e===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(e,n){if(Bt(n)||v.object(n)){for(var r in this.options[e]=n,this._actions.map)this.options[r][e]=n;return this}return this.options[e]}},{key:"origin",value:function(e){return this._backCompatOption("origin",e)}},{key:"deltaSource",value:function(e){return e==="page"||e==="client"?(this.options.deltaSource=e,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var e=this.target;return v.string(e)?Array.from(this._context.querySelectorAll(e)):v.func(e)&&e.getAllElements?e.getAllElements():v.element(e)?[e]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(e){return this._context===e.ownerDocument||ce(this._context,e)}},{key:"testIgnoreAllow",value:function(e,n,r){return!this.testIgnore(e.ignoreFrom,n,r)&&this.testAllow(e.allowFrom,n,r)}},{key:"testAllow",value:function(e,n,r){return!e||!!v.element(r)&&(v.string(e)?Ze(r,e,n):!!v.element(e)&&ce(e,r))}},{key:"testIgnore",value:function(e,n,r){return!(!e||!v.element(r))&&(v.string(e)?Ze(r,e,n):!!v.element(e)&&ce(e,r))}},{key:"fire",value:function(e){return this.events.fire(e),this}},{key:"_onOff",value:function(e,n,r,o,i){v.object(n)&&!v.array(n)&&(o=r,r=null);var a=le(n,r,i);for(var s in a){s==="wheel"&&(s=q.wheelEvent);for(var c=0,u=a[s];c<u.length;c++){var l=u[c];Ye(s,this._actions)?this.events[e===ie.On?"on":"off"](s,l):v.string(this.target)?this._scopeEvents[e===ie.On?"addDelegate":"removeDelegate"](this.target,this._context,s,l,o):this._scopeEvents[e===ie.On?"add":"remove"](this.target,s,l,o)}}return this}},{key:"on",value:function(e,n,r){return this._onOff(ie.On,e,n,r)}},{key:"off",value:function(e,n,r){return this._onOff(ie.Off,e,n,r)}},{key:"set",value:function(e){var n=this._defaults;for(var r in v.object(e)||(e={}),this.options=ge(n.base),this._actions.methodDict){var o=r,i=this._actions.methodDict[o];this.options[o]={},this.setPerAction(o,k(k({},n.perAction),n.actions[o])),this[i](e[o])}for(var a in e)a!=="getRect"?v.func(this[a])&&this[a](e[a]):this.rectChecker(e.getRect);return this}},{key:"unset",value:function(){if(v.string(this.target))for(var e in this._scopeEvents.delegatedEvents)for(var n=this._scopeEvents.delegatedEvents[e],r=n.length-1;r>=0;r--){var o=n[r],i=o.selector,a=o.context,s=o.listeners;i===this.target&&a===this._context&&n.splice(r,1);for(var c=s.length-1;c>=0;c--)this._scopeEvents.removeDelegate(this.target,this._context,e,s[c][0],s[c][1])}else this._scopeEvents.remove(this.target,"all")}}]),t})(),Zr=(function(){function t(e){var n=this;M(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=e,e.addListeners({"interactable:unset":function(r){var o=r.interactable,i=o.target,a=v.string(i)?n.selectorMap[i]:i[n.scope.id],s=ke(a,(function(c){return c===o}));a.splice(s,1)}})}return D(t,[{key:"new",value:function(e,n){n=k(n||{},{actions:this.scope.actions});var r=new this.scope.Interactable(e,n,this.scope.document,this.scope.events);return this.scope.addDocument(r._doc),this.list.push(r),v.string(e)?(this.selectorMap[e]||(this.selectorMap[e]=[]),this.selectorMap[e].push(r)):(r.target[this.scope.id]||Object.defineProperty(e,this.scope.id,{value:[],configurable:!0}),e[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:e,options:n,interactable:r,win:this.scope._win}),r}},{key:"getExisting",value:function(e,n){var r=n&&n.context||this.scope.document,o=v.string(e),i=o?this.selectorMap[e]:e[this.scope.id];if(i)return Me(i,(function(a){return a._context===r&&(o||a.inContext(e))}))}},{key:"forEachMatch",value:function(e,n){for(var r=0,o=this.list;r<o.length;r++){var i=o[r],a=void 0;if((v.string(i.target)?v.element(e)&&ne(e,i.target):e===i.target)&&i.inContext(e)&&(a=n(i)),a!==void 0)return a}}}]),t})(),eo=(function(){function t(){var e=this;M(this,t),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=q,this.defaults=ge(fn),this.Eventable=wn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=(function(r){var o=function i(a,s){var c=r.interactables.getExisting(a,s);return c||((c=r.interactables.new(a,s)).events.global=i.globalEvents),c};return o.getPointerAverage=qt,o.getTouchBBox=ot,o.getTouchDistance=it,o.getTouchAngle=at,o.getElementRect=tt,o.getElementClientRect=et,o.matchesSelector=ne,o.closest=jt,o.globalEvents={},o.version="1.10.27",o.scope=r,o.use=function(i,a){return this.scope.usePlugin(i,a),this},o.isSet=function(i,a){return!!this.scope.interactables.get(i,a&&a.context)},o.on=_e((function(i,a,s){if(v.string(i)&&i.search(" ")!==-1&&(i=i.trim().split(/ +/)),v.array(i)){for(var c=0,u=i;c<u.length;c++){var l=u[c];this.on(l,a,s)}return this}if(v.object(i)){for(var p in i)this.on(p,i[p],a);return this}return Ye(i,this.scope.actions)?this.globalEvents[i]?this.globalEvents[i].push(a):this.globalEvents[i]=[a]:this.scope.events.add(this.scope.document,i,a,{options:s}),this}),"The interact.on() method is being deprecated"),o.off=_e((function(i,a,s){if(v.string(i)&&i.search(" ")!==-1&&(i=i.trim().split(/ +/)),v.array(i)){for(var c=0,u=i;c<u.length;c++){var l=u[c];this.off(l,a,s)}return this}if(v.object(i)){for(var p in i)this.off(p,i[p],a);return this}var h;return Ye(i,this.scope.actions)?i in this.globalEvents&&(h=this.globalEvents[i].indexOf(a))!==-1&&this.globalEvents[i].splice(h,1):this.scope.events.remove(this.scope.document,i,a,s),this}),"The interact.off() method is being deprecated"),o.debug=function(){return this.scope},o.supportsTouch=function(){return q.supportsTouch},o.supportsPointerEvent=function(){return q.supportsPointerEvent},o.stop=function(){for(var i=0,a=this.scope.interactions.list;i<a.length;i++)a[i].stop();return this},o.pointerMoveTolerance=function(i){return v.number(i)?(this.scope.interactions.pointerMoveTolerance=i,this):this.scope.interactions.pointerMoveTolerance},o.addDocument=function(i,a){this.scope.addDocument(i,a)},o.removeDocument=function(i){this.scope.removeDocument(i)},o})(this),this.InteractEvent=mt,this.Interactable=void 0,this.interactables=new Zr(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(r){return e.removeDocument(r.target)};var n=this;this.Interactable=(function(r){F(i,r);var o=B(i);function i(){return M(this,i),o.apply(this,arguments)}return D(i,[{key:"_defaults",get:function(){return n.defaults}},{key:"set",value:function(a){return X(R(i.prototype),"set",this).call(this,a),n.fire("interactable:set",{options:a,interactable:this}),this}},{key:"unset",value:function(){X(R(i.prototype),"unset",this).call(this);var a=n.interactables.list.indexOf(this);a<0||(n.interactables.list.splice(a,1),n.fire("interactable:unset",{interactable:this}))}}]),i})(Qr)}return D(t,[{key:"addListeners",value:function(e,n){this.listenerMaps.push({id:n,map:e})}},{key:"fire",value:function(e,n){for(var r=0,o=this.listenerMaps;r<o.length;r++){var i=o[r].map[e];if(i&&i(n,this,e)===!1)return!1}}},{key:"init",value:function(e){return this.isInitialized?this:(function(n,r){return n.isInitialized=!0,v.window(r)&&Dt(r),j.init(r),q.init(r),re.init(r),n.window=r,n.document=r.document,n.usePlugin(Jr),n.usePlugin(Ur),n})(this,e)}},{key:"pluginIsInstalled",value:function(e){var n=e.id;return n?!!this._plugins.map[n]:this._plugins.list.indexOf(e)!==-1}},{key:"usePlugin",value:function(e,n){if(!this.isInitialized)return this;if(this.pluginIsInstalled(e))return this;if(e.id&&(this._plugins.map[e.id]=e),this._plugins.list.push(e),e.install&&e.install(this,n),e.listeners&&e.before){for(var r=0,o=this.listenerMaps.length,i=e.before.reduce((function(s,c){return s[c]=!0,s[kn(c)]=!0,s}),{});r<o;r++){var a=this.listenerMaps[r].id;if(a&&(i[a]||i[kn(a)]))break}this.listenerMaps.splice(r,0,{id:e.id,map:e.listeners})}else e.listeners&&this.listenerMaps.push({id:e.id,map:e.listeners});return this}},{key:"addDocument",value:function(e,n){if(this.getDocIndex(e)!==-1)return!1;var r=K(e);n=n?k({},n):{},this.documents.push({doc:e,options:n}),this.events.documents.push(e),e!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:e,window:r,scope:this,options:n})}},{key:"removeDocument",value:function(e){var n=this.getDocIndex(e),r=K(e),o=this.documents[n].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(n,1),this.events.documents.splice(n,1),this.fire("scope:remove-document",{doc:e,window:r,scope:this,options:o})}},{key:"getDocIndex",value:function(e){for(var n=0;n<this.documents.length;n++)if(this.documents[n].doc===e)return n;return-1}},{key:"getDocOptions",value:function(e){var n=this.getDocIndex(e);return n===-1?null:this.documents[n].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t})();function kn(t){return t&&t.replace(/\/.*$/,"")}var Mn=new eo,L=Mn.interactStatic,to=typeof globalThis<"u"?globalThis:window;Mn.init(to);var no=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var e=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter((function(r){var o=r[0],i=r[1];return o in t||i in t})),n=function(r,o){for(var i=t.range,a=t.limits,s=a===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:a,c=t.offset,u=c===void 0?{x:0,y:0}:c,l={range:i,grid:t,x:null,y:null},p=0;p<e.length;p++){var h=e[p],y=h[0],m=h[1],b=Math.round((r-u.x)/t[y]),S=Math.round((o-u.y)/t[m]);l[y]=Math.max(s.left,Math.min(s.right,b*t[y]+u.x)),l[m]=Math.max(s.top,Math.min(s.bottom,S*t[m]+u.y))}return l};return n.grid=t,n.coordFields=e,n}}),ro={id:"snappers",install:function(t){var e=t.interactStatic;e.snappers=k(e.snappers||{},no),e.createSnapGrid=e.snappers.grid}},oo=ro,io={start:function(t){var e=t.state,n=t.rect,r=t.edges,o=t.pageCoords,i=e.options,a=i.ratio,s=i.enabled,c=e.options,u=c.equalDelta,l=c.modifiers;a==="preserve"&&(a=n.width/n.height),e.startCoords=k({},o),e.startRect=k({},n),e.ratio=a,e.equalDelta=u;var p=e.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(e.xIsPrimaryAxis=!(!r.left&&!r.right),e.equalDelta){var h=(p.left?1:-1)*(p.top?1:-1);e.edgeSign={x:h,y:h}}else e.edgeSign={x:p.left?-1:1,y:p.top?-1:1};if(s!==!1&&k(r,p),l!=null&&l.length){var y=new gt(t.interaction);y.copyFrom(t.interaction.modification),y.prepareStates(l),e.subModification=y,y.startAll(f({},t))}},set:function(t){var e=t.state,n=t.rect,r=t.coords,o=e.linkedEdges,i=k({},r),a=e.equalDelta?ao:so;if(k(t.edges,o),a(e,e.xIsPrimaryAxis,r,n),!e.subModification)return null;var s=k({},n);je(o,s,{x:r.x-i.x,y:r.y-i.y});var c=e.subModification.setAll(f(f({},t),{},{rect:s,edges:o,pageCoords:r,prevCoords:r,prevRect:s})),u=c.delta;return c.changed&&(a(e,Math.abs(u.x)>Math.abs(u.y),c.coords,c.rect),k(r,c.coords)),c.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function ao(t,e,n){var r=t.startCoords,o=t.edgeSign;e?n.y=r.y+(n.x-r.x)*o.y:n.x=r.x+(n.y-r.y)*o.x}function so(t,e,n,r){var o=t.startRect,i=t.startCoords,a=t.ratio,s=t.edgeSign;if(e){var c=r.width/a;n.y=i.y+(c-o.height)*s.y}else{var u=r.height*a;n.x=i.x+(u-o.width)*s.x}}var co=oe(io,"aspectRatio"),_n=function(){};_n._defaults={};var qe=_n;function pe(t,e,n){return v.func(t)?we(t,e.interactable,e.element,[n.x,n.y,e]):we(t,e.interactable,e.element)}var Ge={start:function(t){var e=t.rect,n=t.startOffset,r=t.state,o=t.interaction,i=t.pageCoords,a=r.options,s=a.elementRect,c=k({left:0,top:0,right:0,bottom:0},a.offset||{});if(e&&s){var u=pe(a.restriction,o,i);if(u){var l=u.right-u.left-e.width,p=u.bottom-u.top-e.height;l<0&&(c.left+=l,c.right+=l),p<0&&(c.top+=p,c.bottom+=p)}c.left+=n.left-e.width*s.left,c.top+=n.top-e.height*s.top,c.right+=n.right-e.width*(1-s.right),c.bottom+=n.bottom-e.height*(1-s.bottom)}r.offset=c},set:function(t){var e=t.coords,n=t.interaction,r=t.state,o=r.options,i=r.offset,a=pe(o.restriction,n,e);if(a){var s=(function(c){return!c||"left"in c&&"top"in c||((c=k({},c)).left=c.x||0,c.top=c.y||0,c.right=c.right||c.left+c.width,c.bottom=c.bottom||c.top+c.height),c})(a);e.x=Math.max(Math.min(s.right-i.right,e.x),s.left+i.left),e.y=Math.max(Math.min(s.bottom-i.bottom,e.y),s.top+i.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},lo=oe(Ge,"restrict"),Cn={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Pn={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function On(t,e){for(var n=0,r=["top","left","bottom","right"];n<r.length;n++){var o=r[n];o in t||(t[o]=e[o])}return t}var Oe={noInner:Cn,noOuter:Pn,start:function(t){var e,n=t.interaction,r=t.startOffset,o=t.state,i=o.options;i&&(e=Ae(pe(i.offset,n,n.coords.start.page))),e=e||{x:0,y:0},o.offset={top:e.y+r.top,left:e.x+r.left,bottom:e.y-r.bottom,right:e.x-r.right}},set:function(t){var e=t.coords,n=t.edges,r=t.interaction,o=t.state,i=o.offset,a=o.options;if(n){var s=k({},e),c=pe(a.inner,r,s)||{},u=pe(a.outer,r,s)||{};On(c,Cn),On(u,Pn),n.top?e.y=Math.min(Math.max(u.top+i.top,s.y),c.top+i.top):n.bottom&&(e.y=Math.max(Math.min(u.bottom+i.bottom,s.y),c.bottom+i.bottom)),n.left?e.x=Math.min(Math.max(u.left+i.left,s.x),c.left+i.left):n.right&&(e.x=Math.max(Math.min(u.right+i.right,s.x),c.right+i.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},uo=oe(Oe,"restrictEdges"),po=k({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},Ge.defaults),fo=oe({start:Ge.start,set:Ge.set,defaults:po},"restrictRect"),ho={width:-1/0,height:-1/0},vo={width:1/0,height:1/0},go=oe({start:function(t){return Oe.start(t)},set:function(t){var e=t.interaction,n=t.state,r=t.rect,o=t.edges,i=n.options;if(o){var a=nt(pe(i.min,e,t.coords))||ho,s=nt(pe(i.max,e,t.coords))||vo;n.options={endOnly:i.endOnly,inner:k({},Oe.noInner),outer:k({},Oe.noOuter)},o.top?(n.options.inner.top=r.bottom-a.height,n.options.outer.top=r.bottom-s.height):o.bottom&&(n.options.inner.bottom=r.top+a.height,n.options.outer.bottom=r.top+s.height),o.left?(n.options.inner.left=r.right-a.width,n.options.outer.left=r.right-s.width):o.right&&(n.options.inner.right=r.left+a.width,n.options.outer.right=r.left+s.width),Oe.set(t),n.options=i}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Et={start:function(t){var e,n=t.interaction,r=t.interactable,o=t.element,i=t.rect,a=t.state,s=t.startOffset,c=a.options,u=c.offsetWithOrigin?(function(h){var y=h.interaction.element,m=Ae(we(h.state.options.origin,null,null,[y])),b=m||Ee(h.interactable,y,h.interaction.prepared.name);return b})(t):{x:0,y:0};if(c.offset==="startCoords")e={x:n.coords.start.page.x,y:n.coords.start.page.y};else{var l=we(c.offset,r,o,[n]);(e=Ae(l)||{x:0,y:0}).x+=u.x,e.y+=u.y}var p=c.relativePoints;a.offsets=i&&p&&p.length?p.map((function(h,y){return{index:y,relativePoint:h,x:s.left-i.width*h.x+e.x,y:s.top-i.height*h.y+e.y}})):[{index:0,relativePoint:null,x:e.x,y:e.y}]},set:function(t){var e=t.interaction,n=t.coords,r=t.state,o=r.options,i=r.offsets,a=Ee(e.interactable,e.element,e.prepared.name),s=k({},n),c=[];o.offsetWithOrigin||(s.x-=a.x,s.y-=a.y);for(var u=0,l=i;u<l.length;u++)for(var p=l[u],h=s.x-p.x,y=s.y-p.y,m=0,b=o.targets.length;m<b;m++){var S=o.targets[m],E=void 0;(E=v.func(S)?S(h,y,e._proxy,p,m):S)&&c.push({x:(v.number(E.x)?E.x:h)+p.x,y:(v.number(E.y)?E.y:y)+p.y,range:v.number(E.range)?E.range:o.range,source:S,index:m,offset:p})}for(var T={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},P=0;P<c.length;P++){var I=c[P],_=I.range,O=I.x-s.x,H=I.y-s.y,z=Se(O,H),N=z<=_;_===1/0&&T.inRange&&T.range!==1/0&&(N=!1),T.target&&!(N?T.inRange&&_!==1/0?z/_<T.distance/T.range:_===1/0&&T.range!==1/0||z<T.distance:!T.inRange&&z<T.distance)||(T.target=I,T.distance=z,T.range=_,T.inRange=N,T.delta.x=O,T.delta.y=H)}return T.inRange&&(n.x=T.target.x,n.y=T.target.y),r.closest=T,T},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},mo=oe(Et,"snap"),Ue={start:function(t){var e=t.state,n=t.edges,r=e.options;if(!n)return null;t.state={options:{targets:null,relativePoints:[{x:n.left?0:1,y:n.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},e.targetFields=e.targetFields||[["width","height"],["x","y"]],Et.start(t),e.offsets=t.state.offsets,t.state=e},set:function(t){var e=t.interaction,n=t.state,r=t.coords,o=n.options,i=n.offsets,a={x:r.x-i[0].x,y:r.y-i[0].y};n.options=k({},o),n.options.targets=[];for(var s=0,c=o.targets||[];s<c.length;s++){var u=c[s],l=void 0;if(l=v.func(u)?u(a.x,a.y,e):u){for(var p=0,h=n.targetFields;p<h.length;p++){var y=h[p],m=y[0],b=y[1];if(m in l||b in l){l.x=l[m],l.y=l[b];break}}n.options.targets.push(l)}}var S=Et.set(t);return n.options=o,S},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},yo=oe(Ue,"snapSize"),St={aspectRatio:co,restrictEdges:uo,restrict:lo,restrictRect:fo,restrictSize:go,snapEdges:oe({start:function(t){var e=t.edges;return e?(t.state.targetFields=t.state.targetFields||[[e.left?"left":"right",e.top?"top":"bottom"]],Ue.start(t)):null},set:Ue.set,defaults:k(ge(Ue.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:mo,snapSize:yo,spring:qe,avoid:qe,transform:qe,rubberband:qe},bo={id:"modifiers",install:function(t){var e=t.interactStatic;for(var n in t.usePlugin(dn),t.usePlugin(oo),e.modifiers=St,St){var r=St[n],o=r._defaults,i=r._methods;o._methods=i,t.defaults.perAction[n]=o}}},xo=bo,In=(function(t){F(n,t);var e=B(n);function n(r,o,i,a,s,c){var u;if(M(this,n),Fe(Y(u=e.call(this,s)),i),i!==o&&Fe(Y(u),o),u.timeStamp=c,u.originalEvent=i,u.type=r,u.pointerId=Te(o),u.pointerType=Gt(o),u.target=a,u.currentTarget=null,r==="tap"){var l=s.getPointerIndex(o);u.dt=u.timeStamp-s.pointers[l].downTime;var p=u.timeStamp-s.tapTime;u.double=!!s.prevTap&&s.prevTap.type!=="doubletap"&&s.prevTap.target===u.target&&p<500}else r==="doubletap"&&(u.dt=o.timeStamp-s.tapTime,u.double=!0);return u}return D(n,[{key:"_subtractOrigin",value:function(r){var o=r.x,i=r.y;return this.pageX-=o,this.pageY-=i,this.clientX-=o,this.clientY-=i,this}},{key:"_addOrigin",value:function(r){var o=r.x,i=r.y;return this.pageX+=o,this.pageY+=i,this.clientX+=o,this.clientY+=i,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),n})(Be),Ie={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=Ie,t.defaults.actions.pointerEvents=Ie.defaults,k(t.actions.phaselessTypes,Ie.types)},listeners:{"interactions:new":function(t){var e=t.interaction;e.prevTap=null,e.tapTime=0},"interactions:update-pointer":function(t){var e=t.down,n=t.pointerInfo;!e&&n.hold||(n.hold={duration:1/0,timeout:null})},"interactions:move":function(t,e){var n=t.interaction,r=t.pointer,o=t.event,i=t.eventTarget;t.duplicate||n.pointerIsDown&&!n.pointerWasMoved||(n.pointerIsDown&&Tt(t),ae({interaction:n,pointer:r,event:o,eventTarget:i,type:"move"},e))},"interactions:down":function(t,e){(function(n,r){for(var o=n.interaction,i=n.pointer,a=n.event,s=n.eventTarget,c=n.pointerIndex,u=o.pointers[c].hold,l=Ht(s),p={interaction:o,pointer:i,event:a,eventTarget:s,type:"hold",targets:[],path:l,node:null},h=0;h<l.length;h++){var y=l[h];p.node=y,r.fire("pointerEvents:collect-targets",p)}if(p.targets.length){for(var m=1/0,b=0,S=p.targets;b<S.length;b++){var E=S[b].eventable.options.holdDuration;E<m&&(m=E)}u.duration=m,u.timeout=setTimeout((function(){ae({interaction:o,eventTarget:s,pointer:i,event:a,type:"hold"},r)}),m)}})(t,e),ae(t,e)},"interactions:up":function(t,e){Tt(t),ae(t,e),(function(n,r){var o=n.interaction,i=n.pointer,a=n.event,s=n.eventTarget;o.pointerWasMoved||ae({interaction:o,eventTarget:s,pointer:i,event:a,type:"tap"},r)})(t,e)},"interactions:cancel":function(t,e){Tt(t),ae(t,e)}},PointerEvent:In,fire:ae,collectEventTargets:Dn,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function ae(t,e){var n=t.interaction,r=t.pointer,o=t.event,i=t.eventTarget,a=t.type,s=t.targets,c=s===void 0?Dn(t,e):s,u=new In(a,r,o,i,n,e.now());e.fire("pointerEvents:new",{pointerEvent:u});for(var l={interaction:n,pointer:r,event:o,eventTarget:i,targets:c,type:a,pointerEvent:u},p=0;p<c.length;p++){var h=c[p];for(var y in h.props||{})u[y]=h.props[y];var m=Ee(h.eventable,h.node);if(u._subtractOrigin(m),u.eventable=h.eventable,u.currentTarget=h.node,h.eventable.fire(u),u._addOrigin(m),u.immediatePropagationStopped||u.propagationStopped&&p+1<c.length&&c[p+1].node!==u.currentTarget)break}if(e.fire("pointerEvents:fired",l),a==="tap"){var b=u.double?ae({interaction:n,pointer:r,event:o,eventTarget:i,type:"doubletap"},e):u;n.prevTap=b,n.tapTime=b.timeStamp}return u}function Dn(t,e){var n=t.interaction,r=t.pointer,o=t.event,i=t.eventTarget,a=t.type,s=n.getPointerIndex(r),c=n.pointers[s];if(a==="tap"&&(n.pointerWasMoved||!c||c.downTarget!==i))return[];for(var u=Ht(i),l={interaction:n,pointer:r,event:o,eventTarget:i,type:a,path:u,targets:[],node:null},p=0;p<u.length;p++){var h=u[p];l.node=h,e.fire("pointerEvents:collect-targets",l)}return a==="hold"&&(l.targets=l.targets.filter((function(y){var m,b;return y.eventable.options.holdDuration===((m=n.pointers[s])==null||(b=m.hold)==null?void 0:b.duration)}))),l.targets}function Tt(t){var e=t.interaction,n=t.pointerIndex,r=e.pointers[n].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var wo=Object.freeze({__proto__:null,default:Ie});function Eo(t){var e=t.interaction;e.holdIntervalHandle&&(clearInterval(e.holdIntervalHandle),e.holdIntervalHandle=null)}var So={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(Ie);var e=t.pointerEvents;e.defaults.holdRepeatInterval=0,e.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce((function(t,e){return t["pointerEvents:".concat(e)]=Eo,t}),{"pointerEvents:new":function(t){var e=t.pointerEvent;e.type==="hold"&&(e.count=(e.count||0)+1)},"pointerEvents:fired":function(t,e){var n=t.interaction,r=t.pointerEvent,o=t.eventTarget,i=t.targets;if(r.type==="hold"&&i.length){var a=i[0].eventable.options.holdRepeatInterval;a<=0||(n.holdIntervalHandle=setTimeout((function(){e.pointerEvents.fire({interaction:n,eventTarget:o,type:"hold",pointer:r,event:r},e)}),a))}}})},To=So,ko={id:"pointer-events/interactableTargets",install:function(t){var e=t.Interactable;e.prototype.pointerEvents=function(r){return k(this.events.options,r),this};var n=e.prototype._backCompatOption;e.prototype._backCompatOption=function(r,o){var i=n.call(this,r,o);return i===this&&(this.events.options[r]=o),i}},listeners:{"pointerEvents:collect-targets":function(t,e){var n=t.targets,r=t.node,o=t.type,i=t.eventTarget;e.interactables.forEachMatch(r,(function(a){var s=a.events,c=s.options;s.types[o]&&s.types[o].length&&a.testIgnoreAllow(c,r,i)&&n.push({node:r,eventable:s,props:{interactable:a}})}))},"interactable:new":function(t){var e=t.interactable;e.events.getRect=function(n){return e.getRect(n)}},"interactable:set":function(t,e){var n=t.interactable,r=t.options;k(n.events.options,e.pointerEvents.defaults),k(n.events.options,r.pointerEvents||{})}}},Mo=ko,_o={id:"pointer-events",install:function(t){t.usePlugin(wo),t.usePlugin(To),t.usePlugin(Mo)}},Co=_o,Po={id:"reflow",install:function(t){var e=t.Interactable;t.actions.phases.reflow=!0,e.prototype.reflow=function(n){return(function(r,o,i){for(var a=r.getAllElements(),s=i.window.Promise,c=s?[]:null,u=function(){var p=a[l],h=r.getRect(p);if(!h)return 1;var y,m=Me(i.interactions.list,(function(E){return E.interacting()&&E.interactable===r&&E.element===p&&E.prepared.name===o.name}));if(m)m.move(),c&&(y=m._reflowPromise||new s((function(E){m._reflowResolve=E})));else{var b=nt(h),S=(function(E){return{coords:E,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}})({page:{x:b.x,y:b.y},client:{x:b.x,y:b.y},timeStamp:i.now()});y=(function(E,T,P,I,_){var O=E.interactions.new({pointerType:"reflow"}),H={interaction:O,event:_,pointer:_,eventTarget:P,phase:"reflow"};O.interactable=T,O.element=P,O.prevEvent=_,O.updatePointer(_,_,P,!0),Vt(O.coords.delta),dt(O.prepared,I),O._doPhase(H);var z=E.window,N=z.Promise,G=N?new N((function(ee){O._reflowResolve=ee})):void 0;return O._reflowPromise=G,O.start(I,T,P),O._interacting?(O.move(H),O.end(_)):(O.stop(),O._reflowResolve()),O.removePointer(_,_),G})(i,r,p,o,S)}c&&c.push(y)},l=0;l<a.length&&!u();l++);return c&&s.all(c).then((function(){return r}))})(this,n,t)}},listeners:{"interactions:stop":function(t,e){var n=t.interaction;n.pointerType==="reflow"&&(n._reflowResolve&&n._reflowResolve(),(function(r,o){r.splice(r.indexOf(o),1)})(e.interactions.list,n))}}},Oo=Po;if(L.use(pn),L.use(mn),L.use(Co),L.use(qr),L.use(xo),L.use(Rr),L.use(Sr),L.use(kr),L.use(Oo),L.default=L,x(d)==="object"&&d)try{d.exports=L}catch{}return L.default=L,L}))})(be,be.exports)),be.exports}var hr=fr();const Ke=pr(hr);function Pt(d){const w=document.createElement("input");w.type="file",w.accept="image/*",w.onchange=g=>{const f=g.target.files?.[0];if(f){const x=new FileReader;x.onload=M=>{const A=document.createElement("img");A.src=M.target?.result,A.style.maxWidth="100%",A.style.width="100%",A.style.height="auto",A.style.cursor="pointer",A.draggable=!1;const D=document.createElement("div");D.className="editor-image-wrapper",D.style.display="inline-block",D.style.position="relative",D.style.maxWidth="100%",D.style.width="auto",D.style.height="auto",D.contentEditable="false",D.style.boxSizing="border-box",D.style.touchAction="none",D.style.userSelect="none",D.appendChild(A),d.appendChild(D),d.focus()},x.readAsDataURL(f)}},w.click()}function vr(d){let w=null;if(d.tagName==="IMG"?w=d.parentElement:w=d,!w)return;const g=w.querySelector("img");if(g)if(w.classList.contains("resizable")){const f=w.getBoundingClientRect(),x=Math.round(f.width)+"px",M=Math.round(f.height)+"px";Ke(w).unset(),w.classList.remove("resizable"),w.style.border="none",w.style.transform="",w.dataset.x="",w.dataset.y="",w.style.width=x,w.style.height=M,w.contentEditable="false",g&&(g.style.width="100%",g.style.height="100%")}else{w.classList.add("resizable"),w.style.border="2px dashed #007bff",w.style.position="relative",w.style.userSelect="none";const f=w.getBoundingClientRect();w.style.width=f.width+"px",w.style.height=f.height+"px",g&&(g.style.width="100%",g.style.height="100%"),Ke(w).resizable({edges:{left:!0,right:!0,bottom:!0,top:!0},listeners:{move:x=>{const M=x.target;Object.assign(M.style,{width:`${x.rect.width}px`,height:`${x.rect.height}px`})}},modifiers:[Ke.modifiers.restrictSize({min:{width:50,height:50}})],inertia:!0})}}class gr{container;toolbar;editor;constructor(w){this.container=document.getElementById(w),this.container.classList.add("editor-container"),this.editor=ur(()=>Pt(this.editor),f=>vr(f)),this.toolbar=lr();const g=this.toolbar.querySelector('button[title="Insert Image"]');g&&(g.onclick=()=>Pt(this.editor)),this.container.appendChild(this.toolbar),this.container.appendChild(this.editor)}getHTML(){return this.editor.innerHTML}setHTML(w){this.editor.innerHTML=w}}de.RichTextEditor=gr,Object.defineProperty(de,Symbol.toStringTag,{value:"Module"})}));
|
|
41
|
+
`,g.style.border="1px solid #e1e1e1",g.style.backgroundColor="#ffffff",g.style.padding="4px",g.style.borderRadius="3px",g.style.color="#000000",g.onchange=()=>document.execCommand("fontSize",!1,g.value),v.appendChild(g);const w=mr();v.appendChild(w);const O=xr();v.appendChild(O);const J=Er();v.appendChild(J);const L=wr();v.appendChild(L);const de=_r();v.appendChild(de);const ie=Tr();v.appendChild(ie);const Q=Sr();v.appendChild(Q);const ye=kr();return v.appendChild(ye),v}function Or(v,y){const E=document.createElement("div");return E.classList.add("editor"),E.contentEditable="true",E.style.color="#000000",E.style.border="1px solid #e1e1e1",E.style.minHeight="400px",E.style.padding="15px",E.style.fontFamily="Arial, sans-serif",E.style.fontSize="14px",E.style.lineHeight="1.5",E.style.outline="none",E.style.backgroundColor="#ffffff",E.style.borderRadius="4px",E.style.boxShadow="inset 0 1px 3px rgba(0,0,0,0.1)",E.style.direction="ltr",E.style.textAlign="left",E.innerHTML="<p>Start typing here...</p>",E.addEventListener("dragover",g=>{g.preventDefault(),g.stopPropagation()}),E.addEventListener("drop",g=>{g.preventDefault(),g.stopPropagation();const w=g.dataTransfer?.files;if(w&&w.length>0)for(let O=0;O<w.length;O++){const J=w[O];if(J.type.startsWith("image/")){const L=new FileReader;L.onload=de=>{const ie=document.createElement("img");ie.src=de.target?.result,ie.style.maxWidth="100%",ie.style.width="100%",ie.style.height="auto",ie.style.cursor="pointer",ie.draggable=!1;const Q=document.createElement("div");Q.className="editor-image-wrapper",Q.style.display="inline-block",Q.style.position="relative",Q.style.maxWidth="100%",Q.style.width="auto",Q.style.height="auto",Q.contentEditable="false",Q.style.userSelect="none",Q.style.boxSizing="border-box",Q.style.touchAction="none",Q.appendChild(ie),E.appendChild(Q)},L.readAsDataURL(J)}}}),E.addEventListener("click",g=>{const w=g.target;let O=w;w.tagName==="IMG"&&(O=w.parentElement),O&&O.classList.contains("editor-image-wrapper")&&y(O)}),E.addEventListener("keyup",()=>st()),E.addEventListener("mouseup",()=>st()),E.addEventListener("focus",()=>st()),window.addEventListener("selectionchange",()=>{try{const g=window.getSelection();if(!g||!g.anchorNode)return;let w=g.anchorNode;for(;w&&w.nodeType!==Node.ELEMENT_NODE;)w=w.parentNode;if(!w)return;E.contains(w)&&st()}catch{}}),E}function Cr(v){return v&&v.__esModule&&Object.prototype.hasOwnProperty.call(v,"default")?v.default:v}var vt={exports:{}},Pr=vt.exports,ln;function Ar(){return ln||(ln=1,(function(v,y){(function(E,g){v.exports=g()})(Pr,(function(){function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),n.push.apply(n,r)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(r){de(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function w(t){return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(t)}function O(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function J(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,fe(r.key),r)}}function L(t,e,n){return e&&J(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function de(t,e,n){return(e=fe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ie(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ye(t,e)}function Q(t){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(t)}function ye(t,e){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ye(t,e)}function se(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ne(t){var e=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var n,r=Q(t);if(e){var o=Q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(function(i,a){if(a&&(typeof a=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return se(i)})(this,n)}}function ce(){return ce=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=(function(i,a){for(;!Object.prototype.hasOwnProperty.call(i,a)&&(i=Q(i))!==null;);return i})(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ce.apply(this,arguments)}function fe(t){var e=(function(n,r){if(typeof n!="object"||n===null)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var i=o.call(n,r);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(t,"string");return typeof e=="symbol"?e:e+""}var Re=function(t){return!(!t||!t.Window)&&t instanceof t.Window},_e=void 0,ve=void 0;function Me(t){_e=t;var e=t.document.createTextNode("");e.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(e)===e&&(t=t.wrap(t)),ve=t}function pe(t){return Re(t)?t:(t.ownerDocument||t).defaultView||ve.window}typeof window<"u"&&window&&Me(window);var ge=function(t){return!!t&&w(t)==="object"},Ie=function(t){return typeof t=="function"},m={window:function(t){return t===ve||Re(t)},docFrag:function(t){return ge(t)&&t.nodeType===11},object:ge,func:Ie,number:function(t){return typeof t=="number"},bool:function(t){return typeof t=="boolean"},string:function(t){return typeof t=="string"},element:function(t){if(!t||w(t)!=="object")return!1;var e=pe(t)||ve;return/object|function/.test(typeof Element>"u"?"undefined":w(Element))?t instanceof Element||t instanceof e.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:function(t){return ge(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return ge(t)&&t.length!==void 0&&Ie(t.splice)}};function De(t){var e=t.interaction;if(e.prepared.name==="drag"){var n=e.prepared.axis;n==="x"?(e.coords.cur.page.y=e.coords.start.page.y,e.coords.cur.client.y=e.coords.start.client.y,e.coords.velocity.client.y=0,e.coords.velocity.page.y=0):n==="y"&&(e.coords.cur.page.x=e.coords.start.page.x,e.coords.cur.client.x=e.coords.start.client.x,e.coords.velocity.client.x=0,e.coords.velocity.page.x=0)}}function he(t){var e=t.iEvent,n=t.interaction;if(n.prepared.name==="drag"){var r=n.prepared.axis;if(r==="x"||r==="y"){var o=r==="x"?"y":"x";e.page[o]=n.coords.start.page[o],e.client[o]=n.coords.start.client[o],e.delta[o]=0}}}var Te={id:"actions/drag",install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.draggable=Te.draggable,e.map.drag=Te,e.methodDict.drag="draggable",r.actions.drag=Te.defaults},listeners:{"interactions:before-action-move":De,"interactions:action-resume":De,"interactions:action-move":he,"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.buttons,o=n.options.drag;if(o&&o.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||(r&n.options.drag.mouseButtons)!=0))return t.action={name:"drag",axis:o.lockAxis==="start"?o.startAxis:o.lockAxis},!1}},draggable:function(t){return m.object(t)?(this.options.drag.enabled=t.enabled!==!1,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):m.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:De,move:he,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return t.search("drag")===0}},je=Te,G={init:function(t){var e=t;G.document=e.document,G.DocumentFragment=e.DocumentFragment||be,G.SVGElement=e.SVGElement||be,G.SVGSVGElement=e.SVGSVGElement||be,G.SVGElementInstance=e.SVGElementInstance||be,G.Element=e.Element||be,G.HTMLElement=e.HTMLElement||G.Element,G.Event=e.Event,G.Touch=e.Touch||be,G.PointerEvent=e.PointerEvent||e.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function be(){}var ee=G,re={init:function(t){var e=ee.Element,n=t.navigator||{};re.supportsTouch="ontouchstart"in t||m.func(t.DocumentTouch)&&ee.document instanceof t.DocumentTouch,re.supportsPointerEvent=n.pointerEnabled!==!1&&!!ee.PointerEvent,re.isIOS=/iP(hone|od|ad)/.test(n.platform),re.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),re.isIe9=/MSIE 9/.test(n.userAgent),re.isOperaMobile=n.appName==="Opera"&&re.supportsTouch&&/Presto/.test(n.userAgent),re.prefixedMatchesSelector="matches"in e.prototype?"matches":"webkitMatchesSelector"in e.prototype?"webkitMatchesSelector":"mozMatchesSelector"in e.prototype?"mozMatchesSelector":"oMatchesSelector"in e.prototype?"oMatchesSelector":"msMatchesSelector",re.pEventTypes=re.supportsPointerEvent?ee.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,re.wheelEvent=ee.document&&"onmousewheel"in ee.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},te=re;function ue(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function Oe(t,e){for(;m.element(t);){if(me(t,e))return t;t=le(t)}return null}function le(t){var e=t.parentNode;if(m.docFrag(e)){for(;(e=e.host)&&m.docFrag(e););return e}return e}function me(t,e){return ve!==_e&&(e=e.replace(/\/deep\//g," ")),t[te.prefixedMatchesSelector](e)}var u=function(t){return t.parentNode||t.host};function b(t,e){for(var n,r=[],o=t;(n=u(o))&&o!==e&&n!==o.ownerDocument;)r.unshift(o),o=n;return r}function P(t,e,n){for(;m.element(t);){if(me(t,e))return!0;if((t=le(t))===n)return me(t,e)}return!1}function M(t){return t.correspondingUseElement||t}function U(t){var e=t instanceof ee.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}function V(t){var e,n=U(t);if(!te.isIOS7&&n){var r={x:(e=(e=pe(t))||ve).scrollX||e.document.documentElement.scrollLeft,y:e.scrollY||e.document.documentElement.scrollTop};n.left+=r.x,n.right+=r.x,n.top+=r.y,n.bottom+=r.y}return n}function z(t){for(var e=[];t;)e.push(t),t=le(t);return e}function ae(t){return!!m.string(t)&&(ee.document.querySelector(t),!0)}function C(t,e){for(var n in e)t[n]=e[n];return t}function ke(t,e,n){return t==="parent"?le(n):t==="self"?e.getRect(n):Oe(n,t)}function Fe(t,e,n,r){var o=t;return m.string(o)?o=ke(o,e,n):m.func(o)&&(o=o.apply(void 0,r)),m.element(o)&&(o=V(o)),o}function Ze(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function ct(t){return!t||"x"in t&&"y"in t||((t=C({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function et(t,e,n){t.left&&(e.left+=n.x),t.right&&(e.right+=n.x),t.top&&(e.top+=n.y),t.bottom&&(e.bottom+=n.y),e.width=e.right-e.left,e.height=e.bottom-e.top}function Ue(t,e,n){var r=n&&t.options[n];return Ze(Fe(r&&r.origin||t.options.origin,t,e,[t&&e]))||{x:0,y:0}}function Ce(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(l){return!0},r=arguments.length>3?arguments[3]:void 0;if(r=r||{},m.string(t)&&t.search(" ")!==-1&&(t=xe(t)),m.array(t))return t.forEach((function(l){return Ce(l,e,n,r)})),r;if(m.object(t)&&(e=t,t=""),m.func(e)&&n(t))r[t]=r[t]||[],r[t].push(e);else if(m.array(e))for(var o=0,i=e;o<i.length;o++){var a=i[o];Ce(t,a,n,r)}else if(m.object(e))for(var c in e)Ce(xe(c).map((function(l){return"".concat(t).concat(l)})),e[c],n,r);return r}function xe(t){return t.trim().split(/ +/)}var Be=function(t,e){return Math.sqrt(t*t+e*e)},qt=["webkit","moz"];function B(t,e){t.__set||(t.__set={});var n=function(o){if(qt.some((function(i){return o.indexOf(i)===0})))return 1;typeof t[o]!="function"&&o!=="__set"&&Object.defineProperty(t,o,{get:function(){return o in t.__set?t.__set[o]:t.__set[o]=e[o]},set:function(i){t.__set[o]=i},configurable:!0})};for(var r in e)n(r);return t}function ze(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp}function bt(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function xt(t){return t instanceof ee.Event||t instanceof ee.Touch}function tt(t,e,n){return t=t||"page",(n=n||{}).x=e[t+"X"],n.y=e[t+"Y"],n}function Et(t,e){return e=e||{x:0,y:0},te.isOperaMobile&&xt(t)?(tt("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):tt("page",t,e),e}function nt(t){return m.number(t.pointerId)?t.pointerId:t.identifier}function Gt(t,e,n){var r=e.length>1?wt(e):e[0];Et(r,t.page),(function(o,i){i=i||{},te.isOperaMobile&&xt(o)?tt("screen",o,i):tt("client",o,i)})(r,t.client),t.timeStamp=n}function ut(t){var e=[];return m.array(t)?(e[0]=t[0],e[1]=t[1]):t.type==="touchend"?t.touches.length===1?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):t.touches.length===0&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function wt(t){for(var e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},n=0;n<t.length;n++){var r=t[n];for(var o in e)e[o]+=r[o]}for(var i in e)e[i]/=t.length;return e}function lt(t){if(!t.length)return null;var e=ut(t),n=Math.min(e[0].pageX,e[1].pageX),r=Math.min(e[0].pageY,e[1].pageY),o=Math.max(e[0].pageX,e[1].pageX),i=Math.max(e[0].pageY,e[1].pageY);return{x:n,y:r,left:n,top:r,right:o,bottom:i,width:o-n,height:i-r}}function ft(t,e){var n=e+"X",r=e+"Y",o=ut(t),i=o[0][n]-o[1][n],a=o[0][r]-o[1][r];return Be(i,a)}function We(t,e){var n=e+"X",r=e+"Y",o=ut(t),i=o[1][n]-o[0][n],a=o[1][r]-o[0][r];return 180*Math.atan2(a,i)/Math.PI}function rt(t){return m.string(t.pointerType)?t.pointerType:m.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof ee.Touch?"touch":"mouse"}function ot(t){var e=m.func(t.composedPath)?t.composedPath():t.path;return[M(e?e[0]:t.target),M(t.currentTarget)]}var qe=(function(){function t(e){O(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=e}return L(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t})();Object.defineProperty(qe.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var _t=function(t,e){for(var n=0;n<e.length;n++){var r=e[n];t.push(r)}return t},Ge=function(t){return _t([],t)},s=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1},d=function(t,e){return t[s(t,e)]},T=(function(t){ie(n,t);var e=ne(n);function n(r,o,i){var a;O(this,n),(a=e.call(this,o._interaction)).dropzone=void 0,a.dragEvent=void 0,a.relatedTarget=void 0,a.draggable=void 0,a.propagationStopped=!1,a.immediatePropagationStopped=!1;var c=i==="dragleave"?r.prev:r.cur,l=c.element,p=c.dropzone;return a.type=i,a.target=l,a.currentTarget=l,a.dropzone=p,a.dragEvent=o,a.relatedTarget=o.target,a.draggable=o.interactable,a.timeStamp=o.timeStamp,a}return L(n,[{key:"reject",value:function(){var r=this,o=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&o.cur.dropzone===this.dropzone&&o.cur.element===this.target)if(o.prev.dropzone=this.dropzone,o.prev.element=this.target,o.rejected=!0,o.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var i=o.activeDrops,a=s(i,(function(l){var p=l.dropzone,f=l.element;return p===r.dropzone&&f===r.target}));o.activeDrops.splice(a,1);var c=new n(o,this.dragEvent,"dropdeactivate");c.dropzone=this.dropzone,c.target=this.target,this.dropzone.fire(c)}else this.dropzone.fire(new n(o,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n})(qe);function R(t,e){for(var n=0,r=t.slice();n<r.length;n++){var o=r[n],i=o.dropzone,a=o.element;e.dropzone=i,e.target=a,i.fire(e),e.propagationStopped=e.immediatePropagationStopped=!1}}function D(t,e){for(var n=(function(i,a){for(var c=[],l=0,p=i.interactables.list;l<p.length;l++){var f=p[l];if(f.options.drop.enabled){var h=f.options.drop.accept;if(!(m.element(h)&&h!==a||m.string(h)&&!me(a,h)||m.func(h)&&!h({dropzone:f,draggableElement:a})))for(var x=0,S=f.getAllElements();x<S.length;x++){var _=S[x];_!==a&&c.push({dropzone:f,element:_,rect:f.getRect(_)})}}}return c})(t,e),r=0;r<n.length;r++){var o=n[r];o.rect=o.dropzone.getRect(o.element)}return n}function $(t,e,n){for(var r=t.dropState,o=t.interactable,i=t.element,a=[],c=0,l=r.activeDrops;c<l.length;c++){var p=l[c],f=p.dropzone,h=p.element,x=p.rect,S=f.dropCheck(e,n,o,i,h,x);a.push(S?h:null)}var _=(function(k){for(var I,A,j,W=[],K=0;K<k.length;K++){var N=k[K],q=k[I];if(N&&K!==I)if(q){var we=u(N),oe=u(q);if(we!==N.ownerDocument)if(oe!==N.ownerDocument)if(we!==oe){W=W.length?W:b(q);var Se=void 0;if(q instanceof ee.HTMLElement&&N instanceof ee.SVGElement&&!(N instanceof ee.SVGSVGElement)){if(N===oe)continue;Se=N.ownerSVGElement}else Se=N;for(var Ae=b(Se,q.ownerDocument),He=0;Ae[He]&&Ae[He]===W[He];)He++;var Ut=[Ae[He-1],Ae[He],W[He]];if(Ut[0])for(var At=Ut[0].lastChild;At;){if(At===Ut[1]){I=K,W=Ae;break}if(At===Ut[2])break;At=At.previousSibling}}else j=q,(parseInt(pe(A=N).getComputedStyle(A).zIndex,10)||0)>=(parseInt(pe(j).getComputedStyle(j).zIndex,10)||0)&&(I=K);else I=K}else I=K}return I})(a);return r.activeDrops[_]||null}function F(t,e,n){var r=t.dropState,o={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return n.type==="dragstart"&&(o.activate=new T(r,n,"dropactivate"),o.activate.target=null,o.activate.dropzone=null),n.type==="dragend"&&(o.deactivate=new T(r,n,"dropdeactivate"),o.deactivate.target=null,o.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(o.leave=new T(r,n,"dragleave"),n.dragLeave=o.leave.target=r.prev.element,n.prevDropzone=o.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(o.enter=new T(r,n,"dragenter"),n.dragEnter=r.cur.element,n.dropzone=r.cur.dropzone)),n.type==="dragend"&&r.cur.dropzone&&(o.drop=new T(r,n,"drop"),n.dropzone=r.cur.dropzone,n.relatedTarget=r.cur.element),n.type==="dragmove"&&r.cur.dropzone&&(o.move=new T(r,n,"dropmove"),n.dropzone=r.cur.dropzone)),o}function Z(t,e){var n=t.dropState,r=n.activeDrops,o=n.cur,i=n.prev;e.leave&&i.dropzone.fire(e.leave),e.enter&&o.dropzone.fire(e.enter),e.move&&o.dropzone.fire(e.move),e.drop&&o.dropzone.fire(e.drop),e.deactivate&&R(r,e.deactivate),n.prev.dropzone=o.dropzone,n.prev.element=o.element}function X(t,e){var n=t.interaction,r=t.iEvent,o=t.event;if(r.type==="dragmove"||r.type==="dragend"){var i=n.dropState;e.dynamicDrop&&(i.activeDrops=D(e,n.element));var a=r,c=$(n,a,o);i.rejected=i.rejected&&!!c&&c.dropzone===i.cur.dropzone&&c.element===i.cur.element,i.cur.dropzone=c&&c.dropzone,i.cur.element=c&&c.element,i.events=F(n,0,a)}}var Pe={id:"actions/drop",install:function(t){var e=t.actions,n=t.interactStatic,r=t.Interactable,o=t.defaults;t.usePlugin(je),r.prototype.dropzone=function(i){return(function(a,c){if(m.object(c)){if(a.options.drop.enabled=c.enabled!==!1,c.listeners){var l=Ce(c.listeners),p=Object.keys(l).reduce((function(h,x){return h[/^(enter|leave)/.test(x)?"drag".concat(x):/^(activate|deactivate|move)/.test(x)?"drop".concat(x):x]=l[x],h}),{}),f=a.options.drop.listeners;f&&a.off(f),a.on(p),a.options.drop.listeners=p}return m.func(c.ondrop)&&a.on("drop",c.ondrop),m.func(c.ondropactivate)&&a.on("dropactivate",c.ondropactivate),m.func(c.ondropdeactivate)&&a.on("dropdeactivate",c.ondropdeactivate),m.func(c.ondragenter)&&a.on("dragenter",c.ondragenter),m.func(c.ondragleave)&&a.on("dragleave",c.ondragleave),m.func(c.ondropmove)&&a.on("dropmove",c.ondropmove),/^(pointer|center)$/.test(c.overlap)?a.options.drop.overlap=c.overlap:m.number(c.overlap)&&(a.options.drop.overlap=Math.max(Math.min(1,c.overlap),0)),"accept"in c&&(a.options.drop.accept=c.accept),"checker"in c&&(a.options.drop.checker=c.checker),a}return m.bool(c)?(a.options.drop.enabled=c,a):a.options.drop})(this,i)},r.prototype.dropCheck=function(i,a,c,l,p,f){return(function(h,x,S,_,k,I,A){var j=!1;if(!(A=A||h.getRect(I)))return!!h.options.drop.checker&&h.options.drop.checker(x,S,j,h,I,_,k);var W=h.options.drop.overlap;if(W==="pointer"){var K=Ue(_,k,"drag"),N=Et(x);N.x+=K.x,N.y+=K.y;var q=N.x>A.left&&N.x<A.right,we=N.y>A.top&&N.y<A.bottom;j=q&&we}var oe=_.getRect(k);if(oe&&W==="center"){var Se=oe.left+oe.width/2,Ae=oe.top+oe.height/2;j=Se>=A.left&&Se<=A.right&&Ae>=A.top&&Ae<=A.bottom}return oe&&m.number(W)&&(j=Math.max(0,Math.min(A.right,oe.right)-Math.max(A.left,oe.left))*Math.max(0,Math.min(A.bottom,oe.bottom)-Math.max(A.top,oe.top))/(oe.width*oe.height)>=W),h.options.drop.checker&&(j=h.options.drop.checker(x,S,j,h,I,_,k)),j})(this,i,a,c,l,p,f)},n.dynamicDrop=function(i){return m.bool(i)?(t.dynamicDrop=i,n):t.dynamicDrop},C(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,o.actions.drop=Pe.defaults},listeners:{"interactions:before-action-start":function(t){var e=t.interaction;e.prepared.name==="drag"&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,e){var n=t.interaction,r=(t.event,t.iEvent);if(n.prepared.name==="drag"){var o=n.dropState;o.activeDrops=[],o.events={},o.activeDrops=D(e,n.element),o.events=F(n,0,r),o.events.activate&&(R(o.activeDrops,o.events.activate),e.fire("actions/drop:start",{interaction:n,dragEvent:r}))}},"interactions:action-move":X,"interactions:after-action-move":function(t,e){var n=t.interaction,r=t.iEvent;if(n.prepared.name==="drag"){var o=n.dropState;Z(n,o.events),e.fire("actions/drop:move",{interaction:n,dragEvent:r}),o.events={}}},"interactions:action-end":function(t,e){if(t.interaction.prepared.name==="drag"){var n=t.interaction,r=t.iEvent;X(t,e),Z(n,n.dropState.events),e.fire("actions/drop:end",{interaction:n,dragEvent:r})}},"interactions:stop":function(t){var e=t.interaction;if(e.prepared.name==="drag"){var n=e.dropState;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}}},getActiveDrops:D,getDrop:$,getDropEvents:F,fireDropEvents:Z,filterEventType:function(t){return t.search("drag")===0||t.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},$e=Pe;function Tt(t){var e=t.interaction,n=t.iEvent,r=t.phase;if(e.prepared.name==="gesture"){var o=e.pointers.map((function(p){return p.pointer})),i=r==="start",a=r==="end",c=e.interactable.options.deltaSource;if(n.touches=[o[0],o[1]],i)n.distance=ft(o,c),n.box=lt(o),n.scale=1,n.ds=0,n.angle=We(o,c),n.da=0,e.gesture.startDistance=n.distance,e.gesture.startAngle=n.angle;else if(a||e.pointers.length<2){var l=e.prevEvent;n.distance=l.distance,n.box=l.box,n.scale=l.scale,n.ds=0,n.angle=l.angle,n.da=0}else n.distance=ft(o,c),n.box=lt(o),n.scale=n.distance/e.gesture.startDistance,n.angle=We(o,c),n.ds=n.scale-e.gesture.scale,n.da=n.angle-e.gesture.angle;e.gesture.distance=n.distance,e.gesture.angle=n.angle,m.number(n.scale)&&n.scale!==1/0&&!isNaN(n.scale)&&(e.gesture.scale=n.scale)}}var St={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.gesturable=function(o){return m.object(o)?(this.options.gesture.enabled=o.enabled!==!1,this.setPerAction("gesture",o),this.setOnEvents("gesture",o),this):m.bool(o)?(this.options.gesture.enabled=o,this):this.options.gesture},e.map.gesture=St,e.methodDict.gesture="gesturable",r.actions.gesture=St.defaults},listeners:{"interactions:action-start":Tt,"interactions:action-move":Tt,"interactions:action-end":Tt,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var e=t.interactable.options.gesture;if(e&&e.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return t.search("gesture")===0}},Fr=St;function Ur(t,e,n,r,o,i,a){if(!e)return!1;if(e===!0){var c=m.number(i.width)?i.width:i.right-i.left,l=m.number(i.height)?i.height:i.bottom-i.top;if(a=Math.min(a,Math.abs((t==="left"||t==="right"?c:l)/2)),c<0&&(t==="left"?t="right":t==="right"&&(t="left")),l<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){var p=c>=0?i.left:i.right;return n.x<p+a}if(t==="top"){var f=l>=0?i.top:i.bottom;return n.y<f+a}if(t==="right")return n.x>(c>=0?i.right:i.left)-a;if(t==="bottom")return n.y>(l>=0?i.bottom:i.top)-a}return!!m.element(r)&&(m.element(e)?e===r:P(r,e,o))}function xn(t){var e=t.iEvent,n=t.interaction;if(n.prepared.name==="resize"&&n.resizeAxes){var r=e;n.interactable.options.resize.square?(n.resizeAxes==="y"?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=n.resizeAxes,n.resizeAxes==="x"?r.delta.y=0:n.resizeAxes==="y"&&(r.delta.x=0))}}var Ne,it,Le={id:"actions/resize",before:["actions/drag"],install:function(t){var e=t.actions,n=t.browser,r=t.Interactable,o=t.defaults;Le.cursors=(function(i){return i.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}})(n),Le.defaultMargin=n.supportsTouch||n.supportsPointerEvent?20:10,r.prototype.resizable=function(i){return(function(a,c,l){return m.object(c)?(a.options.resize.enabled=c.enabled!==!1,a.setPerAction("resize",c),a.setOnEvents("resize",c),m.string(c.axis)&&/^x$|^y$|^xy$/.test(c.axis)?a.options.resize.axis=c.axis:c.axis===null&&(a.options.resize.axis=l.defaults.actions.resize.axis),m.bool(c.preserveAspectRatio)?a.options.resize.preserveAspectRatio=c.preserveAspectRatio:m.bool(c.square)&&(a.options.resize.square=c.square),a):m.bool(c)?(a.options.resize.enabled=c,a):a.options.resize})(this,i,t)},e.map.resize=Le,e.methodDict.resize="resizable",o.actions.resize=Le.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){(function(e){var n=e.iEvent,r=e.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var o=n,i=r.rect;r._rects={start:C({},i),corrected:C({},i),previous:C({},i),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},o.edges=r.prepared.edges,o.rect=r._rects.corrected,o.deltaRect=r._rects.delta}})(t),xn(t)},"interactions:action-move":function(t){(function(e){var n=e.iEvent,r=e.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var o=n,i=r.interactable.options.resize.invert,a=i==="reposition"||i==="negate",c=r.rect,l=r._rects,p=l.start,f=l.corrected,h=l.delta,x=l.previous;if(C(x,f),a){if(C(f,c),i==="reposition"){if(f.top>f.bottom){var S=f.top;f.top=f.bottom,f.bottom=S}if(f.left>f.right){var _=f.left;f.left=f.right,f.right=_}}}else f.top=Math.min(c.top,p.bottom),f.bottom=Math.max(c.bottom,p.top),f.left=Math.min(c.left,p.right),f.right=Math.max(c.right,p.left);for(var k in f.width=f.right-f.left,f.height=f.bottom-f.top,f)h[k]=f[k]-x[k];o.edges=r.prepared.edges,o.rect=f,o.deltaRect=h}})(t),xn(t)},"interactions:action-end":function(t){var e=t.iEvent,n=t.interaction;if(n.prepared.name==="resize"&&n.prepared.edges){var r=e;r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}},"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.element,o=t.rect,i=t.buttons;if(o){var a=C({},e.coords.cur.page),c=n.options.resize;if(c&&c.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||(i&c.mouseButtons)!=0)){if(m.object(c.edges)){var l={left:!1,right:!1,top:!1,bottom:!1};for(var p in l)l[p]=Ur(p,c.edges[p],a,e._latestPointer.eventTarget,r,o,c.margin||Le.defaultMargin);l.left=l.left&&!l.right,l.top=l.top&&!l.bottom,(l.left||l.right||l.top||l.bottom)&&(t.action={name:"resize",edges:l})}else{var f=c.axis!=="y"&&a.x>o.right-Le.defaultMargin,h=c.axis!=="x"&&a.y>o.bottom-Le.defaultMargin;(f||h)&&(t.action={name:"resize",axes:(f?"x":"")+(h?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var e=t.edges,n=t.axis,r=t.name,o=Le.cursors,i=null;if(n)i=o[r+n];else if(e){for(var a="",c=0,l=["top","bottom","left","right"];c<l.length;c++){var p=l[c];e[p]&&(a+=p)}i=o[a]}return i},filterEventType:function(t){return t.search("resize")===0},defaultMargin:null},Br=Le,Wr={id:"actions",install:function(t){t.usePlugin(Fr),t.usePlugin(Br),t.usePlugin(je),t.usePlugin($e)}},En=0,Xe={request:function(t){return Ne(t)},cancel:function(t){return it(t)},init:function(t){if(Ne=t.requestAnimationFrame,it=t.cancelAnimationFrame,!Ne)for(var e=["ms","moz","webkit","o"],n=0;n<e.length;n++){var r=e[n];Ne=t["".concat(r,"RequestAnimationFrame")],it=t["".concat(r,"CancelAnimationFrame")]||t["".concat(r,"CancelRequestAnimationFrame")]}Ne=Ne&&Ne.bind(t),it=it&&it.bind(t),Ne||(Ne=function(o){var i=Date.now(),a=Math.max(0,16-(i-En)),c=t.setTimeout((function(){o(i+a)}),a);return En=i+a,c},it=function(o){return clearTimeout(o)})}},H={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(t){H.isScrolling=!0,Xe.cancel(H.i),t.autoScroll=H,H.interaction=t,H.prevTime=H.now(),H.i=Xe.request(H.scroll)},stop:function(){H.isScrolling=!1,H.interaction&&(H.interaction.autoScroll=null),Xe.cancel(H.i)},scroll:function(){var t=H.interaction,e=t.interactable,n=t.element,r=t.prepared.name,o=e.options[r].autoScroll,i=wn(o.container,e,n),a=H.now(),c=(a-H.prevTime)/1e3,l=o.speed*c;if(l>=1){var p={x:H.x*l,y:H.y*l};if(p.x||p.y){var f=_n(i);m.window(i)?i.scrollBy(p.x,p.y):i&&(i.scrollLeft+=p.x,i.scrollTop+=p.y);var h=_n(i),x={x:h.x-f.x,y:h.y-f.y};(x.x||x.y)&&e.fire({type:"autoscroll",target:n,interactable:e,delta:x,interaction:t,container:i})}H.prevTime=a}H.isScrolling&&(Xe.cancel(H.i),H.i=Xe.request(H.scroll))},check:function(t,e){var n;return(n=t.options[e].autoScroll)==null?void 0:n.enabled},onInteractionMove:function(t){var e=t.interaction,n=t.pointer;if(e.interacting()&&H.check(e.interactable,e.prepared.name))if(e.simulation)H.x=H.y=0;else{var r,o,i,a,c=e.interactable,l=e.element,p=e.prepared.name,f=c.options[p].autoScroll,h=wn(f.container,c,l);if(m.window(h))a=n.clientX<H.margin,r=n.clientY<H.margin,o=n.clientX>h.innerWidth-H.margin,i=n.clientY>h.innerHeight-H.margin;else{var x=U(h);a=n.clientX<x.left+H.margin,r=n.clientY<x.top+H.margin,o=n.clientX>x.right-H.margin,i=n.clientY>x.bottom-H.margin}H.x=o?1:a?-1:0,H.y=i?1:r?-1:0,H.isScrolling||(H.margin=f.margin,H.speed=f.speed,H.start(e))}}};function wn(t,e,n){return(m.string(t)?ke(t,e,n):t)||pe(n)}function _n(t){return m.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var qr={id:"auto-scroll",install:function(t){var e=t.defaults,n=t.actions;t.autoScroll=H,H.now=function(){return t.now()},n.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=H.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,H.stop(),H.interaction&&(H.interaction=null)},"interactions:stop":H.stop,"interactions:action-move":function(t){return H.onInteractionMove(t)}}},Gr=qr;function kt(t,e){var n=!1;return function(){return n||(ve.console.warn(e),n=!0),t.apply(this,arguments)}}function $t(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t}function $r(t){return m.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Xr(t){return m.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Vr={id:"auto-start/interactableMethods",install:function(t){var e=t.Interactable;e.prototype.getAction=function(n,r,o,i){var a=(function(c,l,p,f,h){var x=c.getRect(f),S=l.buttons||{0:1,1:4,3:8,4:16}[l.button],_={action:null,interactable:c,interaction:p,element:f,rect:x,buttons:S};return h.fire("auto-start:check",_),_.action})(this,r,o,i,t);return this.options.actionChecker?this.options.actionChecker(n,r,a,this,i,o):a},e.prototype.ignoreFrom=kt((function(n){return this._backCompatOption("ignoreFrom",n)}),"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=kt((function(n){return this._backCompatOption("allowFrom",n)}),"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=Xr,e.prototype.styleCursor=$r}};function Tn(t,e,n,r,o){return e.testIgnoreAllow(e.options[t.name],n,r)&&e.options[t.name].enabled&&Dt(e,n,t,o)?t:null}function Kr(t,e,n,r,o,i,a){for(var c=0,l=r.length;c<l;c++){var p=r[c],f=o[c],h=p.getAction(e,n,t,f);if(h){var x=Tn(h,p,f,i,a);if(x)return{action:x,interactable:p,element:f}}}return{action:null,interactable:null,element:null}}function Sn(t,e,n,r,o){var i=[],a=[],c=r;function l(f){i.push(f),a.push(c)}for(;m.element(c);){i=[],a=[],o.interactables.forEachMatch(c,l);var p=Kr(t,e,n,i,a,r,o);if(p.action&&!p.interactable.options[p.action.name].manualStart)return p;c=le(c)}return{action:null,interactable:null,element:null}}function kn(t,e,n){var r=e.action,o=e.interactable,i=e.element;r=r||{name:null},t.interactable=o,t.element=i,$t(t.prepared,r),t.rect=o&&r.name?o.getRect(i):null,On(t,n),n.fire("autoStart:prepared",{interaction:t})}function Dt(t,e,n,r){var o=t.options,i=o[n.name].max,a=o[n.name].maxPerElement,c=r.autoStart.maxInteractions,l=0,p=0,f=0;if(!(i&&a&&c))return!1;for(var h=0,x=r.interactions.list;h<x.length;h++){var S=x[h],_=S.prepared.name;if(S.interacting()&&(++l>=c||S.interactable===t&&((p+=_===n.name?1:0)>=i||S.element===e&&(f++,_===n.name&&f>=a))))return!1}return c>0}function Rn(t,e){return m.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function Xt(t,e,n){var r=n.autoStart.cursorElement;r&&r!==t&&(r.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,n.autoStart.cursorElement=e?t:null}function On(t,e){var n=t.interactable,r=t.element,o=t.prepared;if(t.pointerType==="mouse"&&n&&n.options.styleCursor){var i="";if(o.name){var a=n.options[o.name].cursorChecker;i=m.func(a)?a(o,n,r,t._interacting):e.actions.map[o.name].getCursor(o)}Xt(t.element,i||"",e)}else e.autoStart.cursorElement&&Xt(e.autoStart.cursorElement,"",e)}var Qr={id:"auto-start/base",before:["actions"],install:function(t){var e=t.interactStatic,n=t.defaults;t.usePlugin(Vr),n.base.actionChecker=null,n.base.styleCursor=!0,C(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=function(r){return Rn(r,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:Dt,cursorElement:null}},listeners:{"interactions:down":function(t,e){var n=t.interaction,r=t.pointer,o=t.event,i=t.eventTarget;n.interacting()||kn(n,Sn(n,r,o,i,e),e)},"interactions:move":function(t,e){(function(n,r){var o=n.interaction,i=n.pointer,a=n.event,c=n.eventTarget;o.pointerType!=="mouse"||o.pointerIsDown||o.interacting()||kn(o,Sn(o,i,a,c,r),r)})(t,e),(function(n,r){var o=n.interaction;if(o.pointerIsDown&&!o.interacting()&&o.pointerWasMoved&&o.prepared.name){r.fire("autoStart:before-start",n);var i=o.interactable,a=o.prepared.name;a&&i&&(i.options[a].manualStart||!Dt(i,o.element,o.prepared,r)?o.stop():(o.start(o.prepared,i,o.element),On(o,r)))}})(t,e)},"interactions:stop":function(t,e){var n=t.interaction,r=n.interactable;r&&r.options.styleCursor&&Xt(n.element,"",e)}},maxInteractions:Rn,withinInteractionLimit:Dt,validateAction:Tn},Vt=Qr,Jr={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,e){var n=t.interaction,r=t.eventTarget,o=t.dx,i=t.dy;if(n.prepared.name==="drag"){var a=Math.abs(o),c=Math.abs(i),l=n.interactable.options.drag,p=l.startAxis,f=a>c?"x":a<c?"y":"xy";if(n.prepared.axis=l.lockAxis==="start"?f[0]:l.lockAxis,f!=="xy"&&p!=="xy"&&p!==f){n.prepared.name=null;for(var h=r,x=function(_){if(_!==n.interactable){var k=n.interactable.options.drag;if(!k.manualStart&&_.testIgnoreAllow(k,h,r)){var I=_.getAction(n.downPointer,n.downEvent,n,h);if(I&&I.name==="drag"&&(function(A,j){if(!j)return!1;var W=j.options.drag.startAxis;return A==="xy"||W==="xy"||W===A})(f,_)&&Vt.validateAction(I,_,h,r,e))return _}}};m.element(h);){var S=e.interactables.forEachMatch(h,x);if(S){n.prepared.name="drag",n.interactable=S,n.element=h;break}h=le(h)}}}}}};function Kt(t){var e=t.prepared&&t.prepared.name;if(!e)return null;var n=t.interactable.options;return n[e].hold||n[e].delay}var Zr={id:"auto-start/hold",install:function(t){var e=t.defaults;t.usePlugin(Vt),e.perAction.hold=0,e.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var e=t.interaction,n=Kt(e);n>0&&(e.autoStartHoldTimer=setTimeout((function(){e.start(e.prepared,e.interactable,e.element)}),n))},"interactions:move":function(t){var e=t.interaction,n=t.duplicate;e.autoStartHoldTimer&&e.pointerWasMoved&&!n&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var e=t.interaction;Kt(e)>0&&(e.prepared.name=null)}},getHoldDuration:Kt},eo=Zr,to={id:"auto-start",install:function(t){t.usePlugin(Vt),t.usePlugin(eo),t.usePlugin(Jr)}},no=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):m.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function ro(t){var e=t.interaction,n=t.event;e.interactable&&e.interactable.checkAndPreventDefault(n)}var Cn={id:"core/interactablePreventDefault",install:function(t){var e=t.Interactable;e.prototype.preventDefault=no,e.prototype.checkAndPreventDefault=function(n){return(function(r,o,i){var a=r.options.preventDefault;if(a!=="never")if(a!=="always"){if(o.events.supportsPassive&&/^touch(start|move)$/.test(i.type)){var c=pe(i.target).document,l=o.getDocOptions(c);if(!l||!l.events||l.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(i.type)||m.element(i.target)&&me(i.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||i.preventDefault()}else i.preventDefault()})(this,t,n)},t.interactions.docEvents.push({type:"dragstart",listener:function(n){for(var r=0,o=t.interactions.list;r<o.length;r++){var i=o[r];if(i.element&&(i.element===n.target||ue(i.element,n.target)))return void i.interactable.checkAndPreventDefault(n)}}})},listeners:["down","move","up","cancel"].reduce((function(t,e){return t["interactions:".concat(e)]=ro,t}),{})};function jt(t,e){if(e.phaselessTypes[t])return!0;for(var n in e.map)if(t.indexOf(n)===0&&t.substr(n.length)in e.phases)return!0;return!1}function pt(t){var e={};for(var n in t){var r=t[n];m.plainObject(r)?e[n]=pt(r):m.array(r)?e[n]=Ge(r):e[n]=r}return e}var Qt=(function(){function t(e){O(this,t),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=e,this.result=zt(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return L(t,[{key:"start",value:function(e,n){var r,o,i=e.phase,a=this.interaction,c=(function(p){var f=p.interactable.options[p.prepared.name],h=f.modifiers;return h&&h.length?h:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map((function(x){var S=f[x];return S&&S.enabled&&{options:S,methods:S._methods}})).filter((function(x){return!!x}))})(a);this.prepareStates(c),this.startEdges=C({},a.edges),this.edges=C({},this.startEdges),this.startOffset=(r=a.rect,o=n,r?{left:o.x-r.left,top:o.y-r.top,right:r.right-o.x,bottom:r.bottom-o.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var l=this.fillArg({phase:i,pageCoords:n,preEnd:!1});return this.result=zt(),this.startAll(l),this.result=this.setAll(l)}},{key:"fillArg",value:function(e){var n=this.interaction;return e.interaction=n,e.interactable=n.interactable,e.element=n.element,e.rect||(e.rect=n.rect),e.edges||(e.edges=this.startEdges),e.startOffset=this.startOffset,e}},{key:"startAll",value:function(e){for(var n=0,r=this.states;n<r.length;n++){var o=r[n];o.methods.start&&(e.state=o,o.methods.start(e))}}},{key:"setAll",value:function(e){var n=e.phase,r=e.preEnd,o=e.skipModifiers,i=e.rect,a=e.edges;e.coords=C({},e.pageCoords),e.rect=C({},i),e.edges=C({},a);for(var c=o?this.states.slice(o):this.states,l=zt(e.coords,e.rect),p=0;p<c.length;p++){var f,h=c[p],x=h.options,S=C({},e.coords),_=null;(f=h.methods)!=null&&f.set&&this.shouldDo(x,r,n)&&(e.state=h,_=h.methods.set(e),et(e.edges,e.rect,{x:e.coords.x-S.x,y:e.coords.y-S.y})),l.eventProps.push(_)}C(this.edges,e.edges),l.delta.x=e.coords.x-e.pageCoords.x,l.delta.y=e.coords.y-e.pageCoords.y,l.rectDelta.left=e.rect.left-i.left,l.rectDelta.right=e.rect.right-i.right,l.rectDelta.top=e.rect.top-i.top,l.rectDelta.bottom=e.rect.bottom-i.bottom;var k=this.result.coords,I=this.result.rect;if(k&&I){var A=l.rect.left!==I.left||l.rect.right!==I.right||l.rect.top!==I.top||l.rect.bottom!==I.bottom;l.changed=A||k.x!==l.coords.x||k.y!==l.coords.y}return l}},{key:"applyToInteraction",value:function(e){var n=this.interaction,r=e.phase,o=n.coords.cur,i=n.coords.start,a=this.result,c=this.startDelta,l=a.delta;r==="start"&&C(this.startDelta,a.delta);for(var p=0,f=[[i,c],[o,l]];p<f.length;p++){var h=f[p],x=h[0],S=h[1];x.page.x+=S.x,x.page.y+=S.y,x.client.x+=S.x,x.client.y+=S.y}var _=this.result.rectDelta,k=e.rect||n.rect;k.left+=_.left,k.right+=_.right,k.top+=_.top,k.bottom+=_.bottom,k.width=k.right-k.left,k.height=k.bottom-k.top}},{key:"setAndApply",value:function(e){var n=this.interaction,r=e.phase,o=e.preEnd,i=e.skipModifiers,a=this.setAll(this.fillArg({preEnd:o,phase:r,pageCoords:e.modifiedCoords||n.coords.cur.page}));if(this.result=a,!a.changed&&(!i||i<this.states.length)&&n.interacting())return!1;if(e.modifiedCoords){var c=n.coords.cur.page,l={x:e.modifiedCoords.x-c.x,y:e.modifiedCoords.y-c.y};a.coords.x+=l.x,a.coords.y+=l.y,a.delta.x+=l.x,a.delta.y+=l.y}this.applyToInteraction(e)}},{key:"beforeEnd",value:function(e){var n=e.interaction,r=e.event,o=this.states;if(o&&o.length){for(var i=!1,a=0;a<o.length;a++){var c=o[a];e.state=c;var l=c.options,p=c.methods,f=p.beforeEnd&&p.beforeEnd(e);if(f)return this.endResult=f,!1;i=i||!i&&this.shouldDo(l,!0,e.phase,!0)}i&&n.move({event:r,preEnd:!0})}}},{key:"stop",value:function(e){var n=e.interaction;if(this.states&&this.states.length){var r=C({states:this.states,interactable:n.interactable,element:n.element,rect:null},e);this.fillArg(r);for(var o=0,i=this.states;o<i.length;o++){var a=i[o];r.state=a,a.methods.stop&&a.methods.stop(r)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(e){this.states=[];for(var n=0;n<e.length;n++){var r=e[n],o=r.options,i=r.methods,a=r.name;this.states.push({options:o,methods:i,index:n,name:a})}return this.states}},{key:"restoreInteractionCoords",value:function(e){var n=e.interaction,r=n.coords,o=n.rect,i=n.modification;if(i.result){for(var a=i.startDelta,c=i.result,l=c.delta,p=c.rectDelta,f=0,h=[[r.start,a],[r.cur,l]];f<h.length;f++){var x=h[f],S=x[0],_=x[1];S.page.x-=_.x,S.page.y-=_.y,S.client.x-=_.x,S.client.y-=_.y}o.left-=p.left,o.right-=p.right,o.top-=p.top,o.bottom-=p.bottom}}},{key:"shouldDo",value:function(e,n,r,o){return!(!e||e.enabled===!1||o&&!e.endOnly||e.endOnly&&!n||r==="start"&&!e.setStart)}},{key:"copyFrom",value:function(e){this.startOffset=e.startOffset,this.startDelta=e.startDelta,this.startEdges=e.startEdges,this.edges=e.edges,this.states=e.states.map((function(n){return pt(n)})),this.result=zt(C({},e.result.coords),C({},e.result.rect))}},{key:"destroy",value:function(){for(var e in this)this[e]=null}}]),t})();function zt(t,e){return{rect:e,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function Ve(t,e){var n=t.defaults,r={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},o=function(i){var a=i||{};for(var c in a.enabled=a.enabled!==!1,n)c in a||(a[c]=n[c]);var l={options:a,methods:r,name:e,enable:function(){return a.enabled=!0,l},disable:function(){return a.enabled=!1,l}};return l};return e&&typeof e=="string"&&(o._defaults=n,o._methods=r),o}function Rt(t){var e=t.iEvent,n=t.interaction.modification.result;n&&(e.modifiers=n.eventProps)}var oo={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var e=t.interaction;e.modification=new Qt(e)},"interactions:before-action-start":function(t){var e=t.interaction,n=t.interaction.modification;n.start(t,e.coords.start.page),e.edges=n.edges,n.applyToInteraction(t)},"interactions:before-action-move":function(t){var e=t.interaction,n=e.modification,r=n.setAndApply(t);return e.edges=n.edges,r},"interactions:before-action-end":function(t){var e=t.interaction,n=e.modification,r=n.beforeEnd(t);return e.edges=n.startEdges,r},"interactions:action-start":Rt,"interactions:action-move":Rt,"interactions:action-end":Rt,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},Pn=oo,An={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Jt=(function(t){ie(n,t);var e=ne(n);function n(r,o,i,a,c,l,p){var f;O(this,n),(f=e.call(this,r)).relatedTarget=null,f.screenX=void 0,f.screenY=void 0,f.button=void 0,f.buttons=void 0,f.ctrlKey=void 0,f.shiftKey=void 0,f.altKey=void 0,f.metaKey=void 0,f.page=void 0,f.client=void 0,f.delta=void 0,f.rect=void 0,f.x0=void 0,f.y0=void 0,f.t0=void 0,f.dt=void 0,f.duration=void 0,f.clientX0=void 0,f.clientY0=void 0,f.velocity=void 0,f.speed=void 0,f.swipe=void 0,f.axes=void 0,f.preEnd=void 0,c=c||r.element;var h=r.interactable,x=(h&&h.options||An).deltaSource,S=Ue(h,c,i),_=a==="start",k=a==="end",I=_?se(f):r.prevEvent,A=_?r.coords.start:k?{page:I.page,client:I.client,timeStamp:r.coords.cur.timeStamp}:r.coords.cur;return f.page=C({},A.page),f.client=C({},A.client),f.rect=C({},r.rect),f.timeStamp=A.timeStamp,k||(f.page.x-=S.x,f.page.y-=S.y,f.client.x-=S.x,f.client.y-=S.y),f.ctrlKey=o.ctrlKey,f.altKey=o.altKey,f.shiftKey=o.shiftKey,f.metaKey=o.metaKey,f.button=o.button,f.buttons=o.buttons,f.target=c,f.currentTarget=c,f.preEnd=l,f.type=p||i+(a||""),f.interactable=h,f.t0=_?r.pointers[r.pointers.length-1].downTime:I.t0,f.x0=r.coords.start.page.x-S.x,f.y0=r.coords.start.page.y-S.y,f.clientX0=r.coords.start.client.x-S.x,f.clientY0=r.coords.start.client.y-S.y,f.delta=_||k?{x:0,y:0}:{x:f[x].x-I[x].x,y:f[x].y-I[x].y},f.dt=r.coords.delta.timeStamp,f.duration=f.timeStamp-f.t0,f.velocity=C({},r.coords.velocity[x]),f.speed=Be(f.velocity.x,f.velocity.y),f.swipe=k||a==="inertiastart"?f.getSwipe():null,f}return L(n,[{key:"getSwipe",value:function(){var r=this._interaction;if(r.prevEvent.speed<600||this.timeStamp-r.prevEvent.timeStamp>150)return null;var o=180*Math.atan2(r.prevEvent.velocityY,r.prevEvent.velocityX)/Math.PI;o<0&&(o+=360);var i=112.5<=o&&o<247.5,a=202.5<=o&&o<337.5;return{up:a,down:!a&&22.5<=o&&o<157.5,left:i,right:!i&&(292.5<=o||o<67.5),angle:o,speed:r.prevEvent.speed,velocity:{x:r.prevEvent.velocityX,y:r.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),n})(qe);Object.defineProperties(Jt.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var io=L((function t(e,n,r,o,i){O(this,t),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=e,this.pointer=n,this.event=r,this.downTime=o,this.downTarget=i})),ao=(function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t})({}),Mn=(function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t})({}),so=0,co=(function(){function t(e){var n=this,r=e.pointerType,o=e.scopeFire;O(this,t),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=kt((function(f){this.move(f)}),"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=so++,this._scopeFire=o,this.pointerType=r;var i=this;this._proxy={};var a=function(f){Object.defineProperty(n._proxy,f,{get:function(){return i[f]}})};for(var c in ao)a(c);var l=function(f){Object.defineProperty(n._proxy,f,{value:function(){return i[f].apply(i,arguments)}})};for(var p in Mn)l(p);this._scopeFire("interactions:new",{interaction:this})}return L(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(e,n,r){var o=this.updatePointer(e,n,r,!0),i=this.pointers[o];this._scopeFire("interactions:down",{pointer:e,event:n,eventTarget:r,pointerIndex:o,pointerInfo:i,type:"down",interaction:this})}},{key:"start",value:function(e,n,r){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(e.name==="gesture"?2:1)||!n.options[e.name].enabled)&&($t(this.prepared,e),this.interactable=n,this.element=r,this.rect=n.getRect(r),this.edges=this.prepared.edges?C({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(e,n,r){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(e,n,r,!1);var o,i,a=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(o=this.coords.cur.client.x-this.coords.start.client.x,i=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Be(o,i)>this.pointerMoveTolerance);var c,l,p,f=this.getPointerIndex(e),h={pointer:e,pointerIndex:f,pointerInfo:this.pointers[f],event:n,type:"move",eventTarget:r,dx:o,dy:i,duplicate:a,interaction:this};a||(c=this.coords.velocity,l=this.coords.delta,p=Math.max(l.timeStamp/1e3,.001),c.page.x=l.page.x/p,c.page.y=l.page.y/p,c.client.x=l.client.x/p,c.client.y=l.client.y/p,c.timeStamp=p),this._scopeFire("interactions:move",h),a||this.simulation||(this.interacting()&&(h.type=null,this.move(h)),this.pointerWasMoved&&ze(this.coords.prev,this.coords.cur))}},{key:"move",value:function(e){e&&e.event||bt(this.coords.delta),(e=C({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},e||{})).phase="move",this._doPhase(e)}},{key:"pointerUp",value:function(e,n,r,o){var i=this.getPointerIndex(e);i===-1&&(i=this.updatePointer(e,n,r,!1));var a=/cancel$/i.test(n.type)?"cancel":"up";this._scopeFire("interactions:".concat(a),{pointer:e,pointerIndex:i,pointerInfo:this.pointers[i],event:n,eventTarget:r,type:a,curEventTarget:o,interaction:this}),this.simulation||this.end(n),this.removePointer(e,n)}},{key:"documentBlur",value:function(e){this.end(e),this._scopeFire("interactions:blur",{event:e,type:"blur",interaction:this})}},{key:"end",value:function(e){var n;this._ending=!0,e=e||this._latestPointer.event,this.interacting()&&(n=this._doPhase({event:e,interaction:this,phase:"end"})),this._ending=!1,n===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(e){var n=nt(e);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:s(this.pointers,(function(r){return r.id===n}))}},{key:"getPointerInfo",value:function(e){return this.pointers[this.getPointerIndex(e)]}},{key:"updatePointer",value:function(e,n,r,o){var i,a,c,l=nt(e),p=this.getPointerIndex(e),f=this.pointers[p];return o=o!==!1&&(o||/(down|start)$/i.test(n.type)),f?f.pointer=e:(f=new io(l,e,n,null,null),p=this.pointers.length,this.pointers.push(f)),Gt(this.coords.cur,this.pointers.map((function(h){return h.pointer})),this._now()),i=this.coords.delta,a=this.coords.prev,c=this.coords.cur,i.page.x=c.page.x-a.page.x,i.page.y=c.page.y-a.page.y,i.client.x=c.client.x-a.client.x,i.client.y=c.client.y-a.client.y,i.timeStamp=c.timeStamp-a.timeStamp,o&&(this.pointerIsDown=!0,f.downTime=this.coords.cur.timeStamp,f.downTarget=r,B(this.downPointer,e),this.interacting()||(ze(this.coords.start,this.coords.cur),ze(this.coords.prev,this.coords.cur),this.downEvent=n,this.pointerWasMoved=!1)),this._updateLatestPointer(e,n,r),this._scopeFire("interactions:update-pointer",{pointer:e,event:n,eventTarget:r,down:o,pointerInfo:f,pointerIndex:p,interaction:this}),p}},{key:"removePointer",value:function(e,n){var r=this.getPointerIndex(e);if(r!==-1){var o=this.pointers[r];this._scopeFire("interactions:remove-pointer",{pointer:e,event:n,eventTarget:null,pointerIndex:r,pointerInfo:o,interaction:this}),this.pointers.splice(r,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(e,n,r){this._latestPointer.pointer=e,this._latestPointer.event=n,this._latestPointer.eventTarget=r}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(e,n,r,o){return new Jt(this,e,this.prepared.name,n,this.element,r,o)}},{key:"_fireEvent",value:function(e){var n;(n=this.interactable)==null||n.fire(e),(!this.prevEvent||e.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=e)}},{key:"_doPhase",value:function(e){var n=e.event,r=e.phase,o=e.preEnd,i=e.type,a=this.rect;if(a&&r==="move"&&(et(this.edges,a,this.coords.delta[this.interactable.options.deltaSource]),a.width=a.right-a.left,a.height=a.bottom-a.top),this._scopeFire("interactions:before-action-".concat(r),e)===!1)return!1;var c=e.iEvent=this._createPreparedEvent(n,r,o,i);return this._scopeFire("interactions:action-".concat(r),e),r==="start"&&(this.prevEvent=c),this._fireEvent(c),this._scopeFire("interactions:after-action-".concat(r),e),!0}},{key:"_now",value:function(){return Date.now()}}]),t})();function In(t){Dn(t.interaction)}function Dn(t){if(!(function(n){return!(!n.offset.pending.x&&!n.offset.pending.y)})(t))return!1;var e=t.offset.pending;return Zt(t.coords.cur,e),Zt(t.coords.delta,e),et(t.edges,t.rect,e),e.x=0,e.y=0,!0}function uo(t){var e=t.x,n=t.y;this.offset.pending.x+=e,this.offset.pending.y+=n,this.offset.total.x+=e,this.offset.total.y+=n}function Zt(t,e){var n=t.page,r=t.client,o=e.x,i=e.y;n.x+=o,n.y+=i,r.x+=o,r.y+=i}Mn.offsetBy="";var lo={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=uo},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return(function(e){e.pointerIsDown&&(Zt(e.coords.cur,e.offset.total),e.offset.pending.x=0,e.offset.pending.y=0)})(t.interaction)},"interactions:before-action-start":In,"interactions:before-action-move":In,"interactions:before-action-end":function(t){var e=t.interaction;if(Dn(e))return e.move({offset:!0}),e.end(),!1},"interactions:stop":function(t){var e=t.interaction;e.offset.total.x=0,e.offset.total.y=0,e.offset.pending.x=0,e.offset.pending.y=0}}},jn=lo,fo=(function(){function t(e){O(this,t),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=e}return L(t,[{key:"start",value:function(e){var n=this.interaction,r=Nt(n);if(!r||!r.enabled)return!1;var o=n.coords.velocity.client,i=Be(o.x,o.y),a=this.modification||(this.modification=new Qt(n));if(a.copyFrom(n.modification),this.t0=n._now(),this.allowResume=r.allowResume,this.v0=i,this.currentOffset={x:0,y:0},this.startCoords=n.coords.cur.page,this.modifierArg=a.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-n.coords.cur.timeStamp<50&&i>r.minSpeed&&i>r.endSpeed)this.startInertia();else{if(a.result=a.setAll(this.modifierArg),!a.result.changed)return!1;this.startSmoothEnd()}return n.modification.result.rect=null,n.offsetBy(this.targetOffset),n._doPhase({interaction:n,event:e,phase:"inertiastart"}),n.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),n.modification.result.rect=null,this.active=!0,n.simulation=this,!0}},{key:"startInertia",value:function(){var e=this,n=this.interaction.coords.velocity.client,r=Nt(this.interaction),o=r.resistance,i=-Math.log(r.endSpeed/this.v0)/o;this.targetOffset={x:(n.x-i)/o,y:(n.y-i)/o},this.te=i,this.lambda_v0=o/this.v0,this.one_ve_v0=1-r.endSpeed/this.v0;var a=this.modification,c=this.modifierArg;c.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},a.result=a.setAll(c),a.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+a.result.delta.x,y:this.targetOffset.y+a.result.delta.y}),this.onNextFrame((function(){return e.inertiaTick()}))}},{key:"startSmoothEnd",value:function(){var e=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame((function(){return e.smoothEndTick()}))}},{key:"onNextFrame",value:function(e){var n=this;this.timeout=Xe.request((function(){n.active&&e()}))}},{key:"inertiaTick",value:function(){var e,n,r,o,i,a,c,l=this,p=this.interaction,f=Nt(p).resistance,h=(p._now()-this.t0)/1e3;if(h<this.te){var x,S=1-(Math.exp(-f*h)-this.lambda_v0)/this.one_ve_v0;this.isModified?(e=0,n=0,r=this.targetOffset.x,o=this.targetOffset.y,i=this.modifiedOffset.x,a=this.modifiedOffset.y,x={x:zn(c=S,e,r,i),y:zn(c,n,o,a)}):x={x:this.targetOffset.x*S,y:this.targetOffset.y*S};var _={x:x.x-this.currentOffset.x,y:x.y-this.currentOffset.y};this.currentOffset.x+=_.x,this.currentOffset.y+=_.y,p.offsetBy(_),p.move(),this.onNextFrame((function(){return l.inertiaTick()}))}else p.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var e=this,n=this.interaction,r=n._now()-this.t0,o=Nt(n).smoothEndDuration;if(r<o){var i={x:Nn(r,0,this.targetOffset.x,o),y:Nn(r,0,this.targetOffset.y,o)},a={x:i.x-this.currentOffset.x,y:i.y-this.currentOffset.y};this.currentOffset.x+=a.x,this.currentOffset.y+=a.y,n.offsetBy(a),n.move({skipModifiers:this.modifierCount}),this.onNextFrame((function(){return e.smoothEndTick()}))}else n.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(e){var n=e.pointer,r=e.event,o=e.eventTarget,i=this.interaction;i.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),i.updatePointer(n,r,o,!0),i._doPhase({interaction:i,event:r,phase:"resume"}),ze(i.coords.prev,i.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Xe.cancel(this.timeout)}}]),t})();function Nt(t){var e=t.interactable,n=t.prepared;return e&&e.options&&n.name&&e.options[n.name].inertia}var po={id:"inertia",before:["modifiers","actions"],install:function(t){var e=t.defaults;t.usePlugin(jn),t.usePlugin(Pn),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,e.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var e=t.interaction;e.inertia=new fo(e)},"interactions:before-action-end":function(t){var e=t.interaction,n=t.event;return(!e._interacting||e.simulation||!e.inertia.start(n))&&null},"interactions:down":function(t){var e=t.interaction,n=t.eventTarget,r=e.inertia;if(r.active)for(var o=n;m.element(o);){if(o===e.element){r.resume(t);break}o=le(o)}},"interactions:stop":function(t){var e=t.interaction.inertia;e.active&&e.stop()},"interactions:before-action-resume":function(t){var e=t.interaction.modification;e.stop(t),e.start(t,t.interaction.coords.cur.page),e.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":Rt,"interactions:action-inertiastart":Rt,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function zn(t,e,n,r){var o=1-t;return o*o*e+2*o*t*n+t*t*r}function Nn(t,e,n,r){return-n*(t/=r)*(t-2)+e}var ho=po;function Ln(t,e){for(var n=0;n<e.length;n++){var r=e[n];if(t.immediatePropagationStopped)break;r(t)}}var Hn=(function(){function t(e){O(this,t),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=C({},e||{})}return L(t,[{key:"fire",value:function(e){var n,r=this.global;(n=this.types[e.type])&&Ln(e,n),!e.propagationStopped&&r&&(n=r[e.type])&&Ln(e,n)}},{key:"on",value:function(e,n){var r=Ce(e,n);for(e in r)this.types[e]=_t(this.types[e]||[],r[e])}},{key:"off",value:function(e,n){var r=Ce(e,n);for(e in r){var o=this.types[e];if(o&&o.length)for(var i=0,a=r[e];i<a.length;i++){var c=a[i],l=o.indexOf(c);l!==-1&&o.splice(l,1)}}}},{key:"getRect",value:function(e){return null}}]),t})(),vo=(function(){function t(e){O(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=e,B(this,e)}return L(t,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),t})();function Ot(t){return m.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function Lt(t,e){return t===e||(typeof t=="boolean"?!!e.capture===t&&!e.passive:!!t.capture==!!e.capture&&!!t.passive==!!e.passive)}var go={id:"events",install:function(t){var e,n=[],r={},o=[],i={add:a,remove:c,addDelegate:function(f,h,x,S,_){var k=Ot(_);if(!r[x]){r[x]=[];for(var I=0;I<o.length;I++){var A=o[I];a(A,x,l),a(A,x,p,!0)}}var j=r[x],W=d(j,(function(K){return K.selector===f&&K.context===h}));W||(W={selector:f,context:h,listeners:[]},j.push(W)),W.listeners.push({func:S,options:k})},removeDelegate:function(f,h,x,S,_){var k,I=Ot(_),A=r[x],j=!1;if(A)for(k=A.length-1;k>=0;k--){var W=A[k];if(W.selector===f&&W.context===h){for(var K=W.listeners,N=K.length-1;N>=0;N--){var q=K[N];if(q.func===S&&Lt(q.options,I)){K.splice(N,1),K.length||(A.splice(k,1),c(h,x,l),c(h,x,p,!0)),j=!0;break}}if(j)break}}},delegateListener:l,delegateUseCapture:p,delegatedEvents:r,documents:o,targets:n,supportsOptions:!1,supportsPassive:!1};function a(f,h,x,S){if(f.addEventListener){var _=Ot(S),k=d(n,(function(I){return I.eventTarget===f}));k||(k={eventTarget:f,events:{}},n.push(k)),k.events[h]||(k.events[h]=[]),d(k.events[h],(function(I){return I.func===x&&Lt(I.options,_)}))||(f.addEventListener(h,x,i.supportsOptions?_:_.capture),k.events[h].push({func:x,options:_}))}}function c(f,h,x,S){if(f.addEventListener&&f.removeEventListener){var _=s(n,(function(we){return we.eventTarget===f})),k=n[_];if(k&&k.events)if(h!=="all"){var I=!1,A=k.events[h];if(A){if(x==="all"){for(var j=A.length-1;j>=0;j--){var W=A[j];c(f,h,W.func,W.options)}return}for(var K=Ot(S),N=0;N<A.length;N++){var q=A[N];if(q.func===x&&Lt(q.options,K)){f.removeEventListener(h,x,i.supportsOptions?K:K.capture),A.splice(N,1),A.length===0&&(delete k.events[h],I=!0);break}}}I&&!Object.keys(k.events).length&&n.splice(_,1)}else for(h in k.events)k.events.hasOwnProperty(h)&&c(f,h,"all")}}function l(f,h){for(var x=Ot(h),S=new vo(f),_=r[f.type],k=ot(f)[0],I=k;m.element(I);){for(var A=0;A<_.length;A++){var j=_[A],W=j.selector,K=j.context;if(me(I,W)&&ue(K,k)&&ue(K,I)){var N=j.listeners;S.currentTarget=I;for(var q=0;q<N.length;q++){var we=N[q];Lt(we.options,x)&&we.func(S)}}}I=le(I)}}function p(f){return l(f,!0)}return(e=t.document)==null||e.createElement("div").addEventListener("test",null,{get capture(){return i.supportsOptions=!0},get passive(){return i.supportsPassive=!0}}),t.events=i,i}},en={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var e=0,n=en.methodOrder;e<n.length;e++){var r=n[e],o=en[r](t);if(o)return o}return null},simulationResume:function(t){var e=t.pointerType,n=t.eventType,r=t.eventTarget,o=t.scope;if(!/down|start/i.test(n))return null;for(var i=0,a=o.interactions.list;i<a.length;i++){var c=a[i],l=r;if(c.simulation&&c.simulation.allowResume&&c.pointerType===e)for(;l;){if(l===c.element)return c;l=le(l)}}return null},mouseOrPen:function(t){var e,n=t.pointerId,r=t.pointerType,o=t.eventType,i=t.scope;if(r!=="mouse"&&r!=="pen")return null;for(var a=0,c=i.interactions.list;a<c.length;a++){var l=c[a];if(l.pointerType===r){if(l.simulation&&!Yn(l,n))continue;if(l.interacting())return l;e||(e=l)}}if(e)return e;for(var p=0,f=i.interactions.list;p<f.length;p++){var h=f[p];if(!(h.pointerType!==r||/down/i.test(o)&&h.simulation))return h}return null},hasPointer:function(t){for(var e=t.pointerId,n=0,r=t.scope.interactions.list;n<r.length;n++){var o=r[n];if(Yn(o,e))return o}return null},idle:function(t){for(var e=t.pointerType,n=0,r=t.scope.interactions.list;n<r.length;n++){var o=r[n];if(o.pointers.length===1){var i=o.interactable;if(i&&(!i.options.gesture||!i.options.gesture.enabled))continue}else if(o.pointers.length>=2)continue;if(!o.interacting()&&e===o.pointerType)return o}return null}};function Yn(t,e){return t.pointers.some((function(n){return n.id===e}))}var mo=en,tn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Fn(t,e){return function(n){var r=e.interactions.list,o=rt(n),i=ot(n),a=i[0],c=i[1],l=[];if(/^touch/.test(n.type)){e.prevTouchTime=e.now();for(var p=0,f=n.changedTouches;p<f.length;p++){var h=f[p],x={pointer:h,pointerId:nt(h),pointerType:o,eventType:n.type,eventTarget:a,curEventTarget:c,scope:e},S=Un(x);l.push([x.pointer,x.eventTarget,x.curEventTarget,S])}}else{var _=!1;if(!te.supportsPointerEvent&&/mouse/.test(n.type)){for(var k=0;k<r.length&&!_;k++)_=r[k].pointerType!=="mouse"&&r[k].pointerIsDown;_=_||e.now()-e.prevTouchTime<500||n.timeStamp===0}if(!_){var I={pointer:n,pointerId:nt(n),pointerType:o,eventType:n.type,curEventTarget:c,eventTarget:a,scope:e},A=Un(I);l.push([I.pointer,I.eventTarget,I.curEventTarget,A])}}for(var j=0;j<l.length;j++){var W=l[j],K=W[0],N=W[1],q=W[2];W[3][t](K,n,N,q)}}}function Un(t){var e=t.pointerType,n=t.scope,r={interaction:mo.search(t),searchDetails:t};return n.fire("interactions:find",r),r.interaction||n.interactions.new({pointerType:e})}function nn(t,e){var n=t.doc,r=t.scope,o=t.options,i=r.interactions.docEvents,a=r.events,c=a[e];for(var l in r.browser.isIOS&&!o.events&&(o.events={passive:!1}),a.delegatedEvents)c(n,l,a.delegateListener),c(n,l,a.delegateUseCapture,!0);for(var p=o&&o.events,f=0;f<i.length;f++){var h=i[f];c(n,h.type,h.listener,p)}}var yo={id:"core/interactions",install:function(t){for(var e={},n=0;n<tn.length;n++){var r=tn[n];e[r]=Fn(r,t)}var o,i=te.pEventTypes;function a(){for(var c=0,l=t.interactions.list;c<l.length;c++){var p=l[c];if(p.pointerIsDown&&p.pointerType==="touch"&&!p._interacting)for(var f=function(){var S=x[h];t.documents.some((function(_){return ue(_.doc,S.downTarget)}))||p.removePointer(S.pointer,S.event)},h=0,x=p.pointers;h<x.length;h++)f()}}(o=ee.PointerEvent?[{type:i.down,listener:a},{type:i.down,listener:e.pointerDown},{type:i.move,listener:e.pointerMove},{type:i.up,listener:e.pointerUp},{type:i.cancel,listener:e.pointerUp}]:[{type:"mousedown",listener:e.pointerDown},{type:"mousemove",listener:e.pointerMove},{type:"mouseup",listener:e.pointerUp},{type:"touchstart",listener:a},{type:"touchstart",listener:e.pointerDown},{type:"touchmove",listener:e.pointerMove},{type:"touchend",listener:e.pointerUp},{type:"touchcancel",listener:e.pointerUp}]).push({type:"blur",listener:function(c){for(var l=0,p=t.interactions.list;l<p.length;l++)p[l].documentBlur(c)}}),t.prevTouchTime=0,t.Interaction=(function(c){ie(p,c);var l=ne(p);function p(){return O(this,p),l.apply(this,arguments)}return L(p,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(f){t.interactions.pointerMoveTolerance=f}},{key:"_now",value:function(){return t.now()}}]),p})(co),t.interactions={list:[],new:function(c){c.scopeFire=function(p,f){return t.fire(p,f)};var l=new t.Interaction(c);return t.interactions.list.push(l),l},listeners:e,docEvents:o,pointerMoveTolerance:1},t.usePlugin(Cn)},listeners:{"scope:add-document":function(t){return nn(t,"add")},"scope:remove-document":function(t){return nn(t,"remove")},"interactable:unset":function(t,e){for(var n=t.interactable,r=e.interactions.list.length-1;r>=0;r--){var o=e.interactions.list[r];o.interactable===n&&(o.stop(),e.fire("interactions:destroy",{interaction:o}),o.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(r,1))}}},onDocSignal:nn,doOnInteractions:Fn,methodNames:tn},bo=yo,Ke=(function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t})(Ke||{}),xo=(function(){function t(e,n,r,o){O(this,t),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Hn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=n.actions,this.target=e,this._context=n.context||r,this._win=pe(ae(e)?this._context:e),this._doc=this._win.document,this._scopeEvents=o,this.set(n)}return L(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(e,n){return m.func(n.onstart)&&this.on("".concat(e,"start"),n.onstart),m.func(n.onmove)&&this.on("".concat(e,"move"),n.onmove),m.func(n.onend)&&this.on("".concat(e,"end"),n.onend),m.func(n.oninertiastart)&&this.on("".concat(e,"inertiastart"),n.oninertiastart),this}},{key:"updatePerActionListeners",value:function(e,n,r){var o,i=this,a=(o=this._actions.map[e])==null?void 0:o.filterEventType,c=function(l){return(a==null||a(l))&&jt(l,i._actions)};(m.array(n)||m.object(n))&&this._onOff(Ke.Off,e,n,void 0,c),(m.array(r)||m.object(r))&&this._onOff(Ke.On,e,r,void 0,c)}},{key:"setPerAction",value:function(e,n){var r=this._defaults;for(var o in n){var i=o,a=this.options[e],c=n[i];i==="listeners"&&this.updatePerActionListeners(e,a.listeners,c),m.array(c)?a[i]=Ge(c):m.plainObject(c)?(a[i]=C(a[i]||{},pt(c)),m.object(r.perAction[i])&&"enabled"in r.perAction[i]&&(a[i].enabled=c.enabled!==!1)):m.bool(c)&&m.object(r.perAction[i])?a[i].enabled=c:a[i]=c}}},{key:"getRect",value:function(e){return e=e||(m.element(this.target)?this.target:null),m.string(this.target)&&(e=e||this._context.querySelector(this.target)),V(e)}},{key:"rectChecker",value:function(e){var n=this;return m.func(e)?(this.getRect=function(r){var o=C({},e.apply(n,r));return"width"in o||(o.width=o.right-o.left,o.height=o.bottom-o.top),o},this):e===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(e,n){if(ae(n)||m.object(n)){for(var r in this.options[e]=n,this._actions.map)this.options[r][e]=n;return this}return this.options[e]}},{key:"origin",value:function(e){return this._backCompatOption("origin",e)}},{key:"deltaSource",value:function(e){return e==="page"||e==="client"?(this.options.deltaSource=e,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var e=this.target;return m.string(e)?Array.from(this._context.querySelectorAll(e)):m.func(e)&&e.getAllElements?e.getAllElements():m.element(e)?[e]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(e){return this._context===e.ownerDocument||ue(this._context,e)}},{key:"testIgnoreAllow",value:function(e,n,r){return!this.testIgnore(e.ignoreFrom,n,r)&&this.testAllow(e.allowFrom,n,r)}},{key:"testAllow",value:function(e,n,r){return!e||!!m.element(r)&&(m.string(e)?P(r,e,n):!!m.element(e)&&ue(e,r))}},{key:"testIgnore",value:function(e,n,r){return!(!e||!m.element(r))&&(m.string(e)?P(r,e,n):!!m.element(e)&&ue(e,r))}},{key:"fire",value:function(e){return this.events.fire(e),this}},{key:"_onOff",value:function(e,n,r,o,i){m.object(n)&&!m.array(n)&&(o=r,r=null);var a=Ce(n,r,i);for(var c in a){c==="wheel"&&(c=te.wheelEvent);for(var l=0,p=a[c];l<p.length;l++){var f=p[l];jt(c,this._actions)?this.events[e===Ke.On?"on":"off"](c,f):m.string(this.target)?this._scopeEvents[e===Ke.On?"addDelegate":"removeDelegate"](this.target,this._context,c,f,o):this._scopeEvents[e===Ke.On?"add":"remove"](this.target,c,f,o)}}return this}},{key:"on",value:function(e,n,r){return this._onOff(Ke.On,e,n,r)}},{key:"off",value:function(e,n,r){return this._onOff(Ke.Off,e,n,r)}},{key:"set",value:function(e){var n=this._defaults;for(var r in m.object(e)||(e={}),this.options=pt(n.base),this._actions.methodDict){var o=r,i=this._actions.methodDict[o];this.options[o]={},this.setPerAction(o,C(C({},n.perAction),n.actions[o])),this[i](e[o])}for(var a in e)a!=="getRect"?m.func(this[a])&&this[a](e[a]):this.rectChecker(e.getRect);return this}},{key:"unset",value:function(){if(m.string(this.target))for(var e in this._scopeEvents.delegatedEvents)for(var n=this._scopeEvents.delegatedEvents[e],r=n.length-1;r>=0;r--){var o=n[r],i=o.selector,a=o.context,c=o.listeners;i===this.target&&a===this._context&&n.splice(r,1);for(var l=c.length-1;l>=0;l--)this._scopeEvents.removeDelegate(this.target,this._context,e,c[l][0],c[l][1])}else this._scopeEvents.remove(this.target,"all")}}]),t})(),Eo=(function(){function t(e){var n=this;O(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=e,e.addListeners({"interactable:unset":function(r){var o=r.interactable,i=o.target,a=m.string(i)?n.selectorMap[i]:i[n.scope.id],c=s(a,(function(l){return l===o}));a.splice(c,1)}})}return L(t,[{key:"new",value:function(e,n){n=C(n||{},{actions:this.scope.actions});var r=new this.scope.Interactable(e,n,this.scope.document,this.scope.events);return this.scope.addDocument(r._doc),this.list.push(r),m.string(e)?(this.selectorMap[e]||(this.selectorMap[e]=[]),this.selectorMap[e].push(r)):(r.target[this.scope.id]||Object.defineProperty(e,this.scope.id,{value:[],configurable:!0}),e[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:e,options:n,interactable:r,win:this.scope._win}),r}},{key:"getExisting",value:function(e,n){var r=n&&n.context||this.scope.document,o=m.string(e),i=o?this.selectorMap[e]:e[this.scope.id];if(i)return d(i,(function(a){return a._context===r&&(o||a.inContext(e))}))}},{key:"forEachMatch",value:function(e,n){for(var r=0,o=this.list;r<o.length;r++){var i=o[r],a=void 0;if((m.string(i.target)?m.element(e)&&me(e,i.target):e===i.target)&&i.inContext(e)&&(a=n(i)),a!==void 0)return a}}}]),t})(),wo=(function(){function t(){var e=this;O(this,t),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=te,this.defaults=pt(An),this.Eventable=Hn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=(function(r){var o=function i(a,c){var l=r.interactables.getExisting(a,c);return l||((l=r.interactables.new(a,c)).events.global=i.globalEvents),l};return o.getPointerAverage=wt,o.getTouchBBox=lt,o.getTouchDistance=ft,o.getTouchAngle=We,o.getElementRect=V,o.getElementClientRect=U,o.matchesSelector=me,o.closest=Oe,o.globalEvents={},o.version="1.10.27",o.scope=r,o.use=function(i,a){return this.scope.usePlugin(i,a),this},o.isSet=function(i,a){return!!this.scope.interactables.get(i,a&&a.context)},o.on=kt((function(i,a,c){if(m.string(i)&&i.search(" ")!==-1&&(i=i.trim().split(/ +/)),m.array(i)){for(var l=0,p=i;l<p.length;l++){var f=p[l];this.on(f,a,c)}return this}if(m.object(i)){for(var h in i)this.on(h,i[h],a);return this}return jt(i,this.scope.actions)?this.globalEvents[i]?this.globalEvents[i].push(a):this.globalEvents[i]=[a]:this.scope.events.add(this.scope.document,i,a,{options:c}),this}),"The interact.on() method is being deprecated"),o.off=kt((function(i,a,c){if(m.string(i)&&i.search(" ")!==-1&&(i=i.trim().split(/ +/)),m.array(i)){for(var l=0,p=i;l<p.length;l++){var f=p[l];this.off(f,a,c)}return this}if(m.object(i)){for(var h in i)this.off(h,i[h],a);return this}var x;return jt(i,this.scope.actions)?i in this.globalEvents&&(x=this.globalEvents[i].indexOf(a))!==-1&&this.globalEvents[i].splice(x,1):this.scope.events.remove(this.scope.document,i,a,c),this}),"The interact.off() method is being deprecated"),o.debug=function(){return this.scope},o.supportsTouch=function(){return te.supportsTouch},o.supportsPointerEvent=function(){return te.supportsPointerEvent},o.stop=function(){for(var i=0,a=this.scope.interactions.list;i<a.length;i++)a[i].stop();return this},o.pointerMoveTolerance=function(i){return m.number(i)?(this.scope.interactions.pointerMoveTolerance=i,this):this.scope.interactions.pointerMoveTolerance},o.addDocument=function(i,a){this.scope.addDocument(i,a)},o.removeDocument=function(i){this.scope.removeDocument(i)},o})(this),this.InteractEvent=Jt,this.Interactable=void 0,this.interactables=new Eo(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(r){return e.removeDocument(r.target)};var n=this;this.Interactable=(function(r){ie(i,r);var o=ne(i);function i(){return O(this,i),o.apply(this,arguments)}return L(i,[{key:"_defaults",get:function(){return n.defaults}},{key:"set",value:function(a){return ce(Q(i.prototype),"set",this).call(this,a),n.fire("interactable:set",{options:a,interactable:this}),this}},{key:"unset",value:function(){ce(Q(i.prototype),"unset",this).call(this);var a=n.interactables.list.indexOf(this);a<0||(n.interactables.list.splice(a,1),n.fire("interactable:unset",{interactable:this}))}}]),i})(xo)}return L(t,[{key:"addListeners",value:function(e,n){this.listenerMaps.push({id:n,map:e})}},{key:"fire",value:function(e,n){for(var r=0,o=this.listenerMaps;r<o.length;r++){var i=o[r].map[e];if(i&&i(n,this,e)===!1)return!1}}},{key:"init",value:function(e){return this.isInitialized?this:(function(n,r){return n.isInitialized=!0,m.window(r)&&Me(r),ee.init(r),te.init(r),Xe.init(r),n.window=r,n.document=r.document,n.usePlugin(bo),n.usePlugin(go),n})(this,e)}},{key:"pluginIsInstalled",value:function(e){var n=e.id;return n?!!this._plugins.map[n]:this._plugins.list.indexOf(e)!==-1}},{key:"usePlugin",value:function(e,n){if(!this.isInitialized)return this;if(this.pluginIsInstalled(e))return this;if(e.id&&(this._plugins.map[e.id]=e),this._plugins.list.push(e),e.install&&e.install(this,n),e.listeners&&e.before){for(var r=0,o=this.listenerMaps.length,i=e.before.reduce((function(c,l){return c[l]=!0,c[Bn(l)]=!0,c}),{});r<o;r++){var a=this.listenerMaps[r].id;if(a&&(i[a]||i[Bn(a)]))break}this.listenerMaps.splice(r,0,{id:e.id,map:e.listeners})}else e.listeners&&this.listenerMaps.push({id:e.id,map:e.listeners});return this}},{key:"addDocument",value:function(e,n){if(this.getDocIndex(e)!==-1)return!1;var r=pe(e);n=n?C({},n):{},this.documents.push({doc:e,options:n}),this.events.documents.push(e),e!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:e,window:r,scope:this,options:n})}},{key:"removeDocument",value:function(e){var n=this.getDocIndex(e),r=pe(e),o=this.documents[n].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(n,1),this.events.documents.splice(n,1),this.fire("scope:remove-document",{doc:e,window:r,scope:this,options:o})}},{key:"getDocIndex",value:function(e){for(var n=0;n<this.documents.length;n++)if(this.documents[n].doc===e)return n;return-1}},{key:"getDocOptions",value:function(e){var n=this.getDocIndex(e);return n===-1?null:this.documents[n].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t})();function Bn(t){return t&&t.replace(/\/.*$/,"")}var Wn=new wo,Ee=Wn.interactStatic,_o=typeof globalThis<"u"?globalThis:window;Wn.init(_o);var To=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var e=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter((function(r){var o=r[0],i=r[1];return o in t||i in t})),n=function(r,o){for(var i=t.range,a=t.limits,c=a===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:a,l=t.offset,p=l===void 0?{x:0,y:0}:l,f={range:i,grid:t,x:null,y:null},h=0;h<e.length;h++){var x=e[h],S=x[0],_=x[1],k=Math.round((r-p.x)/t[S]),I=Math.round((o-p.y)/t[_]);f[S]=Math.max(c.left,Math.min(c.right,k*t[S]+p.x)),f[_]=Math.max(c.top,Math.min(c.bottom,I*t[_]+p.y))}return f};return n.grid=t,n.coordFields=e,n}}),So={id:"snappers",install:function(t){var e=t.interactStatic;e.snappers=C(e.snappers||{},To),e.createSnapGrid=e.snappers.grid}},ko=So,Ro={start:function(t){var e=t.state,n=t.rect,r=t.edges,o=t.pageCoords,i=e.options,a=i.ratio,c=i.enabled,l=e.options,p=l.equalDelta,f=l.modifiers;a==="preserve"&&(a=n.width/n.height),e.startCoords=C({},o),e.startRect=C({},n),e.ratio=a,e.equalDelta=p;var h=e.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(e.xIsPrimaryAxis=!(!r.left&&!r.right),e.equalDelta){var x=(h.left?1:-1)*(h.top?1:-1);e.edgeSign={x,y:x}}else e.edgeSign={x:h.left?-1:1,y:h.top?-1:1};if(c!==!1&&C(r,h),f!=null&&f.length){var S=new Qt(t.interaction);S.copyFrom(t.interaction.modification),S.prepareStates(f),e.subModification=S,S.startAll(g({},t))}},set:function(t){var e=t.state,n=t.rect,r=t.coords,o=e.linkedEdges,i=C({},r),a=e.equalDelta?Oo:Co;if(C(t.edges,o),a(e,e.xIsPrimaryAxis,r,n),!e.subModification)return null;var c=C({},n);et(o,c,{x:r.x-i.x,y:r.y-i.y});var l=e.subModification.setAll(g(g({},t),{},{rect:c,edges:o,pageCoords:r,prevCoords:r,prevRect:c})),p=l.delta;return l.changed&&(a(e,Math.abs(p.x)>Math.abs(p.y),l.coords,l.rect),C(r,l.coords)),l.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Oo(t,e,n){var r=t.startCoords,o=t.edgeSign;e?n.y=r.y+(n.x-r.x)*o.y:n.x=r.x+(n.y-r.y)*o.x}function Co(t,e,n,r){var o=t.startRect,i=t.startCoords,a=t.ratio,c=t.edgeSign;if(e){var l=r.width/a;n.y=i.y+(l-o.height)*c.y}else{var p=r.height*a;n.x=i.x+(p-o.width)*c.x}}var Po=Ve(Ro,"aspectRatio"),qn=function(){};qn._defaults={};var Ht=qn;function at(t,e,n){return m.func(t)?Fe(t,e.interactable,e.element,[n.x,n.y,e]):Fe(t,e.interactable,e.element)}var Yt={start:function(t){var e=t.rect,n=t.startOffset,r=t.state,o=t.interaction,i=t.pageCoords,a=r.options,c=a.elementRect,l=C({left:0,top:0,right:0,bottom:0},a.offset||{});if(e&&c){var p=at(a.restriction,o,i);if(p){var f=p.right-p.left-e.width,h=p.bottom-p.top-e.height;f<0&&(l.left+=f,l.right+=f),h<0&&(l.top+=h,l.bottom+=h)}l.left+=n.left-e.width*c.left,l.top+=n.top-e.height*c.top,l.right+=n.right-e.width*(1-c.right),l.bottom+=n.bottom-e.height*(1-c.bottom)}r.offset=l},set:function(t){var e=t.coords,n=t.interaction,r=t.state,o=r.options,i=r.offset,a=at(o.restriction,n,e);if(a){var c=(function(l){return!l||"left"in l&&"top"in l||((l=C({},l)).left=l.x||0,l.top=l.y||0,l.right=l.right||l.left+l.width,l.bottom=l.bottom||l.top+l.height),l})(a);e.x=Math.max(Math.min(c.right-i.right,e.x),c.left+i.left),e.y=Math.max(Math.min(c.bottom-i.bottom,e.y),c.top+i.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Ao=Ve(Yt,"restrict"),Gn={top:1/0,left:1/0,bottom:-1/0,right:-1/0},$n={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Xn(t,e){for(var n=0,r=["top","left","bottom","right"];n<r.length;n++){var o=r[n];o in t||(t[o]=e[o])}return t}var Ct={noInner:Gn,noOuter:$n,start:function(t){var e,n=t.interaction,r=t.startOffset,o=t.state,i=o.options;i&&(e=Ze(at(i.offset,n,n.coords.start.page))),e=e||{x:0,y:0},o.offset={top:e.y+r.top,left:e.x+r.left,bottom:e.y-r.bottom,right:e.x-r.right}},set:function(t){var e=t.coords,n=t.edges,r=t.interaction,o=t.state,i=o.offset,a=o.options;if(n){var c=C({},e),l=at(a.inner,r,c)||{},p=at(a.outer,r,c)||{};Xn(l,Gn),Xn(p,$n),n.top?e.y=Math.min(Math.max(p.top+i.top,c.y),l.top+i.top):n.bottom&&(e.y=Math.max(Math.min(p.bottom+i.bottom,c.y),l.bottom+i.bottom)),n.left?e.x=Math.min(Math.max(p.left+i.left,c.x),l.left+i.left):n.right&&(e.x=Math.max(Math.min(p.right+i.right,c.x),l.right+i.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Mo=Ve(Ct,"restrictEdges"),Io=C({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},Yt.defaults),Do=Ve({start:Yt.start,set:Yt.set,defaults:Io},"restrictRect"),jo={width:-1/0,height:-1/0},zo={width:1/0,height:1/0},No=Ve({start:function(t){return Ct.start(t)},set:function(t){var e=t.interaction,n=t.state,r=t.rect,o=t.edges,i=n.options;if(o){var a=ct(at(i.min,e,t.coords))||jo,c=ct(at(i.max,e,t.coords))||zo;n.options={endOnly:i.endOnly,inner:C({},Ct.noInner),outer:C({},Ct.noOuter)},o.top?(n.options.inner.top=r.bottom-a.height,n.options.outer.top=r.bottom-c.height):o.bottom&&(n.options.inner.bottom=r.top+a.height,n.options.outer.bottom=r.top+c.height),o.left?(n.options.inner.left=r.right-a.width,n.options.outer.left=r.right-c.width):o.right&&(n.options.inner.right=r.left+a.width,n.options.outer.right=r.left+c.width),Ct.set(t),n.options=i}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),rn={start:function(t){var e,n=t.interaction,r=t.interactable,o=t.element,i=t.rect,a=t.state,c=t.startOffset,l=a.options,p=l.offsetWithOrigin?(function(x){var S=x.interaction.element,_=Ze(Fe(x.state.options.origin,null,null,[S])),k=_||Ue(x.interactable,S,x.interaction.prepared.name);return k})(t):{x:0,y:0};if(l.offset==="startCoords")e={x:n.coords.start.page.x,y:n.coords.start.page.y};else{var f=Fe(l.offset,r,o,[n]);(e=Ze(f)||{x:0,y:0}).x+=p.x,e.y+=p.y}var h=l.relativePoints;a.offsets=i&&h&&h.length?h.map((function(x,S){return{index:S,relativePoint:x,x:c.left-i.width*x.x+e.x,y:c.top-i.height*x.y+e.y}})):[{index:0,relativePoint:null,x:e.x,y:e.y}]},set:function(t){var e=t.interaction,n=t.coords,r=t.state,o=r.options,i=r.offsets,a=Ue(e.interactable,e.element,e.prepared.name),c=C({},n),l=[];o.offsetWithOrigin||(c.x-=a.x,c.y-=a.y);for(var p=0,f=i;p<f.length;p++)for(var h=f[p],x=c.x-h.x,S=c.y-h.y,_=0,k=o.targets.length;_<k;_++){var I=o.targets[_],A=void 0;(A=m.func(I)?I(x,S,e._proxy,h,_):I)&&l.push({x:(m.number(A.x)?A.x:x)+h.x,y:(m.number(A.y)?A.y:S)+h.y,range:m.number(A.range)?A.range:o.range,source:I,index:_,offset:h})}for(var j={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},W=0;W<l.length;W++){var K=l[W],N=K.range,q=K.x-c.x,we=K.y-c.y,oe=Be(q,we),Se=oe<=N;N===1/0&&j.inRange&&j.range!==1/0&&(Se=!1),j.target&&!(Se?j.inRange&&N!==1/0?oe/N<j.distance/j.range:N===1/0&&j.range!==1/0||oe<j.distance:!j.inRange&&oe<j.distance)||(j.target=K,j.distance=oe,j.range=N,j.inRange=Se,j.delta.x=q,j.delta.y=we)}return j.inRange&&(n.x=j.target.x,n.y=j.target.y),r.closest=j,j},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Lo=Ve(rn,"snap"),Ft={start:function(t){var e=t.state,n=t.edges,r=e.options;if(!n)return null;t.state={options:{targets:null,relativePoints:[{x:n.left?0:1,y:n.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},e.targetFields=e.targetFields||[["width","height"],["x","y"]],rn.start(t),e.offsets=t.state.offsets,t.state=e},set:function(t){var e=t.interaction,n=t.state,r=t.coords,o=n.options,i=n.offsets,a={x:r.x-i[0].x,y:r.y-i[0].y};n.options=C({},o),n.options.targets=[];for(var c=0,l=o.targets||[];c<l.length;c++){var p=l[c],f=void 0;if(f=m.func(p)?p(a.x,a.y,e):p){for(var h=0,x=n.targetFields;h<x.length;h++){var S=x[h],_=S[0],k=S[1];if(_ in f||k in f){f.x=f[_],f.y=f[k];break}}n.options.targets.push(f)}}var I=rn.set(t);return n.options=o,I},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Ho=Ve(Ft,"snapSize"),on={aspectRatio:Po,restrictEdges:Mo,restrict:Ao,restrictRect:Do,restrictSize:No,snapEdges:Ve({start:function(t){var e=t.edges;return e?(t.state.targetFields=t.state.targetFields||[[e.left?"left":"right",e.top?"top":"bottom"]],Ft.start(t)):null},set:Ft.set,defaults:C(pt(Ft.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Lo,snapSize:Ho,spring:Ht,avoid:Ht,transform:Ht,rubberband:Ht},Yo={id:"modifiers",install:function(t){var e=t.interactStatic;for(var n in t.usePlugin(Pn),t.usePlugin(ko),e.modifiers=on,on){var r=on[n],o=r._defaults,i=r._methods;o._methods=i,t.defaults.perAction[n]=o}}},Fo=Yo,Vn=(function(t){ie(n,t);var e=ne(n);function n(r,o,i,a,c,l){var p;if(O(this,n),B(se(p=e.call(this,c)),i),i!==o&&B(se(p),o),p.timeStamp=l,p.originalEvent=i,p.type=r,p.pointerId=nt(o),p.pointerType=rt(o),p.target=a,p.currentTarget=null,r==="tap"){var f=c.getPointerIndex(o);p.dt=p.timeStamp-c.pointers[f].downTime;var h=p.timeStamp-c.tapTime;p.double=!!c.prevTap&&c.prevTap.type!=="doubletap"&&c.prevTap.target===p.target&&h<500}else r==="doubletap"&&(p.dt=o.timeStamp-c.tapTime,p.double=!0);return p}return L(n,[{key:"_subtractOrigin",value:function(r){var o=r.x,i=r.y;return this.pageX-=o,this.pageY-=i,this.clientX-=o,this.clientY-=i,this}},{key:"_addOrigin",value:function(r){var o=r.x,i=r.y;return this.pageX+=o,this.pageY+=i,this.clientX+=o,this.clientY+=i,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),n})(qe),Pt={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=Pt,t.defaults.actions.pointerEvents=Pt.defaults,C(t.actions.phaselessTypes,Pt.types)},listeners:{"interactions:new":function(t){var e=t.interaction;e.prevTap=null,e.tapTime=0},"interactions:update-pointer":function(t){var e=t.down,n=t.pointerInfo;!e&&n.hold||(n.hold={duration:1/0,timeout:null})},"interactions:move":function(t,e){var n=t.interaction,r=t.pointer,o=t.event,i=t.eventTarget;t.duplicate||n.pointerIsDown&&!n.pointerWasMoved||(n.pointerIsDown&&an(t),Qe({interaction:n,pointer:r,event:o,eventTarget:i,type:"move"},e))},"interactions:down":function(t,e){(function(n,r){for(var o=n.interaction,i=n.pointer,a=n.event,c=n.eventTarget,l=n.pointerIndex,p=o.pointers[l].hold,f=z(c),h={interaction:o,pointer:i,event:a,eventTarget:c,type:"hold",targets:[],path:f,node:null},x=0;x<f.length;x++){var S=f[x];h.node=S,r.fire("pointerEvents:collect-targets",h)}if(h.targets.length){for(var _=1/0,k=0,I=h.targets;k<I.length;k++){var A=I[k].eventable.options.holdDuration;A<_&&(_=A)}p.duration=_,p.timeout=setTimeout((function(){Qe({interaction:o,eventTarget:c,pointer:i,event:a,type:"hold"},r)}),_)}})(t,e),Qe(t,e)},"interactions:up":function(t,e){an(t),Qe(t,e),(function(n,r){var o=n.interaction,i=n.pointer,a=n.event,c=n.eventTarget;o.pointerWasMoved||Qe({interaction:o,eventTarget:c,pointer:i,event:a,type:"tap"},r)})(t,e)},"interactions:cancel":function(t,e){an(t),Qe(t,e)}},PointerEvent:Vn,fire:Qe,collectEventTargets:Kn,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function Qe(t,e){var n=t.interaction,r=t.pointer,o=t.event,i=t.eventTarget,a=t.type,c=t.targets,l=c===void 0?Kn(t,e):c,p=new Vn(a,r,o,i,n,e.now());e.fire("pointerEvents:new",{pointerEvent:p});for(var f={interaction:n,pointer:r,event:o,eventTarget:i,targets:l,type:a,pointerEvent:p},h=0;h<l.length;h++){var x=l[h];for(var S in x.props||{})p[S]=x.props[S];var _=Ue(x.eventable,x.node);if(p._subtractOrigin(_),p.eventable=x.eventable,p.currentTarget=x.node,x.eventable.fire(p),p._addOrigin(_),p.immediatePropagationStopped||p.propagationStopped&&h+1<l.length&&l[h+1].node!==p.currentTarget)break}if(e.fire("pointerEvents:fired",f),a==="tap"){var k=p.double?Qe({interaction:n,pointer:r,event:o,eventTarget:i,type:"doubletap"},e):p;n.prevTap=k,n.tapTime=k.timeStamp}return p}function Kn(t,e){var n=t.interaction,r=t.pointer,o=t.event,i=t.eventTarget,a=t.type,c=n.getPointerIndex(r),l=n.pointers[c];if(a==="tap"&&(n.pointerWasMoved||!l||l.downTarget!==i))return[];for(var p=z(i),f={interaction:n,pointer:r,event:o,eventTarget:i,type:a,path:p,targets:[],node:null},h=0;h<p.length;h++){var x=p[h];f.node=x,e.fire("pointerEvents:collect-targets",f)}return a==="hold"&&(f.targets=f.targets.filter((function(S){var _,k;return S.eventable.options.holdDuration===((_=n.pointers[c])==null||(k=_.hold)==null?void 0:k.duration)}))),f.targets}function an(t){var e=t.interaction,n=t.pointerIndex,r=e.pointers[n].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Uo=Object.freeze({__proto__:null,default:Pt});function Bo(t){var e=t.interaction;e.holdIntervalHandle&&(clearInterval(e.holdIntervalHandle),e.holdIntervalHandle=null)}var Wo={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(Pt);var e=t.pointerEvents;e.defaults.holdRepeatInterval=0,e.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce((function(t,e){return t["pointerEvents:".concat(e)]=Bo,t}),{"pointerEvents:new":function(t){var e=t.pointerEvent;e.type==="hold"&&(e.count=(e.count||0)+1)},"pointerEvents:fired":function(t,e){var n=t.interaction,r=t.pointerEvent,o=t.eventTarget,i=t.targets;if(r.type==="hold"&&i.length){var a=i[0].eventable.options.holdRepeatInterval;a<=0||(n.holdIntervalHandle=setTimeout((function(){e.pointerEvents.fire({interaction:n,eventTarget:o,type:"hold",pointer:r,event:r},e)}),a))}}})},qo=Wo,Go={id:"pointer-events/interactableTargets",install:function(t){var e=t.Interactable;e.prototype.pointerEvents=function(r){return C(this.events.options,r),this};var n=e.prototype._backCompatOption;e.prototype._backCompatOption=function(r,o){var i=n.call(this,r,o);return i===this&&(this.events.options[r]=o),i}},listeners:{"pointerEvents:collect-targets":function(t,e){var n=t.targets,r=t.node,o=t.type,i=t.eventTarget;e.interactables.forEachMatch(r,(function(a){var c=a.events,l=c.options;c.types[o]&&c.types[o].length&&a.testIgnoreAllow(l,r,i)&&n.push({node:r,eventable:c,props:{interactable:a}})}))},"interactable:new":function(t){var e=t.interactable;e.events.getRect=function(n){return e.getRect(n)}},"interactable:set":function(t,e){var n=t.interactable,r=t.options;C(n.events.options,e.pointerEvents.defaults),C(n.events.options,r.pointerEvents||{})}}},$o=Go,Xo={id:"pointer-events",install:function(t){t.usePlugin(Uo),t.usePlugin(qo),t.usePlugin($o)}},Vo=Xo,Ko={id:"reflow",install:function(t){var e=t.Interactable;t.actions.phases.reflow=!0,e.prototype.reflow=function(n){return(function(r,o,i){for(var a=r.getAllElements(),c=i.window.Promise,l=c?[]:null,p=function(){var h=a[f],x=r.getRect(h);if(!x)return 1;var S,_=d(i.interactions.list,(function(A){return A.interacting()&&A.interactable===r&&A.element===h&&A.prepared.name===o.name}));if(_)_.move(),l&&(S=_._reflowPromise||new c((function(A){_._reflowResolve=A})));else{var k=ct(x),I=(function(A){return{coords:A,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}})({page:{x:k.x,y:k.y},client:{x:k.x,y:k.y},timeStamp:i.now()});S=(function(A,j,W,K,N){var q=A.interactions.new({pointerType:"reflow"}),we={interaction:q,event:N,pointer:N,eventTarget:W,phase:"reflow"};q.interactable=j,q.element=W,q.prevEvent=N,q.updatePointer(N,N,W,!0),bt(q.coords.delta),$t(q.prepared,K),q._doPhase(we);var oe=A.window,Se=oe.Promise,Ae=Se?new Se((function(He){q._reflowResolve=He})):void 0;return q._reflowPromise=Ae,q.start(K,j,W),q._interacting?(q.move(we),q.end(N)):(q.stop(),q._reflowResolve()),q.removePointer(N,N),Ae})(i,r,h,o,I)}l&&l.push(S)},f=0;f<a.length&&!p();f++);return l&&c.all(l).then((function(){return r}))})(this,n,t)}},listeners:{"interactions:stop":function(t,e){var n=t.interaction;n.pointerType==="reflow"&&(n._reflowResolve&&n._reflowResolve(),(function(r,o){r.splice(r.indexOf(o),1)})(e.interactions.list,n))}}},Qo=Ko;if(Ee.use(Cn),Ee.use(jn),Ee.use(Vo),Ee.use(ho),Ee.use(Fo),Ee.use(to),Ee.use(Wr),Ee.use(Gr),Ee.use(Qo),Ee.default=Ee,w(v)==="object"&&v)try{v.exports=Ee}catch{}return Ee.default=Ee,Ee}))})(vt,vt.exports)),vt.exports}var Mr=Ar();const Bt=Cr(Mr);function fn(v){const y=document.createElement("input");y.type="file",y.accept="image/*",y.onchange=E=>{const g=E.target.files?.[0];if(g){const w=new FileReader;w.onload=O=>{const J=document.createElement("img");J.src=O.target?.result,J.style.maxWidth="100%",J.style.width="100%",J.style.height="auto",J.style.cursor="pointer",J.draggable=!1;const L=document.createElement("div");L.className="editor-image-wrapper",L.style.display="inline-block",L.style.position="relative",L.style.maxWidth="100%",L.style.width="auto",L.style.height="auto",L.contentEditable="false",L.style.boxSizing="border-box",L.style.touchAction="none",L.style.userSelect="none",L.appendChild(J),v.appendChild(L),v.focus()},w.readAsDataURL(g)}},y.click()}function Ir(v){let y=null;if(v.tagName==="IMG"?y=v.parentElement:y=v,!y)return;const E=y.querySelector("img");if(E)if(y.classList.contains("resizable")){const g=y.getBoundingClientRect(),w=Math.round(g.width)+"px",O=Math.round(g.height)+"px";Bt(y).unset(),y.classList.remove("resizable"),y.style.border="none",y.style.transform="",y.dataset.x="",y.dataset.y="",y.style.width=w,y.style.height=O,y.contentEditable="false",E&&(E.style.width="100%",E.style.height="100%")}else{y.classList.add("resizable"),y.style.border="2px dashed #007bff",y.style.position="relative",y.style.userSelect="none";const g=y.getBoundingClientRect();y.style.width=g.width+"px",y.style.height=g.height+"px",E&&(E.style.width="100%",E.style.height="100%"),Bt(y).resizable({edges:{left:!0,right:!0,bottom:!0,top:!0},listeners:{move:w=>{const O=w.target;Object.assign(O.style,{width:`${w.rect.width}px`,height:`${w.rect.height}px`})}},modifiers:[Bt.modifiers.restrictSize({min:{width:50,height:50}})],inertia:!0})}}class pn{container;toolbar;editor;constructor(){this.container=document.createElement("div"),this.container.classList.add("editor-container"),this.editor=Or(()=>fn(this.editor),E=>Ir(E)),this.toolbar=Rr();const y=this.toolbar.querySelector('button[title="Insert Image"]');y&&(y.onclick=()=>fn(this.editor)),this.container.appendChild(this.toolbar),this.container.appendChild(this.editor)}getElement(){return this.container}getHTML(){return this.editor.innerHTML}setHTML(y){this.editor.innerHTML=y}}var Mt={exports:{}},gt={};var dn;function Dr(){if(dn)return gt;dn=1;var v=Symbol.for("react.transitional.element"),y=Symbol.for("react.fragment");function E(g,w,O){var J=null;if(O!==void 0&&(J=""+O),w.key!==void 0&&(J=""+w.key),"key"in w){O={};for(var L in w)L!=="key"&&(O[L]=w[L])}else O=w;return w=O.ref,{$$typeof:v,type:g,key:J,ref:w!==void 0?w:null,props:O}}return gt.Fragment=y,gt.jsx=E,gt.jsxs=E,gt}var mt={},It={exports:{}},Y={};var hn;function jr(){if(hn)return Y;hn=1;var v=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),J=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),ie=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),ye=Symbol.for("react.activity"),se=Symbol.iterator;function ne(u){return u===null||typeof u!="object"?null:(u=se&&u[se]||u["@@iterator"],typeof u=="function"?u:null)}var ce={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},fe=Object.assign,Re={};function _e(u,b,P){this.props=u,this.context=b,this.refs=Re,this.updater=P||ce}_e.prototype.isReactComponent={},_e.prototype.setState=function(u,b){if(typeof u!="object"&&typeof u!="function"&&u!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,u,b,"setState")},_e.prototype.forceUpdate=function(u){this.updater.enqueueForceUpdate(this,u,"forceUpdate")};function ve(){}ve.prototype=_e.prototype;function Me(u,b,P){this.props=u,this.context=b,this.refs=Re,this.updater=P||ce}var pe=Me.prototype=new ve;pe.constructor=Me,fe(pe,_e.prototype),pe.isPureReactComponent=!0;var ge=Array.isArray;function Ie(){}var m={H:null,A:null,T:null,S:null},De=Object.prototype.hasOwnProperty;function he(u,b,P){var M=P.ref;return{$$typeof:v,type:u,key:b,ref:M!==void 0?M:null,props:P}}function Te(u,b){return he(u.type,b,u.props)}function je(u){return typeof u=="object"&&u!==null&&u.$$typeof===v}function G(u){var b={"=":"=0",":":"=2"};return"$"+u.replace(/[=:]/g,function(P){return b[P]})}var be=/\/+/g;function ee(u,b){return typeof u=="object"&&u!==null&&u.key!=null?G(""+u.key):b.toString(36)}function re(u){switch(u.status){case"fulfilled":return u.value;case"rejected":throw u.reason;default:switch(typeof u.status=="string"?u.then(Ie,Ie):(u.status="pending",u.then(function(b){u.status==="pending"&&(u.status="fulfilled",u.value=b)},function(b){u.status==="pending"&&(u.status="rejected",u.reason=b)})),u.status){case"fulfilled":return u.value;case"rejected":throw u.reason}}throw u}function te(u,b,P,M,U){var V=typeof u;(V==="undefined"||V==="boolean")&&(u=null);var z=!1;if(u===null)z=!0;else switch(V){case"bigint":case"string":case"number":z=!0;break;case"object":switch(u.$$typeof){case v:case y:z=!0;break;case Q:return z=u._init,te(z(u._payload),b,P,M,U)}}if(z)return U=U(u),z=M===""?"."+ee(u,0):M,ge(U)?(P="",z!=null&&(P=z.replace(be,"$&/")+"/"),te(U,b,P,"",function(ke){return ke})):U!=null&&(je(U)&&(U=Te(U,P+(U.key==null||u&&u.key===U.key?"":(""+U.key).replace(be,"$&/")+"/")+z)),b.push(U)),1;z=0;var ae=M===""?".":M+":";if(ge(u))for(var C=0;C<u.length;C++)M=u[C],V=ae+ee(M,C),z+=te(M,b,P,V,U);else if(C=ne(u),typeof C=="function")for(u=C.call(u),C=0;!(M=u.next()).done;)M=M.value,V=ae+ee(M,C++),z+=te(M,b,P,V,U);else if(V==="object"){if(typeof u.then=="function")return te(re(u),b,P,M,U);throw b=String(u),Error("Objects are not valid as a React child (found: "+(b==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.")}return z}function ue(u,b,P){if(u==null)return u;var M=[],U=0;return te(u,M,"","",function(V){return b.call(P,V,U++)}),M}function Oe(u){if(u._status===-1){var b=u._result;b=b(),b.then(function(P){(u._status===0||u._status===-1)&&(u._status=1,u._result=P)},function(P){(u._status===0||u._status===-1)&&(u._status=2,u._result=P)}),u._status===-1&&(u._status=0,u._result=b)}if(u._status===1)return u._result.default;throw u._result}var le=typeof reportError=="function"?reportError:function(u){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var b=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof u=="object"&&u!==null&&typeof u.message=="string"?String(u.message):String(u),error:u});if(!window.dispatchEvent(b))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",u);return}console.error(u)},me={map:ue,forEach:function(u,b,P){ue(u,function(){b.apply(this,arguments)},P)},count:function(u){var b=0;return ue(u,function(){b++}),b},toArray:function(u){return ue(u,function(b){return b})||[]},only:function(u){if(!je(u))throw Error("React.Children.only expected to receive a single React element child.");return u}};return Y.Activity=ye,Y.Children=me,Y.Component=_e,Y.Fragment=E,Y.Profiler=w,Y.PureComponent=Me,Y.StrictMode=g,Y.Suspense=de,Y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=m,Y.__COMPILER_RUNTIME={__proto__:null,c:function(u){return m.H.useMemoCache(u)}},Y.cache=function(u){return function(){return u.apply(null,arguments)}},Y.cacheSignal=function(){return null},Y.cloneElement=function(u,b,P){if(u==null)throw Error("The argument must be a React element, but you passed "+u+".");var M=fe({},u.props),U=u.key;if(b!=null)for(V in b.key!==void 0&&(U=""+b.key),b)!De.call(b,V)||V==="key"||V==="__self"||V==="__source"||V==="ref"&&b.ref===void 0||(M[V]=b[V]);var V=arguments.length-2;if(V===1)M.children=P;else if(1<V){for(var z=Array(V),ae=0;ae<V;ae++)z[ae]=arguments[ae+2];M.children=z}return he(u.type,U,M)},Y.createContext=function(u){return u={$$typeof:J,_currentValue:u,_currentValue2:u,_threadCount:0,Provider:null,Consumer:null},u.Provider=u,u.Consumer={$$typeof:O,_context:u},u},Y.createElement=function(u,b,P){var M,U={},V=null;if(b!=null)for(M in b.key!==void 0&&(V=""+b.key),b)De.call(b,M)&&M!=="key"&&M!=="__self"&&M!=="__source"&&(U[M]=b[M]);var z=arguments.length-2;if(z===1)U.children=P;else if(1<z){for(var ae=Array(z),C=0;C<z;C++)ae[C]=arguments[C+2];U.children=ae}if(u&&u.defaultProps)for(M in z=u.defaultProps,z)U[M]===void 0&&(U[M]=z[M]);return he(u,V,U)},Y.createRef=function(){return{current:null}},Y.forwardRef=function(u){return{$$typeof:L,render:u}},Y.isValidElement=je,Y.lazy=function(u){return{$$typeof:Q,_payload:{_status:-1,_result:u},_init:Oe}},Y.memo=function(u,b){return{$$typeof:ie,type:u,compare:b===void 0?null:b}},Y.startTransition=function(u){var b=m.T,P={};m.T=P;try{var M=u(),U=m.S;U!==null&&U(P,M),typeof M=="object"&&M!==null&&typeof M.then=="function"&&M.then(Ie,le)}catch(V){le(V)}finally{b!==null&&P.types!==null&&(b.types=P.types),m.T=b}},Y.unstable_useCacheRefresh=function(){return m.H.useCacheRefresh()},Y.use=function(u){return m.H.use(u)},Y.useActionState=function(u,b,P){return m.H.useActionState(u,b,P)},Y.useCallback=function(u,b){return m.H.useCallback(u,b)},Y.useContext=function(u){return m.H.useContext(u)},Y.useDebugValue=function(){},Y.useDeferredValue=function(u,b){return m.H.useDeferredValue(u,b)},Y.useEffect=function(u,b){return m.H.useEffect(u,b)},Y.useEffectEvent=function(u){return m.H.useEffectEvent(u)},Y.useId=function(){return m.H.useId()},Y.useImperativeHandle=function(u,b,P){return m.H.useImperativeHandle(u,b,P)},Y.useInsertionEffect=function(u,b){return m.H.useInsertionEffect(u,b)},Y.useLayoutEffect=function(u,b){return m.H.useLayoutEffect(u,b)},Y.useMemo=function(u,b){return m.H.useMemo(u,b)},Y.useOptimistic=function(u,b){return m.H.useOptimistic(u,b)},Y.useReducer=function(u,b,P){return m.H.useReducer(u,b,P)},Y.useRef=function(u){return m.H.useRef(u)},Y.useState=function(u){return m.H.useState(u)},Y.useSyncExternalStore=function(u,b,P){return m.H.useSyncExternalStore(u,b,P)},Y.useTransition=function(){return m.H.useTransition()},Y.version="19.2.3",Y}var yt={exports:{}};yt.exports;var vn;function zr(){return vn||(vn=1,(function(v,y){process.env.NODE_ENV!=="production"&&(function(){function E(s,d){Object.defineProperty(O.prototype,s,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",d[0],d[1])}})}function g(s){return s===null||typeof s!="object"?null:(s=Ze&&s[Ze]||s["@@iterator"],typeof s=="function"?s:null)}function w(s,d){s=(s=s.constructor)&&(s.displayName||s.name)||"ReactClass";var T=s+"."+d;ct[T]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",d,s),ct[T]=!0)}function O(s,d,T){this.props=s,this.context=d,this.refs=Ce,this.updater=T||et}function J(){}function L(s,d,T){this.props=s,this.context=d,this.refs=Ce,this.updater=T||et}function de(){}function ie(s){return""+s}function Q(s){try{ie(s);var d=!1}catch{d=!0}if(d){d=console;var T=d.error,R=typeof Symbol=="function"&&Symbol.toStringTag&&s[Symbol.toStringTag]||s.constructor.name||"Object";return T.call(d,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",R),ie(s)}}function ye(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===qt?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case u:return"Fragment";case P:return"Profiler";case b:return"StrictMode";case z:return"Suspense";case ae:return"SuspenseList";case Fe:return"Activity"}if(typeof s=="object")switch(typeof s.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case me:return"Portal";case U:return s.displayName||"Context";case M:return(s._context.displayName||"Context")+".Consumer";case V:var d=s.render;return s=s.displayName,s||(s=d.displayName||d.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case C:return d=s.displayName||null,d!==null?d:ye(s.type)||"Memo";case ke:d=s._payload,s=s._init;try{return ye(s(d))}catch{}}return null}function se(s){if(s===u)return"<>";if(typeof s=="object"&&s!==null&&s.$$typeof===ke)return"<...>";try{var d=ye(s);return d?"<"+d+">":"<...>"}catch{return"<...>"}}function ne(){var s=B.A;return s===null?null:s.getOwner()}function ce(){return Error("react-stack-top-frame")}function fe(s){if(ze.call(s,"key")){var d=Object.getOwnPropertyDescriptor(s,"key").get;if(d&&d.isReactWarning)return!1}return s.key!==void 0}function Re(s,d){function T(){xt||(xt=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",d))}T.isReactWarning=!0,Object.defineProperty(s,"key",{get:T,configurable:!0})}function _e(){var s=ye(this.type);return Et[s]||(Et[s]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),s=this.props.ref,s!==void 0?s:null}function ve(s,d,T,R,D,$){var F=T.ref;return s={$$typeof:le,type:s,key:d,props:T,_owner:R},(F!==void 0?F:null)!==null?Object.defineProperty(s,"ref",{enumerable:!1,get:_e}):Object.defineProperty(s,"ref",{enumerable:!1,value:null}),s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(s,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(s,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:D}),Object.defineProperty(s,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:$}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}function Me(s,d){return d=ve(s.type,d,s.props,s._owner,s._debugStack,s._debugTask),s._store&&(d._store.validated=s._store.validated),d}function pe(s){ge(s)?s._store&&(s._store.validated=1):typeof s=="object"&&s!==null&&s.$$typeof===ke&&(s._payload.status==="fulfilled"?ge(s._payload.value)&&s._payload.value._store&&(s._payload.value._store.validated=1):s._store&&(s._store.validated=1))}function ge(s){return typeof s=="object"&&s!==null&&s.$$typeof===le}function Ie(s){var d={"=":"=0",":":"=2"};return"$"+s.replace(/[=:]/g,function(T){return d[T]})}function m(s,d){return typeof s=="object"&&s!==null&&s.key!=null?(Q(s.key),Ie(""+s.key)):d.toString(36)}function De(s){switch(s.status){case"fulfilled":return s.value;case"rejected":throw s.reason;default:switch(typeof s.status=="string"?s.then(de,de):(s.status="pending",s.then(function(d){s.status==="pending"&&(s.status="fulfilled",s.value=d)},function(d){s.status==="pending"&&(s.status="rejected",s.reason=d)})),s.status){case"fulfilled":return s.value;case"rejected":throw s.reason}}throw s}function he(s,d,T,R,D){var $=typeof s;($==="undefined"||$==="boolean")&&(s=null);var F=!1;if(s===null)F=!0;else switch($){case"bigint":case"string":case"number":F=!0;break;case"object":switch(s.$$typeof){case le:case me:F=!0;break;case ke:return F=s._init,he(F(s._payload),d,T,R,D)}}if(F){F=s,D=D(F);var Z=R===""?"."+m(F,0):R;return Be(D)?(T="",Z!=null&&(T=Z.replace(wt,"$&/")+"/"),he(D,d,T,"",function(Pe){return Pe})):D!=null&&(ge(D)&&(D.key!=null&&(F&&F.key===D.key||Q(D.key)),T=Me(D,T+(D.key==null||F&&F.key===D.key?"":(""+D.key).replace(wt,"$&/")+"/")+Z),R!==""&&F!=null&&ge(F)&&F.key==null&&F._store&&!F._store.validated&&(T._store.validated=2),D=T),d.push(D)),1}if(F=0,Z=R===""?".":R+":",Be(s))for(var X=0;X<s.length;X++)R=s[X],$=Z+m(R,X),F+=he(R,d,T,$,D);else if(X=g(s),typeof X=="function")for(X===s.entries&&(ut||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ut=!0),s=X.call(s),X=0;!(R=s.next()).done;)R=R.value,$=Z+m(R,X++),F+=he(R,d,T,$,D);else if($==="object"){if(typeof s.then=="function")return he(De(s),d,T,R,D);throw d=String(s),Error("Objects are not valid as a React child (found: "+(d==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":d)+"). If you meant to render a collection of children, use an array instead.")}return F}function Te(s,d,T){if(s==null)return s;var R=[],D=0;return he(s,R,"","",function($){return d.call(T,$,D++)}),R}function je(s){if(s._status===-1){var d=s._ioInfo;d!=null&&(d.start=d.end=performance.now()),d=s._result;var T=d();if(T.then(function(D){if(s._status===0||s._status===-1){s._status=1,s._result=D;var $=s._ioInfo;$!=null&&($.end=performance.now()),T.status===void 0&&(T.status="fulfilled",T.value=D)}},function(D){if(s._status===0||s._status===-1){s._status=2,s._result=D;var $=s._ioInfo;$!=null&&($.end=performance.now()),T.status===void 0&&(T.status="rejected",T.reason=D)}}),d=s._ioInfo,d!=null){d.value=T;var R=T.displayName;typeof R=="string"&&(d.name=R)}s._status===-1&&(s._status=0,s._result=T)}if(s._status===1)return d=s._result,d===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
42
|
+
|
|
43
|
+
Your code should look like:
|
|
44
|
+
const MyComponent = lazy(() => import('./MyComponent'))
|
|
45
|
+
|
|
46
|
+
Did you accidentally put curly braces around the import?`,d),"default"in d||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
47
|
+
|
|
48
|
+
Your code should look like:
|
|
49
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,d),d.default;throw s._result}function G(){var s=B.H;return s===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
50
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
51
|
+
2. You might be breaking the Rules of Hooks
|
|
52
|
+
3. You might have more than one copy of React in the same app
|
|
53
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),s}function be(){B.asyncTransitions--}function ee(s){if(We===null)try{var d=("require"+Math.random()).slice(0,7);We=(v&&v[d]).call(v,"timers").setImmediate}catch{We=function(R){ft===!1&&(ft=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var D=new MessageChannel;D.port1.onmessage=R,D.port2.postMessage(void 0)}}return We(s)}function re(s){return 1<s.length&&typeof AggregateError=="function"?new AggregateError(s):s[0]}function te(s,d){d!==rt-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),rt=d}function ue(s,d,T){var R=B.actQueue;if(R!==null)if(R.length!==0)try{Oe(R),ee(function(){return ue(s,d,T)});return}catch(D){B.thrownErrors.push(D)}else B.actQueue=null;0<B.thrownErrors.length?(R=re(B.thrownErrors),B.thrownErrors.length=0,T(R)):d(s)}function Oe(s){if(!qe){qe=!0;var d=0;try{for(;d<s.length;d++){var T=s[d];do{B.didUsePromise=!1;var R=T(!1);if(R!==null){if(B.didUsePromise){s[d]=T,s.splice(0,d);return}T=R}else break}while(!0)}s.length=0}catch(D){s.splice(0,d+1),B.thrownErrors.push(D)}finally{qe=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var le=Symbol.for("react.transitional.element"),me=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),U=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),ke=Symbol.for("react.lazy"),Fe=Symbol.for("react.activity"),Ze=Symbol.iterator,ct={},et={isMounted:function(){return!1},enqueueForceUpdate:function(s){w(s,"forceUpdate")},enqueueReplaceState:function(s){w(s,"replaceState")},enqueueSetState:function(s){w(s,"setState")}},Ue=Object.assign,Ce={};Object.freeze(Ce),O.prototype.isReactComponent={},O.prototype.setState=function(s,d){if(typeof s!="object"&&typeof s!="function"&&s!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,s,d,"setState")},O.prototype.forceUpdate=function(s){this.updater.enqueueForceUpdate(this,s,"forceUpdate")};var xe={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(Ge in xe)xe.hasOwnProperty(Ge)&&E(Ge,xe[Ge]);J.prototype=O.prototype,xe=L.prototype=new J,xe.constructor=L,Ue(xe,O.prototype),xe.isPureReactComponent=!0;var Be=Array.isArray,qt=Symbol.for("react.client.reference"),B={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},ze=Object.prototype.hasOwnProperty,bt=console.createTask?console.createTask:function(){return null};xe={react_stack_bottom_frame:function(s){return s()}};var xt,tt,Et={},nt=xe.react_stack_bottom_frame.bind(xe,ce)(),Gt=bt(se(ce)),ut=!1,wt=/\/+/g,lt=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var d=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(d))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},ft=!1,We=null,rt=0,ot=!1,qe=!1,_t=typeof queueMicrotask=="function"?function(s){queueMicrotask(function(){return queueMicrotask(s)})}:ee;xe=Object.freeze({__proto__:null,c:function(s){return G().useMemoCache(s)}});var Ge={map:Te,forEach:function(s,d,T){Te(s,function(){d.apply(this,arguments)},T)},count:function(s){var d=0;return Te(s,function(){d++}),d},toArray:function(s){return Te(s,function(d){return d})||[]},only:function(s){if(!ge(s))throw Error("React.Children.only expected to receive a single React element child.");return s}};y.Activity=Fe,y.Children=Ge,y.Component=O,y.Fragment=u,y.Profiler=P,y.PureComponent=L,y.StrictMode=b,y.Suspense=z,y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,y.__COMPILER_RUNTIME=xe,y.act=function(s){var d=B.actQueue,T=rt;rt++;var R=B.actQueue=d!==null?d:[],D=!1;try{var $=s()}catch(X){B.thrownErrors.push(X)}if(0<B.thrownErrors.length)throw te(d,T),s=re(B.thrownErrors),B.thrownErrors.length=0,s;if($!==null&&typeof $=="object"&&typeof $.then=="function"){var F=$;return _t(function(){D||ot||(ot=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(X,Pe){D=!0,F.then(function($e){if(te(d,T),T===0){try{Oe(R),ee(function(){return ue($e,X,Pe)})}catch(St){B.thrownErrors.push(St)}if(0<B.thrownErrors.length){var Tt=re(B.thrownErrors);B.thrownErrors.length=0,Pe(Tt)}}else X($e)},function($e){te(d,T),0<B.thrownErrors.length&&($e=re(B.thrownErrors),B.thrownErrors.length=0),Pe($e)})}}}var Z=$;if(te(d,T),T===0&&(Oe(R),R.length!==0&&_t(function(){D||ot||(ot=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),B.actQueue=null),0<B.thrownErrors.length)throw s=re(B.thrownErrors),B.thrownErrors.length=0,s;return{then:function(X,Pe){D=!0,T===0?(B.actQueue=R,ee(function(){return ue(Z,X,Pe)})):X(Z)}}},y.cache=function(s){return function(){return s.apply(null,arguments)}},y.cacheSignal=function(){return null},y.captureOwnerStack=function(){var s=B.getCurrentStack;return s===null?null:s()},y.cloneElement=function(s,d,T){if(s==null)throw Error("The argument must be a React element, but you passed "+s+".");var R=Ue({},s.props),D=s.key,$=s._owner;if(d!=null){var F;e:{if(ze.call(d,"ref")&&(F=Object.getOwnPropertyDescriptor(d,"ref").get)&&F.isReactWarning){F=!1;break e}F=d.ref!==void 0}F&&($=ne()),fe(d)&&(Q(d.key),D=""+d.key);for(Z in d)!ze.call(d,Z)||Z==="key"||Z==="__self"||Z==="__source"||Z==="ref"&&d.ref===void 0||(R[Z]=d[Z])}var Z=arguments.length-2;if(Z===1)R.children=T;else if(1<Z){F=Array(Z);for(var X=0;X<Z;X++)F[X]=arguments[X+2];R.children=F}for(R=ve(s.type,D,R,$,s._debugStack,s._debugTask),D=2;D<arguments.length;D++)pe(arguments[D]);return R},y.createContext=function(s){return s={$$typeof:U,_currentValue:s,_currentValue2:s,_threadCount:0,Provider:null,Consumer:null},s.Provider=s,s.Consumer={$$typeof:M,_context:s},s._currentRenderer=null,s._currentRenderer2=null,s},y.createElement=function(s,d,T){for(var R=2;R<arguments.length;R++)pe(arguments[R]);R={};var D=null;if(d!=null)for(X in tt||!("__self"in d)||"key"in d||(tt=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),fe(d)&&(Q(d.key),D=""+d.key),d)ze.call(d,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(R[X]=d[X]);var $=arguments.length-2;if($===1)R.children=T;else if(1<$){for(var F=Array($),Z=0;Z<$;Z++)F[Z]=arguments[Z+2];Object.freeze&&Object.freeze(F),R.children=F}if(s&&s.defaultProps)for(X in $=s.defaultProps,$)R[X]===void 0&&(R[X]=$[X]);D&&Re(R,typeof s=="function"?s.displayName||s.name||"Unknown":s);var X=1e4>B.recentlyCreatedOwnerStacks++;return ve(s,D,R,ne(),X?Error("react-stack-top-frame"):nt,X?bt(se(s)):Gt)},y.createRef=function(){var s={current:null};return Object.seal(s),s},y.forwardRef=function(s){s!=null&&s.$$typeof===C?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof s!="function"?console.error("forwardRef requires a render function but was given %s.",s===null?"null":typeof s):s.length!==0&&s.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",s.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),s!=null&&s.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var d={$$typeof:V,render:s},T;return Object.defineProperty(d,"displayName",{enumerable:!1,configurable:!0,get:function(){return T},set:function(R){T=R,s.name||s.displayName||(Object.defineProperty(s,"name",{value:R}),s.displayName=R)}}),d},y.isValidElement=ge,y.lazy=function(s){s={_status:-1,_result:s};var d={$$typeof:ke,_payload:s,_init:je},T={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return s._ioInfo=T,d._debugInfo=[{awaited:T}],d},y.memo=function(s,d){s==null&&console.error("memo: The first argument must be a component. Instead received: %s",s===null?"null":typeof s),d={$$typeof:C,type:s,compare:d===void 0?null:d};var T;return Object.defineProperty(d,"displayName",{enumerable:!1,configurable:!0,get:function(){return T},set:function(R){T=R,s.name||s.displayName||(Object.defineProperty(s,"name",{value:R}),s.displayName=R)}}),d},y.startTransition=function(s){var d=B.T,T={};T._updatedFibers=new Set,B.T=T;try{var R=s(),D=B.S;D!==null&&D(T,R),typeof R=="object"&&R!==null&&typeof R.then=="function"&&(B.asyncTransitions++,R.then(be,be),R.then(de,lt))}catch($){lt($)}finally{d===null&&T._updatedFibers&&(s=T._updatedFibers.size,T._updatedFibers.clear(),10<s&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),d!==null&&T.types!==null&&(d.types!==null&&d.types!==T.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),d.types=T.types),B.T=d}},y.unstable_useCacheRefresh=function(){return G().useCacheRefresh()},y.use=function(s){return G().use(s)},y.useActionState=function(s,d,T){return G().useActionState(s,d,T)},y.useCallback=function(s,d){return G().useCallback(s,d)},y.useContext=function(s){var d=G();return s.$$typeof===M&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),d.useContext(s)},y.useDebugValue=function(s,d){return G().useDebugValue(s,d)},y.useDeferredValue=function(s,d){return G().useDeferredValue(s,d)},y.useEffect=function(s,d){return s==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),G().useEffect(s,d)},y.useEffectEvent=function(s){return G().useEffectEvent(s)},y.useId=function(){return G().useId()},y.useImperativeHandle=function(s,d,T){return G().useImperativeHandle(s,d,T)},y.useInsertionEffect=function(s,d){return s==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),G().useInsertionEffect(s,d)},y.useLayoutEffect=function(s,d){return s==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),G().useLayoutEffect(s,d)},y.useMemo=function(s,d){return G().useMemo(s,d)},y.useOptimistic=function(s,d){return G().useOptimistic(s,d)},y.useReducer=function(s,d,T){return G().useReducer(s,d,T)},y.useRef=function(s){return G().useRef(s)},y.useState=function(s){return G().useState(s)},y.useSyncExternalStore=function(s,d,T){return G().useSyncExternalStore(s,d,T)},y.useTransition=function(){return G().useTransition()},y.version="19.2.3",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(yt,yt.exports)),yt.exports}var gn;function mn(){return gn||(gn=1,process.env.NODE_ENV==="production"?It.exports=jr():It.exports=zr()),It.exports}var yn;function Nr(){return yn||(yn=1,process.env.NODE_ENV!=="production"&&(function(){function v(u){if(u==null)return null;if(typeof u=="function")return u.$$typeof===je?null:u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case Re:return"Fragment";case ve:return"Profiler";case _e:return"StrictMode";case Ie:return"Suspense";case m:return"SuspenseList";case Te:return"Activity"}if(typeof u=="object")switch(typeof u.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),u.$$typeof){case fe:return"Portal";case pe:return u.displayName||"Context";case Me:return(u._context.displayName||"Context")+".Consumer";case ge:var b=u.render;return u=u.displayName,u||(u=b.displayName||b.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case De:return b=u.displayName||null,b!==null?b:v(u.type)||"Memo";case he:b=u._payload,u=u._init;try{return v(u(b))}catch{}}return null}function y(u){return""+u}function E(u){try{y(u);var b=!1}catch{b=!0}if(b){b=console;var P=b.error,M=typeof Symbol=="function"&&Symbol.toStringTag&&u[Symbol.toStringTag]||u.constructor.name||"Object";return P.call(b,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",M),y(u)}}function g(u){if(u===Re)return"<>";if(typeof u=="object"&&u!==null&&u.$$typeof===he)return"<...>";try{var b=v(u);return b?"<"+b+">":"<...>"}catch{return"<...>"}}function w(){var u=G.A;return u===null?null:u.getOwner()}function O(){return Error("react-stack-top-frame")}function J(u){if(be.call(u,"key")){var b=Object.getOwnPropertyDescriptor(u,"key").get;if(b&&b.isReactWarning)return!1}return u.key!==void 0}function L(u,b){function P(){te||(te=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",b))}P.isReactWarning=!0,Object.defineProperty(u,"key",{get:P,configurable:!0})}function de(){var u=v(this.type);return ue[u]||(ue[u]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),u=this.props.ref,u!==void 0?u:null}function ie(u,b,P,M,U,V){var z=P.ref;return u={$$typeof:ce,type:u,key:b,props:P,_owner:M},(z!==void 0?z:null)!==null?Object.defineProperty(u,"ref",{enumerable:!1,get:de}):Object.defineProperty(u,"ref",{enumerable:!1,value:null}),u._store={},Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(u,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(u,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:U}),Object.defineProperty(u,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:V}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u}function Q(u,b,P,M,U,V){var z=b.children;if(z!==void 0)if(M)if(ee(z)){for(M=0;M<z.length;M++)ye(z[M]);Object.freeze&&Object.freeze(z)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ye(z);if(be.call(b,"key")){z=v(u);var ae=Object.keys(b).filter(function(ke){return ke!=="key"});M=0<ae.length?"{key: someKey, "+ae.join(": ..., ")+": ...}":"{key: someKey}",me[z+M]||(ae=0<ae.length?"{"+ae.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
54
|
+
let props = %s;
|
|
55
|
+
<%s {...props} />
|
|
56
|
+
React keys must be passed directly to JSX without using spread:
|
|
57
|
+
let props = %s;
|
|
58
|
+
<%s key={someKey} {...props} />`,M,z,ae,z),me[z+M]=!0)}if(z=null,P!==void 0&&(E(P),z=""+P),J(b)&&(E(b.key),z=""+b.key),"key"in b){P={};for(var C in b)C!=="key"&&(P[C]=b[C])}else P=b;return z&&L(P,typeof u=="function"?u.displayName||u.name||"Unknown":u),ie(u,z,P,w(),U,V)}function ye(u){se(u)?u._store&&(u._store.validated=1):typeof u=="object"&&u!==null&&u.$$typeof===he&&(u._payload.status==="fulfilled"?se(u._payload.value)&&u._payload.value._store&&(u._payload.value._store.validated=1):u._store&&(u._store.validated=1))}function se(u){return typeof u=="object"&&u!==null&&u.$$typeof===ce}var ne=mn(),ce=Symbol.for("react.transitional.element"),fe=Symbol.for("react.portal"),Re=Symbol.for("react.fragment"),_e=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),Me=Symbol.for("react.consumer"),pe=Symbol.for("react.context"),ge=Symbol.for("react.forward_ref"),Ie=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),De=Symbol.for("react.memo"),he=Symbol.for("react.lazy"),Te=Symbol.for("react.activity"),je=Symbol.for("react.client.reference"),G=ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be=Object.prototype.hasOwnProperty,ee=Array.isArray,re=console.createTask?console.createTask:function(){return null};ne={react_stack_bottom_frame:function(u){return u()}};var te,ue={},Oe=ne.react_stack_bottom_frame.bind(ne,O)(),le=re(g(O)),me={};mt.Fragment=Re,mt.jsx=function(u,b,P){var M=1e4>G.recentlyCreatedOwnerStacks++;return Q(u,b,P,!1,M?Error("react-stack-top-frame"):Oe,M?re(g(u)):le)},mt.jsxs=function(u,b,P){var M=1e4>G.recentlyCreatedOwnerStacks++;return Q(u,b,P,!0,M?Error("react-stack-top-frame"):Oe,M?re(g(u)):le)}})()),mt}var bn;function Lr(){return bn||(bn=1,process.env.NODE_ENV==="production"?Mt.exports=Dr():Mt.exports=Nr()),Mt.exports}var Hr=Lr(),Wt=mn();const Yr=({onChange:v,initialValue:y})=>{const E=Wt.useRef(null),g=Wt.useRef(null);return Wt.useEffect(()=>{if(g.current&&!E.current){E.current=new pn,g.current.appendChild(E.current.getElement()),y&&E.current.setHTML(y);const w=E.current.getElement(),O=()=>{const J=E.current?.getHTML()||"";v?.(J)};w.addEventListener("input",O),w.addEventListener("keyup",O),w.addEventListener("paste",O)}},[v,y]),Hr.jsx("div",{ref:g})};Je.RichTextEditor=pn,Je.RichTextEditorComponent=Yr,Object.defineProperty(Je,Symbol.toStringTag,{value:"Module"})}));
|