@segmentify/ui 0.0.67 → 0.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/segmentify-ui.cjs
CHANGED
|
@@ -229,9 +229,9 @@ ${p5(this.code(t,n))}
|
|
|
229
229
|
`,{[si.blotName]:n}),i.insert(o)),new ct);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(si.className),r.innerHTML=wht(this.options.hljs,n,t),HR(this.quill.scroll,r,[(i,o)=>{const a=Kf.value(i);return a?o.compose(new ct().retain(o.length(),{[us.blotName]:a})):o}],[(i,o)=>i.data.split(`
|
|
230
230
|
`).reduce((a,s,c)=>(c!==0&&a.insert(`
|
|
231
231
|
`,{[si.blotName]:n}),a.insert(s)),o)],new WeakMap)}}Jue.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};class la extends Fr{static blotName="table";static tagName="TD";static create(t){const n=super.create();return t?n.setAttribute("data-row",t):n.setAttribute("data-row",VR()),n}static formats(t){if(t.hasAttribute("data-row"))return t.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(t,n){t===la.blotName&&n?this.domNode.setAttribute("data-row",n):super.format(t,n)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}}class pu extends Hu{static blotName="table-row";static tagName="TR";checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const t=this.children.head.formats(),n=this.children.tail.formats(),r=this.next.children.head.formats(),i=this.next.children.tail.formats();return t.table===n.table&&t.table===r.table&&t.table===i.table}return!1}optimize(t){super.optimize(t),this.children.forEach(n=>{if(n.next==null)return;const r=n.formats(),i=n.next.formats();if(r.table!==i.table){const o=this.splitAfter(n);o&&o.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}class Ws extends Hu{static blotName="table-body";static tagName="TBODY"}class Dg extends Hu{static blotName="table-container";static tagName="TABLE";balanceCells(){const t=this.descendants(pu),n=t.reduce((r,i)=>Math.max(i.children.length,r),0);t.forEach(r=>{new Array(n-r.children.length).fill(0).forEach(()=>{let i;r.children.head!=null&&(i=la.formats(r.children.head.domNode));const o=this.scroll.create(la.blotName,i);r.appendChild(o),o.optimize()})})}cells(t){return this.rows().map(n=>n.children.at(t))}deleteColumn(t){const[n]=this.descendant(Ws);n==null||n.children.head==null||n.children.forEach(r=>{r.children.at(t)?.remove()})}insertColumn(t){const[n]=this.descendant(Ws);n==null||n.children.head==null||n.children.forEach(r=>{const i=r.children.at(t),o=la.formats(r.children.head.domNode),a=this.scroll.create(la.blotName,o);r.insertBefore(a,i)})}insertRow(t){const[n]=this.descendant(Ws);if(n==null||n.children.head==null)return;const r=VR(),i=this.scroll.create(pu.blotName);n.children.head.children.forEach(()=>{const a=this.scroll.create(la.blotName,r);i.appendChild(a)});const o=n.children.at(t);n.insertBefore(i,o)}rows(){const t=this.children.head;return t==null?[]:t.children.map(n=>n)}}Dg.allowedChildren=[Ws];Ws.requiredContainer=Dg;Ws.allowedChildren=[pu];pu.requiredContainer=Ws;pu.allowedChildren=[la];la.requiredContainer=pu;function VR(){return`row-${Math.random().toString(36).slice(2,6)}`}class xht extends Sl{static register(){xe.register(la),xe.register(pu),xe.register(Ws),xe.register(Dg)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Dg).forEach(t=>{t.balanceCells()})}deleteColumn(){const[t,,n]=this.getTable();n!=null&&(t.deleteColumn(n.cellOffset()),this.quill.update(xe.sources.USER))}deleteRow(){const[,t]=this.getTable();t!=null&&(t.remove(),this.quill.update(xe.sources.USER))}deleteTable(){const[t]=this.getTable();if(t==null)return;const n=t.offset();t.remove(),this.quill.update(xe.sources.USER),this.quill.setSelection(n,xe.sources.SILENT)}getTable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(t==null)return[null,null,null,-1];const[n,r]=this.quill.getLine(t.index);if(n==null||n.statics.blotName!==la.blotName)return[null,null,null,-1];const i=n.parent;return[i.parent.parent,i,n,r]}insertColumn(t){const n=this.quill.getSelection();if(!n)return;const[r,i,o]=this.getTable(n);if(o==null)return;const a=o.cellOffset();r.insertColumn(a+t),this.quill.update(xe.sources.USER);let s=i.rowOffset();t===0&&(s+=1),this.quill.setSelection(n.index+s,n.length,xe.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){const n=this.quill.getSelection();if(!n)return;const[r,i,o]=this.getTable(n);if(o==null)return;const a=i.rowOffset();r.insertRow(a+t),this.quill.update(xe.sources.USER),t>0?this.quill.setSelection(n,xe.sources.SILENT):this.quill.setSelection(n.index+i.children.length,n.length,xe.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,n){const r=this.quill.getSelection();if(r==null)return;const i=new Array(t).fill(0).reduce(o=>{const a=new Array(n).fill(`
|
|
232
|
-
`).join("");return o.insert(a,{table:VR()})},new ct().retain(r.index));this.quill.updateContents(i,xe.sources.USER),this.quill.setSelection(r.index,xe.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(xe.events.SCROLL_OPTIMIZE,t=>{t.some(n=>["TD","TR","TBODY","TABLE"].includes(n.target.tagName)?(this.quill.once(xe.events.TEXT_CHANGE,(r,i,o)=>{o===xe.sources.USER&&this.balanceTables()}),!0):!1)})}}const XG=ws("quill:toolbar");let GR=class extends Sl{constructor(e,t){if(super(e,t),Array.isArray(this.options.container)){const n=document.createElement("div");n.setAttribute("role","toolbar"),Eht(n,this.options.container),e.container?.parentNode?.insertBefore(n,e.container),this.container=n}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){XG.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(n=>{const r=this.options.handlers?.[n];r&&this.addHandler(n,r)}),Array.from(this.container.querySelectorAll("button, select")).forEach(n=>{this.attach(n)}),this.quill.on(xe.events.EDITOR_CHANGE,()=>{const[n]=this.quill.selection.getRange();this.update(n)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(r=>r.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){XG.warn("ignoring attaching to nonexistent format",t,e);return}const n=e.tagName==="SELECT"?"change":"click";e.addEventListener(n,r=>{let i;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const a=e.options[e.selectedIndex];a.hasAttribute("selected")?i=!1:i=a.value||!1}else e.classList.contains("ql-active")?i=!1:i=e.value||!e.hasAttribute("value"),r.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,i);else if(this.quill.scroll.query(t).prototype instanceof Ki){if(i=prompt(`Enter ${t}`),!i)return;this.quill.updateContents(new ct().retain(o.index).delete(o.length).insert({[t]:i}),xe.sources.USER)}else this.quill.format(t,i,xe.sources.USER);this.update(o)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(n=>{const[r,i]=n;if(i.tagName==="SELECT"){let o=null;if(e==null)o=null;else if(t[r]==null)o=i.querySelector("option[selected]");else if(!Array.isArray(t[r])){let a=t[r];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),o=i.querySelector(`option[value="${a}"]`)}o==null?(i.value="",i.selectedIndex=-1):o.selected=!0}else if(e==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const o=t[r],a=o===i.getAttribute("value")||o!=null&&o.toString()===i.getAttribute("value")||o==null&&!i.getAttribute("value");i.classList.toggle("ql-active",a),i.setAttribute("aria-pressed",a.toString())}else{const o=t[r]!=null;i.classList.toggle("ql-active",o),i.setAttribute("aria-pressed",o.toString())}})}};GR.DEFAULTS={};function KG(e,t,n){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${t}`),r.setAttribute("aria-pressed","false"),n!=null?(r.value=n,r.setAttribute("aria-label",`${t}: ${n}`)):r.setAttribute("aria-label",t),e.appendChild(r)}function Eht(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(n=>{const r=document.createElement("span");r.classList.add("ql-formats"),n.forEach(i=>{if(typeof i=="string")KG(r,i);else{const o=Object.keys(i)[0],a=i[o];Array.isArray(a)?Cht(r,o,a):KG(r,o,a)}}),e.appendChild(r)})}function Cht(e,t,n){const r=document.createElement("select");r.classList.add(`ql-${t}`),n.forEach(i=>{const o=document.createElement("option");i!==!1?o.setAttribute("value",String(i)):o.setAttribute("selected","selected"),r.appendChild(o)}),e.appendChild(r)}GR.DEFAULTS={container:null,handlers:{clean(){const e=this.quill.getSelection();if(e!=null)if(e.length===0){const t=this.quill.getFormat();Object.keys(t).forEach(n=>{this.quill.scroll.query(n,dt.INLINE)!=null&&this.quill.format(n,!1,xe.sources.USER)})}else this.quill.removeFormat(e.index,e.length,xe.sources.USER)},direction(e){const{align:t}=this.quill.getFormat();e==="rtl"&&t==null?this.quill.format("align","right",xe.sources.USER):!e&&t==="right"&&this.quill.format("align",!1,xe.sources.USER),this.quill.format("direction",e,xe.sources.USER)},indent(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0,10);if(e==="+1"||e==="-1"){let i=e==="+1"?1:-1;n.direction==="rtl"&&(i*=-1),this.quill.format("indent",r+i,xe.sources.USER)}},link(e){e===!0&&(e=prompt("Enter link URL:")),this.quill.format("link",e,xe.sources.USER)},list(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t);e==="check"?n.list==="checked"||n.list==="unchecked"?this.quill.format("list",!1,xe.sources.USER):this.quill.format("list","unchecked",xe.sources.USER):this.quill.format("list",e,xe.sources.USER)}}};const Sht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',$ht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',Mht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',Aht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',Nht='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',Oht='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',Rht='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',Iht='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',ZG='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',Pht='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',Fht='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',Tht='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',Dht='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',zht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',_ht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',kht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',Lht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',jht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',Hht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',Bht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',Vht='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',Ght='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',qht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',Wht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',Uht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',Yht='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',Xht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',Kht='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',Zht='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',Jht='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',Qht='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',e2t='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',t2t='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Ch={align:{"":Sht,center:$ht,right:Mht,justify:Aht},background:Nht,blockquote:Oht,bold:Rht,clean:Iht,code:ZG,"code-block":ZG,color:Pht,direction:{"":Fht,rtl:Tht},formula:Dht,header:{1:zht,2:_ht,3:kht,4:Lht,5:jht,6:Hht},italic:Bht,image:Vht,indent:{"+1":Ght,"-1":qht},link:Wht,list:{bullet:Uht,check:Yht,ordered:Xht},script:{sub:Kht,super:Zht},strike:Jht,table:Qht,underline:e2t,video:t2t},n2t='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let JG=0;function QG(e,t){e.setAttribute(t,`${e.getAttribute(t)!=="true"}`)}class g5{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),n.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),QG(this.label,"aria-expanded"),QG(this.options,"aria-hidden")}buildItem(t){const n=document.createElement("span");n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item");const r=t.getAttribute("value");return r&&n.setAttribute("data-value",r),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",()=>{this.selectItem(n,!0)}),n.addEventListener("keydown",i=>{switch(i.key){case"Enter":this.selectItem(n,!0),i.preventDefault();break;case"Escape":this.escape(),i.preventDefault();break}}),n}buildLabel(){const t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=n2t,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${JG}`,JG+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach(n=>{const r=this.buildItem(n);t.appendChild(r),n.selected===!0&&this.selectItem(r)}),this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach(t=>{this.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");t!==r&&(r?.classList.remove("ql-selected"),t!=null&&(t.classList.add("ql-selected"),this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),n&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let t;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const n=t!=null&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}class Que extends g5{constructor(t,n){super(t),this.label.innerHTML=n,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(t){const n=super.buildItem(t);return n.style.backgroundColor=t.getAttribute("value")||"",n}selectItem(t,n){super.selectItem(t,n);const r=this.label.querySelector(".ql-color-label"),i=t&&t.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=i:r.style.fill=i)}}class ede extends g5{constructor(t,n){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=n[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,n){super.selectItem(t,n);const r=t||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const r2t=e=>{const{overflowY:t}=getComputedStyle(e,null);return t!=="visible"&&t!=="clip"};class tde{constructor(t,n){this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,r2t(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){const n=t.left+t.width/2-this.root.offsetWidth/2,r=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${n}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const i=this.boundsContainer.getBoundingClientRect(),o=this.root.getBoundingClientRect();let a=0;if(o.right>i.right&&(a=i.right-o.right,this.root.style.left=`${n+a}px`),o.left<i.left&&(a=i.left-o.left,this.root.style.left=`${n+a}px`),o.bottom>i.bottom){const s=o.bottom-o.top,c=t.bottom-t.top+s;this.root.style.top=`${r-c}px`,this.root.classList.add("ql-flip")}return a}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const i2t=[!1,"center","right","justify"],o2t=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],a2t=[!1,"serif","monospace"],l2t=["1","2","3",!1],s2t=["small",!1,"large","huge"];class q2 extends J1{constructor(t,n){super(t,n);const r=i=>{if(!document.body.contains(t.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(i.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(o=>{o.container.contains(i.target)||o.close()})};t.emitter.listenDOM("click",document.body,r)}addModule(t){const n=super.addModule(t);return t==="toolbar"&&this.extendToolbar(n),n}buildButtons(t,n){Array.from(t).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(i=>{if(i.startsWith("ql-")&&(i=i.slice(3),n[i]!=null))if(i==="direction")r.innerHTML=n[i][""]+n[i].rtl;else if(typeof n[i]=="string")r.innerHTML=n[i];else{const o=r.value||"";o!=null&&n[i][o]&&(r.innerHTML=n[i][o])}})})}buildPickers(t,n){this.pickers=Array.from(t).map(i=>{if(i.classList.contains("ql-align")&&(i.querySelector("option")==null&&Nf(i,i2t),typeof n.align=="object"))return new ede(i,n.align);if(i.classList.contains("ql-background")||i.classList.contains("ql-color")){const o=i.classList.contains("ql-background")?"background":"color";return i.querySelector("option")==null&&Nf(i,o2t,o==="background"?"#ffffff":"#000000"),new Que(i,n[o])}return i.querySelector("option")==null&&(i.classList.contains("ql-font")?Nf(i,a2t):i.classList.contains("ql-header")?Nf(i,l2t):i.classList.contains("ql-size")&&Nf(i,s2t)),new g5(i)});const r=()=>{this.pickers.forEach(i=>{i.update()})};this.quill.on(at.events.EDITOR_CHANGE,r)}}q2.DEFAULTS=qs({},J1.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let e=this.container.querySelector("input.ql-image[type=file]");e==null&&(e=document.createElement("input"),e.setAttribute("type","file"),e.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),e.classList.add("ql-image"),e.addEventListener("change",()=>{const t=this.quill.getSelection(!0);this.quill.uploader.upload(t,e.files),e.value=""}),this.container.appendChild(e)),e.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class nde extends tde{constructor(t,n){super(t,n),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",t=>{t.key==="Enter"?(this.save(),t.preventDefault()):t.key==="Escape"&&(this.cancel(),t.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;n!=null?this.textbox.value=n:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:n}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,at.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,at.sources.USER)),this.quill.root.scrollTop=n;break}case"video":t=c2t(t);case"formula":{if(!t)break;const n=this.quill.getSelection(!0);if(n!=null){const r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,at.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",at.sources.USER),this.quill.setSelection(r+2,at.sources.USER)}break}}this.textbox.value="",this.hide()}}function c2t(e){let t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`:e}function Nf(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t.forEach(r=>{const i=document.createElement("option");r===n?i.setAttribute("selected","selected"):i.setAttribute("value",String(r)),e.appendChild(i)})}const u2t=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class d2t extends nde{static TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join("");constructor(t,n){super(t,n),this.quill.on(at.events.EDITOR_CHANGE,(r,i,o,a)=>{if(r===at.events.SELECTION_CHANGE)if(i!=null&&i.length>0&&a===at.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const s=this.quill.getLines(i.index,i.length);if(s.length===1){const c=this.quill.getBounds(i);c!=null&&this.position(c)}else{const c=s[s.length-1],u=this.quill.getIndex(c),d=Math.min(c.length()-1,i.index+i.length-u),f=this.quill.getBounds(new hu(u,d));f!=null&&this.position(f)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(at.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const t=this.quill.getSelection();if(t!=null){const n=this.quill.getBounds(t);n!=null&&this.position(n)}},1)})}cancel(){this.show()}position(t){const n=super.position(t),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",n!==0&&(r.style.marginLeft=`${-1*n-r.offsetWidth/2}px`),n}}class rde extends q2{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=u2t),super(t,n),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new d2t(this.quill,this.options.bounds),t.container!=null&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),Ch),this.buildPickers(t.container.querySelectorAll("select"),Ch))}}rde.DEFAULTS=qs({},q2.DEFAULTS,{modules:{toolbar:{handlers:{link(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1,xe.sources.USER)}}}}});const f2t=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class h2t extends nde{static TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const n=this.linkRange;this.restoreFocus(),this.quill.formatText(n,"link",!1,at.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(at.events.SELECTION_CHANGE,(t,n,r)=>{if(t!=null){if(t.length===0&&r===at.sources.USER){const[i,o]=this.quill.scroll.descendant(Tg,t.index);if(i!=null){this.linkRange=new hu(t.index-o,i.length());const a=Tg.formats(i.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const s=this.quill.getBounds(this.linkRange);s!=null&&this.position(s);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}class ide extends q2{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=f2t),super(t,n),this.quill.container.classList.add("ql-snow")}extendToolbar(t){t.container!=null&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),Ch),this.buildPickers(t.container.querySelectorAll("select"),Ch),this.tooltip=new h2t(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(n,r)=>{t.handlers.link.call(t,!r.format.link)}))}}ide.DEFAULTS=qs({},q2.DEFAULTS,{modules:{toolbar:{handlers:{link(e){if(e){const t=this.quill.getSelection();if(t==null||t.length===0)return;let n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&n.indexOf("mailto:")!==0&&(n=`mailto:${n}`);const{tooltip:r}=this.quill.theme;r.edit("link",n)}else this.quill.format("link",!1,xe.sources.USER)}}}}});xe.register({"attributors/attribute/direction":Hue,"attributors/class/align":kue,"attributors/class/background":b0t,"attributors/class/color":v0t,"attributors/class/direction":Bue,"attributors/class/font":que,"attributors/class/size":Uue,"attributors/style/align":Lue,"attributors/style/background":_R,"attributors/style/color":zR,"attributors/style/direction":Vue,"attributors/style/font":Wue,"attributors/style/size":Yue},!0);xe.register({"formats/align":kue,"formats/direction":Bue,"formats/indent":uht,"formats/background":_R,"formats/color":zR,"formats/font":que,"formats/size":Uue,"formats/blockquote":dht,"formats/code-block":si,"formats/header":fht,"formats/list":G2,"formats/bold":BR,"formats/code":kR,"formats/italic":hht,"formats/link":Tg,"formats/script":pht,"formats/strike":mht,"formats/underline":ght,"formats/formula":vht,"formats/image":bht,"formats/video":yht,"modules/syntax":Jue,"modules/table":xht,"modules/toolbar":GR,"themes/bubble":rde,"themes/snow":ide,"ui/icons":Ch,"ui/picker":g5,"ui/icon-picker":ede,"ui/color-picker":Que,"ui/tooltip":tde},!0);const p2t=l.forwardRef(({readOnly:e,defaultValue:t,onTextChange:n,onSelectionChange:r,theme:i="snow"},o)=>{const a=l.useRef(null),s=l.useRef(t),c=l.useRef(n),u=l.useRef(r),d=l.useRef(null);return l.useLayoutEffect(()=>{c.current=n,u.current=r}),l.useEffect(()=>{o&&typeof o=="object"&&o.current&&o.current.enable(!e)},[o,e]),l.useEffect(()=>{const f=a.current;if(!f)return;const h=f.appendChild(f.ownerDocument.createElement("div")),p=new xe(h,{theme:i});return d.current=p,o&&typeof o=="object"&&(o.current=p),s.current&&p.setContents(s.current),p.on(xe.events.TEXT_CHANGE,()=>{const g=p.getSemanticHTML();c.current?.(g)}),p.on(xe.events.SELECTION_CHANGE,(g,m,b)=>{u.current?.(g,m,b)}),()=>{d.current=null,o&&typeof o=="object"&&(o.current=null),f.innerHTML=""}},[o,i]),y.jsx("div",{ref:a})});p2t.displayName="QuillEditor";l.createContext(null);l.createContext(null);function m2t(e,t){let[n,r]=l.useState(e);return l.useEffect(()=>{let i=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(i)}},[e,t]),n}l.createContext({});function W2({...e}){return y.jsx(a5e,{"data-slot":"popover",...e})}const Q1=v.forwardRef(({...e},t)=>y.jsx(CZ,{"data-slot":"popover-trigger",ref:t,...e}));Q1.displayName=CZ.displayName;const ef=v.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>y.jsx(l5e,{children:y.jsx(SZ,{ref:i,"data-slot":"popover-content",align:t,sideOffset:n,className:te("ui-lib-root ui:z-[102] ui:w-72 ui:rounded-md ui:border ui:bg-popover ui:p-4 ui:text-popover-foreground ui:shadow-md ui:outline-none ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2",e),...r})}));ef.displayName=SZ.displayName;const ode=v.forwardRef(({...e},t)=>y.jsx(EZ,{"data-slot":"popover-anchor",ref:t,...e}));ode.displayName=EZ.displayName;function g2t({selectedItem:e,fetchItems:t,searchPlaceholder:n="Search...",placeholder:r="Select an item",className:i,disabled:o=!1,align:a,onSelect:s}){const[c,u]=l.useState(!1),[d,f]=l.useState([e]),[h,p]=l.useState(""),[g,m]=l.useState(!1),b=m2t(h,300),w=l.useRef(t),x=l.useRef(e);l.useEffect(()=>{w.current=t},[t]),l.useEffect(()=>{x.current=e},[e]);const E=l.useCallback((M,A)=>{w.current(M,A).then(R=>{if(A?.aborted)return;let T=[...R];const k=x.current;k.value&&!M&&!T.find(N=>N.value===k.value)&&(T=[k,...T]),f(T)}).catch(()=>{if(A?.aborted)return;const R=x.current;f(R.value?[R]:[])}).finally(()=>{A?.aborted||m(!1)})},[]);l.useEffect(()=>{if(!c||h===""&&b!=="")return;const M=new AbortController;return E(b,M.signal),()=>{M.abort()}},[b,E,c,h]);function S(M){M&&(f([]),p(""),m(!0)),u(M)}const $=M=>{p(M),m(M!==b)};return y.jsxs(W2,{open:c,onOpenChange:S,children:[y.jsx(Q1,{asChild:!0,children:y.jsxs(Gn,{variant:"outline",role:"combobox","aria-expanded":c,className:te("ui:justify-between ui:w-full ui:h-10",i),disabled:o,children:[y.jsx("span",{className:"ui:truncate ui:flex ui:items-center",children:e.label||r}),y.jsx(qe.ChevronDownIcon,{className:"ui:ml-2 ui:h-4 ui:w-4 ui:shrink-0 ui:opacity-50"})]})}),y.jsx(ef,{style:{width:"var(--radix-popover-trigger-width)"},className:"ui:p-0",align:a,children:y.jsxs(Jv,{shouldFilter:!1,children:[y.jsx(qA,{placeholder:n,value:h,onValueChange:$}),y.jsxs(WA,{children:[!g&&y.jsx(UA,{children:"No results found."}),y.jsx(YA,{children:d.map(M=>{if(!M.value)return null;const A=e.value===M.value;return y.jsxs(XA,{value:M.value,onSelect:()=>{s(M),S(!1)},children:[M.label,y.jsx(qe.Check,{className:te("ui:ml-auto ui:h-4 ui:w-4",A?"ui:opacity-100":"ui:opacity-0")})]},M.value)})})]})]})})]})}const v2t="dd/MM/yyyy",b2t=({date:e,format:t=v2t})=>e?y.jsx(y.Fragment,{children:qc(e,t)}):null,ade=({start:e,end:t,onConfirm:n,className:r,triggerButtonClassName:i,label:o,placeholder:a,confirmLabel:s="Confirm",disabledCondition:c,dateLocale:u})=>{const[d,f]=l.useState(!1),[h,p]=l.useState(e&&t?{from:e,to:t}:void 0),g=()=>{!h?.from||!h?.to||(n({from:h.from,to:h.to}),f(!1))};return y.jsxs("div",{className:te("ui:grid ui:gap-2",r),children:[o&&y.jsx(Io,{children:o}),y.jsxs(W2,{open:d,onOpenChange:f,children:[y.jsx(Q1,{asChild:!0,children:y.jsxs(Gn,{id:"date",variant:"outline",className:te("ui:h-auto ui:text-muted-foreground ui:justify-start ui:text-left ui:font-normal",!h&&"ui:text-muted-foreground",i),children:[y.jsx(qe.Calendar,{className:"ui:h-4 ui:w-4"}),h?.from?h.to?y.jsxs(y.Fragment,{children:[qc(h.from,"LLL dd, y",{locale:u})," -",qc(h.to,"LLL dd, y",{locale:u})]}):qc(h.from,"LLL dd, y",{locale:u}):y.jsx("span",{children:a})]})}),y.jsxs(ef,{className:"ui:w-auto ui:p-0",align:"start",children:[y.jsx(gA,{mode:"range",defaultMonth:h?.from??new Date,selected:h,onSelect:p,numberOfMonths:2,disabled:c,locale:u}),y.jsx("div",{className:te("ui:px-3 ui:pb-4 ui:pt-2","ui:flex ui:justify-start ui:md:justify-end"),children:y.jsx(Gn,{variant:"success",onClick:g,className:"ui:w-full ui:md:w-max",children:s})})]})]})]})};function lde({value:e,onChange:t,className:n,inputClassName:r,name:i,placeholder:o,label:a}){const[s,c]=l.useState(e),u=l.useRef(null),d=l.useRef(t);l.useEffect(()=>{d.current=t},[t]);const f=l.useCallback(p=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{p.length>=3?d.current(p):d.current("")},300)},[]),h=p=>{const g=decodeURIComponent(p);c(g),f(g)};return y.jsxs("search",{className:te("ui:w-full",n),children:[a&&y.jsx(Io,{htmlFor:i,className:"ui:leading-6 ui:w-full ui:mb-2",children:a}),y.jsx(gs,{type:"search",name:i,id:i,"data-test-id":i,placeholder:o,value:s,onChange:({target:p})=>h(p.value),className:te("ui:max-h-10",r),autoFocus:!0})]})}const y2t=({banner:e,campaignName:t,isControlled:n,open:r,setOpen:i,imageClassName:o})=>y.jsxs(HA,{...n&&{open:r,onOpenChange:i},children:[!n&&y.jsx(Jee,{asChild:!0,children:y.jsx("div",{className:"ui:cursor-pointer",children:y.jsx("img",{className:te("ui:w-full ui:max-w-80 ui:mx-auto ui:mt-4! ui:scale-100 ui:hover:scale-110 ui:transition-all ui:duration-300 ui:aspect-video",o),src:e,alt:t})})}),y.jsxs(BA,{className:"ui:max-w-2xl",children:[y.jsx(VA,{children:y.jsx(GA,{children:t})}),y.jsx("img",{className:te("ui:w-full ui:aspect-video",o),src:e,alt:t})]})]});function w2t(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const sde=l.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),U2=()=>{const e=l.useContext(sde);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};w2t(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
232
|
+
`).join("");return o.insert(a,{table:VR()})},new ct().retain(r.index));this.quill.updateContents(i,xe.sources.USER),this.quill.setSelection(r.index,xe.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(xe.events.SCROLL_OPTIMIZE,t=>{t.some(n=>["TD","TR","TBODY","TABLE"].includes(n.target.tagName)?(this.quill.once(xe.events.TEXT_CHANGE,(r,i,o)=>{o===xe.sources.USER&&this.balanceTables()}),!0):!1)})}}const XG=ws("quill:toolbar");let GR=class extends Sl{constructor(e,t){if(super(e,t),Array.isArray(this.options.container)){const n=document.createElement("div");n.setAttribute("role","toolbar"),Eht(n,this.options.container),e.container?.parentNode?.insertBefore(n,e.container),this.container=n}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){XG.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(n=>{const r=this.options.handlers?.[n];r&&this.addHandler(n,r)}),Array.from(this.container.querySelectorAll("button, select")).forEach(n=>{this.attach(n)}),this.quill.on(xe.events.EDITOR_CHANGE,()=>{const[n]=this.quill.selection.getRange();this.update(n)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(r=>r.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){XG.warn("ignoring attaching to nonexistent format",t,e);return}const n=e.tagName==="SELECT"?"change":"click";e.addEventListener(n,r=>{let i;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const a=e.options[e.selectedIndex];a.hasAttribute("selected")?i=!1:i=a.value||!1}else e.classList.contains("ql-active")?i=!1:i=e.value||!e.hasAttribute("value"),r.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,i);else if(this.quill.scroll.query(t).prototype instanceof Ki){if(i=prompt(`Enter ${t}`),!i)return;this.quill.updateContents(new ct().retain(o.index).delete(o.length).insert({[t]:i}),xe.sources.USER)}else this.quill.format(t,i,xe.sources.USER);this.update(o)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(n=>{const[r,i]=n;if(i.tagName==="SELECT"){let o=null;if(e==null)o=null;else if(t[r]==null)o=i.querySelector("option[selected]");else if(!Array.isArray(t[r])){let a=t[r];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),o=i.querySelector(`option[value="${a}"]`)}o==null?(i.value="",i.selectedIndex=-1):o.selected=!0}else if(e==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const o=t[r],a=o===i.getAttribute("value")||o!=null&&o.toString()===i.getAttribute("value")||o==null&&!i.getAttribute("value");i.classList.toggle("ql-active",a),i.setAttribute("aria-pressed",a.toString())}else{const o=t[r]!=null;i.classList.toggle("ql-active",o),i.setAttribute("aria-pressed",o.toString())}})}};GR.DEFAULTS={};function KG(e,t,n){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${t}`),r.setAttribute("aria-pressed","false"),n!=null?(r.value=n,r.setAttribute("aria-label",`${t}: ${n}`)):r.setAttribute("aria-label",t),e.appendChild(r)}function Eht(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(n=>{const r=document.createElement("span");r.classList.add("ql-formats"),n.forEach(i=>{if(typeof i=="string")KG(r,i);else{const o=Object.keys(i)[0],a=i[o];Array.isArray(a)?Cht(r,o,a):KG(r,o,a)}}),e.appendChild(r)})}function Cht(e,t,n){const r=document.createElement("select");r.classList.add(`ql-${t}`),n.forEach(i=>{const o=document.createElement("option");i!==!1?o.setAttribute("value",String(i)):o.setAttribute("selected","selected"),r.appendChild(o)}),e.appendChild(r)}GR.DEFAULTS={container:null,handlers:{clean(){const e=this.quill.getSelection();if(e!=null)if(e.length===0){const t=this.quill.getFormat();Object.keys(t).forEach(n=>{this.quill.scroll.query(n,dt.INLINE)!=null&&this.quill.format(n,!1,xe.sources.USER)})}else this.quill.removeFormat(e.index,e.length,xe.sources.USER)},direction(e){const{align:t}=this.quill.getFormat();e==="rtl"&&t==null?this.quill.format("align","right",xe.sources.USER):!e&&t==="right"&&this.quill.format("align",!1,xe.sources.USER),this.quill.format("direction",e,xe.sources.USER)},indent(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0,10);if(e==="+1"||e==="-1"){let i=e==="+1"?1:-1;n.direction==="rtl"&&(i*=-1),this.quill.format("indent",r+i,xe.sources.USER)}},link(e){e===!0&&(e=prompt("Enter link URL:")),this.quill.format("link",e,xe.sources.USER)},list(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t);e==="check"?n.list==="checked"||n.list==="unchecked"?this.quill.format("list",!1,xe.sources.USER):this.quill.format("list","unchecked",xe.sources.USER):this.quill.format("list",e,xe.sources.USER)}}};const Sht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',$ht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',Mht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',Aht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',Nht='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',Oht='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',Rht='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',Iht='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',ZG='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',Pht='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',Fht='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',Tht='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',Dht='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',zht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',_ht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',kht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',Lht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',jht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',Hht='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',Bht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',Vht='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',Ght='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',qht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',Wht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',Uht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',Yht='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',Xht='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',Kht='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',Zht='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',Jht='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',Qht='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',e2t='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',t2t='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Ch={align:{"":Sht,center:$ht,right:Mht,justify:Aht},background:Nht,blockquote:Oht,bold:Rht,clean:Iht,code:ZG,"code-block":ZG,color:Pht,direction:{"":Fht,rtl:Tht},formula:Dht,header:{1:zht,2:_ht,3:kht,4:Lht,5:jht,6:Hht},italic:Bht,image:Vht,indent:{"+1":Ght,"-1":qht},link:Wht,list:{bullet:Uht,check:Yht,ordered:Xht},script:{sub:Kht,super:Zht},strike:Jht,table:Qht,underline:e2t,video:t2t},n2t='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let JG=0;function QG(e,t){e.setAttribute(t,`${e.getAttribute(t)!=="true"}`)}class g5{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),n.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),QG(this.label,"aria-expanded"),QG(this.options,"aria-hidden")}buildItem(t){const n=document.createElement("span");n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item");const r=t.getAttribute("value");return r&&n.setAttribute("data-value",r),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",()=>{this.selectItem(n,!0)}),n.addEventListener("keydown",i=>{switch(i.key){case"Enter":this.selectItem(n,!0),i.preventDefault();break;case"Escape":this.escape(),i.preventDefault();break}}),n}buildLabel(){const t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=n2t,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${JG}`,JG+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach(n=>{const r=this.buildItem(n);t.appendChild(r),n.selected===!0&&this.selectItem(r)}),this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach(t=>{this.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");t!==r&&(r?.classList.remove("ql-selected"),t!=null&&(t.classList.add("ql-selected"),this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),n&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let t;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const n=t!=null&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}class Que extends g5{constructor(t,n){super(t),this.label.innerHTML=n,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(t){const n=super.buildItem(t);return n.style.backgroundColor=t.getAttribute("value")||"",n}selectItem(t,n){super.selectItem(t,n);const r=this.label.querySelector(".ql-color-label"),i=t&&t.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=i:r.style.fill=i)}}class ede extends g5{constructor(t,n){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=n[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,n){super.selectItem(t,n);const r=t||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const r2t=e=>{const{overflowY:t}=getComputedStyle(e,null);return t!=="visible"&&t!=="clip"};class tde{constructor(t,n){this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,r2t(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){const n=t.left+t.width/2-this.root.offsetWidth/2,r=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${n}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const i=this.boundsContainer.getBoundingClientRect(),o=this.root.getBoundingClientRect();let a=0;if(o.right>i.right&&(a=i.right-o.right,this.root.style.left=`${n+a}px`),o.left<i.left&&(a=i.left-o.left,this.root.style.left=`${n+a}px`),o.bottom>i.bottom){const s=o.bottom-o.top,c=t.bottom-t.top+s;this.root.style.top=`${r-c}px`,this.root.classList.add("ql-flip")}return a}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const i2t=[!1,"center","right","justify"],o2t=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],a2t=[!1,"serif","monospace"],l2t=["1","2","3",!1],s2t=["small",!1,"large","huge"];class q2 extends J1{constructor(t,n){super(t,n);const r=i=>{if(!document.body.contains(t.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(i.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(o=>{o.container.contains(i.target)||o.close()})};t.emitter.listenDOM("click",document.body,r)}addModule(t){const n=super.addModule(t);return t==="toolbar"&&this.extendToolbar(n),n}buildButtons(t,n){Array.from(t).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(i=>{if(i.startsWith("ql-")&&(i=i.slice(3),n[i]!=null))if(i==="direction")r.innerHTML=n[i][""]+n[i].rtl;else if(typeof n[i]=="string")r.innerHTML=n[i];else{const o=r.value||"";o!=null&&n[i][o]&&(r.innerHTML=n[i][o])}})})}buildPickers(t,n){this.pickers=Array.from(t).map(i=>{if(i.classList.contains("ql-align")&&(i.querySelector("option")==null&&Nf(i,i2t),typeof n.align=="object"))return new ede(i,n.align);if(i.classList.contains("ql-background")||i.classList.contains("ql-color")){const o=i.classList.contains("ql-background")?"background":"color";return i.querySelector("option")==null&&Nf(i,o2t,o==="background"?"#ffffff":"#000000"),new Que(i,n[o])}return i.querySelector("option")==null&&(i.classList.contains("ql-font")?Nf(i,a2t):i.classList.contains("ql-header")?Nf(i,l2t):i.classList.contains("ql-size")&&Nf(i,s2t)),new g5(i)});const r=()=>{this.pickers.forEach(i=>{i.update()})};this.quill.on(at.events.EDITOR_CHANGE,r)}}q2.DEFAULTS=qs({},J1.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let e=this.container.querySelector("input.ql-image[type=file]");e==null&&(e=document.createElement("input"),e.setAttribute("type","file"),e.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),e.classList.add("ql-image"),e.addEventListener("change",()=>{const t=this.quill.getSelection(!0);this.quill.uploader.upload(t,e.files),e.value=""}),this.container.appendChild(e)),e.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class nde extends tde{constructor(t,n){super(t,n),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",t=>{t.key==="Enter"?(this.save(),t.preventDefault()):t.key==="Escape"&&(this.cancel(),t.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;n!=null?this.textbox.value=n:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:n}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,at.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,at.sources.USER)),this.quill.root.scrollTop=n;break}case"video":t=c2t(t);case"formula":{if(!t)break;const n=this.quill.getSelection(!0);if(n!=null){const r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,at.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",at.sources.USER),this.quill.setSelection(r+2,at.sources.USER)}break}}this.textbox.value="",this.hide()}}function c2t(e){let t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`:e}function Nf(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t.forEach(r=>{const i=document.createElement("option");r===n?i.setAttribute("selected","selected"):i.setAttribute("value",String(r)),e.appendChild(i)})}const u2t=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class d2t extends nde{static TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join("");constructor(t,n){super(t,n),this.quill.on(at.events.EDITOR_CHANGE,(r,i,o,a)=>{if(r===at.events.SELECTION_CHANGE)if(i!=null&&i.length>0&&a===at.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const s=this.quill.getLines(i.index,i.length);if(s.length===1){const c=this.quill.getBounds(i);c!=null&&this.position(c)}else{const c=s[s.length-1],u=this.quill.getIndex(c),d=Math.min(c.length()-1,i.index+i.length-u),f=this.quill.getBounds(new hu(u,d));f!=null&&this.position(f)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(at.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const t=this.quill.getSelection();if(t!=null){const n=this.quill.getBounds(t);n!=null&&this.position(n)}},1)})}cancel(){this.show()}position(t){const n=super.position(t),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",n!==0&&(r.style.marginLeft=`${-1*n-r.offsetWidth/2}px`),n}}class rde extends q2{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=u2t),super(t,n),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new d2t(this.quill,this.options.bounds),t.container!=null&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),Ch),this.buildPickers(t.container.querySelectorAll("select"),Ch))}}rde.DEFAULTS=qs({},q2.DEFAULTS,{modules:{toolbar:{handlers:{link(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1,xe.sources.USER)}}}}});const f2t=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class h2t extends nde{static TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const n=this.linkRange;this.restoreFocus(),this.quill.formatText(n,"link",!1,at.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(at.events.SELECTION_CHANGE,(t,n,r)=>{if(t!=null){if(t.length===0&&r===at.sources.USER){const[i,o]=this.quill.scroll.descendant(Tg,t.index);if(i!=null){this.linkRange=new hu(t.index-o,i.length());const a=Tg.formats(i.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const s=this.quill.getBounds(this.linkRange);s!=null&&this.position(s);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}class ide extends q2{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=f2t),super(t,n),this.quill.container.classList.add("ql-snow")}extendToolbar(t){t.container!=null&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),Ch),this.buildPickers(t.container.querySelectorAll("select"),Ch),this.tooltip=new h2t(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(n,r)=>{t.handlers.link.call(t,!r.format.link)}))}}ide.DEFAULTS=qs({},q2.DEFAULTS,{modules:{toolbar:{handlers:{link(e){if(e){const t=this.quill.getSelection();if(t==null||t.length===0)return;let n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&n.indexOf("mailto:")!==0&&(n=`mailto:${n}`);const{tooltip:r}=this.quill.theme;r.edit("link",n)}else this.quill.format("link",!1,xe.sources.USER)}}}}});xe.register({"attributors/attribute/direction":Hue,"attributors/class/align":kue,"attributors/class/background":b0t,"attributors/class/color":v0t,"attributors/class/direction":Bue,"attributors/class/font":que,"attributors/class/size":Uue,"attributors/style/align":Lue,"attributors/style/background":_R,"attributors/style/color":zR,"attributors/style/direction":Vue,"attributors/style/font":Wue,"attributors/style/size":Yue},!0);xe.register({"formats/align":kue,"formats/direction":Bue,"formats/indent":uht,"formats/background":_R,"formats/color":zR,"formats/font":que,"formats/size":Uue,"formats/blockquote":dht,"formats/code-block":si,"formats/header":fht,"formats/list":G2,"formats/bold":BR,"formats/code":kR,"formats/italic":hht,"formats/link":Tg,"formats/script":pht,"formats/strike":mht,"formats/underline":ght,"formats/formula":vht,"formats/image":bht,"formats/video":yht,"modules/syntax":Jue,"modules/table":xht,"modules/toolbar":GR,"themes/bubble":rde,"themes/snow":ide,"ui/icons":Ch,"ui/picker":g5,"ui/icon-picker":ede,"ui/color-picker":Que,"ui/tooltip":tde},!0);const p2t=l.forwardRef(({readOnly:e,defaultValue:t,onTextChange:n,onSelectionChange:r,theme:i="snow"},o)=>{const a=l.useRef(null),s=l.useRef(t),c=l.useRef(n),u=l.useRef(r),d=l.useRef(null);return l.useLayoutEffect(()=>{c.current=n,u.current=r}),l.useEffect(()=>{o&&typeof o=="object"&&o.current&&o.current.enable(!e)},[o,e]),l.useEffect(()=>{const f=a.current;if(!f)return;const h=f.appendChild(f.ownerDocument.createElement("div")),p=new xe(h,{theme:i});return d.current=p,o&&typeof o=="object"&&(o.current=p),s.current&&p.setContents(s.current),p.on(xe.events.TEXT_CHANGE,()=>{const g=p.getSemanticHTML();c.current?.(g)}),p.on(xe.events.SELECTION_CHANGE,(g,m,b)=>{u.current?.(g,m,b)}),()=>{d.current=null,o&&typeof o=="object"&&(o.current=null),f.innerHTML=""}},[o,i]),y.jsx("div",{ref:a})});p2t.displayName="QuillEditor";l.createContext(null);l.createContext(null);function m2t(e,t){let[n,r]=l.useState(e);return l.useEffect(()=>{let i=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(i)}},[e,t]),n}l.createContext({});function W2({...e}){return y.jsx(a5e,{"data-slot":"popover",...e})}const Q1=v.forwardRef(({...e},t)=>y.jsx(CZ,{"data-slot":"popover-trigger",ref:t,...e}));Q1.displayName=CZ.displayName;const ef=v.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>y.jsx(l5e,{children:y.jsx(SZ,{ref:i,"data-slot":"popover-content",align:t,sideOffset:n,className:te("ui-lib-root ui:z-[102] ui:w-72 ui:rounded-md ui:border ui:bg-popover ui:p-4 ui:text-popover-foreground ui:shadow-md ui:outline-none ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2",e),...r})}));ef.displayName=SZ.displayName;const ode=v.forwardRef(({...e},t)=>y.jsx(EZ,{"data-slot":"popover-anchor",ref:t,...e}));ode.displayName=EZ.displayName;function g2t({selectedItem:e,fetchItems:t,searchPlaceholder:n="Search...",placeholder:r="Select an item",className:i,disabled:o=!1,align:a,onSelect:s}){const[c,u]=l.useState(!1),[d,f]=l.useState([e]),[h,p]=l.useState(""),[g,m]=l.useState(!1),b=m2t(h,300),w=l.useRef(t),x=l.useRef(e);l.useEffect(()=>{w.current=t},[t]),l.useEffect(()=>{x.current=e},[e]);const E=l.useCallback((M,A)=>{w.current(M,A).then(R=>{if(A?.aborted)return;let T=[...R];const k=x.current;k.value&&!M&&!T.find(N=>N.value===k.value)&&(T=[k,...T]),f(T)}).catch(()=>{if(A?.aborted)return;const R=x.current;f(R.value?[R]:[])}).finally(()=>{A?.aborted||m(!1)})},[]);l.useEffect(()=>{if(!c||h===""&&b!=="")return;const M=new AbortController;return E(b,M.signal),()=>{M.abort()}},[b,E,c,h]);function S(M){M&&(f([]),p(""),m(!0)),u(M)}const $=M=>{p(M),m(M!==b)};return y.jsxs(W2,{open:c,onOpenChange:S,children:[y.jsx(Q1,{asChild:!0,children:y.jsxs(Gn,{variant:"outline",role:"combobox","aria-expanded":c,className:te("ui:justify-between ui:w-full ui:h-10",i),disabled:o,children:[y.jsx("span",{className:"ui:truncate ui:flex ui:items-center",children:e.label||r}),y.jsx(qe.ChevronDownIcon,{className:"ui:ml-2 ui:h-4 ui:w-4 ui:shrink-0 ui:opacity-50"})]})}),y.jsx(ef,{style:{width:"var(--radix-popover-trigger-width)"},className:"ui:p-0",align:a,children:y.jsxs(Jv,{shouldFilter:!1,children:[y.jsx(qA,{placeholder:n,value:h,onValueChange:$}),y.jsxs(WA,{children:[!g&&y.jsx(UA,{children:"No results found."}),y.jsx(YA,{children:d.map(M=>{if(!M.value)return null;const A=e.value===M.value;return y.jsxs(XA,{value:M.value,onSelect:()=>{s(M),S(!1)},children:[M.label,y.jsx(qe.Check,{className:te("ui:ml-auto ui:h-4 ui:w-4",A?"ui:opacity-100":"ui:opacity-0")})]},M.value)})})]})]})})]})}const v2t="dd/MM/yyyy",b2t=({date:e,format:t=v2t})=>e?y.jsx(y.Fragment,{children:qc(e,t)}):null,ade=({start:e,end:t,onConfirm:n,className:r,triggerButtonClassName:i,label:o,placeholder:a,confirmLabel:s="Confirm",disabledCondition:c,dateLocale:u})=>{const[d,f]=l.useState(!1),[h,p]=l.useState(e&&t?{from:e,to:t}:void 0),g=()=>{!h?.from||!h?.to||(n({from:h.from,to:h.to}),f(!1))};return y.jsxs("div",{className:te("ui:grid ui:gap-2",r),children:[o&&y.jsx(Io,{children:o}),y.jsxs(W2,{open:d,onOpenChange:f,children:[y.jsx(Q1,{asChild:!0,children:y.jsxs(Gn,{id:"date",variant:"outline",className:te("ui:h-auto ui:text-muted-foreground ui:justify-start ui:text-left ui:font-normal",!h&&"ui:text-muted-foreground",i),children:[y.jsx(qe.Calendar,{className:"ui:h-4 ui:w-4"}),h?.from?h.to?y.jsxs(y.Fragment,{children:[qc(h.from,"LLL dd, y",{locale:u})," -",qc(h.to,"LLL dd, y",{locale:u})]}):qc(h.from,"LLL dd, y",{locale:u}):y.jsx("span",{children:a})]})}),y.jsxs(ef,{className:"ui:w-auto ui:p-0",align:"start",children:[y.jsx(gA,{mode:"range",defaultMonth:h?.from??new Date,selected:h,onSelect:p,numberOfMonths:2,disabled:c,locale:u}),y.jsx("div",{className:te("ui:px-3 ui:pb-4 ui:pt-2","ui:flex ui:justify-start ui:md:justify-end"),children:y.jsx(Gn,{variant:"success",onClick:g,className:"ui:w-full ui:md:w-max",children:s})})]})]})]})};function lde({value:e,onChange:t,className:n,inputClassName:r,name:i,placeholder:o,label:a,autoFocus:s=!1}){const[c,u]=l.useState(e),d=l.useRef(null),f=l.useRef(t);l.useEffect(()=>{f.current=t},[t]);const h=l.useCallback(g=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{g.length>=3?f.current(g):f.current("")},300)},[]),p=g=>{const m=decodeURIComponent(g);u(m),h(m)};return y.jsxs("search",{className:te("ui:w-full",n),children:[a&&y.jsx(Io,{htmlFor:i,className:"ui:leading-6 ui:w-full ui:mb-2",children:a}),y.jsx(gs,{type:"search",name:i,id:i,"data-test-id":i,placeholder:o,value:c,onChange:({target:g})=>p(g.value),className:te("ui:max-h-10",r),autoFocus:s})]})}const y2t=({banner:e,campaignName:t,isControlled:n,open:r,setOpen:i,imageClassName:o})=>y.jsxs(HA,{...n&&{open:r,onOpenChange:i},children:[!n&&y.jsx(Jee,{asChild:!0,children:y.jsx("div",{className:"ui:cursor-pointer",children:y.jsx("img",{className:te("ui:w-full ui:max-w-80 ui:mx-auto ui:mt-4! ui:scale-100 ui:hover:scale-110 ui:transition-all ui:duration-300 ui:aspect-video",o),src:e,alt:t})})}),y.jsxs(BA,{className:"ui:max-w-2xl",children:[y.jsx(VA,{children:y.jsx(GA,{children:t})}),y.jsx("img",{className:te("ui:w-full ui:aspect-video",o),src:e,alt:t})]})]});function w2t(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const sde=l.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),U2=()=>{const e=l.useContext(sde);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};w2t(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
233
233
|
[data-state=closed]
|
|
234
|
-
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function x2t(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function E2t(){return qR(/^Mac/)}function C2t(){return qR(/^iPhone/)}function eq(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function S2t(){return qR(/^iPad/)||E2t()&&navigator.maxTouchPoints>1}function cde(){return C2t()||S2t()}function qR(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const $2t=24,M2t=typeof window<"u"?l.useLayoutEffect:l.useEffect;function tq(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const qx=typeof document<"u"&&window.visualViewport;function nq(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function ude(e){for(nq(e)&&(e=e.parentElement);e&&!nq(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const A2t=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let sm=0,Wx;function N2t(e={}){let{isDisabled:t}=e;M2t(()=>{if(!t)return sm++,sm===1&&cde()&&(Wx=O2t()),()=>{sm--,sm===0&&Wx?.()}},[t])}function O2t(){let e,t=0,n=f=>{e=ude(f.target),!(e===document.documentElement&&e===document.body)&&(t=f.changedTouches[0].pageY)},r=f=>{if(!e||e===document.documentElement||e===document.body){f.preventDefault();return}let h=f.changedTouches[0].pageY,p=e.scrollTop,g=e.scrollHeight-e.clientHeight;g!==0&&((p<=0&&h>t||p>=g&&h<t)&&f.preventDefault(),t=h)},i=f=>{let h=f.target;d$(h)&&h!==document.activeElement&&(f.preventDefault(),h.style.transform="translateY(-2000px)",h.focus(),requestAnimationFrame(()=>{h.style.transform=""}))},o=f=>{let h=f.target;d$(h)&&(h.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{h.style.transform="",qx&&(qx.height<window.innerHeight?requestAnimationFrame(()=>{rq(h)}):qx.addEventListener("resize",()=>rq(h),{once:!0}))}))},a=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,u=tq(R2t(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let d=tq(Of(document,"touchstart",n,{passive:!1,capture:!0}),Of(document,"touchmove",r,{passive:!1,capture:!0}),Of(document,"touchend",i,{passive:!1,capture:!0}),Of(document,"focus",o,!0),Of(window,"scroll",a));return()=>{u(),d(),window.scrollTo(s,c)}}function R2t(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Of(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function rq(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=ude(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top,o=e.getBoundingClientRect().bottom;const a=n.getBoundingClientRect().bottom+$2t;o>a&&(n.scrollTop+=i-r)}e=n.parentElement}}function d$(e){return e instanceof HTMLInputElement&&!A2t.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function I2t(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function P2t(...e){return t=>e.forEach(n=>I2t(n,t))}function dde(...e){return v.useCallback(P2t(...e),e)}const fde=new WeakMap;function vr(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([i,o])=>{if(i.startsWith("--")){e.style.setProperty(i,o);return}r[i]=e.style[i],e.style[i]=o}),!n&&fde.set(e,r)}function F2t(e,t){if(!e||!(e instanceof HTMLElement))return;let n=fde.get(e);n&&(e.style[t]=n[t])}const tr=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function cm(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(", ")[tr(t)?13:12]):(i=r.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(", ")[tr(t)?5:4]):null)}function T2t(e){return 8*(Math.log(e+1)-2)}function Ux(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function D2t(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const kn={DURATION:.5,EASE:[.32,.72,0,1]},hde=.4,z2t=.25,_2t=100,pde=8,Dc=16,f$=26,Yx="vaul-dragging";function mde(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function k2t({defaultProp:e,onChange:t}){const n=l.useState(e),[r]=n,i=l.useRef(r),o=mde(t);return l.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function gde({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=k2t({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=mde(n),c=l.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else i(u)},[o,e,i,s]);return[a,c]}function L2t({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:i,fadeFromIndex:o,onSnapPointChange:a,direction:s="bottom",container:c,snapToSequentialPoint:u}){const[d,f]=gde({prop:e,defaultProp:n?.[0],onChange:t}),[h,p]=l.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);l.useEffect(()=>{function A(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",A),()=>window.removeEventListener("resize",A)},[]);const g=l.useMemo(()=>d===n?.[n.length-1]||null,[n,d]),m=l.useMemo(()=>{var A;return(A=n?.findIndex(R=>R===d))!=null?A:null},[n,d]),b=n&&n.length>0&&(o||o===0)&&!Number.isNaN(o)&&n[o]===d||!n,w=l.useMemo(()=>{const A=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var R;return(R=n?.map(T=>{const k=typeof T=="string";let N=0;if(k&&(N=parseInt(T,10)),tr(s)){const O=k?N:h?T*A.height:0;return h?s==="bottom"?A.height-O:-A.height+O:O}const P=k?N:h?T*A.width:0;return h?s==="right"?A.width-P:-A.width+P:P}))!=null?R:[]},[n,h,c]),x=l.useMemo(()=>m!==null?w?.[m]:null,[w,m]),E=l.useCallback(A=>{var R;const T=(R=w?.findIndex(k=>k===A))!=null?R:null;a(T),vr(r.current,{transition:`transform ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,transform:tr(s)?`translate3d(0, ${A}px, 0)`:`translate3d(${A}px, 0, 0)`}),w&&T!==w.length-1&&o!==void 0&&T!==o&&T<o?vr(i.current,{transition:`opacity ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,opacity:"0"}):vr(i.current,{transition:`opacity ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,opacity:"1"}),f(n?.[Math.max(T,0)])},[r.current,n,w,o,i,f]);l.useEffect(()=>{if(d||e){var A;const R=(A=n?.findIndex(T=>T===e||T===d))!=null?A:-1;w&&R!==-1&&typeof w[R]=="number"&&E(w[R])}},[d,e,n,w,E]);function S({draggedDistance:A,closeDrawer:R,velocity:T,dismissible:k}){if(o===void 0)return;const N=s==="bottom"||s==="right"?(x??0)-A:(x??0)+A,P=m===o-1,O=m===0,z=A>0;if(P&&vr(i.current,{transition:`opacity ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`}),!u&&T>2&&!z){k?R():E(w[0]);return}if(!u&&T>2&&z&&w&&n){E(w[n.length-1]);return}const L=w?.reduce((_,H)=>typeof _!="number"||typeof H!="number"?_:Math.abs(H-N)<Math.abs(_-N)?H:_),D=tr(s)?window.innerHeight:window.innerWidth;if(T>hde&&Math.abs(A)<D*.4){const _=z?1:-1;if(_>0&&g&&n){E(w[n.length-1]);return}if(O&&_<0&&k&&R(),m===null)return;E(w[m+_]);return}E(L)}function $({draggedDistance:A}){if(x===null)return;const R=s==="bottom"||s==="right"?x-A:x+A;(s==="bottom"||s==="right")&&R<w[w.length-1]||(s==="top"||s==="left")&&R>w[w.length-1]||vr(r.current,{transform:tr(s)?`translate3d(0, ${R}px, 0)`:`translate3d(${R}px, 0, 0)`})}function M(A,R){if(!n||typeof m!="number"||!w||o===void 0)return null;const T=m===o-1;if(m>=o&&R)return 0;if(T&&!R)return 1;if(!b&&!T)return null;const N=T?m+1:m-1,P=T?w[N]-w[N-1]:w[N+1]-w[N],O=A/Math.abs(P);return T?1-O:O}return{isLastSnapPoint:g,activeSnapPoint:d,shouldFade:b,getPercentageDragged:M,setActiveSnapPoint:f,activeSnapPointIndex:m,onRelease:S,onDrag:$,snapPointsOffset:w}}const j2t=()=>()=>{};function H2t(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=U2(),o=l.useRef(null),a=l.useMemo(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-f$)/window.innerWidth}l.useEffect(()=>{if(t&&n){o.current&&clearTimeout(o.current);const c=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c)return;D2t(r&&!i?Ux(document.body,{background:"black"}):j2t,Ux(c,{transformOrigin:tr(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${kn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kn.EASE.join(",")})`}));const u=Ux(c,{borderRadius:`${pde}px`,overflow:"hidden",...tr(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),o.current=window.setTimeout(()=>{a?document.body.style.background=a:document.body.style.removeProperty("background")},kn.DURATION*1e3)}}},[t,n,a])}let Rf=null;function B2t({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:i,noBodyStyles:o}){const[a,s]=l.useState(()=>typeof window<"u"?window.location.href:""),c=l.useRef(0),u=l.useCallback(()=>{if(eq()&&Rf===null&&e&&!o){Rf={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:f,innerHeight:h}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-f}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const p=h-window.innerHeight;p&&c.current>=h&&(document.body.style.top=`${-(c.current+p)}px`)}),300)}},[e]),d=l.useCallback(()=>{if(eq()&&Rf!==null&&!o){const f=-parseInt(document.body.style.top,10),h=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Rf),window.requestAnimationFrame(()=>{if(i&&a!==window.location.href){s(window.location.href);return}window.scrollTo(h,f)}),Rf=null}},[a]);return l.useEffect(()=>{function f(){c.current=window.scrollY}return f(),window.addEventListener("scroll",f),()=>{window.removeEventListener("scroll",f)}},[]),l.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||d()}},[t,d]),l.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{d()},500)):d())},[e,r,a,t,n,u,d]),{restorePositionSetting:d}}function V2t({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:i,snapPoints:o,shouldScaleBackground:a=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=z2t,scrollLockTimeout:u=_2t,dismissible:d=!0,handleOnly:f=!1,fadeFromIndex:h=o&&o.length-1,activeSnapPoint:p,setActiveSnapPoint:g,fixed:m,modal:b=!0,onClose:w,nested:x,noBodyStyles:E=!1,direction:S="bottom",defaultOpen:$=!1,disablePreventScroll:M=!0,snapToSequentialPoint:A=!1,preventScrollRestoration:R=!1,repositionInputs:T=!0,onAnimationEnd:k,container:N,autoFocus:P=!1}){var O,z;const[L=!1,D]=gde({defaultProp:$,prop:e,onChange:fe=>{t?.(fe),!fe&&!x&&ve(),setTimeout(()=>{k?.(fe)},kn.DURATION*1e3),fe&&!b&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),fe||(document.body.style.pointerEvents="auto")}}),[_,H]=l.useState(!1),[W,F]=l.useState(!1),[K,j]=l.useState(!1),U=l.useRef(null),Y=l.useRef(null),G=l.useRef(null),Q=l.useRef(null),X=l.useRef(null),Z=l.useRef(!1),J=l.useRef(null),ee=l.useRef(0),ce=l.useRef(!1),B=l.useRef(!$),ne=l.useRef(0),q=l.useRef(null),se=l.useRef(((O=q.current)==null?void 0:O.getBoundingClientRect().height)||0),he=l.useRef(((z=q.current)==null?void 0:z.getBoundingClientRect().width)||0),pe=l.useRef(0),me=l.useCallback(fe=>{o&&fe===ke.length-1&&(Y.current=new Date)},[]),{activeSnapPoint:de,activeSnapPointIndex:ye,setActiveSnapPoint:Ae,onRelease:De,snapPointsOffset:ke,onDrag:be,shouldFade:ue,getPercentageDragged:ge}=L2t({snapPoints:o,activeSnapPointProp:p,setActiveSnapPointProp:g,drawerRef:q,fadeFromIndex:h,overlayRef:U,onSnapPointChange:me,direction:S,container:N,snapToSequentialPoint:A});N2t({isDisabled:!L||W||!b||K||!_||!T||!M});const{restorePositionSetting:ve}=B2t({isOpen:L,modal:b,nested:x??!1,hasBeenOpened:_,preventScrollRestoration:R,noBodyStyles:E});function Ce(){return(window.innerWidth-f$)/window.innerWidth}function Xe(fe){var Me,Se;!d&&!o||q.current&&!q.current.contains(fe.target)||(se.current=((Me=q.current)==null?void 0:Me.getBoundingClientRect().height)||0,he.current=((Se=q.current)==null?void 0:Se.getBoundingClientRect().width)||0,F(!0),G.current=new Date,cde()&&window.addEventListener("touchend",()=>Z.current=!1,{once:!0}),fe.target.setPointerCapture(fe.pointerId),ee.current=tr(S)?fe.pageY:fe.pageX)}function Ge(fe,Me){var Se;let we=fe;const Ve=(Se=window.getSelection())==null?void 0:Se.toString(),Ne=q.current?cm(q.current,S):null,ze=new Date;if(we.tagName==="SELECT"||we.hasAttribute("data-vaul-no-drag")||we.closest("[data-vaul-no-drag]"))return!1;if(S==="right"||S==="left")return!0;if(Y.current&&ze.getTime()-Y.current.getTime()<500)return!1;if(Ne!==null&&(S==="bottom"?Ne>0:Ne<0))return!0;if(Ve&&Ve.length>0)return!1;if(X.current&&ze.getTime()-X.current.getTime()<u&&Ne===0||Me)return X.current=ze,!1;for(;we;){if(we.scrollHeight>we.clientHeight){if(we.scrollTop!==0)return X.current=new Date,!1;if(we.getAttribute("role")==="dialog")return!0}we=we.parentNode}return!0}function Ze(fe){if(q.current&&W){const Me=S==="bottom"||S==="right"?1:-1,Se=(ee.current-(tr(S)?fe.pageY:fe.pageX))*Me,we=Se>0,Ve=o&&!d&&!we;if(Ve&&ye===0)return;const Ne=Math.abs(Se),ze=document.querySelector("[data-vaul-drawer-wrapper]"),It=S==="bottom"||S==="top"?se.current:he.current;let vt=Ne/It;const At=ge(Ne,we);if(At!==null&&(vt=At),Ve&&vt>=1||!Z.current&&!Ge(fe.target,we))return;if(q.current.classList.add(Yx),Z.current=!0,vr(q.current,{transition:"none"}),vr(U.current,{transition:"none"}),o&&be({draggedDistance:Se}),we&&!o){const mt=T2t(Se),Pt=Math.min(mt*-1,0)*Me;vr(q.current,{transform:tr(S)?`translate3d(0, ${Pt}px, 0)`:`translate3d(${Pt}px, 0, 0)`});return}const Nt=1-vt;if((ue||h&&ye===h-1)&&(r?.(fe,vt),vr(U.current,{opacity:`${Nt}`,transition:"none"},!0)),ze&&U.current&&a){const mt=Math.min(Ce()+vt*(1-Ce()),1),Pt=8-vt*8,dn=Math.max(0,14-vt*14);vr(ze,{borderRadius:`${Pt}px`,transform:tr(S)?`scale(${mt}) translate3d(0, ${dn}px, 0)`:`scale(${mt}) translate3d(${dn}px, 0, 0)`,transition:"none"},!0)}if(!o){const mt=Ne*Me;vr(q.current,{transform:tr(S)?`translate3d(0, ${mt}px, 0)`:`translate3d(${mt}px, 0, 0)`})}}}l.useEffect(()=>{window.requestAnimationFrame(()=>{B.current=!0})},[]),l.useEffect(()=>{var fe;function Me(){if(!q.current||!T)return;const Se=document.activeElement;if(d$(Se)||ce.current){var we;const Ve=((we=window.visualViewport)==null?void 0:we.height)||0,Ne=window.innerHeight;let ze=Ne-Ve;const It=q.current.getBoundingClientRect().height||0,vt=It>Ne*.8;pe.current||(pe.current=It);const At=q.current.getBoundingClientRect().top;if(Math.abs(ne.current-ze)>60&&(ce.current=!ce.current),o&&o.length>0&&ke&&ye){const Nt=ke[ye]||0;ze+=Nt}if(ne.current=ze,It>Ve||ce.current){const Nt=q.current.getBoundingClientRect().height;let mt=Nt;Nt>Ve&&(mt=Ve-(vt?At:f$)),m?q.current.style.height=`${Nt-Math.max(ze,0)}px`:q.current.style.height=`${Math.max(mt,Ve-At)}px`}else x2t()||(q.current.style.height=`${pe.current}px`);o&&o.length>0&&!ce.current?q.current.style.bottom="0px":q.current.style.bottom=`${Math.max(ze,0)}px`}}return(fe=window.visualViewport)==null||fe.addEventListener("resize",Me),()=>{var Se;return(Se=window.visualViewport)==null?void 0:Se.removeEventListener("resize",Me)}},[ye,o,ke]);function We(fe){Ke(),w?.(),fe||D(!1),setTimeout(()=>{o&&Ae(o[0])},kn.DURATION*1e3)}function Be(){if(!q.current)return;const fe=document.querySelector("[data-vaul-drawer-wrapper]"),Me=cm(q.current,S);vr(q.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`}),vr(U.current,{transition:`opacity ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,opacity:"1"}),a&&Me&&Me>0&&L&&vr(fe,{borderRadius:`${pde}px`,overflow:"hidden",...tr(S)?{transform:`scale(${Ce()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Ce()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${kn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kn.EASE.join(",")})`},!0)}function Ke(){!W||!q.current||(q.current.classList.remove(Yx),Z.current=!1,F(!1),Q.current=new Date)}function ht(fe){if(!W||!q.current)return;q.current.classList.remove(Yx),Z.current=!1,F(!1),Q.current=new Date;const Me=cm(q.current,S);if(!fe||!Ge(fe.target,!1)||!Me||Number.isNaN(Me)||G.current===null)return;const Se=Q.current.getTime()-G.current.getTime(),we=ee.current-(tr(S)?fe.pageY:fe.pageX),Ve=Math.abs(we)/Se;if(Ve>.05&&(j(!0),setTimeout(()=>{j(!1)},200)),o){De({draggedDistance:we*(S==="bottom"||S==="right"?1:-1),closeDrawer:We,velocity:Ve,dismissible:d}),i?.(fe,!0);return}if(S==="bottom"||S==="right"?we>0:we<0){Be(),i?.(fe,!0);return}if(Ve>hde){We(),i?.(fe,!1);return}var Ne;const ze=Math.min((Ne=q.current.getBoundingClientRect().height)!=null?Ne:0,window.innerHeight);var It;const vt=Math.min((It=q.current.getBoundingClientRect().width)!=null?It:0,window.innerWidth),At=S==="left"||S==="right";if(Math.abs(Me)>=(At?vt:ze)*c){We(),i?.(fe,!1);return}i?.(fe,!0),Be()}l.useEffect(()=>(L&&(vr(document.documentElement,{scrollBehavior:"auto"}),Y.current=new Date),()=>{F2t(document.documentElement,"scrollBehavior")}),[L]);function _t(fe){const Me=fe?(window.innerWidth-Dc)/window.innerWidth:1,Se=fe?-Dc:0;J.current&&window.clearTimeout(J.current),vr(q.current,{transition:`transform ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,transform:tr(S)?`scale(${Me}) translate3d(0, ${Se}px, 0)`:`scale(${Me}) translate3d(${Se}px, 0, 0)`}),!fe&&q.current&&(J.current=setTimeout(()=>{const we=cm(q.current,S);vr(q.current,{transition:"none",transform:tr(S)?`translate3d(0, ${we}px, 0)`:`translate3d(${we}px, 0, 0)`})},500))}function Tt(fe,Me){if(Me<0)return;const Se=(window.innerWidth-Dc)/window.innerWidth,we=Se+Me*(1-Se),Ve=-Dc+Me*Dc;vr(q.current,{transform:tr(S)?`scale(${we}) translate3d(0, ${Ve}px, 0)`:`scale(${we}) translate3d(${Ve}px, 0, 0)`,transition:"none"})}function Rt(fe,Me){const Se=tr(S)?window.innerHeight:window.innerWidth,we=Me?(Se-Dc)/Se:1,Ve=Me?-Dc:0;Me&&vr(q.current,{transition:`transform ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,transform:tr(S)?`scale(${we}) translate3d(0, ${Ve}px, 0)`:`scale(${we}) translate3d(${Ve}px, 0, 0)`})}return l.useEffect(()=>{b||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[b]),l.createElement(e2,{defaultOpen:$,onOpenChange:fe=>{!d&&!fe||(fe?H(!0):We(!0),D(fe))},open:L},l.createElement(sde.Provider,{value:{activeSnapPoint:de,snapPoints:o,setActiveSnapPoint:Ae,drawerRef:q,overlayRef:U,onOpenChange:t,onPress:Xe,onRelease:ht,onDrag:Ze,dismissible:d,shouldAnimate:B,handleOnly:f,isOpen:L,isDragging:W,shouldFade:ue,closeDrawer:We,onNestedDrag:Tt,onNestedOpenChange:_t,onNestedRelease:Rt,keyboardIsOpen:ce,modal:b,snapPointsOffset:ke,activeSnapPointIndex:ye,direction:S,shouldScaleBackground:a,setBackgroundColorOnScale:s,noBodyStyles:E,container:N,autoFocus:P}},n))}const vde=l.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:o,isOpen:a,modal:s,shouldAnimate:c}=U2(),u=dde(t,n),d=r&&r.length>0;if(!s)return null;const f=l.useCallback(h=>i(h),[i]);return l.createElement(n2,{onMouseUp:f,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":a&&d?"true":"false","data-vaul-snap-points-overlay":a&&o?"true":"false","data-vaul-animate":c?.current?"true":"false",...e})});vde.displayName="Drawer.Overlay";const bde=l.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},i){const{drawerRef:o,onPress:a,onRelease:s,onDrag:c,keyboardIsOpen:u,snapPointsOffset:d,activeSnapPointIndex:f,modal:h,isOpen:p,direction:g,snapPoints:m,container:b,handleOnly:w,shouldAnimate:x,autoFocus:E}=U2(),[S,$]=l.useState(!1),M=dde(i,o),A=l.useRef(null),R=l.useRef(null),T=l.useRef(!1),k=m&&m.length>0;H2t();const N=(O,z,L=0)=>{if(T.current)return!0;const D=Math.abs(O.y),_=Math.abs(O.x),H=_>D,W=["bottom","right"].includes(z)?1:-1;if(z==="left"||z==="right"){if(!(O.x*W<0)&&_>=0&&_<=L)return H}else if(!(O.y*W<0)&&D>=0&&D<=L)return!H;return T.current=!0,!0};l.useEffect(()=>{k&&window.requestAnimationFrame(()=>{$(!0)})},[]);function P(O){A.current=null,T.current=!1,s(O)}return l.createElement(r2,{"data-vaul-drawer-direction":g,"data-vaul-drawer":"","data-vaul-delayed-snap-points":S?"true":"false","data-vaul-snap-points":p&&k?"true":"false","data-vaul-custom-container":b?"true":"false","data-vaul-animate":x?.current?"true":"false",...r,ref:M,style:d&&d.length>0?{"--snap-point-height":`${d[f??0]}px`,...t}:t,onPointerDown:O=>{w||(r.onPointerDown==null||r.onPointerDown.call(r,O),A.current={x:O.pageX,y:O.pageY},a(O))},onOpenAutoFocus:O=>{n?.(O),E||O.preventDefault()},onPointerDownOutside:O=>{if(e?.(O),!h||O.defaultPrevented){O.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:O=>{if(!h){O.preventDefault();return}},onPointerMove:O=>{if(R.current=O,w||(r.onPointerMove==null||r.onPointerMove.call(r,O),!A.current))return;const z=O.pageY-A.current.y,L=O.pageX-A.current.x,D=O.pointerType==="touch"?10:2;N({x:L,y:z},g,D)?c(O):(Math.abs(L)>D||Math.abs(z)>D)&&(A.current=null)},onPointerUp:O=>{r.onPointerUp==null||r.onPointerUp.call(r,O),A.current=null,T.current=!1,s(O)},onPointerOut:O=>{r.onPointerOut==null||r.onPointerOut.call(r,O),P(R.current)},onContextMenu:O=>{r.onContextMenu==null||r.onContextMenu.call(r,O),R.current&&P(R.current)}})});bde.displayName="Drawer.Content";const G2t=250,q2t=120,W2t=l.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:i,isDragging:o,snapPoints:a,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:u,handleOnly:d,isOpen:f,onPress:h,onDrag:p}=U2(),g=l.useRef(null),m=l.useRef(!1);function b(){if(m.current){E();return}window.setTimeout(()=>{w()},q2t)}function w(){if(o||e||m.current){E();return}if(E(),!a||a.length===0){u||i();return}if(s===a[a.length-1]&&u){i();return}const $=a.findIndex(A=>A===s);if($===-1)return;const M=a[$+1];c(M)}function x(){g.current=window.setTimeout(()=>{m.current=!0},G2t)}function E(){g.current&&window.clearTimeout(g.current),m.current=!1}return l.createElement("div",{onClick:b,onPointerCancel:E,onPointerDown:S=>{d&&h(S),x()},onPointerMove:S=>{d&&p(S)},ref:r,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},l.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});W2t.displayName="Drawer.Handle";function U2t(e){const t=U2(),{container:n=t.container,...r}=e;return l.createElement(t2,{container:n,...r})}const Ac={Root:V2t,Content:bde,Overlay:vde,Trigger:hv,Portal:U2t,Close:Cu,Title:pv,Description:mv};function Y2t({...e}){return y.jsx(Ac.Root,{"data-slot":"drawer",...e})}function X2t({...e}){return y.jsx(Ac.Trigger,{"data-slot":"drawer-trigger",...e})}function yde({...e}){return y.jsx(Ac.Portal,{"data-slot":"drawer-portal",...e})}function K2t({...e}){return y.jsx(Ac.Close,{"data-slot":"drawer-close",...e})}function wde({className:e,...t}){return y.jsx(Ac.Overlay,{"data-slot":"drawer-overlay",className:te("ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:fixed ui:inset-0 ui:z-50 ui:bg-black/50",e),...t})}function Z2t({className:e,children:t,...n}){return y.jsxs(yde,{"data-slot":"drawer-portal",children:[y.jsx(wde,{}),y.jsxs(Ac.Content,{"data-slot":"drawer-content",className:te("ui:group/drawer-content ui:bg-background ui:fixed ui:flex ui:h-auto ui:flex-col ui:rounded-t-[10px] ui:z-100 ui:mt-24","ui:data-[vaul-drawer-direction=top]:inset-x-0 ui:data-[vaul-drawer-direction=top]:top-0 ui:data-[vaul-drawer-direction=top]:mb-24 ui:data-[vaul-drawer-direction=top]:max-h-[80vh] ui:data-[vaul-drawer-direction=top]:rounded-b-lg ui:data-[vaul-drawer-direction=top]:border-b","ui:data-[vaul-drawer-direction=bottom]:inset-x-0 ui:data-[vaul-drawer-direction=bottom]:bottom-0 ui:data-[vaul-drawer-direction=bottom]:mt-24 ui:data-[vaul-drawer-direction=bottom]:max-h-[80vh] ui:data-[vaul-drawer-direction=bottom]:rounded-t-lg ui:data-[vaul-drawer-direction=bottom]:border-t","ui:data-[vaul-drawer-direction=right]:inset-y-0 ui:data-[vaul-drawer-direction=right]:right-0 ui:data-[vaul-drawer-direction=right]:w-3/4 ui:data-[vaul-drawer-direction=right]:border-l ui:data-[vaul-drawer-direction=right]:sm:max-w-sm","ui:data-[vaul-drawer-direction=left]:inset-y-0 ui:data-[vaul-drawer-direction=left]:left-0 ui:data-[vaul-drawer-direction=left]:w-3/4 ui:data-[vaul-drawer-direction=left]:border-r ui:data-[vaul-drawer-direction=left]:sm:max-w-sm",e),...n,children:[y.jsx("div",{className:"ui:bg-muted ui:mx-auto ui:mt-4 ui:hidden ui:h-2 ui:w-[100px] ui:shrink-0 ui:rounded-full ui:group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),t]})]})}function J2t({className:e,...t}){return y.jsx("div",{"data-slot":"drawer-header",className:te("ui:flex ui:flex-col ui:gap-0.5 ui:p-4 ui:group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center ui:group-data-[vaul-drawer-direction=top]/drawer-content:text-center ui:md:gap-1.5 ui:md:text-left",e),...t})}function Q2t({className:e,...t}){return y.jsx("div",{"data-slot":"drawer-footer",className:te("ui:mt-auto ui:flex ui:flex-col ui:gap-2 ui:p-4",e),...t})}function ept({className:e,...t}){return y.jsx(Ac.Title,{"data-slot":"drawer-title",className:te("ui:text-foreground ui:font-semibold",e),...t})}function tpt({className:e,...t}){return y.jsx(Ac.Description,{"data-slot":"drawer-description",className:te("ui:text-muted-foreground ui:text-sm",e),...t})}function WR({...e}){return y.jsx(A4e,{"data-slot":"dropdown-menu",...e})}function npt({...e}){return y.jsx(rZ,{"data-slot":"dropdown-menu-portal",...e})}function UR({...e}){return y.jsx(N4e,{"data-slot":"dropdown-menu-trigger",...e})}function YR({className:e,sideOffset:t=4,...n}){return y.jsx(rZ,{children:y.jsx(O4e,{"data-slot":"dropdown-menu-content",sideOffset:t,className:te("ui:bg-popover ui:text-popover-foreground ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:z-50 ui:max-h-(--radix-dropdown-menu-content-available-height) ui:min-w-[8rem] ui:origin-(--radix-dropdown-menu-content-transform-origin) ui:overflow-x-hidden ui:overflow-y-auto ui:rounded-md ui:border ui:p-1 ui:shadow-md",e),...n})})}function rpt({...e}){return y.jsx(R4e,{"data-slot":"dropdown-menu-group",...e})}function xde({className:e,inset:t,variant:n="default",...r}){return y.jsx(P4e,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:data-[variant=destructive]:text-destructive ui:data-[variant=destructive]:focus:bg-destructive/10 ui:dark:data-[variant=destructive]:focus:bg-destructive/20 ui:data-[variant=destructive]:focus:text-destructive ui:data-[variant=destructive]:*:[svg]:!text-destructive ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:px-2 ui:py-1.5 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:data-[inset]:pl-8 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...r})}function h$({className:e,children:t,checked:n,...r}){return y.jsxs(F4e,{"data-slot":"dropdown-menu-checkbox-item",className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-2 ui:pl-8 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[y.jsx("span",{className:"ui:pointer-events-none ui:absolute ui:left-2 ui:flex size-3.5 ui:items-center ui:justify-center",children:y.jsx(iZ,{children:y.jsx(qe.CheckIcon,{className:"ui:size-4"})})}),t]})}function ipt({...e}){return y.jsx(T4e,{"data-slot":"dropdown-menu-radio-group",...e})}function opt({className:e,children:t,...n}){return y.jsxs(D4e,{"data-slot":"dropdown-menu-radio-item",className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-2 ui:pl-8 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...n,children:[y.jsx("span",{className:"ui:pointer-events-none ui:absolute ui:left-2 ui:flex size-3.5 ui:items-center ui:justify-center",children:y.jsx(iZ,{children:y.jsx(qe.CircleIcon,{className:"ui:size-2 ui:fill-current"})})}),t]})}function apt({className:e,inset:t,...n}){return y.jsx(I4e,{"data-slot":"dropdown-menu-label","data-inset":t,className:te("ui:px-2 ui:py-1.5 ui:text-sm ui:font-medium ui:data-[inset]:pl-8",e),...n})}function lpt({className:e,...t}){return y.jsx(z4e,{"data-slot":"dropdown-menu-separator",className:te("ui:bg-border ui:-mx-1 ui:my-1 ui:h-px",e),...t})}function spt({className:e,...t}){return y.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:te("ui:text-muted-foreground ui:ml-auto ui:text-xs ui:tracking-widest",e),...t})}function cpt({...e}){return y.jsx(_4e,{"data-slot":"dropdown-menu-sub",...e})}function upt({className:e,inset:t,children:n,...r}){return y.jsxs(k4e,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:data-[state=open]:bg-accent ui:data-[state=open]:text-accent-foreground ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:px-2 ui:py-1.5 ui:text-sm ui:outline-hidden ui:select-none ui:data-[inset]:pl-8 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,y.jsx(qe.ChevronRightIcon,{className:"ui:ml-auto ui:size-4"})]})}function dpt({className:e,...t}){return y.jsx(L4e,{"data-slot":"dropdown-menu-sub-content",className:te("ui:bg-popover ui:text-popover-foreground ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:z-50 ui:min-w-[8rem] ui:origin-(--radix-dropdown-menu-content-transform-origin) ui:overflow-hidden ui:rounded-md ui:border ui:p-1 ui:shadow-lg",e),...t})}function fpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty",className:te("ui:flex ui:min-w-0 ui:flex-1 ui:flex-col ui:items-center ui:justify-center ui:gap-6 ui:rounded-lg ui:border-dashed ui:p-6 ui:text-center ui:text-balance ui:md:p-12",e),...t})}function hpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty-header",className:te("ui:flex ui:max-w-sm ui:flex-col ui:items-center ui:gap-2 ui:text-center",e),...t})}const ppt=fc("ui:flex ui:shrink-0 ui:items-center ui:justify-center ui:mb-2 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0",{variants:{variant:{default:"ui:bg-transparent",icon:"ui:bg-muted ui:text-foreground ui:flex ui:size-10 ui:shrink-0 ui:items-center ui:justify-center ui:rounded-lg ui:[&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function mpt({className:e,variant:t="default",...n}){return y.jsx("div",{"data-slot":"empty-icon","data-variant":t,className:te(ppt({variant:t,className:e})),...n})}function gpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty-title",className:te("ui:text-lg ui:font-medium ui:tracking-tight",e),...t})}function vpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty-description",className:te("ui:text-muted-foreground ui:[&>a:hover]:text-primary ui:text-sm/relaxed ui:[&>a]:underline ui:[&>a]:underline-offset-4",e),...t})}function bpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty-content",className:te("ui:flex ui:w-full ui:max-w-sm ui:min-w-0 ui:flex-col ui:items-center ui:gap-4 ui:text-sm ui:text-balance",e),...t})}function Ede({message:e,className:t}){return y.jsx("p",{className:te("ui:text-red-500 ui:text-xs ui:mt-2 ui:has-error",t),children:e})}const Cde=v.createContext(null),Sde=v.createContext(null),v5=()=>{const e=v.useContext(Cde),t=v.useContext(Sde);if(!e)throw new Error("useFormField must be used within <FormField>");if(!t)throw new Error("useFormField must be used within <FormItem>");const{id:n}=t,{name:r,error:i}=e;return{name:r,error:i,formItemId:`${n}-form-item`,formDescriptionId:`${n}-form-item-description`,formMessageId:`${n}-form-item-message`}},Zr=e=>y.jsx(Dr.Controller,{...e,render:t=>y.jsx(Cde.Provider,{value:{name:e.name,error:t.fieldState.error},children:e.render?.(t)})});function _r({className:e,...t}){const n=v.useId();return y.jsx(Sde.Provider,{value:{id:n},children:y.jsx("div",{"data-slot":"form-item",className:te("ui:grid ui:gap-2",e),...t})})}function yi({className:e,required:t=!1,...n}){const{error:r,formItemId:i}=v5();return y.jsxs(Io,{"data-slot":"form-label","data-error":!!r,htmlFor:i,className:te("ui:text-sm",r?"ui:text-destructive":"ui:text-black-950",e),...n,children:[n.children,t&&y.jsx("span",{className:"ui:text-destructive ml-1",children:"*"})]})}function wi(e){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=v5();return y.jsx(ms,{"data-slot":"form-control",id:n,"aria-invalid":!!t,"aria-describedby":t?`${r} ${i}`:r,...e})}function Ni({className:e,...t}){const{formDescriptionId:n}=v5();return y.jsx("p",{"data-slot":"form-description",id:n,className:te("ui:text-muted-foreground ui:text-sm",e),...t})}function Jr({className:e,showErrorPlaceholder:t,...n}){const{error:r,formMessageId:i}=v5(),o=r?String(r.message??""):n.children;return o?y.jsx("p",{"data-slot":"form-message",id:i,className:te("ui:text-destructive ui:text-sm",e),...n,children:o}):t?y.jsx("p",{className:"ui:h-4"}):null}const Zm=({name:e,control:t,containerClassName:n,...r})=>{const i=Dr.useFormContext(),o=t??i?.control;if(!o)throw new Error("FormCheckbox must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:o,name:e,render:({field:a})=>y.jsxs(_r,{className:n,children:[y.jsx(wi,{children:y.jsx(ite,{...a,checked:!!a.value,onCheckedChange:a.onChange,...r})}),y.jsx(Jr,{})]})})};function XR({delayDuration:e=0,...t}){return y.jsx(l7e,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function KR({...e}){return y.jsx(XR,{children:y.jsx(s7e,{"data-slot":"tooltip",...e})})}function ZR({...e}){return y.jsx(c7e,{"data-slot":"tooltip-trigger",...e})}function b5({className:e,sideOffset:t=0,children:n,...r}){return y.jsx(cQ,{children:y.jsxs(uQ,{"data-slot":"tooltip-content",sideOffset:t,className:te("ui:bg-foreground ui:text-background ui:animate-in ui:fade-in-0 ui:zoom-in-95 ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=closed]:zoom-out-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:z-50 ui:w-fit ui:origin-(--radix-tooltip-content-transform-origin) ui:rounded-md ui:px-3 ui:py-1.5 ui:text-xs ui:text-balance",e),...r,children:[n,y.jsx(u7e,{className:"ui:bg-foreground ui:fill-foreground ui:z-50 ui:size-2.5 ui:translate-y-[calc(-50%-2px)] ui:rotate-45 ui:rounded-[2px]"})]})})}const $de=v.forwardRef(({children:e,...t},n)=>y.jsx(cQ,{children:y.jsx(b5,{ref:n,...t,children:e})}));$de.displayName=uQ.displayName;const Gu=({trigger:e,content:t,asChild:n=!0,wrapTrigger:r=!0,triggerClassName:i="",contentClassName:o="ui:max-w-sm",disableContent:a=!1,isPortal:s=!1})=>a?e:y.jsxs(KR,{children:[y.jsx(ZR,{asChild:n,children:r?y.jsx("div",{className:te("ui:truncate",i),children:e}):e}),s?y.jsx($de,{className:o,children:t}):y.jsx(b5,{className:o,children:t})]}),ypt=({name:e,label:t,placeholder:n,items:r=[],description:i,multiple:o=!1,emptyMessage:a="No results found",containerClassName:s,hasClearButton:c=!1,hasAllOption:u=!1,allOptionLabel:d="All",disabled:f=!1,tooltipContent:h,control:p,inputMode:g="input"})=>{const m=Dr.useFormContext(),b=p??m?.control;if(!b)throw new Error("FormCombobox must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:b,name:e,render:({field:w})=>y.jsxs(_r,{className:te("ui:flex ui:flex-col",s),children:[t&&y.jsxs(yi,{className:te({"ui:flex ui:items-center ui:gap-2":!!h}),children:[t,h&&y.jsx(Gu,{triggerClassName:"ui:order-last",content:h,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),y.jsx(TN,{items:r,multiple:o,value:w.value,onValueChange:w.onChange,placeholder:n,emptyMessage:a,disabled:f,hasClearButton:c,hasAllOption:u,allOptionLabel:d,inputMode:g}),i&&y.jsx(Ni,{children:i}),y.jsx(Jr,{})]})})};function Mde({...e}){return y.jsx(ebe,{"data-slot":"select",...e})}function wpt({...e}){return y.jsx(lbe,{"data-slot":"select-group",...e})}function Ade({...e}){return y.jsx(nbe,{"data-slot":"select-value",...e})}function Nde({className:e,size:t="default",children:n,...r}){return y.jsxs(tbe,{"data-slot":"select-trigger","data-size":t,className:te("ui:flex ui:h-10 ui:w-full ui:items-center ui:justify-between ui:rounded-md ui:border-solid ui:border ui:border-input ui:bg-background ui:px-3 ui:py-2 ui:text-sm ui:placeholder:text-muted-foreground ui:hover:bg-background ui:focus:outline-none ui:disabled:cursor-not-allowed ui:disabled:opacity-50 ui:[&>span]:line-clamp-1",e),...r,children:[n,y.jsx(rbe,{asChild:!0,children:y.jsx(qe.ChevronDownIcon,{className:"ui:size-4 ui:opacity-50"})})]})}function Ode({className:e,children:t,position:n="item-aligned",isPortal:r=!1,align:i="center",style:o,...a}){const{layer:s}=kne(),c=s!=null?parseInt(getComputedStyle(s).zIndex,10):NaN,u=Number.isFinite(c)?c+1:void 0,d=y.jsxs(obe,{"data-slot":"select-content",className:te("ui:relative ui:z-50 ui:max-h-96 ui:min-w-32 ui:overflow-hidden ui:rounded-md ui:border ui:bg-popover ui:text-popover-foreground ui:shadow-md ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"ui:data-[side=bottom]:translate-y-1 ui:data-[side=left]:-translate-x-1 ui:data-[side=right]:translate-x-1 ui:data-[side=top]:-translate-y-1",e),position:n,align:i,style:u!=null?{zIndex:u,...o}:o,...a,children:[y.jsx(Ide,{}),y.jsx(abe,{className:te("ui:p-1",n==="popper"&&"ui:h-(--radix-select-trigger-height) ui:w-full ui:min-w-(--radix-select-trigger-width) ui:scroll-my-1"),children:t}),y.jsx(Pde,{})]});return r?y.jsx(ibe,{children:d}):d}function xpt({className:e,...t}){return y.jsx(sbe,{"data-slot":"select-label",className:te("ui:text-muted-foreground ui:px-2 ui:py-1.5 ui:text-xs",e),...t})}function Rde({className:e,children:t,...n}){return y.jsxs(cbe,{"data-slot":"select-item",className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:relative ui:flex ui:w-full ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-8 ui:pl-2 ui:text-sm ui:outline-hidden ui:select-none ui:data-disabled:pointer-events-none ui:data-disabled:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4 ui:*:[span]:last:flex ui:*:[span]:last:items-center ui:*:[span]:last:gap-2",e),...n,children:[y.jsx("span",{"data-slot":"select-item-indicator",className:"ui:absolute ui:right-2 ui:flex ui:size-3.5 ui:items-center ui:justify-center",children:y.jsx(dbe,{children:y.jsx(qe.CheckIcon,{className:"ui:size-4"})})}),y.jsx(ube,{children:t})]})}function Ept({className:e,...t}){return y.jsx(pbe,{"data-slot":"select-separator",className:te("ui:bg-border ui:pointer-events-none ui:-mx-1 ui:my-1 ui:h-px",e),...t})}function Ide({className:e,...t}){return y.jsx(fbe,{"data-slot":"select-scroll-up-button",className:te("ui:flex ui:cursor-default ui:items-center ui:justify-center ui:py-1",e),...t,children:y.jsx(qe.ChevronUpIcon,{className:"ui:size-4"})})}function Pde({className:e,...t}){return y.jsx(hbe,{"data-slot":"select-scroll-down-button",className:te("ui:flex ui:cursor-default ui:items-center ui:justify-center ui:py-1",e),...t,children:y.jsx(qe.ChevronDownIcon,{className:"ui:size-4"})})}const Cpt=({hasFormControlWrapper:e=!1,children:t})=>e?y.jsx(wi,{children:t}):t,JR=({options:e,placeholder:t,hasFormControlWrapper:n=!1,selectContentClassName:r,onChange:i,value:o,label:a,triggerClassName:s,labelClassName:c,containerClassName:u,isPortal:d=!1,...f})=>y.jsxs("article",{className:u,children:[a&&y.jsx(Io,{className:te("ui:mb-2 ui:block",c),children:a}),y.jsxs(Mde,{onValueChange:i,value:o,...f,children:[y.jsx(Cpt,{hasFormControlWrapper:n,children:y.jsx(Nde,{className:te("ui:h-10",s),children:y.jsx(Ade,{placeholder:t})})}),y.jsx(Ode,{className:r,isPortal:d,children:e.map(h=>y.jsx(Rde,{value:h.value,children:h.label},h.value))})]})]}),Spt=({name:e,label:t,options:n,placeholder:r,description:i,tooltipContent:o,hasRequiredIndicator:a=!1,containerClassName:s,control:c,...u})=>{const d=Dr.useFormContext(),f=c??d?.control;if(!f)throw new Error("FormSelect must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:f,name:e,render:({field:h})=>y.jsxs(_r,{className:te("ui:w-full",s),children:[y.jsxs(yi,{className:o?"ui:flex ui:items-center ui:gap-2":void 0,children:[t,a&&y.jsx("span",{className:"ui:text-destructive",children:"*"}),o&&y.jsx(Gu,{content:o,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),y.jsx(JR,{...u,options:n,placeholder:r,hasFormControlWrapper:!0,value:h.value??"",onChange:p=>{h.onChange(p),h.onBlur()}}),i&&y.jsx(Ni,{children:i}),y.jsx(Jr,{})]})})},$pt=({name:e,label:t,description:n,containerClassName:r,showErrorPlaceholder:i,step:o=60})=>{const{control:a}=Dr.useFormContext();return y.jsx(Zr,{control:a,name:e,render:({field:s})=>y.jsxs(_r,{className:te("ui:flex ui:flex-col ui:gap-2 ui:w-full ui:space-y-0",r),children:[t&&y.jsx(yi,{children:t}),y.jsx(wi,{children:y.jsx(gs,{type:"time",step:o,className:"ui:bg-background ui:appearance-none [&::-webkit-calendar-picker-indicator]:ui:hidden [&::-webkit-calendar-picker-indicator]:ui:appearance-none",...s})}),n&&y.jsx(Ni,{children:n}),y.jsx(Jr,{showErrorPlaceholder:i})]})})},Mpt=({name:e,control:t,disabledCondition:n=!1,label:r,placeholder:i,description:o,containerClassName:a,triggerClassName:s,showErrorPlaceholder:c})=>{const u=Dr.useFormContext(),d=t??u?.control;if(!d)throw new Error("FormDatePicker must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:d,name:e,render:({field:f})=>y.jsxs(_r,{className:te("ui:flex ui:flex-col",a),children:[y.jsx(Ur,{children:y.jsx(Bn,{condition:!!r,children:y.jsx(yi,{children:r})})}),y.jsxs(W2,{children:[y.jsx(wi,{children:y.jsx(Q1,{asChild:!0,children:y.jsxs(Gn,{variant:"outline",className:te("ui:w-[240px] ui:pl-3 ui:text-left ui:font-normal",!f.value&&"ui:text-muted-foreground",s),children:[f.value?Ds(new Date(f.value),"dd/MM/yyyy"):y.jsx("span",{children:i}),y.jsx(qe.CalendarIcon,{className:"ui:ml-auto ui:h-4 ui:w-4 ui:opacity-50"})]})})}),y.jsx(ef,{className:"ui:w-auto ui:p-0",align:"start",children:y.jsx(gA,{mode:"single",selected:f.value?new Date(f.value):void 0,onSelect:h=>{h&&f.onChange(h)},disabled:n,initialFocus:!0})})]}),y.jsx(Ur,{children:y.jsx(Bn,{condition:!!o,children:y.jsx(Ni,{children:o})})}),y.jsx(Jr,{showErrorPlaceholder:c})]})})},Apt=e=>{if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]},Npt=e=>e.type.startsWith("image/"),Opt=({uploadedFile:e,onRemove:t})=>y.jsx("div",{className:"ui:p-3 ui:bg-muted/50 ui:border ui:border-border ui:rounded-lg",children:y.jsxs("div",{className:"ui:flex ui:items-center ui:justify-between ui:gap-3",children:[y.jsxs("div",{className:"ui:flex ui:items-center ui:gap-3 ui:min-w-0",children:[Npt(e.file)?y.jsx("img",{src:e.url,alt:e.file.name,className:"ui:shrink-0 ui:w-10 ui:h-10 ui:object-cover ui:rounded-md"}):y.jsx("div",{className:"ui:shrink-0 ui:p-2 ui:bg-primary/10 ui:rounded-md",children:y.jsx(qe.FileText,{size:20,className:"ui:text-primary"})}),y.jsxs("div",{className:"ui:min-w-0",children:[y.jsx("p",{className:"ui:text-sm ui:font-medium ui:text-foreground ui:truncate",children:e.file.name}),y.jsx("p",{className:"ui:text-xs ui:text-muted-foreground",children:Apt(e.file.size)})]})]}),y.jsx(ca,{variant:"ghost",size:"sm",isIconOnly:!0,onClick:t,icon:y.jsx(qe.X,{size:16}),className:te("ui:shrink-0 ui:text-muted-foreground","ui:hover:text-destructive ui:hover:bg-destructive/10")})]})}),Fde=({name:e,control:t,label:n,uploadButtonLabel:r="Upload File",uploadingLabel:i="Uploading...",uploadFailedMessage:o="Upload failed",description:a,accept:s="*",disabled:c=!1,multiple:u=!1,containerClassName:d,tooltipContent:f,hasRequiredIndicator:h=!1,onUpload:p})=>{const g=Dr.useFormContext(),m=t??g?.control;if(!m)throw new Error("FormFileUpload must be used within a FormProvider or receive a control prop");const b=l.useRef(null),[w,x]=l.useState(!1),E=async($,M,A)=>{const R=$.target.files;if(R?.length){x(!0);try{if(u){const T=Array.from(R),k=[];for(const P of T){const O=p?await p(P):URL.createObjectURL(P);k.push({file:P,url:O})}const N=Array.isArray(A)?A:[];M([...N,...k])}else{const T=R[0],k=p?await p(T):URL.createObjectURL(T);M({file:T,url:k})}}catch(T){const k=T instanceof Error?T.message:o;hM.toast.error(k)}finally{x(!1),b.current&&(b.current.value="")}}},S=($,M,A)=>{if(u&&Array.isArray(M)&&A){const R=M.filter(T=>T!==A);$(R.length>0?R:null)}else $(null);b.current&&(b.current.value="")};return y.jsx(Zr,{control:m,name:e,render:({field:$})=>{const M=$.value,A=u?Array.isArray(M)?M:[]:M&&"file"in M?[M]:[];return y.jsxs(_r,{className:te("ui:w-full",d),children:[n&&y.jsxs(yi,{className:te({"ui:flex ui:items-center ui:gap-2":!!f}),children:[n,h&&y.jsx("span",{children:"*"}),f&&y.jsx(Gu,{content:f,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:text-muted-foreground ui:cursor-pointer"})})]}),y.jsx(wi,{children:y.jsxs("div",{className:"ui:space-y-3",children:[y.jsxs("div",{className:"ui:relative ui:inline-block",children:[y.jsx("input",{ref:b,type:"file",accept:s,multiple:u,onChange:R=>E(R,$.onChange,M),disabled:c||w,className:te("ui:absolute ui:inset-0 ui:w-full ui:h-full ui:opacity-0 ui:cursor-pointer","ui:disabled:cursor-not-allowed")}),y.jsx(ca,{variant:"outline",label:w?i:r,icon:w?y.jsx(qe.Loader2,{size:16,className:"ui:animate-spin"}):y.jsx(qe.Upload,{size:16}),disabled:c||w})]}),A.length>0&&y.jsx("div",{className:"ui:space-y-2",children:A.map((R,T)=>y.jsx(Opt,{uploadedFile:R,onRemove:()=>S($.onChange,M,R)},`${R.file.name}-${R.file.size}-${T}`))})]})}),y.jsx(Jr,{}),a&&y.jsx(Ni,{children:a})]})}})};Fde.displayName="FormFileUpload";const y5=l.forwardRef(({name:e,label:t,labelVariant:n,type:r="text",value:i,onChange:o,description:a="",placeholder:s,className:c,inputClassName:u,isReadOnly:d=!1,readOnly:f,hasRequiredIndicator:h=!1,...p},g)=>y.jsxs("article",{className:c,children:[t&&y.jsxs(Io,{variant:n,className:"ui:mb-2",children:[t,h&&y.jsx("span",{className:"ui:text-destructive",children:"*"})]}),y.jsx(gs,{ref:g,"data-test-id":e,name:e,placeholder:s,value:i,type:r,onChange:o,readOnly:d||f,className:te({"ui:pointer-events-none ui:opacity-30":d||f},u),...p}),a&&y.jsx(Qv,{description:a})]}));y5.displayName="InputField";const Rpt=({label:e,containerClassName:t,inputClassName:n,name:r,description:i,placeholder:o="",tooltipContent:a,hasRequiredIndicator:s=!1,control:c,type:u="text",...d})=>{const f=Dr.useFormContext(),h=c??f?.control;if(!h)throw new Error("FormInput must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:h,name:r,render:({field:p})=>y.jsxs(_r,{className:te("ui:w-full",t),children:[y.jsxs(yi,{className:a?"ui:flex ui:items-center ui:gap-2":void 0,children:[e,s&&y.jsx("span",{className:"ui:text-destructive",children:"*"}),a&&y.jsx(Gu,{content:a,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),y.jsx(wi,{children:y.jsx(y5,{...p,...d,type:u,placeholder:o,inputClassName:te(n)})}),i&&y.jsx(Ni,{children:i}),y.jsx(Jr,{})]})})},Ipt=({label:e,name:t,containerClassName:n,description:r,placeholder:i,tooltipContent:o,control:a,hasRequiredIndicator:s=!1,...c})=>{const u=Dr.useFormContext(),d=a??u?.control;if(!d)throw new Error("FormPassword must be used within a FormProvider or receive a control prop");const[f,h]=l.useState(!1),p=()=>{h(g=>!g)};return y.jsx(Zr,{control:d,name:t,render:({field:g})=>y.jsxs(_r,{className:te("ui:w-full",n),children:[e&&y.jsxs(yi,{className:te({"ui:flex ui:items-center ui:gap-2":!!o}),children:[e,s&&y.jsx("span",{children:"*"}),o&&y.jsx(Gu,{content:o,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),y.jsx(wi,{children:y.jsxs("div",{className:"ui:relative",children:[y.jsx(y5,{...g,...c,type:f?"text":"password",placeholder:i,hasRequiredIndicator:s,inputClassName:"pr-8"}),y.jsx("button",{type:"button",onClick:p,className:"ui:absolute ui:right-3 ui:top-1/2 ui:-translate-y-1/2 ui:text-muted-foreground ui:hover:text-foreground ui:transition-colors",tabIndex:-1,children:f?y.jsx(qe.EyeOff,{size:16,className:"ui:cursor-pointer"}):y.jsx(qe.Eye,{size:16,className:"ui:cursor-pointer"})})]})}),r&&y.jsx(Ni,{children:r}),y.jsx(Jr,{})]})})};function Tde({className:e,...t}){return y.jsx(v5e,{"data-slot":"radio-group",className:te("ui:grid ui:gap-3",e),...t})}function Dde({className:e,...t}){return y.jsx(b5e,{"data-slot":"radio-group-item",className:te("ui:p-0! ui:aspect-square ui:h-4 ui:w-4 ui:rounded-full ui:border ui:border-solid ui:border-primary ui:text-primary ui:bg-transparent ui:hover:bg-transparent ui:ring-offset-background ui:focus:outline-none ui:focus-visible:ring-2 ui:focus-visible:ring-ring ui:focus-visible:ring-offset-2 ui:disabled:cursor-not-allowed ui:disabled:opacity-50 ui:transition-none",e),...t,children:y.jsx(y5e,{"data-slot":"radio-group-indicator",className:"ui:relative ui:flex ui:items-center ui:justify-center",children:y.jsx(qe.CircleIcon,{className:"ui:fill-primary ui:absolute ui:top-1/2 ui:left-1/2 ui:size-2 ui:-translate-x-1/2 ui:-translate-y-1/2"})})})}const Ppt=({name:e,label:t,items:n,control:r,containerClassName:i,itemClassName:o,itemLabelClassName:a,selectedClassName:s,description:c})=>{const u=Dr.useFormContext(),d=r??u?.control;if(!d)throw new Error("FormRadio must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:d,name:e,render:({field:f})=>y.jsxs(_r,{className:te("ui:space-y-3",i),children:[t&&y.jsx(yi,{children:t}),y.jsx(wi,{children:y.jsx(Tde,{onValueChange:f.onChange,defaultValue:f.value,className:"ui:flex ui:flex-col ui:space-y-1",children:n.map(h=>y.jsxs(_r,{className:te("ui:flex ui:items-center ui:space-y-0",o,f.value===h.value&&s),children:[y.jsx(wi,{children:y.jsx(Dde,{value:h.value})}),y.jsx(yi,{className:te("ui:font-normal",a),children:h.label})]},h.value))})}),y.jsx(Jr,{}),c&&y.jsx(Ni,{children:c})]})})};function zde({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...o}){const a=v.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,i],[n,t,r,i]);return y.jsxs(Rbe,{"data-slot":"slider",defaultValue:t,value:n,min:r,max:i,className:te("ui:relative ui:flex ui:w-full ui:touch-none ui:items-center ui:select-none ui:data-[disabled]:opacity-50 ui:data-[orientation=vertical]:h-full ui:data-[orientation=vertical]:min-h-44 ui:data-[orientation=vertical]:w-auto ui:data-[orientation=vertical]:flex-col",e),...o,children:[y.jsx(Ibe,{"data-slot":"slider-track",className:te("ui:bg-muted ui:relative ui:grow ui:overflow-hidden ui:rounded-full ui:data-[orientation=horizontal]:h-1.5 ui:data-[orientation=horizontal]:w-full ui:data-[orientation=vertical]:h-full ui:data-[orientation=vertical]:w-1.5"),children:y.jsx(Pbe,{"data-slot":"slider-range",className:te("ui:bg-primary ui:absolute ui:data-[orientation=horizontal]:h-full ui:data-[orientation=vertical]:w-full")})}),Array.from({length:a.length},(s,c)=>y.jsx(Fbe,{"data-slot":"slider-thumb",className:"ui:border-primary ui:ring-ring/50 ui:block ui:size-4 ui:shrink-0 ui:rounded-full ui:border ui:bg-white ui:shadow-sm ui:transition-[color,box-shadow] ui:hover:ring-4 ui:focus-visible:ring-4 ui:focus-visible:outline-hidden ui:disabled:pointer-events-none ui:disabled:opacity-50"},c))]})}const Fpt=({name:e,control:t,label:n,description:r,min:i=0,max:o=100,step:a=1,leftLabel:s,rightLabel:c,showLabels:u=!0,complementaryField:d,onValueChange:f,containerClassName:h,labelClassName:p,showErrorPlaceholder:g=!1,tooltipContent:m,...b})=>{const w=Dr.useFormContext(),x=t??w?.control;if(!x)throw new Error("FormSlider must be used within a FormProvider or receive a control prop");const E=l.useRef(!1),S=Dr.useWatch({control:x,name:e});return y.jsx(Zr,{control:x,name:e,render:({field:$})=>{const M=R=>{if(E.current)return;const T=R[0];E.current=!0,$.onChange(String(T)),d&&w?.setValue&&w.setValue(d,String(o-T),{shouldValidate:!0}),f&&f(T),setTimeout(()=>{E.current=!1},0)},A=Number(S)||i+(o-i)/2;return y.jsxs(_r,{className:te("ui:w-full",h),children:[y.jsx(Ur,{children:y.jsx(Bn,{condition:!!n,children:y.jsxs(yi,{className:te(p,{"ui:flex ui:items-center ui:gap-2":!!m}),children:[n,m&&y.jsx(Gu,{content:m,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,color:"#737373",className:"ui:cursor-pointer"})})]})})}),y.jsx(wi,{children:y.jsxs("div",{className:"ui:space-y-2",children:[y.jsx(zde,{value:[A],onValueChange:M,min:i,max:o,step:a,className:"ui:w-full",...b}),u&&y.jsxs("div",{className:"ui:flex ui:justify-between ui:text-sm ui:text-gray-600",children:[s&&y.jsxs("span",{children:[s,": ",A,o===100?"%":""]}),c&&y.jsxs("span",{children:[c,": ",d?o-A:A,o===100?"%":""]})]})]})}),y.jsx(Ur,{children:y.jsx(Bn,{condition:!!r,children:y.jsx(Ni,{className:"ui:text-xs",children:r})})}),y.jsx(Jr,{showErrorPlaceholder:g})]})}})};function Tpt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}const w5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function tf(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function QR(e){return"nodeType"in e}function Oi(e){var t,n;return e?tf(e)?e:QR(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function eI(e){const{Document:t}=Oi(e);return e instanceof t}function Y2(e){return tf(e)?!1:e instanceof Oi(e).HTMLElement}function _de(e){return e instanceof Oi(e).SVGElement}function nf(e){return e?tf(e)?e.document:QR(e)?eI(e)?e:Y2(e)||_de(e)?e.ownerDocument:document:document:document}const dl=w5?l.useLayoutEffect:l.useEffect;function tI(e){const t=l.useRef(e);return dl(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function Dpt(){const e=l.useRef(null),t=l.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=l.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Sh(e,t){t===void 0&&(t=[e]);const n=l.useRef(e);return dl(()=>{n.current!==e&&(n.current=e)},t),n}function X2(e,t){const n=l.useRef();return l.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function zg(e){const t=tI(e),n=l.useRef(null),r=l.useCallback(i=>{i!==n.current&&t?.(i,n.current),n.current=i},[]);return[n,r]}function p$(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}let Xx={};function K2(e,t){return l.useMemo(()=>{if(t)return t;const n=Xx[e]==null?0:Xx[e]+1;return Xx[e]=n,e+"-"+n},[e,t])}function kde(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((o,a)=>{const s=Object.entries(a);for(const[c,u]of s){const d=o[c];d!=null&&(o[c]=d+e*u)}return o},{...t})}}const Yd=kde(1),$h=kde(-1);function zpt(e){return"clientX"in e&&"clientY"in e}function nI(e){if(!e)return!1;const{KeyboardEvent:t}=Oi(e.target);return t&&e instanceof t}function _pt(e){if(!e)return!1;const{TouchEvent:t}=Oi(e.target);return t&&e instanceof t}function m$(e){if(_pt(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return zpt(e)?{x:e.clientX,y:e.clientY}:null}const Mh=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Mh.Translate.toString(e),Mh.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),iq="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function kpt(e){return e.matches(iq)?e:e.querySelector(iq)}const Lpt={display:"none"};function jpt(e){let{id:t,value:n}=e;return l.createElement("div",{id:t,style:Lpt},n)}function Hpt(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return l.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function Bpt(){const[e,t]=l.useState("");return{announce:l.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Lde=l.createContext(null);function Vpt(e){const t=l.useContext(Lde);l.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Gpt(){const[e]=l.useState(()=>new Set),t=l.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[l.useCallback(r=>{let{type:i,event:o}=r;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const qpt={draggable:`
|
|
234
|
+
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function x2t(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function E2t(){return qR(/^Mac/)}function C2t(){return qR(/^iPhone/)}function eq(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function S2t(){return qR(/^iPad/)||E2t()&&navigator.maxTouchPoints>1}function cde(){return C2t()||S2t()}function qR(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const $2t=24,M2t=typeof window<"u"?l.useLayoutEffect:l.useEffect;function tq(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const qx=typeof document<"u"&&window.visualViewport;function nq(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function ude(e){for(nq(e)&&(e=e.parentElement);e&&!nq(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const A2t=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let sm=0,Wx;function N2t(e={}){let{isDisabled:t}=e;M2t(()=>{if(!t)return sm++,sm===1&&cde()&&(Wx=O2t()),()=>{sm--,sm===0&&Wx?.()}},[t])}function O2t(){let e,t=0,n=f=>{e=ude(f.target),!(e===document.documentElement&&e===document.body)&&(t=f.changedTouches[0].pageY)},r=f=>{if(!e||e===document.documentElement||e===document.body){f.preventDefault();return}let h=f.changedTouches[0].pageY,p=e.scrollTop,g=e.scrollHeight-e.clientHeight;g!==0&&((p<=0&&h>t||p>=g&&h<t)&&f.preventDefault(),t=h)},i=f=>{let h=f.target;d$(h)&&h!==document.activeElement&&(f.preventDefault(),h.style.transform="translateY(-2000px)",h.focus(),requestAnimationFrame(()=>{h.style.transform=""}))},o=f=>{let h=f.target;d$(h)&&(h.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{h.style.transform="",qx&&(qx.height<window.innerHeight?requestAnimationFrame(()=>{rq(h)}):qx.addEventListener("resize",()=>rq(h),{once:!0}))}))},a=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,u=tq(R2t(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let d=tq(Of(document,"touchstart",n,{passive:!1,capture:!0}),Of(document,"touchmove",r,{passive:!1,capture:!0}),Of(document,"touchend",i,{passive:!1,capture:!0}),Of(document,"focus",o,!0),Of(window,"scroll",a));return()=>{u(),d(),window.scrollTo(s,c)}}function R2t(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Of(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function rq(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=ude(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top,o=e.getBoundingClientRect().bottom;const a=n.getBoundingClientRect().bottom+$2t;o>a&&(n.scrollTop+=i-r)}e=n.parentElement}}function d$(e){return e instanceof HTMLInputElement&&!A2t.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function I2t(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function P2t(...e){return t=>e.forEach(n=>I2t(n,t))}function dde(...e){return v.useCallback(P2t(...e),e)}const fde=new WeakMap;function vr(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([i,o])=>{if(i.startsWith("--")){e.style.setProperty(i,o);return}r[i]=e.style[i],e.style[i]=o}),!n&&fde.set(e,r)}function F2t(e,t){if(!e||!(e instanceof HTMLElement))return;let n=fde.get(e);n&&(e.style[t]=n[t])}const tr=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function cm(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(", ")[tr(t)?13:12]):(i=r.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(", ")[tr(t)?5:4]):null)}function T2t(e){return 8*(Math.log(e+1)-2)}function Ux(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function D2t(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const kn={DURATION:.5,EASE:[.32,.72,0,1]},hde=.4,z2t=.25,_2t=100,pde=8,Dc=16,f$=26,Yx="vaul-dragging";function mde(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function k2t({defaultProp:e,onChange:t}){const n=l.useState(e),[r]=n,i=l.useRef(r),o=mde(t);return l.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function gde({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=k2t({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=mde(n),c=l.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else i(u)},[o,e,i,s]);return[a,c]}function L2t({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:i,fadeFromIndex:o,onSnapPointChange:a,direction:s="bottom",container:c,snapToSequentialPoint:u}){const[d,f]=gde({prop:e,defaultProp:n?.[0],onChange:t}),[h,p]=l.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);l.useEffect(()=>{function A(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",A),()=>window.removeEventListener("resize",A)},[]);const g=l.useMemo(()=>d===n?.[n.length-1]||null,[n,d]),m=l.useMemo(()=>{var A;return(A=n?.findIndex(R=>R===d))!=null?A:null},[n,d]),b=n&&n.length>0&&(o||o===0)&&!Number.isNaN(o)&&n[o]===d||!n,w=l.useMemo(()=>{const A=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var R;return(R=n?.map(T=>{const k=typeof T=="string";let N=0;if(k&&(N=parseInt(T,10)),tr(s)){const O=k?N:h?T*A.height:0;return h?s==="bottom"?A.height-O:-A.height+O:O}const P=k?N:h?T*A.width:0;return h?s==="right"?A.width-P:-A.width+P:P}))!=null?R:[]},[n,h,c]),x=l.useMemo(()=>m!==null?w?.[m]:null,[w,m]),E=l.useCallback(A=>{var R;const T=(R=w?.findIndex(k=>k===A))!=null?R:null;a(T),vr(r.current,{transition:`transform ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,transform:tr(s)?`translate3d(0, ${A}px, 0)`:`translate3d(${A}px, 0, 0)`}),w&&T!==w.length-1&&o!==void 0&&T!==o&&T<o?vr(i.current,{transition:`opacity ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,opacity:"0"}):vr(i.current,{transition:`opacity ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,opacity:"1"}),f(n?.[Math.max(T,0)])},[r.current,n,w,o,i,f]);l.useEffect(()=>{if(d||e){var A;const R=(A=n?.findIndex(T=>T===e||T===d))!=null?A:-1;w&&R!==-1&&typeof w[R]=="number"&&E(w[R])}},[d,e,n,w,E]);function S({draggedDistance:A,closeDrawer:R,velocity:T,dismissible:k}){if(o===void 0)return;const N=s==="bottom"||s==="right"?(x??0)-A:(x??0)+A,P=m===o-1,O=m===0,z=A>0;if(P&&vr(i.current,{transition:`opacity ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`}),!u&&T>2&&!z){k?R():E(w[0]);return}if(!u&&T>2&&z&&w&&n){E(w[n.length-1]);return}const L=w?.reduce((_,H)=>typeof _!="number"||typeof H!="number"?_:Math.abs(H-N)<Math.abs(_-N)?H:_),D=tr(s)?window.innerHeight:window.innerWidth;if(T>hde&&Math.abs(A)<D*.4){const _=z?1:-1;if(_>0&&g&&n){E(w[n.length-1]);return}if(O&&_<0&&k&&R(),m===null)return;E(w[m+_]);return}E(L)}function $({draggedDistance:A}){if(x===null)return;const R=s==="bottom"||s==="right"?x-A:x+A;(s==="bottom"||s==="right")&&R<w[w.length-1]||(s==="top"||s==="left")&&R>w[w.length-1]||vr(r.current,{transform:tr(s)?`translate3d(0, ${R}px, 0)`:`translate3d(${R}px, 0, 0)`})}function M(A,R){if(!n||typeof m!="number"||!w||o===void 0)return null;const T=m===o-1;if(m>=o&&R)return 0;if(T&&!R)return 1;if(!b&&!T)return null;const N=T?m+1:m-1,P=T?w[N]-w[N-1]:w[N+1]-w[N],O=A/Math.abs(P);return T?1-O:O}return{isLastSnapPoint:g,activeSnapPoint:d,shouldFade:b,getPercentageDragged:M,setActiveSnapPoint:f,activeSnapPointIndex:m,onRelease:S,onDrag:$,snapPointsOffset:w}}const j2t=()=>()=>{};function H2t(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=U2(),o=l.useRef(null),a=l.useMemo(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-f$)/window.innerWidth}l.useEffect(()=>{if(t&&n){o.current&&clearTimeout(o.current);const c=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c)return;D2t(r&&!i?Ux(document.body,{background:"black"}):j2t,Ux(c,{transformOrigin:tr(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${kn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kn.EASE.join(",")})`}));const u=Ux(c,{borderRadius:`${pde}px`,overflow:"hidden",...tr(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),o.current=window.setTimeout(()=>{a?document.body.style.background=a:document.body.style.removeProperty("background")},kn.DURATION*1e3)}}},[t,n,a])}let Rf=null;function B2t({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:i,noBodyStyles:o}){const[a,s]=l.useState(()=>typeof window<"u"?window.location.href:""),c=l.useRef(0),u=l.useCallback(()=>{if(eq()&&Rf===null&&e&&!o){Rf={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:f,innerHeight:h}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-f}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const p=h-window.innerHeight;p&&c.current>=h&&(document.body.style.top=`${-(c.current+p)}px`)}),300)}},[e]),d=l.useCallback(()=>{if(eq()&&Rf!==null&&!o){const f=-parseInt(document.body.style.top,10),h=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Rf),window.requestAnimationFrame(()=>{if(i&&a!==window.location.href){s(window.location.href);return}window.scrollTo(h,f)}),Rf=null}},[a]);return l.useEffect(()=>{function f(){c.current=window.scrollY}return f(),window.addEventListener("scroll",f),()=>{window.removeEventListener("scroll",f)}},[]),l.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||d()}},[t,d]),l.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{d()},500)):d())},[e,r,a,t,n,u,d]),{restorePositionSetting:d}}function V2t({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:i,snapPoints:o,shouldScaleBackground:a=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=z2t,scrollLockTimeout:u=_2t,dismissible:d=!0,handleOnly:f=!1,fadeFromIndex:h=o&&o.length-1,activeSnapPoint:p,setActiveSnapPoint:g,fixed:m,modal:b=!0,onClose:w,nested:x,noBodyStyles:E=!1,direction:S="bottom",defaultOpen:$=!1,disablePreventScroll:M=!0,snapToSequentialPoint:A=!1,preventScrollRestoration:R=!1,repositionInputs:T=!0,onAnimationEnd:k,container:N,autoFocus:P=!1}){var O,z;const[L=!1,D]=gde({defaultProp:$,prop:e,onChange:fe=>{t?.(fe),!fe&&!x&&ve(),setTimeout(()=>{k?.(fe)},kn.DURATION*1e3),fe&&!b&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),fe||(document.body.style.pointerEvents="auto")}}),[_,H]=l.useState(!1),[W,F]=l.useState(!1),[K,j]=l.useState(!1),U=l.useRef(null),Y=l.useRef(null),G=l.useRef(null),Q=l.useRef(null),X=l.useRef(null),Z=l.useRef(!1),J=l.useRef(null),ee=l.useRef(0),ce=l.useRef(!1),B=l.useRef(!$),ne=l.useRef(0),q=l.useRef(null),se=l.useRef(((O=q.current)==null?void 0:O.getBoundingClientRect().height)||0),he=l.useRef(((z=q.current)==null?void 0:z.getBoundingClientRect().width)||0),pe=l.useRef(0),me=l.useCallback(fe=>{o&&fe===ke.length-1&&(Y.current=new Date)},[]),{activeSnapPoint:de,activeSnapPointIndex:ye,setActiveSnapPoint:Ae,onRelease:De,snapPointsOffset:ke,onDrag:be,shouldFade:ue,getPercentageDragged:ge}=L2t({snapPoints:o,activeSnapPointProp:p,setActiveSnapPointProp:g,drawerRef:q,fadeFromIndex:h,overlayRef:U,onSnapPointChange:me,direction:S,container:N,snapToSequentialPoint:A});N2t({isDisabled:!L||W||!b||K||!_||!T||!M});const{restorePositionSetting:ve}=B2t({isOpen:L,modal:b,nested:x??!1,hasBeenOpened:_,preventScrollRestoration:R,noBodyStyles:E});function Ce(){return(window.innerWidth-f$)/window.innerWidth}function Xe(fe){var Me,Se;!d&&!o||q.current&&!q.current.contains(fe.target)||(se.current=((Me=q.current)==null?void 0:Me.getBoundingClientRect().height)||0,he.current=((Se=q.current)==null?void 0:Se.getBoundingClientRect().width)||0,F(!0),G.current=new Date,cde()&&window.addEventListener("touchend",()=>Z.current=!1,{once:!0}),fe.target.setPointerCapture(fe.pointerId),ee.current=tr(S)?fe.pageY:fe.pageX)}function Ge(fe,Me){var Se;let we=fe;const Ve=(Se=window.getSelection())==null?void 0:Se.toString(),Ne=q.current?cm(q.current,S):null,ze=new Date;if(we.tagName==="SELECT"||we.hasAttribute("data-vaul-no-drag")||we.closest("[data-vaul-no-drag]"))return!1;if(S==="right"||S==="left")return!0;if(Y.current&&ze.getTime()-Y.current.getTime()<500)return!1;if(Ne!==null&&(S==="bottom"?Ne>0:Ne<0))return!0;if(Ve&&Ve.length>0)return!1;if(X.current&&ze.getTime()-X.current.getTime()<u&&Ne===0||Me)return X.current=ze,!1;for(;we;){if(we.scrollHeight>we.clientHeight){if(we.scrollTop!==0)return X.current=new Date,!1;if(we.getAttribute("role")==="dialog")return!0}we=we.parentNode}return!0}function Ze(fe){if(q.current&&W){const Me=S==="bottom"||S==="right"?1:-1,Se=(ee.current-(tr(S)?fe.pageY:fe.pageX))*Me,we=Se>0,Ve=o&&!d&&!we;if(Ve&&ye===0)return;const Ne=Math.abs(Se),ze=document.querySelector("[data-vaul-drawer-wrapper]"),It=S==="bottom"||S==="top"?se.current:he.current;let vt=Ne/It;const At=ge(Ne,we);if(At!==null&&(vt=At),Ve&&vt>=1||!Z.current&&!Ge(fe.target,we))return;if(q.current.classList.add(Yx),Z.current=!0,vr(q.current,{transition:"none"}),vr(U.current,{transition:"none"}),o&&be({draggedDistance:Se}),we&&!o){const mt=T2t(Se),Pt=Math.min(mt*-1,0)*Me;vr(q.current,{transform:tr(S)?`translate3d(0, ${Pt}px, 0)`:`translate3d(${Pt}px, 0, 0)`});return}const Nt=1-vt;if((ue||h&&ye===h-1)&&(r?.(fe,vt),vr(U.current,{opacity:`${Nt}`,transition:"none"},!0)),ze&&U.current&&a){const mt=Math.min(Ce()+vt*(1-Ce()),1),Pt=8-vt*8,dn=Math.max(0,14-vt*14);vr(ze,{borderRadius:`${Pt}px`,transform:tr(S)?`scale(${mt}) translate3d(0, ${dn}px, 0)`:`scale(${mt}) translate3d(${dn}px, 0, 0)`,transition:"none"},!0)}if(!o){const mt=Ne*Me;vr(q.current,{transform:tr(S)?`translate3d(0, ${mt}px, 0)`:`translate3d(${mt}px, 0, 0)`})}}}l.useEffect(()=>{window.requestAnimationFrame(()=>{B.current=!0})},[]),l.useEffect(()=>{var fe;function Me(){if(!q.current||!T)return;const Se=document.activeElement;if(d$(Se)||ce.current){var we;const Ve=((we=window.visualViewport)==null?void 0:we.height)||0,Ne=window.innerHeight;let ze=Ne-Ve;const It=q.current.getBoundingClientRect().height||0,vt=It>Ne*.8;pe.current||(pe.current=It);const At=q.current.getBoundingClientRect().top;if(Math.abs(ne.current-ze)>60&&(ce.current=!ce.current),o&&o.length>0&&ke&&ye){const Nt=ke[ye]||0;ze+=Nt}if(ne.current=ze,It>Ve||ce.current){const Nt=q.current.getBoundingClientRect().height;let mt=Nt;Nt>Ve&&(mt=Ve-(vt?At:f$)),m?q.current.style.height=`${Nt-Math.max(ze,0)}px`:q.current.style.height=`${Math.max(mt,Ve-At)}px`}else x2t()||(q.current.style.height=`${pe.current}px`);o&&o.length>0&&!ce.current?q.current.style.bottom="0px":q.current.style.bottom=`${Math.max(ze,0)}px`}}return(fe=window.visualViewport)==null||fe.addEventListener("resize",Me),()=>{var Se;return(Se=window.visualViewport)==null?void 0:Se.removeEventListener("resize",Me)}},[ye,o,ke]);function We(fe){Ke(),w?.(),fe||D(!1),setTimeout(()=>{o&&Ae(o[0])},kn.DURATION*1e3)}function Be(){if(!q.current)return;const fe=document.querySelector("[data-vaul-drawer-wrapper]"),Me=cm(q.current,S);vr(q.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`}),vr(U.current,{transition:`opacity ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,opacity:"1"}),a&&Me&&Me>0&&L&&vr(fe,{borderRadius:`${pde}px`,overflow:"hidden",...tr(S)?{transform:`scale(${Ce()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Ce()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${kn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kn.EASE.join(",")})`},!0)}function Ke(){!W||!q.current||(q.current.classList.remove(Yx),Z.current=!1,F(!1),Q.current=new Date)}function ht(fe){if(!W||!q.current)return;q.current.classList.remove(Yx),Z.current=!1,F(!1),Q.current=new Date;const Me=cm(q.current,S);if(!fe||!Ge(fe.target,!1)||!Me||Number.isNaN(Me)||G.current===null)return;const Se=Q.current.getTime()-G.current.getTime(),we=ee.current-(tr(S)?fe.pageY:fe.pageX),Ve=Math.abs(we)/Se;if(Ve>.05&&(j(!0),setTimeout(()=>{j(!1)},200)),o){De({draggedDistance:we*(S==="bottom"||S==="right"?1:-1),closeDrawer:We,velocity:Ve,dismissible:d}),i?.(fe,!0);return}if(S==="bottom"||S==="right"?we>0:we<0){Be(),i?.(fe,!0);return}if(Ve>hde){We(),i?.(fe,!1);return}var Ne;const ze=Math.min((Ne=q.current.getBoundingClientRect().height)!=null?Ne:0,window.innerHeight);var It;const vt=Math.min((It=q.current.getBoundingClientRect().width)!=null?It:0,window.innerWidth),At=S==="left"||S==="right";if(Math.abs(Me)>=(At?vt:ze)*c){We(),i?.(fe,!1);return}i?.(fe,!0),Be()}l.useEffect(()=>(L&&(vr(document.documentElement,{scrollBehavior:"auto"}),Y.current=new Date),()=>{F2t(document.documentElement,"scrollBehavior")}),[L]);function _t(fe){const Me=fe?(window.innerWidth-Dc)/window.innerWidth:1,Se=fe?-Dc:0;J.current&&window.clearTimeout(J.current),vr(q.current,{transition:`transform ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,transform:tr(S)?`scale(${Me}) translate3d(0, ${Se}px, 0)`:`scale(${Me}) translate3d(${Se}px, 0, 0)`}),!fe&&q.current&&(J.current=setTimeout(()=>{const we=cm(q.current,S);vr(q.current,{transition:"none",transform:tr(S)?`translate3d(0, ${we}px, 0)`:`translate3d(${we}px, 0, 0)`})},500))}function Tt(fe,Me){if(Me<0)return;const Se=(window.innerWidth-Dc)/window.innerWidth,we=Se+Me*(1-Se),Ve=-Dc+Me*Dc;vr(q.current,{transform:tr(S)?`scale(${we}) translate3d(0, ${Ve}px, 0)`:`scale(${we}) translate3d(${Ve}px, 0, 0)`,transition:"none"})}function Rt(fe,Me){const Se=tr(S)?window.innerHeight:window.innerWidth,we=Me?(Se-Dc)/Se:1,Ve=Me?-Dc:0;Me&&vr(q.current,{transition:`transform ${kn.DURATION}s cubic-bezier(${kn.EASE.join(",")})`,transform:tr(S)?`scale(${we}) translate3d(0, ${Ve}px, 0)`:`scale(${we}) translate3d(${Ve}px, 0, 0)`})}return l.useEffect(()=>{b||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[b]),l.createElement(e2,{defaultOpen:$,onOpenChange:fe=>{!d&&!fe||(fe?H(!0):We(!0),D(fe))},open:L},l.createElement(sde.Provider,{value:{activeSnapPoint:de,snapPoints:o,setActiveSnapPoint:Ae,drawerRef:q,overlayRef:U,onOpenChange:t,onPress:Xe,onRelease:ht,onDrag:Ze,dismissible:d,shouldAnimate:B,handleOnly:f,isOpen:L,isDragging:W,shouldFade:ue,closeDrawer:We,onNestedDrag:Tt,onNestedOpenChange:_t,onNestedRelease:Rt,keyboardIsOpen:ce,modal:b,snapPointsOffset:ke,activeSnapPointIndex:ye,direction:S,shouldScaleBackground:a,setBackgroundColorOnScale:s,noBodyStyles:E,container:N,autoFocus:P}},n))}const vde=l.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:o,isOpen:a,modal:s,shouldAnimate:c}=U2(),u=dde(t,n),d=r&&r.length>0;if(!s)return null;const f=l.useCallback(h=>i(h),[i]);return l.createElement(n2,{onMouseUp:f,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":a&&d?"true":"false","data-vaul-snap-points-overlay":a&&o?"true":"false","data-vaul-animate":c?.current?"true":"false",...e})});vde.displayName="Drawer.Overlay";const bde=l.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},i){const{drawerRef:o,onPress:a,onRelease:s,onDrag:c,keyboardIsOpen:u,snapPointsOffset:d,activeSnapPointIndex:f,modal:h,isOpen:p,direction:g,snapPoints:m,container:b,handleOnly:w,shouldAnimate:x,autoFocus:E}=U2(),[S,$]=l.useState(!1),M=dde(i,o),A=l.useRef(null),R=l.useRef(null),T=l.useRef(!1),k=m&&m.length>0;H2t();const N=(O,z,L=0)=>{if(T.current)return!0;const D=Math.abs(O.y),_=Math.abs(O.x),H=_>D,W=["bottom","right"].includes(z)?1:-1;if(z==="left"||z==="right"){if(!(O.x*W<0)&&_>=0&&_<=L)return H}else if(!(O.y*W<0)&&D>=0&&D<=L)return!H;return T.current=!0,!0};l.useEffect(()=>{k&&window.requestAnimationFrame(()=>{$(!0)})},[]);function P(O){A.current=null,T.current=!1,s(O)}return l.createElement(r2,{"data-vaul-drawer-direction":g,"data-vaul-drawer":"","data-vaul-delayed-snap-points":S?"true":"false","data-vaul-snap-points":p&&k?"true":"false","data-vaul-custom-container":b?"true":"false","data-vaul-animate":x?.current?"true":"false",...r,ref:M,style:d&&d.length>0?{"--snap-point-height":`${d[f??0]}px`,...t}:t,onPointerDown:O=>{w||(r.onPointerDown==null||r.onPointerDown.call(r,O),A.current={x:O.pageX,y:O.pageY},a(O))},onOpenAutoFocus:O=>{n?.(O),E||O.preventDefault()},onPointerDownOutside:O=>{if(e?.(O),!h||O.defaultPrevented){O.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:O=>{if(!h){O.preventDefault();return}},onPointerMove:O=>{if(R.current=O,w||(r.onPointerMove==null||r.onPointerMove.call(r,O),!A.current))return;const z=O.pageY-A.current.y,L=O.pageX-A.current.x,D=O.pointerType==="touch"?10:2;N({x:L,y:z},g,D)?c(O):(Math.abs(L)>D||Math.abs(z)>D)&&(A.current=null)},onPointerUp:O=>{r.onPointerUp==null||r.onPointerUp.call(r,O),A.current=null,T.current=!1,s(O)},onPointerOut:O=>{r.onPointerOut==null||r.onPointerOut.call(r,O),P(R.current)},onContextMenu:O=>{r.onContextMenu==null||r.onContextMenu.call(r,O),R.current&&P(R.current)}})});bde.displayName="Drawer.Content";const G2t=250,q2t=120,W2t=l.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:i,isDragging:o,snapPoints:a,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:u,handleOnly:d,isOpen:f,onPress:h,onDrag:p}=U2(),g=l.useRef(null),m=l.useRef(!1);function b(){if(m.current){E();return}window.setTimeout(()=>{w()},q2t)}function w(){if(o||e||m.current){E();return}if(E(),!a||a.length===0){u||i();return}if(s===a[a.length-1]&&u){i();return}const $=a.findIndex(A=>A===s);if($===-1)return;const M=a[$+1];c(M)}function x(){g.current=window.setTimeout(()=>{m.current=!0},G2t)}function E(){g.current&&window.clearTimeout(g.current),m.current=!1}return l.createElement("div",{onClick:b,onPointerCancel:E,onPointerDown:S=>{d&&h(S),x()},onPointerMove:S=>{d&&p(S)},ref:r,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},l.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});W2t.displayName="Drawer.Handle";function U2t(e){const t=U2(),{container:n=t.container,...r}=e;return l.createElement(t2,{container:n,...r})}const Ac={Root:V2t,Content:bde,Overlay:vde,Trigger:hv,Portal:U2t,Close:Cu,Title:pv,Description:mv};function Y2t({...e}){return y.jsx(Ac.Root,{"data-slot":"drawer",...e})}function X2t({...e}){return y.jsx(Ac.Trigger,{"data-slot":"drawer-trigger",...e})}function yde({...e}){return y.jsx(Ac.Portal,{"data-slot":"drawer-portal",...e})}function K2t({...e}){return y.jsx(Ac.Close,{"data-slot":"drawer-close",...e})}function wde({className:e,...t}){return y.jsx(Ac.Overlay,{"data-slot":"drawer-overlay",className:te("ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:fixed ui:inset-0 ui:z-50 ui:bg-black/50",e),...t})}function Z2t({className:e,children:t,...n}){return y.jsxs(yde,{"data-slot":"drawer-portal",children:[y.jsx(wde,{}),y.jsxs(Ac.Content,{"data-slot":"drawer-content",className:te("ui:group/drawer-content ui:bg-background ui:fixed ui:flex ui:h-auto ui:flex-col ui:rounded-t-[10px] ui:z-100 ui:mt-24","ui:data-[vaul-drawer-direction=top]:inset-x-0 ui:data-[vaul-drawer-direction=top]:top-0 ui:data-[vaul-drawer-direction=top]:mb-24 ui:data-[vaul-drawer-direction=top]:max-h-[80vh] ui:data-[vaul-drawer-direction=top]:rounded-b-lg ui:data-[vaul-drawer-direction=top]:border-b","ui:data-[vaul-drawer-direction=bottom]:inset-x-0 ui:data-[vaul-drawer-direction=bottom]:bottom-0 ui:data-[vaul-drawer-direction=bottom]:mt-24 ui:data-[vaul-drawer-direction=bottom]:max-h-[80vh] ui:data-[vaul-drawer-direction=bottom]:rounded-t-lg ui:data-[vaul-drawer-direction=bottom]:border-t","ui:data-[vaul-drawer-direction=right]:inset-y-0 ui:data-[vaul-drawer-direction=right]:right-0 ui:data-[vaul-drawer-direction=right]:w-3/4 ui:data-[vaul-drawer-direction=right]:border-l ui:data-[vaul-drawer-direction=right]:sm:max-w-sm","ui:data-[vaul-drawer-direction=left]:inset-y-0 ui:data-[vaul-drawer-direction=left]:left-0 ui:data-[vaul-drawer-direction=left]:w-3/4 ui:data-[vaul-drawer-direction=left]:border-r ui:data-[vaul-drawer-direction=left]:sm:max-w-sm",e),...n,children:[y.jsx("div",{className:"ui:bg-muted ui:mx-auto ui:mt-4 ui:hidden ui:h-2 ui:w-[100px] ui:shrink-0 ui:rounded-full ui:group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),t]})]})}function J2t({className:e,...t}){return y.jsx("div",{"data-slot":"drawer-header",className:te("ui:flex ui:flex-col ui:gap-0.5 ui:p-4 ui:group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center ui:group-data-[vaul-drawer-direction=top]/drawer-content:text-center ui:md:gap-1.5 ui:md:text-left",e),...t})}function Q2t({className:e,...t}){return y.jsx("div",{"data-slot":"drawer-footer",className:te("ui:mt-auto ui:flex ui:flex-col ui:gap-2 ui:p-4",e),...t})}function ept({className:e,...t}){return y.jsx(Ac.Title,{"data-slot":"drawer-title",className:te("ui:text-foreground ui:font-semibold",e),...t})}function tpt({className:e,...t}){return y.jsx(Ac.Description,{"data-slot":"drawer-description",className:te("ui:text-muted-foreground ui:text-sm",e),...t})}function WR({...e}){return y.jsx(A4e,{"data-slot":"dropdown-menu",...e})}function npt({...e}){return y.jsx(rZ,{"data-slot":"dropdown-menu-portal",...e})}function UR({...e}){return y.jsx(N4e,{"data-slot":"dropdown-menu-trigger",...e})}function YR({className:e,sideOffset:t=4,...n}){return y.jsx(rZ,{children:y.jsx(O4e,{"data-slot":"dropdown-menu-content",sideOffset:t,className:te("ui:bg-popover ui:text-popover-foreground ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:z-50 ui:max-h-(--radix-dropdown-menu-content-available-height) ui:min-w-[8rem] ui:origin-(--radix-dropdown-menu-content-transform-origin) ui:overflow-x-hidden ui:overflow-y-auto ui:rounded-md ui:border ui:p-1 ui:shadow-md",e),...n})})}function rpt({...e}){return y.jsx(R4e,{"data-slot":"dropdown-menu-group",...e})}function xde({className:e,inset:t,variant:n="default",...r}){return y.jsx(P4e,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:data-[variant=destructive]:text-destructive ui:data-[variant=destructive]:focus:bg-destructive/10 ui:dark:data-[variant=destructive]:focus:bg-destructive/20 ui:data-[variant=destructive]:focus:text-destructive ui:data-[variant=destructive]:*:[svg]:!text-destructive ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:px-2 ui:py-1.5 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:data-[inset]:pl-8 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...r})}function h$({className:e,children:t,checked:n,...r}){return y.jsxs(F4e,{"data-slot":"dropdown-menu-checkbox-item",className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-2 ui:pl-8 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[y.jsx("span",{className:"ui:pointer-events-none ui:absolute ui:left-2 ui:flex size-3.5 ui:items-center ui:justify-center",children:y.jsx(iZ,{children:y.jsx(qe.CheckIcon,{className:"ui:size-4"})})}),t]})}function ipt({...e}){return y.jsx(T4e,{"data-slot":"dropdown-menu-radio-group",...e})}function opt({className:e,children:t,...n}){return y.jsxs(D4e,{"data-slot":"dropdown-menu-radio-item",className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:relative ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-2 ui:pl-8 ui:text-sm ui:outline-hidden ui:select-none ui:data-[disabled]:pointer-events-none ui:data-[disabled]:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...n,children:[y.jsx("span",{className:"ui:pointer-events-none ui:absolute ui:left-2 ui:flex size-3.5 ui:items-center ui:justify-center",children:y.jsx(iZ,{children:y.jsx(qe.CircleIcon,{className:"ui:size-2 ui:fill-current"})})}),t]})}function apt({className:e,inset:t,...n}){return y.jsx(I4e,{"data-slot":"dropdown-menu-label","data-inset":t,className:te("ui:px-2 ui:py-1.5 ui:text-sm ui:font-medium ui:data-[inset]:pl-8",e),...n})}function lpt({className:e,...t}){return y.jsx(z4e,{"data-slot":"dropdown-menu-separator",className:te("ui:bg-border ui:-mx-1 ui:my-1 ui:h-px",e),...t})}function spt({className:e,...t}){return y.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:te("ui:text-muted-foreground ui:ml-auto ui:text-xs ui:tracking-widest",e),...t})}function cpt({...e}){return y.jsx(_4e,{"data-slot":"dropdown-menu-sub",...e})}function upt({className:e,inset:t,children:n,...r}){return y.jsxs(k4e,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:data-[state=open]:bg-accent ui:data-[state=open]:text-accent-foreground ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:flex ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:px-2 ui:py-1.5 ui:text-sm ui:outline-hidden ui:select-none ui:data-[inset]:pl-8 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,y.jsx(qe.ChevronRightIcon,{className:"ui:ml-auto ui:size-4"})]})}function dpt({className:e,...t}){return y.jsx(L4e,{"data-slot":"dropdown-menu-sub-content",className:te("ui:bg-popover ui:text-popover-foreground ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:z-50 ui:min-w-[8rem] ui:origin-(--radix-dropdown-menu-content-transform-origin) ui:overflow-hidden ui:rounded-md ui:border ui:p-1 ui:shadow-lg",e),...t})}function fpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty",className:te("ui:flex ui:min-w-0 ui:flex-1 ui:flex-col ui:items-center ui:justify-center ui:gap-6 ui:rounded-lg ui:border-dashed ui:p-6 ui:text-center ui:text-balance ui:md:p-12",e),...t})}function hpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty-header",className:te("ui:flex ui:max-w-sm ui:flex-col ui:items-center ui:gap-2 ui:text-center",e),...t})}const ppt=fc("ui:flex ui:shrink-0 ui:items-center ui:justify-center ui:mb-2 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0",{variants:{variant:{default:"ui:bg-transparent",icon:"ui:bg-muted ui:text-foreground ui:flex ui:size-10 ui:shrink-0 ui:items-center ui:justify-center ui:rounded-lg ui:[&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function mpt({className:e,variant:t="default",...n}){return y.jsx("div",{"data-slot":"empty-icon","data-variant":t,className:te(ppt({variant:t,className:e})),...n})}function gpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty-title",className:te("ui:text-lg ui:font-medium ui:tracking-tight",e),...t})}function vpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty-description",className:te("ui:text-muted-foreground ui:[&>a:hover]:text-primary ui:text-sm/relaxed ui:[&>a]:underline ui:[&>a]:underline-offset-4",e),...t})}function bpt({className:e,...t}){return y.jsx("div",{"data-slot":"empty-content",className:te("ui:flex ui:w-full ui:max-w-sm ui:min-w-0 ui:flex-col ui:items-center ui:gap-4 ui:text-sm ui:text-balance",e),...t})}function Ede({message:e,className:t}){return y.jsx("p",{className:te("ui:text-red-500 ui:text-xs ui:mt-2 ui:has-error",t),children:e})}const Cde=v.createContext(null),Sde=v.createContext(null),v5=()=>{const e=v.useContext(Cde),t=v.useContext(Sde);if(!e)throw new Error("useFormField must be used within <FormField>");if(!t)throw new Error("useFormField must be used within <FormItem>");const{id:n}=t,{name:r,error:i}=e;return{name:r,error:i,formItemId:`${n}-form-item`,formDescriptionId:`${n}-form-item-description`,formMessageId:`${n}-form-item-message`}},Zr=e=>y.jsx(Dr.Controller,{...e,render:t=>y.jsx(Cde.Provider,{value:{name:e.name,error:t.fieldState.error},children:e.render?.(t)})});function _r({className:e,...t}){const n=v.useId();return y.jsx(Sde.Provider,{value:{id:n},children:y.jsx("div",{"data-slot":"form-item",className:te("ui:grid ui:gap-2",e),...t})})}function yi({className:e,required:t=!1,...n}){const{error:r,formItemId:i}=v5();return y.jsxs(Io,{"data-slot":"form-label","data-error":!!r,htmlFor:i,className:te("ui:text-sm",r?"ui:text-destructive":"ui:text-black-950",e),...n,children:[n.children,t&&y.jsx("span",{className:"ui:text-destructive ml-1",children:"*"})]})}function wi(e){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=v5();return y.jsx(ms,{"data-slot":"form-control",id:n,"aria-invalid":!!t,"aria-describedby":t?`${r} ${i}`:r,...e})}function Ni({className:e,...t}){const{formDescriptionId:n}=v5();return y.jsx("p",{"data-slot":"form-description",id:n,className:te("ui:text-muted-foreground ui:text-sm",e),...t})}function Jr({className:e,showErrorPlaceholder:t,...n}){const{error:r,formMessageId:i}=v5(),o=r?String(r.message??""):n.children;return o?y.jsx("p",{"data-slot":"form-message",id:i,className:te("ui:text-destructive ui:text-sm",e),...n,children:o}):t?y.jsx("p",{className:"ui:h-4"}):null}const Zm=({name:e,control:t,containerClassName:n,...r})=>{const i=Dr.useFormContext(),o=t??i?.control;if(!o)throw new Error("FormCheckbox must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:o,name:e,render:({field:a})=>y.jsxs(_r,{className:n,children:[y.jsx(wi,{children:y.jsx(ite,{...a,checked:!!a.value,onCheckedChange:a.onChange,...r})}),y.jsx(Jr,{})]})})};function XR({delayDuration:e=0,...t}){return y.jsx(l7e,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function KR({...e}){return y.jsx(XR,{children:y.jsx(s7e,{"data-slot":"tooltip",...e})})}function ZR({...e}){return y.jsx(c7e,{"data-slot":"tooltip-trigger",...e})}function b5({className:e,sideOffset:t=0,children:n,...r}){return y.jsx(cQ,{children:y.jsxs(uQ,{"data-slot":"tooltip-content",sideOffset:t,className:te("ui:bg-foreground ui:text-background ui:animate-in ui:fade-in-0 ui:zoom-in-95 ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=closed]:zoom-out-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2 ui:z-50 ui:w-fit ui:origin-(--radix-tooltip-content-transform-origin) ui:rounded-md ui:px-3 ui:py-1.5 ui:text-xs ui:text-balance",e),...r,children:[n,y.jsx(u7e,{className:"ui:bg-foreground ui:fill-foreground ui:z-50 ui:size-2.5 ui:translate-y-[calc(-50%-2px)] ui:rotate-45 ui:rounded-[2px]"})]})})}const $de=v.forwardRef(({children:e,...t},n)=>y.jsx(cQ,{children:y.jsx(b5,{ref:n,...t,children:e})}));$de.displayName=uQ.displayName;const Gu=({trigger:e,content:t,asChild:n=!0,wrapTrigger:r=!0,triggerClassName:i="",contentClassName:o="ui:max-w-sm",disableContent:a=!1,isPortal:s=!1})=>a?e:y.jsxs(KR,{children:[y.jsx(ZR,{asChild:n,children:r?y.jsx("div",{className:te("ui:truncate",i),children:e}):e}),s?y.jsx($de,{className:o,children:t}):y.jsx(b5,{className:o,children:t})]}),ypt=({name:e,label:t,placeholder:n,items:r=[],description:i,multiple:o=!1,emptyMessage:a="No results found",containerClassName:s,hasClearButton:c=!1,hasAllOption:u=!1,allOptionLabel:d="All",disabled:f=!1,tooltipContent:h,control:p,inputMode:g="input"})=>{const m=Dr.useFormContext(),b=p??m?.control;if(!b)throw new Error("FormCombobox must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:b,name:e,render:({field:w})=>y.jsxs(_r,{className:te("ui:flex ui:flex-col",s),children:[t&&y.jsxs(yi,{className:te({"ui:flex ui:items-center ui:gap-2":!!h}),children:[t,h&&y.jsx(Gu,{triggerClassName:"ui:order-last",content:h,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),y.jsx(TN,{items:r,multiple:o,value:w.value,onValueChange:w.onChange,placeholder:n,emptyMessage:a,disabled:f,hasClearButton:c,hasAllOption:u,allOptionLabel:d,inputMode:g}),i&&y.jsx(Ni,{children:i}),y.jsx(Jr,{})]})})};function Mde({...e}){return y.jsx(ebe,{"data-slot":"select",...e})}function wpt({...e}){return y.jsx(lbe,{"data-slot":"select-group",...e})}function Ade({...e}){return y.jsx(nbe,{"data-slot":"select-value",...e})}function Nde({className:e,size:t="default",children:n,...r}){return y.jsxs(tbe,{"data-slot":"select-trigger","data-size":t,className:te("ui:flex ui:h-10 ui:w-full ui:items-center ui:justify-between ui:rounded-md ui:border-solid ui:border ui:border-input ui:bg-background ui:px-3 ui:py-2 ui:text-sm ui:placeholder:text-muted-foreground ui:hover:bg-background ui:focus:outline-none ui:disabled:cursor-not-allowed ui:disabled:opacity-50 ui:[&>span]:line-clamp-1",e),...r,children:[n,y.jsx(rbe,{asChild:!0,children:y.jsx(qe.ChevronDownIcon,{className:"ui:size-4 ui:opacity-50"})})]})}function Ode({className:e,children:t,position:n,isPortal:r=!1,align:i="center",alignItemWithTrigger:o=!1,side:a="bottom",sideOffset:s=4,style:c,...u}){const d=n??(o?"item-aligned":"popper"),{layer:f}=kne(),h=f!=null?parseInt(getComputedStyle(f).zIndex,10):NaN,p=Number.isFinite(h)?h+1:void 0,g=y.jsxs(obe,{"data-slot":"select-content",className:te("ui:relative ui:z-50 ui:max-h-96 ui:min-w-32 ui:overflow-hidden ui:rounded-md ui:border ui:bg-popover ui:text-popover-foreground ui:shadow-md ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2",d==="popper"&&"ui:data-[side=bottom]:translate-y-1 ui:data-[side=left]:-translate-x-1 ui:data-[side=right]:translate-x-1 ui:data-[side=top]:-translate-y-1",e),position:d,align:i,side:d==="popper"?a:void 0,sideOffset:d==="popper"?s:void 0,style:p!=null?{zIndex:p,...c}:c,...u,children:[y.jsx(Ide,{}),y.jsx(abe,{className:te("ui:p-1",d==="popper"&&"ui:h-(--radix-select-trigger-height) ui:w-full ui:min-w-(--radix-select-trigger-width) ui:scroll-my-1"),children:t}),y.jsx(Pde,{})]});return r?y.jsx(ibe,{children:g}):g}function xpt({className:e,...t}){return y.jsx(sbe,{"data-slot":"select-label",className:te("ui:text-muted-foreground ui:px-2 ui:py-1.5 ui:text-xs",e),...t})}function Rde({className:e,children:t,...n}){return y.jsxs(cbe,{"data-slot":"select-item",className:te("ui:focus:bg-accent ui:focus:text-accent-foreground ui:[&_svg:not([class*='text-'])]:text-muted-foreground ui:relative ui:flex ui:w-full ui:cursor-default ui:items-center ui:gap-2 ui:rounded-sm ui:py-1.5 ui:pr-8 ui:pl-2 ui:text-sm ui:outline-hidden ui:select-none ui:data-disabled:pointer-events-none ui:data-disabled:opacity-50 ui:[&_svg]:pointer-events-none ui:[&_svg]:shrink-0 ui:[&_svg:not([class*='size-'])]:size-4 ui:*:[span]:last:flex ui:*:[span]:last:items-center ui:*:[span]:last:gap-2",e),...n,children:[y.jsx("span",{"data-slot":"select-item-indicator",className:"ui:absolute ui:right-2 ui:flex ui:size-3.5 ui:items-center ui:justify-center",children:y.jsx(dbe,{children:y.jsx(qe.CheckIcon,{className:"ui:size-4"})})}),y.jsx(ube,{children:t})]})}function Ept({className:e,...t}){return y.jsx(pbe,{"data-slot":"select-separator",className:te("ui:bg-border ui:pointer-events-none ui:-mx-1 ui:my-1 ui:h-px",e),...t})}function Ide({className:e,...t}){return y.jsx(fbe,{"data-slot":"select-scroll-up-button",className:te("ui:flex ui:cursor-default ui:items-center ui:justify-center ui:py-1",e),...t,children:y.jsx(qe.ChevronUpIcon,{className:"ui:size-4"})})}function Pde({className:e,...t}){return y.jsx(hbe,{"data-slot":"select-scroll-down-button",className:te("ui:flex ui:cursor-default ui:items-center ui:justify-center ui:py-1",e),...t,children:y.jsx(qe.ChevronDownIcon,{className:"ui:size-4"})})}const Cpt=({hasFormControlWrapper:e=!1,children:t})=>e?y.jsx(wi,{children:t}):t,JR=({options:e,placeholder:t,hasFormControlWrapper:n=!1,selectContentClassName:r,onChange:i,value:o,label:a,triggerClassName:s,labelClassName:c,containerClassName:u,isPortal:d=!1,...f})=>y.jsxs("article",{className:u,children:[a&&y.jsx(Io,{className:te("ui:mb-2 ui:block",c),children:a}),y.jsxs(Mde,{onValueChange:i,value:o,...f,children:[y.jsx(Cpt,{hasFormControlWrapper:n,children:y.jsx(Nde,{className:te("ui:h-10",s),children:y.jsx(Ade,{placeholder:t})})}),y.jsx(Ode,{className:r,isPortal:d,children:e.map(h=>y.jsx(Rde,{value:h.value,children:h.label},h.value))})]})]}),Spt=({name:e,label:t,options:n,placeholder:r,description:i,tooltipContent:o,hasRequiredIndicator:a=!1,containerClassName:s,control:c,...u})=>{const d=Dr.useFormContext(),f=c??d?.control;if(!f)throw new Error("FormSelect must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:f,name:e,render:({field:h})=>y.jsxs(_r,{className:te("ui:w-full",s),children:[y.jsxs(yi,{className:o?"ui:flex ui:items-center ui:gap-2":void 0,children:[t,a&&y.jsx("span",{className:"ui:text-destructive",children:"*"}),o&&y.jsx(Gu,{content:o,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),y.jsx(JR,{...u,options:n,placeholder:r,hasFormControlWrapper:!0,value:h.value??"",onChange:p=>{h.onChange(p),h.onBlur()}}),i&&y.jsx(Ni,{children:i}),y.jsx(Jr,{})]})})},$pt=({name:e,label:t,description:n,containerClassName:r,showErrorPlaceholder:i,step:o=60})=>{const{control:a}=Dr.useFormContext();return y.jsx(Zr,{control:a,name:e,render:({field:s})=>y.jsxs(_r,{className:te("ui:flex ui:flex-col ui:gap-2 ui:w-full ui:space-y-0",r),children:[t&&y.jsx(yi,{children:t}),y.jsx(wi,{children:y.jsx(gs,{type:"time",step:o,className:"ui:bg-background ui:appearance-none [&::-webkit-calendar-picker-indicator]:ui:hidden [&::-webkit-calendar-picker-indicator]:ui:appearance-none",...s})}),n&&y.jsx(Ni,{children:n}),y.jsx(Jr,{showErrorPlaceholder:i})]})})},Mpt=({name:e,control:t,disabledCondition:n=!1,label:r,placeholder:i,description:o,containerClassName:a,triggerClassName:s,showErrorPlaceholder:c})=>{const u=Dr.useFormContext(),d=t??u?.control;if(!d)throw new Error("FormDatePicker must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:d,name:e,render:({field:f})=>y.jsxs(_r,{className:te("ui:flex ui:flex-col",a),children:[y.jsx(Ur,{children:y.jsx(Bn,{condition:!!r,children:y.jsx(yi,{children:r})})}),y.jsxs(W2,{children:[y.jsx(wi,{children:y.jsx(Q1,{asChild:!0,children:y.jsxs(Gn,{variant:"outline",className:te("ui:w-[240px] ui:pl-3 ui:text-left ui:font-normal",!f.value&&"ui:text-muted-foreground",s),children:[f.value?Ds(new Date(f.value),"dd/MM/yyyy"):y.jsx("span",{children:i}),y.jsx(qe.CalendarIcon,{className:"ui:ml-auto ui:h-4 ui:w-4 ui:opacity-50"})]})})}),y.jsx(ef,{className:"ui:w-auto ui:p-0",align:"start",children:y.jsx(gA,{mode:"single",selected:f.value?new Date(f.value):void 0,onSelect:h=>{h&&f.onChange(h)},disabled:n,initialFocus:!0})})]}),y.jsx(Ur,{children:y.jsx(Bn,{condition:!!o,children:y.jsx(Ni,{children:o})})}),y.jsx(Jr,{showErrorPlaceholder:c})]})})},Apt=e=>{if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]},Npt=e=>e.type.startsWith("image/"),Opt=({uploadedFile:e,onRemove:t})=>y.jsx("div",{className:"ui:p-3 ui:bg-muted/50 ui:border ui:border-border ui:rounded-lg",children:y.jsxs("div",{className:"ui:flex ui:items-center ui:justify-between ui:gap-3",children:[y.jsxs("div",{className:"ui:flex ui:items-center ui:gap-3 ui:min-w-0",children:[Npt(e.file)?y.jsx("img",{src:e.url,alt:e.file.name,className:"ui:shrink-0 ui:w-10 ui:h-10 ui:object-cover ui:rounded-md"}):y.jsx("div",{className:"ui:shrink-0 ui:p-2 ui:bg-primary/10 ui:rounded-md",children:y.jsx(qe.FileText,{size:20,className:"ui:text-primary"})}),y.jsxs("div",{className:"ui:min-w-0",children:[y.jsx("p",{className:"ui:text-sm ui:font-medium ui:text-foreground ui:truncate",children:e.file.name}),y.jsx("p",{className:"ui:text-xs ui:text-muted-foreground",children:Apt(e.file.size)})]})]}),y.jsx(ca,{variant:"ghost",size:"sm",isIconOnly:!0,onClick:t,icon:y.jsx(qe.X,{size:16}),className:te("ui:shrink-0 ui:text-muted-foreground","ui:hover:text-destructive ui:hover:bg-destructive/10")})]})}),Fde=({name:e,control:t,label:n,uploadButtonLabel:r="Upload File",uploadingLabel:i="Uploading...",uploadFailedMessage:o="Upload failed",description:a,accept:s="*",disabled:c=!1,multiple:u=!1,containerClassName:d,tooltipContent:f,hasRequiredIndicator:h=!1,onUpload:p})=>{const g=Dr.useFormContext(),m=t??g?.control;if(!m)throw new Error("FormFileUpload must be used within a FormProvider or receive a control prop");const b=l.useRef(null),[w,x]=l.useState(!1),E=async($,M,A)=>{const R=$.target.files;if(R?.length){x(!0);try{if(u){const T=Array.from(R),k=[];for(const P of T){const O=p?await p(P):URL.createObjectURL(P);k.push({file:P,url:O})}const N=Array.isArray(A)?A:[];M([...N,...k])}else{const T=R[0],k=p?await p(T):URL.createObjectURL(T);M({file:T,url:k})}}catch(T){const k=T instanceof Error?T.message:o;hM.toast.error(k)}finally{x(!1),b.current&&(b.current.value="")}}},S=($,M,A)=>{if(u&&Array.isArray(M)&&A){const R=M.filter(T=>T!==A);$(R.length>0?R:null)}else $(null);b.current&&(b.current.value="")};return y.jsx(Zr,{control:m,name:e,render:({field:$})=>{const M=$.value,A=u?Array.isArray(M)?M:[]:M&&"file"in M?[M]:[];return y.jsxs(_r,{className:te("ui:w-full",d),children:[n&&y.jsxs(yi,{className:te({"ui:flex ui:items-center ui:gap-2":!!f}),children:[n,h&&y.jsx("span",{children:"*"}),f&&y.jsx(Gu,{content:f,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:text-muted-foreground ui:cursor-pointer"})})]}),y.jsx(wi,{children:y.jsxs("div",{className:"ui:space-y-3",children:[y.jsxs("div",{className:"ui:relative ui:inline-block",children:[y.jsx("input",{ref:b,type:"file",accept:s,multiple:u,onChange:R=>E(R,$.onChange,M),disabled:c||w,className:te("ui:absolute ui:inset-0 ui:w-full ui:h-full ui:opacity-0 ui:cursor-pointer","ui:disabled:cursor-not-allowed")}),y.jsx(ca,{variant:"outline",label:w?i:r,icon:w?y.jsx(qe.Loader2,{size:16,className:"ui:animate-spin"}):y.jsx(qe.Upload,{size:16}),disabled:c||w})]}),A.length>0&&y.jsx("div",{className:"ui:space-y-2",children:A.map((R,T)=>y.jsx(Opt,{uploadedFile:R,onRemove:()=>S($.onChange,M,R)},`${R.file.name}-${R.file.size}-${T}`))})]})}),y.jsx(Jr,{}),a&&y.jsx(Ni,{children:a})]})}})};Fde.displayName="FormFileUpload";const y5=l.forwardRef(({name:e,label:t,labelVariant:n,type:r="text",value:i,onChange:o,description:a="",placeholder:s,className:c,inputClassName:u,isReadOnly:d=!1,readOnly:f,hasRequiredIndicator:h=!1,...p},g)=>y.jsxs("article",{className:c,children:[t&&y.jsxs(Io,{variant:n,className:"ui:mb-2",children:[t,h&&y.jsx("span",{className:"ui:text-destructive",children:"*"})]}),y.jsx(gs,{ref:g,"data-test-id":e,name:e,placeholder:s,value:i,type:r,onChange:o,readOnly:d||f,className:te({"ui:pointer-events-none ui:opacity-30":d||f},u),...p}),a&&y.jsx(Qv,{description:a})]}));y5.displayName="InputField";const Rpt=({label:e,containerClassName:t,inputClassName:n,name:r,description:i,placeholder:o="",tooltipContent:a,hasRequiredIndicator:s=!1,control:c,type:u="text",...d})=>{const f=Dr.useFormContext(),h=c??f?.control;if(!h)throw new Error("FormInput must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:h,name:r,render:({field:p})=>y.jsxs(_r,{className:te("ui:w-full",t),children:[y.jsxs(yi,{className:a?"ui:flex ui:items-center ui:gap-2":void 0,children:[e,s&&y.jsx("span",{className:"ui:text-destructive",children:"*"}),a&&y.jsx(Gu,{content:a,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),y.jsx(wi,{children:y.jsx(y5,{...p,...d,type:u,placeholder:o,inputClassName:te(n)})}),i&&y.jsx(Ni,{children:i}),y.jsx(Jr,{})]})})},Ipt=({label:e,name:t,containerClassName:n,description:r,placeholder:i,tooltipContent:o,control:a,hasRequiredIndicator:s=!1,...c})=>{const u=Dr.useFormContext(),d=a??u?.control;if(!d)throw new Error("FormPassword must be used within a FormProvider or receive a control prop");const[f,h]=l.useState(!1),p=()=>{h(g=>!g)};return y.jsx(Zr,{control:d,name:t,render:({field:g})=>y.jsxs(_r,{className:te("ui:w-full",n),children:[e&&y.jsxs(yi,{className:te({"ui:flex ui:items-center ui:gap-2":!!o}),children:[e,s&&y.jsx("span",{children:"*"}),o&&y.jsx(Gu,{content:o,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,className:"ui:cursor-pointer ui:text-segmentify-gray-500"})})]}),y.jsx(wi,{children:y.jsxs("div",{className:"ui:relative",children:[y.jsx(y5,{...g,...c,type:f?"text":"password",placeholder:i,hasRequiredIndicator:s,inputClassName:"pr-8"}),y.jsx("button",{type:"button",onClick:p,className:"ui:absolute ui:right-3 ui:top-1/2 ui:-translate-y-1/2 ui:text-muted-foreground ui:hover:text-foreground ui:transition-colors",tabIndex:-1,children:f?y.jsx(qe.EyeOff,{size:16,className:"ui:cursor-pointer"}):y.jsx(qe.Eye,{size:16,className:"ui:cursor-pointer"})})]})}),r&&y.jsx(Ni,{children:r}),y.jsx(Jr,{})]})})};function Tde({className:e,...t}){return y.jsx(v5e,{"data-slot":"radio-group",className:te("ui:grid ui:gap-3",e),...t})}function Dde({className:e,...t}){return y.jsx(b5e,{"data-slot":"radio-group-item",className:te("ui:p-0! ui:aspect-square ui:h-4 ui:w-4 ui:rounded-full ui:border ui:border-solid ui:border-primary ui:text-primary ui:bg-transparent ui:hover:bg-transparent ui:ring-offset-background ui:focus:outline-none ui:focus-visible:ring-2 ui:focus-visible:ring-ring ui:focus-visible:ring-offset-2 ui:disabled:cursor-not-allowed ui:disabled:opacity-50 ui:transition-none",e),...t,children:y.jsx(y5e,{"data-slot":"radio-group-indicator",className:"ui:relative ui:flex ui:items-center ui:justify-center",children:y.jsx(qe.CircleIcon,{className:"ui:fill-primary ui:absolute ui:top-1/2 ui:left-1/2 ui:size-2 ui:-translate-x-1/2 ui:-translate-y-1/2"})})})}const Ppt=({name:e,label:t,items:n,control:r,containerClassName:i,itemClassName:o,itemLabelClassName:a,selectedClassName:s,description:c})=>{const u=Dr.useFormContext(),d=r??u?.control;if(!d)throw new Error("FormRadio must be used within a FormProvider or receive a control prop");return y.jsx(Zr,{control:d,name:e,render:({field:f})=>y.jsxs(_r,{className:te("ui:space-y-3",i),children:[t&&y.jsx(yi,{children:t}),y.jsx(wi,{children:y.jsx(Tde,{onValueChange:f.onChange,defaultValue:f.value,className:"ui:flex ui:flex-col ui:space-y-1",children:n.map(h=>y.jsxs(_r,{className:te("ui:flex ui:items-center ui:space-y-0",o,f.value===h.value&&s),children:[y.jsx(wi,{children:y.jsx(Dde,{value:h.value})}),y.jsx(yi,{className:te("ui:font-normal",a),children:h.label})]},h.value))})}),y.jsx(Jr,{}),c&&y.jsx(Ni,{children:c})]})})};function zde({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...o}){const a=v.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,i],[n,t,r,i]);return y.jsxs(Rbe,{"data-slot":"slider",defaultValue:t,value:n,min:r,max:i,className:te("ui:relative ui:flex ui:w-full ui:touch-none ui:items-center ui:select-none ui:data-[disabled]:opacity-50 ui:data-[orientation=vertical]:h-full ui:data-[orientation=vertical]:min-h-44 ui:data-[orientation=vertical]:w-auto ui:data-[orientation=vertical]:flex-col",e),...o,children:[y.jsx(Ibe,{"data-slot":"slider-track",className:te("ui:bg-muted ui:relative ui:grow ui:overflow-hidden ui:rounded-full ui:data-[orientation=horizontal]:h-1.5 ui:data-[orientation=horizontal]:w-full ui:data-[orientation=vertical]:h-full ui:data-[orientation=vertical]:w-1.5"),children:y.jsx(Pbe,{"data-slot":"slider-range",className:te("ui:bg-primary ui:absolute ui:data-[orientation=horizontal]:h-full ui:data-[orientation=vertical]:w-full")})}),Array.from({length:a.length},(s,c)=>y.jsx(Fbe,{"data-slot":"slider-thumb",className:"ui:border-primary ui:ring-ring/50 ui:block ui:size-4 ui:shrink-0 ui:rounded-full ui:border ui:bg-white ui:shadow-sm ui:transition-[color,box-shadow] ui:hover:ring-4 ui:focus-visible:ring-4 ui:focus-visible:outline-hidden ui:disabled:pointer-events-none ui:disabled:opacity-50"},c))]})}const Fpt=({name:e,control:t,label:n,description:r,min:i=0,max:o=100,step:a=1,leftLabel:s,rightLabel:c,showLabels:u=!0,complementaryField:d,onValueChange:f,containerClassName:h,labelClassName:p,showErrorPlaceholder:g=!1,tooltipContent:m,...b})=>{const w=Dr.useFormContext(),x=t??w?.control;if(!x)throw new Error("FormSlider must be used within a FormProvider or receive a control prop");const E=l.useRef(!1),S=Dr.useWatch({control:x,name:e});return y.jsx(Zr,{control:x,name:e,render:({field:$})=>{const M=R=>{if(E.current)return;const T=R[0];E.current=!0,$.onChange(String(T)),d&&w?.setValue&&w.setValue(d,String(o-T),{shouldValidate:!0}),f&&f(T),setTimeout(()=>{E.current=!1},0)},A=Number(S)||i+(o-i)/2;return y.jsxs(_r,{className:te("ui:w-full",h),children:[y.jsx(Ur,{children:y.jsx(Bn,{condition:!!n,children:y.jsxs(yi,{className:te(p,{"ui:flex ui:items-center ui:gap-2":!!m}),children:[n,m&&y.jsx(Gu,{content:m,contentClassName:"ui:max-w-96",trigger:y.jsx(qe.Info,{size:16,color:"#737373",className:"ui:cursor-pointer"})})]})})}),y.jsx(wi,{children:y.jsxs("div",{className:"ui:space-y-2",children:[y.jsx(zde,{value:[A],onValueChange:M,min:i,max:o,step:a,className:"ui:w-full",...b}),u&&y.jsxs("div",{className:"ui:flex ui:justify-between ui:text-sm ui:text-gray-600",children:[s&&y.jsxs("span",{children:[s,": ",A,o===100?"%":""]}),c&&y.jsxs("span",{children:[c,": ",d?o-A:A,o===100?"%":""]})]})]})}),y.jsx(Ur,{children:y.jsx(Bn,{condition:!!r,children:y.jsx(Ni,{className:"ui:text-xs",children:r})})}),y.jsx(Jr,{showErrorPlaceholder:g})]})}})};function Tpt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}const w5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function tf(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function QR(e){return"nodeType"in e}function Oi(e){var t,n;return e?tf(e)?e:QR(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function eI(e){const{Document:t}=Oi(e);return e instanceof t}function Y2(e){return tf(e)?!1:e instanceof Oi(e).HTMLElement}function _de(e){return e instanceof Oi(e).SVGElement}function nf(e){return e?tf(e)?e.document:QR(e)?eI(e)?e:Y2(e)||_de(e)?e.ownerDocument:document:document:document}const dl=w5?l.useLayoutEffect:l.useEffect;function tI(e){const t=l.useRef(e);return dl(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function Dpt(){const e=l.useRef(null),t=l.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=l.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Sh(e,t){t===void 0&&(t=[e]);const n=l.useRef(e);return dl(()=>{n.current!==e&&(n.current=e)},t),n}function X2(e,t){const n=l.useRef();return l.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function zg(e){const t=tI(e),n=l.useRef(null),r=l.useCallback(i=>{i!==n.current&&t?.(i,n.current),n.current=i},[]);return[n,r]}function p$(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}let Xx={};function K2(e,t){return l.useMemo(()=>{if(t)return t;const n=Xx[e]==null?0:Xx[e]+1;return Xx[e]=n,e+"-"+n},[e,t])}function kde(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((o,a)=>{const s=Object.entries(a);for(const[c,u]of s){const d=o[c];d!=null&&(o[c]=d+e*u)}return o},{...t})}}const Yd=kde(1),$h=kde(-1);function zpt(e){return"clientX"in e&&"clientY"in e}function nI(e){if(!e)return!1;const{KeyboardEvent:t}=Oi(e.target);return t&&e instanceof t}function _pt(e){if(!e)return!1;const{TouchEvent:t}=Oi(e.target);return t&&e instanceof t}function m$(e){if(_pt(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return zpt(e)?{x:e.clientX,y:e.clientY}:null}const Mh=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Mh.Translate.toString(e),Mh.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),iq="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function kpt(e){return e.matches(iq)?e:e.querySelector(iq)}const Lpt={display:"none"};function jpt(e){let{id:t,value:n}=e;return l.createElement("div",{id:t,style:Lpt},n)}function Hpt(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return l.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function Bpt(){const[e,t]=l.useState("");return{announce:l.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Lde=l.createContext(null);function Vpt(e){const t=l.useContext(Lde);l.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Gpt(){const[e]=l.useState(()=>new Set),t=l.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[l.useCallback(r=>{let{type:i,event:o}=r;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const qpt={draggable:`
|
|
235
235
|
To pick up a draggable item, press the space bar.
|
|
236
236
|
While dragging, use the arrow keys to move the item.
|
|
237
237
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -327,4 +327,4 @@ ${j5(this.code(t,n))}
|
|
|
327
327
|
`).join("");return o.insert(a,{table:WI()})},new ut().retain(r.index));this.quill.updateContents(i,Ee.sources.USER),this.quill.setSelection(r.index,Ee.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(Ee.events.SCROLL_OPTIMIZE,t=>{t.some(n=>["TD","TR","TBODY","TABLE"].includes(n.target.tagName)?(this.quill.once(Ee.events.TEXT_CHANGE,(r,i,o)=>{o===Ee.sources.USER&&this.balanceTables()}),!0):!1)})}}const jU=Cs("quill:toolbar");let UI=class extends Al{constructor(t,n){if(super(t,n),Array.isArray(this.options.container)){const r=document.createElement("div");r.setAttribute("role","toolbar"),czt(r,this.options.container),t.container?.parentNode?.insertBefore(r,t.container),this.container=r}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){jU.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(r=>{const i=this.options.handlers?.[r];i&&this.addHandler(r,i)}),Array.from(this.container.querySelectorAll("button, select")).forEach(r=>{this.attach(r)}),this.quill.on(Ee.events.EDITOR_CHANGE,()=>{const[r]=this.quill.selection.getRange();this.update(r)})}addHandler(t,n){this.handlers[t]=n}attach(t){let n=Array.from(t.classList).find(i=>i.indexOf("ql-")===0);if(!n)return;if(n=n.slice(3),t.tagName==="BUTTON"&&t.setAttribute("type","button"),this.handlers[n]==null&&this.quill.scroll.query(n)==null){jU.warn("ignoring attaching to nonexistent format",n,t);return}const r=t.tagName==="SELECT"?"change":"click";t.addEventListener(r,i=>{let o;if(t.tagName==="SELECT"){if(t.selectedIndex<0)return;const s=t.options[t.selectedIndex];s.hasAttribute("selected")?o=!1:o=s.value||!1}else t.classList.contains("ql-active")?o=!1:o=t.value||!t.hasAttribute("value"),i.preventDefault();this.quill.focus();const[a]=this.quill.selection.getRange();if(this.handlers[n]!=null)this.handlers[n].call(this,o);else if(this.quill.scroll.query(n).prototype instanceof Zi){if(o=prompt(`Enter ${n}`),!o)return;this.quill.updateContents(new ut().retain(a.index).delete(a.length).insert({[n]:o}),Ee.sources.USER)}else this.quill.format(n,o,Ee.sources.USER);this.update(a)}),this.controls.push([n,t])}update(t){const n=t==null?{}:this.quill.getFormat(t);this.controls.forEach(r=>{const[i,o]=r;if(o.tagName==="SELECT"){let a=null;if(t==null)a=null;else if(n[i]==null)a=o.querySelector("option[selected]");else if(!Array.isArray(n[i])){let s=n[i];typeof s=="string"&&(s=s.replace(/"/g,'\\"')),a=o.querySelector(`option[value="${s}"]`)}a==null?(o.value="",o.selectedIndex=-1):a.selected=!0}else if(t==null)o.classList.remove("ql-active"),o.setAttribute("aria-pressed","false");else if(o.hasAttribute("value")){const a=n[i],s=a===o.getAttribute("value")||a!=null&&a.toString()===o.getAttribute("value")||a==null&&!o.getAttribute("value");o.classList.toggle("ql-active",s),o.setAttribute("aria-pressed",s.toString())}else{const a=n[i]!=null;o.classList.toggle("ql-active",a),o.setAttribute("aria-pressed",a.toString())}})}};UI.DEFAULTS={};function HU(e,t,n){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${t}`),r.setAttribute("aria-pressed","false"),n!=null?(r.value=n,r.setAttribute("aria-label",`${t}: ${n}`)):r.setAttribute("aria-label",t),e.appendChild(r)}function czt(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(n=>{const r=document.createElement("span");r.classList.add("ql-formats"),n.forEach(i=>{if(typeof i=="string")HU(r,i);else{const o=Object.keys(i)[0],a=i[o];Array.isArray(a)?uzt(r,o,a):HU(r,o,a)}}),e.appendChild(r)})}function uzt(e,t,n){const r=document.createElement("select");r.classList.add(`ql-${t}`),n.forEach(i=>{const o=document.createElement("option");i!==!1?o.setAttribute("value",String(i)):o.setAttribute("selected","selected"),r.appendChild(o)}),e.appendChild(r)}UI.DEFAULTS={container:null,handlers:{clean(){const e=this.quill.getSelection();if(e!=null)if(e.length===0){const t=this.quill.getFormat();Object.keys(t).forEach(n=>{this.quill.scroll.query(n,ft.INLINE)!=null&&this.quill.format(n,!1,Ee.sources.USER)})}else this.quill.removeFormat(e.index,e.length,Ee.sources.USER)},direction(e){const{align:t}=this.quill.getFormat();e==="rtl"&&t==null?this.quill.format("align","right",Ee.sources.USER):!e&&t==="right"&&this.quill.format("align",!1,Ee.sources.USER),this.quill.format("direction",e,Ee.sources.USER)},indent(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0,10);if(e==="+1"||e==="-1"){let i=e==="+1"?1:-1;n.direction==="rtl"&&(i*=-1),this.quill.format("indent",r+i,Ee.sources.USER)}},link(e){e===!0&&(e=prompt("Enter link URL:")),this.quill.format("link",e,Ee.sources.USER)},list(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t);e==="check"?n.list==="checked"||n.list==="unchecked"?this.quill.format("list",!1,Ee.sources.USER):this.quill.format("list","unchecked",Ee.sources.USER):this.quill.format("list",e,Ee.sources.USER)}}};const dzt='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',fzt='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',hzt='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',pzt='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',mzt='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',gzt='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',vzt='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',bzt='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',BU='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',yzt='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',wzt='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',xzt='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',Ezt='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',Czt='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',Szt='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',$zt='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',Mzt='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',Azt='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',Nzt='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',Ozt='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',Rzt='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',Izt='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',Pzt='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',Fzt='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',Tzt='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',Dzt='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',zzt='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',_zt='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',kzt='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',Lzt='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',jzt='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',Hzt='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',Bzt='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Xh={align:{"":dzt,center:fzt,right:hzt,justify:pzt},background:mzt,blockquote:gzt,bold:vzt,clean:bzt,code:BU,"code-block":BU,color:yzt,direction:{"":wzt,rtl:xzt},formula:Ezt,header:{1:Czt,2:Szt,3:$zt,4:Mzt,5:Azt,6:Nzt},italic:Ozt,image:Rzt,indent:{"+1":Izt,"-1":Pzt},link:Fzt,list:{bullet:Tzt,check:Dzt,ordered:zzt},script:{sub:_zt,super:kzt},strike:Lzt,table:jzt,underline:Hzt,video:Bzt},Vzt='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let VU=0;function GU(e,t){e.setAttribute(t,`${e.getAttribute(t)!=="true"}`)}class B5{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),n.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),GU(this.label,"aria-expanded"),GU(this.options,"aria-hidden")}buildItem(t){const n=document.createElement("span");n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item");const r=t.getAttribute("value");return r&&n.setAttribute("data-value",r),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",()=>{this.selectItem(n,!0)}),n.addEventListener("keydown",i=>{switch(i.key){case"Enter":this.selectItem(n,!0),i.preventDefault();break;case"Escape":this.escape(),i.preventDefault();break}}),n}buildLabel(){const t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=Vzt,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${VU}`,VU+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach(n=>{const r=this.buildItem(n);t.appendChild(r),n.selected===!0&&this.selectItem(r)}),this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach(t=>{this.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");t!==r&&(r?.classList.remove("ql-selected"),t!=null&&(t.classList.add("ql-selected"),this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),n&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let t;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const n=t!=null&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}class Q0e extends B5{constructor(t,n){super(t),this.label.innerHTML=n,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(t){const n=super.buildItem(t);return n.style.backgroundColor=t.getAttribute("value")||"",n}selectItem(t,n){super.selectItem(t,n);const r=this.label.querySelector(".ql-color-label"),i=t&&t.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=i:r.style.fill=i)}}class ehe extends B5{constructor(t,n){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=n[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,n){super.selectItem(t,n);const r=t||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const Gzt=e=>{const{overflowY:t}=getComputedStyle(e,null);return t!=="visible"&&t!=="clip"};class the{constructor(t,n){this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,Gzt(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){const n=t.left+t.width/2-this.root.offsetWidth/2,r=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${n}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const i=this.boundsContainer.getBoundingClientRect(),o=this.root.getBoundingClientRect();let a=0;if(o.right>i.right&&(a=i.right-o.right,this.root.style.left=`${n+a}px`),o.left<i.left&&(a=i.left-o.left,this.root.style.left=`${n+a}px`),o.bottom>i.bottom){const s=o.bottom-o.top,c=t.bottom-t.top+s;this.root.style.top=`${r-c}px`,this.root.classList.add("ql-flip")}return a}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const qzt=[!1,"center","right","justify"],Wzt=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],Uzt=[!1,"serif","monospace"],Yzt=["1","2","3",!1],Xzt=["small",!1,"large","huge"];class np extends sf{constructor(t,n){super(t,n);const r=i=>{if(!document.body.contains(t.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(i.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(o=>{o.container.contains(i.target)||o.close()})};t.emitter.listenDOM("click",document.body,r)}addModule(t){const n=super.addModule(t);return t==="toolbar"&&this.extendToolbar(n),n}buildButtons(t,n){Array.from(t).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(o=>{if(o.startsWith("ql-")&&(o=o.slice(3),n[o]!=null))if(o==="direction")r.innerHTML=n[o][""]+n[o].rtl;else if(typeof n[o]=="string")r.innerHTML=n[o];else{const a=r.value||"";a!=null&&n[o][a]&&(r.innerHTML=n[o][a])}})})}buildPickers(t,n){this.pickers=Array.from(t).map(i=>{if(i.classList.contains("ql-align")&&(i.querySelector("option")==null&&Df(i,qzt),typeof n.align=="object"))return new ehe(i,n.align);if(i.classList.contains("ql-background")||i.classList.contains("ql-color")){const o=i.classList.contains("ql-background")?"background":"color";return i.querySelector("option")==null&&Df(i,Wzt,o==="background"?"#ffffff":"#000000"),new Q0e(i,n[o])}return i.querySelector("option")==null&&(i.classList.contains("ql-font")?Df(i,Uzt):i.classList.contains("ql-header")?Df(i,Yzt):i.classList.contains("ql-size")&&Df(i,Xzt)),new B5(i)});const r=()=>{this.pickers.forEach(i=>{i.update()})};this.quill.on(lt.events.EDITOR_CHANGE,r)}}np.DEFAULTS=Us({},sf.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let e=this.container.querySelector("input.ql-image[type=file]");e==null&&(e=document.createElement("input"),e.setAttribute("type","file"),e.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),e.classList.add("ql-image"),e.addEventListener("change",()=>{const t=this.quill.getSelection(!0);this.quill.uploader.upload(t,e.files),e.value=""}),this.container.appendChild(e)),e.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class nhe extends the{constructor(t,n){super(t,n),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",t=>{t.key==="Enter"?(this.save(),t.preventDefault()):t.key==="Escape"&&(this.cancel(),t.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;n!=null?this.textbox.value=n:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:n}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,lt.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,lt.sources.USER)),this.quill.root.scrollTop=n;break}case"video":t=Kzt(t);case"formula":{if(!t)break;const n=this.quill.getSelection(!0);if(n!=null){const r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,lt.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",lt.sources.USER),this.quill.setSelection(r+2,lt.sources.USER)}break}}this.textbox.value="",this.hide()}}function Kzt(e){let t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`:e}function Df(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t.forEach(r=>{const i=document.createElement("option");r===n?i.setAttribute("selected","selected"):i.setAttribute("value",String(r)),e.appendChild(i)})}const Zzt=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Jzt extends nhe{static TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join("");constructor(t,n){super(t,n),this.quill.on(lt.events.EDITOR_CHANGE,(r,i,o,a)=>{if(r===lt.events.SELECTION_CHANGE)if(i!=null&&i.length>0&&a===lt.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const s=this.quill.getLines(i.index,i.length);if(s.length===1){const c=this.quill.getBounds(i);c!=null&&this.position(c)}else{const c=s[s.length-1],u=this.quill.getIndex(c),d=Math.min(c.length()-1,i.index+i.length-u),f=this.quill.getBounds(new bu(u,d));f!=null&&this.position(f)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(lt.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const t=this.quill.getSelection();if(t!=null){const n=this.quill.getBounds(t);n!=null&&this.position(n)}},1)})}cancel(){this.show()}position(t){const n=super.position(t),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",n!==0&&(r.style.marginLeft=`${-1*n-r.offsetWidth/2}px`),n}}class rhe extends np{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=Zzt),super(t,n),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new Jzt(this.quill,this.options.bounds),t.container!=null&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),Xh),this.buildPickers(t.container.querySelectorAll("select"),Xh))}}rhe.DEFAULTS=Us({},np.DEFAULTS,{modules:{toolbar:{handlers:{link(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1,Ee.sources.USER)}}}}});const Qzt=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class e_t extends nhe{static TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const n=this.linkRange;this.restoreFocus(),this.quill.formatText(n,"link",!1,lt.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(lt.events.SELECTION_CHANGE,(t,n,r)=>{if(t!=null){if(t.length===0&&r===lt.sources.USER){const[i,o]=this.quill.scroll.descendant(iv,t.index);if(i!=null){this.linkRange=new bu(t.index-o,i.length());const a=iv.formats(i.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const s=this.quill.getBounds(this.linkRange);s!=null&&this.position(s);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}class ihe extends np{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=Qzt),super(t,n),this.quill.container.classList.add("ql-snow")}extendToolbar(t){t.container!=null&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),Xh),this.buildPickers(t.container.querySelectorAll("select"),Xh),this.tooltip=new e_t(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(n,r)=>{t.handlers.link.call(t,!r.format.link)}))}}ihe.DEFAULTS=Us({},np.DEFAULTS,{modules:{toolbar:{handlers:{link(e){if(e){const t=this.quill.getSelection();if(t==null||t.length===0)return;let n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&n.indexOf("mailto:")!==0&&(n=`mailto:${n}`);const{tooltip:r}=this.quill.theme;r.edit("link",n)}else this.quill.format("link",!1,Ee.sources.USER)}}}}});Ee.register({"attributors/attribute/direction":H0e,"attributors/class/align":k0e,"attributors/class/background":oDt,"attributors/class/color":iDt,"attributors/class/direction":B0e,"attributors/class/font":q0e,"attributors/class/size":U0e,"attributors/style/align":L0e,"attributors/style/background":jI,"attributors/style/color":LI,"attributors/style/direction":V0e,"attributors/style/font":W0e,"attributors/style/size":Y0e},!0);Ee.register({"formats/align":k0e,"formats/direction":B0e,"formats/indent":ZDt,"formats/background":jI,"formats/color":LI,"formats/font":q0e,"formats/size":U0e,"formats/blockquote":JDt,"formats/code-block":ci,"formats/header":QDt,"formats/list":tp,"formats/bold":qI,"formats/code":HI,"formats/italic":ezt,"formats/link":iv,"formats/script":tzt,"formats/strike":nzt,"formats/underline":rzt,"formats/formula":izt,"formats/image":ozt,"formats/video":azt,"modules/syntax":J0e,"modules/table":szt,"modules/toolbar":UI,"themes/bubble":rhe,"themes/snow":ihe,"ui/icons":Xh,"ui/picker":B5,"ui/icon-picker":ehe,"ui/color-picker":Q0e,"ui/tooltip":the},!0);const ohe=l.forwardRef(({readOnly:e,defaultValue:t,onTextChange:n,onSelectionChange:r,theme:i="snow"},o)=>{const a=l.useRef(null),s=l.useRef(t),c=l.useRef(n),u=l.useRef(r),d=l.useRef(null);return l.useLayoutEffect(()=>{c.current=n,u.current=r}),l.useEffect(()=>{o&&typeof o=="object"&&o.current&&o.current.enable(!e)},[o,e]),l.useEffect(()=>{const f=a.current;if(!f)return;const h=f.appendChild(f.ownerDocument.createElement("div")),p=new Ee(h,{theme:i});return d.current=p,o&&typeof o=="object"&&(o.current=p),s.current&&p.setContents(s.current),p.on(Ee.events.TEXT_CHANGE,()=>{const g=p.getSemanticHTML();c.current?.(g)}),p.on(Ee.events.SELECTION_CHANGE,(g,m,b)=>{u.current?.(g,m,b)}),()=>{d.current=null,o&&typeof o=="object"&&(o.current=null),f.innerHTML=""}},[o,i]),y.jsx("div",{ref:a})});ohe.displayName="QuillEditor";const t_t=({actions:e})=>{if(e.length===0)return null;if(e.length===1){const t=e[0];return y.jsx(ca,{variant:"outline",icon:t.icon,isPrefix:!0,label:t.label,onClick:t.onClick,disabled:t.disabled})}return y.jsxs(WR,{children:[y.jsx(UR,{asChild:!0,children:y.jsx(ca,{variant:"outline",size:"icon-lg",icon:y.jsx(qe.MoreVertical,{}),isIconOnly:!0})}),y.jsx(YR,{align:"end",children:e.map(t=>y.jsxs(xde,{onClick:t.onClick,variant:t.variant,disabled:t.disabled,children:[t.icon,t.label]},t.label))})]})},ahe=l.createContext(null);function V5(){const e=l.useContext(ahe);if(!e)throw new Error("DataTable components must be used within DataTable.Root");return e}function n_t({emptyMessage:e="No columns found.",allOptionLabel:t="All columns"}){const{table:n}=V5(),r=n.getAllColumns().filter(s=>s.getCanHide()&&!s.getIsPinned()),i=l.useMemo(()=>r.map(s=>{let c=s.id;return typeof s.columnDef.header=="string"&&(c=s.columnDef.header),s.columnDef.meta?.label&&(c=s.columnDef.meta.label),{value:s.id,label:c}}),[r]),o=l.useMemo(()=>r.filter(s=>s.getIsVisible()).map(s=>{const c=i.find(u=>u.value===s.id);return{value:s.id,label:c?.label??s.id}}),[r,i]),a=l.useCallback(s=>{const c=s.map(u=>u.value);r.forEach(u=>{u.toggleVisibility(c.includes(u.id))})},[r]);return y.jsx(TN,{multiple:!0,inputMode:"popup",items:i,value:o,onValueChange:a,emptyMessage:e,hasAllOption:!0,allOptionLabel:t,renderPopupTrigger:()=>y.jsx(Gn,{variant:"outline",size:"icon-lg",children:y.jsx(qe.Columns2,{})})})}function js(e,t){return typeof e=="function"?e(t):e}function Ui(e,t){return n=>{t.setState(r=>({...r,[e]:js(n,r[e])}))}}function G5(e){return e instanceof Function}function r_t(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function i_t(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a!=null&&a.length&&r(a)})};return r(e),n}function $t(e,t,n){let r=[],i;return o=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(o);if(!(s.length!==r.length||s.some((d,f)=>r[f]!==d)))return i;r=s;let u;if(n.key&&n.debug&&(u=Date.now()),i=t(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-a)*100)/100,f=Math.round((Date.now()-u)*100)/100,h=f/16,p=(g,m)=>{for(g=String(g);g.length<m;)g=" "+g;return g};console.info(`%c⏱ ${p(f,5)} /${p(d,5)} ms`,`
|
|
328
328
|
font-size: .6rem;
|
|
329
329
|
font-weight: bold;
|
|
330
|
-
color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n?.key)}return i}}function Mt(e,t,n,r){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function o_t(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:$t(()=>[e,n,t,o],(a,s,c,u)=>({table:a,column:s,row:c,cell:u,getValue:u.getValue,renderValue:u.renderValue}),Mt(e.options,"debugCells","cell.getContext"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function a_t(e,t,n,r){var i,o;const s={...e._getDefaultColumnDef(),...t},c=s.accessorKey;let u=(i=(o=s.id)!=null?o:c?typeof String.prototype.replaceAll=="function"?c.replaceAll(".","_"):c.replace(/\./g,"_"):void 0)!=null?i:typeof s.header=="string"?s.header:void 0,d;if(s.accessorFn?d=s.accessorFn:c&&(c.includes(".")?d=h=>{let p=h;for(const m of c.split(".")){var g;p=(g=p)==null?void 0:g[m],process.env.NODE_ENV!=="production"&&p===void 0&&console.warn(`"${m}" in deeply nested key "${c}" returned undefined.`)}return p}:d=h=>h[s.accessorKey]),!u)throw process.env.NODE_ENV!=="production"?new Error(s.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let f={id:`${String(u)}`,accessorFn:d,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:$t(()=>[!0],()=>{var h;return[f,...(h=f.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},Mt(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:$t(()=>[e._getOrderColumnsFn()],h=>{var p;if((p=f.columns)!=null&&p.length){let g=f.columns.flatMap(m=>m.getLeafColumns());return h(g)}return[f]},Mt(e.options,"debugColumns","column.getLeafColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(f,e);return f}const Hr="debugHeaders";function qU(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(s),a.push(c)};return s(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const l_t={createTable:e=>{e.getHeaderGroups=$t(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const s=(o=r?.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?o:[],c=(a=i?.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?a:[],u=n.filter(f=>!(r!=null&&r.includes(f.id))&&!(i!=null&&i.includes(f.id)));return Am(t,[...s,...u,...c],e)},Mt(e.options,Hr,"getHeaderGroups")),e.getCenterHeaderGroups=$t(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),Am(t,n,e,"center")),Mt(e.options,Hr,"getCenterHeaderGroups")),e.getLeftHeaderGroups=$t(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return Am(t,o,e,"left")},Mt(e.options,Hr,"getLeftHeaderGroups")),e.getRightHeaderGroups=$t(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return Am(t,o,e,"right")},Mt(e.options,Hr,"getRightHeaderGroups")),e.getFooterGroups=$t(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Mt(e.options,Hr,"getFooterGroups")),e.getLeftFooterGroups=$t(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Mt(e.options,Hr,"getLeftFooterGroups")),e.getCenterFooterGroups=$t(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Mt(e.options,Hr,"getCenterFooterGroups")),e.getRightFooterGroups=$t(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Mt(e.options,Hr,"getRightFooterGroups")),e.getFlatHeaders=$t(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Mt(e.options,Hr,"getFlatHeaders")),e.getLeftFlatHeaders=$t(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Mt(e.options,Hr,"getLeftFlatHeaders")),e.getCenterFlatHeaders=$t(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Mt(e.options,Hr,"getCenterFlatHeaders")),e.getRightFlatHeaders=$t(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Mt(e.options,Hr,"getRightFlatHeaders")),e.getCenterLeafHeaders=$t(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Mt(e.options,Hr,"getCenterLeafHeaders")),e.getLeftLeafHeaders=$t(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Mt(e.options,Hr,"getLeftLeafHeaders")),e.getRightLeafHeaders=$t(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Mt(e.options,Hr,"getRightLeafHeaders")),e.getLeafHeaders=$t(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,s,c,u;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(c=(u=r[0])==null?void 0:u.headers)!=null?c:[]].map(d=>d.getLeafHeaders()).flat()},Mt(e.options,Hr,"getLeafHeaders"))}};function Am(e,t,n,r){var i,o;let a=0;const s=function(h,p){p===void 0&&(p=1),a=Math.max(a,p),h.filter(g=>g.getIsVisible()).forEach(g=>{var m;(m=g.columns)!=null&&m.length&&s(g.columns,p+1)},0)};s(e);let c=[];const u=(h,p)=>{const g={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},m=[];h.forEach(b=>{const w=[...m].reverse()[0],x=b.column.depth===g.depth;let E,S=!1;if(x&&b.column.parent?E=b.column.parent:(E=b.column,S=!0),w&&w?.column===E)w.subHeaders.push(b);else{const $=qU(n,E,{id:[r,p,E.id,b?.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${m.filter(M=>M.column===E).length}`:void 0,depth:p,index:m.length});$.subHeaders.push(b),m.push($)}g.headers.push(b),b.headerGroup=g}),c.push(g),p>0&&u(m,p-1)},d=t.map((h,p)=>qU(n,h,{depth:a,index:p}));u(d,a-1),c.reverse();const f=h=>h.filter(g=>g.column.getIsVisible()).map(g=>{let m=0,b=0,w=[0];g.subHeaders&&g.subHeaders.length?(w=[],f(g.subHeaders).forEach(E=>{let{colSpan:S,rowSpan:$}=E;m+=S,w.push($)})):m=1;const x=Math.min(...w);return b=b+x,g.colSpan=m,g.rowSpan=b,{colSpan:m,rowSpan:b}});return f((i=(o=c[0])==null?void 0:o.headers)!=null?i:[]),c}const YI=(e,t,n,r,i,o,a)=>{let s={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(s._valuesCache.hasOwnProperty(c))return s._valuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return s._valuesCache[c]=u.accessorFn(s.original,r),s._valuesCache[c]},getUniqueValues:c=>{if(s._uniqueValuesCache.hasOwnProperty(c))return s._uniqueValuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(s._uniqueValuesCache[c]=u.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[c]):(s._uniqueValuesCache[c]=[s.getValue(c)],s._uniqueValuesCache[c])},renderValue:c=>{var u;return(u=s.getValue(c))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>i_t(s.subRows,c=>c.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let c=[],u=s;for(;;){const d=u.getParentRow();if(!d)break;c.push(d),u=d}return c.reverse()},getAllCells:$t(()=>[e.getAllLeafColumns()],c=>c.map(u=>o_t(e,s,u,u.id)),Mt(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:$t(()=>[s.getAllCells()],c=>c.reduce((u,d)=>(u[d.column.id]=d,u),{}),Mt(e.options,"debugRows","getAllCellsByColumnId"))};for(let c=0;c<e._features.length;c++){const u=e._features[c];u==null||u.createRow==null||u.createRow(s,e)}return s},s_t={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},lhe=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};lhe.autoRemove=e=>ga(e);const she=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};she.autoRemove=e=>ga(e);const che=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};che.autoRemove=e=>ga(e);const uhe=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};uhe.autoRemove=e=>ga(e);const dhe=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});dhe.autoRemove=e=>ga(e)||!(e!=null&&e.length);const fhe=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});fhe.autoRemove=e=>ga(e)||!(e!=null&&e.length);const hhe=(e,t,n)=>e.getValue(t)===n;hhe.autoRemove=e=>ga(e);const phe=(e,t,n)=>e.getValue(t)==n;phe.autoRemove=e=>ga(e);const XI=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};XI.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(o>a){const s=o;o=a,a=s}return[o,a]};XI.autoRemove=e=>ga(e)||ga(e[0])&&ga(e[1]);const Ul={includesString:lhe,includesStringSensitive:she,equalsString:che,arrIncludes:uhe,arrIncludesAll:dhe,arrIncludesSome:fhe,equals:hhe,weakEquals:phe,inNumberRange:XI};function ga(e){return e==null||e===""}const c_t={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ui("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?Ul.includesString:typeof r=="number"?Ul.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Ul.equals:Array.isArray(r)?Ul.arrIncludes:Ul.weakEquals},e.getFilterFn=()=>{var n,r;return G5(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Ul[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r?.find(d=>d.id===e.id),a=js(n,o?o.value:void 0);if(WU(i,a,e)){var s;return(s=r?.filter(d=>d.id!==e.id))!=null?s:[]}const c={id:e.id,value:a};if(o){var u;return(u=r?.map(d=>d.id===e.id?c:d))!=null?u:[]}return r!=null&&r.length?[...r,c]:[c]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=js(t,i))==null?void 0:o.filter(a=>{const s=n.find(c=>c.id===a.id);if(s){const c=s.getFilterFn();if(WU(c,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function WU(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const u_t=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),d_t=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},f_t=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}),r},h_t=(e,t,n)=>{let r,i;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}),[r,i]},p_t=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},m_t=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!r_t(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,a)=>o-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},g_t=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),v_t=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,b_t=(e,t)=>t.length,NE={sum:u_t,min:d_t,max:f_t,extent:h_t,mean:p_t,median:m_t,unique:g_t,uniqueCount:v_t,count:b_t},y_t={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Ui("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return NE.sum;if(Object.prototype.toString.call(r)==="[object Date]")return NE.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return G5(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:NE[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function w_t(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(a=>a.id===o)).filter(Boolean),...r]}const x_t={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ui("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=$t(n=>[v0(t,n)],n=>n.findIndex(r=>r.id===e.id),Mt(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=v0(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=v0(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=$t(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const a=[...t],s=[...i];for(;s.length&&a.length;){const c=a.shift(),u=s.findIndex(d=>d.id===c);u>-1&&o.push(s.splice(u,1)[0])}o=[...o,...s]}return w_t(o,n,r)},Mt(e.options,"debugTable","_getOrderColumnsFn"))}},OE=()=>({left:[],right:[]}),E_t={getInitialState:e=>({columnPinning:OE(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ui("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,a;if(n==="right"){var s,c;return{left:((s=i?.left)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((c=i?.right)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(n==="left"){var u,d;return{left:[...((u=i?.left)!=null?u:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((d=i?.right)!=null?d:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((o=i?.left)!=null?o:[]).filter(f=>!(r!=null&&r.includes(f))),right:((a=i?.right)!=null?a:[]).filter(f=>!(r!=null&&r.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=$t(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(a=>!o.includes(a.column.id))},Mt(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=$t(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Mt(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=$t(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Mt(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?OE():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:OE())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=$t(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Mt(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=$t(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Mt(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=$t(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Mt(e.options,"debugColumns","getCenterLeafColumns"))}};function C_t(e){return e||(typeof document<"u"?document:null)}const Nm={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},RE=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),S_t={getDefaultColumnDef:()=>Nm,getInitialState:e=>({columnSizing:{},columnSizingInfo:RE(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ui("columnSizing",e),onColumnSizingInfoChange:Ui("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Nm.minSize,(r=o??e.columnDef.size)!=null?r:Nm.size),(i=e.columnDef.maxSize)!=null?i:Nm.maxSize)},e.getStart=$t(n=>[n,v0(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Mt(t.options,"debugColumns","getStart")),e.getAfter=$t(n=>[n,v0(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Mt(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r?.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),IE(o)&&o.touches&&o.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[r.id,r.getSize()]],c=IE(o)?Math.round(o.touches[0].clientX):o.clientX,u={},d=(w,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(E=>{var S,$;const M=t.options.columnResizeDirection==="rtl"?-1:1,A=(x-((S=E?.startOffset)!=null?S:0))*M,R=Math.max(A/(($=E?.startSize)!=null?$:0),-.999999);return E.columnSizingStart.forEach(T=>{let[k,N]=T;u[k]=Math.round(Math.max(N+N*R,0)*100)/100}),{...E,deltaOffset:A,deltaPercentage:R}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(E=>({...E,...u})))},f=w=>d("move",w),h=w=>{d("end",w),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=C_t(n),g={moveHandler:w=>f(w.clientX),upHandler:w=>{p?.removeEventListener("mousemove",g.moveHandler),p?.removeEventListener("mouseup",g.upHandler),h(w.clientX)}},m={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),f(w.touches[0].clientX),!1),upHandler:w=>{var x;p?.removeEventListener("touchmove",m.moveHandler),p?.removeEventListener("touchend",m.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),h((x=w.touches[0])==null?void 0:x.clientX)}},b=$_t()?{passive:!1}:!1;IE(o)?(p?.addEventListener("touchmove",m.moveHandler,b),p?.addEventListener("touchend",m.upHandler,b)):(p?.addEventListener("mousemove",g.moveHandler,b),p?.addEventListener("mouseup",g.upHandler,b)),t.setColumnSizingInfo(w=>({...w,startOffset:c,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?RE():(n=e.initialState.columnSizingInfo)!=null?n:RE())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let Om=null;function $_t(){if(typeof Om=="boolean")return Om;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Om=e,Om}function IE(e){return e.type==="touchstart"}const M_t={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ui("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=$t(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Mt(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=$t(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Mt(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>$t(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Mt(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function v0(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const A_t={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},N_t={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ui("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Ul.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return G5(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Ul[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},O_t={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ui("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const a=o.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(i=n)!=null?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){const{[e.id]:s,...c}=a;return c}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},lM=0,sM=10,PE=()=>({pageIndex:lM,pageSize:sM}),R_t={getInitialState:e=>({...e,pagination:{...PE(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ui("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>js(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?PE():(i=e.initialState.pagination)!=null?i:PE())},e.setPageIndex=r=>{e.setPagination(i=>{let o=js(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,a)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?lM:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:lM)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?sM:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:sM)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,js(r,i.pageSize)),a=i.pageSize*i.pageIndex,s=Math.floor(a/o);return{...i,pageIndex:s,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let a=js(r,(o=e.options.pageCount)!=null?o:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=$t(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,a)=>a)),i},Mt(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},FE=()=>({top:[],bottom:[]}),I_t={getInitialState:e=>({rowPinning:FE(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ui("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(c=>{let{id:u}=c;return u}):[],a=i?e.getParentRows().map(c=>{let{id:u}=c;return u}):[],s=new Set([...a,e.id,...o]);t.setRowPinning(c=>{var u,d;if(n==="bottom"){var f,h;return{top:((f=c?.top)!=null?f:[]).filter(m=>!(s!=null&&s.has(m))),bottom:[...((h=c?.bottom)!=null?h:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)]}}if(n==="top"){var p,g;return{top:[...((p=c?.top)!=null?p:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)],bottom:((g=c?.bottom)!=null?g:[]).filter(m=>!(s!=null&&s.has(m)))}}return{top:((u=c?.top)!=null?u:[]).filter(m=>!(s!=null&&s.has(m))),bottom:((d=c?.bottom)!=null?d:[]).filter(m=>!(s!=null&&s.has(m)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=o?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?FE():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:FE())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=$t(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Mt(e.options,"debugRows","getTopRows")),e.getBottomRows=$t(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Mt(e.options,"debugRows","getBottomRows")),e.getCenterRows=$t(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Mt(e.options,"debugRows","getCenterRows"))}},P_t={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ui("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{cM(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=$t(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?TE(e,n):{rows:[],flatRows:[],rowsById:{}},Mt(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=$t(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?TE(e,n):{rows:[],flatRows:[],rowsById:{}},Mt(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=$t(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?TE(e,n):{rows:[],flatRows:[],rowsById:{}},Mt(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const s={...o};return cM(s,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return KI(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return uM(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return uM(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},cM=(e,t,n,r,i)=>{var o;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=a.subRows)!=null&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>cM(e,s.id,n,r,i))};function TE(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(a,s){return a.map(c=>{var u;const d=KI(c,n);if(d&&(r.push(c),i[c.id]=c),(u=c.subRows)!=null&&u.length&&(c={...c,subRows:o(c.subRows)}),d)return c}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function KI(e,t){var n;return(n=t[e.id])!=null?n:!1}function uM(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(a=>{if(!(o&&!i)&&(a.getCanSelect()&&(KI(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const s=uM(a,t);s==="all"?o=!0:(s==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const dM=/([0-9]+)/gm,F_t=(e,t,n)=>mhe(oc(e.getValue(n)).toLowerCase(),oc(t.getValue(n)).toLowerCase()),T_t=(e,t,n)=>mhe(oc(e.getValue(n)),oc(t.getValue(n))),D_t=(e,t,n)=>ZI(oc(e.getValue(n)).toLowerCase(),oc(t.getValue(n)).toLowerCase()),z_t=(e,t,n)=>ZI(oc(e.getValue(n)),oc(t.getValue(n))),__t=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},k_t=(e,t,n)=>ZI(e.getValue(n),t.getValue(n));function ZI(e,t){return e===t?0:e>t?1:-1}function oc(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function mhe(e,t){const n=e.split(dM).filter(Boolean),r=t.split(dM).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),a=parseInt(i,10),s=parseInt(o,10),c=[a,s].sort();if(isNaN(c[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(c[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const zf={alphanumeric:F_t,alphanumericCaseSensitive:T_t,text:D_t,textCaseSensitive:z_t,datetime:__t,basic:k_t},L_t={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ui("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return zf.datetime;if(typeof o=="string"&&(r=!0,o.split(dM).length>1))return zf.alphanumeric}return r?zf.text:zf.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return G5(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:zf[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a?.find(p=>p.id===e.id),c=a?.findIndex(p=>p.id===e.id);let u=[],d,f=o?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?d="toggle":d="add":a!=null&&a.length&&c!==a.length-1?d="replace":s?d="toggle":d="replace",d==="toggle"&&(o||i||(d="remove")),d==="add"){var h;u=[...a,{id:e.id,desc:f}],u.splice(0,u.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else d==="toggle"?u=a.map(p=>p.id===e.id?{...p,desc:f}:p):d==="remove"?u=a.filter(p=>p.id!==e.id):u=[{id:e.id,desc:f}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},j_t=[l_t,M_t,x_t,E_t,s_t,c_t,A_t,N_t,L_t,y_t,O_t,R_t,I_t,P_t,S_t];function H_t(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...j_t,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((h,p)=>Object.assign(h,p.getDefaultOptions==null?void 0:p.getDefaultOptions(i)),{}),a=h=>i.options.mergeOptions?i.options.mergeOptions(o,h):{...o,...h};let c={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(h=>{var p;c=(p=h.getInitialState==null?void 0:h.getInitialState(c))!=null?p:c});const u=[];let d=!1;const f={_features:r,options:{...o,...e},initialState:c,_queue:h=>{u.push(h),d||(d=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();d=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{i.setState(i.initialState)},setOptions:h=>{const p=js(h,i.options);i.options=a(p)},getState:()=>i.options.state,setState:h=>{i.options.onStateChange==null||i.options.onStateChange(h)},_getRowId:(h,p,g)=>{var m;return(m=i.options.getRowId==null?void 0:i.options.getRowId(h,p,g))!=null?m:`${g?[g.id,p].join("."):p}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(h,p)=>{let g=(p?i.getPrePaginationRowModel():i.getRowModel()).rowsById[h];if(!g&&(g=i.getCoreRowModel().rowsById[h],!g))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${h}`):new Error;return g},_getDefaultColumnDef:$t(()=>[i.options.defaultColumn],h=>{var p;return h=(p=h)!=null?p:{},{header:g=>{const m=g.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:g=>{var m,b;return(m=(b=g.renderValue())==null||b.toString==null?void 0:b.toString())!=null?m:null},...i._features.reduce((g,m)=>Object.assign(g,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...h}},Mt(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>i.options.columns,getAllColumns:$t(()=>[i._getColumnDefs()],h=>{const p=function(g,m,b){return b===void 0&&(b=0),g.map(w=>{const x=a_t(i,w,b,m),E=w;return x.columns=E.columns?p(E.columns,x,b+1):[],x})};return p(h)},Mt(e,"debugColumns","getAllColumns")),getAllFlatColumns:$t(()=>[i.getAllColumns()],h=>h.flatMap(p=>p.getFlatColumns()),Mt(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:$t(()=>[i.getAllFlatColumns()],h=>h.reduce((p,g)=>(p[g.id]=g,p),{}),Mt(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:$t(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(h,p)=>{let g=h.flatMap(m=>m.getLeafColumns());return p(g)},Mt(e,"debugColumns","getAllLeafColumns")),getColumn:h=>{const p=i._getAllFlatColumnsById()[h];return process.env.NODE_ENV!=="production"&&!p&&console.error(`[Table] Column with id '${h}' does not exist.`),p}};Object.assign(i,f);for(let h=0;h<i._features.length;h++){const p=i._features[h];p==null||p.createTable==null||p.createTable(i)}return i}function B_t(){return e=>$t(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,a){o===void 0&&(o=0);const s=[];for(let u=0;u<i.length;u++){const d=YI(e,e._getRowId(i[u],u,a),i[u],u,o,void 0,a?.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,s.push(d),e.options.getSubRows){var c;d.originalSubRows=e.options.getSubRows(i[u],u),(c=d.originalSubRows)!=null&&c.length&&(d.subRows=r(d.originalSubRows,o+1,d))}}return s};return n.rows=r(t),n},Mt(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function V_t(){return e=>$t(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(t,n,r)=>!n.rows.length||t!==!0&&!Object.keys(t??{}).length||!r?n:ghe(n),Mt(e.options,"debugTable","getExpandedRowModel"))}function ghe(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function G_t(e,t,n){return n.options.filterFromLeafRows?q_t(e,t,n):W_t(e,t,n)}function q_t(e,t,n){var r;const i=[],o={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(c,u){u===void 0&&(u=0);const d=[];for(let h=0;h<c.length;h++){var f;let p=c[h];const g=YI(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(g.columnFilters=p.columnFilters,(f=p.subRows)!=null&&f.length&&u<a){if(g.subRows=s(p.subRows,u+1),p=g,t(p)&&!g.subRows.length){d.push(p),o[p.id]=p,i.push(p);continue}if(t(p)||g.subRows.length){d.push(p),o[p.id]=p,i.push(p);continue}}else p=g,t(p)&&(d.push(p),o[p.id]=p,i.push(p))}return d};return{rows:s(e),flatRows:i,rowsById:o}}function W_t(e,t,n){var r;const i=[],o={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(c,u){u===void 0&&(u=0);const d=[];for(let h=0;h<c.length;h++){let p=c[h];if(t(p)){var f;if((f=p.subRows)!=null&&f.length&&u<a){const m=YI(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);m.subRows=s(p.subRows,u+1),p=m}d.push(p),i.push(p),o[p.id]=p}}return d};return{rows:s(e),flatRows:i,rowsById:o}}function U_t(){return e=>$t(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let h=0;h<t.flatRows.length;h++)t.flatRows[h].columnFilters={},t.flatRows[h].columnFiltersMeta={};return t}const i=[],o=[];(n??[]).forEach(h=>{var p;const g=e.getColumn(h.id);if(!g)return;const m=g.getFilterFn();if(!m){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${g.id}.`);return}i.push({id:h.id,filterFn:m,resolvedValue:(p=m.resolveFilterValue==null?void 0:m.resolveFilterValue(h.value))!=null?p:h.value})});const a=(n??[]).map(h=>h.id),s=e.getGlobalFilterFn(),c=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());r&&s&&c.length&&(a.push("__global__"),c.forEach(h=>{var p;o.push({id:h.id,filterFn:s,resolvedValue:(p=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?p:r})}));let u,d;for(let h=0;h<t.flatRows.length;h++){const p=t.flatRows[h];if(p.columnFilters={},i.length)for(let g=0;g<i.length;g++){u=i[g];const m=u.id;p.columnFilters[m]=u.filterFn(p,m,u.resolvedValue,b=>{p.columnFiltersMeta[m]=b})}if(o.length){for(let g=0;g<o.length;g++){d=o[g];const m=d.id;if(d.filterFn(p,m,d.resolvedValue,b=>{p.columnFiltersMeta[m]=b})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const f=h=>{for(let p=0;p<a.length;p++)if(h.columnFilters[a[p]]===!1)return!1;return!0};return G_t(t.rows,f,e)},Mt(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function Y_t(e){return t=>$t(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:o}=n;let{rows:a,flatRows:s,rowsById:c}=r;const u=i*o,d=u+i;a=a.slice(u,d);let f;t.options.paginateExpandedRows?f={rows:a,flatRows:s,rowsById:c}:f=ghe({rows:a,flatRows:s,rowsById:c}),f.flatRows=[];const h=p=>{f.flatRows.push(p),p.subRows.length&&p.subRows.forEach(h)};return f.rows.forEach(h),f},Mt(t.options,"debugTable","getPaginationRowModel"))}function X_t(){return e=>$t(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],o=r.filter(c=>{var u;return(u=e.getColumn(c.id))==null?void 0:u.getCanSort()}),a={};o.forEach(c=>{const u=e.getColumn(c.id);u&&(a[c.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const s=c=>{const u=c.map(d=>({...d}));return u.sort((d,f)=>{for(let p=0;p<o.length;p+=1){var h;const g=o[p],m=a[g.id],b=m.sortUndefined,w=(h=g?.desc)!=null?h:!1;let x=0;if(b){const E=d.getValue(g.id),S=f.getValue(g.id),$=E===void 0,M=S===void 0;if($||M){if(b==="first")return $?-1:1;if(b==="last")return $?1:-1;x=$&&M?0:$?b:-b}}if(x===0&&(x=m.sortingFn(d,f,g.id)),x!==0)return w&&(x*=-1),m.invertSorting&&(x*=-1),x}return d.index-f.index}),u.forEach(d=>{var f;i.push(d),(f=d.subRows)!=null&&f.length&&(d.subRows=s(d.subRows))}),u};return{rows:s(n.rows),flatRows:i,rowsById:n.rowsById}},Mt(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function UU(e,t){return e?K_t(e)?v.createElement(e,t):e:null}function K_t(e){return Z_t(e)||typeof e=="function"||J_t(e)}function Z_t(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function J_t(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Q_t(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=v.useState(()=>({current:H_t(t)})),[r,i]=v.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}function YU(e){const t=e.getIsPinned();if(!t)return{className:"",style:{}};const n=t==="left",r=t==="right";return{className:te("ui:sticky ui:z-10 ui:bg-background",n&&"ui:left-0",r&&"ui:right-0",n&&"ui:after:absolute ui:after:right-0 ui:after:top-0 ui:after:h-full ui:after:w-px ui:after:bg-border",r&&"ui:before:absolute ui:before:left-0 ui:before:top-0 ui:before:h-full ui:before:w-px ui:before:bg-border"),style:{left:n?`${e.getStart("left")}px`:void 0,right:r?`${e.getAfter("right")}px`:void 0}}}function ekt({className:e,loadingContent:t=y.jsxs("div",{className:"ui:flex ui:items-center ui:justify-center ui:gap-2",children:[y.jsx(qe.Loader2,{className:"ui:h-4 ui:w-4 ui:animate-spin"}),y.jsx("span",{children:"Loading..."})]}),emptyContent:n="No results.",renderRowSubComponent:r}){const{table:i,isLoading:o}=V5(),a=i.getAllColumns().length;return y.jsx("div",{className:te("ui:overflow-hidden ui:rounded-md ui:border ui:bg-white ui:rounded-b-none ui:p-3 ui:pb-0",e),children:y.jsxs(Qfe,{children:[y.jsx(e0e,{children:i.getHeaderGroups().map(s=>y.jsx(Qf,{children:s.headers.map(c=>{const{className:u,style:d}=YU(c.column);return y.jsx(n0e,{className:u,style:d,children:c.isPlaceholder?null:UU(c.column.columnDef.header,c.getContext())},c.id)})},s.id))}),y.jsx(t0e,{children:o?y.jsx(Qf,{children:y.jsx(i3,{colSpan:a,className:"ui:h-24 ui:text-center",children:t})}):i.getRowModel().rows?.length?i.getRowModel().rows.map(s=>y.jsxs(l.Fragment,{children:[y.jsx(Qf,{"data-state":s.getIsSelected()&&"selected",className:te(s.depth>0&&"ui:bg-muted/50"),children:s.getVisibleCells().map(c=>{const{className:u,style:d}=YU(c.column);return y.jsx(i3,{className:u,style:d,children:UU(c.column.columnDef.cell,c.getContext())},c.id)})}),s.getIsExpanded()&&r?.({row:s})]},s.id)):y.jsx(Qf,{children:y.jsx(i3,{colSpan:a,className:"ui:h-24 ui:text-center",children:n})})})]})})}const tkt=[{value:"10",label:"10"},{value:"20",label:"20"},{value:"50",label:"50"},{value:"100",label:"100"}],nkt=({showSelectedCount:e=!0,showPaginationInfo:t=!0,className:n,showPerPageLabel:r="Show Per Page",selectPlaceholder:i="Select",selectedCountText:o=(s,c)=>`${s} of ${c} row(s) selected.`,paginationInfoText:a=(s,c,u)=>`${s} - ${c} of ${u}`})=>{const{table:s,totalCount:c}=V5(),u=c??s.getFilteredRowModel().rows.length,{pageIndex:d,pageSize:f}=s.getState().pagination,h=s.getPageCount(),p=d+1,g=u>0?d*f+1:0,m=Math.min((d+1)*f,u),[b,w]=l.useState(null),x=b?.sourcePage===p?b.value:String(p),E=R=>{s.setPageSize(Number(R)),s.setPageIndex(0)},S=()=>{w({sourcePage:p,value:String(p)})},$=R=>{(R===""||/^\d+$/.test(R))&&w({sourcePage:p,value:R})},M=()=>{const R=Number.parseInt(x,10);if(!x||Number.isNaN(R)){w(null);return}const T=Math.max(h,1),k=Math.max(1,Math.min(R,T));s.setPageIndex(k-1),w(null)},A=R=>{R.key==="Enter"&&R.currentTarget.blur()};return y.jsxs("div",{className:te("ui:flex ui:items-center ui:gap-4 ui:py-4 ui:bg-white ui:rounded-b-lg ui:px-3 ui:border-border ui:border ui:border-t-0",e?"ui:justify-end":"ui:justify-between",n),children:[e&&y.jsx("div",{className:"ui:text-muted-foreground ui:flex-1 ui:text-sm",children:o(s.getFilteredSelectedRowModel().rows.length,s.getFilteredRowModel().rows.length)}),y.jsx(JR,{options:tkt,value:String(f),onChange:E,label:r,placeholder:i,triggerClassName:"ui:w-20",labelClassName:"ui:mb-0 ui:font-normal",containerClassName:"ui:flex ui:items-center ui:gap-2",isPortal:!0}),y.jsxs("div",{className:"ui:flex ui:items-center ui:gap-4",children:[t&&u>0&&y.jsx("div",{className:"ui:text-muted-foreground ui:text-sm",children:a(g,m,u)}),y.jsxs("div",{className:"ui:flex ui:items-center ui:gap-1",children:[y.jsx(ca,{variant:"ghost",icon:y.jsx(qe.ChevronsLeft,{}),isIconOnly:!0,size:"icon-lg","aria-label":"Go to first page",onClick:()=>s.firstPage(),disabled:!s.getCanPreviousPage()}),y.jsx(ca,{variant:"ghost",icon:y.jsx(qe.ChevronLeft,{}),isIconOnly:!0,size:"icon-lg","aria-label":"Go to previous page",onClick:()=>s.previousPage(),disabled:!s.getCanPreviousPage()}),y.jsxs("div",{className:"ui:flex ui:items-center ui:gap-1 ui:text-sm",children:[y.jsx(gs,{type:"text",inputMode:"numeric",value:x,onChange:R=>$(R.target.value),onFocus:S,onBlur:M,onKeyDown:A,"aria-label":"Current page",className:"ui:h-8 ui:w-10 ui:px-1 ui:text-center ui:shadow-none"}),y.jsxs("span",{children:[" / ",h]})]}),y.jsx(ca,{variant:"ghost",icon:y.jsx(qe.ChevronRight,{}),isIconOnly:!0,size:"icon-lg","aria-label":"Go to next page",onClick:()=>s.nextPage(),disabled:!s.getCanNextPage()}),y.jsx(ca,{variant:"ghost",icon:y.jsx(qe.ChevronsRight,{}),isIconOnly:!0,size:"icon-lg","aria-label":"Go to last page",onClick:()=>s.lastPage(),disabled:!s.getCanNextPage()})]})]})]})};function rkt({table:e,children:t,isLoading:n=!1,search:r="",onSearchChange:i=()=>{},totalCount:o,className:a}){const s={table:e,isLoading:n,search:r,onSearchChange:i,totalCount:o};return y.jsx(ahe.Provider,{value:s,children:y.jsx("div",{className:te("ui:w-full",a),children:t})})}function ikt({placeholder:e="Search...",filterColumn:t,className:n,label:r}){const{table:i,search:o,onSearchChange:a}=V5(),s=u=>{const d=String(u);t?i.getColumn(t)?.setFilterValue(d):a(d)},c=t?i.getColumn(t)?.getFilterValue()??"":o;return y.jsx(lde,{placeholder:e,value:c,onChange:s,className:te(n),label:r??"",name:"debounced-search-label"})}function okt({children:e,className:t}){return y.jsx("div",{className:te("ui:flex ui:justify-between ui:gap-2 ui:items-center ui:p-3 ui:bg-white ui:rounded-lg ui:border ui:mb-2.5",t),children:e})}const akt={Root:rkt,Toolbar:okt,Search:ikt,ColumnVisibility:n_t,Content:ekt,Pagination:nkt,Actions:t_t},vhe=l.createContext(null);function bhe(){const e=l.useContext(vhe);if(!e)throw new Error("useDatePreset must be used within a DatePresetProvider");return e}const q5={TODAY:{key:"TODAY",label:"Today",getRange:()=>({from:new Date,to:new Date})},THIS_WEEK:{key:"THIS_WEEK",label:"This Week",getRange:()=>({from:Xc(new Date,{weekStartsOn:1}),to:new Date})},LAST_7_DAYS:{key:"LAST_7_DAYS",label:"Last 7 Days",getRange:()=>({from:oP(new Date,6),to:new Date})},THIS_MONTH:{key:"THIS_MONTH",label:"This Month",getRange:()=>({from:_E(new Date),to:new Date})},LAST_MONTH:{key:"LAST_MONTH",label:"Last Month",getRange:()=>({from:_E(aP(new Date)),to:wY(aP(new Date))})},LAST_30_DAYS:{key:"LAST_30_DAYS",label:"Last 30 Days",getRange:()=>({from:oP(new Date,29),to:new Date})}},fM="LAST_7_DAYS";function yhe(e,t=q5){for(const n of Object.values(t)){const r=n.getRange();if(zE(e.from,r.from)&&zE(e.to,r.to))return n.key}return null}function lkt({presets:e=q5,className:t,confirmLabel:n="Apply",placeholder:r="Pick a date range",disabledCondition:i,dateLocale:o}){const{range:a,preset:s,setRange:c}=bhe(),u=f=>{const h=f.getRange();c(h,f.key)},d=f=>{if(f.from&&f.to){const h={from:f.from,to:f.to},p=yhe(h,e);c(h,p??null)}};return y.jsxs("div",{className:te("ui:flex ui:flex-wrap ui:gap-4 ui:w-full",t),children:[y.jsx(nte,{className:"ui:max-w-full ui:py-1!",children:y.jsx("div",{className:"ui:overflow-x-auto",children:y.jsx("div",{className:"ui:flex ui:gap-2",children:Object.values(e).map(f=>y.jsx(ca,{variant:"ghost",className:te("ui:font-normal",{"ui:bg-segmentify-200 ui:text-segmentify-600":s===f.key}),onClick:()=>u(f),label:f.label},f.key))})})}),y.jsx(ade,{start:a.from,end:a.to,className:"ui:rounded-lg ui:shadow-sm",placeholder:r,confirmLabel:n,onConfirm:d,disabledCondition:i,dateLocale:o})]})}function skt({children:e,initialRange:t,initialPreset:n=fM,onRangeChange:r}){const i=t??q5[n??fM]?.getRange(),[o,a]=l.useState(i),[s,c]=l.useState(n),d={range:o,preset:s,setRange:(f,h=null)=>{a(f),c(h),r?.(f,h)}};return y.jsx(vhe.Provider,{value:d,children:e})}function ckt({queryKey:e,columns:t,fetcher:n,initialPageSize:r=10,initialSorting:i=[],initialColumnVisibility:o={},initialColumnPinning:a={left:[],right:[]},manualPagination:s=!1,manualSorting:c=!1,manualFiltering:u=!1,getSubRows:d,getRowCanExpand:f,queryOptions:h,meta:p}){const[g,m]=l.useState(i),[b,w]=l.useState([]),[x,E]=l.useState(o),[S,$]=l.useState({}),[M,A]=l.useState(a),[R,T]=l.useState({}),[k,N]=l.useState(""),[P,O]=l.useState({pageIndex:0,pageSize:r}),[z,L]=l.useState(e);e!==z&&(L(e),O(ee=>ee.pageIndex===0?ee:{...ee,pageIndex:0}));const D={pageNo:P.pageIndex+1,pageSize:P.pageSize,sortBy:g,reversed:g.length>0?g[0].desc:!1,columnFilters:b,search:k},{data:_,isLoading:H,isFetching:W,isRefetching:F,isSuccess:K,isError:j,error:U,refetch:Y}=whe.useQuery({queryKey:[e,D],queryFn:()=>n(D),placeholderData:ee=>ee,...h}),G=_?.data??[],Q=_?.totalCount??G.length;l.useEffect(()=>{if(!s||Q<=0)return;const ee=Math.max(0,Math.ceil(Q/P.pageSize)-1);P.pageIndex>ee&&O(ce=>({...ce,pageIndex:ee}))},[s,P.pageIndex,P.pageSize,Q]);const X=l.useCallback(ee=>{N(ee),O(ce=>({...ce,pageIndex:0}))},[]),Z=l.useCallback(ee=>{w(ee),O(ce=>({...ce,pageIndex:0}))},[]);return{table:Q_t({data:G,columns:t,pageCount:s?Math.ceil(Q/P.pageSize):void 0,state:{sorting:g,columnFilters:b,columnVisibility:x,rowSelection:S,columnPinning:M,expanded:R,pagination:P,globalFilter:k},onSortingChange:m,onColumnFiltersChange:Z,onColumnVisibilityChange:E,onRowSelectionChange:$,onColumnPinningChange:A,onExpandedChange:T,onPaginationChange:O,onGlobalFilterChange:X,getSubRows:d,getRowCanExpand:f,getCoreRowModel:B_t(),getPaginationRowModel:Y_t(),getSortedRowModel:c?void 0:X_t(),getFilteredRowModel:u?void 0:U_t(),getExpandedRowModel:V_t(),manualPagination:s,manualSorting:c,manualFiltering:u,meta:p}),data:G,isLoading:H,isFetching:W,isRefetching:F,isSuccess:K,isError:j,error:U,totalCount:Q,refetch:Y,search:k,setSearch:X,sortBy:g,pagination:P,columnFilters:b,columnVisibility:x,rowSelection:S,columnPinning:M,expanded:R}}Object.defineProperty(exports,"toast",{enumerable:!0,get:()=>hM.toast});exports.Accordion=jY;exports.AccordionContent=VY;exports.AccordionItem=HY;exports.AccordionTrigger=BY;exports.AlertDialog=w7e;exports.AlertDialogAction=N7e;exports.AlertDialogCancel=O7e;exports.AlertDialogContent=E7e;exports.AlertDialogDescription=M7e;exports.AlertDialogFooter=S7e;exports.AlertDialogHeader=C7e;exports.AlertDialogMedia=A7e;exports.AlertDialogOverlay=pQ;exports.AlertDialogPortal=hQ;exports.AlertDialogTitle=$7e;exports.AlertDialogTrigger=x7e;exports.AspectRatio=F7e;exports.AsyncCombobox=g2t;exports.Avatar=B7e;exports.AvatarFallback=G7e;exports.AvatarImage=V7e;exports.Badge=EQ;exports.BaseButton=ca;exports.Breadcrumb=W7e;exports.BreadcrumbEllipsis=J7e;exports.BreadcrumbItem=Y7e;exports.BreadcrumbLink=X7e;exports.BreadcrumbList=U7e;exports.BreadcrumbPage=K7e;exports.BreadcrumbSeparator=Z7e;exports.Button=Gn;exports.Calendar=gA;exports.CalendarDayButton=BQ;exports.CampaignTitle=N8e;exports.Card=VQ;exports.CardAction=R8e;exports.CardContent=WQ;exports.CardDescription=qQ;exports.CardFooter=I8e;exports.CardHeader=GQ;exports.CardTitle=O8e;exports.Carousel=f9e;exports.CarouselContent=h9e;exports.CarouselItem=p9e;exports.CarouselNext=g9e;exports.CarouselPrevious=m9e;exports.Case=Bn;exports.ChartContainer=ZEe;exports.ChartLegend=eCe;exports.ChartLegendContent=tCe;exports.ChartStyle=Hee;exports.ChartTooltip=JEe;exports.ChartTooltipContent=QEe;exports.Checkbox=Bee;exports.CheckboxField=ite;exports.Collapsible=nCe;exports.CollapsibleContent=iCe;exports.CollapsibleTrigger=rCe;exports.ComboboxField=TN;exports.Command=Jv;exports.CommandDialog=ICe;exports.CommandEmpty=UA;exports.CommandGroup=YA;exports.CommandInput=qA;exports.CommandItem=XA;exports.CommandList=WA;exports.CommandSeparator=PCe;exports.CommandShortcut=FCe;exports.ComponentSwitch=Ur;exports.ContentWrapper=nte;exports.CreatableActionIcons=TCe;exports.DATE_PRESETS=q5;exports.DEFAULT_PRESET_KEY=fM;exports.DataTable=akt;exports.DatePreset=lkt;exports.DatePresetProvider=skt;exports.DateRangePicker=ade;exports.DebouncedInput=lde;exports.Default=eu;exports.DetailedImageModal=y2t;exports.Dialog=HA;exports.DialogClose=OCe;exports.DialogContent=BA;exports.DialogDescription=tte;exports.DialogFooter=RCe;exports.DialogHeader=VA;exports.DialogOverlay=ete;exports.DialogPortal=Qee;exports.DialogTitle=GA;exports.DialogTrigger=Jee;exports.Drawer=Y2t;exports.DrawerClose=K2t;exports.DrawerContent=Z2t;exports.DrawerDescription=tpt;exports.DrawerFooter=Q2t;exports.DrawerHeader=J2t;exports.DrawerOverlay=wde;exports.DrawerPortal=yde;exports.DrawerTitle=ept;exports.DrawerTrigger=X2t;exports.DropdownMenu=WR;exports.DropdownMenuCheckboxItem=h$;exports.DropdownMenuContent=YR;exports.DropdownMenuGroup=rpt;exports.DropdownMenuItem=xde;exports.DropdownMenuLabel=apt;exports.DropdownMenuPortal=npt;exports.DropdownMenuRadioGroup=ipt;exports.DropdownMenuRadioItem=opt;exports.DropdownMenuSeparator=lpt;exports.DropdownMenuShortcut=spt;exports.DropdownMenuSub=cpt;exports.DropdownMenuSubContent=dpt;exports.DropdownMenuSubTrigger=upt;exports.DropdownMenuTrigger=UR;exports.Empty=fpt;exports.EmptyContent=bpt;exports.EmptyDescription=vpt;exports.EmptyHeader=hpt;exports.EmptyMedia=mpt;exports.EmptyTitle=gpt;exports.ErrorMessage=Ede;exports.FieldDescription=Qv;exports.FormCheckbox=Zm;exports.FormCombobox=ypt;exports.FormControl=wi;exports.FormDatePicker=Mpt;exports.FormDescription=Ni;exports.FormField=Zr;exports.FormFileUpload=Fde;exports.FormInput=Rpt;exports.FormItem=_r;exports.FormLabel=yi;exports.FormMessage=Jr;exports.FormPassword=Ipt;exports.FormPhoneInput=_St;exports.FormRadio=Ppt;exports.FormSelect=Spt;exports.FormSlider=Fpt;exports.FormSortableList=C3t;exports.FormSwitch=S3t;exports.FormTextarea=$3t;exports.FormTimePicker=$pt;exports.FormattedDate=b2t;exports.HoverCard=kSt;exports.HoverCardContent=jSt;exports.HoverCardTrigger=LSt;exports.Icon=HSt;exports.Input=gs;exports.InputField=y5;exports.InputOTP=n$t;exports.Kbd=r$t;exports.KbdGroup=i$t;exports.Label=Io;exports.MessagingPhone=o$t;exports.MessagingPreview=bI;exports.MobilePreviewMessage=gI;exports.MultiSelectDropdown=a$t;exports.NativeSelect=l$t;exports.NativeSelectOptGroup=c$t;exports.NativeSelectOption=s$t;exports.Pagination=u$t;exports.PaginationContent=d$t;exports.PaginationEllipsis=m$t;exports.PaginationItem=f$t;exports.PaginationLink=yI;exports.PaginationNext=p$t;exports.PaginationPrevious=h$t;exports.PhoneInput=pI;exports.PhonePreview=afe;exports.Popover=W2;exports.PopoverAnchor=ode;exports.PopoverContent=ef;exports.PopoverTrigger=Q1;exports.PreviewCarousel=lfe;exports.PreviewRichMedia=vI;exports.QuillEditor=ohe;exports.RadioGroup=Tde;exports.RadioGroupItem=Dde;exports.RecommendationCard=JOt;exports.ScrollArea=Q1e;exports.ScrollBar=efe;exports.Select=Mde;exports.SelectContent=Ode;exports.SelectField=JR;exports.SelectGroup=wpt;exports.SelectItem=Rde;exports.SelectLabel=xpt;exports.SelectMultiField=QNt;exports.SelectScrollDownButton=Pde;exports.SelectScrollUpButton=Ide;exports.SelectSeparator=Ept;exports.SelectTrigger=Nde;exports.SelectValue=Ade;exports.Separator=p0;exports.Sheet=Ufe;exports.SheetClose=tOt;exports.SheetContent=Yfe;exports.SheetDescription=Zfe;exports.SheetFooter=iOt;exports.SheetHeader=Xfe;exports.SheetTitle=Kfe;exports.SheetTrigger=eOt;exports.Sidebar=hOt;exports.SidebarContent=xOt;exports.SidebarFooter=yOt;exports.SidebarGroup=EOt;exports.SidebarGroupAction=SOt;exports.SidebarGroupContent=$Ot;exports.SidebarGroupLabel=COt;exports.SidebarHeader=bOt;exports.SidebarInput=vOt;exports.SidebarInset=gOt;exports.SidebarMenu=MOt;exports.SidebarMenuAction=ROt;exports.SidebarMenuBadge=IOt;exports.SidebarMenuButton=OOt;exports.SidebarMenuItem=AOt;exports.SidebarMenuSkeleton=POt;exports.SidebarMenuSub=FOt;exports.SidebarMenuSubButton=DOt;exports.SidebarMenuSubItem=TOt;exports.SidebarProvider=fOt;exports.SidebarRail=mOt;exports.SidebarSeparator=wOt;exports.SidebarTrigger=pOt;exports.Skeleton=V$;exports.Slider=zde;exports.SortableItem=l1e;exports.SortableList=s1e;exports.Spinner=HOt;exports.Switch=c1e;exports.SwitchField=u1e;exports.Table=Qfe;exports.TableBody=t0e;exports.TableCaption=UOt;exports.TableCell=i3;exports.TableFooter=WOt;exports.TableHead=n0e;exports.TableHeader=e0e;exports.TableRow=Qf;exports.Tabs=BOt;exports.TabsContent=qOt;exports.TabsList=VOt;exports.TabsTrigger=GOt;exports.TextAreaField=d1e;exports.Textarea=zne;exports.Timeline=XOt;exports.Toaster=jOt;exports.Tooltip=KR;exports.TooltipContent=b5;exports.TooltipField=Gu;exports.TooltipProvider=XR;exports.TooltipTrigger=ZR;exports.cn=te;exports.findMatchingPreset=yhe;exports.formatDate=qc;exports.useDataTable=ckt;exports.useDatePreset=bhe;
|
|
330
|
+
color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n?.key)}return i}}function Mt(e,t,n,r){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function o_t(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:$t(()=>[e,n,t,o],(a,s,c,u)=>({table:a,column:s,row:c,cell:u,getValue:u.getValue,renderValue:u.renderValue}),Mt(e.options,"debugCells","cell.getContext"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function a_t(e,t,n,r){var i,o;const s={...e._getDefaultColumnDef(),...t},c=s.accessorKey;let u=(i=(o=s.id)!=null?o:c?typeof String.prototype.replaceAll=="function"?c.replaceAll(".","_"):c.replace(/\./g,"_"):void 0)!=null?i:typeof s.header=="string"?s.header:void 0,d;if(s.accessorFn?d=s.accessorFn:c&&(c.includes(".")?d=h=>{let p=h;for(const m of c.split(".")){var g;p=(g=p)==null?void 0:g[m],process.env.NODE_ENV!=="production"&&p===void 0&&console.warn(`"${m}" in deeply nested key "${c}" returned undefined.`)}return p}:d=h=>h[s.accessorKey]),!u)throw process.env.NODE_ENV!=="production"?new Error(s.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let f={id:`${String(u)}`,accessorFn:d,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:$t(()=>[!0],()=>{var h;return[f,...(h=f.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},Mt(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:$t(()=>[e._getOrderColumnsFn()],h=>{var p;if((p=f.columns)!=null&&p.length){let g=f.columns.flatMap(m=>m.getLeafColumns());return h(g)}return[f]},Mt(e.options,"debugColumns","column.getLeafColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(f,e);return f}const Hr="debugHeaders";function qU(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(s),a.push(c)};return s(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const l_t={createTable:e=>{e.getHeaderGroups=$t(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const s=(o=r?.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?o:[],c=(a=i?.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?a:[],u=n.filter(f=>!(r!=null&&r.includes(f.id))&&!(i!=null&&i.includes(f.id)));return Am(t,[...s,...u,...c],e)},Mt(e.options,Hr,"getHeaderGroups")),e.getCenterHeaderGroups=$t(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),Am(t,n,e,"center")),Mt(e.options,Hr,"getCenterHeaderGroups")),e.getLeftHeaderGroups=$t(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return Am(t,o,e,"left")},Mt(e.options,Hr,"getLeftHeaderGroups")),e.getRightHeaderGroups=$t(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return Am(t,o,e,"right")},Mt(e.options,Hr,"getRightHeaderGroups")),e.getFooterGroups=$t(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Mt(e.options,Hr,"getFooterGroups")),e.getLeftFooterGroups=$t(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Mt(e.options,Hr,"getLeftFooterGroups")),e.getCenterFooterGroups=$t(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Mt(e.options,Hr,"getCenterFooterGroups")),e.getRightFooterGroups=$t(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Mt(e.options,Hr,"getRightFooterGroups")),e.getFlatHeaders=$t(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Mt(e.options,Hr,"getFlatHeaders")),e.getLeftFlatHeaders=$t(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Mt(e.options,Hr,"getLeftFlatHeaders")),e.getCenterFlatHeaders=$t(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Mt(e.options,Hr,"getCenterFlatHeaders")),e.getRightFlatHeaders=$t(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Mt(e.options,Hr,"getRightFlatHeaders")),e.getCenterLeafHeaders=$t(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Mt(e.options,Hr,"getCenterLeafHeaders")),e.getLeftLeafHeaders=$t(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Mt(e.options,Hr,"getLeftLeafHeaders")),e.getRightLeafHeaders=$t(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Mt(e.options,Hr,"getRightLeafHeaders")),e.getLeafHeaders=$t(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,s,c,u;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(c=(u=r[0])==null?void 0:u.headers)!=null?c:[]].map(d=>d.getLeafHeaders()).flat()},Mt(e.options,Hr,"getLeafHeaders"))}};function Am(e,t,n,r){var i,o;let a=0;const s=function(h,p){p===void 0&&(p=1),a=Math.max(a,p),h.filter(g=>g.getIsVisible()).forEach(g=>{var m;(m=g.columns)!=null&&m.length&&s(g.columns,p+1)},0)};s(e);let c=[];const u=(h,p)=>{const g={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},m=[];h.forEach(b=>{const w=[...m].reverse()[0],x=b.column.depth===g.depth;let E,S=!1;if(x&&b.column.parent?E=b.column.parent:(E=b.column,S=!0),w&&w?.column===E)w.subHeaders.push(b);else{const $=qU(n,E,{id:[r,p,E.id,b?.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${m.filter(M=>M.column===E).length}`:void 0,depth:p,index:m.length});$.subHeaders.push(b),m.push($)}g.headers.push(b),b.headerGroup=g}),c.push(g),p>0&&u(m,p-1)},d=t.map((h,p)=>qU(n,h,{depth:a,index:p}));u(d,a-1),c.reverse();const f=h=>h.filter(g=>g.column.getIsVisible()).map(g=>{let m=0,b=0,w=[0];g.subHeaders&&g.subHeaders.length?(w=[],f(g.subHeaders).forEach(E=>{let{colSpan:S,rowSpan:$}=E;m+=S,w.push($)})):m=1;const x=Math.min(...w);return b=b+x,g.colSpan=m,g.rowSpan=b,{colSpan:m,rowSpan:b}});return f((i=(o=c[0])==null?void 0:o.headers)!=null?i:[]),c}const YI=(e,t,n,r,i,o,a)=>{let s={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(s._valuesCache.hasOwnProperty(c))return s._valuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return s._valuesCache[c]=u.accessorFn(s.original,r),s._valuesCache[c]},getUniqueValues:c=>{if(s._uniqueValuesCache.hasOwnProperty(c))return s._uniqueValuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(s._uniqueValuesCache[c]=u.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[c]):(s._uniqueValuesCache[c]=[s.getValue(c)],s._uniqueValuesCache[c])},renderValue:c=>{var u;return(u=s.getValue(c))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>i_t(s.subRows,c=>c.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let c=[],u=s;for(;;){const d=u.getParentRow();if(!d)break;c.push(d),u=d}return c.reverse()},getAllCells:$t(()=>[e.getAllLeafColumns()],c=>c.map(u=>o_t(e,s,u,u.id)),Mt(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:$t(()=>[s.getAllCells()],c=>c.reduce((u,d)=>(u[d.column.id]=d,u),{}),Mt(e.options,"debugRows","getAllCellsByColumnId"))};for(let c=0;c<e._features.length;c++){const u=e._features[c];u==null||u.createRow==null||u.createRow(s,e)}return s},s_t={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},lhe=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};lhe.autoRemove=e=>ga(e);const she=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};she.autoRemove=e=>ga(e);const che=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};che.autoRemove=e=>ga(e);const uhe=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};uhe.autoRemove=e=>ga(e);const dhe=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});dhe.autoRemove=e=>ga(e)||!(e!=null&&e.length);const fhe=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});fhe.autoRemove=e=>ga(e)||!(e!=null&&e.length);const hhe=(e,t,n)=>e.getValue(t)===n;hhe.autoRemove=e=>ga(e);const phe=(e,t,n)=>e.getValue(t)==n;phe.autoRemove=e=>ga(e);const XI=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};XI.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(o>a){const s=o;o=a,a=s}return[o,a]};XI.autoRemove=e=>ga(e)||ga(e[0])&&ga(e[1]);const Ul={includesString:lhe,includesStringSensitive:she,equalsString:che,arrIncludes:uhe,arrIncludesAll:dhe,arrIncludesSome:fhe,equals:hhe,weakEquals:phe,inNumberRange:XI};function ga(e){return e==null||e===""}const c_t={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ui("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?Ul.includesString:typeof r=="number"?Ul.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Ul.equals:Array.isArray(r)?Ul.arrIncludes:Ul.weakEquals},e.getFilterFn=()=>{var n,r;return G5(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Ul[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r?.find(d=>d.id===e.id),a=js(n,o?o.value:void 0);if(WU(i,a,e)){var s;return(s=r?.filter(d=>d.id!==e.id))!=null?s:[]}const c={id:e.id,value:a};if(o){var u;return(u=r?.map(d=>d.id===e.id?c:d))!=null?u:[]}return r!=null&&r.length?[...r,c]:[c]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=js(t,i))==null?void 0:o.filter(a=>{const s=n.find(c=>c.id===a.id);if(s){const c=s.getFilterFn();if(WU(c,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function WU(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const u_t=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),d_t=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},f_t=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}),r},h_t=(e,t,n)=>{let r,i;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}),[r,i]},p_t=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},m_t=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!r_t(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,a)=>o-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},g_t=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),v_t=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,b_t=(e,t)=>t.length,NE={sum:u_t,min:d_t,max:f_t,extent:h_t,mean:p_t,median:m_t,unique:g_t,uniqueCount:v_t,count:b_t},y_t={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Ui("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return NE.sum;if(Object.prototype.toString.call(r)==="[object Date]")return NE.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return G5(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:NE[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function w_t(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(a=>a.id===o)).filter(Boolean),...r]}const x_t={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ui("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=$t(n=>[v0(t,n)],n=>n.findIndex(r=>r.id===e.id),Mt(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=v0(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=v0(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=$t(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const a=[...t],s=[...i];for(;s.length&&a.length;){const c=a.shift(),u=s.findIndex(d=>d.id===c);u>-1&&o.push(s.splice(u,1)[0])}o=[...o,...s]}return w_t(o,n,r)},Mt(e.options,"debugTable","_getOrderColumnsFn"))}},OE=()=>({left:[],right:[]}),E_t={getInitialState:e=>({columnPinning:OE(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ui("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,a;if(n==="right"){var s,c;return{left:((s=i?.left)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((c=i?.right)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(n==="left"){var u,d;return{left:[...((u=i?.left)!=null?u:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((d=i?.right)!=null?d:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((o=i?.left)!=null?o:[]).filter(f=>!(r!=null&&r.includes(f))),right:((a=i?.right)!=null?a:[]).filter(f=>!(r!=null&&r.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=$t(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(a=>!o.includes(a.column.id))},Mt(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=$t(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Mt(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=$t(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Mt(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?OE():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:OE())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=$t(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Mt(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=$t(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Mt(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=$t(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Mt(e.options,"debugColumns","getCenterLeafColumns"))}};function C_t(e){return e||(typeof document<"u"?document:null)}const Nm={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},RE=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),S_t={getDefaultColumnDef:()=>Nm,getInitialState:e=>({columnSizing:{},columnSizingInfo:RE(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ui("columnSizing",e),onColumnSizingInfoChange:Ui("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Nm.minSize,(r=o??e.columnDef.size)!=null?r:Nm.size),(i=e.columnDef.maxSize)!=null?i:Nm.maxSize)},e.getStart=$t(n=>[n,v0(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Mt(t.options,"debugColumns","getStart")),e.getAfter=$t(n=>[n,v0(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Mt(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r?.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),IE(o)&&o.touches&&o.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[r.id,r.getSize()]],c=IE(o)?Math.round(o.touches[0].clientX):o.clientX,u={},d=(w,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(E=>{var S,$;const M=t.options.columnResizeDirection==="rtl"?-1:1,A=(x-((S=E?.startOffset)!=null?S:0))*M,R=Math.max(A/(($=E?.startSize)!=null?$:0),-.999999);return E.columnSizingStart.forEach(T=>{let[k,N]=T;u[k]=Math.round(Math.max(N+N*R,0)*100)/100}),{...E,deltaOffset:A,deltaPercentage:R}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(E=>({...E,...u})))},f=w=>d("move",w),h=w=>{d("end",w),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=C_t(n),g={moveHandler:w=>f(w.clientX),upHandler:w=>{p?.removeEventListener("mousemove",g.moveHandler),p?.removeEventListener("mouseup",g.upHandler),h(w.clientX)}},m={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),f(w.touches[0].clientX),!1),upHandler:w=>{var x;p?.removeEventListener("touchmove",m.moveHandler),p?.removeEventListener("touchend",m.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),h((x=w.touches[0])==null?void 0:x.clientX)}},b=$_t()?{passive:!1}:!1;IE(o)?(p?.addEventListener("touchmove",m.moveHandler,b),p?.addEventListener("touchend",m.upHandler,b)):(p?.addEventListener("mousemove",g.moveHandler,b),p?.addEventListener("mouseup",g.upHandler,b)),t.setColumnSizingInfo(w=>({...w,startOffset:c,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?RE():(n=e.initialState.columnSizingInfo)!=null?n:RE())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let Om=null;function $_t(){if(typeof Om=="boolean")return Om;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Om=e,Om}function IE(e){return e.type==="touchstart"}const M_t={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ui("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=$t(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Mt(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=$t(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Mt(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>$t(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Mt(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function v0(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const A_t={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},N_t={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ui("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Ul.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return G5(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Ul[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},O_t={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ui("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const a=o.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(i=n)!=null?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){const{[e.id]:s,...c}=a;return c}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},lM=0,sM=10,PE=()=>({pageIndex:lM,pageSize:sM}),R_t={getInitialState:e=>({...e,pagination:{...PE(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ui("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>js(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?PE():(i=e.initialState.pagination)!=null?i:PE())},e.setPageIndex=r=>{e.setPagination(i=>{let o=js(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,a)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?lM:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:lM)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?sM:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:sM)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,js(r,i.pageSize)),a=i.pageSize*i.pageIndex,s=Math.floor(a/o);return{...i,pageIndex:s,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let a=js(r,(o=e.options.pageCount)!=null?o:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=$t(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,a)=>a)),i},Mt(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},FE=()=>({top:[],bottom:[]}),I_t={getInitialState:e=>({rowPinning:FE(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ui("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(c=>{let{id:u}=c;return u}):[],a=i?e.getParentRows().map(c=>{let{id:u}=c;return u}):[],s=new Set([...a,e.id,...o]);t.setRowPinning(c=>{var u,d;if(n==="bottom"){var f,h;return{top:((f=c?.top)!=null?f:[]).filter(m=>!(s!=null&&s.has(m))),bottom:[...((h=c?.bottom)!=null?h:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)]}}if(n==="top"){var p,g;return{top:[...((p=c?.top)!=null?p:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)],bottom:((g=c?.bottom)!=null?g:[]).filter(m=>!(s!=null&&s.has(m)))}}return{top:((u=c?.top)!=null?u:[]).filter(m=>!(s!=null&&s.has(m))),bottom:((d=c?.bottom)!=null?d:[]).filter(m=>!(s!=null&&s.has(m)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=o?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?FE():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:FE())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=$t(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Mt(e.options,"debugRows","getTopRows")),e.getBottomRows=$t(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Mt(e.options,"debugRows","getBottomRows")),e.getCenterRows=$t(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Mt(e.options,"debugRows","getCenterRows"))}},P_t={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ui("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{cM(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=$t(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?TE(e,n):{rows:[],flatRows:[],rowsById:{}},Mt(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=$t(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?TE(e,n):{rows:[],flatRows:[],rowsById:{}},Mt(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=$t(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?TE(e,n):{rows:[],flatRows:[],rowsById:{}},Mt(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const s={...o};return cM(s,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return KI(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return uM(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return uM(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},cM=(e,t,n,r,i)=>{var o;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=a.subRows)!=null&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>cM(e,s.id,n,r,i))};function TE(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(a,s){return a.map(c=>{var u;const d=KI(c,n);if(d&&(r.push(c),i[c.id]=c),(u=c.subRows)!=null&&u.length&&(c={...c,subRows:o(c.subRows)}),d)return c}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function KI(e,t){var n;return(n=t[e.id])!=null?n:!1}function uM(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(a=>{if(!(o&&!i)&&(a.getCanSelect()&&(KI(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const s=uM(a,t);s==="all"?o=!0:(s==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const dM=/([0-9]+)/gm,F_t=(e,t,n)=>mhe(oc(e.getValue(n)).toLowerCase(),oc(t.getValue(n)).toLowerCase()),T_t=(e,t,n)=>mhe(oc(e.getValue(n)),oc(t.getValue(n))),D_t=(e,t,n)=>ZI(oc(e.getValue(n)).toLowerCase(),oc(t.getValue(n)).toLowerCase()),z_t=(e,t,n)=>ZI(oc(e.getValue(n)),oc(t.getValue(n))),__t=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},k_t=(e,t,n)=>ZI(e.getValue(n),t.getValue(n));function ZI(e,t){return e===t?0:e>t?1:-1}function oc(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function mhe(e,t){const n=e.split(dM).filter(Boolean),r=t.split(dM).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),a=parseInt(i,10),s=parseInt(o,10),c=[a,s].sort();if(isNaN(c[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(c[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const zf={alphanumeric:F_t,alphanumericCaseSensitive:T_t,text:D_t,textCaseSensitive:z_t,datetime:__t,basic:k_t},L_t={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ui("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return zf.datetime;if(typeof o=="string"&&(r=!0,o.split(dM).length>1))return zf.alphanumeric}return r?zf.text:zf.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return G5(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:zf[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a?.find(p=>p.id===e.id),c=a?.findIndex(p=>p.id===e.id);let u=[],d,f=o?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?d="toggle":d="add":a!=null&&a.length&&c!==a.length-1?d="replace":s?d="toggle":d="replace",d==="toggle"&&(o||i||(d="remove")),d==="add"){var h;u=[...a,{id:e.id,desc:f}],u.splice(0,u.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else d==="toggle"?u=a.map(p=>p.id===e.id?{...p,desc:f}:p):d==="remove"?u=a.filter(p=>p.id!==e.id):u=[{id:e.id,desc:f}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},j_t=[l_t,M_t,x_t,E_t,s_t,c_t,A_t,N_t,L_t,y_t,O_t,R_t,I_t,P_t,S_t];function H_t(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...j_t,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((h,p)=>Object.assign(h,p.getDefaultOptions==null?void 0:p.getDefaultOptions(i)),{}),a=h=>i.options.mergeOptions?i.options.mergeOptions(o,h):{...o,...h};let c={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(h=>{var p;c=(p=h.getInitialState==null?void 0:h.getInitialState(c))!=null?p:c});const u=[];let d=!1;const f={_features:r,options:{...o,...e},initialState:c,_queue:h=>{u.push(h),d||(d=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();d=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{i.setState(i.initialState)},setOptions:h=>{const p=js(h,i.options);i.options=a(p)},getState:()=>i.options.state,setState:h=>{i.options.onStateChange==null||i.options.onStateChange(h)},_getRowId:(h,p,g)=>{var m;return(m=i.options.getRowId==null?void 0:i.options.getRowId(h,p,g))!=null?m:`${g?[g.id,p].join("."):p}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(h,p)=>{let g=(p?i.getPrePaginationRowModel():i.getRowModel()).rowsById[h];if(!g&&(g=i.getCoreRowModel().rowsById[h],!g))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${h}`):new Error;return g},_getDefaultColumnDef:$t(()=>[i.options.defaultColumn],h=>{var p;return h=(p=h)!=null?p:{},{header:g=>{const m=g.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:g=>{var m,b;return(m=(b=g.renderValue())==null||b.toString==null?void 0:b.toString())!=null?m:null},...i._features.reduce((g,m)=>Object.assign(g,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...h}},Mt(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>i.options.columns,getAllColumns:$t(()=>[i._getColumnDefs()],h=>{const p=function(g,m,b){return b===void 0&&(b=0),g.map(w=>{const x=a_t(i,w,b,m),E=w;return x.columns=E.columns?p(E.columns,x,b+1):[],x})};return p(h)},Mt(e,"debugColumns","getAllColumns")),getAllFlatColumns:$t(()=>[i.getAllColumns()],h=>h.flatMap(p=>p.getFlatColumns()),Mt(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:$t(()=>[i.getAllFlatColumns()],h=>h.reduce((p,g)=>(p[g.id]=g,p),{}),Mt(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:$t(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(h,p)=>{let g=h.flatMap(m=>m.getLeafColumns());return p(g)},Mt(e,"debugColumns","getAllLeafColumns")),getColumn:h=>{const p=i._getAllFlatColumnsById()[h];return process.env.NODE_ENV!=="production"&&!p&&console.error(`[Table] Column with id '${h}' does not exist.`),p}};Object.assign(i,f);for(let h=0;h<i._features.length;h++){const p=i._features[h];p==null||p.createTable==null||p.createTable(i)}return i}function B_t(){return e=>$t(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,a){o===void 0&&(o=0);const s=[];for(let u=0;u<i.length;u++){const d=YI(e,e._getRowId(i[u],u,a),i[u],u,o,void 0,a?.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,s.push(d),e.options.getSubRows){var c;d.originalSubRows=e.options.getSubRows(i[u],u),(c=d.originalSubRows)!=null&&c.length&&(d.subRows=r(d.originalSubRows,o+1,d))}}return s};return n.rows=r(t),n},Mt(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function V_t(){return e=>$t(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(t,n,r)=>!n.rows.length||t!==!0&&!Object.keys(t??{}).length||!r?n:ghe(n),Mt(e.options,"debugTable","getExpandedRowModel"))}function ghe(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function G_t(e,t,n){return n.options.filterFromLeafRows?q_t(e,t,n):W_t(e,t,n)}function q_t(e,t,n){var r;const i=[],o={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(c,u){u===void 0&&(u=0);const d=[];for(let h=0;h<c.length;h++){var f;let p=c[h];const g=YI(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(g.columnFilters=p.columnFilters,(f=p.subRows)!=null&&f.length&&u<a){if(g.subRows=s(p.subRows,u+1),p=g,t(p)&&!g.subRows.length){d.push(p),o[p.id]=p,i.push(p);continue}if(t(p)||g.subRows.length){d.push(p),o[p.id]=p,i.push(p);continue}}else p=g,t(p)&&(d.push(p),o[p.id]=p,i.push(p))}return d};return{rows:s(e),flatRows:i,rowsById:o}}function W_t(e,t,n){var r;const i=[],o={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(c,u){u===void 0&&(u=0);const d=[];for(let h=0;h<c.length;h++){let p=c[h];if(t(p)){var f;if((f=p.subRows)!=null&&f.length&&u<a){const m=YI(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);m.subRows=s(p.subRows,u+1),p=m}d.push(p),i.push(p),o[p.id]=p}}return d};return{rows:s(e),flatRows:i,rowsById:o}}function U_t(){return e=>$t(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let h=0;h<t.flatRows.length;h++)t.flatRows[h].columnFilters={},t.flatRows[h].columnFiltersMeta={};return t}const i=[],o=[];(n??[]).forEach(h=>{var p;const g=e.getColumn(h.id);if(!g)return;const m=g.getFilterFn();if(!m){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${g.id}.`);return}i.push({id:h.id,filterFn:m,resolvedValue:(p=m.resolveFilterValue==null?void 0:m.resolveFilterValue(h.value))!=null?p:h.value})});const a=(n??[]).map(h=>h.id),s=e.getGlobalFilterFn(),c=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());r&&s&&c.length&&(a.push("__global__"),c.forEach(h=>{var p;o.push({id:h.id,filterFn:s,resolvedValue:(p=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?p:r})}));let u,d;for(let h=0;h<t.flatRows.length;h++){const p=t.flatRows[h];if(p.columnFilters={},i.length)for(let g=0;g<i.length;g++){u=i[g];const m=u.id;p.columnFilters[m]=u.filterFn(p,m,u.resolvedValue,b=>{p.columnFiltersMeta[m]=b})}if(o.length){for(let g=0;g<o.length;g++){d=o[g];const m=d.id;if(d.filterFn(p,m,d.resolvedValue,b=>{p.columnFiltersMeta[m]=b})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const f=h=>{for(let p=0;p<a.length;p++)if(h.columnFilters[a[p]]===!1)return!1;return!0};return G_t(t.rows,f,e)},Mt(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function Y_t(e){return t=>$t(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:o}=n;let{rows:a,flatRows:s,rowsById:c}=r;const u=i*o,d=u+i;a=a.slice(u,d);let f;t.options.paginateExpandedRows?f={rows:a,flatRows:s,rowsById:c}:f=ghe({rows:a,flatRows:s,rowsById:c}),f.flatRows=[];const h=p=>{f.flatRows.push(p),p.subRows.length&&p.subRows.forEach(h)};return f.rows.forEach(h),f},Mt(t.options,"debugTable","getPaginationRowModel"))}function X_t(){return e=>$t(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],o=r.filter(c=>{var u;return(u=e.getColumn(c.id))==null?void 0:u.getCanSort()}),a={};o.forEach(c=>{const u=e.getColumn(c.id);u&&(a[c.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const s=c=>{const u=c.map(d=>({...d}));return u.sort((d,f)=>{for(let p=0;p<o.length;p+=1){var h;const g=o[p],m=a[g.id],b=m.sortUndefined,w=(h=g?.desc)!=null?h:!1;let x=0;if(b){const E=d.getValue(g.id),S=f.getValue(g.id),$=E===void 0,M=S===void 0;if($||M){if(b==="first")return $?-1:1;if(b==="last")return $?1:-1;x=$&&M?0:$?b:-b}}if(x===0&&(x=m.sortingFn(d,f,g.id)),x!==0)return w&&(x*=-1),m.invertSorting&&(x*=-1),x}return d.index-f.index}),u.forEach(d=>{var f;i.push(d),(f=d.subRows)!=null&&f.length&&(d.subRows=s(d.subRows))}),u};return{rows:s(n.rows),flatRows:i,rowsById:n.rowsById}},Mt(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function UU(e,t){return e?K_t(e)?v.createElement(e,t):e:null}function K_t(e){return Z_t(e)||typeof e=="function"||J_t(e)}function Z_t(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function J_t(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Q_t(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=v.useState(()=>({current:H_t(t)})),[r,i]=v.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}function YU(e){const t=e.getIsPinned();if(!t)return{className:"",style:{}};const n=t==="left",r=t==="right";return{className:te("ui:sticky ui:z-10 ui:bg-background",n&&"ui:left-0",r&&"ui:right-0",n&&"ui:after:absolute ui:after:right-0 ui:after:top-0 ui:after:h-full ui:after:w-px ui:after:bg-border",r&&"ui:before:absolute ui:before:left-0 ui:before:top-0 ui:before:h-full ui:before:w-px ui:before:bg-border"),style:{left:n?`${e.getStart("left")}px`:void 0,right:r?`${e.getAfter("right")}px`:void 0}}}function ekt({className:e,loadingContent:t=y.jsxs("div",{className:"ui:flex ui:items-center ui:justify-center ui:gap-2",children:[y.jsx(qe.Loader2,{className:"ui:h-4 ui:w-4 ui:animate-spin"}),y.jsx("span",{children:"Loading..."})]}),emptyContent:n="No results.",renderRowSubComponent:r}){const{table:i,isLoading:o}=V5(),a=i.getAllColumns().length;return y.jsx("div",{className:te("ui:overflow-hidden ui:rounded-md ui:border ui:bg-white ui:rounded-b-none ui:p-3 ui:pb-0",e),children:y.jsxs(Qfe,{children:[y.jsx(e0e,{children:i.getHeaderGroups().map(s=>y.jsx(Qf,{children:s.headers.map(c=>{const{className:u,style:d}=YU(c.column);return y.jsx(n0e,{className:u,style:d,children:c.isPlaceholder?null:UU(c.column.columnDef.header,c.getContext())},c.id)})},s.id))}),y.jsx(t0e,{children:o?y.jsx(Qf,{children:y.jsx(i3,{colSpan:a,className:"ui:h-24 ui:text-center",children:t})}):i.getRowModel().rows?.length?i.getRowModel().rows.map(s=>y.jsxs(l.Fragment,{children:[y.jsx(Qf,{"data-state":s.getIsSelected()&&"selected",className:te(s.depth>0&&"ui:bg-muted/50"),children:s.getVisibleCells().map(c=>{const{className:u,style:d}=YU(c.column);return y.jsx(i3,{className:u,style:d,children:UU(c.column.columnDef.cell,c.getContext())},c.id)})}),s.getIsExpanded()&&r?.({row:s})]},s.id)):y.jsx(Qf,{children:y.jsx(i3,{colSpan:a,className:"ui:h-24 ui:text-center",children:n})})})]})})}const tkt=[{value:"10",label:"10"},{value:"20",label:"20"},{value:"50",label:"50"},{value:"100",label:"100"}],nkt=({showSelectedCount:e=!0,showPaginationInfo:t=!0,className:n,showPerPageLabel:r="Show Per Page",selectPlaceholder:i="Select",selectedCountText:o=(s,c)=>`${s} of ${c} row(s) selected.`,paginationInfoText:a=(s,c,u)=>`${s} - ${c} of ${u}`})=>{const{table:s,totalCount:c}=V5(),u=c??s.getFilteredRowModel().rows.length,{pageIndex:d,pageSize:f}=s.getState().pagination,h=s.getPageCount(),p=d+1,g=u>0?d*f+1:0,m=Math.min((d+1)*f,u),[b,w]=l.useState(null),x=b?.sourcePage===p?b.value:String(p),E=R=>{s.setPageSize(Number(R)),s.setPageIndex(0)},S=()=>{w({sourcePage:p,value:String(p)})},$=R=>{(R===""||/^\d+$/.test(R))&&w({sourcePage:p,value:R})},M=()=>{const R=Number.parseInt(x,10);if(!x||Number.isNaN(R)){w(null);return}const T=Math.max(h,1),k=Math.max(1,Math.min(R,T));s.setPageIndex(k-1),w(null)},A=R=>{R.key==="Enter"&&R.currentTarget.blur()};return y.jsxs("div",{className:te("ui:flex ui:items-center ui:gap-4 ui:py-4 ui:bg-white ui:rounded-b-lg ui:px-3 ui:border-border ui:border ui:border-t-0",e?"ui:justify-end":"ui:justify-between",n),children:[e&&y.jsx("div",{className:"ui:text-muted-foreground ui:flex-1 ui:text-sm",children:o(s.getFilteredSelectedRowModel().rows.length,s.getFilteredRowModel().rows.length)}),y.jsx(JR,{options:tkt,value:String(f),onChange:E,label:r,placeholder:i,triggerClassName:"ui:w-20",labelClassName:"ui:mb-0 ui:font-normal",containerClassName:"ui:flex ui:items-center ui:gap-2",isPortal:!0}),y.jsxs("div",{className:"ui:flex ui:items-center ui:gap-4",children:[t&&u>0&&y.jsx("div",{className:"ui:text-muted-foreground ui:text-sm",children:a(g,m,u)}),y.jsxs("div",{className:"ui:flex ui:items-center ui:gap-1",children:[y.jsx(ca,{variant:"ghost",icon:y.jsx(qe.ChevronsLeft,{}),isIconOnly:!0,size:"icon-lg","aria-label":"Go to first page",onClick:()=>s.firstPage(),disabled:!s.getCanPreviousPage()}),y.jsx(ca,{variant:"ghost",icon:y.jsx(qe.ChevronLeft,{}),isIconOnly:!0,size:"icon-lg","aria-label":"Go to previous page",onClick:()=>s.previousPage(),disabled:!s.getCanPreviousPage()}),y.jsxs("div",{className:"ui:flex ui:items-center ui:gap-1 ui:text-sm",children:[y.jsx(gs,{type:"text",inputMode:"numeric",value:x,onChange:R=>$(R.target.value),onFocus:S,onBlur:M,onKeyDown:A,"aria-label":"Current page",className:"ui:h-8 ui:w-10 ui:px-1 ui:text-center ui:shadow-none"}),y.jsxs("span",{children:[" / ",h]})]}),y.jsx(ca,{variant:"ghost",icon:y.jsx(qe.ChevronRight,{}),isIconOnly:!0,size:"icon-lg","aria-label":"Go to next page",onClick:()=>s.nextPage(),disabled:!s.getCanNextPage()}),y.jsx(ca,{variant:"ghost",icon:y.jsx(qe.ChevronsRight,{}),isIconOnly:!0,size:"icon-lg","aria-label":"Go to last page",onClick:()=>s.lastPage(),disabled:!s.getCanNextPage()})]})]})]})};function rkt({table:e,children:t,isLoading:n=!1,search:r="",onSearchChange:i=()=>{},totalCount:o,className:a}){const s={table:e,isLoading:n,search:r,onSearchChange:i,totalCount:o};return y.jsx(ahe.Provider,{value:s,children:y.jsx("div",{className:te("ui:w-full",a),children:t})})}function ikt({placeholder:e="Search...",filterColumn:t,className:n,label:r,autoFocus:i=!1}){const{table:o,search:a,onSearchChange:s}=V5(),c=d=>{const f=String(d);t?o.getColumn(t)?.setFilterValue(f):s(f)},u=t?o.getColumn(t)?.getFilterValue()??"":a;return y.jsx(lde,{placeholder:e,value:u,onChange:c,className:te(n),label:r??"",name:"debounced-search-label",autoFocus:i})}function okt({children:e,className:t}){return y.jsx("div",{className:te("ui:flex ui:justify-between ui:gap-2 ui:items-center ui:p-3 ui:bg-white ui:rounded-lg ui:border ui:mb-2.5",t),children:e})}const akt={Root:rkt,Toolbar:okt,Search:ikt,ColumnVisibility:n_t,Content:ekt,Pagination:nkt,Actions:t_t},vhe=l.createContext(null);function bhe(){const e=l.useContext(vhe);if(!e)throw new Error("useDatePreset must be used within a DatePresetProvider");return e}const q5={TODAY:{key:"TODAY",label:"Today",getRange:()=>({from:new Date,to:new Date})},THIS_WEEK:{key:"THIS_WEEK",label:"This Week",getRange:()=>({from:Xc(new Date,{weekStartsOn:1}),to:new Date})},LAST_7_DAYS:{key:"LAST_7_DAYS",label:"Last 7 Days",getRange:()=>({from:oP(new Date,6),to:new Date})},THIS_MONTH:{key:"THIS_MONTH",label:"This Month",getRange:()=>({from:_E(new Date),to:new Date})},LAST_MONTH:{key:"LAST_MONTH",label:"Last Month",getRange:()=>({from:_E(aP(new Date)),to:wY(aP(new Date))})},LAST_30_DAYS:{key:"LAST_30_DAYS",label:"Last 30 Days",getRange:()=>({from:oP(new Date,29),to:new Date})}},fM="LAST_7_DAYS";function yhe(e,t=q5){for(const n of Object.values(t)){const r=n.getRange();if(zE(e.from,r.from)&&zE(e.to,r.to))return n.key}return null}function lkt({presets:e=q5,className:t,confirmLabel:n="Apply",placeholder:r="Pick a date range",disabledCondition:i,dateLocale:o}){const{range:a,preset:s,setRange:c}=bhe(),u=f=>{const h=f.getRange();c(h,f.key)},d=f=>{if(f.from&&f.to){const h={from:f.from,to:f.to},p=yhe(h,e);c(h,p??null)}};return y.jsxs("div",{className:te("ui:flex ui:flex-wrap ui:gap-4 ui:w-full",t),children:[y.jsx(nte,{className:"ui:max-w-full ui:py-1!",children:y.jsx("div",{className:"ui:overflow-x-auto",children:y.jsx("div",{className:"ui:flex ui:gap-2",children:Object.values(e).map(f=>y.jsx(ca,{variant:"ghost",className:te("ui:font-normal",{"ui:bg-segmentify-200 ui:text-segmentify-600":s===f.key}),onClick:()=>u(f),label:f.label},f.key))})})}),y.jsx(ade,{start:a.from,end:a.to,className:"ui:rounded-lg ui:shadow-sm",placeholder:r,confirmLabel:n,onConfirm:d,disabledCondition:i,dateLocale:o})]})}function skt({children:e,initialRange:t,initialPreset:n=fM,onRangeChange:r}){const i=t??q5[n??fM]?.getRange(),[o,a]=l.useState(i),[s,c]=l.useState(n),d={range:o,preset:s,setRange:(f,h=null)=>{a(f),c(h),r?.(f,h)}};return y.jsx(vhe.Provider,{value:d,children:e})}function ckt({queryKey:e,columns:t,fetcher:n,initialPageSize:r=10,initialSorting:i=[],initialColumnVisibility:o={},initialColumnPinning:a={left:[],right:[]},manualPagination:s=!1,manualSorting:c=!1,manualFiltering:u=!1,getSubRows:d,getRowCanExpand:f,queryOptions:h,meta:p}){const[g,m]=l.useState(i),[b,w]=l.useState([]),[x,E]=l.useState(o),[S,$]=l.useState({}),[M,A]=l.useState(a),[R,T]=l.useState({}),[k,N]=l.useState(""),[P,O]=l.useState({pageIndex:0,pageSize:r}),[z,L]=l.useState(e);e!==z&&(L(e),O(ee=>ee.pageIndex===0?ee:{...ee,pageIndex:0}));const D={pageNo:P.pageIndex+1,pageSize:P.pageSize,sortBy:g,reversed:g.length>0?g[0].desc:!1,columnFilters:b,search:k},{data:_,isLoading:H,isFetching:W,isRefetching:F,isSuccess:K,isError:j,error:U,refetch:Y}=whe.useQuery({queryKey:[e,D],queryFn:()=>n(D),placeholderData:ee=>ee,...h}),G=_?.data??[],Q=_?.totalCount??G.length;l.useEffect(()=>{if(!s||Q<=0)return;const ee=Math.max(0,Math.ceil(Q/P.pageSize)-1);P.pageIndex>ee&&O(ce=>({...ce,pageIndex:ee}))},[s,P.pageIndex,P.pageSize,Q]);const X=l.useCallback(ee=>{N(ee),O(ce=>({...ce,pageIndex:0}))},[]),Z=l.useCallback(ee=>{w(ee),O(ce=>({...ce,pageIndex:0}))},[]);return{table:Q_t({data:G,columns:t,pageCount:s?Math.ceil(Q/P.pageSize):void 0,state:{sorting:g,columnFilters:b,columnVisibility:x,rowSelection:S,columnPinning:M,expanded:R,pagination:P,globalFilter:k},onSortingChange:m,onColumnFiltersChange:Z,onColumnVisibilityChange:E,onRowSelectionChange:$,onColumnPinningChange:A,onExpandedChange:T,onPaginationChange:O,onGlobalFilterChange:X,getSubRows:d,getRowCanExpand:f,getCoreRowModel:B_t(),getPaginationRowModel:Y_t(),getSortedRowModel:c?void 0:X_t(),getFilteredRowModel:u?void 0:U_t(),getExpandedRowModel:V_t(),manualPagination:s,manualSorting:c,manualFiltering:u,meta:p}),data:G,isLoading:H,isFetching:W,isRefetching:F,isSuccess:K,isError:j,error:U,totalCount:Q,refetch:Y,search:k,setSearch:X,sortBy:g,pagination:P,columnFilters:b,columnVisibility:x,rowSelection:S,columnPinning:M,expanded:R}}Object.defineProperty(exports,"toast",{enumerable:!0,get:()=>hM.toast});exports.Accordion=jY;exports.AccordionContent=VY;exports.AccordionItem=HY;exports.AccordionTrigger=BY;exports.AlertDialog=w7e;exports.AlertDialogAction=N7e;exports.AlertDialogCancel=O7e;exports.AlertDialogContent=E7e;exports.AlertDialogDescription=M7e;exports.AlertDialogFooter=S7e;exports.AlertDialogHeader=C7e;exports.AlertDialogMedia=A7e;exports.AlertDialogOverlay=pQ;exports.AlertDialogPortal=hQ;exports.AlertDialogTitle=$7e;exports.AlertDialogTrigger=x7e;exports.AspectRatio=F7e;exports.AsyncCombobox=g2t;exports.Avatar=B7e;exports.AvatarFallback=G7e;exports.AvatarImage=V7e;exports.Badge=EQ;exports.BaseButton=ca;exports.Breadcrumb=W7e;exports.BreadcrumbEllipsis=J7e;exports.BreadcrumbItem=Y7e;exports.BreadcrumbLink=X7e;exports.BreadcrumbList=U7e;exports.BreadcrumbPage=K7e;exports.BreadcrumbSeparator=Z7e;exports.Button=Gn;exports.Calendar=gA;exports.CalendarDayButton=BQ;exports.CampaignTitle=N8e;exports.Card=VQ;exports.CardAction=R8e;exports.CardContent=WQ;exports.CardDescription=qQ;exports.CardFooter=I8e;exports.CardHeader=GQ;exports.CardTitle=O8e;exports.Carousel=f9e;exports.CarouselContent=h9e;exports.CarouselItem=p9e;exports.CarouselNext=g9e;exports.CarouselPrevious=m9e;exports.Case=Bn;exports.ChartContainer=ZEe;exports.ChartLegend=eCe;exports.ChartLegendContent=tCe;exports.ChartStyle=Hee;exports.ChartTooltip=JEe;exports.ChartTooltipContent=QEe;exports.Checkbox=Bee;exports.CheckboxField=ite;exports.Collapsible=nCe;exports.CollapsibleContent=iCe;exports.CollapsibleTrigger=rCe;exports.ComboboxField=TN;exports.Command=Jv;exports.CommandDialog=ICe;exports.CommandEmpty=UA;exports.CommandGroup=YA;exports.CommandInput=qA;exports.CommandItem=XA;exports.CommandList=WA;exports.CommandSeparator=PCe;exports.CommandShortcut=FCe;exports.ComponentSwitch=Ur;exports.ContentWrapper=nte;exports.CreatableActionIcons=TCe;exports.DATE_PRESETS=q5;exports.DEFAULT_PRESET_KEY=fM;exports.DataTable=akt;exports.DatePreset=lkt;exports.DatePresetProvider=skt;exports.DateRangePicker=ade;exports.DebouncedInput=lde;exports.Default=eu;exports.DetailedImageModal=y2t;exports.Dialog=HA;exports.DialogClose=OCe;exports.DialogContent=BA;exports.DialogDescription=tte;exports.DialogFooter=RCe;exports.DialogHeader=VA;exports.DialogOverlay=ete;exports.DialogPortal=Qee;exports.DialogTitle=GA;exports.DialogTrigger=Jee;exports.Drawer=Y2t;exports.DrawerClose=K2t;exports.DrawerContent=Z2t;exports.DrawerDescription=tpt;exports.DrawerFooter=Q2t;exports.DrawerHeader=J2t;exports.DrawerOverlay=wde;exports.DrawerPortal=yde;exports.DrawerTitle=ept;exports.DrawerTrigger=X2t;exports.DropdownMenu=WR;exports.DropdownMenuCheckboxItem=h$;exports.DropdownMenuContent=YR;exports.DropdownMenuGroup=rpt;exports.DropdownMenuItem=xde;exports.DropdownMenuLabel=apt;exports.DropdownMenuPortal=npt;exports.DropdownMenuRadioGroup=ipt;exports.DropdownMenuRadioItem=opt;exports.DropdownMenuSeparator=lpt;exports.DropdownMenuShortcut=spt;exports.DropdownMenuSub=cpt;exports.DropdownMenuSubContent=dpt;exports.DropdownMenuSubTrigger=upt;exports.DropdownMenuTrigger=UR;exports.Empty=fpt;exports.EmptyContent=bpt;exports.EmptyDescription=vpt;exports.EmptyHeader=hpt;exports.EmptyMedia=mpt;exports.EmptyTitle=gpt;exports.ErrorMessage=Ede;exports.FieldDescription=Qv;exports.FormCheckbox=Zm;exports.FormCombobox=ypt;exports.FormControl=wi;exports.FormDatePicker=Mpt;exports.FormDescription=Ni;exports.FormField=Zr;exports.FormFileUpload=Fde;exports.FormInput=Rpt;exports.FormItem=_r;exports.FormLabel=yi;exports.FormMessage=Jr;exports.FormPassword=Ipt;exports.FormPhoneInput=_St;exports.FormRadio=Ppt;exports.FormSelect=Spt;exports.FormSlider=Fpt;exports.FormSortableList=C3t;exports.FormSwitch=S3t;exports.FormTextarea=$3t;exports.FormTimePicker=$pt;exports.FormattedDate=b2t;exports.HoverCard=kSt;exports.HoverCardContent=jSt;exports.HoverCardTrigger=LSt;exports.Icon=HSt;exports.Input=gs;exports.InputField=y5;exports.InputOTP=n$t;exports.Kbd=r$t;exports.KbdGroup=i$t;exports.Label=Io;exports.MessagingPhone=o$t;exports.MessagingPreview=bI;exports.MobilePreviewMessage=gI;exports.MultiSelectDropdown=a$t;exports.NativeSelect=l$t;exports.NativeSelectOptGroup=c$t;exports.NativeSelectOption=s$t;exports.Pagination=u$t;exports.PaginationContent=d$t;exports.PaginationEllipsis=m$t;exports.PaginationItem=f$t;exports.PaginationLink=yI;exports.PaginationNext=p$t;exports.PaginationPrevious=h$t;exports.PhoneInput=pI;exports.PhonePreview=afe;exports.Popover=W2;exports.PopoverAnchor=ode;exports.PopoverContent=ef;exports.PopoverTrigger=Q1;exports.PreviewCarousel=lfe;exports.PreviewRichMedia=vI;exports.QuillEditor=ohe;exports.RadioGroup=Tde;exports.RadioGroupItem=Dde;exports.RecommendationCard=JOt;exports.ScrollArea=Q1e;exports.ScrollBar=efe;exports.Select=Mde;exports.SelectContent=Ode;exports.SelectField=JR;exports.SelectGroup=wpt;exports.SelectItem=Rde;exports.SelectLabel=xpt;exports.SelectMultiField=QNt;exports.SelectScrollDownButton=Pde;exports.SelectScrollUpButton=Ide;exports.SelectSeparator=Ept;exports.SelectTrigger=Nde;exports.SelectValue=Ade;exports.Separator=p0;exports.Sheet=Ufe;exports.SheetClose=tOt;exports.SheetContent=Yfe;exports.SheetDescription=Zfe;exports.SheetFooter=iOt;exports.SheetHeader=Xfe;exports.SheetTitle=Kfe;exports.SheetTrigger=eOt;exports.Sidebar=hOt;exports.SidebarContent=xOt;exports.SidebarFooter=yOt;exports.SidebarGroup=EOt;exports.SidebarGroupAction=SOt;exports.SidebarGroupContent=$Ot;exports.SidebarGroupLabel=COt;exports.SidebarHeader=bOt;exports.SidebarInput=vOt;exports.SidebarInset=gOt;exports.SidebarMenu=MOt;exports.SidebarMenuAction=ROt;exports.SidebarMenuBadge=IOt;exports.SidebarMenuButton=OOt;exports.SidebarMenuItem=AOt;exports.SidebarMenuSkeleton=POt;exports.SidebarMenuSub=FOt;exports.SidebarMenuSubButton=DOt;exports.SidebarMenuSubItem=TOt;exports.SidebarProvider=fOt;exports.SidebarRail=mOt;exports.SidebarSeparator=wOt;exports.SidebarTrigger=pOt;exports.Skeleton=V$;exports.Slider=zde;exports.SortableItem=l1e;exports.SortableList=s1e;exports.Spinner=HOt;exports.Switch=c1e;exports.SwitchField=u1e;exports.Table=Qfe;exports.TableBody=t0e;exports.TableCaption=UOt;exports.TableCell=i3;exports.TableFooter=WOt;exports.TableHead=n0e;exports.TableHeader=e0e;exports.TableRow=Qf;exports.Tabs=BOt;exports.TabsContent=qOt;exports.TabsList=VOt;exports.TabsTrigger=GOt;exports.TextAreaField=d1e;exports.Textarea=zne;exports.Timeline=XOt;exports.Toaster=jOt;exports.Tooltip=KR;exports.TooltipContent=b5;exports.TooltipField=Gu;exports.TooltipProvider=XR;exports.TooltipTrigger=ZR;exports.cn=te;exports.findMatchingPreset=yhe;exports.formatDate=qc;exports.useDataTable=ckt;exports.useDatePreset=bhe;
|