@accounter/client 0.0.9-alpha-20251209101144-c5bcee3a42b5e28a5c7b8d596055b57883dd5f9b → 0.0.9-alpha-20251209101420-6f07b9b59ca013370d2f20b45d085e871eb5710b
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/CHANGELOG.md +1 -1
- package/dist/assets/{Checkbox-Dk34_w7d.js → Checkbox-BqHCZ-C3.js} +1 -1
- package/dist/assets/{MultiSelect-Bdikva9_.js → MultiSelect-2c1nLYL2.js} +1 -1
- package/dist/assets/{Progress-ByZMtYGn.js → Progress-BFSkeDMt.js} +1 -1
- package/dist/assets/{Table-B-QNlR51.js → Table-D9V9aI_v.js} +1 -1
- package/dist/assets/{Typography-DSJQkDjL.js → Typography-BHFqb9bJ.js} +1 -1
- package/dist/assets/{YearPickerInput-Biv149ma.js → YearPickerInput-CsPV7wt7.js} +1 -1
- package/dist/assets/{accordion-MQxBPkIF.js → accordion-xbyamffr.js} +1 -1
- package/dist/assets/{accountant-approvals-Bm-uJEAl.js → accountant-approvals-Y-wWPVfh.js} +1 -1
- package/dist/assets/{accounter-table-DcJDaVlP.js → accounter-table-Dkx6kU93.js} +1 -1
- package/dist/assets/{addDays-CarndWYY.js → addDays-DfihbVgk.js} +1 -1
- package/dist/assets/{all-charges-Cks6Qu5G.js → all-charges-C3I6gJKM.js} +1 -1
- package/dist/assets/{arrow-up-down-DOzpfMEh.js → arrow-up-down-CQ_xDEub.js} +1 -1
- package/dist/assets/{building-2-i4b5oq57.js → building-2-CsrZN7Px.js} +1 -1
- package/dist/assets/{business-Dno1A6jP.js → business-CwKrbxfy.js} +1 -1
- package/dist/assets/{business-extended-info-DxBhHlaI.js → business-extended-info-Cbo9AOR3.js} +1 -1
- package/dist/assets/{business-header-DjWw5d-C.js → business-header-DYbGvijI.js} +1 -1
- package/dist/assets/{business-ledger-filters-Booei2Wn.js → business-ledger-filters-CddmyNN4.js} +1 -1
- package/dist/assets/{business-ledger-single-DDhKLx24.js → business-ledger-single-DBNTJatb.js} +1 -1
- package/dist/assets/{business-trip-BnveFg2c.js → business-trip-PPyW2Xvg.js} +1 -1
- package/dist/assets/charge-C4Z7p9BE.js +1 -0
- package/dist/assets/{charges-filters-PaiAUYzn.js → charges-filters-DNjTkT7_.js} +1 -1
- package/dist/assets/{charges-ledger-validation-BZg8EMCw.js → charges-ledger-validation-DjnQeNKG.js} +1 -1
- package/dist/assets/{charges-table-BnWhSZvO.js → charges-table-CcLHPZeK.js} +1 -1
- package/dist/assets/{chart-CUAV0Q0U.js → chart-WYws6r01.js} +1 -1
- package/dist/assets/{contracts-ClNGcf8d.js → contracts-Bx_1c5oy.js} +1 -1
- package/dist/assets/{data-table-column-header-CL_cRNYC.js → data-table-column-header-CayWYgPg.js} +1 -1
- package/dist/assets/{data-table-pagination-DcDnamxi.js → data-table-pagination-CgOuSdAJ.js} +1 -1
- package/dist/assets/{deposits-transactions-table-buU_sDFa.js → deposits-transactions-table-4s2WbAGQ.js} +1 -1
- package/dist/assets/{download-csv-button-B0yGwo4I.js → download-csv-button-Z-4jE8BY.js} +1 -1
- package/dist/assets/{edit-issue-document-modal-BoOqlyDk.js → edit-issue-document-modal-eF1HUK5A.js} +1 -1
- package/dist/assets/{editable-business-trip-B59sbZJd.js → editable-business-trip-iMHXmbt_.js} +1 -1
- package/dist/assets/{eye-off-Cw3ISceE.js → eye-off-BXZgQHqb.js} +1 -1
- package/dist/assets/{funnel-D8js-5Sh.js → funnel-BjfzDkBA.js} +1 -1
- package/dist/assets/{index-DEZ8dlzN.js → index-2O50cLQv.js} +1 -1
- package/dist/assets/{index-CDfzW3jE.js → index-6nLMj-WX.js} +1 -1
- package/dist/assets/{index-C9y79RyT.js → index-BHENHnSU.js} +1 -1
- package/dist/assets/{index-Co4SaacM.js → index-B_c7vg1A.js} +1 -1
- package/dist/assets/{index-DN0jOrgM.js → index-BjRxkxWO.js} +4 -4
- package/dist/assets/{index-DBNrjrq3.js → index-BwJarodg.js} +1 -1
- package/dist/assets/{index-DTnVMhvV.js → index-C4kEP-j2.js} +1 -1
- package/dist/assets/{index-DFm1EDu-.js → index-C8syveJp.js} +1 -1
- package/dist/assets/{index-D6uO9Mo0.js → index-CLZMOilr.js} +1 -1
- package/dist/assets/{index-NXyN6Sz1.js → index-CXIHCs79.js} +1 -1
- package/dist/assets/{index-DZzIbM_J.js → index-CczsIZNQ.js} +1 -1
- package/dist/assets/{index-B6mBG1MP.js → index-Cj_iGueQ.js} +1 -1
- package/dist/assets/{index-BUPuU_bZ.js → index-D9r_4FAV.js} +1 -1
- package/dist/assets/{index-rSwlhOyI.js → index-DFR7JIGa.js} +1 -1
- package/dist/assets/{index-BqFRXexC.js → index-DLfRFpYq.js} +1 -1
- package/dist/assets/{index-Cs6U0hYg.js → index-DMa2qIgG.js} +1 -1
- package/dist/assets/{index-COk6IP-t.js → index-DTSkV39X.js} +1 -1
- package/dist/assets/{index-CTLLkXH-.js → index-DZ5X5R27.js} +1 -1
- package/dist/assets/{index-CnMKxzm2.js → index-DcV-vnxv.js} +1 -1
- package/dist/assets/{index-BLrRZOvt.js → index-DkZTWC5F.js} +1 -1
- package/dist/assets/{index-CVfZ5u4R.js → index-DuMEnxDo.js} +1 -1
- package/dist/assets/{index-CAQL2y3o.js → index-Fw4weAYq.js} +1 -1
- package/dist/assets/{index-B5-fF043.js → index-Mls6HkOJ.js} +1 -1
- package/dist/assets/{index-CmfnH4xk.js → index-TR4dupWm.js} +1 -1
- package/dist/assets/{index-DV2OrCkl.js → index-YTwKTBQZ.js} +1 -1
- package/dist/assets/{index-BLJd02du.js → index-y15qSIV2.js} +1 -1
- package/dist/assets/{index.es-D_gkz_i2.js → index.es-C5rx50ML.js} +1 -1
- package/dist/assets/{insert-business-trip-modal-BuYPNqZ5.js → insert-business-trip-modal--1CIDfnr.js} +1 -1
- package/dist/assets/issue-document-BCtEHbVp.js +1 -0
- package/dist/assets/{list-plus-D2mKW5PO.js → list-plus-CpRMV6s2.js} +1 -1
- package/dist/assets/{login-page-D8tIHKR8.js → login-page-CSFlyy9e.js} +1 -1
- package/dist/assets/{match-document-modal-D6PsKhMu.js → match-document-modal-DdioAdvr.js} +1 -1
- package/dist/assets/{missing-info-charges-BDOaJ6UE.js → missing-info-charges-RuQGgfpb.js} +1 -1
- package/dist/assets/{modal-DMlGL94H.js → modal-BKrmduS1.js} +1 -1
- package/dist/assets/{modify-contract-dialog-BfJhEfvf.js → modify-contract-dialog-CpK_X1nV.js} +1 -1
- package/dist/assets/{page-layout-DkplGZjh.js → page-layout-BBlz26KF.js} +1 -1
- package/dist/assets/{page-not-found-SZ2CB0YT.js → page-not-found-DFQ8qtlR.js} +1 -1
- package/dist/assets/{panel-top-open-tLrpKolT.js → panel-top-open-CCGK7vV8.js} +1 -1
- package/dist/assets/{pencil-2WLbG0du.js → pencil-DX6I76ue.js} +1 -1
- package/dist/assets/{report-commentary-row-BkpEgzPD.js → report-commentary-row-Ue7xrhZx.js} +1 -1
- package/dist/assets/{save-DNfSshRM.js → save-DSvAUmXd.js} +1 -1
- package/dist/assets/{similar-transactions-modal-DgkbaClg.js → similar-transactions-modal-loXJAFyJ.js} +1 -1
- package/dist/assets/{sub-DFxZVrAr.js → sub-CjPEJ3DQ.js} +1 -1
- package/dist/assets/subMonths-C_5P58Od.js +1 -0
- package/dist/assets/{summary-C03Y4GiT.js → summary-kQJFxtwg.js} +1 -1
- package/dist/assets/{toggle-expansion-button-05DL51Xq.js → toggle-expansion-button-Df44XG06.js} +1 -1
- package/dist/assets/tooltip-Dud6UVaq.js +1 -0
- package/dist/assets/{use-url-query-kGDTdklP.js → use-url-query-WKwSEYSO.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/charge-DVtJqjdK.js +0 -1
- package/dist/assets/issue-document-CPLyogyO.js +0 -1
- package/dist/assets/subMonths-DSpQu9ZS.js +0 -1
- package/dist/assets/tooltip-DuTrHPPf.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/all-charges-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/all-charges-C3I6gJKM.js","assets/use-url-query-WKwSEYSO.js","assets/charges-filters-DNjTkT7_.js","assets/modal-BKrmduS1.js","assets/funnel-BjfzDkBA.js","assets/sub-CjPEJ3DQ.js","assets/addDays-DfihbVgk.js","assets/subMonths-C_5P58Od.js","assets/MultiSelect-2c1nLYL2.js","assets/charges-table-CcLHPZeK.js","assets/toggle-expansion-button-Df44XG06.js","assets/panel-top-open-CCGK7vV8.js","assets/index-CXIHCs79.js","assets/similar-transactions-modal-loXJAFyJ.js","assets/list-plus-CpRMV6s2.js","assets/tooltip-Dud6UVaq.js","assets/Table-D9V9aI_v.js","assets/summary-kQJFxtwg.js","assets/deposits-transactions-table-4s2WbAGQ.js","assets/Checkbox-BqHCZ-C3.js","assets/accordion-xbyamffr.js","assets/data-table-column-header-CayWYgPg.js","assets/eye-off-BXZgQHqb.js","assets/match-document-modal-DdioAdvr.js","assets/YearPickerInput-CsPV7wt7.js","assets/insert-business-trip-modal--1CIDfnr.js","assets/accounter-table-Dkx6kU93.js","assets/page-layout-BBlz26KF.js","assets/missing-info-charges-RuQGgfpb.js","assets/charge-C4Z7p9BE.js","assets/charges-ledger-validation-DjnQeNKG.js","assets/Progress-BFSkeDMt.js","assets/index-Cj_iGueQ.js","assets/business-header-DYbGvijI.js","assets/building-2-CsrZN7Px.js","assets/business-CwKrbxfy.js","assets/save-DSvAUmXd.js","assets/business-extended-info-Cbo9AOR3.js","assets/download-csv-button-Z-4jE8BY.js","assets/chart-WYws6r01.js","assets/sequential-CAnleQny.js","assets/modify-contract-dialog-CpK_X1nV.js","assets/pencil-DX6I76ue.js","assets/index-TR4dupWm.js","assets/business-ledger-filters-CddmyNN4.js","assets/business-ledger-single-DBNTJatb.js","assets/contracts-Bx_1c5oy.js","assets/edit-issue-document-modal-eF1HUK5A.js","assets/index-DcV-vnxv.js","assets/editable-business-trip-iMHXmbt_.js","assets/business-trip-PPyW2Xvg.js","assets/index-BwJarodg.js","assets/index-DLfRFpYq.js","assets/Typography-BHFqb9bJ.js","assets/index-2O50cLQv.js","assets/data-table-pagination-CgOuSdAJ.js","assets/arrow-up-down-CQ_xDEub.js","assets/issue-document-BCtEHbVp.js","assets/index-DZ5X5R27.js","assets/index-BHENHnSU.js","assets/index-CczsIZNQ.js","assets/index-C8syveJp.js","assets/graphql-document-dedupe-fragments-ByT8-wlV.js","assets/index-DFR7JIGa.js","assets/report-commentary-row-Ue7xrhZx.js","assets/index-DTSkV39X.js","assets/index-Fw4weAYq.js","assets/index-C4kEP-j2.js","assets/index-DkZTWC5F.js","assets/index-Mls6HkOJ.js","assets/index-D9r_4FAV.js","assets/index-B_c7vg1A.js","assets/index-YTwKTBQZ.js","assets/accountant-approvals-Y-wWPVfh.js","assets/index-DuMEnxDo.js","assets/index-y15qSIV2.js","assets/index-6nLMj-WX.js","assets/index-DMa2qIgG.js","assets/index-CLZMOilr.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var cM=t=>{throw TypeError(t)};var DE=(t,e,n)=>e.has(t)||cM("Cannot "+n);var Ur=(t,e,n)=>(DE(t,e,"read from private field"),n?n.call(t):e.get(t)),Gd=(t,e,n)=>e.has(t)?cM("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Vs=(t,e,n,i)=>(DE(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),qd=(t,e,n)=>(DE(t,e,"access private method"),n);var dM=(t,e,n,i)=>({set _(r){Vs(t,e,r,n)},get _(){return Ur(t,e,i)}});function Yge(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const a=Object.getOwnPropertyDescriptor(i,r);a&&Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();var Ac=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rk(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Xge(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function i(){var r=!1;try{r=this instanceof i}catch{}return r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:function(){return t[i]}})}),n}var IE={exports:{}},U0={};var uM;function Zge(){if(uM)return U0;uM=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,r,a){var o=null;if(a!==void 0&&(o=""+a),r.key!==void 0&&(o=""+r.key),"key"in r){a={};for(var s in r)s!=="key"&&(a[s]=r[s])}else a=r;return r=a.ref,{$$typeof:t,type:i,key:o,ref:r!==void 0?r:null,props:a}}return U0.Fragment=e,U0.jsx=n,U0.jsxs=n,U0}var fM;function Jge(){return fM||(fM=1,IE.exports=Zge()),IE.exports}var y=Jge(),OE={exports:{}};function eve(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var SY={exports:{}},Fa=SY.exports={},au,ou;function _4(){throw new Error("setTimeout has not been defined")}function E4(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?au=setTimeout:au=_4}catch{au=_4}try{typeof clearTimeout=="function"?ou=clearTimeout:ou=E4}catch{ou=E4}})();function wY(t){if(au===setTimeout)return setTimeout(t,0);if((au===_4||!au)&&setTimeout)return au=setTimeout,setTimeout(t,0);try{return au(t,0)}catch{try{return au.call(null,t,0)}catch{return au.call(this,t,0)}}}function tve(t){if(ou===clearTimeout)return clearTimeout(t);if((ou===E4||!ou)&&clearTimeout)return ou=clearTimeout,clearTimeout(t);try{return ou(t)}catch{try{return ou.call(null,t)}catch{return ou.call(this,t)}}}var Cf=[],Kg=!1,oh,Nw=-1;function nve(){!Kg||!oh||(Kg=!1,oh.length?Cf=oh.concat(Cf):Nw=-1,Cf.length&&NY())}function NY(){if(!Kg){var t=wY(nve);Kg=!0;for(var e=Cf.length;e;){for(oh=Cf,Cf=[];++Nw<e;)oh&&oh[Nw].run();Nw=-1,e=Cf.length}oh=null,Kg=!1,tve(t)}}Fa.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];Cf.push(new CY(t,e)),Cf.length===1&&!Kg&&wY(NY)};function CY(t,e){this.fun=t,this.array=e}CY.prototype.run=function(){this.fun.apply(null,this.array)};Fa.title="browser";Fa.browser=!0;Fa.env={};Fa.argv=[];Fa.version="";Fa.versions={};function Pf(){}Fa.on=Pf;Fa.addListener=Pf;Fa.once=Pf;Fa.off=Pf;Fa.removeListener=Pf;Fa.removeAllListeners=Pf;Fa.emit=Pf;Fa.prependListener=Pf;Fa.prependOnceListener=Pf;Fa.listeners=function(t){return[]};Fa.binding=function(t){throw new Error("process.binding is not supported")};Fa.cwd=function(){return"/"};Fa.chdir=function(t){throw new Error("process.chdir is not supported")};Fa.umask=function(){return 0};var ive=SY.exports;const bn=eve(ive);var Vn={},AM;function rve(){if(AM)return Vn;AM=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),h=Symbol.iterator;function m(ie){return ie===null||typeof ie!="object"?null:(ie=h&&ie[h]||ie["@@iterator"],typeof ie=="function"?ie:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,b={};function k(ie,L,j){this.props=ie,this.context=L,this.refs=b,this.updater=j||p}k.prototype.isReactComponent={},k.prototype.setState=function(ie,L){if(typeof ie!="object"&&typeof ie!="function"&&ie!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,ie,L,"setState")},k.prototype.forceUpdate=function(ie){this.updater.enqueueForceUpdate(this,ie,"forceUpdate")};function S(){}S.prototype=k.prototype;function C(ie,L,j){this.props=ie,this.context=L,this.refs=b,this.updater=j||p}var x=C.prototype=new S;x.constructor=C,g(x,k.prototype),x.isPureReactComponent=!0;var F=Array.isArray;function T(){}var E={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function R(ie,L,j){var $=j.ref;return{$$typeof:t,type:ie,key:L,ref:$!==void 0?$:null,props:j}}function V(ie,L){return R(ie.type,L,ie.props)}function U(ie){return typeof ie=="object"&&ie!==null&&ie.$$typeof===t}function P(ie){var L={"=":"=0",":":"=2"};return"$"+ie.replace(/[=:]/g,function(j){return L[j]})}var Z=/\/+/g;function q(ie,L){return typeof ie=="object"&&ie!==null&&ie.key!=null?P(""+ie.key):L.toString(36)}function ae(ie){switch(ie.status){case"fulfilled":return ie.value;case"rejected":throw ie.reason;default:switch(typeof ie.status=="string"?ie.then(T,T):(ie.status="pending",ie.then(function(L){ie.status==="pending"&&(ie.status="fulfilled",ie.value=L)},function(L){ie.status==="pending"&&(ie.status="rejected",ie.reason=L)})),ie.status){case"fulfilled":return ie.value;case"rejected":throw ie.reason}}throw ie}function H(ie,L,j,$,W){var J=typeof ie;(J==="undefined"||J==="boolean")&&(ie=null);var K=!1;if(ie===null)K=!0;else switch(J){case"bigint":case"string":case"number":K=!0;break;case"object":switch(ie.$$typeof){case t:case e:K=!0;break;case d:return K=ie._init,H(K(ie._payload),L,j,$,W)}}if(K)return W=W(ie),K=$===""?"."+q(ie,0):$,F(W)?(j="",K!=null&&(j=K.replace(Z,"$&/")+"/"),H(W,L,j,"",function(Se){return Se})):W!=null&&(U(W)&&(W=V(W,j+(W.key==null||ie&&ie.key===W.key?"":(""+W.key).replace(Z,"$&/")+"/")+K)),L.push(W)),1;K=0;var fe=$===""?".":$+":";if(F(ie))for(var ge=0;ge<ie.length;ge++)$=ie[ge],J=fe+q($,ge),K+=H($,L,j,J,W);else if(ge=m(ie),typeof ge=="function")for(ie=ge.call(ie),ge=0;!($=ie.next()).done;)$=$.value,J=fe+q($,ge++),K+=H($,L,j,J,W);else if(J==="object"){if(typeof ie.then=="function")return H(ae(ie),L,j,$,W);throw L=String(ie),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(ie).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return K}function te(ie,L,j){if(ie==null)return ie;var $=[],W=0;return H(ie,$,"","",function(J){return L.call(j,J,W++)}),$}function Y(ie){if(ie._status===-1){var L=ie._result;L=L(),L.then(function(j){(ie._status===0||ie._status===-1)&&(ie._status=1,ie._result=j)},function(j){(ie._status===0||ie._status===-1)&&(ie._status=2,ie._result=j)}),ie._status===-1&&(ie._status=0,ie._result=L)}if(ie._status===1)return ie._result.default;throw ie._result}var ue=typeof reportError=="function"?reportError:function(ie){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof ie=="object"&&ie!==null&&typeof ie.message=="string"?String(ie.message):String(ie),error:ie});if(!window.dispatchEvent(L))return}else if(typeof bn=="object"&&typeof bn.emit=="function"){bn.emit("uncaughtException",ie);return}console.error(ie)},we={map:te,forEach:function(ie,L,j){te(ie,function(){L.apply(this,arguments)},j)},count:function(ie){var L=0;return te(ie,function(){L++}),L},toArray:function(ie){return te(ie,function(L){return L})||[]},only:function(ie){if(!U(ie))throw Error("React.Children.only expected to receive a single React element child.");return ie}};return Vn.Activity=f,Vn.Children=we,Vn.Component=k,Vn.Fragment=n,Vn.Profiler=r,Vn.PureComponent=C,Vn.StrictMode=i,Vn.Suspense=l,Vn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,Vn.__COMPILER_RUNTIME={__proto__:null,c:function(ie){return E.H.useMemoCache(ie)}},Vn.cache=function(ie){return function(){return ie.apply(null,arguments)}},Vn.cacheSignal=function(){return null},Vn.cloneElement=function(ie,L,j){if(ie==null)throw Error("The argument must be a React element, but you passed "+ie+".");var $=g({},ie.props),W=ie.key;if(L!=null)for(J in L.key!==void 0&&(W=""+L.key),L)!I.call(L,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&L.ref===void 0||($[J]=L[J]);var J=arguments.length-2;if(J===1)$.children=j;else if(1<J){for(var K=Array(J),fe=0;fe<J;fe++)K[fe]=arguments[fe+2];$.children=K}return R(ie.type,W,$)},Vn.createContext=function(ie){return ie={$$typeof:o,_currentValue:ie,_currentValue2:ie,_threadCount:0,Provider:null,Consumer:null},ie.Provider=ie,ie.Consumer={$$typeof:a,_context:ie},ie},Vn.createElement=function(ie,L,j){var $,W={},J=null;if(L!=null)for($ in L.key!==void 0&&(J=""+L.key),L)I.call(L,$)&&$!=="key"&&$!=="__self"&&$!=="__source"&&(W[$]=L[$]);var K=arguments.length-2;if(K===1)W.children=j;else if(1<K){for(var fe=Array(K),ge=0;ge<K;ge++)fe[ge]=arguments[ge+2];W.children=fe}if(ie&&ie.defaultProps)for($ in K=ie.defaultProps,K)W[$]===void 0&&(W[$]=K[$]);return R(ie,J,W)},Vn.createRef=function(){return{current:null}},Vn.forwardRef=function(ie){return{$$typeof:s,render:ie}},Vn.isValidElement=U,Vn.lazy=function(ie){return{$$typeof:d,_payload:{_status:-1,_result:ie},_init:Y}},Vn.memo=function(ie,L){return{$$typeof:c,type:ie,compare:L===void 0?null:L}},Vn.startTransition=function(ie){var L=E.T,j={};E.T=j;try{var $=ie(),W=E.S;W!==null&&W(j,$),typeof $=="object"&&$!==null&&typeof $.then=="function"&&$.then(T,ue)}catch(J){ue(J)}finally{L!==null&&j.types!==null&&(L.types=j.types),E.T=L}},Vn.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},Vn.use=function(ie){return E.H.use(ie)},Vn.useActionState=function(ie,L,j){return E.H.useActionState(ie,L,j)},Vn.useCallback=function(ie,L){return E.H.useCallback(ie,L)},Vn.useContext=function(ie){return E.H.useContext(ie)},Vn.useDebugValue=function(){},Vn.useDeferredValue=function(ie,L){return E.H.useDeferredValue(ie,L)},Vn.useEffect=function(ie,L){return E.H.useEffect(ie,L)},Vn.useEffectEvent=function(ie){return E.H.useEffectEvent(ie)},Vn.useId=function(){return E.H.useId()},Vn.useImperativeHandle=function(ie,L,j){return E.H.useImperativeHandle(ie,L,j)},Vn.useInsertionEffect=function(ie,L){return E.H.useInsertionEffect(ie,L)},Vn.useLayoutEffect=function(ie,L){return E.H.useLayoutEffect(ie,L)},Vn.useMemo=function(ie,L){return E.H.useMemo(ie,L)},Vn.useOptimistic=function(ie,L){return E.H.useOptimistic(ie,L)},Vn.useReducer=function(ie,L,j){return E.H.useReducer(ie,L,j)},Vn.useRef=function(ie){return E.H.useRef(ie)},Vn.useState=function(ie){return E.H.useState(ie)},Vn.useSyncExternalStore=function(ie,L,j){return E.H.useSyncExternalStore(ie,L,j)},Vn.useTransition=function(){return E.H.useTransition()},Vn.version="19.2.1",Vn}var mM;function Yx(){return mM||(mM=1,OE.exports=rve()),OE.exports}var N=Yx();const se=Rk(N),Bf=Yge({__proto__:null,default:se},[N]);var RE={exports:{}},M0={},PE={exports:{}},LE={};var hM;function ave(){return hM||(hM=1,(function(t){function e(H,te){var Y=H.length;H.push(te);e:for(;0<Y;){var ue=Y-1>>>1,we=H[ue];if(0<r(we,te))H[ue]=te,H[Y]=we,Y=ue;else break e}}function n(H){return H.length===0?null:H[0]}function i(H){if(H.length===0)return null;var te=H[0],Y=H.pop();if(Y!==te){H[0]=Y;e:for(var ue=0,we=H.length,ie=we>>>1;ue<ie;){var L=2*(ue+1)-1,j=H[L],$=L+1,W=H[$];if(0>r(j,Y))$<we&&0>r(W,j)?(H[ue]=W,H[$]=Y,ue=$):(H[ue]=j,H[L]=Y,ue=L);else if($<we&&0>r(W,Y))H[ue]=W,H[$]=Y,ue=$;else break e}}return te}function r(H,te){var Y=H.sortIndex-te.sortIndex;return Y!==0?Y:H.id-te.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var l=[],c=[],d=1,f=null,h=3,m=!1,p=!1,g=!1,b=!1,k=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function x(H){for(var te=n(c);te!==null;){if(te.callback===null)i(c);else if(te.startTime<=H)i(c),te.sortIndex=te.expirationTime,e(l,te);else break;te=n(c)}}function F(H){if(g=!1,x(H),!p)if(n(l)!==null)p=!0,T||(T=!0,P());else{var te=n(c);te!==null&&ae(F,te.startTime-H)}}var T=!1,E=-1,I=5,R=-1;function V(){return b?!0:!(t.unstable_now()-R<I)}function U(){if(b=!1,T){var H=t.unstable_now();R=H;var te=!0;try{e:{p=!1,g&&(g=!1,S(E),E=-1),m=!0;var Y=h;try{t:{for(x(H),f=n(l);f!==null&&!(f.expirationTime>H&&V());){var ue=f.callback;if(typeof ue=="function"){f.callback=null,h=f.priorityLevel;var we=ue(f.expirationTime<=H);if(H=t.unstable_now(),typeof we=="function"){f.callback=we,x(H),te=!0;break t}f===n(l)&&i(l),x(H)}else i(l);f=n(l)}if(f!==null)te=!0;else{var ie=n(c);ie!==null&&ae(F,ie.startTime-H),te=!1}}break e}finally{f=null,h=Y,m=!1}te=void 0}}finally{te?P():T=!1}}}var P;if(typeof C=="function")P=function(){C(U)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,q=Z.port2;Z.port1.onmessage=U,P=function(){q.postMessage(null)}}else P=function(){k(U,0)};function ae(H,te){E=k(function(){H(t.unstable_now())},te)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(H){H.callback=null},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_next=function(H){switch(h){case 1:case 2:case 3:var te=3;break;default:te=h}var Y=h;h=te;try{return H()}finally{h=Y}},t.unstable_requestPaint=function(){b=!0},t.unstable_runWithPriority=function(H,te){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var Y=h;h=H;try{return te()}finally{h=Y}},t.unstable_scheduleCallback=function(H,te,Y){var ue=t.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?ue+Y:ue):Y=ue,H){case 1:var we=-1;break;case 2:we=250;break;case 5:we=1073741823;break;case 4:we=1e4;break;default:we=5e3}return we=Y+we,H={id:d++,callback:te,priorityLevel:H,startTime:Y,expirationTime:we,sortIndex:-1},Y>ue?(H.sortIndex=Y,e(c,H),n(l)===null&&H===n(c)&&(g?(S(E),E=-1):g=!0,ae(F,Y-ue))):(H.sortIndex=we,e(l,H),p||m||(p=!0,T||(T=!0,P()))),H},t.unstable_shouldYield=V,t.unstable_wrapCallback=function(H){var te=h;return function(){var Y=h;h=te;try{return H.apply(this,arguments)}finally{h=Y}}}})(LE)),LE}var pM;function ove(){return pM||(pM=1,PE.exports=ave()),PE.exports}var UE={exports:{}},qo={};var gM;function sve(){if(gM)return qo;gM=1;var t=Yx();function e(l){var c="https://react.dev/errors/"+l;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)c+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+l+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},r=Symbol.for("react.portal");function a(l,c,d){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:f==null?null:""+f,children:l,containerInfo:c,implementation:d}}var o=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function s(l,c){if(l==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return qo.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,qo.createPortal=function(l,c){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(e(299));return a(l,c,null,d)},qo.flushSync=function(l){var c=o.T,d=i.p;try{if(o.T=null,i.p=2,l)return l()}finally{o.T=c,i.p=d,i.d.f()}},qo.preconnect=function(l,c){typeof l=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,i.d.C(l,c))},qo.prefetchDNS=function(l){typeof l=="string"&&i.d.D(l)},qo.preinit=function(l,c){if(typeof l=="string"&&c&&typeof c.as=="string"){var d=c.as,f=s(d,c.crossOrigin),h=typeof c.integrity=="string"?c.integrity:void 0,m=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;d==="style"?i.d.S(l,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:f,integrity:h,fetchPriority:m}):d==="script"&&i.d.X(l,{crossOrigin:f,integrity:h,fetchPriority:m,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},qo.preinitModule=function(l,c){if(typeof l=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var d=s(c.as,c.crossOrigin);i.d.M(l,{crossOrigin:d,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})}}else c==null&&i.d.M(l)},qo.preload=function(l,c){if(typeof l=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var d=c.as,f=s(d,c.crossOrigin);i.d.L(l,d,{crossOrigin:f,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},qo.preloadModule=function(l,c){if(typeof l=="string")if(c){var d=s(c.as,c.crossOrigin);i.d.m(l,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:d,integrity:typeof c.integrity=="string"?c.integrity:void 0})}else i.d.m(l)},qo.requestFormReset=function(l){i.d.r(l)},qo.unstable_batchedUpdates=function(l,c){return l(c)},qo.useFormState=function(l,c,d){return o.H.useFormState(l,c,d)},qo.useFormStatus=function(){return o.H.useHostTransitionStatus()},qo.version="19.2.1",qo}var vM;function xY(){if(vM)return UE.exports;vM=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),UE.exports=sve(),UE.exports}var yM;function lve(){if(yM)return M0;yM=1;var t=ove(),e=Yx(),n=xY();function i(u){var A="https://react.dev/errors/"+u;if(1<arguments.length){A+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)A+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+u+"; visit "+A+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)}function a(u){var A=u,v=u;if(u.alternate)for(;A.return;)A=A.return;else{u=A;do A=u,(A.flags&4098)!==0&&(v=A.return),u=A.return;while(u)}return A.tag===3?v:null}function o(u){if(u.tag===13){var A=u.memoizedState;if(A===null&&(u=u.alternate,u!==null&&(A=u.memoizedState)),A!==null)return A.dehydrated}return null}function s(u){if(u.tag===31){var A=u.memoizedState;if(A===null&&(u=u.alternate,u!==null&&(A=u.memoizedState)),A!==null)return A.dehydrated}return null}function l(u){if(a(u)!==u)throw Error(i(188))}function c(u){var A=u.alternate;if(!A){if(A=a(u),A===null)throw Error(i(188));return A!==u?null:u}for(var v=u,w=A;;){var B=v.return;if(B===null)break;var O=B.alternate;if(O===null){if(w=B.return,w!==null){v=w;continue}break}if(B.child===O.child){for(O=B.child;O;){if(O===v)return l(B),u;if(O===w)return l(B),A;O=O.sibling}throw Error(i(188))}if(v.return!==w.return)v=B,w=O;else{for(var de=!1,Ce=B.child;Ce;){if(Ce===v){de=!0,v=B,w=O;break}if(Ce===w){de=!0,w=B,v=O;break}Ce=Ce.sibling}if(!de){for(Ce=O.child;Ce;){if(Ce===v){de=!0,v=O,w=B;break}if(Ce===w){de=!0,w=O,v=B;break}Ce=Ce.sibling}if(!de)throw Error(i(189))}}if(v.alternate!==w)throw Error(i(190))}if(v.tag!==3)throw Error(i(188));return v.stateNode.current===v?u:A}function d(u){var A=u.tag;if(A===5||A===26||A===27||A===6)return u;for(u=u.child;u!==null;){if(A=d(u),A!==null)return A;u=u.sibling}return null}var f=Object.assign,h=Symbol.for("react.element"),m=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),C=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),V=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function P(u){return u===null||typeof u!="object"?null:(u=U&&u[U]||u["@@iterator"],typeof u=="function"?u:null)}var Z=Symbol.for("react.client.reference");function q(u){if(u==null)return null;if(typeof u=="function")return u.$$typeof===Z?null:u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case g:return"Fragment";case k:return"Profiler";case b:return"StrictMode";case F:return"Suspense";case T:return"SuspenseList";case R:return"Activity"}if(typeof u=="object")switch(u.$$typeof){case p:return"Portal";case C:return u.displayName||"Context";case S:return(u._context.displayName||"Context")+".Consumer";case x:var A=u.render;return u=u.displayName,u||(u=A.displayName||A.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case E:return A=u.displayName||null,A!==null?A:q(u.type)||"Memo";case I:A=u._payload,u=u._init;try{return q(u(A))}catch{}}return null}var ae=Array.isArray,H=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},ue=[],we=-1;function ie(u){return{current:u}}function L(u){0>we||(u.current=ue[we],ue[we]=null,we--)}function j(u,A){we++,ue[we]=u.current,u.current=A}var $=ie(null),W=ie(null),J=ie(null),K=ie(null);function fe(u,A){switch(j(J,A),j(W,u),j($,null),A.nodeType){case 9:case 11:u=(u=A.documentElement)&&(u=u.namespaceURI)?D8(u):0;break;default:if(u=A.tagName,A=A.namespaceURI)A=D8(A),u=I8(A,u);else switch(u){case"svg":u=1;break;case"math":u=2;break;default:u=0}}L($),j($,u)}function ge(){L($),L(W),L(J)}function Se(u){u.memoizedState!==null&&j(K,u);var A=$.current,v=I8(A,u.type);A!==v&&(j(W,u),j($,v))}function oe(u){W.current===u&&(L($),L(W)),K.current===u&&(L(K),O0._currentValue=Y)}var le,Ee;function Le(u){if(le===void 0)try{throw Error()}catch(v){var A=v.stack.trim().match(/\n( *(at )?)/);le=A&&A[1]||"",Ee=-1<v.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<v.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+le+u+Ee}var ve=!1;function Ae(u,A){if(!u||ve)return"";ve=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var w={DetermineComponentFrameRoot:function(){try{if(A){var Nt=function(){throw Error()};if(Object.defineProperty(Nt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Nt,[])}catch(ft){var st=ft}Reflect.construct(u,[],Nt)}else{try{Nt.call()}catch(ft){st=ft}u.call(Nt.prototype)}}else{try{throw Error()}catch(ft){st=ft}(Nt=u())&&typeof Nt.catch=="function"&&Nt.catch(function(){})}}catch(ft){if(ft&&st&&typeof ft.stack=="string")return[ft.stack,st.stack]}return[null,null]}};w.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var B=Object.getOwnPropertyDescriptor(w.DetermineComponentFrameRoot,"name");B&&B.configurable&&Object.defineProperty(w.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var O=w.DetermineComponentFrameRoot(),de=O[0],Ce=O[1];if(de&&Ce){var je=de.split(`
|
|
@@ -141,7 +141,7 @@ T* `):M.join(` Tj
|
|
|
141
141
|
endobj\r
|
|
142
142
|
`},n.outline.count_r=function(i,r){for(var a=0;a<r.children.length;a++)i.count++,this.count_r(i,r.children[a]);return i.count}}])})(vn.API),(function(t){var e=[192,193,194,195,196,197,198,199];t.processJPEG=function(n,i,r,a,o,s){var l,c=this.decode.DCT_DECODE,d=null;if(typeof n=="string"||this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n)){switch(n=o||n,n=this.__addimage__.isArrayBuffer(n)?new Uint8Array(n):n,l=(function(f){for(var h,m=256*f.charCodeAt(4)+f.charCodeAt(5),p=f.length,g={width:0,height:0,numcomponents:1},b=4;b<p;b+=2){if(b+=m,e.indexOf(f.charCodeAt(b+1))!==-1){h=256*f.charCodeAt(b+5)+f.charCodeAt(b+6),g={width:256*f.charCodeAt(b+7)+f.charCodeAt(b+8),height:h,numcomponents:f.charCodeAt(b+9)};break}m=256*f.charCodeAt(b+2)+f.charCodeAt(b+3)}return g})(n=this.__addimage__.isArrayBufferView(n)?this.__addimage__.arrayBufferToBinaryString(n):n),l.numcomponents){case 1:s=this.color_spaces.DEVICE_GRAY;break;case 4:s=this.color_spaces.DEVICE_CMYK;break;case 3:s=this.color_spaces.DEVICE_RGB}d={data:n,width:l.width,height:l.height,colorSpace:s,bitsPerComponent:8,filter:c,index:i,alias:r}}return d}})(vn.API),vn.API.processPNG=function(t,e,n,i){if(this.__addimage__.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.__addimage__.isArrayBufferView(t)){var r,a=Mze(t,{checkCrc:!0}),o=a.width,s=a.height,l=a.channels,c=a.palette,d=a.depth;r=c&&l===1?(function(I){for(var R=I.width,V=I.height,U=I.data,P=I.palette,Z=I.depth,q=!1,ae=[],H=[],te=void 0,Y=!1,ue=0,we=0;we<P.length;we++){var ie=sG(P[we],4),L=ie[0],j=ie[1],$=ie[2],W=ie[3];ae.push(L,j,$),W!=null&&(W===0?(ue++,H.length<1&&H.push(we)):W<255&&(Y=!0))}if(Y||ue>1){q=!0,H=void 0;var J=R*V;te=new Uint8Array(J);for(var K=new DataView(U.buffer),fe=0;fe<J;fe++){var ge=ED(K,fe,Z),Se=sG(P[ge],4)[3];te[fe]=Se}}else ue===0&&(H=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:q?8:void 0,colorBytes:U,alphaBytes:te,needSMask:q,palette:ae,mask:H}})(a):l===2||l===4?(function(I){for(var R=I.data,V=I.width,U=I.height,P=I.channels,Z=I.depth,q=P===2?"DeviceGray":"DeviceRGB",ae=P-1,H=V*U,te=ae,Y=H*te,ue=1*H,we=Math.ceil(Y*Z/8),ie=Math.ceil(ue*Z/8),L=new Uint8Array(we),j=new Uint8Array(ie),$=new DataView(R.buffer),W=new DataView(L.buffer),J=new DataView(j.buffer),K=!1,fe=0;fe<H;fe++){for(var ge=fe*P,Se=0;Se<te;Se++)fq(W,ED($,ge+Se,Z),fe*te+Se,Z);var oe=ED($,ge+te,Z);oe<(1<<Z)-1&&(K=!0),fq(J,oe,1*fe,Z)}return{colorSpace:q,colorsPerPixel:ae,sMaskBitsPerComponent:K?Z:void 0,colorBytes:L,alphaBytes:j,needSMask:K}})(a):(function(I){var R=I.data,V=I.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:V,colorsPerPixel:V==="DeviceGray"?1:3,colorBytes:R instanceof Uint16Array?(function(U){for(var P=U.length,Z=new Uint8Array(2*P),q=new DataView(Z.buffer,Z.byteOffset,Z.byteLength),ae=0;ae<P;ae++)q.setUint16(2*ae,U[ae],!1);return Z})(R):R,needSMask:!1}})(a);var f,h,m,p=r,g=p.colorSpace,b=p.colorsPerPixel,k=p.sMaskBitsPerComponent,S=p.colorBytes,C=p.alphaBytes,x=p.needSMask,F=p.palette,T=p.mask,E=null;return i!==vn.API.image_compression.NONE&&typeof HI=="function"?(E=(function(I){var R;switch(I){case vn.API.image_compression.FAST:R=11;break;case vn.API.image_compression.MEDIUM:R=13;break;case vn.API.image_compression.SLOW:R=14;break;default:R=12}return R})(i),f=this.decode.FLATE_DECODE,h="/Predictor ".concat(E," /Colors ").concat(b," /BitsPerComponent ").concat(d," /Columns ").concat(o),t=sq(S,Math.ceil(o*b*d/8),b,d,i),x&&(m=sq(C,Math.ceil(o*k/8),1,k,i))):(f=void 0,h=void 0,t=S,x&&(m=C)),(this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t))&&(t=this.__addimage__.arrayBufferToBinaryString(t)),(m&&this.__addimage__.isArrayBuffer(m)||this.__addimage__.isArrayBufferView(m))&&(m=this.__addimage__.arrayBufferToBinaryString(m)),{alias:n,data:t,index:e,filter:f,decodeParameters:h,transparency:T,palette:F,sMask:m,predictor:E,width:o,height:s,bitsPerComponent:d,sMaskBitsPerComponent:k,colorSpace:g}}},(function(t){t.processGIF89A=function(e,n,i,r){var a=new oVe(e),o=a.width,s=a.height,l=[];a.decodeAndBlitFrameRGBA(0,l);var c={data:l,width:o,height:s},d=new BD(100).encode(c,100);return t.processJPEG.call(this,d,n,i,r)},t.processGIF87A=t.processGIF89A})(vn.API),Xc.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var e=0;e<t;e++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:r,green:i,blue:n,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Xc.prototype.parseBGR=function(){this.pos=this.offset;try{var t="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Uint8Array(e),this[t]()}catch(n){kr.log("bit decode error:"+n)}},Xc.prototype.bit1=function(){var t,e=Math.ceil(this.width/8),n=e%4;for(t=this.height-1;t>=0;t--){for(var i=this.bottom_up?t:this.height-1-t,r=0;r<e;r++)for(var a=this.datav.getUint8(this.pos++,!0),o=i*this.width*4+8*r*4,s=0;s<8&&8*r+s<this.width;s++){var l=this.palette[a>>7-s&1];this.data[o+4*s]=l.blue,this.data[o+4*s+1]=l.green,this.data[o+4*s+2]=l.red,this.data[o+4*s+3]=255}n!==0&&(this.pos+=4-n)}},Xc.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,r=0;r<t;r++){var a=this.datav.getUint8(this.pos++,!0),o=i*this.width*4+2*r*4,s=a>>4,l=15&a,c=this.palette[s];if(this.data[o]=c.blue,this.data[o+1]=c.green,this.data[o+2]=c.red,this.data[o+3]=255,2*r+1>=this.width)break;c=this.palette[l],this.data[o+4]=c.blue,this.data[o+4+1]=c.green,this.data[o+4+2]=c.red,this.data[o+4+3]=255}e!==0&&(this.pos+=4-e)}},Xc.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,i=0;i<this.width;i++){var r=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+4*i;if(r<this.palette.length){var o=this.palette[r];this.data[a]=o.red,this.data[a+1]=o.green,this.data[a+2]=o.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}t!==0&&(this.pos+=4-t)}},Xc.prototype.bit15=function(){for(var t=this.width%3,e=parseInt("11111",2),n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,r=0;r<this.width;r++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(a&e)/e*255|0,s=(a>>5&e)/e*255|0,l=(a>>10&e)/e*255|0,c=a>>15?255:0,d=i*this.width*4+4*r;this.data[d]=l,this.data[d+1]=s,this.data[d+2]=o,this.data[d+3]=c}this.pos+=t}},Xc.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),n=parseInt("111111",2),i=this.height-1;i>=0;i--){for(var r=this.bottom_up?i:this.height-1-i,a=0;a<this.width;a++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&e)/e*255|0,l=(o>>5&n)/n*255|0,c=(o>>11)/e*255|0,d=r*this.width*4+4*a;this.data[d]=c,this.data[d+1]=l,this.data[d+2]=s,this.data[d+3]=255}this.pos+=t}},Xc.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=e*this.width*4+4*n;this.data[o]=a,this.data[o+1]=r,this.data[o+2]=i,this.data[o+3]=255}this.pos+=this.width%4}},Xc.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var e=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*n;this.data[s]=a,this.data[s+1]=r,this.data[s+2]=i,this.data[s+3]=o}},Xc.prototype.getData=function(){return this.data},(function(t){t.processBMP=function(e,n,i,r){var a=new Xc(e,!1),o=a.width,s=a.height,l={data:a.getData(),width:o,height:s},c=new BD(100).encode(l,100);return t.processJPEG.call(this,c,n,i,r)}})(vn.API),mq.prototype.getData=function(){return this.data},(function(t){t.processWEBP=function(e,n,i,r){var a=new mq(e),o=a.width,s=a.height,l={data:a.getData(),width:o,height:s},c=new BD(100).encode(l,100);return t.processJPEG.call(this,c,n,i,r)}})(vn.API),vn.API.processRGBA=function(t,e,n){for(var i=t.data,r=i.length,a=new Uint8Array(r/4*3),o=new Uint8Array(r/4),s=0,l=0,c=0;c<r;c+=4){var d=i[c],f=i[c+1],h=i[c+2],m=i[c+3];a[s++]=d,a[s++]=f,a[s++]=h,o[l++]=m}var p=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:p,index:e,alias:n,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},vn.API.setLanguage=function(t){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[t]!==void 0&&(this.internal.languageSettings.languageCode=t,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},pg=vn.API,qS=pg.getCharWidthsArray=function(t,e){var n,i,r=(e=e||{}).font||this.internal.getFont(),a=e.fontSize||this.internal.getFontSize(),o=e.charSpace||this.internal.getCharSpace(),s=e.widths?e.widths:r.metadata.Unicode.widths,l=s.fof?s.fof:1,c=e.kerning?e.kerning:r.metadata.Unicode.kerning,d=c.fof?c.fof:1,f=e.doKerning!==!1,h=0,m=t.length,p=0,g=s[0]||l,b=[];for(n=0;n<m;n++)i=t.charCodeAt(n),typeof r.metadata.widthOfString=="function"?b.push((r.metadata.widthOfGlyph(r.metadata.characterToGlyph(i))+o*(1e3/a)||0)/1e3):(h=f&&or(c[i])==="object"&&!isNaN(parseInt(c[i][p],10))?c[i][p]/d:0,b.push((s[i]||g)/l+h)),p=i;return b},rq=pg.getStringUnitWidth=function(t,e){var n=(e=e||{}).fontSize||this.internal.getFontSize(),i=e.font||this.internal.getFont(),r=e.charSpace||this.internal.getCharSpace();return pg.processArabic&&(t=pg.processArabic(t)),typeof i.metadata.widthOfString=="function"?i.metadata.widthOfString(t,n,r)/n:qS.apply(this,arguments).reduce(function(a,o){return a+o},0)},aq=function(t,e,n,i){for(var r=[],a=0,o=t.length,s=0;a!==o&&s+e[a]<n;)s+=e[a],a++;r.push(t.slice(0,a));var l=a;for(s=0;a!==o;)s+e[a]>i&&(r.push(t.slice(l,a)),s=0,l=a),s+=e[a],a++;return l!==a&&r.push(t.slice(l,a)),r},oq=function(t,e,n){n||(n={});var i,r,a,o,s,l,c,d=[],f=[d],h=n.textIndent||0,m=0,p=0,g=t.split(" "),b=qS.apply(this,[" ",n])[0];if(l=n.lineIndent===-1?g[0].length+2:n.lineIndent||0){var k=Array(l).join(" "),S=[];g.map(function(x){(x=x.split(/\s*\n/)).length>1?S=S.concat(x.map(function(F,T){return(T&&F.length?`
|
|
143
143
|
`:"")+F})):S.push(x[0])}),g=S,l=rq.apply(this,[k,n])}for(a=0,o=g.length;a<o;a++){var C=0;if(i=g[a],l&&i[0]==`
|
|
144
|
-
`&&(i=i.substr(1),C=1),h+m+(p=(r=qS.apply(this,[i,n])).reduce(function(x,F){return x+F},0))>e||C){if(p>e){for(s=aq.apply(this,[i,r,e-(h+m),e]),d.push(s.shift()),d=[s.pop()];s.length;)f.push([s.shift()]);p=r.slice(i.length-(d[0]?d[0].length:0)).reduce(function(x,F){return x+F},0)}else d=[i];f.push(d),h=p+l,m=b}else d.push(i),h+=m+p,m=b}return c=l?function(x,F){return(F?k:"")+x.join(" ")}:function(x){return x.join(" ")},f.map(c)},pg.splitTextToSize=function(t,e,n){var i,r=(n=n||{}).fontSize||this.internal.getFontSize(),a=(function(d){if(d.widths&&d.kerning)return{widths:d.widths,kerning:d.kerning};var f=this.internal.getFont(d.fontName,d.fontStyle),h="Unicode";return f.metadata[h]?{widths:f.metadata[h].widths||{0:1},kerning:f.metadata[h].kerning||{}}:{font:f.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);i=Array.isArray(t)?t:String(t).split(/\r?\n/);var o=1*this.internal.scaleFactor*e/r;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/r:0,a.lineIndent=n.lineIndent;var s,l,c=[];for(s=0,l=i.length;s<l;s++)c=c.concat(oq.apply(this,[i[s],o,a]));return c},(function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var e="0123456789abcdef",n="klmnopqrstuvwxyz",i={},r={},a=0;a<16;a++)i[n[a]]=e[a],r[e[a]]=n[a];var o=function(h){return"0x"+parseInt(h,10).toString(16)},s=t.__fontmetrics__.compress=function(h){var m,p,g,b,k=["{"];for(var S in h){if(m=h[S],isNaN(parseInt(S,10))?p="'"+S+"'":(S=parseInt(S,10),p=(p=o(S).slice(2)).slice(0,-1)+r[p.slice(-1)]),typeof m=="number")m<0?(g=o(m).slice(3),b="-"):(g=o(m).slice(2),b=""),g=b+g.slice(0,-1)+r[g.slice(-1)];else{if(or(m)!=="object")throw new Error("Don't know what to do with value type "+or(m)+".");g=s(m)}k.push(p+g)}return k.push("}"),k.join("")},l=t.__fontmetrics__.uncompress=function(h){if(typeof h!="string")throw new Error("Invalid argument passed to uncompress.");for(var m,p,g,b,k={},S=1,C=k,x=[],F="",T="",E=h.length-1,I=1;I<E;I+=1)(b=h[I])=="'"?m?(g=m.join(""),m=void 0):m=[]:m?m.push(b):b=="{"?(x.push([C,g]),C={},g=void 0):b=="}"?((p=x.pop())[0][p[1]]=C,g=void 0,C=p[0]):b=="-"?S=-1:g===void 0?i.hasOwnProperty(b)?(F+=i[b],g=parseInt(F,16)*S,S=1,F=""):F+=b:i.hasOwnProperty(b)?(T+=i[b],C[g]=parseInt(T,16)*S,S=1,g=void 0,T=""):T+=b;return k},c={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},d={Unicode:{Courier:c,"Courier-Bold":c,"Courier-BoldOblique":c,"Courier-Oblique":c,Helvetica:c,"Helvetica-Bold":c,"Helvetica-BoldOblique":c,"Helvetica-Oblique":c,"Times-Roman":c,"Times-Bold":c,"Times-BoldItalic":c,"Times-Italic":c}},f={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":l("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};t.events.push(["addFont",function(h){var m=h.font,p=f.Unicode[m.postScriptName];p&&(m.metadata.Unicode={},m.metadata.Unicode.widths=p.widths,m.metadata.Unicode.kerning=p.kerning);var g=d.Unicode[m.postScriptName];g&&(m.metadata.Unicode.encoding=g,m.encoding=g.codePages[0])}])})(vn.API),(function(t){var e=function(n){for(var i=n.length,r=new Uint8Array(i),a=0;a<i;a++)r[a]=n.charCodeAt(a);return r};t.API.events.push(["addFont",function(n){var i=void 0,r=n.font,a=n.instance;if(!r.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+r.postScriptName+"').");if(typeof(i=a.existsFileInVFS(r.postScriptName)===!1?a.loadFile(r.postScriptName):a.getFileFromVFS(r.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+r.postScriptName+"').");(function(o,s){s=/^\x00\x01\x00\x00/.test(s)?e(s):e(Ww(s)),o.metadata=t.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(r,i)}}])})(vn),vn.API.addSvgAsImage=function(t,e,n,i,r,a,o,s){if(isNaN(e)||isNaN(n))throw kr.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(r))throw kr.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=i,l.height=r;var c=l.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height);var d={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},f=this;return(jn.canvg?Promise.resolve(jn.canvg):li(()=>import("./index.es-D_gkz_i2.js"),[])).catch(function(h){return Promise.reject(new Error("Could not load canvg: "+h))}).then(function(h){return h.default?h.default:h}).then(function(h){return h.fromString(c,t,d)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(h){return h.render(d)}).then(function(){f.addImage(l.toDataURL("image/jpeg",1),e,n,i,r,o,s)})},vn.API.putTotalPages=function(t){var e,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),n=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var r=0;r<this.internal.pages[i].length;r++)this.internal.pages[i][r]=this.internal.pages[i][r].replace(e,n);return this},vn.API.viewerPreferences=function(t,e){var n;t=t||{},e=e||!1;var i,r,a,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),l=[],c=0,d=0,f=0;function h(p,g){var b,k=!1;for(b=0;b<p.length;b+=1)p[b]===g&&(k=!0);return k}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,t==="reset"||e===!0){var m=s.length;for(f=0;f<m;f+=1)n[s[f]].value=n[s[f]].defaultValue,n[s[f]].explicitSet=!1}if(or(t)==="object"){for(r in t)if(a=t[r],h(s,r)&&a!==void 0){if(n[r].type==="boolean"&&typeof a=="boolean")n[r].value=a;else if(n[r].type==="name"&&h(n[r].valueSet,a))n[r].value=a;else if(n[r].type==="integer"&&Number.isInteger(a))n[r].value=a;else if(n[r].type==="array"){for(c=0;c<a.length;c+=1)if(i=!0,a[c].length===1&&typeof a[c][0]=="number")l.push(String(a[c]-1));else if(a[c].length>1){for(d=0;d<a[c].length;d+=1)typeof a[c][d]!="number"&&(i=!1);i===!0&&l.push([a[c][0]-1,a[c][1]-1].join(" "))}n[r].value="["+l.join(" ")+"]"}else n[r].value=n[r].defaultValue;n[r].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var p,g=[];for(p in n)n[p].explicitSet===!0&&(n[p].type==="name"?g.push("/"+p+" /"+n[p].value):g.push("/"+p+" "+n[p].value));g.length!==0&&this.internal.write(`/ViewerPreferences
|
|
144
|
+
`&&(i=i.substr(1),C=1),h+m+(p=(r=qS.apply(this,[i,n])).reduce(function(x,F){return x+F},0))>e||C){if(p>e){for(s=aq.apply(this,[i,r,e-(h+m),e]),d.push(s.shift()),d=[s.pop()];s.length;)f.push([s.shift()]);p=r.slice(i.length-(d[0]?d[0].length:0)).reduce(function(x,F){return x+F},0)}else d=[i];f.push(d),h=p+l,m=b}else d.push(i),h+=m+p,m=b}return c=l?function(x,F){return(F?k:"")+x.join(" ")}:function(x){return x.join(" ")},f.map(c)},pg.splitTextToSize=function(t,e,n){var i,r=(n=n||{}).fontSize||this.internal.getFontSize(),a=(function(d){if(d.widths&&d.kerning)return{widths:d.widths,kerning:d.kerning};var f=this.internal.getFont(d.fontName,d.fontStyle),h="Unicode";return f.metadata[h]?{widths:f.metadata[h].widths||{0:1},kerning:f.metadata[h].kerning||{}}:{font:f.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);i=Array.isArray(t)?t:String(t).split(/\r?\n/);var o=1*this.internal.scaleFactor*e/r;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/r:0,a.lineIndent=n.lineIndent;var s,l,c=[];for(s=0,l=i.length;s<l;s++)c=c.concat(oq.apply(this,[i[s],o,a]));return c},(function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var e="0123456789abcdef",n="klmnopqrstuvwxyz",i={},r={},a=0;a<16;a++)i[n[a]]=e[a],r[e[a]]=n[a];var o=function(h){return"0x"+parseInt(h,10).toString(16)},s=t.__fontmetrics__.compress=function(h){var m,p,g,b,k=["{"];for(var S in h){if(m=h[S],isNaN(parseInt(S,10))?p="'"+S+"'":(S=parseInt(S,10),p=(p=o(S).slice(2)).slice(0,-1)+r[p.slice(-1)]),typeof m=="number")m<0?(g=o(m).slice(3),b="-"):(g=o(m).slice(2),b=""),g=b+g.slice(0,-1)+r[g.slice(-1)];else{if(or(m)!=="object")throw new Error("Don't know what to do with value type "+or(m)+".");g=s(m)}k.push(p+g)}return k.push("}"),k.join("")},l=t.__fontmetrics__.uncompress=function(h){if(typeof h!="string")throw new Error("Invalid argument passed to uncompress.");for(var m,p,g,b,k={},S=1,C=k,x=[],F="",T="",E=h.length-1,I=1;I<E;I+=1)(b=h[I])=="'"?m?(g=m.join(""),m=void 0):m=[]:m?m.push(b):b=="{"?(x.push([C,g]),C={},g=void 0):b=="}"?((p=x.pop())[0][p[1]]=C,g=void 0,C=p[0]):b=="-"?S=-1:g===void 0?i.hasOwnProperty(b)?(F+=i[b],g=parseInt(F,16)*S,S=1,F=""):F+=b:i.hasOwnProperty(b)?(T+=i[b],C[g]=parseInt(T,16)*S,S=1,g=void 0,T=""):T+=b;return k},c={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},d={Unicode:{Courier:c,"Courier-Bold":c,"Courier-BoldOblique":c,"Courier-Oblique":c,Helvetica:c,"Helvetica-Bold":c,"Helvetica-BoldOblique":c,"Helvetica-Oblique":c,"Times-Roman":c,"Times-Bold":c,"Times-BoldItalic":c,"Times-Italic":c}},f={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":l("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};t.events.push(["addFont",function(h){var m=h.font,p=f.Unicode[m.postScriptName];p&&(m.metadata.Unicode={},m.metadata.Unicode.widths=p.widths,m.metadata.Unicode.kerning=p.kerning);var g=d.Unicode[m.postScriptName];g&&(m.metadata.Unicode.encoding=g,m.encoding=g.codePages[0])}])})(vn.API),(function(t){var e=function(n){for(var i=n.length,r=new Uint8Array(i),a=0;a<i;a++)r[a]=n.charCodeAt(a);return r};t.API.events.push(["addFont",function(n){var i=void 0,r=n.font,a=n.instance;if(!r.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+r.postScriptName+"').");if(typeof(i=a.existsFileInVFS(r.postScriptName)===!1?a.loadFile(r.postScriptName):a.getFileFromVFS(r.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+r.postScriptName+"').");(function(o,s){s=/^\x00\x01\x00\x00/.test(s)?e(s):e(Ww(s)),o.metadata=t.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(r,i)}}])})(vn),vn.API.addSvgAsImage=function(t,e,n,i,r,a,o,s){if(isNaN(e)||isNaN(n))throw kr.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(r))throw kr.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=i,l.height=r;var c=l.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height);var d={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},f=this;return(jn.canvg?Promise.resolve(jn.canvg):li(()=>import("./index.es-C5rx50ML.js"),[])).catch(function(h){return Promise.reject(new Error("Could not load canvg: "+h))}).then(function(h){return h.default?h.default:h}).then(function(h){return h.fromString(c,t,d)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(h){return h.render(d)}).then(function(){f.addImage(l.toDataURL("image/jpeg",1),e,n,i,r,o,s)})},vn.API.putTotalPages=function(t){var e,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),n=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var r=0;r<this.internal.pages[i].length;r++)this.internal.pages[i][r]=this.internal.pages[i][r].replace(e,n);return this},vn.API.viewerPreferences=function(t,e){var n;t=t||{},e=e||!1;var i,r,a,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),l=[],c=0,d=0,f=0;function h(p,g){var b,k=!1;for(b=0;b<p.length;b+=1)p[b]===g&&(k=!0);return k}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,t==="reset"||e===!0){var m=s.length;for(f=0;f<m;f+=1)n[s[f]].value=n[s[f]].defaultValue,n[s[f]].explicitSet=!1}if(or(t)==="object"){for(r in t)if(a=t[r],h(s,r)&&a!==void 0){if(n[r].type==="boolean"&&typeof a=="boolean")n[r].value=a;else if(n[r].type==="name"&&h(n[r].valueSet,a))n[r].value=a;else if(n[r].type==="integer"&&Number.isInteger(a))n[r].value=a;else if(n[r].type==="array"){for(c=0;c<a.length;c+=1)if(i=!0,a[c].length===1&&typeof a[c][0]=="number")l.push(String(a[c]-1));else if(a[c].length>1){for(d=0;d<a[c].length;d+=1)typeof a[c][d]!="number"&&(i=!1);i===!0&&l.push([a[c][0]-1,a[c][1]-1].join(" "))}n[r].value="["+l.join(" ")+"]"}else n[r].value=n[r].defaultValue;n[r].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var p,g=[];for(p in n)n[p].explicitSet===!0&&(n[p].type==="name"?g.push("/"+p+" /"+n[p].value):g.push("/"+p+" "+n[p].value));g.length!==0&&this.internal.write(`/ViewerPreferences
|
|
145
145
|
<<
|
|
146
146
|
`+g.join(`
|
|
147
147
|
`)+`
|
|
@@ -170,7 +170,7 @@ endbfchar
|
|
|
170
170
|
CMapName currentdict /CMap defineresource pop
|
|
171
171
|
end
|
|
172
172
|
end`};e.events.push(["putFont",function(a){(function(o){var s=o.font,l=o.out,c=o.newObject,d=o.putStream;if(s.metadata instanceof t.API.TTFFont&&s.encoding==="Identity-H"){for(var f=s.metadata.Unicode.widths,h=s.metadata.subset.encode(s.metadata.glyIdsUsed,1),m="",p=0;p<h.length;p++)m+=String.fromCharCode(h[p]);var g=c();d({data:m,addLength1:!0,objectId:g}),l("endobj");var b=c();d({data:i(s.metadata.toUnicode),addLength1:!0,objectId:b}),l("endobj");var k=c();l("<<"),l("/Type /FontDescriptor"),l("/FontName /"+Dg(s.fontName)),l("/FontFile2 "+g+" 0 R"),l("/FontBBox "+t.API.PDFObject.convert(s.metadata.bbox)),l("/Flags "+s.metadata.flags),l("/StemV "+s.metadata.stemV),l("/ItalicAngle "+s.metadata.italicAngle),l("/Ascent "+s.metadata.ascender),l("/Descent "+s.metadata.decender),l("/CapHeight "+s.metadata.capHeight),l(">>"),l("endobj");var S=c();l("<<"),l("/Type /Font"),l("/BaseFont /"+Dg(s.fontName)),l("/FontDescriptor "+k+" 0 R"),l("/W "+t.API.PDFObject.convert(f)),l("/CIDToGIDMap /Identity"),l("/DW 1000"),l("/Subtype /CIDFontType2"),l("/CIDSystemInfo"),l("<<"),l("/Supplement 0"),l("/Registry (Adobe)"),l("/Ordering ("+s.encoding+")"),l(">>"),l(">>"),l("endobj"),s.objectNumber=c(),l("<<"),l("/Type /Font"),l("/Subtype /Type0"),l("/ToUnicode "+b+" 0 R"),l("/BaseFont /"+Dg(s.fontName)),l("/Encoding /"+s.encoding),l("/DescendantFonts ["+S+" 0 R]"),l(">>"),l("endobj"),s.isAlreadyPutted=!0}})(a)}]),e.events.push(["putFont",function(a){(function(o){var s=o.font,l=o.out,c=o.newObject,d=o.putStream;if(s.metadata instanceof t.API.TTFFont&&s.encoding==="WinAnsiEncoding"){for(var f=s.metadata.rawData,h="",m=0;m<f.length;m++)h+=String.fromCharCode(f[m]);var p=c();d({data:h,addLength1:!0,objectId:p}),l("endobj");var g=c();d({data:i(s.metadata.toUnicode),addLength1:!0,objectId:g}),l("endobj");var b=c();l("<<"),l("/Descent "+s.metadata.decender),l("/CapHeight "+s.metadata.capHeight),l("/StemV "+s.metadata.stemV),l("/Type /FontDescriptor"),l("/FontFile2 "+p+" 0 R"),l("/Flags 96"),l("/FontBBox "+t.API.PDFObject.convert(s.metadata.bbox)),l("/FontName /"+Dg(s.fontName)),l("/ItalicAngle "+s.metadata.italicAngle),l("/Ascent "+s.metadata.ascender),l(">>"),l("endobj"),s.objectNumber=c();for(var k=0;k<s.metadata.hmtx.widths.length;k++)s.metadata.hmtx.widths[k]=parseInt(s.metadata.hmtx.widths[k]*(1e3/s.metadata.head.unitsPerEm));l("<</Subtype/TrueType/Type/Font/ToUnicode "+g+" 0 R/BaseFont/"+Dg(s.fontName)+"/FontDescriptor "+b+" 0 R/Encoding/"+s.encoding+" /FirstChar 29 /LastChar 255 /Widths "+t.API.PDFObject.convert(s.metadata.hmtx.widths)+">>"),l("endobj"),s.isAlreadyPutted=!0}})(a)}]);var r=function(a){var o,s=a.text||"",l=a.x,c=a.y,d=a.options||{},f=a.mutex||{},h=f.pdfEscape,m=f.activeFontKey,p=f.fonts,g=m,b="",k=0,S="",C=p[g].encoding;if(p[g].encoding!=="Identity-H")return{text:s,x:l,y:c,options:d,mutex:f};for(S=s,g=m,Array.isArray(s)&&(S=s[0]),k=0;k<S.length;k+=1)p[g].metadata.hasOwnProperty("cmap")&&(o=p[g].metadata.cmap.unicode.codeMap[S[k].charCodeAt(0)]),o||S[k].charCodeAt(0)<256&&p[g].metadata.hasOwnProperty("Unicode")?b+=S[k]:b+="";var x="";return parseInt(g.slice(1))<14||C==="WinAnsiEncoding"?x=h(b,g).split("").map(function(F){return F.charCodeAt(0).toString(16)}).join(""):C==="Identity-H"&&(x=n(b,p[g])),f.isHex=!0,{text:x,x:l,y:c,options:d,mutex:f}};e.events.push(["postProcessText",function(a){var o=a.text||"",s=[],l={text:o,x:a.x,y:a.y,options:a.options,mutex:a.mutex};if(Array.isArray(o)){var c=0;for(c=0;c<o.length;c+=1)Array.isArray(o[c])&&o[c].length===3?s.push([r(Object.assign({},l,{text:o[c][0]})).text,o[c][1],o[c][2]]):s.push(r(Object.assign({},l,{text:o[c]})).text);a.text=s}else a.text=r(Object.assign({},l,{text:o})).text}])})(vn),(function(t){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};t.existsFileInVFS=function(n){return e.call(this),this.internal.vFS[n]!==void 0},t.addFileToVFS=function(n,i){return e.call(this),this.internal.vFS[n]=i,this},t.getFileFromVFS=function(n){return e.call(this),this.internal.vFS[n]!==void 0?this.internal.vFS[n]:null}})(vn.API),(function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(i){var r,a,o,s,l,c,d,f=e,h=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],m=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],p={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},g={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},b=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],k=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),S=!1,C=0;this.__bidiEngine__={};var x=function(U){var P=U.charCodeAt(),Z=P>>8,q=g[Z];return q!==void 0?f[256*q+(255&P)]:Z===252||Z===253?"AL":k.test(Z)?"L":Z===8?"R":"N"},F=function(U){for(var P,Z=0;Z<U.length;Z++){if((P=x(U.charAt(Z)))==="L")return!1;if(P==="R")return!0}return!1},T=function(U,P,Z,q){var ae,H,te,Y,ue=P[q];switch(ue){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":S=!1;break;case"N":case"AN":break;case"EN":S&&(ue="AN");break;case"AL":S=!0,ue="R";break;case"WS":case"BN":ue="N";break;case"CS":q<1||q+1>=P.length||(ae=Z[q-1])!=="EN"&&ae!=="AN"||(H=P[q+1])!=="EN"&&H!=="AN"?ue="N":S&&(H="AN"),ue=H===ae?H:"N";break;case"ES":ue=(ae=q>0?Z[q-1]:"B")==="EN"&&q+1<P.length&&P[q+1]==="EN"?"EN":"N";break;case"ET":if(q>0&&Z[q-1]==="EN"){ue="EN";break}if(S){ue="N";break}for(te=q+1,Y=P.length;te<Y&&P[te]==="ET";)te++;ue=te<Y&&P[te]==="EN"?"EN":"N";break;case"NSM":if(o&&!s){for(Y=P.length,te=q+1;te<Y&&P[te]==="NSM";)te++;if(te<Y){var we=U[q],ie=we>=1425&&we<=2303||we===64286;if(ae=P[te],ie&&(ae==="R"||ae==="AL")){ue="R";break}}}ue=q<1||(ae=P[q-1])==="B"?"N":Z[q-1];break;case"B":S=!1,r=!0,ue=C;break;case"S":a=!0,ue="N"}return ue},E=function(U,P,Z){var q=U.split("");return Z&&I(q,Z,{hiLevel:C}),q.reverse(),P&&P.reverse(),q.join("")},I=function(U,P,Z){var q,ae,H,te,Y,ue=-1,we=U.length,ie=0,L=[],j=C?m:h,$=[];for(S=!1,r=!1,a=!1,ae=0;ae<we;ae++)$[ae]=x(U[ae]);for(H=0;H<we;H++){if(Y=ie,L[H]=T(U,$,L,H),q=240&(ie=j[Y][p[L[H]]]),ie&=15,P[H]=te=j[ie][5],q>0)if(q===16){for(ae=ue;ae<H;ae++)P[ae]=1;ue=-1}else ue=-1;if(j[ie][6])ue===-1&&(ue=H);else if(ue>-1){for(ae=ue;ae<H;ae++)P[ae]=te;ue=-1}$[H]==="B"&&(P[H]=0),Z.hiLevel|=te}a&&(function(W,J,K){for(var fe=0;fe<K;fe++)if(W[fe]==="S"){J[fe]=C;for(var ge=fe-1;ge>=0&&W[ge]==="WS";ge--)J[ge]=C}})($,P,we)},R=function(U,P,Z,q,ae){if(!(ae.hiLevel<U)){if(U===1&&C===1&&!r)return P.reverse(),void(Z&&Z.reverse());for(var H,te,Y,ue,we=P.length,ie=0;ie<we;){if(q[ie]>=U){for(Y=ie+1;Y<we&&q[Y]>=U;)Y++;for(ue=ie,te=Y-1;ue<te;ue++,te--)H=P[ue],P[ue]=P[te],P[te]=H,Z&&(H=Z[ue],Z[ue]=Z[te],Z[te]=H);ie=Y}ie++}}},V=function(U,P,Z){var q=U.split(""),ae={hiLevel:C};return Z||(Z=[]),I(q,Z,ae),(function(H,te,Y){if(Y.hiLevel!==0&&d)for(var ue,we=0;we<H.length;we++)te[we]===1&&(ue=b.indexOf(H[we]))>=0&&(H[we]=b[ue+1])})(q,Z,ae),R(2,q,P,Z,ae),R(1,q,P,Z,ae),q.join("")};return this.__bidiEngine__.doBidiReorder=function(U,P,Z){if((function(ae,H){if(H)for(var te=0;te<ae.length;te++)H[te]=te;s===void 0&&(s=F(ae)),c===void 0&&(c=F(ae))})(U,P),o||!l||c)if(o&&l&&s^c)C=s?1:0,U=E(U,P,Z);else if(!o&&l&&c)C=s?1:0,U=V(U,P,Z),U=E(U,P);else if(!o||s||l||c){if(o&&!l&&s^c)U=E(U,P),s?(C=0,U=V(U,P,Z)):(C=1,U=V(U,P,Z),U=E(U,P));else if(o&&s&&!l&&c)C=1,U=V(U,P,Z),U=E(U,P);else if(!o&&!l&&s^c){var q=d;s?(C=1,U=V(U,P,Z),C=0,d=!1,U=V(U,P,Z),d=q):(C=0,U=V(U,P,Z),U=E(U,P),C=1,d=!1,U=V(U,P,Z),d=q,U=E(U,P))}}else C=0,U=V(U,P,Z);else C=s?1:0,U=V(U,P,Z);return U},this.__bidiEngine__.setOptions=function(U){U&&(o=U.isInputVisual,l=U.isOutputVisual,s=U.isInputRtl,c=U.isOutputRtl,d=U.isSymmetricSwapping)},this.__bidiEngine__.setOptions(i),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],n=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(i){var r=i.text;i.x,i.y;var a=i.options||{};i.mutex,a.lang;var o=[];if(a.isInputVisual=typeof a.isInputVisual!="boolean"||a.isInputVisual,n.setOptions(a),Object.prototype.toString.call(r)==="[object Array]"){var s=0;for(o=[],s=0;s<r.length;s+=1)Object.prototype.toString.call(r[s])==="[object Array]"?o.push([n.doBidiReorder(r[s][0]),r[s][1],r[s][2]]):o.push([n.doBidiReorder(r[s])]);i.text=o}else i.text=n.doBidiReorder(r);n.setOptions({isInputVisual:!0})}])})(vn),vn.API.TTFFont=(function(){function t(e){var n;if(this.rawData=e,n=this.contents=new nm(e),this.contents.pos=4,n.readString(4)==="ttcf")throw new Error("TTCF not supported.");n.pos=0,this.parse(),this.subset=new bVe(this),this.registerTTF()}return t.open=function(e){return new t(e)},t.prototype.parse=function(){return this.directory=new sVe(this.contents),this.head=new cVe(this),this.name=new mVe(this),this.cmap=new Ioe(this),this.toUnicode={},this.hhea=new dVe(this),this.maxp=new hVe(this),this.hmtx=new pVe(this),this.post=new fVe(this),this.os2=new uVe(this),this.loca=new kVe(this),this.glyf=new gVe(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},t.prototype.registerTTF=function(){var e,n,i,r,a;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var o,s,l,c;for(c=[],o=0,s=(l=this.bbox).length;o<s;o++)e=l[o],c.push(Math.round(e*this.scaleFactor));return c}).call(this),this.stemV=0,this.post.exists?(i=255&(r=this.post.italic_angle),32768&(n=r>>16)&&(n=-(1+(65535^n))),this.italicAngle=+(n+"."+i)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(a=this.familyClass)===1||a===2||a===3||a===4||a===5||a===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(e){var n;return((n=this.cmap.unicode)!=null?n.codeMap[e]:void 0)||0},t.prototype.widthOfGlyph=function(e){var n;return n=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*n},t.prototype.widthOfString=function(e,n,i){var r,a,o,s;for(o=0,a=0,s=(e=""+e).length;0<=s?a<s:a>s;a=0<=s?++a:--a)r=e.charCodeAt(a),o+=this.widthOfGlyph(this.characterToGlyph(r))+i*(1e3/n)||0;return o*(n/1e3)},t.prototype.lineHeight=function(e,n){var i;return n==null&&(n=!1),i=n?this.lineGap:0,(this.ascender+i-this.decender)/1e3*e},t})();var xd,nm=(function(){function t(e){this.data=e??[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(e){return this.data[this.pos++]=e},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},t.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},t.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},t.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},t.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},t.prototype.readString=function(e){var n,i;for(i=[],n=0;0<=e?n<e:n>e;n=0<=e?++n:--n)i[n]=String.fromCharCode(this.readByte());return i.join("")},t.prototype.writeString=function(e){var n,i,r;for(r=[],n=0,i=e.length;0<=i?n<i:n>i;n=0<=i?++n:--n)r.push(this.writeByte(e.charCodeAt(n)));return r},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(e){return this.writeInt16(e)},t.prototype.readLongLong=function(){var e,n,i,r,a,o,s,l;return e=this.readByte(),n=this.readByte(),i=this.readByte(),r=this.readByte(),a=this.readByte(),o=this.readByte(),s=this.readByte(),l=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^n)+1099511627776*(255^i)+4294967296*(255^r)+16777216*(255^a)+65536*(255^o)+256*(255^s)+(255^l)+1):72057594037927940*e+281474976710656*n+1099511627776*i+4294967296*r+16777216*a+65536*o+256*s+l},t.prototype.writeLongLong=function(e){var n,i;return n=Math.floor(e/4294967296),i=4294967295&e,this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n),this.writeByte(i>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(e){return this.writeInt32(e)},t.prototype.read=function(e){var n,i;for(n=[],i=0;0<=e?i<e:i>e;i=0<=e?++i:--i)n.push(this.readByte());return n},t.prototype.write=function(e){var n,i,r,a;for(a=[],i=0,r=e.length;i<r;i++)n=e[i],a.push(this.writeByte(n));return a},t})(),sVe=(function(){var t;function e(n){var i,r,a;for(this.scalarType=n.readInt(),this.tableCount=n.readShort(),this.searchRange=n.readShort(),this.entrySelector=n.readShort(),this.rangeShift=n.readShort(),this.tables={},r=0,a=this.tableCount;0<=a?r<a:r>a;r=0<=a?++r:--r)i={tag:n.readString(4),checksum:n.readInt(),offset:n.readInt(),length:n.readInt()},this.tables[i.tag]=i}return e.prototype.encode=function(n){var i,r,a,o,s,l,c,d,f,h,m,p,g;for(g in m=Object.keys(n).length,l=Math.log(2),f=16*Math.floor(Math.log(m)/l),o=Math.floor(f/l),d=16*m-f,(r=new nm).writeInt(this.scalarType),r.writeShort(m),r.writeShort(f),r.writeShort(o),r.writeShort(d),a=16*m,c=r.pos+a,s=null,p=[],n)for(h=n[g],r.writeString(g),r.writeInt(t(h)),r.writeInt(c),r.writeInt(h.length),p=p.concat(h),g==="head"&&(s=c),c+=h.length;c%4;)p.push(0),c++;return r.write(p),i=2981146554-t(r.data),r.pos=s+8,r.writeUInt32(i),r.data},t=function(n){var i,r,a,o;for(n=Ooe.call(n);n.length%4;)n.push(0);for(a=new nm(n),r=0,i=0,o=n.length;i<o;i=i+=4)r+=a.readUInt32();return 4294967295&r},e})(),lVe={}.hasOwnProperty,Ru=function(t,e){for(var n in e)lVe.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t};xd=(function(){function t(e){var n;this.file=e,n=this.file.directory.tables[this.tag],this.exists=!!n,n&&(this.offset=n.offset,this.length=n.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t})();var cVe=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Ru(t,xd),t.prototype.tag="head",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},t.prototype.encode=function(e){var n;return(n=new nm).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(e),n.writeShort(this.glyphDataFormat),n.data},t})(),hq=(function(){function t(e,n){var i,r,a,o,s,l,c,d,f,h,m,p,g,b,k,S,C;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=n+e.readInt(),f=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(l=0;l<256;++l)this.codeMap[l]=e.readByte();break;case 4:for(m=e.readUInt16(),h=m/2,e.pos+=6,a=(function(){var x,F;for(F=[],l=x=0;0<=h?x<h:x>h;l=0<=h?++x:--x)F.push(e.readUInt16());return F})(),e.pos+=2,g=(function(){var x,F;for(F=[],l=x=0;0<=h?x<h:x>h;l=0<=h?++x:--x)F.push(e.readUInt16());return F})(),c=(function(){var x,F;for(F=[],l=x=0;0<=h?x<h:x>h;l=0<=h?++x:--x)F.push(e.readUInt16());return F})(),d=(function(){var x,F;for(F=[],l=x=0;0<=h?x<h:x>h;l=0<=h?++x:--x)F.push(e.readUInt16());return F})(),r=(this.length-e.pos+this.offset)/2,s=(function(){var x,F;for(F=[],l=x=0;0<=r?x<r:x>r;l=0<=r?++x:--x)F.push(e.readUInt16());return F})(),l=k=0,C=a.length;k<C;l=++k)for(b=a[l],i=S=p=g[l];p<=b?S<=b:S>=b;i=p<=b?++S:--S)d[l]===0?o=i+c[l]:(o=s[d[l]/2+(i-p)-(h-l)]||0)!==0&&(o+=c[l]),this.codeMap[i]=65535&o}e.pos=f}return t.encode=function(e,n){var i,r,a,o,s,l,c,d,f,h,m,p,g,b,k,S,C,x,F,T,E,I,R,V,U,P,Z,q,ae,H,te,Y,ue,we,ie,L,j,$,W,J,K,fe,ge,Se,oe,le;switch(q=new nm,o=Object.keys(e).sort(function(Ee,Le){return Ee-Le}),n){case"macroman":for(g=0,b=(function(){var Ee=[];for(p=0;p<256;++p)Ee.push(0);return Ee})(),S={0:0},a={},ae=0,ue=o.length;ae<ue;ae++)S[ge=e[r=o[ae]]]==null&&(S[ge]=++g),a[r]={old:e[r],new:S[e[r]]},b[r]=S[e[r]];return q.writeUInt16(1),q.writeUInt16(0),q.writeUInt32(12),q.writeUInt16(0),q.writeUInt16(262),q.writeUInt16(0),q.write(b),{charMap:a,subtable:q.data,maxGlyphID:g+1};case"unicode":for(P=[],f=[],C=0,S={},i={},k=c=null,H=0,we=o.length;H<we;H++)S[F=e[r=o[H]]]==null&&(S[F]=++C),i[r]={old:F,new:S[F]},s=S[F]-r,k!=null&&s===c||(k&&f.push(k),P.push(r),c=s),k=r;for(k&&f.push(k),f.push(65535),P.push(65535),V=2*(R=P.length),I=2*Math.pow(Math.log(R)/Math.LN2,2),h=Math.log(I/2)/Math.LN2,E=2*R-I,l=[],T=[],m=[],p=te=0,ie=P.length;te<ie;p=++te){if(U=P[p],d=f[p],U===65535){l.push(0),T.push(0);break}if(U-(Z=i[U].new)>=32768)for(l.push(0),T.push(2*(m.length+R-p)),r=Y=U;U<=d?Y<=d:Y>=d;r=U<=d?++Y:--Y)m.push(i[r].new);else l.push(Z-U),T.push(0)}for(q.writeUInt16(3),q.writeUInt16(1),q.writeUInt32(12),q.writeUInt16(4),q.writeUInt16(16+8*R+2*m.length),q.writeUInt16(0),q.writeUInt16(V),q.writeUInt16(I),q.writeUInt16(h),q.writeUInt16(E),K=0,L=f.length;K<L;K++)r=f[K],q.writeUInt16(r);for(q.writeUInt16(0),fe=0,j=P.length;fe<j;fe++)r=P[fe],q.writeUInt16(r);for(Se=0,$=l.length;Se<$;Se++)s=l[Se],q.writeUInt16(s);for(oe=0,W=T.length;oe<W;oe++)x=T[oe],q.writeUInt16(x);for(le=0,J=m.length;le<J;le++)g=m[le],q.writeUInt16(g);return{charMap:i,subtable:q.data,maxGlyphID:C+1}}},t})(),Ioe=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Ru(t,xd),t.prototype.tag="cmap",t.prototype.parse=function(e){var n,i,r;for(e.pos=this.offset,this.version=e.readUInt16(),r=e.readUInt16(),this.tables=[],this.unicode=null,i=0;0<=r?i<r:i>r;i=0<=r?++i:--i)n=new hq(e,this.offset),this.tables.push(n),n.isUnicode&&this.unicode==null&&(this.unicode=n);return!0},t.encode=function(e,n){var i,r;return n==null&&(n="macroman"),i=hq.encode(e,n),(r=new nm).writeUInt16(0),r.writeUInt16(1),i.table=r.data.concat(i.subtable),i},t})(),dVe=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Ru(t,xd),t.prototype.tag="hhea",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},t})(),uVe=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Ru(t,xd),t.prototype.tag="OS/2",t.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=(function(){var n,i;for(i=[],n=0;n<10;++n)i.push(e.readByte());return i})(),this.charRange=(function(){var n,i;for(i=[],n=0;n<4;++n)i.push(e.readInt());return i})(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=(function(){var n,i;for(i=[],n=0;n<2;n=++n)i.push(e.readInt());return i})(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},t})(),fVe=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Ru(t,xd),t.prototype.tag="post",t.prototype.parse=function(e){var n,i,r;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:case 196608:break;case 131072:var a;for(i=e.readUInt16(),this.glyphNameIndex=[],a=0;0<=i?a<i:a>i;a=0<=i?++a:--a)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],r=[];e.pos<this.offset+this.length;)n=e.readByte(),r.push(this.names.push(e.readString(n)));return r;case 151552:return i=e.readUInt16(),this.offsets=e.read(i);case 262144:return this.map=(function(){var o,s,l;for(l=[],a=o=0,s=this.file.maxp.numGlyphs;0<=s?o<s:o>s;a=0<=s?++o:--o)l.push(e.readUInt32());return l}).call(this)}},t})(),AVe=function(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},mVe=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Ru(t,xd),t.prototype.tag="name",t.prototype.parse=function(e){var n,i,r,a,o,s,l,c,d,f,h;for(e.pos=this.offset,e.readShort(),n=e.readShort(),s=e.readShort(),i=[],a=0;0<=n?a<n:a>n;a=0<=n?++a:--a)i.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+s+e.readShort()});for(l={},a=d=0,f=i.length;d<f;a=++d)r=i[a],e.pos=r.offset,c=e.readString(r.length),o=new AVe(c,r),l[h=r.nameID]==null&&(l[h]=[]),l[r.nameID].push(o);this.strings=l,this.copyright=l[0],this.fontFamily=l[1],this.fontSubfamily=l[2],this.uniqueSubfamily=l[3],this.fontName=l[4],this.version=l[5];try{this.postscriptName=l[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=l[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=l[7],this.manufacturer=l[8],this.designer=l[9],this.description=l[10],this.vendorUrl=l[11],this.designerUrl=l[12],this.license=l[13],this.licenseUrl=l[14],this.preferredFamily=l[15],this.preferredSubfamily=l[17],this.compatibleFull=l[18],this.sampleText=l[19]},t})(),hVe=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Ru(t,xd),t.prototype.tag="maxp",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},t})(),pVe=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Ru(t,xd),t.prototype.tag="hmtx",t.prototype.parse=function(e){var n,i,r,a,o,s,l;for(e.pos=this.offset,this.metrics=[],n=0,s=this.file.hhea.numberOfMetrics;0<=s?n<s:n>s;n=0<=s?++n:--n)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(r=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var c,d;for(d=[],n=c=0;0<=r?c<r:c>r;n=0<=r?++c:--c)d.push(e.readInt16());return d})(),this.widths=(function(){var c,d,f,h;for(h=[],c=0,d=(f=this.metrics).length;c<d;c++)a=f[c],h.push(a.advance);return h}).call(this),i=this.widths[this.widths.length-1],l=[],n=o=0;0<=r?o<r:o>r;n=0<=r?++o:--o)l.push(this.widths.push(i));return l},t.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},t})(),Ooe=[].slice,gVe=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Ru(t,xd),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(e){var n,i,r,a,o,s,l,c,d,f;return e in this.cache?this.cache[e]:(a=this.file.loca,n=this.file.contents,i=a.indexOf(e),(r=a.lengthOf(e))===0?this.cache[e]=null:(n.pos=this.offset+i,o=(s=new nm(n.read(r))).readShort(),c=s.readShort(),f=s.readShort(),l=s.readShort(),d=s.readShort(),this.cache[e]=o===-1?new yVe(s,c,f,l,d):new vVe(s,o,c,f,l,d),this.cache[e]))},t.prototype.encode=function(e,n,i){var r,a,o,s,l;for(o=[],a=[],s=0,l=n.length;s<l;s++)r=e[n[s]],a.push(o.length),r&&(o=o.concat(r.encode(i)));return a.push(o.length),{table:o,offsets:a}},t})(),vVe=(function(){function t(e,n,i,r,a,o){this.raw=e,this.numberOfContours=n,this.xMin=i,this.yMin=r,this.xMax=a,this.yMax=o,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t})(),yVe=(function(){function t(e,n,i,r,a){var o,s;for(this.raw=e,this.xMin=n,this.yMin=i,this.xMax=r,this.yMax=a,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],o=this.raw;s=o.readShort(),this.glyphOffsets.push(o.pos),this.glyphIDs.push(o.readUInt16()),32&s;)o.pos+=1&s?4:2,128&s?o.pos+=8:64&s?o.pos+=4:8&s&&(o.pos+=2)}return t.prototype.encode=function(){var e,n,i;for(n=new nm(Ooe.call(this.raw.data)),e=0,i=this.glyphIDs.length;e<i;++e)n.pos=this.glyphOffsets[e];return n.data},t})(),kVe=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Ru(t,xd),t.prototype.tag="loca",t.prototype.parse=function(e){var n,i;return e.pos=this.offset,n=this.file.head.indexToLocFormat,this.offsets=n===0?(function(){var r,a;for(a=[],i=0,r=this.length;i<r;i+=2)a.push(2*e.readUInt16());return a}).call(this):(function(){var r,a;for(a=[],i=0,r=this.length;i<r;i+=4)a.push(e.readUInt32());return a}).call(this)},t.prototype.indexOf=function(e){return this.offsets[e]},t.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]},t.prototype.encode=function(e,n){for(var i=new Uint32Array(this.offsets.length),r=0,a=0,o=0;o<i.length;++o)if(i[o]=r,a<n.length&&n[a]==o){++a,i[o]=r;var s=this.offsets[o],l=this.offsets[o+1]-s;l>0&&(r+=l)}for(var c=new Array(4*i.length),d=0;d<i.length;++d)c[4*d+3]=255&i[d],c[4*d+2]=(65280&i[d])>>8,c[4*d+1]=(16711680&i[d])>>16,c[4*d]=(4278190080&i[d])>>24;return c},t})(),bVe=(function(){function t(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var e,n,i,r,a;for(n in r=this.font.cmap.tables[0].codeMap,e={},a=this.subset)i=a[n],e[n]=r[i];return e},t.prototype.glyphsFor=function(e){var n,i,r,a,o,s,l;for(r={},o=0,s=e.length;o<s;o++)r[a=e[o]]=this.font.glyf.glyphFor(a);for(a in n=[],r)(i=r[a])!=null&&i.compound&&n.push.apply(n,i.glyphIDs);if(n.length>0)for(a in l=this.glyphsFor(n))i=l[a],r[a]=i;return r},t.prototype.encode=function(e,n){var i,r,a,o,s,l,c,d,f,h,m,p,g,b,k;for(r in i=Ioe.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(e),m={0:0},k=i.charMap)m[(l=k[r]).old]=l.new;for(p in h=i.maxGlyphID,o)p in m||(m[p]=h++);return d=(function(S){var C,x;for(C in x={},S)x[S[C]]=C;return x})(m),f=Object.keys(d).sort(function(S,C){return S-C}),g=(function(){var S,C,x;for(x=[],S=0,C=f.length;S<C;S++)s=f[S],x.push(d[s]);return x})(),a=this.font.glyf.encode(o,g,m),c=this.font.loca.encode(a.offsets,g),b={cmap:this.font.cmap.raw(),glyf:a.table,loca:c,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(n)},this.font.os2.exists&&(b["OS/2"]=this.font.os2.raw()),this.font.directory.encode(b)},t})();vn.API.PDFObject=(function(){var t;function e(){}return t=function(n,i){return(Array(i+1).join("0")+n).slice(-i)},e.convert=function(n){var i,r,a,o;if(Array.isArray(n))return"["+(function(){var s,l,c;for(c=[],s=0,l=n.length;s<l;s++)i=n[s],c.push(e.convert(i));return c})().join(" ")+"]";if(typeof n=="string")return"/"+n;if(n?.isString)return"("+n+")";if(n instanceof Date)return"(D:"+t(n.getUTCFullYear(),4)+t(n.getUTCMonth(),2)+t(n.getUTCDate(),2)+t(n.getUTCHours(),2)+t(n.getUTCMinutes(),2)+t(n.getUTCSeconds(),2)+"Z)";if({}.toString.call(n)==="[object Object]"){for(r in a=["<<"],n)o=n[r],a.push("/"+r+" "+e.convert(o));return a.push(">>"),a.join(`
|
|
173
|
-
`)}return""+n},e})();const SVe="updateDocument",cb=()=>{const[{fetching:t},e]=bs(vCe),n=N.useCallback(async i=>{const r=`Error updating document ID [${i.documentId}]`,a=`${SVe}-${i.documentId}`;fn.loading("Updating document",{id:a});try{const o=await e(i),s=Ss(o,r,a,"updateDocument");if(s)return fn.success("Success",{id:a,description:"Document updated"}),s.updateDocument}catch(o){console.error(`${r}: ${o}`),fn.error("Error",{id:a,description:r,duration:1e5,closeButton:!0})}},[e]);return{fetching:t,updateDocument:n}};function wVe({documentId:t}){const{updateDocument:e}=cb();function n(){e({documentId:t,fields:{chargeId:rZ}})}return y.jsx(BF,{onConfirm:n,title:"Are you sure you want to unlink this document from the charge?",children:y.jsx(Qt,{variant:"ghost",size:"icon",className:"size-7.5",children:y.jsx(_be,{className:"size-5"})})})}function NVe(t){const e=CVe(t),n=N.forwardRef((i,r)=>{const{children:a,...o}=i,s=N.Children.toArray(a),l=s.find(FVe);if(l){const c=l.props.children,d=s.map(f=>f===l?N.Children.count(c)>1?N.Children.only(null):N.isValidElement(c)?c.props.children:null:f);return y.jsx(e,{...o,ref:r,children:N.isValidElement(c)?N.cloneElement(c,void 0,d):null})}return y.jsx(e,{...o,ref:r,children:a})});return n.displayName=`${t}.Slot`,n}function CVe(t){const e=N.forwardRef((n,i)=>{const{children:r,...a}=n;if(N.isValidElement(r)){const o=EVe(r),s=_Ve(a,r.props);return r.type!==N.Fragment&&(s.ref=i?ws(i,o):o),N.cloneElement(r,s)}return N.Children.count(r)>1?N.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var xVe=Symbol("radix.slottable");function FVe(t){return N.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===xVe}function _Ve(t,e){const n={...e};for(const i in e){const r=t[i],a=e[i];/^on[A-Z]/.test(i)?r&&a?n[i]=(...s)=>{const l=a(...s);return r(...s),l}:r&&(n[i]=r):i==="style"?n[i]={...r,...a}:i==="className"&&(n[i]=[r,a].filter(Boolean).join(" "))}return{...t,...n}}function EVe(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function ZP(t){const e=N.useRef({value:t,previous:t});return N.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var BVe=[" ","Enter","ArrowUp","ArrowDown"],TVe=[" ","Enter"],Ih="Select",[pF,gF,DVe]=OR(Ih),[e0]=rl(Ih,[DVe,um]),vF=um(),[IVe,mm]=e0(Ih),[OVe,RVe]=e0(Ih),Roe=t=>{const{__scopeSelect:e,children:n,open:i,defaultOpen:r,onOpenChange:a,value:o,defaultValue:s,onValueChange:l,dir:c,name:d,autoComplete:f,disabled:h,required:m,form:p}=t,g=vF(e),[b,k]=N.useState(null),[S,C]=N.useState(null),[x,F]=N.useState(!1),T=Hk(c),[E,I]=md({prop:i,defaultProp:r??!1,onChange:a,caller:Ih}),[R,V]=md({prop:o,defaultProp:s,onChange:l,caller:Ih}),U=N.useRef(null),P=b?p||!!b.closest("form"):!0,[Z,q]=N.useState(new Set),ae=Array.from(Z).map(H=>H.props.value).join(";");return y.jsx(F2,{...g,children:y.jsxs(IVe,{required:m,scope:e,trigger:b,onTriggerChange:k,valueNode:S,onValueNodeChange:C,valueNodeHasChildren:x,onValueNodeHasChildrenChange:F,contentId:ro(),value:R,onValueChange:V,open:E,onOpenChange:I,dir:T,triggerPointerDownPosRef:U,disabled:h,children:[y.jsx(pF.Provider,{scope:e,children:y.jsx(OVe,{scope:t.__scopeSelect,onNativeOptionAdd:N.useCallback(H=>{q(te=>new Set(te).add(H))},[]),onNativeOptionRemove:N.useCallback(H=>{q(te=>{const Y=new Set(te);return Y.delete(H),Y})},[]),children:n})}),P?y.jsxs(ise,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:R,onChange:H=>V(H.target.value),disabled:h,form:p,children:[R===void 0?y.jsx("option",{value:""}):null,Array.from(Z)]},ae):null]})})};Roe.displayName=Ih;var Poe="SelectTrigger",Loe=N.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:i=!1,...r}=t,a=vF(n),o=mm(Poe,n),s=o.disabled||i,l=Jn(e,o.onTriggerChange),c=gF(n),d=N.useRef("touch"),[f,h,m]=ase(g=>{const b=c().filter(C=>!C.disabled),k=b.find(C=>C.value===o.value),S=ose(b,g,k);S!==void 0&&o.onValueChange(S.value)}),p=g=>{s||(o.onOpenChange(!0),m()),g&&(o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return y.jsx(Vk,{asChild:!0,...a,children:y.jsx(Cn.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":rse(o.value)?"":void 0,...r,ref:l,onClick:Ht(r.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&p(g)}),onPointerDown:Ht(r.onPointerDown,g=>{d.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(p(g),g.preventDefault())}),onKeyDown:Ht(r.onKeyDown,g=>{const b=f.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(b&&g.key===" ")&&BVe.includes(g.key)&&(p(),g.preventDefault())})})})});Loe.displayName=Poe;var Uoe="SelectValue",Moe=N.forwardRef((t,e)=>{const{__scopeSelect:n,className:i,style:r,children:a,placeholder:o="",...s}=t,l=mm(Uoe,n),{onValueNodeHasChildrenChange:c}=l,d=a!==void 0,f=Jn(e,l.onValueNodeChange);return xa(()=>{c(d)},[c,d]),y.jsx(Cn.span,{...s,ref:f,style:{pointerEvents:"none"},children:rse(l.value)?y.jsx(y.Fragment,{children:o}):a})});Moe.displayName=Uoe;var PVe="SelectIcon",$oe=N.forwardRef((t,e)=>{const{__scopeSelect:n,children:i,...r}=t;return y.jsx(Cn.span,{"aria-hidden":!0,...r,ref:e,children:i||"▼"})});$oe.displayName=PVe;var LVe="SelectPortal",joe=t=>y.jsx(Vv,{asChild:!0,...t});joe.displayName=LVe;var Oh="SelectContent",Qoe=N.forwardRef((t,e)=>{const n=mm(Oh,t.__scopeSelect),[i,r]=N.useState();if(xa(()=>{r(new DocumentFragment)},[]),!n.open){const a=i;return a?Uf.createPortal(y.jsx(Hoe,{scope:t.__scopeSelect,children:y.jsx(pF.Slot,{scope:t.__scopeSelect,children:y.jsx("div",{children:t.children})})}),a):null}return y.jsx(zoe,{...t,ref:e})});Qoe.displayName=Oh;var Jc=10,[Hoe,hm]=e0(Oh),UVe="SelectContentImpl",MVe=NVe("SelectContent.RemoveScroll"),zoe=N.forwardRef((t,e)=>{const{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:p,hideWhenDetached:g,avoidCollisions:b,...k}=t,S=mm(Oh,n),[C,x]=N.useState(null),[F,T]=N.useState(null),E=Jn(e,K=>x(K)),[I,R]=N.useState(null),[V,U]=N.useState(null),P=gF(n),[Z,q]=N.useState(!1),ae=N.useRef(!1);N.useEffect(()=>{if(C)return A2(C)},[C]),u2();const H=N.useCallback(K=>{const[fe,...ge]=P().map(le=>le.ref.current),[Se]=ge.slice(-1),oe=document.activeElement;for(const le of K)if(le===oe||(le?.scrollIntoView({block:"nearest"}),le===fe&&F&&(F.scrollTop=0),le===Se&&F&&(F.scrollTop=F.scrollHeight),le?.focus(),document.activeElement!==oe))return},[P,F]),te=N.useCallback(()=>H([I,C]),[H,I,C]);N.useEffect(()=>{Z&&te()},[Z,te]);const{onOpenChange:Y,triggerPointerDownPosRef:ue}=S;N.useEffect(()=>{if(C){let K={x:0,y:0};const fe=Se=>{K={x:Math.abs(Math.round(Se.pageX)-(ue.current?.x??0)),y:Math.abs(Math.round(Se.pageY)-(ue.current?.y??0))}},ge=Se=>{K.x<=10&&K.y<=10?Se.preventDefault():C.contains(Se.target)||Y(!1),document.removeEventListener("pointermove",fe),ue.current=null};return ue.current!==null&&(document.addEventListener("pointermove",fe),document.addEventListener("pointerup",ge,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",fe),document.removeEventListener("pointerup",ge,{capture:!0})}}},[C,Y,ue]),N.useEffect(()=>{const K=()=>Y(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[Y]);const[we,ie]=ase(K=>{const fe=P().filter(oe=>!oe.disabled),ge=fe.find(oe=>oe.ref.current===document.activeElement),Se=ose(fe,K,ge);Se&&setTimeout(()=>Se.ref.current.focus())}),L=N.useCallback((K,fe,ge)=>{const Se=!ae.current&&!ge;(S.value!==void 0&&S.value===fe||Se)&&(R(K),Se&&(ae.current=!0))},[S.value]),j=N.useCallback(()=>C?.focus(),[C]),$=N.useCallback((K,fe,ge)=>{const Se=!ae.current&&!ge;(S.value!==void 0&&S.value===fe||Se)&&U(K)},[S.value]),W=i==="popper"?XI:Voe,J=W===XI?{side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:p,hideWhenDetached:g,avoidCollisions:b}:{};return y.jsx(Hoe,{scope:n,content:C,viewport:F,onViewportChange:T,itemRefCallback:L,selectedItem:I,onItemLeave:j,itemTextRefCallback:$,focusSelectedItem:te,selectedItemText:V,position:i,isPositioned:Z,searchRef:we,children:y.jsx(Gv,{as:MVe,allowPinchZoom:!0,children:y.jsx(Qk,{asChild:!0,trapped:S.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:Ht(r,K=>{S.trigger?.focus({preventScroll:!0}),K.preventDefault()}),children:y.jsx(zv,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>S.onOpenChange(!1),children:y.jsx(W,{role:"listbox",id:S.contentId,"data-state":S.open?"open":"closed",dir:S.dir,onContextMenu:K=>K.preventDefault(),...k,...J,onPlaced:()=>q(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...k.style},onKeyDown:Ht(k.onKeyDown,K=>{const fe=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!fe&&K.key.length===1&&ie(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let Se=P().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(K.key)&&(Se=Se.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const oe=K.target,le=Se.indexOf(oe);Se=Se.slice(le+1)}setTimeout(()=>H(Se)),K.preventDefault()}})})})})})})});zoe.displayName=UVe;var $Ve="SelectItemAlignedPosition",Voe=N.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:i,...r}=t,a=mm(Oh,n),o=hm(Oh,n),[s,l]=N.useState(null),[c,d]=N.useState(null),f=Jn(e,E=>d(E)),h=gF(n),m=N.useRef(!1),p=N.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:k,focusSelectedItem:S}=o,C=N.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&c&&g&&b&&k){const E=a.trigger.getBoundingClientRect(),I=c.getBoundingClientRect(),R=a.valueNode.getBoundingClientRect(),V=k.getBoundingClientRect();if(a.dir!=="rtl"){const oe=V.left-I.left,le=R.left-oe,Ee=E.left-le,Le=E.width+Ee,ve=Math.max(Le,I.width),Ae=window.innerWidth-Jc,Q=X4(le,[Jc,Math.max(Jc,Ae-ve)]);s.style.minWidth=Le+"px",s.style.left=Q+"px"}else{const oe=I.right-V.right,le=window.innerWidth-R.right-oe,Ee=window.innerWidth-E.right-le,Le=E.width+Ee,ve=Math.max(Le,I.width),Ae=window.innerWidth-Jc,Q=X4(le,[Jc,Math.max(Jc,Ae-ve)]);s.style.minWidth=Le+"px",s.style.right=Q+"px"}const U=h(),P=window.innerHeight-Jc*2,Z=g.scrollHeight,q=window.getComputedStyle(c),ae=parseInt(q.borderTopWidth,10),H=parseInt(q.paddingTop,10),te=parseInt(q.borderBottomWidth,10),Y=parseInt(q.paddingBottom,10),ue=ae+H+Z+Y+te,we=Math.min(b.offsetHeight*5,ue),ie=window.getComputedStyle(g),L=parseInt(ie.paddingTop,10),j=parseInt(ie.paddingBottom,10),$=E.top+E.height/2-Jc,W=P-$,J=b.offsetHeight/2,K=b.offsetTop+J,fe=ae+H+K,ge=ue-fe;if(fe<=$){const oe=U.length>0&&b===U[U.length-1].ref.current;s.style.bottom="0px";const le=c.clientHeight-g.offsetTop-g.offsetHeight,Ee=Math.max(W,J+(oe?j:0)+le+te),Le=fe+Ee;s.style.height=Le+"px"}else{const oe=U.length>0&&b===U[0].ref.current;s.style.top="0px";const Ee=Math.max($,ae+g.offsetTop+(oe?L:0)+J)+ge;s.style.height=Ee+"px",g.scrollTop=fe-$+g.offsetTop}s.style.margin=`${Jc}px 0`,s.style.minHeight=we+"px",s.style.maxHeight=P+"px",i?.(),requestAnimationFrame(()=>m.current=!0)}},[h,a.trigger,a.valueNode,s,c,g,b,k,a.dir,i]);xa(()=>C(),[C]);const[x,F]=N.useState();xa(()=>{c&&F(window.getComputedStyle(c).zIndex)},[c]);const T=N.useCallback(E=>{E&&p.current===!0&&(C(),S?.(),p.current=!1)},[C,S]);return y.jsx(QVe,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:T,children:y.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:y.jsx(Cn.div,{...r,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Voe.displayName=$Ve;var jVe="SelectPopperPosition",XI=N.forwardRef((t,e)=>{const{__scopeSelect:n,align:i="start",collisionPadding:r=Jc,...a}=t,o=vF(n);return y.jsx(_2,{...o,...a,ref:e,align:i,collisionPadding:r,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});XI.displayName=jVe;var[QVe,JP]=e0(Oh,{}),ZI="SelectViewport",Goe=N.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:i,...r}=t,a=hm(ZI,n),o=JP(ZI,n),s=Jn(e,a.onViewportChange),l=N.useRef(0);return y.jsxs(y.Fragment,{children:[y.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),y.jsx(pF.Slot,{scope:n,children:y.jsx(Cn.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:Ht(r.onScroll,c=>{const d=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=o;if(h?.current&&f){const m=Math.abs(l.current-d.scrollTop);if(m>0){const p=window.innerHeight-Jc*2,g=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),k=Math.max(g,b);if(k<p){const S=k+m,C=Math.min(p,S),x=S-C;f.style.height=C+"px",f.style.bottom==="0px"&&(d.scrollTop=x>0?x:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});Goe.displayName=ZI;var qoe="SelectGroup",[HVe,zVe]=e0(qoe),VVe=N.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,r=ro();return y.jsx(HVe,{scope:n,id:r,children:y.jsx(Cn.div,{role:"group","aria-labelledby":r,...i,ref:e})})});VVe.displayName=qoe;var Koe="SelectLabel",GVe=N.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,r=zVe(Koe,n);return y.jsx(Cn.div,{id:r.id,...i,ref:e})});GVe.displayName=Koe;var tx="SelectItem",[qVe,Woe]=e0(tx),Yoe=N.forwardRef((t,e)=>{const{__scopeSelect:n,value:i,disabled:r=!1,textValue:a,...o}=t,s=mm(tx,n),l=hm(tx,n),c=s.value===i,[d,f]=N.useState(a??""),[h,m]=N.useState(!1),p=Jn(e,S=>l.itemRefCallback?.(S,i,r)),g=ro(),b=N.useRef("touch"),k=()=>{r||(s.onValueChange(i),s.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return y.jsx(qVe,{scope:n,value:i,disabled:r,textId:g,isSelected:c,onItemTextChange:N.useCallback(S=>{f(C=>C||(S?.textContent??"").trim())},[]),children:y.jsx(pF.ItemSlot,{scope:n,value:i,disabled:r,textValue:d,children:y.jsx(Cn.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...o,ref:p,onFocus:Ht(o.onFocus,()=>m(!0)),onBlur:Ht(o.onBlur,()=>m(!1)),onClick:Ht(o.onClick,()=>{b.current!=="mouse"&&k()}),onPointerUp:Ht(o.onPointerUp,()=>{b.current==="mouse"&&k()}),onPointerDown:Ht(o.onPointerDown,S=>{b.current=S.pointerType}),onPointerMove:Ht(o.onPointerMove,S=>{b.current=S.pointerType,r?l.onItemLeave?.():b.current==="mouse"&&S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ht(o.onPointerLeave,S=>{S.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:Ht(o.onKeyDown,S=>{l.searchRef?.current!==""&&S.key===" "||(TVe.includes(S.key)&&k(),S.key===" "&&S.preventDefault())})})})})});Yoe.displayName=tx;var Iy="SelectItemText",Xoe=N.forwardRef((t,e)=>{const{__scopeSelect:n,className:i,style:r,...a}=t,o=mm(Iy,n),s=hm(Iy,n),l=Woe(Iy,n),c=RVe(Iy,n),[d,f]=N.useState(null),h=Jn(e,k=>f(k),l.onItemTextChange,k=>s.itemTextRefCallback?.(k,l.value,l.disabled)),m=d?.textContent,p=N.useMemo(()=>y.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=c;return xa(()=>(g(p),()=>b(p)),[g,b,p]),y.jsxs(y.Fragment,{children:[y.jsx(Cn.span,{id:l.textId,...a,ref:h}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Uf.createPortal(a.children,o.valueNode):null]})});Xoe.displayName=Iy;var Zoe="SelectItemIndicator",Joe=N.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t;return Woe(Zoe,n).isSelected?y.jsx(Cn.span,{"aria-hidden":!0,...i,ref:e}):null});Joe.displayName=Zoe;var JI="SelectScrollUpButton",ese=N.forwardRef((t,e)=>{const n=hm(JI,t.__scopeSelect),i=JP(JI,t.__scopeSelect),[r,a]=N.useState(!1),o=Jn(e,i.onScrollButtonChange);return xa(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollTop>0;a(c)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),r?y.jsx(nse,{...t,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});ese.displayName=JI;var eO="SelectScrollDownButton",tse=N.forwardRef((t,e)=>{const n=hm(eO,t.__scopeSelect),i=JP(eO,t.__scopeSelect),[r,a]=N.useState(!1),o=Jn(e,i.onScrollButtonChange);return xa(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;a(d)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),r?y.jsx(nse,{...t,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});tse.displayName=eO;var nse=N.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:i,...r}=t,a=hm("SelectScrollButton",n),o=N.useRef(null),s=gF(n),l=N.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return N.useEffect(()=>()=>l(),[l]),xa(()=>{s().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),y.jsx(Cn.div,{"aria-hidden":!0,...r,ref:e,style:{flexShrink:0,...r.style},onPointerDown:Ht(r.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(i,50))}),onPointerMove:Ht(r.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(i,50))}),onPointerLeave:Ht(r.onPointerLeave,()=>{l()})})}),KVe="SelectSeparator",WVe=N.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t;return y.jsx(Cn.div,{"aria-hidden":!0,...i,ref:e})});WVe.displayName=KVe;var tO="SelectArrow",YVe=N.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,r=vF(n),a=mm(tO,n),o=hm(tO,n);return a.open&&o.position==="popper"?y.jsx(E2,{...r,...i,ref:e}):null});YVe.displayName=tO;var XVe="SelectBubbleInput",ise=N.forwardRef(({__scopeSelect:t,value:e,...n},i)=>{const r=N.useRef(null),a=Jn(i,r),o=ZP(e);return N.useEffect(()=>{const s=r.current;if(!s)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&d){const f=new Event("change",{bubbles:!0});d.call(s,e),s.dispatchEvent(f)}},[o,e]),y.jsx(Cn.select,{...n,style:{...kee,...n.style},ref:a,defaultValue:e})});ise.displayName=XVe;function rse(t){return t===""||t===void 0}function ase(t){const e=ko(t),n=N.useRef(""),i=N.useRef(0),r=N.useCallback(o=>{const s=n.current+o;e(s),(function l(c){n.current=c,window.clearTimeout(i.current),c!==""&&(i.current=window.setTimeout(()=>l(""),1e3))})(s)},[e]),a=N.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,r,a]}function ose(t,e,n){const r=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,a=n?t.indexOf(n):-1;let o=ZVe(t,Math.max(a,0));r.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function ZVe(t,e){return t.map((n,i)=>t[(e+i)%t.length])}var JVe=Roe,eGe=Loe,tGe=Moe,nGe=$oe,iGe=joe,rGe=Qoe,aGe=Goe,oGe=Yoe,sGe=Xoe,lGe=Joe,cGe=ese,dGe=tse;function Po({...t}){return y.jsx(JVe,{"data-slot":"select",...t})}function Lo({...t}){return y.jsx(tGe,{"data-slot":"select-value",...t})}function Uo({className:t,size:e="default",children:n,...i}){return y.jsxs(eGe,{"data-slot":"select-trigger","data-size":e,className:Ut("border-gray-200 data-[placeholder]:text-gray-500 [&_svg:not([class*='text-'])]:text-gray-500 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:bg-gray-200/30 dark:hover:bg-gray-200/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:border-gray-800 dark:data-[placeholder]:text-gray-400 dark:[&_svg:not([class*='text-'])]:text-gray-400 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900 dark:dark:bg-gray-800/30 dark:dark:hover:bg-gray-800/50",t),...i,children:[n,y.jsx(nGe,{asChild:!0,children:y.jsx(ps,{className:"size-4 opacity-50"})})]})}function Mo({className:t,children:e,position:n="popper",...i}){return y.jsx(iGe,{children:y.jsxs(rGe,{"data-slot":"select-content",className:Ut("bg-white text-gray-950 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-1001 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-gray-200 shadow-md dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:n,...i,children:[y.jsx(uGe,{}),y.jsx(aGe,{className:Ut("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:e}),y.jsx(fGe,{})]})})}function yo({className:t,children:e,...n}){return y.jsxs(oGe,{"data-slot":"select-item",className:Ut("focus:bg-gray-100 focus:text-gray-900 [&_svg:not([class*='text-'])]:text-gray-500 relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 dark:focus:bg-gray-800 dark:focus:text-gray-50 dark:[&_svg:not([class*='text-'])]:text-gray-400",t),...n,children:[y.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:y.jsx(lGe,{children:y.jsx(Sh,{className:"size-4"})})}),y.jsx(sGe,{children:e})]})}function uGe({className:t,...e}){return y.jsx(cGe,{"data-slot":"select-scroll-up-button",className:Ut("flex cursor-default items-center justify-center py-1",t),...e,children:y.jsx(iu,{className:"size-4"})})}function fGe({className:t,...e}){return y.jsx(dGe,{"data-slot":"select-scroll-down-button",className:Ut("flex cursor-default items-center justify-center py-1",t),...e,children:y.jsx(ps,{className:"size-4"})})}var db=t=>t.type==="checkbox",ch=t=>t instanceof Date,Xs=t=>t==null;const sse=t=>typeof t=="object";var Ma=t=>!Xs(t)&&!Array.isArray(t)&&sse(t)&&!ch(t),lse=t=>Ma(t)&&t.target?db(t.target)?t.target.checked:t.target.value:t,AGe=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,cse=(t,e)=>t.has(AGe(e)),mGe=t=>{const e=t.constructor&&t.constructor.prototype;return Ma(e)&&e.hasOwnProperty("isPrototypeOf")},e6=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Br(t){let e;const n=Array.isArray(t),i=typeof FileList<"u"?t instanceof FileList:!1;if(t instanceof Date)e=new Date(t);else if(!(e6&&(t instanceof Blob||i))&&(n||Ma(t)))if(e=n?[]:Object.create(Object.getPrototypeOf(t)),!n&&!mGe(t))e=t;else for(const r in t)t.hasOwnProperty(r)&&(e[r]=Br(t[r]));else return t;return e}var yF=t=>/^\w*$/.test(t),wr=t=>t===void 0,kF=t=>Array.isArray(t)?t.filter(Boolean):[],t6=t=>kF(t.replace(/["|']|\]/g,"").split(/\.|\[/)),jt=(t,e,n)=>{if(!e||!Ma(t))return n;const i=(yF(e)?[e]:t6(e)).reduce((r,a)=>Xs(r)?r:r[a],t);return wr(i)||i===t?wr(t[e])?n:t[e]:i},Sl=t=>typeof t=="boolean",Ki=(t,e,n)=>{let i=-1;const r=yF(e)?[e]:t6(e),a=r.length,o=a-1;for(;++i<a;){const s=r[i];let l=n;if(i!==o){const c=t[s];l=Ma(c)||Array.isArray(c)?c:isNaN(+r[i+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;t[s]=l,t=t[s]}};const nx={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},lc={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},pf={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},n6=se.createContext(null);n6.displayName="HookFormContext";const ub=()=>se.useContext(n6),hGe=t=>{const{children:e,...n}=t;return se.createElement(n6.Provider,{value:n},e)};var dse=(t,e,n,i=!0)=>{const r={defaultValues:e._defaultValues};for(const a in t)Object.defineProperty(r,a,{get:()=>{const o=a;return e._proxyFormState[o]!==lc.all&&(e._proxyFormState[o]=!i||lc.all),n&&(n[o]=!0),t[o]}});return r};const bF=typeof window<"u"?se.useLayoutEffect:se.useEffect;function use(t){const e=ub(),{control:n=e.control,disabled:i,name:r,exact:a}=t||{},[o,s]=se.useState(n._formState),l=se.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return bF(()=>n._subscribe({name:r,formState:l.current,exact:a,callback:c=>{!i&&s({...n._formState,...c})}}),[r,i,a]),se.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),se.useMemo(()=>dse(o,n,l.current,!1),[o,n])}var Nl=t=>typeof t=="string",nO=(t,e,n,i,r)=>Nl(t)?(i&&e.watch.add(t),jt(n,t,r)):Array.isArray(t)?t.map(a=>(i&&e.watch.add(a),jt(n,a))):(i&&(e.watchAll=!0),n),iO=t=>Xs(t)||!sse(t);function rd(t,e,n=new WeakSet){if(iO(t)||iO(e))return Object.is(t,e);if(ch(t)&&ch(e))return t.getTime()===e.getTime();const i=Object.keys(t),r=Object.keys(e);if(i.length!==r.length)return!1;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);for(const a of i){const o=t[a];if(!r.includes(a))return!1;if(a!=="ref"){const s=e[a];if(ch(o)&&ch(s)||Ma(o)&&Ma(s)||Array.isArray(o)&&Array.isArray(s)?!rd(o,s,n):!Object.is(o,s))return!1}}return!0}function pGe(t){const e=ub(),{control:n=e.control,name:i,defaultValue:r,disabled:a,exact:o,compute:s}=t||{},l=se.useRef(r),c=se.useRef(s),d=se.useRef(void 0),f=se.useRef(n),h=se.useRef(i);c.current=s;const[m,p]=se.useState(()=>{const x=n._getWatch(i,l.current);return c.current?c.current(x):x}),g=se.useCallback(x=>{const F=nO(i,n._names,x||n._formValues,!1,l.current);return c.current?c.current(F):F},[n._formValues,n._names,i]),b=se.useCallback(x=>{if(!a){const F=nO(i,n._names,x||n._formValues,!1,l.current);if(c.current){const T=c.current(F);rd(T,d.current)||(p(T),d.current=T)}else p(F)}},[n._formValues,n._names,a,i]);bF(()=>((f.current!==n||!rd(h.current,i))&&(f.current=n,h.current=i,b()),n._subscribe({name:i,formState:{values:!0},exact:o,callback:x=>{b(x.values)}})),[n,o,i,b]),se.useEffect(()=>n._removeUnmounted());const k=f.current!==n,S=h.current,C=se.useMemo(()=>{if(a)return null;const x=!k&&!rd(S,i);return k||x?g():null},[a,k,i,S,g]);return C!==null?C:m}function gGe(t){const e=ub(),{name:n,disabled:i,control:r=e.control,shouldUnregister:a,defaultValue:o,exact:s=!0}=t,l=cse(r._names.array,n),c=se.useMemo(()=>jt(r._formValues,n,jt(r._defaultValues,n,o)),[r,n,o]),d=pGe({control:r,name:n,defaultValue:c,exact:s}),f=use({control:r,name:n,exact:s}),h=se.useRef(t),m=se.useRef(void 0),p=se.useRef(r.register(n,{...t.rules,value:d,...Sl(t.disabled)?{disabled:t.disabled}:{}}));h.current=t;const g=se.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!jt(f.errors,n)},isDirty:{enumerable:!0,get:()=>!!jt(f.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!jt(f.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!jt(f.validatingFields,n)},error:{enumerable:!0,get:()=>jt(f.errors,n)}}),[f,n]),b=se.useCallback(x=>p.current.onChange({target:{value:lse(x),name:n},type:nx.CHANGE}),[n]),k=se.useCallback(()=>p.current.onBlur({target:{value:jt(r._formValues,n),name:n},type:nx.BLUR}),[n,r._formValues]),S=se.useCallback(x=>{const F=jt(r._fields,n);F&&x&&(F._f.ref={focus:()=>x.focus&&x.focus(),select:()=>x.select&&x.select(),setCustomValidity:T=>x.setCustomValidity(T),reportValidity:()=>x.reportValidity()})},[r._fields,n]),C=se.useMemo(()=>({name:n,value:d,...Sl(i)||f.disabled?{disabled:f.disabled||i}:{},onChange:b,onBlur:k,ref:S}),[n,i,f.disabled,b,k,S,d]);return se.useEffect(()=>{const x=r._options.shouldUnregister||a,F=m.current;F&&F!==n&&!l&&r.unregister(F),r.register(n,{...h.current.rules,...Sl(h.current.disabled)?{disabled:h.current.disabled}:{}});const T=(E,I)=>{const R=jt(r._fields,E);R&&R._f&&(R._f.mount=I)};if(T(n,!0),x){const E=Br(jt(r._options.defaultValues,n,h.current.defaultValue));Ki(r._defaultValues,n,E),wr(jt(r._formValues,n))&&Ki(r._formValues,n,E)}return!l&&r.register(n),m.current=n,()=>{(l?x&&!r._state.action:x)?r.unregister(n):T(n,!1)}},[n,r,l,a]),se.useEffect(()=>{r._setDisabledField({disabled:i,name:n})},[i,n,r]),se.useMemo(()=>({field:C,formState:f,fieldState:g}),[C,f,g])}const ed=t=>t.render(gGe(t));var i6=(t,e,n,i,r)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[i]:r||!0}}:{},tl=t=>Array.isArray(t)?t:[t],pq=()=>{let t=[];return{get observers(){return t},next:r=>{for(const a of t)a.next&&a.next(r)},subscribe:r=>(t.push(r),{unsubscribe:()=>{t=t.filter(a=>a!==r)}}),unsubscribe:()=>{t=[]}}};function fse(t,e){const n={};for(const i in t)if(t.hasOwnProperty(i)){const r=t[i],a=e[i];if(r&&Ma(r)&&a){const o=fse(r,a);Ma(o)&&(n[i]=o)}else t[i]&&(n[i]=a)}return n}var ns=t=>Ma(t)&&!Object.keys(t).length,r6=t=>t.type==="file",ad=t=>typeof t=="function",ix=t=>{if(!e6)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},Ase=t=>t.type==="select-multiple",a6=t=>t.type==="radio",vGe=t=>a6(t)||db(t),TD=t=>ix(t)&&t.isConnected;function yGe(t,e){const n=e.slice(0,-1).length;let i=0;for(;i<n;)t=wr(t)?i++:t[e[i++]];return t}function kGe(t){for(const e in t)if(t.hasOwnProperty(e)&&!wr(t[e]))return!1;return!0}function ka(t,e){const n=Array.isArray(e)?e:yF(e)?[e]:t6(e),i=n.length===1?t:yGe(t,n),r=n.length-1,a=n[r];return i&&delete i[a],r!==0&&(Ma(i)&&ns(i)||Array.isArray(i)&&kGe(i))&&ka(t,n.slice(0,-1)),t}var bGe=t=>{for(const e in t)if(ad(t[e]))return!0;return!1};function mse(t){return Array.isArray(t)||Ma(t)&&!bGe(t)}function rO(t,e={}){for(const n in t){const i=t[n];mse(i)?(e[n]=Array.isArray(i)?[]:{},rO(i,e[n])):wr(i)||(e[n]=!0)}return e}function Ig(t,e,n){n||(n=rO(e));for(const i in t){const r=t[i];if(mse(r))wr(e)||iO(n[i])?n[i]=rO(r,Array.isArray(r)?[]:{}):Ig(r,Xs(e)?{}:e[i],n[i]);else{const a=e[i];n[i]=!rd(r,a)}}return n}const gq={value:!1,isValid:!1},vq={value:!0,isValid:!0};var hse=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!wr(t[0].attributes.value)?wr(t[0].value)||t[0].value===""?vq:{value:t[0].value,isValid:!0}:vq:gq}return gq},pse=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:i})=>wr(t)?t:e?t===""?NaN:t&&+t:n&&Nl(t)?new Date(t):i?i(t):t;const yq={isValid:!1,value:null};var gse=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,yq):yq;function kq(t){const e=t.ref;return r6(e)?e.files:a6(e)?gse(t.refs).value:Ase(e)?[...e.selectedOptions].map(({value:n})=>n):db(e)?hse(t.refs).value:pse(wr(e.value)?t.ref.value:e.value,t)}var SGe=(t,e,n,i)=>{const r={};for(const a of t){const o=jt(e,a);o&&Ki(r,a,o._f)}return{criteriaMode:n,names:[...t],fields:r,shouldUseNativeValidation:i}},rx=t=>t instanceof RegExp,dy=t=>wr(t)?t:rx(t)?t.source:Ma(t)?rx(t.value)?t.value.source:t.value:t,Hg=t=>({isOnSubmit:!t||t===lc.onSubmit,isOnBlur:t===lc.onBlur,isOnChange:t===lc.onChange,isOnAll:t===lc.all,isOnTouch:t===lc.onTouched});const bq="AsyncFunction";var wGe=t=>!!t&&!!t.validate&&!!(ad(t.validate)&&t.validate.constructor.name===bq||Ma(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===bq)),NGe=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),aO=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(i=>t.startsWith(i)&&/^\.\w+/.test(t.slice(i.length))));const sv=(t,e,n,i)=>{for(const r of n||Object.keys(t)){const a=jt(t,r);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],r)&&!i)return!0;if(o.ref&&e(o.ref,o.name)&&!i)return!0;if(sv(s,e))break}else if(Ma(s)&&sv(s,e))break}}};function Sq(t,e,n){const i=jt(t,n);if(i||yF(n))return{error:i,name:n};const r=n.split(".");for(;r.length;){const a=r.join("."),o=jt(e,a),s=jt(t,a);if(o&&!Array.isArray(o)&&n!==a)return{name:n};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};r.pop()}return{name:n}}var CGe=(t,e,n,i)=>{n(t);const{name:r,...a}=t;return ns(a)||Object.keys(a).length>=Object.keys(e).length||Object.keys(a).find(o=>e[o]===(!i||lc.all))},xGe=(t,e,n)=>!t||!e||t===e||tl(t).some(i=>i&&(n?i===e:i.startsWith(e)||e.startsWith(i))),FGe=(t,e,n,i,r)=>r.isOnAll?!1:!n&&r.isOnTouch?!(e||t):(n?i.isOnBlur:r.isOnBlur)?!t:(n?i.isOnChange:r.isOnChange)?t:!0,_Ge=(t,e)=>!kF(jt(t,e)).length&&ka(t,e),vse=(t,e,n)=>{const i=tl(jt(t,n));return Ki(i,"root",e[n]),Ki(t,n,i),t};function wq(t,e,n="validate"){if(Nl(t)||Array.isArray(t)&&t.every(Nl)||Sl(t)&&!t)return{type:n,message:Nl(t)?t:"",ref:e}}var gg=t=>Ma(t)&&!rx(t)?t:{value:t,message:""},oO=async(t,e,n,i,r,a)=>{const{ref:o,refs:s,required:l,maxLength:c,minLength:d,min:f,max:h,pattern:m,validate:p,name:g,valueAsNumber:b,mount:k}=t._f,S=jt(n,g);if(!k||e.has(g))return{};const C=s?s[0]:o,x=P=>{r&&C.reportValidity&&(C.setCustomValidity(Sl(P)?"":P||""),C.reportValidity())},F={},T=a6(o),E=db(o),I=T||E,R=(b||r6(o))&&wr(o.value)&&wr(S)||ix(o)&&o.value===""||S===""||Array.isArray(S)&&!S.length,V=i6.bind(null,g,i,F),U=(P,Z,q,ae=pf.maxLength,H=pf.minLength)=>{const te=P?Z:q;F[g]={type:P?ae:H,message:te,ref:o,...V(P?ae:H,te)}};if(a?!Array.isArray(S)||!S.length:l&&(!I&&(R||Xs(S))||Sl(S)&&!S||E&&!hse(s).isValid||T&&!gse(s).isValid)){const{value:P,message:Z}=Nl(l)?{value:!!l,message:l}:gg(l);if(P&&(F[g]={type:pf.required,message:Z,ref:C,...V(pf.required,Z)},!i))return x(Z),F}if(!R&&(!Xs(f)||!Xs(h))){let P,Z;const q=gg(h),ae=gg(f);if(!Xs(S)&&!isNaN(S)){const H=o.valueAsNumber||S&&+S;Xs(q.value)||(P=H>q.value),Xs(ae.value)||(Z=H<ae.value)}else{const H=o.valueAsDate||new Date(S),te=we=>new Date(new Date().toDateString()+" "+we),Y=o.type=="time",ue=o.type=="week";Nl(q.value)&&S&&(P=Y?te(S)>te(q.value):ue?S>q.value:H>new Date(q.value)),Nl(ae.value)&&S&&(Z=Y?te(S)<te(ae.value):ue?S<ae.value:H<new Date(ae.value))}if((P||Z)&&(U(!!P,q.message,ae.message,pf.max,pf.min),!i))return x(F[g].message),F}if((c||d)&&!R&&(Nl(S)||a&&Array.isArray(S))){const P=gg(c),Z=gg(d),q=!Xs(P.value)&&S.length>+P.value,ae=!Xs(Z.value)&&S.length<+Z.value;if((q||ae)&&(U(q,P.message,Z.message),!i))return x(F[g].message),F}if(m&&!R&&Nl(S)){const{value:P,message:Z}=gg(m);if(rx(P)&&!S.match(P)&&(F[g]={type:pf.pattern,message:Z,ref:o,...V(pf.pattern,Z)},!i))return x(Z),F}if(p){if(ad(p)){const P=await p(S,n),Z=wq(P,C);if(Z&&(F[g]={...Z,...V(pf.validate,Z.message)},!i))return x(Z.message),F}else if(Ma(p)){let P={};for(const Z in p){if(!ns(P)&&!i)break;const q=wq(await p[Z](S,n),C,Z);q&&(P={...q,...V(Z,q.message)},x(q.message),i&&(F[g]=P))}if(!ns(P)&&(F[g]={ref:C,...P},!i))return F}}return x(!0),F};const EGe={mode:lc.onSubmit,reValidateMode:lc.onChange,shouldFocusError:!0};function BGe(t={}){let e={...EGe,...t},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:ad(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},i={},r=Ma(e.defaultValues)||Ma(e.values)?Br(e.defaultValues||e.values)||{}:{},a=e.shouldUnregister?{}:Br(r),o={action:!1,mount:!1,watch:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...d};const h={array:pq(),state:pq()},m=e.criteriaMode===lc.all,p=ce=>ke=>{clearTimeout(c),c=setTimeout(ce,ke)},g=async ce=>{if(!e.disabled&&(d.isValid||f.isValid||ce)){const ke=e.resolver?ns((await E()).errors):await R(i,!0);ke!==n.isValid&&h.state.next({isValid:ke})}},b=(ce,ke)=>{!e.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((ce||Array.from(s.mount)).forEach(Ne=>{Ne&&(ke?Ki(n.validatingFields,Ne,ke):ka(n.validatingFields,Ne))}),h.state.next({validatingFields:n.validatingFields,isValidating:!ns(n.validatingFields)}))},k=(ce,ke=[],Ne,$e,Ge=!0,He=!0)=>{if($e&&Ne&&!e.disabled){if(o.action=!0,He&&Array.isArray(jt(i,ce))){const We=Ne(jt(i,ce),$e.argA,$e.argB);Ge&&Ki(i,ce,We)}if(He&&Array.isArray(jt(n.errors,ce))){const We=Ne(jt(n.errors,ce),$e.argA,$e.argB);Ge&&Ki(n.errors,ce,We),_Ge(n.errors,ce)}if((d.touchedFields||f.touchedFields)&&He&&Array.isArray(jt(n.touchedFields,ce))){const We=Ne(jt(n.touchedFields,ce),$e.argA,$e.argB);Ge&&Ki(n.touchedFields,ce,We)}(d.dirtyFields||f.dirtyFields)&&(n.dirtyFields=Ig(r,a)),h.state.next({name:ce,isDirty:U(ce,ke),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ki(a,ce,ke)},S=(ce,ke)=>{Ki(n.errors,ce,ke),h.state.next({errors:n.errors})},C=ce=>{n.errors=ce,h.state.next({errors:n.errors,isValid:!1})},x=(ce,ke,Ne,$e)=>{const Ge=jt(i,ce);if(Ge){const He=jt(a,ce,wr(Ne)?jt(r,ce):Ne);wr(He)||$e&&$e.defaultChecked||ke?Ki(a,ce,ke?He:kq(Ge._f)):q(ce,He),o.mount&&!o.action&&g()}},F=(ce,ke,Ne,$e,Ge)=>{let He=!1,We=!1;const ct={name:ce};if(!e.disabled){if(!Ne||$e){(d.isDirty||f.isDirty)&&(We=n.isDirty,n.isDirty=ct.isDirty=U(),He=We!==ct.isDirty);const ut=rd(jt(r,ce),ke);We=!!jt(n.dirtyFields,ce),ut?ka(n.dirtyFields,ce):Ki(n.dirtyFields,ce,!0),ct.dirtyFields=n.dirtyFields,He=He||(d.dirtyFields||f.dirtyFields)&&We!==!ut}if(Ne){const ut=jt(n.touchedFields,ce);ut||(Ki(n.touchedFields,ce,Ne),ct.touchedFields=n.touchedFields,He=He||(d.touchedFields||f.touchedFields)&&ut!==Ne)}He&&Ge&&h.state.next(ct)}return He?ct:{}},T=(ce,ke,Ne,$e)=>{const Ge=jt(n.errors,ce),He=(d.isValid||f.isValid)&&Sl(ke)&&n.isValid!==ke;if(e.delayError&&Ne?(l=p(()=>S(ce,Ne)),l(e.delayError)):(clearTimeout(c),l=null,Ne?Ki(n.errors,ce,Ne):ka(n.errors,ce)),(Ne?!rd(Ge,Ne):Ge)||!ns($e)||He){const We={...$e,...He&&Sl(ke)?{isValid:ke}:{},errors:n.errors,name:ce};n={...n,...We},h.state.next(We)}},E=async ce=>{b(ce,!0);const ke=await e.resolver(a,e.context,SGe(ce||s.mount,i,e.criteriaMode,e.shouldUseNativeValidation));return b(ce),ke},I=async ce=>{const{errors:ke}=await E(ce);if(ce)for(const Ne of ce){const $e=jt(ke,Ne);$e?Ki(n.errors,Ne,$e):ka(n.errors,Ne)}else n.errors=ke;return ke},R=async(ce,ke,Ne={valid:!0})=>{for(const $e in ce){const Ge=ce[$e];if(Ge){const{_f:He,...We}=Ge;if(He){const ct=s.array.has(He.name),ut=Ge._f&&wGe(Ge._f);ut&&d.validatingFields&&b([He.name],!0);const yt=await oO(Ge,s.disabled,a,m,e.shouldUseNativeValidation&&!ke,ct);if(ut&&d.validatingFields&&b([He.name]),yt[He.name]&&(Ne.valid=!1,ke))break;!ke&&(jt(yt,He.name)?ct?vse(n.errors,yt,He.name):Ki(n.errors,He.name,yt[He.name]):ka(n.errors,He.name))}!ns(We)&&await R(We,ke,Ne)}}return Ne.valid},V=()=>{for(const ce of s.unMount){const ke=jt(i,ce);ke&&(ke._f.refs?ke._f.refs.every(Ne=>!TD(Ne)):!TD(ke._f.ref))&&K(ce)}s.unMount=new Set},U=(ce,ke)=>!e.disabled&&(ce&&ke&&Ki(a,ce,ke),!rd(we(),r)),P=(ce,ke,Ne)=>nO(ce,s,{...o.mount?a:wr(ke)?r:Nl(ce)?{[ce]:ke}:ke},Ne,ke),Z=ce=>kF(jt(o.mount?a:r,ce,e.shouldUnregister?jt(r,ce,[]):[])),q=(ce,ke,Ne={})=>{const $e=jt(i,ce);let Ge=ke;if($e){const He=$e._f;He&&(!He.disabled&&Ki(a,ce,pse(ke,He)),Ge=ix(He.ref)&&Xs(ke)?"":ke,Ase(He.ref)?[...He.ref.options].forEach(We=>We.selected=Ge.includes(We.value)):He.refs?db(He.ref)?He.refs.forEach(We=>{(!We.defaultChecked||!We.disabled)&&(Array.isArray(Ge)?We.checked=!!Ge.find(ct=>ct===We.value):We.checked=Ge===We.value||!!Ge)}):He.refs.forEach(We=>We.checked=We.value===Ge):r6(He.ref)?He.ref.value="":(He.ref.value=Ge,He.ref.type||h.state.next({name:ce,values:Br(a)})))}(Ne.shouldDirty||Ne.shouldTouch)&&F(ce,Ge,Ne.shouldTouch,Ne.shouldDirty,!0),Ne.shouldValidate&&ue(ce)},ae=(ce,ke,Ne)=>{for(const $e in ke){if(!ke.hasOwnProperty($e))return;const Ge=ke[$e],He=ce+"."+$e,We=jt(i,He);(s.array.has(ce)||Ma(Ge)||We&&!We._f)&&!ch(Ge)?ae(He,Ge,Ne):q(He,Ge,Ne)}},H=(ce,ke,Ne={})=>{const $e=jt(i,ce),Ge=s.array.has(ce),He=Br(ke);Ki(a,ce,He),Ge?(h.array.next({name:ce,values:Br(a)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&Ne.shouldDirty&&h.state.next({name:ce,dirtyFields:Ig(r,a),isDirty:U(ce,He)})):$e&&!$e._f&&!Xs(He)?ae(ce,He,Ne):q(ce,He,Ne),aO(ce,s)&&h.state.next({...n,name:ce}),h.state.next({name:o.mount?ce:void 0,values:Br(a)})},te=async ce=>{o.mount=!0;const ke=ce.target;let Ne=ke.name,$e=!0;const Ge=jt(i,Ne),He=ut=>{$e=Number.isNaN(ut)||ch(ut)&&isNaN(ut.getTime())||rd(ut,jt(a,Ne,ut))},We=Hg(e.mode),ct=Hg(e.reValidateMode);if(Ge){let ut,yt;const me=ke.type?kq(Ge._f):lse(ce),z=ce.type===nx.BLUR||ce.type===nx.FOCUS_OUT,ee=!NGe(Ge._f)&&!e.resolver&&!jt(n.errors,Ne)&&!Ge._f.deps||FGe(z,jt(n.touchedFields,Ne),n.isSubmitted,ct,We),xe=aO(Ne,s,z);Ki(a,Ne,me),z?(!ke||!ke.readOnly)&&(Ge._f.onBlur&&Ge._f.onBlur(ce),l&&l(0)):Ge._f.onChange&&Ge._f.onChange(ce);const Be=F(Ne,me,z),Ue=!ns(Be)||xe;if(!z&&h.state.next({name:Ne,type:ce.type,values:Br(a)}),ee)return(d.isValid||f.isValid)&&(e.mode==="onBlur"?z&&g():z||g()),Ue&&h.state.next({name:Ne,...xe?{}:Be});if(!z&&xe&&h.state.next({...n}),e.resolver){const{errors:_e}=await E([Ne]);if(He(me),$e){const Pe=Sq(n.errors,i,Ne),xt=Sq(_e,i,Pe.name||Ne);ut=xt.error,Ne=xt.name,yt=ns(_e)}}else b([Ne],!0),ut=(await oO(Ge,s.disabled,a,m,e.shouldUseNativeValidation))[Ne],b([Ne]),He(me),$e&&(ut?yt=!1:(d.isValid||f.isValid)&&(yt=await R(i,!0)));$e&&(Ge._f.deps&&(!Array.isArray(Ge._f.deps)||Ge._f.deps.length>0)&&ue(Ge._f.deps),T(Ne,yt,ut,Be))}},Y=(ce,ke)=>{if(jt(n.errors,ke)&&ce.focus)return ce.focus(),1},ue=async(ce,ke={})=>{let Ne,$e;const Ge=tl(ce);if(e.resolver){const He=await I(wr(ce)?ce:Ge);Ne=ns(He),$e=ce?!Ge.some(We=>jt(He,We)):Ne}else ce?($e=(await Promise.all(Ge.map(async He=>{const We=jt(i,He);return await R(We&&We._f?{[He]:We}:We)}))).every(Boolean),!(!$e&&!n.isValid)&&g()):$e=Ne=await R(i);return h.state.next({...!Nl(ce)||(d.isValid||f.isValid)&&Ne!==n.isValid?{}:{name:ce},...e.resolver||!ce?{isValid:Ne}:{},errors:n.errors}),ke.shouldFocus&&!$e&&sv(i,Y,ce?Ge:s.mount),$e},we=(ce,ke)=>{let Ne={...o.mount?a:r};return ke&&(Ne=fse(ke.dirtyFields?n.dirtyFields:n.touchedFields,Ne)),wr(ce)?Ne:Nl(ce)?jt(Ne,ce):ce.map($e=>jt(Ne,$e))},ie=(ce,ke)=>({invalid:!!jt((ke||n).errors,ce),isDirty:!!jt((ke||n).dirtyFields,ce),error:jt((ke||n).errors,ce),isValidating:!!jt(n.validatingFields,ce),isTouched:!!jt((ke||n).touchedFields,ce)}),L=ce=>{ce&&tl(ce).forEach(ke=>ka(n.errors,ke)),h.state.next({errors:ce?n.errors:{}})},j=(ce,ke,Ne)=>{const $e=(jt(i,ce,{_f:{}})._f||{}).ref,Ge=jt(n.errors,ce)||{},{ref:He,message:We,type:ct,...ut}=Ge;Ki(n.errors,ce,{...ut,...ke,ref:$e}),h.state.next({name:ce,errors:n.errors,isValid:!1}),Ne&&Ne.shouldFocus&&$e&&$e.focus&&$e.focus()},$=(ce,ke)=>ad(ce)?h.state.subscribe({next:Ne=>"values"in Ne&&ce(P(void 0,ke),Ne)}):P(ce,ke,!0),W=ce=>h.state.subscribe({next:ke=>{xGe(ce.name,ke.name,ce.exact)&&CGe(ke,ce.formState||d,Q,ce.reRenderRoot)&&ce.callback({values:{...a},...n,...ke,defaultValues:r})}}).unsubscribe,J=ce=>(o.mount=!0,f={...f,...ce.formState},W({...ce,formState:f})),K=(ce,ke={})=>{for(const Ne of ce?tl(ce):s.mount)s.mount.delete(Ne),s.array.delete(Ne),ke.keepValue||(ka(i,Ne),ka(a,Ne)),!ke.keepError&&ka(n.errors,Ne),!ke.keepDirty&&ka(n.dirtyFields,Ne),!ke.keepTouched&&ka(n.touchedFields,Ne),!ke.keepIsValidating&&ka(n.validatingFields,Ne),!e.shouldUnregister&&!ke.keepDefaultValue&&ka(r,Ne);h.state.next({values:Br(a)}),h.state.next({...n,...ke.keepDirty?{isDirty:U()}:{}}),!ke.keepIsValid&&g()},fe=({disabled:ce,name:ke})=>{(Sl(ce)&&o.mount||ce||s.disabled.has(ke))&&(ce?s.disabled.add(ke):s.disabled.delete(ke))},ge=(ce,ke={})=>{let Ne=jt(i,ce);const $e=Sl(ke.disabled)||Sl(e.disabled);return Ki(i,ce,{...Ne||{},_f:{...Ne&&Ne._f?Ne._f:{ref:{name:ce}},name:ce,mount:!0,...ke}}),s.mount.add(ce),Ne?fe({disabled:Sl(ke.disabled)?ke.disabled:e.disabled,name:ce}):x(ce,!0,ke.value),{...$e?{disabled:ke.disabled||e.disabled}:{},...e.progressive?{required:!!ke.required,min:dy(ke.min),max:dy(ke.max),minLength:dy(ke.minLength),maxLength:dy(ke.maxLength),pattern:dy(ke.pattern)}:{},name:ce,onChange:te,onBlur:te,ref:Ge=>{if(Ge){ge(ce,ke),Ne=jt(i,ce);const He=wr(Ge.value)&&Ge.querySelectorAll&&Ge.querySelectorAll("input,select,textarea")[0]||Ge,We=vGe(He),ct=Ne._f.refs||[];if(We?ct.find(ut=>ut===He):He===Ne._f.ref)return;Ki(i,ce,{_f:{...Ne._f,...We?{refs:[...ct.filter(TD),He,...Array.isArray(jt(r,ce))?[{}]:[]],ref:{type:He.type,name:ce}}:{ref:He}}}),x(ce,!1,void 0,He)}else Ne=jt(i,ce,{}),Ne._f&&(Ne._f.mount=!1),(e.shouldUnregister||ke.shouldUnregister)&&!(cse(s.array,ce)&&o.action)&&s.unMount.add(ce)}}},Se=()=>e.shouldFocusError&&sv(i,Y,s.mount),oe=ce=>{Sl(ce)&&(h.state.next({disabled:ce}),sv(i,(ke,Ne)=>{const $e=jt(i,Ne);$e&&(ke.disabled=$e._f.disabled||ce,Array.isArray($e._f.refs)&&$e._f.refs.forEach(Ge=>{Ge.disabled=$e._f.disabled||ce}))},0,!1))},le=(ce,ke)=>async Ne=>{let $e;Ne&&(Ne.preventDefault&&Ne.preventDefault(),Ne.persist&&Ne.persist());let Ge=Br(a);if(h.state.next({isSubmitting:!0}),e.resolver){const{errors:He,values:We}=await E();n.errors=He,Ge=Br(We)}else await R(i);if(s.disabled.size)for(const He of s.disabled)ka(Ge,He);if(ka(n.errors,"root"),ns(n.errors)){h.state.next({errors:{}});try{await ce(Ge,Ne)}catch(He){$e=He}}else ke&&await ke({...n.errors},Ne),Se(),setTimeout(Se);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ns(n.errors)&&!$e,submitCount:n.submitCount+1,errors:n.errors}),$e)throw $e},Ee=(ce,ke={})=>{jt(i,ce)&&(wr(ke.defaultValue)?H(ce,Br(jt(r,ce))):(H(ce,ke.defaultValue),Ki(r,ce,Br(ke.defaultValue))),ke.keepTouched||ka(n.touchedFields,ce),ke.keepDirty||(ka(n.dirtyFields,ce),n.isDirty=ke.defaultValue?U(ce,Br(jt(r,ce))):U()),ke.keepError||(ka(n.errors,ce),d.isValid&&g()),h.state.next({...n}))},Le=(ce,ke={})=>{const Ne=ce?Br(ce):r,$e=Br(Ne),Ge=ns(ce),He=Ge?r:$e;if(ke.keepDefaultValues||(r=Ne),!ke.keepValues){if(ke.keepDirtyValues){const We=new Set([...s.mount,...Object.keys(Ig(r,a))]);for(const ct of Array.from(We))jt(n.dirtyFields,ct)?Ki(He,ct,jt(a,ct)):H(ct,jt(He,ct))}else{if(e6&&wr(ce))for(const We of s.mount){const ct=jt(i,We);if(ct&&ct._f){const ut=Array.isArray(ct._f.refs)?ct._f.refs[0]:ct._f.ref;if(ix(ut)){const yt=ut.closest("form");if(yt){yt.reset();break}}}}if(ke.keepFieldsRef)for(const We of s.mount)H(We,jt(He,We));else i={}}a=e.shouldUnregister?ke.keepDefaultValues?Br(r):{}:Br(He),h.array.next({values:{...He}}),h.state.next({values:{...He}})}s={mount:ke.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!ke.keepIsValid||!!ke.keepDirtyValues||!e.shouldUnregister&&!ns(He),o.watch=!!e.shouldUnregister,h.state.next({submitCount:ke.keepSubmitCount?n.submitCount:0,isDirty:Ge?!1:ke.keepDirty?n.isDirty:!!(ke.keepDefaultValues&&!rd(ce,r)),isSubmitted:ke.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ge?{}:ke.keepDirtyValues?ke.keepDefaultValues&&a?Ig(r,a):n.dirtyFields:ke.keepDefaultValues&&ce?Ig(r,ce):ke.keepDirty?n.dirtyFields:{},touchedFields:ke.keepTouched?n.touchedFields:{},errors:ke.keepErrors?n.errors:{},isSubmitSuccessful:ke.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:r})},ve=(ce,ke)=>Le(ad(ce)?ce(a):ce,ke),Ae=(ce,ke={})=>{const Ne=jt(i,ce),$e=Ne&&Ne._f;if($e){const Ge=$e.refs?$e.refs[0]:$e.ref;Ge.focus&&(Ge.focus(),ke.shouldSelect&&ad(Ge.select)&&Ge.select())}},Q=ce=>{n={...n,...ce}},ne={control:{register:ge,unregister:K,getFieldState:ie,handleSubmit:le,setError:j,_subscribe:W,_runSchema:E,_focusError:Se,_getWatch:P,_getDirty:U,_setValid:g,_setFieldArray:k,_setDisabledField:fe,_setErrors:C,_getFieldArray:Z,_reset:Le,_resetDefaultValues:()=>ad(e.defaultValues)&&e.defaultValues().then(ce=>{ve(ce,e.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:V,_disableForm:oe,_subjects:h,_proxyFormState:d,get _fields(){return i},get _formValues(){return a},get _state(){return o},set _state(ce){o=ce},get _defaultValues(){return r},get _names(){return s},set _names(ce){s=ce},get _formState(){return n},get _options(){return e},set _options(ce){e={...e,...ce}}},subscribe:J,trigger:ue,register:ge,handleSubmit:le,watch:$,setValue:H,getValues:we,reset:ve,resetField:Ee,clearErrors:L,unregister:K,setError:j,setFocus:Ae,getFieldState:ie};return{...ne,formControl:ne}}var DA=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const t=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=(Math.random()*16+t)%16|0;return(e=="x"?n:n&3|8).toString(16)})},DD=(t,e,n={})=>n.shouldFocus||wr(n.shouldFocus)?n.focusName||`${t}.${wr(n.focusIndex)?e:n.focusIndex}.`:"",ID=(t,e)=>[...t,...tl(e)],OD=t=>Array.isArray(t)?t.map(()=>{}):void 0;function RD(t,e,n){return[...t.slice(0,e),...tl(n),...t.slice(e)]}var PD=(t,e,n)=>Array.isArray(t)?(wr(t[n])&&(t[n]=void 0),t.splice(n,0,t.splice(e,1)[0]),t):[],LD=(t,e)=>[...tl(e),...tl(t)];function TGe(t,e){let n=0;const i=[...t];for(const r of e)i.splice(r-n,1),n++;return kF(i).length?i:[]}var UD=(t,e)=>wr(e)?[]:TGe(t,tl(e).sort((n,i)=>n-i)),MD=(t,e,n)=>{[t[e],t[n]]=[t[n],t[e]]},Nq=(t,e,n)=>(t[e]=n,t);function DGe(t){const e=ub(),{control:n=e.control,name:i,keyName:r="id",shouldUnregister:a,rules:o}=t,[s,l]=se.useState(n._getFieldArray(i)),c=se.useRef(n._getFieldArray(i).map(DA)),d=se.useRef(!1);n._names.array.add(i),se.useMemo(()=>o&&s.length>=0&&n.register(i,o),[n,i,s.length,o]),bF(()=>n._subjects.array.subscribe({next:({values:x,name:F})=>{if(F===i||!F){const T=jt(x,i);Array.isArray(T)&&(l(T),c.current=T.map(DA))}}}).unsubscribe,[n,i]);const f=se.useCallback(x=>{d.current=!0,n._setFieldArray(i,x)},[n,i]),h=(x,F)=>{const T=tl(Br(x)),E=ID(n._getFieldArray(i),T);n._names.focus=DD(i,E.length-1,F),c.current=ID(c.current,T.map(DA)),f(E),l(E),n._setFieldArray(i,E,ID,{argA:OD(x)})},m=(x,F)=>{const T=tl(Br(x)),E=LD(n._getFieldArray(i),T);n._names.focus=DD(i,0,F),c.current=LD(c.current,T.map(DA)),f(E),l(E),n._setFieldArray(i,E,LD,{argA:OD(x)})},p=x=>{const F=UD(n._getFieldArray(i),x);c.current=UD(c.current,x),f(F),l(F),!Array.isArray(jt(n._fields,i))&&Ki(n._fields,i,void 0),n._setFieldArray(i,F,UD,{argA:x})},g=(x,F,T)=>{const E=tl(Br(F)),I=RD(n._getFieldArray(i),x,E);n._names.focus=DD(i,x,T),c.current=RD(c.current,x,E.map(DA)),f(I),l(I),n._setFieldArray(i,I,RD,{argA:x,argB:OD(F)})},b=(x,F)=>{const T=n._getFieldArray(i);MD(T,x,F),MD(c.current,x,F),f(T),l(T),n._setFieldArray(i,T,MD,{argA:x,argB:F},!1)},k=(x,F)=>{const T=n._getFieldArray(i);PD(T,x,F),PD(c.current,x,F),f(T),l(T),n._setFieldArray(i,T,PD,{argA:x,argB:F},!1)},S=(x,F)=>{const T=Br(F),E=Nq(n._getFieldArray(i),x,T);c.current=[...E].map((I,R)=>!I||R===x?DA():c.current[R]),f(E),l([...E]),n._setFieldArray(i,E,Nq,{argA:x,argB:T},!0,!1)},C=x=>{const F=tl(Br(x));c.current=F.map(DA),f([...F]),l([...F]),n._setFieldArray(i,[...F],T=>T,{},!0,!1)};return se.useEffect(()=>{if(n._state.action=!1,aO(i,n._names)&&n._subjects.state.next({...n._formState}),d.current&&(!Hg(n._options.mode).isOnSubmit||n._formState.isSubmitted)&&!Hg(n._options.reValidateMode).isOnSubmit)if(n._options.resolver)n._runSchema([i]).then(x=>{const F=jt(x.errors,i),T=jt(n._formState.errors,i);(T?!F&&T.type||F&&(T.type!==F.type||T.message!==F.message):F&&F.type)&&(F?Ki(n._formState.errors,i,F):ka(n._formState.errors,i),n._subjects.state.next({errors:n._formState.errors}))});else{const x=jt(n._fields,i);x&&x._f&&!(Hg(n._options.reValidateMode).isOnSubmit&&Hg(n._options.mode).isOnSubmit)&&oO(x,n._names.disabled,n._formValues,n._options.criteriaMode===lc.all,n._options.shouldUseNativeValidation,!0).then(F=>!ns(F)&&n._subjects.state.next({errors:vse(n._formState.errors,F,i)}))}n._subjects.state.next({name:i,values:Br(n._formValues)}),n._names.focus&&sv(n._fields,(x,F)=>{if(n._names.focus&&F.startsWith(n._names.focus)&&x.focus)return x.focus(),1}),n._names.focus="",n._setValid(),d.current=!1},[s,i,n]),se.useEffect(()=>(!jt(n._formValues,i)&&n._setFieldArray(i),()=>{const x=(F,T)=>{const E=jt(n._fields,F);E&&E._f&&(E._f.mount=T)};n._options.shouldUnregister||a?n.unregister(i):x(i,!1)}),[i,n,r,a]),{swap:se.useCallback(b,[f,i,n]),move:se.useCallback(k,[f,i,n]),prepend:se.useCallback(m,[f,i,n]),append:se.useCallback(h,[f,i,n]),remove:se.useCallback(p,[f,i,n]),insert:se.useCallback(g,[f,i,n]),update:se.useCallback(S,[f,i,n]),replace:se.useCallback(C,[f,i,n]),fields:se.useMemo(()=>s.map((x,F)=>({...x,[r]:c.current[F]||DA()})),[s,r])}}function t0(t={}){const e=se.useRef(void 0),n=se.useRef(void 0),[i,r]=se.useState({isDirty:!1,isValidating:!1,isLoading:ad(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,isReady:!1,defaultValues:ad(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:i},t.defaultValues&&!ad(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:o,...s}=BGe(t);e.current={...s,formState:i}}const a=e.current.control;return a._options=t,bF(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>r({...a._formState}),reRenderRoot:!0});return r(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),se.useEffect(()=>a._disableForm(t.disabled),[a,t.disabled]),se.useEffect(()=>{t.mode&&(a._options.mode=t.mode),t.reValidateMode&&(a._options.reValidateMode=t.reValidateMode)},[a,t.mode,t.reValidateMode]),se.useEffect(()=>{t.errors&&(a._setErrors(t.errors),a._focusError())},[a,t.errors]),se.useEffect(()=>{t.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,t.shouldUnregister]),se.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==i.isDirty&&a._subjects.state.next({isDirty:o})}},[a,i.isDirty]),se.useEffect(()=>{var o;t.values&&!rd(t.values,n.current)?(a._reset(t.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),n.current=t.values,r(s=>({...s}))):a._resetDefaultValues()},[a,t.values]),se.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),e.current.formState=dse(i,a),e.current}const o6=()=>{const[{data:t,fetching:e,error:n},i]=Ns({query:sCe});n&&(console.error(`Error fetching businesses: ${n}`),fn.error("Error",{description:"Unable to fetch businesses"}));const r=N.useMemo(()=>t?.allBusinesses?.nodes.sort((o,s)=>o.name>s.name?1:-1)??[],[t]),a=N.useMemo(()=>r.map(o=>({value:o.id,label:o.name})),[r]);return{fetching:e,refresh:()=>i(),businesses:r,selectableBusinesses:a}},IGe=()=>{const[{data:t,fetching:e,error:n},i]=Ns({query:fCe});n&&(console.error(`Error fetching tax categories: ${n}`),fn.error("Error",{description:"Unable to fetch tax categories"}));const r=N.useMemo(()=>t?.taxCategories?.sort((o,s)=>o.name>s.name?1:-1)??[],[t]),a=N.useMemo(()=>r.map(o=>({value:o.id,label:o.name})),[r]);return{fetching:e,refresh:()=>i(),taxCategories:r,selectableTaxCategories:a}},fb=hGe,yse=se.createContext({}),fi=({...t})=>y.jsx(yse.Provider,{value:{name:t.name},children:y.jsx(ed,{...t})}),SF=()=>{const t=se.useContext(yse),e=se.useContext(kse),{getFieldState:n}=ub(),i=use({name:t.name}),r=n(t.name,i);if(!t)throw new Error("useFormField should be used within <FormField>");const{id:a}=e;return{id:a,name:t.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...r}},kse=se.createContext({});function Ai({className:t,...e}){const n=se.useId();return y.jsx(kse.Provider,{value:{id:n},children:y.jsx("div",{"data-slot":"form-item",className:Ut("grid gap-2",t),...e})})}function Ji({className:t,...e}){const{error:n,formItemId:i}=SF();return y.jsx(gn,{"data-slot":"form-label","data-error":!!n,className:Ut("data-[error=true]:text-red-500 dark:data-[error=true]:text-red-900",t),htmlFor:i,...e})}function Li({...t}){const{error:e,formItemId:n,formDescriptionId:i,formMessageId:r}=SF();return y.jsx(aR,{"data-slot":"form-control",id:n,"aria-describedby":e?`${i} ${r}`:String(i),"aria-invalid":!!e,...t})}function OGe({className:t,...e}){const{formDescriptionId:n}=SF();return y.jsx("p",{"data-slot":"form-description",id:n,className:Ut("text-gray-500 text-sm dark:text-gray-400",t),...e})}function vi({className:t,...e}){const{error:n,formMessageId:i}=SF(),r=n?String(n?.message??""):e.children;return r?y.jsx("p",{"data-slot":"form-message",id:i,className:Ut("text-red-500 text-sm dark:text-red-900",t),...e,children:r}):null}var wF="Switch",[RGe]=rl(wF),[PGe,LGe]=RGe(wF),bse=N.forwardRef((t,e)=>{const{__scopeSwitch:n,name:i,checked:r,defaultChecked:a,required:o,disabled:s,value:l="on",onCheckedChange:c,form:d,...f}=t,[h,m]=N.useState(null),p=Jn(e,C=>m(C)),g=N.useRef(!1),b=h?d||!!h.closest("form"):!0,[k,S]=md({prop:r,defaultProp:a??!1,onChange:c,caller:wF});return y.jsxs(PGe,{scope:n,checked:k,disabled:s,children:[y.jsx(Cn.button,{type:"button",role:"switch","aria-checked":k,"aria-required":o,"data-state":Cse(k),"data-disabled":s?"":void 0,disabled:s,value:l,...f,ref:p,onClick:Ht(t.onClick,C=>{S(x=>!x),b&&(g.current=C.isPropagationStopped(),g.current||C.stopPropagation())})}),b&&y.jsx(Nse,{control:h,bubbles:!g.current,name:i,value:l,checked:k,required:o,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});bse.displayName=wF;var Sse="SwitchThumb",wse=N.forwardRef((t,e)=>{const{__scopeSwitch:n,...i}=t,r=LGe(Sse,n);return y.jsx(Cn.span,{"data-state":Cse(r.checked),"data-disabled":r.disabled?"":void 0,...i,ref:e})});wse.displayName=Sse;var UGe="SwitchBubbleInput",Nse=N.forwardRef(({__scopeSwitch:t,control:e,checked:n,bubbles:i=!0,...r},a)=>{const o=N.useRef(null),s=Jn(o,a),l=ZP(n),c=zR(e);return N.useEffect(()=>{const d=o.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const p=new Event("click",{bubbles:i});m.call(d,n),d.dispatchEvent(p)}},[l,n,i]),y.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:s,style:{...r.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Nse.displayName=UGe;function Cse(t){return t?"checked":"unchecked"}var MGe=bse,$Ge=wse;function jGe({className:t,...e}){return y.jsx(MGe,{"data-slot":"switch",className:Ut("peer data-[state=checked]:bg-gray-900 data-[state=unchecked]:bg-gray-200 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 dark:data-[state=unchecked]:bg-gray-200/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-gray-200 border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=checked]:bg-gray-50 dark:data-[state=unchecked]:bg-gray-800 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:dark:data-[state=unchecked]:bg-gray-800/80 dark:border-gray-800",t),...e,children:y.jsx($Ge,{"data-slot":"switch-thumb",className:Ut("bg-white dark:data-[state=unchecked]:bg-gray-950 dark:data-[state=checked]:bg-gray-50 pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-gray-950 dark:dark:data-[state=unchecked]:bg-gray-50 dark:dark:data-[state=checked]:bg-gray-900")})})}var QGe=Object.defineProperty,HGe=Object.defineProperties,zGe=Object.getOwnPropertyDescriptors,ax=Object.getOwnPropertySymbols,xse=Object.prototype.hasOwnProperty,Fse=Object.prototype.propertyIsEnumerable,Cq=(t,e,n)=>e in t?QGe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xq=(t,e)=>{for(var n in e||(e={}))xse.call(e,n)&&Cq(t,n,e[n]);if(ax)for(var n of ax(e))Fse.call(e,n)&&Cq(t,n,e[n]);return t},Fq=(t,e)=>HGe(t,zGe(e)),VGe=(t,e)=>{var n={};for(var i in t)xse.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&ax)for(var i of ax(t))e.indexOf(i)<0&&Fse.call(t,i)&&(n[i]=t[i]);return n};function sO(t){var e=t,{direction:n,style:i}=e,r=VGe(e,["direction","style"]);const a=Sc();return se.createElement(j4e,Fq(xq({},r),{style:Fq(xq({},i),{transform:n==="next"&&a.dir==="ltr"||n==="previous"&&a.dir==="rtl"?"rotate(270deg)":"rotate(90deg)"})}))}sO.displayName="@mantine/dates/Chevron";var GGe=Object.defineProperty,qGe=Object.defineProperties,KGe=Object.getOwnPropertyDescriptors,_q=Object.getOwnPropertySymbols,WGe=Object.prototype.hasOwnProperty,YGe=Object.prototype.propertyIsEnumerable,Eq=(t,e,n)=>e in t?GGe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,KS=(t,e)=>{for(var n in e||(e={}))WGe.call(e,n)&&Eq(t,n,e[n]);if(_q)for(var n of _q(e))YGe.call(e,n)&&Eq(t,n,e[n]);return t},Bq=(t,e)=>qGe(t,KGe(e));const kk={xs:At(30),sm:At(36),md:At(42),lg:At(48),xl:At(54)};var XGe=Rn((t,{radius:e,isStatic:n},{size:i})=>{const r=t.fn.variant({variant:"filled"}),a=t.fn.variant({variant:"light"});return{day:Bq(KS({width:Xt({size:i,sizes:kk}),height:Xt({size:i,sizes:kk}),fontSize:Xt({size:i,sizes:t.fontSizes}),display:"inline-flex",justifyContent:"center",alignItems:"center",userSelect:n?void 0:"none",cursor:n?"default":"pointer",borderRadius:t.fn.radius(e)},n?null:t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),{"&:active":n?void 0:t.activeStyles,"&[data-disabled]":Bq(KS({color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4],cursor:"not-allowed"},t.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}}),"&[data-weekend]":{color:t.colors.red[t.fn.primaryShade()]},"&[data-outside]":{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]},"&[data-in-range]":KS({backgroundColor:a.background,borderRadius:0},n?null:t.fn.hover({backgroundColor:a.hover})),"&[data-first-in-range]":{borderTopLeftRadius:t.radius.sm,borderBottomLeftRadius:t.radius.sm},"&[data-last-in-range]":{borderTopRightRadius:t.radius.sm,borderBottomRightRadius:t.radius.sm},"&[data-selected]":KS({color:r.color,backgroundColor:r.background},n?null:t.fn.hover({backgroundColor:r.hover})),"&[data-hidden]":{display:"none"}})}}),ZGe=Object.defineProperty,JGe=Object.defineProperties,eqe=Object.getOwnPropertyDescriptors,Tq=Object.getOwnPropertySymbols,tqe=Object.prototype.hasOwnProperty,nqe=Object.prototype.propertyIsEnumerable,Dq=(t,e,n)=>e in t?ZGe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,WS=(t,e)=>{for(var n in e||(e={}))tqe.call(e,n)&&Dq(t,n,e[n]);if(Tq)for(var n of Tq(e))nqe.call(e,n)&&Dq(t,n,e[n]);return t},YS=(t,e)=>JGe(t,eqe(e)),iqe=Rn((t,e,{size:n})=>{const i=Xt({size:n,sizes:kk});return{calendarHeaderControlIcon:{},calendarHeader:{display:"flex",maxWidth:`calc(${i} * 7 + ${At(7)})`},calendarHeaderControl:YS(WS({width:i,height:i,borderRadius:t.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none"},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),{"&:active":t.activeStyles,"&[data-disabled]":YS(WS({opacity:.2,cursor:"not-allowed"},t.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})}),calendarHeaderLevel:YS(WS({height:i,borderRadius:t.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",flex:1,fontSize:Xt({size:n,sizes:t.fontSizes}),fontWeight:500,textTransform:"capitalize"},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),{"&:active":t.activeStyles,"&[data-static]":YS(WS({cursor:"default",userSelect:"unset"},t.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}}),rqe=Object.defineProperty,ox=Object.getOwnPropertySymbols,_se=Object.prototype.hasOwnProperty,Ese=Object.prototype.propertyIsEnumerable,Iq=(t,e,n)=>e in t?rqe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aqe=(t,e)=>{for(var n in e||(e={}))_se.call(e,n)&&Iq(t,n,e[n]);if(ox)for(var n of ox(e))Ese.call(e,n)&&Iq(t,n,e[n]);return t},oqe=(t,e)=>{var n={};for(var i in t)_se.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&ox)for(var i of ox(t))e.indexOf(i)<0&&Ese.call(t,i)&&(n[i]=t[i]);return n};const sqe={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0,size:"sm"},NF=N.forwardRef((t,e)=>{const n=pn("CalendarHeader",sqe,t),{className:i,nextIcon:r,previousIcon:a,nextLabel:o,previousLabel:s,onNext:l,onPrevious:c,onLevelClick:d,label:f,classNames:h,styles:m,unstyled:p,nextDisabled:g,previousDisabled:b,hasNextLevel:k,levelControlAriaLabel:S,withNext:C,withPrevious:x,__staticSelector:F,__preventFocus:T,__stopPropagation:E,size:I,variant:R}=n,V=oqe(n,["className","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","label","classNames","styles","unstyled","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","__staticSelector","__preventFocus","__stopPropagation","size","variant"]),{classes:U,cx:P}=iqe(null,{name:["CalendarHeader",F],classNames:h,styles:m,unstyled:p,size:I,variant:R}),Z=T?q=>q.preventDefault():void 0;return se.createElement(mi,aqe({className:P(U.calendarHeader,i),ref:e},V),x&&se.createElement(ev,{className:U.calendarHeaderControl,"data-previous":!0,"aria-label":s,onClick:c,unstyled:p,onMouseDown:Z,disabled:b,"data-disabled":b||void 0,tabIndex:T?-1:0,"data-mantine-stop-propagation":E||void 0},a||se.createElement(sO,{className:U.calendarHeaderControlIcon,direction:"previous","data-previous":!0})),se.createElement(ev,{component:k?"button":"div",className:U.calendarHeaderLevel,onClick:k?d:void 0,unstyled:p,onMouseDown:k?Z:void 0,disabled:!k,"data-static":!k||void 0,"aria-label":S,tabIndex:T||!k?-1:0,"data-mantine-stop-propagation":E||void 0},f),C&&se.createElement(ev,{className:U.calendarHeaderControl,"data-next":!0,"aria-label":o,onClick:l,unstyled:p,onMouseDown:Z,disabled:g,"data-disabled":g||void 0,tabIndex:T?-1:0,"data-mantine-stop-propagation":E||void 0},r||se.createElement(sO,{className:U.calendarHeaderControlIcon,direction:"next","data-next":!0})))});NF.displayName="@mantine/dates/CalendarHeader";var eN={exports:{}},lqe=eN.exports,Oq;function cqe(){return Oq||(Oq=1,(function(t,e){(function(n,i){t.exports=i()})(lqe,(function(){var n=1e3,i=6e4,r=36e5,a="millisecond",o="second",s="minute",l="hour",c="day",d="week",f="month",h="quarter",m="year",p="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var ae=["th","st","nd","rd"],H=q%100;return"["+q+(ae[(H-20)%10]||ae[H]||ae[0])+"]"}},C=function(q,ae,H){var te=String(q);return!te||te.length>=ae?q:""+Array(ae+1-te.length).join(H)+q},x={s:C,z:function(q){var ae=-q.utcOffset(),H=Math.abs(ae),te=Math.floor(H/60),Y=H%60;return(ae<=0?"+":"-")+C(te,2,"0")+":"+C(Y,2,"0")},m:function q(ae,H){if(ae.date()<H.date())return-q(H,ae);var te=12*(H.year()-ae.year())+(H.month()-ae.month()),Y=ae.clone().add(te,f),ue=H-Y<0,we=ae.clone().add(te+(ue?-1:1),f);return+(-(te+(H-Y)/(ue?Y-we:we-Y))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:f,y:m,w:d,d:c,D:p,h:l,m:s,s:o,ms:a,Q:h}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},F="en",T={};T[F]=S;var E="$isDayjsObject",I=function(q){return q instanceof P||!(!q||!q[E])},R=function q(ae,H,te){var Y;if(!ae)return F;if(typeof ae=="string"){var ue=ae.toLowerCase();T[ue]&&(Y=ue),H&&(T[ue]=H,Y=ue);var we=ae.split("-");if(!Y&&we.length>1)return q(we[0])}else{var ie=ae.name;T[ie]=ae,Y=ie}return!te&&Y&&(F=Y),Y||!te&&F},V=function(q,ae){if(I(q))return q.clone();var H=typeof ae=="object"?ae:{};return H.date=q,H.args=arguments,new P(H)},U=x;U.l=R,U.i=I,U.w=function(q,ae){return V(q,{locale:ae.$L,utc:ae.$u,x:ae.$x,$offset:ae.$offset})};var P=(function(){function q(H){this.$L=R(H.locale,null,!0),this.parse(H),this.$x=this.$x||H.x||{},this[E]=!0}var ae=q.prototype;return ae.parse=function(H){this.$d=(function(te){var Y=te.date,ue=te.utc;if(Y===null)return new Date(NaN);if(U.u(Y))return new Date;if(Y instanceof Date)return new Date(Y);if(typeof Y=="string"&&!/Z$/i.test(Y)){var we=Y.match(b);if(we){var ie=we[2]-1||0,L=(we[7]||"0").substring(0,3);return ue?new Date(Date.UTC(we[1],ie,we[3]||1,we[4]||0,we[5]||0,we[6]||0,L)):new Date(we[1],ie,we[3]||1,we[4]||0,we[5]||0,we[6]||0,L)}}return new Date(Y)})(H),this.init()},ae.init=function(){var H=this.$d;this.$y=H.getFullYear(),this.$M=H.getMonth(),this.$D=H.getDate(),this.$W=H.getDay(),this.$H=H.getHours(),this.$m=H.getMinutes(),this.$s=H.getSeconds(),this.$ms=H.getMilliseconds()},ae.$utils=function(){return U},ae.isValid=function(){return this.$d.toString()!==g},ae.isSame=function(H,te){var Y=V(H);return this.startOf(te)<=Y&&Y<=this.endOf(te)},ae.isAfter=function(H,te){return V(H)<this.startOf(te)},ae.isBefore=function(H,te){return this.endOf(te)<V(H)},ae.$g=function(H,te,Y){return U.u(H)?this[te]:this.set(Y,H)},ae.unix=function(){return Math.floor(this.valueOf()/1e3)},ae.valueOf=function(){return this.$d.getTime()},ae.startOf=function(H,te){var Y=this,ue=!!U.u(te)||te,we=U.p(H),ie=function(ge,Se){var oe=U.w(Y.$u?Date.UTC(Y.$y,Se,ge):new Date(Y.$y,Se,ge),Y);return ue?oe:oe.endOf(c)},L=function(ge,Se){return U.w(Y.toDate()[ge].apply(Y.toDate("s"),(ue?[0,0,0,0]:[23,59,59,999]).slice(Se)),Y)},j=this.$W,$=this.$M,W=this.$D,J="set"+(this.$u?"UTC":"");switch(we){case m:return ue?ie(1,0):ie(31,11);case f:return ue?ie(1,$):ie(0,$+1);case d:var K=this.$locale().weekStart||0,fe=(j<K?j+7:j)-K;return ie(ue?W-fe:W+(6-fe),$);case c:case p:return L(J+"Hours",0);case l:return L(J+"Minutes",1);case s:return L(J+"Seconds",2);case o:return L(J+"Milliseconds",3);default:return this.clone()}},ae.endOf=function(H){return this.startOf(H,!1)},ae.$set=function(H,te){var Y,ue=U.p(H),we="set"+(this.$u?"UTC":""),ie=(Y={},Y[c]=we+"Date",Y[p]=we+"Date",Y[f]=we+"Month",Y[m]=we+"FullYear",Y[l]=we+"Hours",Y[s]=we+"Minutes",Y[o]=we+"Seconds",Y[a]=we+"Milliseconds",Y)[ue],L=ue===c?this.$D+(te-this.$W):te;if(ue===f||ue===m){var j=this.clone().set(p,1);j.$d[ie](L),j.init(),this.$d=j.set(p,Math.min(this.$D,j.daysInMonth())).$d}else ie&&this.$d[ie](L);return this.init(),this},ae.set=function(H,te){return this.clone().$set(H,te)},ae.get=function(H){return this[U.p(H)]()},ae.add=function(H,te){var Y,ue=this;H=Number(H);var we=U.p(te),ie=function($){var W=V(ue);return U.w(W.date(W.date()+Math.round($*H)),ue)};if(we===f)return this.set(f,this.$M+H);if(we===m)return this.set(m,this.$y+H);if(we===c)return ie(1);if(we===d)return ie(7);var L=(Y={},Y[s]=i,Y[l]=r,Y[o]=n,Y)[we]||1,j=this.$d.getTime()+H*L;return U.w(j,this)},ae.subtract=function(H,te){return this.add(-1*H,te)},ae.format=function(H){var te=this,Y=this.$locale();if(!this.isValid())return Y.invalidDate||g;var ue=H||"YYYY-MM-DDTHH:mm:ssZ",we=U.z(this),ie=this.$H,L=this.$m,j=this.$M,$=Y.weekdays,W=Y.months,J=Y.meridiem,K=function(Se,oe,le,Ee){return Se&&(Se[oe]||Se(te,ue))||le[oe].slice(0,Ee)},fe=function(Se){return U.s(ie%12||12,Se,"0")},ge=J||function(Se,oe,le){var Ee=Se<12?"AM":"PM";return le?Ee.toLowerCase():Ee};return ue.replace(k,(function(Se,oe){return oe||(function(le){switch(le){case"YY":return String(te.$y).slice(-2);case"YYYY":return U.s(te.$y,4,"0");case"M":return j+1;case"MM":return U.s(j+1,2,"0");case"MMM":return K(Y.monthsShort,j,W,3);case"MMMM":return K(W,j);case"D":return te.$D;case"DD":return U.s(te.$D,2,"0");case"d":return String(te.$W);case"dd":return K(Y.weekdaysMin,te.$W,$,2);case"ddd":return K(Y.weekdaysShort,te.$W,$,3);case"dddd":return $[te.$W];case"H":return String(ie);case"HH":return U.s(ie,2,"0");case"h":return fe(1);case"hh":return fe(2);case"a":return ge(ie,L,!0);case"A":return ge(ie,L,!1);case"m":return String(L);case"mm":return U.s(L,2,"0");case"s":return String(te.$s);case"ss":return U.s(te.$s,2,"0");case"SSS":return U.s(te.$ms,3,"0");case"Z":return we}return null})(Se)||we.replace(":","")}))},ae.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},ae.diff=function(H,te,Y){var ue,we=this,ie=U.p(te),L=V(H),j=(L.utcOffset()-this.utcOffset())*i,$=this-L,W=function(){return U.m(we,L)};switch(ie){case m:ue=W()/12;break;case f:ue=W();break;case h:ue=W()/3;break;case d:ue=($-j)/6048e5;break;case c:ue=($-j)/864e5;break;case l:ue=$/r;break;case s:ue=$/i;break;case o:ue=$/n;break;default:ue=$}return Y?ue:U.a(ue)},ae.daysInMonth=function(){return this.endOf(f).$D},ae.$locale=function(){return T[this.$L]},ae.locale=function(H,te){if(!H)return this.$L;var Y=this.clone(),ue=R(H,te,!0);return ue&&(Y.$L=ue),Y},ae.clone=function(){return U.w(this.$d,this)},ae.toDate=function(){return new Date(this.valueOf())},ae.toJSON=function(){return this.isValid()?this.toISOString():null},ae.toISOString=function(){return this.$d.toISOString()},ae.toString=function(){return this.$d.toUTCString()},q})(),Z=P.prototype;return V.prototype=Z,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",c],["$M",f],["$y",m],["$D",p]].forEach((function(q){Z[q[1]]=function(ae){return this.$g(ae,q[0],q[1])}})),V.extend=function(q,ae){return q.$i||(q(ae,P,V),q.$i=!0),V},V.locale=R,V.isDayjs=I,V.unix=function(q){return V(1e3*q)},V.en=T[F],V.Ls=T,V.p={},V}))})(eN)),eN.exports}var dqe=cqe();const dn=Rk(dqe);function $D(t,e){return t?t==="month"?0:t==="year"?1:2:e}function uqe(t){return t===0?"month":t===1?"year":"decade"}function uy(t,e,n){return uqe(Lw($D(t,0),$D(e,0),$D(n,2)))}var fqe=Rn(()=>({calendar:{}})),Aqe=Rn((t,e,{size:n})=>({monthLevelGroup:{display:"flex","& [data-month-level]:not(:last-of-type)":{marginRight:Xt({size:n,sizes:t.spacing})}}})),mqe=Rn(t=>({monthLevel:{},calendarHeader:{marginBottom:t.spacing.xs}}));const hqe={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–"},pqe=N.createContext(hqe);var gqe=Object.defineProperty,vqe=Object.defineProperties,yqe=Object.getOwnPropertyDescriptors,Rq=Object.getOwnPropertySymbols,kqe=Object.prototype.hasOwnProperty,bqe=Object.prototype.propertyIsEnumerable,Pq=(t,e,n)=>e in t?gqe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sqe=(t,e)=>{for(var n in e||(e={}))kqe.call(e,n)&&Pq(t,n,e[n]);if(Rq)for(var n of Rq(e))bqe.call(e,n)&&Pq(t,n,e[n]);return t},wqe=(t,e)=>vqe(t,yqe(e));function Hf(){const t=N.useContext(pqe),e=N.useCallback(a=>a||t.locale,[t.locale]),n=N.useCallback(a=>typeof a=="number"?a:t.firstDayOfWeek,[t.firstDayOfWeek]),i=N.useCallback(a=>Array.isArray(a)?a:t.weekendDays,[t.weekendDays]),r=N.useCallback(a=>typeof a=="string"?a:t.labelSeparator,[t.labelSeparator]);return wqe(Sqe({},t),{getLocale:e,getFirstDayOfWeek:n,getWeekendDays:i,getLabelSeparator:r})}function Nqe(t,e=1){const n=new Date(t);for(;n.getDay()!==e;)n.setDate(n.getDate()-1);return n}function Cqe(t,e=1){const n=new Date(t),i=e===0?6:e-1;for(;n.getDay()!==i;)n.setDate(n.getDate()+1);return n}function xqe(t,e=1){const n=t.getMonth(),i=new Date(t.getFullYear(),n,1),r=new Date(t.getFullYear(),t.getMonth()+1,0),a=Cqe(r,e),o=Nqe(i,e),s=[];for(;o<=a;){const l=[];for(let c=0;c<7;c+=1)l.push(new Date(o)),o.setDate(o.getDate()+1);s.push(l)}return s}function Bse(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function Tse(t,e){return e instanceof Date?dn(t).isBefore(dn(e).add(1,"day"),"day"):!0}function Dse(t,e){return e instanceof Date?dn(t).isAfter(dn(e).subtract(1,"day"),"day"):!0}var Fqe=Object.defineProperty,_qe=Object.defineProperties,Eqe=Object.getOwnPropertyDescriptors,Lq=Object.getOwnPropertySymbols,Bqe=Object.prototype.hasOwnProperty,Tqe=Object.prototype.propertyIsEnumerable,Uq=(t,e,n)=>e in t?Fqe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Dqe=(t,e)=>{for(var n in e||(e={}))Bqe.call(e,n)&&Uq(t,n,e[n]);if(Lq)for(var n of Lq(e))Tqe.call(e,n)&&Uq(t,n,e[n]);return t},Iqe=(t,e)=>_qe(t,Eqe(e)),Oqe=Rn(t=>({monthThead:{},monthRow:{},monthTbody:{},monthCell:{padding:0,"&[data-with-spacing]":{padding:At(.5)}},month:Iqe(Dqe({},t.fn.fontStyles()),{borderCollapse:"collapse",tableLayout:"fixed","& *":{boxSizing:"border-box"}})}));function Rqe(t,e,n,i,r,a,o){const s=t.flat().filter(d=>{var f;return Tse(d,n)&&Dse(d,e)&&!r?.(d)&&!((f=i?.(d))!=null&&f.disabled)&&(!a||Bse(d,o))}),l=s.find(d=>{var f;return(f=i?.(d))==null?void 0:f.selected});if(l)return l;const c=s.find(d=>dn().isSame(d,"date"));return c||s[0]}var Pqe=Object.defineProperty,sx=Object.getOwnPropertySymbols,Ise=Object.prototype.hasOwnProperty,Ose=Object.prototype.propertyIsEnumerable,Mq=(t,e,n)=>e in t?Pqe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Lqe=(t,e)=>{for(var n in e||(e={}))Ise.call(e,n)&&Mq(t,n,e[n]);if(sx)for(var n of sx(e))Ose.call(e,n)&&Mq(t,n,e[n]);return t},Uqe=(t,e)=>{var n={};for(var i in t)Ise.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&sx)for(var i of sx(t))e.indexOf(i)<0&&Ose.call(t,i)&&(n[i]=t[i]);return n};const Mqe={tabIndex:0,size:"sm"},Rse=N.forwardRef((t,e)=>{const n=pn("Day",Mqe,t),{className:i,date:r,radius:a,disabled:o,styles:s,classNames:l,unstyled:c,__staticSelector:d,weekend:f,outside:h,selected:m,renderDay:p,inRange:g,firstInRange:b,lastInRange:k,hidden:S,static:C,variant:x,size:F}=n,T=Uqe(n,["className","date","radius","disabled","styles","classNames","unstyled","__staticSelector","weekend","outside","selected","renderDay","inRange","firstInRange","lastInRange","hidden","static","variant","size"]),{classes:E,cx:I}=XGe({radius:a,isStatic:C},{name:["Day",d],classNames:l,styles:s,unstyled:c,variant:x,size:F});return se.createElement(ev,Lqe({component:C?"div":"button",ref:e,className:I(E.day,i),disabled:o,"data-today":dn(r).isSame(new Date,"day")||void 0,"data-hidden":S||void 0,"data-disabled":o||void 0,"data-weekend":!o&&!h&&f||void 0,"data-outside":!o&&h||void 0,"data-selected":!o&&m||void 0,"data-in-range":g&&!o||void 0,"data-first-in-range":b&&!o||void 0,"data-last-in-range":k&&!o||void 0,unstyled:c},T),p?.(r)||r.getDate())});Rse.displayName="@mantine/dates/Day";function $qe({locale:t,format:e="dd",firstDayOfWeek:n=1}){const i=dn().day(n),r=[];for(let a=0;a<7;a+=1)typeof e=="string"?r.push(dn(i).add(a,"days").locale(t).format(e)):r.push(e(dn(i).add(a,"days").toDate()));return r}var jqe=Rn((t,e,{size:n})=>({weekdaysRow:{},weekday:{color:t.colorScheme==="dark"?t.colors.dark[1]:t.colors.gray[5],fontWeight:400,fontSize:Xt({size:n,sizes:t.fontSizes}),textTransform:"capitalize",paddingBottom:`calc(${Xt({size:n,sizes:t.spacing})} / 2)`}})),Qqe=Object.defineProperty,lx=Object.getOwnPropertySymbols,Pse=Object.prototype.hasOwnProperty,Lse=Object.prototype.propertyIsEnumerable,$q=(t,e,n)=>e in t?Qqe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hqe=(t,e)=>{for(var n in e||(e={}))Pse.call(e,n)&&$q(t,n,e[n]);if(lx)for(var n of lx(e))Lse.call(e,n)&&$q(t,n,e[n]);return t},zqe=(t,e)=>{var n={};for(var i in t)Pse.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&lx)for(var i of lx(t))e.indexOf(i)<0&&Lse.call(t,i)&&(n[i]=t[i]);return n};const Vqe={weekdayFormat:"dd",cellComponent:"th",size:"sm"},Use=N.forwardRef((t,e)=>{const n=pn("WeekdaysRow",Vqe,t),{className:i,locale:r,firstDayOfWeek:a,weekdayFormat:o,cellComponent:s,__staticSelector:l,classNames:c,styles:d,unstyled:f,variant:h,size:m}=n,p=zqe(n,["className","locale","firstDayOfWeek","weekdayFormat","cellComponent","__staticSelector","classNames","styles","unstyled","variant","size"]),g=Hf(),{classes:b,cx:k}=jqe(null,{name:["WeekdaysRow",l],classNames:c,styles:d,unstyled:f,variant:h,size:m}),S=$qe({locale:g.getLocale(r),format:o,firstDayOfWeek:g.getFirstDayOfWeek(a)}).map((C,x)=>se.createElement(s,{key:x,className:b.weekday},C));return se.createElement(mi,Hqe({component:"tr",ref:e,className:k(b.weekdaysRow,i)},p),S)});Use.displayName="@mantine/dates/WeekdaysRow";var Gqe=Object.defineProperty,qqe=Object.defineProperties,Kqe=Object.getOwnPropertyDescriptors,cx=Object.getOwnPropertySymbols,Mse=Object.prototype.hasOwnProperty,$se=Object.prototype.propertyIsEnumerable,jq=(t,e,n)=>e in t?Gqe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,XS=(t,e)=>{for(var n in e||(e={}))Mse.call(e,n)&&jq(t,n,e[n]);if(cx)for(var n of cx(e))$se.call(e,n)&&jq(t,n,e[n]);return t},jD=(t,e)=>qqe(t,Kqe(e)),Wqe=(t,e)=>{var n={};for(var i in t)Mse.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&cx)for(var i of cx(t))e.indexOf(i)<0&&$se.call(t,i)&&(n[i]=t[i]);return n};const Yqe={size:"sm",withCellSpacing:!0},jse=N.forwardRef((t,e)=>{const n=pn("Month",Yqe,t),{className:i,classNames:r,styles:a,unstyled:o,__staticSelector:s,locale:l,firstDayOfWeek:c,weekdayFormat:d,month:f,weekendDays:h,getDayProps:m,excludeDate:p,minDate:g,maxDate:b,renderDay:k,hideOutsideDates:S,hideWeekdays:C,getDayAriaLabel:x,static:F,__getDayRef:T,__onDayKeyDown:E,__onDayClick:I,__onDayMouseEnter:R,__preventFocus:V,__stopPropagation:U,withCellSpacing:P,size:Z,variant:q}=n,ae=Wqe(n,["className","classNames","styles","unstyled","__staticSelector","locale","firstDayOfWeek","weekdayFormat","month","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","static","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","__preventFocus","__stopPropagation","withCellSpacing","size","variant"]),H=Hf(),{classes:te,cx:Y}=Oqe(null,{name:["Month",s],classNames:r,styles:a,unstyled:o,variant:q,size:Z}),ue={__staticSelector:s||"Month",classNames:r,styles:a,unstyled:o,variant:q,size:Z},we=xqe(f,H.getFirstDayOfWeek(c)),ie=Rqe(we,g,b,m,p,S,f),L=we.map((j,$)=>{const W=j.map((J,K)=>{const fe=!Bse(J,f),ge=x?.(J)||dn(J).locale(l||H.locale).format("D MMMM YYYY"),Se=m?.(J),oe=dn(J).isSame(ie,"date");return se.createElement("td",{key:J.toString(),className:te.monthCell,"data-with-spacing":P||void 0},se.createElement(Rse,jD(XS(jD(XS({},ue),{"data-mantine-stop-propagation":U||void 0,renderDay:k,date:J,weekend:H.getWeekendDays(h).includes(J.getDay()),outside:fe,hidden:S?fe:!1,"aria-label":ge,static:F,disabled:p?.(J)||!Tse(J,b)||!Dse(J,g),ref:le=>T?.($,K,le)}),Se),{onKeyDown:le=>{var Ee;(Ee=Se?.onKeyDown)==null||Ee.call(Se,le),E?.(le,{rowIndex:$,cellIndex:K,date:J})},onMouseEnter:le=>{var Ee;(Ee=Se?.onMouseEnter)==null||Ee.call(Se,le),R?.(le,J)},onClick:le=>{var Ee;(Ee=Se?.onClick)==null||Ee.call(Se,le),I?.(le,J)},onMouseDown:le=>{var Ee;(Ee=Se?.onMouseDown)==null||Ee.call(Se,le),V&&le.preventDefault()},tabIndex:V||!oe?-1:0})))});return se.createElement("tr",{key:$,className:te.monthRow},W)});return se.createElement(mi,XS({component:"table",className:Y(te.month,i),ref:e},ae),!C&&se.createElement("thead",{className:te.monthThead},se.createElement(Use,jD(XS({},ue),{locale:l,firstDayOfWeek:c,weekdayFormat:d}))),se.createElement("tbody",{className:te.monthTbody},L))});jse.displayName="@mantine/dates/Month";var Xqe=Object.defineProperty,dx=Object.getOwnPropertySymbols,Qse=Object.prototype.hasOwnProperty,Hse=Object.prototype.propertyIsEnumerable,Qq=(t,e,n)=>e in t?Xqe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,QD=(t,e)=>{for(var n in e||(e={}))Qse.call(e,n)&&Qq(t,n,e[n]);if(dx)for(var n of dx(e))Hse.call(e,n)&&Qq(t,n,e[n]);return t},Zqe=(t,e)=>{var n={};for(var i in t)Qse.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&dx)for(var i of dx(t))e.indexOf(i)<0&&Hse.call(t,i)&&(n[i]=t[i]);return n};const Jqe={monthLabelFormat:"MMMM YYYY"},zse=N.forwardRef((t,e)=>{const n=pn("MonthLevel",Jqe,t),{month:i,locale:r,firstDayOfWeek:a,weekdayFormat:o,weekendDays:s,getDayProps:l,excludeDate:c,minDate:d,maxDate:f,renderDay:h,hideOutsideDates:m,hideWeekdays:p,getDayAriaLabel:g,__getDayRef:b,__onDayKeyDown:k,__onDayClick:S,__onDayMouseEnter:C,withCellSpacing:x,__preventFocus:F,__stopPropagation:T,nextIcon:E,previousIcon:I,nextLabel:R,previousLabel:V,onNext:U,onPrevious:P,onLevelClick:Z,nextDisabled:q,previousDisabled:ae,hasNextLevel:H,levelControlAriaLabel:te,withNext:Y,withPrevious:ue,className:we,monthLabelFormat:ie,classNames:L,styles:j,unstyled:$,__staticSelector:W,size:J,variant:K,static:fe}=n,ge=Zqe(n,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","__stopPropagation","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","monthLabelFormat","classNames","styles","unstyled","__staticSelector","size","variant","static"]),{classes:Se,cx:oe}=mqe(null,{name:["MonthLevel",W],classNames:L,styles:j,unstyled:$,variant:K,size:J}),le=Hf(),Ee={__staticSelector:W||"MonthLevel",classNames:L,styles:j,unstyled:$,variant:K,size:J},Le=typeof q=="boolean"?q:f?!dn(i).endOf("month").isBefore(f):!1,ve=typeof ae=="boolean"?ae:d?!dn(i).startOf("month").isAfter(d):!1;return se.createElement(mi,QD({className:oe(Se.monthLevel,we),"data-month-level":!0,ref:e},ge),se.createElement(NF,QD({label:typeof ie=="function"?ie(i):dn(i).locale(r||le.locale).format(ie),className:Se.calendarHeader,__preventFocus:F,__stopPropagation:T,nextIcon:E,previousIcon:I,nextLabel:R,previousLabel:V,onNext:U,onPrevious:P,onLevelClick:Z,nextDisabled:Le,previousDisabled:ve,hasNextLevel:H,levelControlAriaLabel:te,withNext:Y,withPrevious:ue},Ee)),se.createElement(jse,QD({month:i,locale:r,firstDayOfWeek:a,weekdayFormat:o,weekendDays:s,getDayProps:l,excludeDate:c,minDate:d,maxDate:f,renderDay:h,hideOutsideDates:m,hideWeekdays:p,getDayAriaLabel:g,__getDayRef:b,__onDayKeyDown:k,__onDayClick:S,__onDayMouseEnter:C,__preventFocus:F,__stopPropagation:T,static:fe,withCellSpacing:x},Ee)))});zse.displayName="@mantine/dates/MonthLevel";function eKe({direction:t,levelIndex:e,rowIndex:n,cellIndex:i,size:r}){switch(t){case"up":return e===0&&n===0?null:n===0?{levelIndex:e-1,rowIndex:i<=r[e-1][r[e-1].length-1]-1?r[e-1].length-1:r[e-1].length-2,cellIndex:i}:{levelIndex:e,rowIndex:n-1,cellIndex:i};case"down":return n===r[e].length-1?{levelIndex:e+1,rowIndex:0,cellIndex:i}:n===r[e].length-2&&i>=r[e][r[e].length-1]?{levelIndex:e+1,rowIndex:0,cellIndex:i}:{levelIndex:e,rowIndex:n+1,cellIndex:i};case"left":return e===0&&n===0&&i===0?null:n===0&&i===0?{levelIndex:e-1,rowIndex:r[e-1].length-1,cellIndex:r[e-1][r[e-1].length-1]-1}:i===0?{levelIndex:e,rowIndex:n-1,cellIndex:r[e][n-1]-1}:{levelIndex:e,rowIndex:n,cellIndex:i-1};case"right":return n===r[e].length-1&&i===r[e][n]-1?{levelIndex:e+1,rowIndex:0,cellIndex:0}:i===r[e][n]-1?{levelIndex:e,rowIndex:n+1,cellIndex:0}:{levelIndex:e,rowIndex:n,cellIndex:i+1};default:return{levelIndex:e,rowIndex:n,cellIndex:i}}}function Vse({controlsRef:t,direction:e,levelIndex:n,rowIndex:i,cellIndex:r,size:a}){var o,s;const l=eKe({direction:e,size:a,rowIndex:i,cellIndex:r,levelIndex:n});if(!l)return;const c=(s=(o=t.current[l.levelIndex])==null?void 0:o[l.rowIndex])==null?void 0:s[l.cellIndex];c&&(c.disabled||c.getAttribute("data-hidden")||c.getAttribute("data-outside")?Vse({controlsRef:t,direction:e,levelIndex:l.levelIndex,cellIndex:l.cellIndex,rowIndex:l.rowIndex,size:a}):c.focus())}function tKe(t){switch(t){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function nKe(t){return t.current.map(e=>e.map(n=>n.length))}function s6({controlsRef:t,levelIndex:e,rowIndex:n,cellIndex:i,event:r}){const a=tKe(r.key);if(a){r.preventDefault();const o=nKe(t);Vse({controlsRef:t,direction:a,levelIndex:e,rowIndex:n,cellIndex:i,size:o})}}var iKe=Object.defineProperty,ux=Object.getOwnPropertySymbols,Gse=Object.prototype.hasOwnProperty,qse=Object.prototype.propertyIsEnumerable,Hq=(t,e,n)=>e in t?iKe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rKe=(t,e)=>{for(var n in e||(e={}))Gse.call(e,n)&&Hq(t,n,e[n]);if(ux)for(var n of ux(e))qse.call(e,n)&&Hq(t,n,e[n]);return t},aKe=(t,e)=>{var n={};for(var i in t)Gse.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&ux)for(var i of ux(t))e.indexOf(i)<0&&qse.call(t,i)&&(n[i]=t[i]);return n};const oKe={numberOfColumns:1},Kse=N.forwardRef((t,e)=>{const n=pn("MonthLevelGroup",oKe,t),{month:i,locale:r,firstDayOfWeek:a,weekdayFormat:o,weekendDays:s,getDayProps:l,excludeDate:c,minDate:d,maxDate:f,renderDay:h,hideOutsideDates:m,hideWeekdays:p,getDayAriaLabel:g,__onDayClick:b,__onDayMouseEnter:k,withCellSpacing:S,__preventFocus:C,nextIcon:x,previousIcon:F,nextLabel:T,previousLabel:E,onNext:I,onPrevious:R,onLevelClick:V,nextDisabled:U,previousDisabled:P,hasNextLevel:Z,className:q,classNames:ae,styles:H,unstyled:te,numberOfColumns:Y,levelControlAriaLabel:ue,monthLabelFormat:we,__staticSelector:ie,__stopPropagation:L,size:j,variant:$,static:W}=n,J=aKe(n,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","numberOfColumns","levelControlAriaLabel","monthLabelFormat","__staticSelector","__stopPropagation","size","variant","static"]),{classes:K,cx:fe}=Aqe(null,{name:["MonthLevelGroup",ie],classNames:ae,styles:H,unstyled:te,variant:$,size:j}),ge=N.useRef([]),Se=Array(Y).fill(0).map((oe,le)=>{const Ee=dn(i).add(le,"months").toDate();return se.createElement(zse,{key:le,month:Ee,withNext:le===Y-1,withPrevious:le===0,monthLabelFormat:we,__stopPropagation:L,__onDayClick:b,__onDayMouseEnter:k,__onDayKeyDown:(Le,ve)=>s6({levelIndex:le,rowIndex:ve.rowIndex,cellIndex:ve.cellIndex,event:Le,controlsRef:ge}),__getDayRef:(Le,ve,Ae)=>{Array.isArray(ge.current[le])||(ge.current[le]=[]),Array.isArray(ge.current[le][Le])||(ge.current[le][Le]=[]),ge.current[le][Le][ve]=Ae},levelControlAriaLabel:typeof ue=="function"?ue(Ee):ue,locale:r,firstDayOfWeek:a,weekdayFormat:o,weekendDays:s,getDayProps:l,excludeDate:c,minDate:d,maxDate:f,renderDay:h,hideOutsideDates:m,hideWeekdays:p,getDayAriaLabel:g,__preventFocus:C,nextIcon:x,previousIcon:F,nextLabel:T,previousLabel:E,onNext:I,onPrevious:R,onLevelClick:V,nextDisabled:U,previousDisabled:P,hasNextLevel:Z,classNames:ae,styles:H,unstyled:te,__staticSelector:ie||"MonthLevelGroup",size:j,variant:$,static:W,withCellSpacing:S})});return se.createElement(mi,rKe({className:fe(K.monthLevelGroup,q),ref:e},J),Se)});Kse.displayName="@mantine/dates/MonthLevelGroup";var sKe=Rn((t,e,{size:n})=>({yearLevelGroup:{display:"flex","& [data-year-level]:not(:last-of-type)":{marginRight:Xt({size:n,sizes:t.spacing})}}})),lKe=Rn(t=>({yearLevel:{},calendarHeader:{marginBottom:t.spacing.xs}}));function cKe(t){const e=dn(t).startOf("year").toDate(),n=[[],[],[],[]];let i=0;for(let r=0;r<4;r+=1)for(let a=0;a<3;a+=1)n[r].push(dn(e).add(i,"months").toDate()),i+=1;return n}function Wse(t,e,n){return!e&&!n?!1:!!(e&&dn(t).isBefore(e,"month")||n&&dn(t).isAfter(n,"month"))}var dKe=Rn(()=>({monthsList:{borderCollapse:"collapse",borderWidth:0,cursor:"pointer"},monthsListCell:{padding:0,"&[data-with-spacing]":{padding:At(.5)}},monthsListRow:{}}));function uKe(t,e,n,i){const r=t.flat().filter(s=>{var l;return!Wse(s,e,n)&&!((l=i?.(s))!=null&&l.disabled)}),a=r.find(s=>{var l;return(l=i?.(s))==null?void 0:l.selected});if(a)return a;const o=r.find(s=>dn().isSame(s,"month"));return o||r[0]}var fKe=Object.defineProperty,AKe=Object.defineProperties,mKe=Object.getOwnPropertyDescriptors,zq=Object.getOwnPropertySymbols,hKe=Object.prototype.hasOwnProperty,pKe=Object.prototype.propertyIsEnumerable,Vq=(t,e,n)=>e in t?fKe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ZS=(t,e)=>{for(var n in e||(e={}))hKe.call(e,n)&&Vq(t,n,e[n]);if(zq)for(var n of zq(e))pKe.call(e,n)&&Vq(t,n,e[n]);return t},Gq=(t,e)=>AKe(t,mKe(e)),gKe=Rn((t,e,{size:n})=>{const i=t.fn.variant({variant:"filled"}),r=t.fn.variant({variant:"light"});return{pickerControl:Gq(ZS({fontSize:Xt({size:n,sizes:t.fontSizes}),height:Xt({size:n,sizes:kk}),width:`calc((${Xt({size:n,sizes:kk})} * 7) / 3 + ${At(1.5)})`,display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",borderRadius:t.fn.radius()},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),{"&:active":t.activeStyles,"&[data-in-range]":ZS({backgroundColor:r.background,borderRadius:0},t.fn.hover({backgroundColor:r.hover})),"&[data-first-in-range]":{borderRadius:0,borderTopLeftRadius:t.radius.sm,borderBottomLeftRadius:t.radius.sm},"&[data-last-in-range]":{borderRadius:0,borderTopRightRadius:t.radius.sm,borderBottomRightRadius:t.radius.sm},"&[data-last-in-range][data-first-in-range]":{borderRadius:t.radius.sm},"&[data-selected]":ZS({color:i.color,backgroundColor:i.background},t.fn.hover({backgroundColor:i.hover})),"&[data-disabled]":Gq(ZS({color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4],cursor:"not-allowed"},t.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}}),vKe=Object.defineProperty,fx=Object.getOwnPropertySymbols,Yse=Object.prototype.hasOwnProperty,Xse=Object.prototype.propertyIsEnumerable,qq=(t,e,n)=>e in t?vKe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yKe=(t,e)=>{for(var n in e||(e={}))Yse.call(e,n)&&qq(t,n,e[n]);if(fx)for(var n of fx(e))Xse.call(e,n)&&qq(t,n,e[n]);return t},kKe=(t,e)=>{var n={};for(var i in t)Yse.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&fx)for(var i of fx(t))e.indexOf(i)<0&&Xse.call(t,i)&&(n[i]=t[i]);return n};const bKe={size:"sm"},l6=N.forwardRef((t,e)=>{const n=pn("PickerControl",bKe,t),{className:i,children:r,disabled:a,selected:o,classNames:s,styles:l,unstyled:c,firstInRange:d,lastInRange:f,inRange:h,__staticSelector:m,size:p,variant:g}=n,b=kKe(n,["className","children","disabled","selected","classNames","styles","unstyled","firstInRange","lastInRange","inRange","__staticSelector","size","variant"]),{classes:k,cx:S}=gKe(null,{name:["PickerControl",m],classNames:s,styles:l,unstyled:c,variant:g,size:p});return se.createElement(ev,yKe({className:S(k.pickerControl,i),ref:e,unstyled:c,"data-picker-control":!0,"data-selected":o&&!a||void 0,"data-disabled":a||void 0,"data-in-range":h&&!a&&!o||void 0,"data-first-in-range":d&&!a||void 0,"data-last-in-range":f&&!a||void 0,disabled:a},b),r)});l6.displayName="@mantine/dates/PickerControl";var SKe=Object.defineProperty,wKe=Object.defineProperties,NKe=Object.getOwnPropertyDescriptors,Ax=Object.getOwnPropertySymbols,Zse=Object.prototype.hasOwnProperty,Jse=Object.prototype.propertyIsEnumerable,Kq=(t,e,n)=>e in t?SKe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Wq=(t,e)=>{for(var n in e||(e={}))Zse.call(e,n)&&Kq(t,n,e[n]);if(Ax)for(var n of Ax(e))Jse.call(e,n)&&Kq(t,n,e[n]);return t},CKe=(t,e)=>wKe(t,NKe(e)),xKe=(t,e)=>{var n={};for(var i in t)Zse.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Ax)for(var i of Ax(t))e.indexOf(i)<0&&Jse.call(t,i)&&(n[i]=t[i]);return n};const FKe={monthsListFormat:"MMM",size:"sm",withCellSpacing:!0},ele=N.forwardRef((t,e)=>{const n=pn("MonthsList",FKe,t),{year:i,className:r,monthsListFormat:a,locale:o,minDate:s,maxDate:l,getMonthControlProps:c,classNames:d,styles:f,unstyled:h,__staticSelector:m,__getControlRef:p,__onControlKeyDown:g,__onControlClick:b,__onControlMouseEnter:k,__preventFocus:S,size:C,variant:x,__stopPropagation:F,withCellSpacing:T}=n,E=xKe(n,["year","className","monthsListFormat","locale","minDate","maxDate","getMonthControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","size","variant","__stopPropagation","withCellSpacing"]),{classes:I,cx:R}=dKe(null,{name:["MonthsList",m],classNames:d,styles:f,unstyled:h,variant:x,size:C}),V=Hf(),U=cKe(i),P=uKe(U,s,l,c),Z=U.map((q,ae)=>{const H=q.map((te,Y)=>{const ue=c?.(te),we=dn(te).isSame(P,"month");return se.createElement("td",{key:Y,className:I.monthsListCell,"data-with-spacing":T||void 0},se.createElement(l6,CKe(Wq({variant:x,size:C,classNames:d,styles:f,unstyled:h,__staticSelector:m||"MonthsList","data-mantine-stop-propagation":F||void 0,disabled:Wse(te,s,l),ref:ie=>p?.(ae,Y,ie)},ue),{onKeyDown:ie=>{var L;(L=ue?.onKeyDown)==null||L.call(ue,ie),g?.(ie,{rowIndex:ae,cellIndex:Y,date:te})},onClick:ie=>{var L;(L=ue?.onClick)==null||L.call(ue,ie),b?.(ie,te)},onMouseEnter:ie=>{var L;(L=ue?.onMouseEnter)==null||L.call(ue,ie),k?.(ie,te)},onMouseDown:ie=>{var L;(L=ue?.onMouseDown)==null||L.call(ue,ie),S&&ie.preventDefault()},tabIndex:S||!we?-1:0}),dn(te).locale(V.getLocale(o)).format(a)))});return se.createElement("tr",{key:ae,className:I.monthsListRow},H)});return se.createElement(mi,Wq({component:"table",ref:e,className:R(I.monthsList,r)},E),se.createElement("tbody",null,Z))});ele.displayName="@mantine/dates/MonthsList";var _Ke=Object.defineProperty,mx=Object.getOwnPropertySymbols,tle=Object.prototype.hasOwnProperty,nle=Object.prototype.propertyIsEnumerable,Yq=(t,e,n)=>e in t?_Ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,HD=(t,e)=>{for(var n in e||(e={}))tle.call(e,n)&&Yq(t,n,e[n]);if(mx)for(var n of mx(e))nle.call(e,n)&&Yq(t,n,e[n]);return t},EKe=(t,e)=>{var n={};for(var i in t)tle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&mx)for(var i of mx(t))e.indexOf(i)<0&&nle.call(t,i)&&(n[i]=t[i]);return n};const BKe={yearLabelFormat:"YYYY",size:"sm"},ile=N.forwardRef((t,e)=>{const n=pn("YearLevel",BKe,t),{year:i,locale:r,minDate:a,maxDate:o,monthsListFormat:s,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:d,__onControlClick:f,__onControlMouseEnter:h,withCellSpacing:m,__preventFocus:p,nextIcon:g,previousIcon:b,nextLabel:k,previousLabel:S,onNext:C,onPrevious:x,onLevelClick:F,nextDisabled:T,previousDisabled:E,hasNextLevel:I,levelControlAriaLabel:R,withNext:V,withPrevious:U,className:P,yearLabelFormat:Z,classNames:q,styles:ae,unstyled:H,__staticSelector:te,__stopPropagation:Y,size:ue,variant:we}=n,ie=EKe(n,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","yearLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","size","variant"]),{classes:L,cx:j}=lKe(null,{name:["YearLevel",te],classNames:q,styles:ae,unstyled:H,size:ue,variant:we}),$=Hf(),W={__staticSelector:te||"YearLevel",classNames:q,styles:ae,unstyled:H,size:ue,variant:we},J=typeof T=="boolean"?T:o?!dn(i).endOf("year").isBefore(o):!1,K=typeof E=="boolean"?E:a?!dn(i).startOf("year").isAfter(a):!1;return se.createElement(mi,HD({className:j(L.yearLevel,P),"data-year-level":!0,ref:e},ie),se.createElement(NF,HD({label:typeof Z=="function"?Z(i):dn(i).locale(r||$.locale).format(Z),className:L.calendarHeader,__preventFocus:p,__stopPropagation:Y,nextIcon:g,previousIcon:b,nextLabel:k,previousLabel:S,onNext:C,onPrevious:x,onLevelClick:F,nextDisabled:J,previousDisabled:K,hasNextLevel:I,levelControlAriaLabel:R,withNext:V,withPrevious:U},W)),se.createElement(ele,HD({year:i,locale:r,minDate:a,maxDate:o,monthsListFormat:s,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:d,__onControlClick:f,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:Y,withCellSpacing:m},W)))});ile.displayName="@mantine/dates/YearLevel";var TKe=Object.defineProperty,hx=Object.getOwnPropertySymbols,rle=Object.prototype.hasOwnProperty,ale=Object.prototype.propertyIsEnumerable,Xq=(t,e,n)=>e in t?TKe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,DKe=(t,e)=>{for(var n in e||(e={}))rle.call(e,n)&&Xq(t,n,e[n]);if(hx)for(var n of hx(e))ale.call(e,n)&&Xq(t,n,e[n]);return t},IKe=(t,e)=>{var n={};for(var i in t)rle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&hx)for(var i of hx(t))e.indexOf(i)<0&&ale.call(t,i)&&(n[i]=t[i]);return n};const OKe={numberOfColumns:1,size:"sm"},ole=N.forwardRef((t,e)=>{const n=pn("YearLevelGroup",OKe,t),{year:i,locale:r,minDate:a,maxDate:o,monthsListFormat:s,getMonthControlProps:l,__onControlClick:c,__onControlMouseEnter:d,withCellSpacing:f,__preventFocus:h,nextIcon:m,previousIcon:p,nextLabel:g,previousLabel:b,onNext:k,onPrevious:S,onLevelClick:C,nextDisabled:x,previousDisabled:F,hasNextLevel:T,className:E,classNames:I,styles:R,unstyled:V,__staticSelector:U,__stopPropagation:P,numberOfColumns:Z,levelControlAriaLabel:q,yearLabelFormat:ae,variant:H,size:te}=n,Y=IKe(n,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","yearLabelFormat","variant","size"]),{classes:ue,cx:we}=sKe(null,{name:["YearLevelGroup",U],styles:R,classNames:I,unstyled:V,variant:H,size:te}),ie=N.useRef([]),L=Array(Z).fill(0).map((j,$)=>{const W=dn(i).add($,"years").toDate();return se.createElement(ile,{key:$,variant:H,size:te,monthsListFormat:s,year:W,withNext:$===Z-1,withPrevious:$===0,yearLabelFormat:ae,__stopPropagation:P,__onControlClick:c,__onControlMouseEnter:d,__onControlKeyDown:(J,K)=>s6({levelIndex:$,rowIndex:K.rowIndex,cellIndex:K.cellIndex,event:J,controlsRef:ie}),__getControlRef:(J,K,fe)=>{Array.isArray(ie.current[$])||(ie.current[$]=[]),Array.isArray(ie.current[$][J])||(ie.current[$][J]=[]),ie.current[$][J][K]=fe},levelControlAriaLabel:typeof q=="function"?q(W):q,locale:r,minDate:a,maxDate:o,__preventFocus:h,nextIcon:m,previousIcon:p,nextLabel:g,previousLabel:b,onNext:k,onPrevious:S,onLevelClick:C,nextDisabled:x,previousDisabled:F,hasNextLevel:T,getMonthControlProps:l,classNames:I,styles:R,unstyled:V,__staticSelector:U||"YearLevelGroup",withCellSpacing:f})});return se.createElement(mi,DKe({className:we(ue.yearLevelGroup,E),ref:e},Y),L)});ole.displayName="@mantine/dates/YearLevelGroup";var RKe=Rn(t=>({decadeLevelGroup:{display:"flex",gap:t.spacing.md}}));function sle(t){const e=t.getFullYear(),n=e-e%10;let i=0;const r=[[],[],[],[]];for(let a=0;a<4;a+=1){const o=a===3?1:3;for(let s=0;s<o;s+=1)r[a].push(new Date(n+i,0)),i+=1}return r}function PKe(t){const e=sle(t);return[e[0][0],e[3][0]]}var LKe=Rn(t=>({decadeLevel:{},calendarHeader:{marginBottom:t.spacing.xs}}));function lle(t,e,n){return!e&&!n?!1:!!(e&&dn(t).isBefore(e,"year")||n&&dn(t).isAfter(n,"year"))}var UKe=Rn(()=>({yearsList:{borderCollapse:"collapse",borderWidth:0},yearsListCell:{padding:0,"&[data-with-spacing]":{padding:At(.5)}},yearsListRow:{}}));function MKe(t,e,n,i){const r=t.flat().filter(s=>{var l;return!lle(s,e,n)&&!((l=i?.(s))!=null&&l.disabled)}),a=r.find(s=>{var l;return(l=i?.(s))==null?void 0:l.selected});if(a)return a;const o=r.find(s=>dn().isSame(s,"year"));return o||r[0]}var $Ke=Object.defineProperty,jKe=Object.defineProperties,QKe=Object.getOwnPropertyDescriptors,px=Object.getOwnPropertySymbols,cle=Object.prototype.hasOwnProperty,dle=Object.prototype.propertyIsEnumerable,Zq=(t,e,n)=>e in t?$Ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jq=(t,e)=>{for(var n in e||(e={}))cle.call(e,n)&&Zq(t,n,e[n]);if(px)for(var n of px(e))dle.call(e,n)&&Zq(t,n,e[n]);return t},HKe=(t,e)=>jKe(t,QKe(e)),zKe=(t,e)=>{var n={};for(var i in t)cle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&px)for(var i of px(t))e.indexOf(i)<0&&dle.call(t,i)&&(n[i]=t[i]);return n};const VKe={yearsListFormat:"YYYY",size:"sm",withCellSpacing:!0},ule=N.forwardRef((t,e)=>{const n=pn("YearsList",VKe,t),{decade:i,className:r,yearsListFormat:a,locale:o,minDate:s,maxDate:l,getYearControlProps:c,classNames:d,styles:f,unstyled:h,__staticSelector:m,__getControlRef:p,__onControlKeyDown:g,__onControlClick:b,__onControlMouseEnter:k,__preventFocus:S,__stopPropagation:C,size:x,variant:F,withCellSpacing:T}=n,E=zKe(n,["decade","className","yearsListFormat","locale","minDate","maxDate","getYearControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","__stopPropagation","size","variant","withCellSpacing"]),{classes:I,cx:R}=UKe(null,{name:["YearsList",m],classNames:d,styles:f,unstyled:h,variant:F,size:x}),V=Hf(),U=sle(i),P=MKe(U,s,l,c),Z=U.map((q,ae)=>{const H=q.map((te,Y)=>{const ue=c?.(te),we=dn(te).isSame(P,"year");return se.createElement("td",{key:Y,className:I.yearsListCell,"data-with-spacing":T||void 0},se.createElement(l6,HKe(Jq({size:x,variant:F,classNames:d,styles:f,unstyled:h,__staticSelector:m||"YearsList","data-mantine-stop-propagation":C||void 0,disabled:lle(te,s,l),ref:ie=>p?.(ae,Y,ie)},ue),{onKeyDown:ie=>{var L;(L=ue?.onKeyDown)==null||L.call(ue,ie),g?.(ie,{rowIndex:ae,cellIndex:Y,date:te})},onClick:ie=>{var L;(L=ue?.onClick)==null||L.call(ue,ie),b?.(ie,te)},onMouseEnter:ie=>{var L;(L=ue?.onMouseEnter)==null||L.call(ue,ie),k?.(ie,te)},onMouseDown:ie=>{var L;(L=ue?.onMouseDown)==null||L.call(ue,ie),S&&ie.preventDefault()},tabIndex:S||!we?-1:0}),dn(te).locale(V.getLocale(o)).format(a)))});return se.createElement("tr",{key:ae,className:I.yearsListRow},H)});return se.createElement(mi,Jq({component:"table",ref:e,className:R(I.yearsList,r)},E),se.createElement("tbody",null,Z))});ule.displayName="@mantine/dates/YearsList";var GKe=Object.defineProperty,gx=Object.getOwnPropertySymbols,fle=Object.prototype.hasOwnProperty,Ale=Object.prototype.propertyIsEnumerable,eK=(t,e,n)=>e in t?GKe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zD=(t,e)=>{for(var n in e||(e={}))fle.call(e,n)&&eK(t,n,e[n]);if(gx)for(var n of gx(e))Ale.call(e,n)&&eK(t,n,e[n]);return t},qKe=(t,e)=>{var n={};for(var i in t)fle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&gx)for(var i of gx(t))e.indexOf(i)<0&&Ale.call(t,i)&&(n[i]=t[i]);return n};const KKe={decadeLabelFormat:"YYYY"},mle=N.forwardRef((t,e)=>{const n=pn("DecadeLevel",KKe,t),{decade:i,locale:r,minDate:a,maxDate:o,yearsListFormat:s,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:d,__onControlClick:f,__onControlMouseEnter:h,withCellSpacing:m,__preventFocus:p,nextIcon:g,previousIcon:b,nextLabel:k,previousLabel:S,onNext:C,onPrevious:x,nextDisabled:F,previousDisabled:T,levelControlAriaLabel:E,withNext:I,withPrevious:R,className:V,decadeLabelFormat:U,classNames:P,styles:Z,unstyled:q,__staticSelector:ae,__stopPropagation:H,variant:te,size:Y}=n,ue=qKe(n,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","levelControlAriaLabel","withNext","withPrevious","className","decadeLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","variant","size"]),{classes:we,cx:ie}=LKe(null,{name:["DecadeLevel",ae],classNames:P,styles:Z,unstyled:q,variant:te,size:Y}),L=Hf(),[j,$]=PKe(i),W={__staticSelector:ae||"DecadeLevel",classNames:P,styles:Z,unstyled:q,variant:te,size:Y},J=typeof F=="boolean"?F:o?!dn($).endOf("year").isBefore(o):!1,K=typeof T=="boolean"?T:a?!dn(j).startOf("year").isAfter(a):!1,fe=(ge,Se)=>dn(ge).locale(r||L.locale).format(Se);return se.createElement(mi,zD({className:ie(we.decadeLevel,V),"data-decade-level":!0,ref:e},ue),se.createElement(NF,zD({label:typeof U=="function"?U(j,$):`${fe(j,U)} – ${fe($,U)}`,className:we.calendarHeader,__preventFocus:p,__stopPropagation:H,nextIcon:g,previousIcon:b,nextLabel:k,previousLabel:S,onNext:C,onPrevious:x,nextDisabled:J,previousDisabled:K,hasNextLevel:!1,levelControlAriaLabel:E,withNext:I,withPrevious:R},W)),se.createElement(ule,zD({decade:i,locale:r,minDate:a,maxDate:o,yearsListFormat:s,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:d,__onControlClick:f,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:H,withCellSpacing:m},W)))});mle.displayName="@mantine/dates/DecadeLevel";var WKe=Object.defineProperty,vx=Object.getOwnPropertySymbols,hle=Object.prototype.hasOwnProperty,ple=Object.prototype.propertyIsEnumerable,tK=(t,e,n)=>e in t?WKe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,YKe=(t,e)=>{for(var n in e||(e={}))hle.call(e,n)&&tK(t,n,e[n]);if(vx)for(var n of vx(e))ple.call(e,n)&&tK(t,n,e[n]);return t},XKe=(t,e)=>{var n={};for(var i in t)hle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&vx)for(var i of vx(t))e.indexOf(i)<0&&ple.call(t,i)&&(n[i]=t[i]);return n};const ZKe={numberOfColumns:1},gle=N.forwardRef((t,e)=>{const n=pn("DecadeLevelGroup",ZKe,t),{decade:i,locale:r,minDate:a,maxDate:o,yearsListFormat:s,getYearControlProps:l,__onControlClick:c,__onControlMouseEnter:d,withCellSpacing:f,__preventFocus:h,nextIcon:m,previousIcon:p,nextLabel:g,previousLabel:b,onNext:k,onPrevious:S,nextDisabled:C,previousDisabled:x,className:F,classNames:T,styles:E,unstyled:I,__staticSelector:R,__stopPropagation:V,numberOfColumns:U,levelControlAriaLabel:P,decadeLabelFormat:Z,variant:q,size:ae}=n,H=XKe(n,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","decadeLabelFormat","variant","size"]),{classes:te,cx:Y}=RKe(null,{name:["DecadeLevelGroup",R],styles:E,classNames:T,unstyled:I,variant:q,size:ae}),ue=N.useRef([]),we=Array(U).fill(0).map((ie,L)=>{const j=dn(i).add(L*10,"years").toDate();return se.createElement(mle,{key:L,variant:q,size:ae,yearsListFormat:s,decade:j,withNext:L===U-1,withPrevious:L===0,decadeLabelFormat:Z,__onControlClick:c,__onControlMouseEnter:d,__onControlKeyDown:($,W)=>s6({levelIndex:L,rowIndex:W.rowIndex,cellIndex:W.cellIndex,event:$,controlsRef:ue}),__getControlRef:($,W,J)=>{Array.isArray(ue.current[L])||(ue.current[L]=[]),Array.isArray(ue.current[L][$])||(ue.current[L][$]=[]),ue.current[L][$][W]=J},levelControlAriaLabel:typeof P=="function"?P(j):P,locale:r,minDate:a,maxDate:o,__preventFocus:h,__stopPropagation:V,nextIcon:m,previousIcon:p,nextLabel:g,previousLabel:b,onNext:k,onPrevious:S,nextDisabled:C,previousDisabled:x,getYearControlProps:l,__staticSelector:R||"DecadeLevelGroup",classNames:T,styles:E,unstyled:I,withCellSpacing:f})});return se.createElement(mi,YKe({className:Y(te.decadeLevelGroup,F),ref:e},H),we)});gle.displayName="@mantine/dates/DecadeLevelGroup";var JKe=Object.defineProperty,yx=Object.getOwnPropertySymbols,vle=Object.prototype.hasOwnProperty,yle=Object.prototype.propertyIsEnumerable,nK=(t,e,n)=>e in t?JKe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,JS=(t,e)=>{for(var n in e||(e={}))vle.call(e,n)&&nK(t,n,e[n]);if(yx)for(var n of yx(e))yle.call(e,n)&&nK(t,n,e[n]);return t},eWe=(t,e)=>{var n={};for(var i in t)vle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&yx)for(var i of yx(t))e.indexOf(i)<0&&yle.call(t,i)&&(n[i]=t[i]);return n};const tWe={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},c6=N.forwardRef((t,e)=>{const n=pn("Calendar",tWe,t),{maxLevel:i,minLevel:r,defaultLevel:a,level:o,onLevelChange:s,date:l,defaultDate:c,onDateChange:d,numberOfColumns:f,columnsToScroll:h,ariaLabels:m,onYearSelect:p,onMonthSelect:g,onYearMouseEnter:b,onMonthMouseEnter:k,__updateDateOnYearSelect:S,__updateDateOnMonthSelect:C,firstDayOfWeek:x,weekdayFormat:F,weekendDays:T,getDayProps:E,excludeDate:I,renderDay:R,hideOutsideDates:V,hideWeekdays:U,getDayAriaLabel:P,monthLabelFormat:Z,nextIcon:q,previousIcon:ae,__onDayClick:H,__onDayMouseEnter:te,withCellSpacing:Y,monthsListFormat:ue,getMonthControlProps:we,yearLabelFormat:ie,yearsListFormat:L,getYearControlProps:j,decadeLabelFormat:$,minDate:W,maxDate:J,locale:K,className:fe,classNames:ge,styles:Se,__staticSelector:oe,unstyled:le,variant:Ee,size:Le,__preventFocus:ve,__stopPropagation:Ae,onNextDecade:Q,onPreviousDecade:X,onNextYear:ne,onPreviousYear:ce,onNextMonth:ke,onPreviousMonth:Ne,static:$e}=n,Ge=eWe(n,["maxLevel","minLevel","defaultLevel","level","onLevelChange","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","nextIcon","previousIcon","__onDayClick","__onDayMouseEnter","withCellSpacing","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","minDate","maxDate","locale","className","classNames","styles","__staticSelector","unstyled","variant","size","__preventFocus","__stopPropagation","onNextDecade","onPreviousDecade","onNextYear","onPreviousYear","onNextMonth","onPreviousMonth","static"]),{classes:He,cx:We}=fqe(null,{name:["Calendar",oe],classNames:ge,styles:Se,unstyled:le,variant:Ee,size:Le}),[ct,ut]=_h({value:o?uy(o,r,i):void 0,defaultValue:a?uy(a,r,i):void 0,finalValue:uy(void 0,r,i),onChange:s}),[yt,me]=_h({value:l,defaultValue:c,finalValue:null,onChange:d}),z={__staticSelector:oe||"Calendar",styles:Se,classNames:ge,unstyled:le,variant:Ee,size:Le},ee=h||f||1,xe=yt||new Date,Be=()=>{const ot=dn(xe).add(ee,"month").toDate();ke?.(ot),me(ot)},Ue=()=>{const ot=dn(xe).subtract(ee,"month").toDate();Ne?.(ot),me(ot)},_e=()=>{const ot=dn(xe).add(ee,"year").toDate();ne?.(ot),me(ot)},Pe=()=>{const ot=dn(xe).subtract(ee,"year").toDate();ce?.(ot),me(ot)},xt=()=>{const ot=dn(xe).add(10*ee,"year").toDate();Q?.(ot),me(ot)},Je=()=>{const ot=dn(xe).subtract(10*ee,"year").toDate();X?.(ot),me(ot)};return se.createElement(mi,JS({className:We(He.calendar,fe),ref:e},Ge),ct==="month"&&se.createElement(Kse,JS({month:xe,minDate:W,maxDate:J,firstDayOfWeek:x,weekdayFormat:F,weekendDays:T,getDayProps:E,excludeDate:I,renderDay:R,hideOutsideDates:V,hideWeekdays:U,getDayAriaLabel:P,onNext:Be,onPrevious:Ue,hasNextLevel:i!=="month",onLevelClick:()=>ut("year"),numberOfColumns:f,locale:K,levelControlAriaLabel:m?.monthLevelControl,nextLabel:m?.nextMonth,nextIcon:q,previousLabel:m?.previousMonth,previousIcon:ae,monthLabelFormat:Z,__onDayClick:H,__onDayMouseEnter:te,__preventFocus:ve,__stopPropagation:Ae,static:$e,withCellSpacing:Y},z)),ct==="year"&&se.createElement(ole,JS({year:xe,numberOfColumns:f,minDate:W,maxDate:J,monthsListFormat:ue,getMonthControlProps:we,locale:K,onNext:_e,onPrevious:Pe,hasNextLevel:i!=="month"&&i!=="year",onLevelClick:()=>ut("decade"),levelControlAriaLabel:m?.yearLevelControl,nextLabel:m?.nextYear,nextIcon:q,previousLabel:m?.previousYear,previousIcon:ae,yearLabelFormat:ie,__onControlMouseEnter:k,__onControlClick:(ot,dt)=>{C&&me(dt),ut(uy("month",r,i)),g?.(dt)},__preventFocus:ve,__stopPropagation:Ae,withCellSpacing:Y},z)),ct==="decade"&&se.createElement(gle,JS({decade:xe,minDate:W,maxDate:J,yearsListFormat:L,getYearControlProps:j,locale:K,onNext:xt,onPrevious:Je,numberOfColumns:f,nextLabel:m?.nextDecade,nextIcon:q,previousLabel:m?.previousDecade,previousIcon:ae,decadeLabelFormat:$,__onControlMouseEnter:b,__onControlClick:(ot,dt)=>{S&&me(dt),ut(uy("year",r,i)),p?.(dt)},__preventFocus:ve,__stopPropagation:Ae,withCellSpacing:Y},z)))});c6.displayName="@mantine/dates/Calendar";var iK=Object.getOwnPropertySymbols,nWe=Object.prototype.hasOwnProperty,iWe=Object.prototype.propertyIsEnumerable,rWe=(t,e)=>{var n={};for(var i in t)nWe.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&iK)for(var i of iK(t))e.indexOf(i)<0&&iWe.call(t,i)&&(n[i]=t[i]);return n};function d6(t){const e=t,{maxLevel:n,minLevel:i,defaultLevel:r,level:a,onLevelChange:o,nextIcon:s,previousIcon:l,date:c,defaultDate:d,onDateChange:f,numberOfColumns:h,columnsToScroll:m,ariaLabels:p,onYearSelect:g,onMonthSelect:b,onYearMouseEnter:k,onMonthMouseEnter:S,onNextMonth:C,onPreviousMonth:x,onNextYear:F,onPreviousYear:T,onNextDecade:E,onPreviousDecade:I,withCellSpacing:R,__updateDateOnYearSelect:V,__updateDateOnMonthSelect:U,firstDayOfWeek:P,weekdayFormat:Z,weekendDays:q,getDayProps:ae,excludeDate:H,renderDay:te,hideOutsideDates:Y,hideWeekdays:ue,getDayAriaLabel:we,monthLabelFormat:ie,monthsListFormat:L,getMonthControlProps:j,yearLabelFormat:$,yearsListFormat:W,getYearControlProps:J,decadeLabelFormat:K,allowSingleDateInRange:fe,allowDeselect:ge,minDate:Se,maxDate:oe,locale:le}=e,Ee=rWe(e,["maxLevel","minLevel","defaultLevel","level","onLevelChange","nextIcon","previousIcon","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","onNextMonth","onPreviousMonth","onNextYear","onPreviousYear","onNextDecade","onPreviousDecade","withCellSpacing","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","allowSingleDateInRange","allowDeselect","minDate","maxDate","locale"]);return{calendarProps:{maxLevel:n,minLevel:i,defaultLevel:r,level:a,onLevelChange:o,nextIcon:s,previousIcon:l,date:c,defaultDate:d,onDateChange:f,numberOfColumns:h,columnsToScroll:m,ariaLabels:p,onYearSelect:g,onMonthSelect:b,onYearMouseEnter:k,onMonthMouseEnter:S,onNextMonth:C,onPreviousMonth:x,onNextYear:F,onPreviousYear:T,onNextDecade:E,onPreviousDecade:I,withCellSpacing:R,__updateDateOnYearSelect:V,__updateDateOnMonthSelect:U,firstDayOfWeek:P,weekdayFormat:Z,weekendDays:q,getDayProps:ae,excludeDate:H,renderDay:te,hideOutsideDates:Y,hideWeekdays:ue,getDayAriaLabel:we,monthLabelFormat:ie,monthsListFormat:L,getMonthControlProps:j,yearLabelFormat:$,yearsListFormat:W,getYearControlProps:J,decadeLabelFormat:K,allowSingleDateInRange:fe,allowDeselect:ge,minDate:Se,maxDate:oe,locale:le},others:Ee}}function aWe(t,e){if(e==="range"&&Array.isArray(t)){const[n,i]=t;return n?i?`${n.toISOString()} – ${i.toISOString()}`:`${n.toISOString()} –`:""}return e==="multiple"&&Array.isArray(t)?t.map(n=>n.toISOString()).join(", "):!Array.isArray(t)&&t?t.toISOString():""}function kle({value:t,type:e,name:n,form:i}){return se.createElement("input",{type:"hidden",value:aWe(t,e),name:n,form:i})}kle.displayName="@mantine/dates/HiddenDatesInput";function rK(t,e){if(!t||!e)return e;const n=t.getHours(),i=t.getMinutes(),r=t.getSeconds(),a=t.getMilliseconds(),o=new Date(e);return o.setHours(n),o.setMinutes(i),o.setSeconds(r),o.setMilliseconds(a),o}const aK=t=>t==="range"?[null,null]:t==="multiple"?[]:null;function ble({type:t,value:e,defaultValue:n,onChange:i}){const r=N.useRef(t),[a,o]=_h({value:e,defaultValue:n,onChange:i,finalValue:aK(t)});let s=a;return r.current!==t&&(r.current=t,e===void 0&&(s=n!==void 0?n:aK(t),o(s))),[s,o]}function oK(t,e){const n=[...e].sort((i,r)=>i.getTime()-r.getTime());return dn(n[0]).startOf("day").subtract(1,"ms").isBefore(t)&&dn(n[1]).endOf("day").add(1,"ms").isAfter(t)}function Sle({type:t,level:e,value:n,defaultValue:i,onChange:r,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:s}){const[l,c]=ble({type:t,value:n,defaultValue:i,onChange:r}),[d,f]=N.useState(t==="range"&&l[0]&&!l[1]?l[0]:null),[h,m]=N.useState(null),p=F=>{if(t==="range"){if(d instanceof Date&&!l[1]){if(dn(F).isSame(d,e)&&!a){f(null),m(null),c([null,null]);return}const T=[F,d];T.sort((E,I)=>E.getTime()-I.getTime()),c(T),m(null),f(null);return}if(l[0]&&!l[1]&&dn(F).isSame(l[0],e)&&!a){f(null),m(null),c([null,null]);return}c([F,null]),m(null),f(F);return}if(t==="multiple"){l.some(T=>dn(T).isSame(F,e))?c(l.filter(T=>!dn(T).isSame(F,e))):c([...l,F]);return}l&&o&&dn(F).isSame(l,e)?c(null):c(F)},g=F=>d instanceof Date&&h instanceof Date?oK(F,[h,d]):l[0]instanceof Date&&l[1]instanceof Date?oK(F,l):!1,b=t==="range"?F=>{s?.(F),m(null)}:s,k=F=>l[0]instanceof Date&&dn(F).isSame(l[0],e)?!(h&&dn(h).isBefore(l[0])):!1,S=F=>l[1]instanceof Date?dn(F).isSame(l[1],e):!(l[0]instanceof Date)||!h?!1:dn(h).isBefore(l[0])&&dn(F).isSame(l[0],e);return{onDateChange:p,onRootMouseLeave:b,onHoveredDateChange:t==="range"&&d?m:()=>{},getControlProps:F=>{if(t==="range")return{selected:l.some(E=>E&&dn(E).isSame(F,e)),inRange:g(F),firstInRange:k(F),lastInRange:S(F),"data-autofocus":!!l[0]&&dn(l[0]).isSame(F,e)||void 0};if(t==="multiple")return{selected:l.some(E=>E&&dn(E).isSame(F,e)),"data-autofocus":!!l[0]&&dn(l[0]).isSame(F,e)||void 0};const T=dn(l).isSame(F,e);return{selected:T,"data-autofocus":T||void 0}},_value:l,setValue:c}}var oWe=Object.defineProperty,kx=Object.getOwnPropertySymbols,wle=Object.prototype.hasOwnProperty,Nle=Object.prototype.propertyIsEnumerable,sK=(t,e,n)=>e in t?oWe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,VD=(t,e)=>{for(var n in e||(e={}))wle.call(e,n)&&sK(t,n,e[n]);if(kx)for(var n of kx(e))Nle.call(e,n)&&sK(t,n,e[n]);return t},sWe=(t,e)=>{var n={};for(var i in t)wle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&kx)for(var i of kx(t))e.indexOf(i)<0&&Nle.call(t,i)&&(n[i]=t[i]);return n};const lWe={type:"default",numberOfColumns:1},u6=N.forwardRef((t,e)=>{const n=pn("DatePicker",lWe,t),{type:i,defaultValue:r,value:a,onChange:o,__staticSelector:s,getDayProps:l,allowSingleDateInRange:c,allowDeselect:d,onMouseLeave:f,numberOfColumns:h}=n,m=sWe(n,["type","defaultValue","value","onChange","__staticSelector","getDayProps","allowSingleDateInRange","allowDeselect","onMouseLeave","numberOfColumns"]),{onDateChange:p,onRootMouseLeave:g,onHoveredDateChange:b,getControlProps:k}=Sle({type:i,level:"day",allowDeselect:d,allowSingleDateInRange:c,value:a,defaultValue:r,onChange:o,onMouseLeave:f});return se.createElement(c6,VD({ref:e,minLevel:"month",__staticSelector:s||"DatePicker",onMouseLeave:g,hideOutsideDates:h!==1,numberOfColumns:h,__onDayMouseEnter:(S,C)=>b(C),__onDayClick:(S,C)=>p(C),getDayProps:S=>VD(VD({},k(S)),l?.(S))},m))});u6.displayName="@mantine/dates/DatePicker";function cWe({type:t,date:e,locale:n,format:i,labelSeparator:r}){const a=o=>dn(o).locale(n).format(i);return t==="default"?e===null?"":a(e):t==="multiple"?e.map(a).join(", "):t==="range"?e[0]&&e[1]?`${a(e[0])} ${r} ${a(e[1])}`:e[0]?`${a(e[0])} ${r} `:"":""}function Cle({type:t,value:e,defaultValue:n,onChange:i,locale:r,format:a,closeOnChange:o,sortDates:s,labelSeparator:l}){const c=Hf(),[d,f]=kP(!1),[h,m]=ble({type:t,value:e,defaultValue:n,onChange:i}),p=cWe({type:t,date:h,locale:c.getLocale(r),format:a,labelSeparator:c.getLabelSeparator(l)}),g=S=>{o&&(t==="default"&&f.close(),t==="range"&&S[0]&&S[1]&&f.close()),m(s&&t==="multiple"?[...S].sort((C,x)=>C.getTime()-x.getTime()):S)},b=()=>g(t==="range"?[null,null]:t==="multiple"?[]:null),k=t==="range"?!!h[0]:t==="multiple"?h.length>0:h!==null;return{_value:h,setValue:g,onClear:b,shouldClear:k,formattedValue:p,dropdownOpened:d,dropdownHandlers:f}}function lO({minDate:t,maxDate:e}){const n=new Date;return!t&&!e?n:dn(n).isBefore(t)?t:dn(n).isAfter(e)?e:n}var dWe=Rn(()=>({placeholder:{},input:{cursor:"pointer",lineHeight:"unset","&[data-read-only]":{cursor:"default"}}})),uWe=Object.defineProperty,fWe=Object.defineProperties,AWe=Object.getOwnPropertyDescriptors,bx=Object.getOwnPropertySymbols,xle=Object.prototype.hasOwnProperty,Fle=Object.prototype.propertyIsEnumerable,lK=(t,e,n)=>e in t?uWe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ym=(t,e)=>{for(var n in e||(e={}))xle.call(e,n)&&lK(t,n,e[n]);if(bx)for(var n of bx(e))Fle.call(e,n)&&lK(t,n,e[n]);return t},cK=(t,e)=>fWe(t,AWe(e)),mWe=(t,e)=>{var n={};for(var i in t)xle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&bx)for(var i of bx(t))e.indexOf(i)<0&&Fle.call(t,i)&&(n[i]=t[i]);return n};const hWe={},CF=N.forwardRef((t,e)=>{const n=BP("PickerInputBase",hWe,t),{inputProps:i,wrapperProps:r,placeholder:a,classNames:o,styles:s,unstyled:l,popoverProps:c,modalProps:d,dropdownType:f,children:h,formattedValue:m,dropdownHandlers:p,dropdownOpened:g,onClick:b,clearable:k,onClear:S,clearButtonProps:C,rightSection:x,shouldClear:F,readOnly:T,disabled:E,value:I,name:R,form:V,type:U}=n,P=mWe(n,["inputProps","wrapperProps","placeholder","classNames","styles","unstyled","popoverProps","modalProps","dropdownType","children","formattedValue","dropdownHandlers","dropdownOpened","onClick","clearable","onClear","clearButtonProps","rightSection","shouldClear","readOnly","disabled","value","name","form","type"]),{classes:Z,cx:q}=dWe(null,{name:i.__staticSelector,classNames:o,styles:s,unstyled:l,variant:i.variant,size:i.size}),ae=x||(k&&F&&!T&&!E?se.createElement(SP,Ym({variant:"transparent",onClick:S,unstyled:l,size:i.size},C)):null),H=()=>{U==="range"&&I[0]&&!I[1]&&S(),p.close()},te=r.label;return se.createElement(se.Fragment,null,f==="modal"&&!T&&se.createElement(fc,Ym({opened:g,onClose:H,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:l},d),h),se.createElement(Ef.Wrapper,Ym({},r),se.createElement(_f,Ym({position:"bottom-start",opened:g,onClose:H,disabled:f==="modal"||T,trapFocus:!0,returnFocus:!0,unstyled:l},c),se.createElement(_f.Target,{shouldOverrideDefaultTargetId:!te},se.createElement(Ef,Ym(cK(Ym({"aria-label":m,"data-dates-input":!0,"data-read-only":T||void 0,disabled:E,component:"button",type:"button",multiline:!0,onClick:Y=>{b?.(Y),p.toggle()},rightSection:ae},i),{ref:e,classNames:cK(Ym({},o),{input:q(Z.input,o?.input)})}),P),m||se.createElement(Ef.Placeholder,{className:Z.placeholder,sx:{color:i.error?"inherit":void 0}},a))),se.createElement(_f.Dropdown,{"data-dates-dropdown":!0},h))),se.createElement(kle,{value:I,name:R,form:V,type:U}))});CF.displayName="@mantine/dates/PickerInputBase";var pWe=Object.defineProperty,gWe=Object.defineProperties,vWe=Object.getOwnPropertyDescriptors,Sx=Object.getOwnPropertySymbols,_le=Object.prototype.hasOwnProperty,Ele=Object.prototype.propertyIsEnumerable,dK=(t,e,n)=>e in t?pWe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uK=(t,e)=>{for(var n in e||(e={}))_le.call(e,n)&&dK(t,n,e[n]);if(Sx)for(var n of Sx(e))Ele.call(e,n)&&dK(t,n,e[n]);return t},yWe=(t,e)=>gWe(t,vWe(e)),kWe=(t,e)=>{var n={};for(var i in t)_le.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Sx)for(var i of Sx(t))e.indexOf(i)<0&&Ele.call(t,i)&&(n[i]=t[i]);return n};const bWe={type:"default",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},f6=N.forwardRef((t,e)=>{const n=pn("DatePickerInput",bWe,t),{type:i,value:r,defaultValue:a,onChange:o,valueFormat:s,labelSeparator:l,locale:c,classNames:d,styles:f,unstyled:h,closeOnChange:m,size:p,variant:g,dropdownType:b,sortDates:k,maxDate:S,minDate:C,defaultDate:x}=n,F=kWe(n,["type","value","defaultValue","onChange","valueFormat","labelSeparator","locale","classNames","styles","unstyled","closeOnChange","size","variant","dropdownType","sortDates","maxDate","minDate","defaultDate"]),{calendarProps:T,others:E}=d6(F),{_value:I,setValue:R,formattedValue:V,dropdownHandlers:U,dropdownOpened:P,onClear:Z,shouldClear:q}=Cle({type:i,value:r,defaultValue:a,onChange:o,locale:c,format:s,labelSeparator:l,closeOnChange:m,sortDates:k}),ae=x||lO({maxDate:S,minDate:C});return se.createElement(CF,uK({formattedValue:V,dropdownOpened:P,dropdownHandlers:U,classNames:d,styles:f,unstyled:h,__staticSelector:"DatePickerInput",ref:e,onClear:Z,shouldClear:q,value:I,type:i,size:p,variant:g,dropdownType:b},E),se.createElement(u6,yWe(uK({},T),{size:p,variant:g,type:i,value:I,defaultDate:Array.isArray(I)?I[0]||ae:I||ae,onChange:R,locale:c,classNames:d,styles:f,unstyled:h,__staticSelector:"DatePickerInput",__stopPropagation:b==="popover",maxDate:S,minDate:C})))});f6.displayName="@mantine/dates/DatePickerInput";var SWe=Rn(t=>({timeWrapper:{display:"flex",marginTop:t.spacing.md},timeInput:{flex:1,marginRight:t.spacing.md}})),wWe=Rn(t=>({input:{paddingTop:0,paddingBottom:0,appearance:"none","&::-webkit-calendar-picker-indicator":{display:"none"},"&::-webkit-clear-button":{display:"none"},"&::-webkit-datetime-edit-hour-field, &::-webkit-datetime-edit-minute-field, &::-webkit-datetime-edit-second-field":{paddingTop:0,maxHeight:At(30),display:"inline","&:focus":{backgroundColor:t.fn.variant({variant:"filled"}).background,color:t.white}}}})),NWe=Object.defineProperty,CWe=Object.defineProperties,xWe=Object.getOwnPropertyDescriptors,wx=Object.getOwnPropertySymbols,Ble=Object.prototype.hasOwnProperty,Tle=Object.prototype.propertyIsEnumerable,fK=(t,e,n)=>e in t?NWe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AK=(t,e)=>{for(var n in e||(e={}))Ble.call(e,n)&&fK(t,n,e[n]);if(wx)for(var n of wx(e))Tle.call(e,n)&&fK(t,n,e[n]);return t},FWe=(t,e)=>CWe(t,xWe(e)),_We=(t,e)=>{var n={};for(var i in t)Ble.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&wx)for(var i of wx(t))e.indexOf(i)<0&&Tle.call(t,i)&&(n[i]=t[i]);return n};const EWe={},Dle=N.forwardRef((t,e)=>{const n=pn("TimeInput",EWe,t),{classNames:i,withSeconds:r,variant:a,size:o,styles:s,unstyled:l}=n,c=_We(n,["classNames","withSeconds","variant","size","styles","unstyled"]),{classes:d,cx:f}=wWe(null,{name:"TimeInput",classNames:i,styles:s,unstyled:l,variant:a,size:o});return se.createElement(RP,AK({type:"time",step:r?1:60,classNames:FWe(AK({},i),{input:f(d.input,i?.input)}),styles:s,unstyled:l,variant:a,size:o,ref:e,__staticSelector:"TimeInput"},c))});Dle.displayName="@mantine/dates/TimeInput";var BWe=Object.defineProperty,TWe=Object.defineProperties,DWe=Object.getOwnPropertyDescriptors,Nx=Object.getOwnPropertySymbols,Ile=Object.prototype.hasOwnProperty,Ole=Object.prototype.propertyIsEnumerable,mK=(t,e,n)=>e in t?BWe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ew=(t,e)=>{for(var n in e||(e={}))Ile.call(e,n)&&mK(t,n,e[n]);if(Nx)for(var n of Nx(e))Ole.call(e,n)&&mK(t,n,e[n]);return t},GD=(t,e)=>TWe(t,DWe(e)),hK=(t,e)=>{var n={};for(var i in t)Ile.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Nx)for(var i of Nx(t))e.indexOf(i)<0&&Ole.call(t,i)&&(n[i]=t[i]);return n};const IWe={size:"sm",dropdownType:"popover"},Rle=N.forwardRef((t,e)=>{const n=pn("DateTimePicker",IWe,t),{value:i,defaultValue:r,onChange:a,valueFormat:o,locale:s,classNames:l,styles:c,unstyled:d,timeInputProps:f,submitButtonProps:h,withSeconds:m,level:p,defaultLevel:g,size:b,variant:k,dropdownType:S}=n,C=hK(n,["value","defaultValue","onChange","valueFormat","locale","classNames","styles","unstyled","timeInputProps","submitButtonProps","withSeconds","level","defaultLevel","size","variant","dropdownType"]),x=o||(m?"DD/MM/YYYY HH:mm:ss":"DD/MM/YYYY HH:mm"),{classes:F,cx:T}=SWe(null,{name:"DateTimePicker",classNames:l,styles:c,unstyled:d,variant:k,size:b}),E=N.useRef(),I=Yh(E,f?.ref),R=d6(C),{calendarProps:V}=R,U=V,P=hK(U,["allowSingleDateInRange"]),{others:Z}=R,q=Hf(),[ae,H]=_h({value:i,defaultValue:r,finalValue:null,onChange:a}),te=ge=>ge?dn(ge).format(m?"HH:mm:ss":"HH:mm"):"",[Y,ue]=N.useState(te(ae)),[we,ie]=N.useState(p||g||"month"),[L,j]=kP(!1),$=ae?dn(ae).locale(q.getLocale(s)).format(x):"",W=ge=>{var Se;(Se=f?.onChange)==null||Se.call(f,ge);const oe=ge.currentTarget.value;if(ue(oe),oe){const[le,Ee,Le]=oe.split(":").map(Number),ve=new Date;ve.setHours(le),ve.setMinutes(Ee),Le!==void 0&&ve.setSeconds(Le),H(rK(ve,ae||new Date))}},J=ge=>{var Se;H(rK(ae,ge)),(Se=E.current)==null||Se.focus()},K=ge=>{var Se;(Se=f?.onKeyDown)==null||Se.call(f,ge),ge.key==="Enter"&&(ge.preventDefault(),j.close())};hc(()=>{L||ue(te(ae))},[ae,L]),hc(()=>{L&&ie("month")},[L]);const fe=S==="popover";return se.createElement(CF,ew({formattedValue:$,dropdownOpened:L,dropdownHandlers:j,classNames:l,styles:c,unstyled:d,__staticSelector:"DateTimePicker",ref:e,onClear:()=>H(null),shouldClear:!!ae,value:ae,type:"default",size:b,variant:k,dropdownType:S},Z),se.createElement(u6,GD(ew({},P),{size:b,variant:k,type:"default",value:ae,defaultDate:ae,onChange:J,locale:s,classNames:l,styles:c,unstyled:d,__staticSelector:"DateTimePicker",__stopPropagation:fe,level:p,defaultLevel:g,onLevelChange:ge=>{var Se;ie(ge),(Se=P.onLevelChange)==null||Se.call(P,ge)}})),we==="month"&&se.createElement("div",{className:F.timeWrapper},se.createElement(Dle,GD(ew({value:Y,withSeconds:m,ref:I,unstyled:d},f),{className:T(F.timeInput,f?.className),onChange:W,onKeyDown:K,size:b,"data-mantine-stop-propagation":fe||void 0})),se.createElement(zte,GD(ew({variant:"default",size:tc[b],unstyled:d,"data-mantine-stop-propagation":fe||void 0,children:se.createElement(kie,{width:`calc(${tc[b]} / 3)`})},h),{onClick:ge=>{var Se;(Se=h?.onClick)==null||Se.call(h,ge),j.close()}}))))});Rle.displayName="@mantine/dates/DateTimePicker";var OWe=Object.defineProperty,Cx=Object.getOwnPropertySymbols,Ple=Object.prototype.hasOwnProperty,Lle=Object.prototype.propertyIsEnumerable,pK=(t,e,n)=>e in t?OWe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qD=(t,e)=>{for(var n in e||(e={}))Ple.call(e,n)&&pK(t,n,e[n]);if(Cx)for(var n of Cx(e))Lle.call(e,n)&&pK(t,n,e[n]);return t},RWe=(t,e)=>{var n={};for(var i in t)Ple.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Cx)for(var i of Cx(t))e.indexOf(i)<0&&Lle.call(t,i)&&(n[i]=t[i]);return n};const PWe={type:"default"},Ule=N.forwardRef((t,e)=>{const n=pn("MonthPicker",PWe,t),{type:i,defaultValue:r,value:a,onChange:o,__staticSelector:s,getMonthControlProps:l,allowSingleDateInRange:c,allowDeselect:d,onMouseLeave:f,onMonthSelect:h}=n,m=RWe(n,["type","defaultValue","value","onChange","__staticSelector","getMonthControlProps","allowSingleDateInRange","allowDeselect","onMouseLeave","onMonthSelect"]),{onDateChange:p,onRootMouseLeave:g,onHoveredDateChange:b,getControlProps:k}=Sle({type:i,level:"month",allowDeselect:d,allowSingleDateInRange:c,value:a,defaultValue:r,onChange:o,onMouseLeave:f});return se.createElement(c6,qD({ref:e,minLevel:"year",__updateDateOnMonthSelect:!1,__staticSelector:s||"MonthPicker",onMouseLeave:g,onMonthMouseEnter:(S,C)=>b(C),onMonthSelect:S=>{p(S),h?.(S)},getMonthControlProps:S=>qD(qD({},k(S)),l?.(S))},m))});Ule.displayName="@mantine/dates/MonthPicker";var LWe=Object.defineProperty,UWe=Object.defineProperties,MWe=Object.getOwnPropertyDescriptors,xx=Object.getOwnPropertySymbols,Mle=Object.prototype.hasOwnProperty,$le=Object.prototype.propertyIsEnumerable,gK=(t,e,n)=>e in t?LWe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vK=(t,e)=>{for(var n in e||(e={}))Mle.call(e,n)&&gK(t,n,e[n]);if(xx)for(var n of xx(e))$le.call(e,n)&&gK(t,n,e[n]);return t},$We=(t,e)=>UWe(t,MWe(e)),jWe=(t,e)=>{var n={};for(var i in t)Mle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&xx)for(var i of xx(t))e.indexOf(i)<0&&$le.call(t,i)&&(n[i]=t[i]);return n};const QWe={type:"default",valueFormat:"MMMM YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},jle=N.forwardRef((t,e)=>{const n=pn("MonthPickerInput",QWe,t),{type:i,value:r,defaultValue:a,onChange:o,valueFormat:s,labelSeparator:l,locale:c,classNames:d,styles:f,unstyled:h,closeOnChange:m,variant:p,size:g,dropdownType:b,sortDates:k,minDate:S,maxDate:C}=n,x=jWe(n,["type","value","defaultValue","onChange","valueFormat","labelSeparator","locale","classNames","styles","unstyled","closeOnChange","variant","size","dropdownType","sortDates","minDate","maxDate"]),{calendarProps:F,others:T}=d6(x),{_value:E,setValue:I,formattedValue:R,dropdownHandlers:V,dropdownOpened:U,onClear:P,shouldClear:Z}=Cle({type:i,value:r,defaultValue:a,onChange:o,locale:c,format:s,labelSeparator:l,closeOnChange:m,sortDates:k});return se.createElement(CF,vK({formattedValue:R,dropdownOpened:U,dropdownHandlers:V,classNames:d,styles:f,unstyled:h,__staticSelector:"MonthPickerInput",ref:e,onClear:P,shouldClear:Z,value:E,type:i,variant:p,size:g,dropdownType:b},T),se.createElement(Ule,$We(vK({},F),{type:i,value:E,defaultDate:Array.isArray(E)?E[0]||lO({maxDate:C,minDate:S}):E||lO({maxDate:C,minDate:S}),onChange:I,locale:c,classNames:d,styles:f,unstyled:h,__staticSelector:"MonthPickerInput",__stopPropagation:b==="popover",variant:p,size:g,minDate:S,maxDate:C})))});jle.displayName="@mantine/dates/MonthPickerInput";const Qle=()=>{const[{data:t,fetching:e,error:n},i]=Ns({query:cCe});n&&(console.error(`Error fetching financial entities: ${n}`),fn.error("Error",{description:"Unable to fetch financial entities"}));const r=N.useMemo(()=>t?.allFinancialEntities?.nodes.sort((o,s)=>o.name>s.name?1:-1)??[],[t]),a=N.useMemo(()=>r.map(o=>({value:o.id,label:o.name})),[r]);return{fetching:e,refresh:()=>i(),financialEntities:r,selectableFinancialEntities:a}},HWe=({formManager:t,document:e,defaultCurrency:n})=>{const{control:i,watch:r,trigger:a}=t,[o,s]=N.useState(!1),{selectableFinancialEntities:l,fetching:c}=Qle(),d=NCe(e)||CCe(e)||xCe(e)||_Ce(e)||FCe(e),f=r("documentType");return N.useEffect(()=>{s(!!f&&(f===In.Invoice||f===In.Receipt||f===In.InvoiceReceipt||f===In.Proforma||f===In.CreditInvoice))},[f]),y.jsxs(y.Fragment,{children:[y.jsx(fi,{name:"documentType",control:i,rules:{required:"Required"},defaultValue:e?.documentType??In.Unprocessed,render:({field:h})=>y.jsxs(Ai,{children:[y.jsx(Ji,{children:"Type"}),y.jsxs(Po,{onValueChange:h.onChange,value:h.value??void 0,children:[y.jsx(Li,{children:y.jsx(Uo,{className:"w-full truncate",children:y.jsx(Lo,{placeholder:"Select type"})})}),y.jsx(Mo,{onClick:m=>m.stopPropagation(),children:Object.entries(In).map(([m,p])=>y.jsx(yo,{value:p,children:m},p))})]}),y.jsx(vi,{})]})}),o&&y.jsxs(y.Fragment,{children:[y.jsx(ed,{name:"date",control:i,defaultValue:d?e?.date:void 0,rules:{pattern:{value:bN,message:"Date must be im format yyyy-mm-dd"}},render:({field:h,fieldState:m})=>y.jsx(f6,{...h,onChange:p=>{const g=p?typeof p=="string"?p:Nh(p,"yyyy-MM-dd"):void 0;g!==h.value&&h.onChange(g)},value:h.value?new Date(h.value):void 0,error:m.error?.message,label:"Date",popoverProps:{withinPortal:!0}})}),y.jsx(fi,{name:"serialNumber",control:i,defaultValue:d?e?.serialNumber:void 0,render:({field:h})=>y.jsxs(Ai,{children:[y.jsx(Ji,{children:"Serial Number"}),y.jsx(Li,{children:y.jsx(Qn,{...h,value:!h||h.value==="Missing"?"":h.value})}),y.jsx(vi,{})]})}),y.jsx(fi,{name:"allocationNumber",control:i,defaultValue:d?e?.allocationNumber:void 0,rules:{pattern:{value:/^\d{9}$/,message:"Allocation number must be 9 characters long"}},render:({field:h})=>y.jsxs(Ai,{children:[y.jsx(Ji,{children:"Allocation Number"}),y.jsx(Li,{children:y.jsx(Qn,{...h,value:h.value??void 0})}),y.jsx(vi,{})]})}),y.jsx(fi,{name:"debtorId",control:i,defaultValue:d?e?.debtor?.id:void 0,render:({field:h})=>y.jsxs(Ai,{className:"flex flex-col",children:[y.jsx(Ji,{children:"Debtor"}),y.jsx(bk,{...h,data:l,value:h.value??void 0,disabled:c,placeholder:"Scroll to see all options",formPart:!0}),y.jsx(vi,{})]})}),y.jsx(fi,{name:"creditorId",control:i,defaultValue:d?e?.creditor?.id:void 0,render:({field:h})=>y.jsxs(Ai,{className:"flex flex-col",children:[y.jsx(Ji,{children:"Creditor"}),y.jsx(bk,{...h,data:l,value:h.value??void 0,disabled:c,placeholder:"Scroll to see all options",formPart:!0}),y.jsx(vi,{})]})}),y.jsx(ed,{name:"vat.raw",control:i,defaultValue:d?e?.vat?.raw:void 0,render:({field:h,fieldState:m})=>y.jsx(ed,{name:"vat.currency",control:i,defaultValue:d?e?.amount?.currency??pr.Ils:n,render:({field:p,fieldState:g})=>y.jsx(tN,{...h,error:m.error?.message||g.error?.message,label:"VAT",currencyCodeProps:{...p,label:"Currency",disabled:!0}})})}),y.jsx(ed,{name:"amount.raw",control:i,defaultValue:d?e?.amount?.raw:void 0,render:({field:h,fieldState:m})=>y.jsx(ed,{name:"amount.currency",control:i,defaultValue:d?e?.amount?.currency??pr.Ils:n,render:({field:p,fieldState:g})=>y.jsx(tN,{...h,error:m.error?.message||g.error?.message,label:"Amount",currencyCodeProps:{...p,label:"Currency"}})})}),y.jsx(ed,{name:"vatReportDateOverride",control:i,defaultValue:d?e?.vatReportDateOverride:void 0,rules:{pattern:{value:bN,message:"Date must be im format yyyy-mm-dd"}},render:({field:h,fieldState:m})=>y.jsx(jle,{...h,label:"VAT report date",value:h.value?new Date(h.value):void 0,onChange:p=>{a("vatReportDateOverride"),h.onChange(p?`${Nh(p,"yyyy-MM")}-15`:void 0)},error:m.error?.message,popoverProps:{withinPortal:!0}})}),y.jsx(ed,{name:"noVatAmount",control:i,defaultValue:d?e?.noVatAmount??void 0:void 0,render:({field:h,fieldState:m})=>y.jsx(ed,{name:"amount.currency",control:i,defaultValue:d?e?.amount?.currency??pr.Ils:n,render:({field:p})=>y.jsx(tN,{...h,value:h.value??void 0,error:m.error?.message,label:"no VAT amount",currencyCodeProps:{...p,label:"Currency",disabled:!0}})})})]}),y.jsx(fi,{name:"image",control:i,defaultValue:e?.image,render:({field:h})=>y.jsxs(Ai,{children:[y.jsx(Ji,{children:"Image URL"}),y.jsx(Li,{children:y.jsx(Qn,{...h,value:h.value?.toString()})}),y.jsx(vi,{})]})}),y.jsx(fi,{name:"file",control:i,defaultValue:e?.file,render:({field:h})=>y.jsx("div",{className:"flex flex-row",children:y.jsxs(Ai,{children:[y.jsx(Ji,{children:"File URL"}),y.jsx(Li,{children:y.jsx(Qn,{className:"grow",...h,value:h.value?.toString()})}),y.jsx(vi,{})]})})}),y.jsx(fi,{name:"exchangeRateOverride",control:i,defaultValue:d?e?.exchangeRateOverride:void 0,render:({field:h})=>y.jsxs(Ai,{children:[y.jsxs(Ji,{children:["Exchange Rate Override",y.jsx("span",{className:"text-xs text-muted-foreground",children:`(${d?e?.amount?.currency??pr.Ils:n} => ${pr.Ils})`})]}),y.jsx(Li,{children:y.jsx(Ice,{onValueChange:m=>h.onChange(Number(m)),value:h.value??void 0,hideControls:!0,decimalScale:5,thousandSeparator:","})}),y.jsx(vi,{})]})})]})},zWe=({documentId:t,onDone:e,onChange:n})=>{const[{data:i,fetching:r}]=Ns({query:GNe,variables:{documentId:t}}),a=i?.documentById,o=t0({defaultValues:{...a}}),{handleSubmit:s,formState:{dirtyFields:l},setValue:c,watch:d}=o,[f,h]=N.useState(!1),{updateDocument:m,fetching:p}=cb(),g=k=>{if(!a)return;const S=oZ(k,l);e?.(),S&&Object.keys(S).length>0&&m({documentId:t,fields:S}).then(n)},b=d("amount.currency");return N.useEffect(()=>{c("vat.currency",b)},[c,b]),y.jsxs("div",{className:"flex flex-row",children:[r&&y.jsx(Y2,{className:"flex self-center my-5",color:"dark",size:"xl",variant:"dots"}),!r&&a&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"px-5 w-4/5 h-max justify-items-center",children:y.jsx(fb,{...o,children:y.jsxs("form",{onSubmit:s(g),children:[y.jsxs(mst,{cols:4,children:[y.jsx(HWe,{document:a,formManager:o}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"file",children:"File"}),y.jsx(no,{to:a?.file?.toString()||"",target:"_blank",rel:"noreferrer",className:"flex flex-col items-center justify-center mt-5",children:y.jsx(Qt,{variant:"outline",className:"w-full mb-2",children:"Open File"})})]})]}),y.jsx("div",{className:"flex justify-center mt-5",children:y.jsx(Qt,{type:"submit",variant:"default",disabled:p||Object.keys(l).length===0,children:"Save"})})]})})}),y.jsx("div",{className:" w-1/5 h-max flex flex-col ",children:y.jsx("div",{className:"flex justify-center",children:y.jsx(OP,{onClick:()=>h(!!a.image),src:a?.image?.toString(),className:" cursor-pointer bg-gray-300 p-5 mr-5 max-h-fit max-w-fit"})})}),a.image&&y.jsx(wd,{classNames:{content:"overflow-y-auto drop-shadow-lg"},withCloseButton:!0,withOverlay:!1,position:"right",opened:f,onClose:()=>h(!1),size:"30%",children:y.jsx("div",{className:"m-2",children:y.jsx(Gle,{src:a.image.toString(),zoomLevel:3,magnifierHeight:300,magnifierWidth:300})})})]})]})},VWe=()=>{const[{data:t,fetching:e,error:n},i]=Ns({query:lCe});return n&&(console.error(`Error fetching countries: ${n}`),fn.error("Error",{description:"Unable to fetch countries"})),{fetching:e,refresh:()=>i(),countries:t?.allCountries??[]}},GWe=()=>{const[{data:t,fetching:e,error:n},i]=Ns({query:dCe});n&&(console.error(`Error fetching sort codes: ${n}`),fn.error("Error",{description:"Unable to fetch sort codes"}));const r=N.useMemo(()=>t?.allSortCodes?.sort((o,s)=>(o.name??"")>(s.name??"")?1:-1)??[],[t]),a=N.useMemo(()=>r.map(o=>({value:o.key.toString(),label:o.name??""})),[r]);return{fetching:e,refresh:()=>i(),sortCodes:r,selectableSortCodes:a}},qWe=()=>{const[{data:t,fetching:e,error:n},i]=Ns({query:oCe});n&&(console.error(`Error fetching clients: ${n}`),fn.error("Error",{description:"Unable to fetch clients"}));const r=N.useMemo(()=>t?.allClients?.slice().sort((o,s)=>o.originalBusiness.name>s.originalBusiness.name?1:-1)??[],[t]),a=N.useMemo(()=>r.map(o=>({value:o.originalBusiness.id,label:o.originalBusiness.name})),[r]);return{fetching:e,refresh:()=>i(),clients:r,selectableClients:a}};function xF({className:t,...e}){return y.jsx("textarea",{"data-slot":"textarea",className:Ut("border-gray-200 placeholder:text-gray-500 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:bg-gray-200/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-gray-800 dark:placeholder:text-gray-400 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900 dark:dark:bg-gray-800/30",t),...e})}const KWe=()=>[{value:H4.English,label:"English"},{value:H4.Hebrew,label:"Hebrew"}],A6=()=>[{value:pr.Ils,label:"Israeli Shekel (ILS)"},{value:pr.Usd,label:"US Dollar (USD)"},{value:pr.Eur,label:"Euro (EUR)"},{value:pr.Gbp,label:"British Pound (GBP)"},{value:pr.Jpy,label:"Japanese Yen (JPY)"},{value:pr.Aud,label:"Australian Dollar (AUD)"},{value:pr.Cad,label:"Canadian Dollar (CAD)"},{value:pr.Sek,label:"Swedish Krona (SEK)"}],Hle=()=>[{value:zy.Default,label:"Default (Based on business type)"},{value:zy.Exempt,label:"Exempt (VAT free)"},{value:zy.Mixed,label:"Mixed (Contains exempt and due VAT income rows)"}],zle=()=>[In.CreditInvoice,In.Invoice,In.InvoiceReceipt,In.Receipt,In.Proforma].map(t=>({value:t,label:bv(t)})),WWe=()=>[{value:Me.Il,label:"Israel"},{value:Me.Us,label:"United States"},{value:Me.Gb,label:"United Kingdom"},{value:Me.De,label:"Germany"},{value:Me.Fr,label:"France"},{value:Me.Ca,label:"Canada"},{value:Me.Au,label:"Australia"},{value:Me.Jp,label:"Japan"},{value:Me.Cn,label:"China"},{value:Me.In,label:"India"},{value:Me.Af,label:"Afghanistan"},{value:Me.Ax,label:"Åland Islands"},{value:Me.Al,label:"Albania"},{value:Me.Dz,label:"Algeria"},{value:Me.As,label:"American Samoa"},{value:Me.Ad,label:"Andorra"},{value:Me.Ao,label:"Angola"},{value:Me.Ai,label:"Anguilla"},{value:Me.Aq,label:"Antarctica"},{value:Me.Ag,label:"Antigua and Barbuda"},{value:Me.Ar,label:"Argentina"},{value:Me.Am,label:"Armenia"},{value:Me.Aw,label:"Aruba"},{value:Me.At,label:"Austria"},{value:Me.Az,label:"Azerbaijan"},{value:Me.Bs,label:"Bahamas"},{value:Me.Bh,label:"Bahrain"},{value:Me.Bd,label:"Bangladesh"},{value:Me.Bb,label:"Barbados"},{value:Me.By,label:"Belarus"},{value:Me.Be,label:"Belgium"},{value:Me.Bz,label:"Belize"},{value:Me.Bj,label:"Benin"},{value:Me.Bm,label:"Bermuda"},{value:Me.Bt,label:"Bhutan"},{value:Me.Bo,label:"Bolivia"},{value:Me.Bq,label:"Bonaire, Sint Eustatius and Saba"},{value:Me.Ba,label:"Bosnia and Herzegovina"},{value:Me.Bw,label:"Botswana"},{value:Me.Bv,label:"Bouvet Island"},{value:Me.Br,label:"Brazil"},{value:Me.Io,label:"British Indian Ocean Territory"},{value:Me.Vg,label:"British Virgin Islands"},{value:Me.Bn,label:"Brunei"},{value:Me.Bg,label:"Bulgaria"},{value:Me.Bf,label:"Burkina Faso"},{value:Me.Bi,label:"Burundi"},{value:Me.Kh,label:"Cambodia"},{value:Me.Cm,label:"Cameroon"},{value:Me.Cv,label:"Cape Verde"},{value:Me.Ky,label:"Cayman Islands"},{value:Me.Cf,label:"Central African Republic"},{value:Me.Td,label:"Chad"},{value:Me.Cl,label:"Chile"},{value:Me.Cx,label:"Christmas Island"},{value:Me.Cc,label:"Cocos Islands"},{value:Me.Co,label:"Colombia"},{value:Me.Km,label:"Comoros"},{value:Me.Ck,label:"Cook Islands"},{value:Me.Cr,label:"Costa Rica"},{value:Me.Ci,label:"Côte d'Ivoire"},{value:Me.Hr,label:"Croatia"},{value:Me.Cu,label:"Cuba"},{value:Me.Cw,label:"Curaçao"},{value:Me.Cy,label:"Cyprus"},{value:Me.Cz,label:"Czech Republic"},{value:Me.Cd,label:"Democratic Republic of the Congo"},{value:Me.Dk,label:"Denmark"},{value:Me.Dj,label:"Djibouti"},{value:Me.Dm,label:"Dominica"},{value:Me.Do,label:"Dominican Republic"},{value:Me.Ec,label:"Ecuador"},{value:Me.Eg,label:"Egypt"},{value:Me.Sv,label:"El Salvador"},{value:Me.Gq,label:"Equatorial Guinea"},{value:Me.Er,label:"Eritrea"},{value:Me.Ee,label:"Estonia"},{value:Me.Sz,label:"Eswatini"},{value:Me.Et,label:"Ethiopia"},{value:Me.Fk,label:"Falkland Islands"},{value:Me.Fo,label:"Faroe Islands"},{value:Me.Fj,label:"Fiji"},{value:Me.Fi,label:"Finland"},{value:Me.Gf,label:"French Guiana"},{value:Me.Pf,label:"French Polynesia"},{value:Me.Tf,label:"French Southern Territories"},{value:Me.Ga,label:"Gabon"},{value:Me.Gm,label:"Gambia"},{value:Me.Ge,label:"Georgia"},{value:Me.Gh,label:"Ghana"},{value:Me.Gi,label:"Gibraltar"},{value:Me.Gr,label:"Greece"},{value:Me.Gl,label:"Greenland"},{value:Me.Gd,label:"Grenada"},{value:Me.Gp,label:"Guadeloupe"},{value:Me.Gu,label:"Guam"},{value:Me.Gt,label:"Guatemala"},{value:Me.Gg,label:"Guernsey"},{value:Me.Gn,label:"Guinea"},{value:Me.Gw,label:"Guinea-Bissau"},{value:Me.Gy,label:"Guyana"},{value:Me.Ht,label:"Haiti"},{value:Me.Hm,label:"Heard Island and McDonald Islands"},{value:Me.Hn,label:"Honduras"},{value:Me.Hk,label:"Hong Kong"},{value:Me.Hu,label:"Hungary"},{value:Me.Is,label:"Iceland"},{value:Me.Id,label:"Indonesia"},{value:Me.Ir,label:"Iran"},{value:Me.Iq,label:"Iraq"},{value:Me.Ie,label:"Ireland"},{value:Me.Im,label:"Isle of Man"},{value:Me.It,label:"Italy"},{value:Me.Jm,label:"Jamaica"},{value:Me.Je,label:"Jersey"},{value:Me.Jo,label:"Jordan"},{value:Me.Kz,label:"Kazakhstan"},{value:Me.Ke,label:"Kenya"},{value:Me.Ki,label:"Kiribati"},{value:Me.Xk,label:"Kosovo"},{value:Me.Kw,label:"Kuwait"},{value:Me.Kg,label:"Kyrgyzstan"},{value:Me.La,label:"Laos"},{value:Me.Lv,label:"Latvia"},{value:Me.Lb,label:"Lebanon"},{value:Me.Ls,label:"Lesotho"},{value:Me.Lr,label:"Liberia"},{value:Me.Ly,label:"Libya"},{value:Me.Li,label:"Liechtenstein"},{value:Me.Lt,label:"Lithuania"},{value:Me.Lu,label:"Luxembourg"},{value:Me.Mo,label:"Macao"},{value:Me.Mg,label:"Madagascar"},{value:Me.Mw,label:"Malawi"},{value:Me.My,label:"Malaysia"},{value:Me.Mv,label:"Maldives"},{value:Me.Ml,label:"Mali"},{value:Me.Mt,label:"Malta"},{value:Me.Mh,label:"Marshall Islands"},{value:Me.Mq,label:"Martinique"},{value:Me.Mr,label:"Mauritania"},{value:Me.Mu,label:"Mauritius"},{value:Me.Yt,label:"Mayotte"},{value:Me.Mx,label:"Mexico"},{value:Me.Fm,label:"Micronesia"},{value:Me.Md,label:"Moldova"},{value:Me.Mc,label:"Monaco"},{value:Me.Mn,label:"Mongolia"},{value:Me.Me,label:"Montenegro"},{value:Me.Ms,label:"Montserrat"},{value:Me.Ma,label:"Morocco"},{value:Me.Mz,label:"Mozambique"},{value:Me.Mm,label:"Myanmar"},{value:Me.Na,label:"Namibia"},{value:Me.Nr,label:"Nauru"},{value:Me.Np,label:"Nepal"},{value:Me.Nl,label:"Netherlands"},{value:Me.Nc,label:"New Caledonia"},{value:Me.Nz,label:"New Zealand"},{value:Me.Ni,label:"Nicaragua"},{value:Me.Ne,label:"Niger"},{value:Me.Ng,label:"Nigeria"},{value:Me.Nu,label:"Niue"},{value:Me.Nf,label:"Norfolk Island"},{value:Me.Kp,label:"North Korea"},{value:Me.Mk,label:"North Macedonia"},{value:Me.Mp,label:"Northern Mariana Islands"},{value:Me.No,label:"Norway"},{value:Me.Om,label:"Oman"},{value:Me.Pk,label:"Pakistan"},{value:Me.Pw,label:"Palau"},{value:Me.Ps,label:"Palestine"},{value:Me.Pa,label:"Panama"},{value:Me.Pg,label:"Papua New Guinea"},{value:Me.Py,label:"Paraguay"},{value:Me.Pe,label:"Peru"},{value:Me.Ph,label:"Philippines"},{value:Me.Pn,label:"Pitcairn Islands"},{value:Me.Pl,label:"Poland"},{value:Me.Pt,label:"Portugal"},{value:Me.Pr,label:"Puerto Rico"},{value:Me.Qa,label:"Qatar"},{value:Me.Cg,label:"Republic of the Congo"},{value:Me.Re,label:"Réunion"},{value:Me.Ro,label:"Romania"},{value:Me.Ru,label:"Russia"},{value:Me.Rw,label:"Rwanda"},{value:Me.Bl,label:"Saint Barthélemy"},{value:Me.Sh,label:"Saint Helena"},{value:Me.Kn,label:"Saint Kitts and Nevis"},{value:Me.Lc,label:"Saint Lucia"},{value:Me.Mf,label:"Saint Martin"},{value:Me.Pm,label:"Saint Pierre and Miquelon"},{value:Me.Vc,label:"Saint Vincent and the Grenadines"},{value:Me.Ws,label:"Samoa"},{value:Me.Sm,label:"San Marino"},{value:Me.St,label:"São Tomé and Príncipe"},{value:Me.Sa,label:"Saudi Arabia"},{value:Me.Sn,label:"Senegal"},{value:Me.Rs,label:"Serbia"},{value:Me.Sc,label:"Seychelles"},{value:Me.Sl,label:"Sierra Leone"},{value:Me.Sg,label:"Singapore"},{value:Me.Sx,label:"Sint Maarten"},{value:Me.Sk,label:"Slovakia"},{value:Me.Si,label:"Slovenia"},{value:Me.Sb,label:"Solomon Islands"},{value:Me.So,label:"Somalia"},{value:Me.Za,label:"South Africa"},{value:Me.Gs,label:"South Georgia and the South Sandwich Islands"},{value:Me.Kr,label:"South Korea"},{value:Me.Ss,label:"South Sudan"},{value:Me.Es,label:"Spain"},{value:Me.Lk,label:"Sri Lanka"},{value:Me.Sd,label:"Sudan"},{value:Me.Sr,label:"Suriname"},{value:Me.Sj,label:"Svalbard and Jan Mayen"},{value:Me.Se,label:"Sweden"},{value:Me.Ch,label:"Switzerland"},{value:Me.Sy,label:"Syria"},{value:Me.Tw,label:"Taiwan"},{value:Me.Tj,label:"Tajikistan"},{value:Me.Tz,label:"Tanzania"},{value:Me.Th,label:"Thailand"},{value:Me.Tl,label:"Timor-Leste"},{value:Me.Tg,label:"Togo"},{value:Me.Tk,label:"Tokelau"},{value:Me.To,label:"Tonga"},{value:Me.Tt,label:"Trinidad and Tobago"},{value:Me.Tn,label:"Tunisia"},{value:Me.Tr,label:"Turkey"},{value:Me.Tm,label:"Turkmenistan"},{value:Me.Tc,label:"Turks and Caicos Islands"},{value:Me.Tv,label:"Tuvalu"},{value:Me.Ug,label:"Uganda"},{value:Me.Ua,label:"Ukraine"},{value:Me.Ae,label:"United Arab Emirates"},{value:Me.Um,label:"United States Minor Outlying Islands"},{value:Me.Uy,label:"Uruguay"},{value:Me.Vi,label:"US Virgin Islands"},{value:Me.Uz,label:"Uzbekistan"},{value:Me.Vu,label:"Vanuatu"},{value:Me.Va,label:"Vatican City"},{value:Me.Ve,label:"Venezuela"},{value:Me.Vn,label:"Vietnam"},{value:Me.Wf,label:"Wallis and Futuna"},{value:Me.Eh,label:"Western Sahara"},{value:Me.Ye,label:"Yemen"},{value:Me.Zm,label:"Zambia"},{value:Me.Zw,label:"Zimbabwe"}],YWe=()=>[{value:Do.TaxDeduction,label:"Tax deduction (ניכוי במקור)"},{value:Do.Cash,label:"Cash (מזומן)"},{value:Do.Cheque,label:"Cheque (צ׳ק)"},{value:Do.CreditCard,label:"Credit card (כרטיס אשראי)"},{value:Do.WireTransfer,label:"Wire-transfer (העברה בנקאית)"},{value:Do.Paypal,label:"PayPal (פייפאל)"},{value:Do.OtherDeduction,label:"Other deduction (ניכוי אחר)"},{value:Do.PaymentApp,label:"Payment app (אפליקציית תשלום)"},{value:Do.Other,label:"Other (אחר)"}],XWe=()=>[{value:FA.Bitcoin,label:"Bitcoin (ביטקוין)"},{value:FA.MoneyEqual,label:"Money-equal (שווה כסף)"},{value:FA.VCheck,label:"V-Check"},{value:FA.GiftCard,label:"Gift card (שובר מתנה)"},{value:FA.NiiEmployeeDeduction,label:"NII employee deduction (ניכוי חלק עובד ביטוח לאומי)"},{value:FA.Ethereum,label:"Ethereum (אתריום)"},{value:FA.BuymeVoucher,label:"BUYME Voucher (BUYME שובר)"},{value:FA.Payoneer,label:"Payoneer"}],ZWe=()=>[{value:eg.Bit,label:"Bit"},{value:eg.PayByPepper,label:"Pay (by Pepper)"},{value:eg.Paybox,label:"PayBox"},{value:eg.Culo,label:"Culo"},{value:eg.GooglePay,label:"Google Pay"},{value:eg.ApplePay,label:"Apple Pay"}],JWe=()=>[{value:tg.Unknown,label:"Unknown (לא ידוע)"},{value:tg.Isracard,label:"Isracard (ישראכרט)"},{value:tg.Visa,label:"Visa (ויזה)"},{value:tg.Mastercard,label:"Mastercard (מאסטרקארד)"},{value:tg.AmericanExpress,label:"American Express (אמריקן אקספרס)"},{value:tg.Diners,label:"Diners (דיינרס)"}],eYe=()=>[{value:ng.Standard,label:"Standard (רגיל)"},{value:ng.Payments,label:"Payments (תשלומים)"},{value:ng.Credit,label:"Credit (קרדיט)"},{value:ng.Deferred,label:"Deferred (חיוב נדחה)"},{value:ng.Other,label:"Other (אחר)"},{value:ng.Recurring,label:"Recurring (הוראת קבע)"}];function Vle(t){return{...t,greenInvoiceId:t.greenInvoiceId||void 0,country:t.country||void 0,emails:t.emails||void 0,name:t.name||void 0,phone:t.phone||void 0,taxId:t.taxId||void 0,address:t.address||void 0,city:t.city||void 0,zip:t.zip||void 0,fax:t.fax||void 0,mobile:t.mobile||void 0}}const tYe=WWe();function nYe({client:t,onChange:e,fetching:n}){const i=(a,o)=>{e({...t,[a]:o})},r=a=>{const o=a.split(",").map(s=>s.trim()).filter(Boolean);i("emails",o)};return y.jsxs(fd,{children:[y.jsx(bu,{children:y.jsxs(Su,{className:"flex items-center gap-2",children:[y.jsx(Dbe,{className:"w-5 h-5"}),"Client Information"]})}),y.jsx(Ad,{className:"space-y-4",children:n?y.jsx("div",{children:"Loading..."}):y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"clientName",children:"Client Name"}),y.jsx(Qn,{id:"clientName",value:t.name||"",onChange:a=>i("name",a.target.value),placeholder:"Enter client name"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"taxId",children:"Tax ID"}),y.jsx(Qn,{id:"taxId",value:t.taxId||"",onChange:a=>i("taxId",a.target.value),placeholder:"Tax identification number"})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"emails",children:"Email Addresses"}),y.jsx(Qn,{id:"emails",value:t.emails?.join(", ")||"",onChange:a=>r(a.target.value),placeholder:"email1@example.com, email2@example.com"})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"phone",children:"Phone"}),y.jsx(Qn,{id:"phone",value:t.phone||"",onChange:a=>i("phone",a.target.value),placeholder:"Phone number"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"mobile",children:"Mobile"}),y.jsx(Qn,{id:"mobile",value:t.mobile||"",onChange:a=>i("mobile",a.target.value),placeholder:"Mobile number"})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"address",children:"Address"}),y.jsx(Qn,{id:"address",value:t.address||"",onChange:a=>i("address",a.target.value),placeholder:"Street address"})]}),y.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"city",children:"City"}),y.jsx(Qn,{id:"city",value:t.city||"",onChange:a=>i("city",a.target.value),placeholder:"City"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"zip",children:"ZIP Code"}),y.jsx(Qn,{id:"zip",value:t.zip||"",onChange:a=>i("zip",a.target.value),placeholder:"ZIP code"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"country",children:"Country"}),y.jsxs(Po,{value:t.country||"",onValueChange:a=>i("country",a),children:[y.jsx(Uo,{children:y.jsx(Lo,{placeholder:"Select country"})}),y.jsx(Mo,{children:tYe.map(a=>y.jsx(yo,{value:a.value,children:a.label},a.value))})]})]})]})]})})]})}const iYe=Hle(),rYe=A6();function aYe({income:t,currency:e,onChange:n}){const i=()=>{const s={description:"",price:0,quantity:1,currency:e,vatType:zy.Exempt};n([...t,s])},r=(s,l,c)=>{const d=[...t];d[s]={...d[s],[l]:c},n(d)},a=s=>{n(t.filter((l,c)=>c!==s))},o=s=>{const l=s.price*s.quantity,c=s.vatRate||0,d=l*(c/100);return l+d};return y.jsxs(fd,{children:[y.jsx(bu,{children:y.jsxs(Su,{className:"flex items-center gap-2",children:[y.jsx(Qy,{className:"w-5 h-5"}),"Income Items"]})}),y.jsxs(Ad,{className:"space-y-4",children:[t.map((s,l)=>y.jsxs("div",{className:"border rounded-lg p-4 space-y-4",children:[y.jsxs("div",{className:"flex justify-between items-center",children:[y.jsxs("h4",{className:"font-medium",children:["Item ",l+1]}),y.jsx(Qt,{variant:"outline",size:"sm",onClick:()=>a(l),className:"text-red-600 hover:text-red-700",children:y.jsx(lX,{className:"w-4 h-4"})})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Description"}),y.jsx(xF,{value:s.description,onChange:c=>r(l,"description",c.target.value),placeholder:"Item description",className:"min-h-[60px]"})]}),y.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Price"}),y.jsx(Qn,{type:"number",step:"0.01",value:s.price,onChange:c=>r(l,"price",Number.parseFloat(c.target.value)||0),placeholder:"0.00"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Currency"}),y.jsxs(Po,{value:s.currency,onValueChange:c=>r(l,"currency",c),children:[y.jsx(Uo,{children:y.jsx(Lo,{})}),y.jsx(Mo,{children:rYe.map(c=>y.jsx(yo,{value:c.value,children:c.label},c.value))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Quantity"}),y.jsx(Qn,{type:"number",step:"1",value:s.quantity,onChange:c=>r(l,"quantity",Number.parseInt(c.target.value)||1),placeholder:"1"})]})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"VAT Type"}),y.jsxs(Po,{value:s.vatType,onValueChange:c=>r(l,"vatType",c),children:[y.jsx(Uo,{children:y.jsx(Lo,{})}),y.jsx(Mo,{children:iYe.map(c=>y.jsx(yo,{value:c.value,children:c.label},c.value))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"VAT Rate (%)"}),y.jsx(Qn,{type:"number",step:"0.01",value:s.vatRate||0,onChange:c=>r(l,"vatRate",Number.parseFloat(c.target.value)||0),placeholder:"0.00"})]})]}),y.jsx("div",{className:"grid grid-cols-2 gap-4",children:y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Total"}),y.jsxs("div",{className:"px-3 py-2 bg-gray-50 rounded-md text-sm font-medium",children:[o(s).toFixed(2)," ",e]})]})})]},l)),y.jsxs(Qt,{onClick:i,variant:"outline",className:"w-full bg-transparent",children:[y.jsx(Tf,{className:"w-4 h-4 mr-2"}),"Add Income Item"]}),t.length>0&&y.jsx("div",{className:"border-t pt-4",children:y.jsxs("div",{className:"flex justify-between items-center font-medium",children:[y.jsx("span",{children:"Total Amount:"}),y.jsxs("span",{children:[t.reduce((s,l)=>s+o(l),0).toFixed(2)," ",e]})]})})]})]})}const oYe=A6(),yK=YWe(),sYe=XWe(),lYe=ZWe(),cYe=JWe(),dYe=eYe();function uYe({payments:t,currency:e,onChange:n}){const i=()=>{const p={currency:e,price:0,type:Do.Cash,date:new Date().toISOString().split("T")[0]};n([...t,p])},r=N.useCallback((p,g,b)=>{const k=[...t];k[p]={...k[p],[g]:b},n(k)},[t,n]),a=p=>{n(t.filter((g,b)=>b!==p))},o=p=>yK.find(g=>g.value===p)?.label||p,s=p=>p===Do.WireTransfer||p===Do.Cheque,l=p=>p===Do.Cheque,c=p=>p===Do.CreditCard,d=p=>p===Do.Paypal,f=p=>p===Do.PaymentApp,h=p=>p===Do.Other,m=N.useCallback((p,g)=>y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Account ID"}),y.jsx(Qn,{value:p.accountId||"",onChange:b=>r(g,"accountId",b.target.value),placeholder:"PayPal account ID"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Transaction ID"}),y.jsx(Qn,{value:p.transactionId||"",onChange:b=>r(g,"transactionId",b.target.value),placeholder:"Transaction ID"})]})]}),[r]);return y.jsxs(fd,{children:[y.jsx(bu,{children:y.jsxs(Su,{className:"flex items-center gap-2",children:[y.jsx(gke,{className:"w-5 h-5"}),"Payments"]})}),y.jsxs(Ad,{className:"space-y-4",children:[t.map((p,g)=>y.jsxs("div",{className:"border rounded-lg p-4 space-y-4",children:[y.jsxs("div",{className:"flex justify-between items-center",children:[y.jsxs("h4",{className:"font-medium",children:["Payment ",g+1," - ",o(p.type)]}),y.jsx(Qt,{variant:"outline",size:"sm",onClick:()=>a(g),className:"text-red-600 hover:text-red-700",children:y.jsx(lX,{className:"w-4 h-4"})})]}),y.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Payment Type"}),y.jsxs(Po,{value:p.type,onValueChange:b=>r(g,"type",b),children:[y.jsx(Uo,{children:y.jsx(Lo,{})}),y.jsx(Mo,{children:yK.map(b=>y.jsx(yo,{value:b.value,children:b.label},b.value))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Amount"}),y.jsx(Qn,{type:"number",step:"0.01",value:p.price,onChange:b=>r(g,"price",Number.parseFloat(b.target.value)||0),placeholder:"0.00"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Currency"}),y.jsxs(Po,{value:p.currency,onValueChange:b=>r(g,"currency",b),children:[y.jsx(Uo,{children:y.jsx(Lo,{})}),y.jsx(Mo,{children:oYe.map(b=>y.jsx(yo,{value:b.value,children:b.label},b.value))})]})]})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Date"}),y.jsx(Qn,{type:"date",value:p.date||"",onChange:b=>r(g,"date",b.target.value)})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Currency Rate (relative to ILS)"}),y.jsx(Qn,{type:"number",step:"0.0001",value:p.currencyRate||"",onChange:b=>r(g,"currencyRate",Number.parseFloat(b.target.value)||void 0),placeholder:"1.0000"})]})]}),s(p.type)&&y.jsxs("div",{className:"space-y-4",children:[y.jsx("h5",{className:"font-medium text-sm text-gray-700",children:"Bank Details"}),y.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Bank Name"}),y.jsx(Qn,{value:p.bankName||"",onChange:b=>r(g,"bankName",b.target.value),placeholder:"Bank name"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Bank Branch"}),y.jsx(Qn,{value:p.bankBranch||"",onChange:b=>r(g,"bankBranch",b.target.value),placeholder:"Branch number"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Bank Account"}),y.jsx(Qn,{value:p.bankAccount||"",onChange:b=>r(g,"bankAccount",b.target.value),placeholder:"Account number"})]})]})]}),l(p.type)&&y.jsx("div",{className:"space-y-4",children:y.jsx("div",{className:"grid grid-cols-2 gap-4",children:y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Cheque Number"}),y.jsx(Qn,{value:p.chequeNum||"",onChange:b=>r(g,"chequeNum",b.target.value),placeholder:"Cheque number"})]})})}),c(p.type)&&y.jsxs("div",{className:"space-y-4",children:[y.jsx("h5",{className:"font-medium text-sm text-gray-700",children:"Credit Card Details"}),y.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Card Type"}),y.jsxs(Po,{value:p.cardType||"",onValueChange:b=>r(g,"cardType",b||void 0),children:[y.jsx(Uo,{children:y.jsx(Lo,{placeholder:"Select card type"})}),y.jsx(Mo,{children:cYe.map(b=>y.jsx(yo,{value:b.value,children:b.label},b.value))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Last 4 Digits"}),y.jsx(Qn,{value:p.cardNum||"",onChange:b=>r(g,"cardNum",b.target.value),placeholder:"1234",maxLength:4})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Deal Type"}),y.jsxs(Po,{value:p.dealType||"",onValueChange:b=>r(g,"dealType",b||void 0),children:[y.jsx(Uo,{children:y.jsx(Lo,{placeholder:"Select deal type"})}),y.jsx(Mo,{children:dYe.map(b=>y.jsx(yo,{value:b.value,children:b.label},b.value))})]})]})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Number of Payments (1-36)"}),y.jsx(Qn,{type:"number",min:"1",max:"36",value:p.numPayments||"",onChange:b=>r(g,"numPayments",Number.parseInt(b.target.value)||void 0),placeholder:"1"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"First Payment Amount"}),y.jsx(Qn,{type:"number",step:"0.01",value:p.firstPayment||"",onChange:b=>r(g,"firstPayment",Number.parseFloat(b.target.value)||void 0),placeholder:"0.00"})]})]})]}),d(p.type)&&y.jsxs("div",{className:"space-y-4",children:[y.jsx("h5",{className:"font-medium text-sm text-gray-700",children:"PayPal Details"}),y.jsx("div",{className:"grid grid-cols-2 gap-4",children:m(p,g)})]}),f(p.type)&&y.jsxs("div",{className:"space-y-4",children:[y.jsx("h5",{className:"font-medium text-sm text-gray-700",children:"Payment App Details"}),y.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"App Type"}),y.jsxs(Po,{value:p.appType||"",onValueChange:b=>r(g,"appType",b||void 0),children:[y.jsx(Uo,{children:y.jsx(Lo,{placeholder:"Select app type"})}),y.jsx(Mo,{children:lYe.map(b=>y.jsx(yo,{value:b.value,children:b.label},b.value))})]})]}),m(p,g)]})]}),h(p.type)&&y.jsxs("div",{className:"space-y-4",children:[y.jsx("h5",{className:"font-medium text-sm text-gray-700",children:"Other Payment Details"}),y.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Sub Type"}),y.jsxs(Po,{value:p.subType||"",onValueChange:b=>r(g,"subType",b||void 0),children:[y.jsx(Uo,{children:y.jsx(Lo,{placeholder:"Select sub type"})}),y.jsxs(Mo,{children:[y.jsx(yo,{value:"NONE",children:"None"}),sYe.map(b=>y.jsx(yo,{value:b.value,children:b.label},b.value))]})]})]}),m(p,g)]})]})]},g)),y.jsxs(Qt,{onClick:i,variant:"outline",className:"w-full bg-transparent",children:[y.jsx(Tf,{className:"w-4 h-4 mr-2"}),"Add Payment"]}),t.length>0&&y.jsx("div",{className:"border-t pt-4",children:y.jsxs("div",{className:"flex justify-between items-center font-medium",children:[y.jsx("span",{children:"Total Payments:"}),y.jsxs("span",{children:[t.reduce((p,g)=>p+g.price,0).toFixed(2)," ",e]})]})})]})]})}const fYe=A6(),AYe=zle(),mYe=KWe(),hYe=Hle();function pYe({formData:t,updateFormData:e}){const[n,i]=N.useState(t.client?.businessId||""),{selectableClients:r}=qWe(),[a,o]=N.useState(t.client??null),[{data:s,fetching:l},c]=Ns({pause:!0,query:qNe,variables:{businessId:n}});N.useEffect(()=>{n&&c()},[n,c]);const d=N.useCallback(g=>{const b=Vle(g);o(b),e("client",b)},[e]);N.useEffect(()=>{if(s?.client?.integrations.greenInvoiceInfo){const g=Bh(iZ,s.client.integrations.greenInvoiceInfo);d(g)}},[s?.client?.integrations.greenInvoiceInfo,d,n]);const f=g=>{if(i(g),g==="new"){const b=`temp-${crypto.randomUUID()}`;e("client",{businessId:b,name:""})}else if(g){const b=r.find(k=>k.value===g);b&&e("client",{businessId:b.value,name:b.label})}},h=t.type===In.Proforma||t.type===In.Invoice,m=h||t.type===In.InvoiceReceipt||t.type===In.CreditInvoice,p=t.type===In.Receipt||t.type===In.InvoiceReceipt;return y.jsxs(y.Fragment,{children:[y.jsxs(fd,{children:[y.jsx(bu,{children:y.jsxs(Su,{className:"flex items-center gap-2",children:[y.jsx(mbe,{className:"w-5 h-5"}),"Document Settings"]})}),y.jsxs(Ad,{className:"space-y-4",children:[y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"documentType",children:"Document Type"}),y.jsxs(Po,{value:t.type,onValueChange:g=>e("type",g),children:[y.jsx(Uo,{children:y.jsx(Lo,{})}),y.jsx(Mo,{children:AYe.map(g=>y.jsx(yo,{value:g.value,children:g.label},g.value))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"language",children:"Language"}),y.jsxs(Po,{value:t.lang,onValueChange:g=>e("lang",g),children:[y.jsx(Uo,{children:y.jsx(Lo,{})}),y.jsx(Mo,{children:mYe.map(g=>y.jsx(yo,{value:g.value,children:g.label},g.value))})]})]})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"currency",children:"Currency"}),y.jsxs(Po,{value:t.currency,onValueChange:g=>e("currency",g),children:[y.jsx(Uo,{children:y.jsx(Lo,{})}),y.jsx(Mo,{children:fYe.map(g=>y.jsx(yo,{value:g.value,children:g.label},g.value))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"vatType",children:"VAT Type"}),y.jsxs(Po,{value:t.vatType,onValueChange:g=>e("vatType",g),children:[y.jsx(Uo,{children:y.jsx(Lo,{})}),y.jsx(Mo,{children:hYe.map(g=>y.jsx(yo,{value:g.value,children:g.label},g.value))})]})]})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"clientSelect",children:"Select Client"}),y.jsxs(Po,{value:n,onValueChange:f,children:[y.jsx(Uo,{children:y.jsx(Lo,{placeholder:"Choose existing client or create new"})}),y.jsx(Mo,{children:r.map(g=>y.jsx(yo,{value:g.value,children:g.label},g.value))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"date",children:"Document Date"}),y.jsx(Qn,{id:"date",type:"date",value:t.date||"",onChange:g=>e("date",g.target.value)})]})]}),h&&y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"maxPayments",children:"Max Payments"}),y.jsx(Qn,{id:"maxPayments",type:"number",min:"1",max:"36",value:t.maxPayments||"",onChange:g=>e("maxPayments",Number.parseInt(g.target.value)||void 0),placeholder:"1"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"dueDate",children:"Due Date"}),y.jsx(Qn,{id:"dueDate",type:"date",value:t.dueDate||"",onChange:g=>e("dueDate",g.target.value)})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"remarks",children:"Remarks"}),y.jsx(xF,{id:"remarks",value:t.remarks||"",onChange:g=>e("remarks",g.target.value),placeholder:"Additional remarks",className:"min-h-[60px]"})]})]})]}),a&&y.jsx(nYe,{client:a,fetching:l,onChange:g=>d(g)}),m&&y.jsx(aYe,{income:t.income||[],currency:t.currency,onChange:g=>e("income",g)}),p&&y.jsx(uYe,{payments:t.payment||[],currency:t.currency,onChange:g=>e("payment",g)})]})}const m6=({data:t})=>{const e=t.map(n=>Bh(HNe,n));return y.jsx("div",{className:"flex flex-col gap-4 mt-5",children:e.filter(({charge:n})=>n).map(n=>y.jsx(no,{to:$n.CHARGES.DETAIL(n.charge.id),target:"_blank",rel:"noreferrer",onClick:i=>i.stopPropagation(),className:"inline-flex items-center font-semibold",children:`${n.charge.counterparty?.name??"Unknown"} - ${n.charge.userDescription}`},n.id))})},gYe="uploadMultipleDocuments",vYe=()=>{const[{fetching:t},e]=bs(kCe),n=N.useCallback(async i=>{const r="Error uploading documents",a=`${gYe}-${i.chargeId}`;fn.loading("Uploading Documents",{id:a});try{const o=await e(i),s=Ss(o,r,a,"batchUploadDocuments");if(s){let l=!1;const c=s.batchUploadDocuments.filter(d=>"message"in d?(console.error(`Error uploading document: ${d.message}`),l=!0,!1):"document"in d).map(({document:d})=>d);return fn.success("Upload Successful",{id:a,description:c.length>0?m6({data:c}):"No successful document uploads",duration:c.length>0?1/0:5e3,closeButton:!0}),l&&fn.error("Some files failed to upload",{duration:1e5,closeButton:!0}),c}}catch(o){console.error(`${r}: ${o}`),fn.error("Error",{id:a,description:r,duration:1e5,closeButton:!0})}},[e]);return{uploading:t,uploadMultipleDocuments:n}},yYe=({name:t,...e})=>y.jsx(OP,{src:`/icons/${t}.svg`,...e});function Gle({src:t,width:e,height:n,magnifierHeight:i=100,magnifierWidth:r=100,zoomLevel:a=1.5}){const[o,s]=N.useState({x:0,y:0}),[l,c]=N.useState({height:0,width:0}),[d,f]=N.useState(a),[h,m]=N.useState({width:r,height:i}),[p,g]=N.useState(!1);return y.jsxs("div",{style:{position:"relative",height:n,width:e},children:[y.jsx("img",{src:t,style:{height:n,width:e},onMouseEnter:b=>{const k=b.currentTarget,{width:S,height:C}=k.getBoundingClientRect();c({width:S,height:C}),g(!0)},onMouseMove:b=>{const k=b.currentTarget,{top:S,left:C}=k.getBoundingClientRect(),x=b.pageX-C-window.pageXOffset,F=b.pageY-S-window.pageYOffset;s({x,y:F})},onMouseLeave:()=>{g(!1)},alt:"img"}),y.jsx("div",{style:{display:p?"":"none",position:"absolute",pointerEvents:"none",height:`${h.height}px`,width:`${h.width}px`,top:`${o.y-h.height/2}px`,left:`${o.x-h.width/2}px`,opacity:"1",border:"1px solid lightgray",backgroundColor:"white",backgroundImage:`url('${t}')`,backgroundRepeat:"no-repeat",backgroundSize:`${l.width*d}px ${l.height*d}px`,backgroundPositionX:`${-o.x*d+h.width/2}px`,backgroundPositionY:`${-o.y*d+h.height/2}px`}}),y.jsxs("div",{className:"absolute top-10 right-10 flex flex-row gap-1",children:[y.jsx(sd,{label:"Increase zoom",children:y.jsx(Qt,{variant:"ghost",size:"icon",className:"size-7.5",onClick:()=>f(b=>b*1.2),children:y.jsx(o$,{className:"size-5"})})}),y.jsx(sd,{label:"Decrease zoom",children:y.jsx(Qt,{variant:"ghost",size:"icon",className:"size-7.5",onClick:()=>f(b=>b/1.2),children:y.jsx(s$,{className:"size-5"})})}),y.jsx(sd,{label:"Expand zoom area",children:y.jsx(Qt,{variant:"ghost",size:"icon",className:"size-7.5",onClick:()=>m(b=>({width:b.width*1.2,height:b.height*1.2})),children:y.jsx(o$,{className:"size-5"})})}),y.jsx(sd,{label:"Reduce zoom area",children:y.jsx(Qt,{variant:"ghost",size:"icon",className:"size-7.5",onClick:()=>m(b=>({width:b.width/1.2,height:b.height/1.2})),children:y.jsx(s$,{className:"size-5"})})})]})]})}function kYe(t){const[e,n]=se.useState(!1);return se.useEffect(()=>{function i(a){n(a.matches)}const r=matchMedia(t);return r.addEventListener("change",i),n(r.matches),()=>r.removeEventListener("change",i)},[t]),e}var kK=1,bYe=.9,SYe=.8,wYe=.17,KD=.1,WD=.999,NYe=.9999,CYe=.99,xYe=/[\\\/_+.#"@\[\(\{&]/,FYe=/[\\\/_+.#"@\[\(\{&]/g,_Ye=/[\s-]/,qle=/[\s-]/g;function cO(t,e,n,i,r,a,o){if(a===e.length)return r===t.length?kK:CYe;var s=`${r},${a}`;if(o[s]!==void 0)return o[s];for(var l=i.charAt(a),c=n.indexOf(l,r),d=0,f,h,m,p;c>=0;)f=cO(t,e,n,i,c+1,a+1,o),f>d&&(c===r?f*=kK:xYe.test(t.charAt(c-1))?(f*=SYe,m=t.slice(r,c-1).match(FYe),m&&r>0&&(f*=Math.pow(WD,m.length))):_Ye.test(t.charAt(c-1))?(f*=bYe,p=t.slice(r,c-1).match(qle),p&&r>0&&(f*=Math.pow(WD,p.length))):(f*=wYe,r>0&&(f*=Math.pow(WD,c-r))),t.charAt(c)!==e.charAt(a)&&(f*=NYe)),(f<KD&&n.charAt(c-1)===i.charAt(a+1)||i.charAt(a+1)===i.charAt(a)&&n.charAt(c-1)!==i.charAt(a))&&(h=cO(t,e,n,i,c+1,a+2,o),h*KD>f&&(f=h*KD)),f>d&&(d=f),c=n.indexOf(l,c+1);return o[s]=d,d}function bK(t){return t.toLowerCase().replace(qle," ")}function EYe(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,cO(t,e,bK(t),bK(e),0,0,{})}var BYe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pm=BYe.reduce((t,e)=>{const n=jv(`Primitive.${e}`),i=N.forwardRef((r,a)=>{const{asChild:o,...s}=r,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(l,{...s,ref:a})});return i.displayName=`Primitive.${e}`,{...t,[e]:i}},{}),fy='[cmdk-group=""]',YD='[cmdk-group-items=""]',TYe='[cmdk-group-heading=""]',Kle='[cmdk-item=""]',SK=`${Kle}:not([aria-disabled="true"])`,dO="cmdk-item-select",Og="data-value",DYe=(t,e,n)=>EYe(t,e,n),Wle=N.createContext(void 0),Ab=()=>N.useContext(Wle),Yle=N.createContext(void 0),h6=()=>N.useContext(Yle),Xle=N.createContext(void 0),Zle=N.forwardRef((t,e)=>{let n=Rg(()=>{var L,j;return{search:"",value:(j=(L=t.value)!=null?L:t.defaultValue)!=null?j:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=Rg(()=>new Set),r=Rg(()=>new Map),a=Rg(()=>new Map),o=Rg(()=>new Set),s=Jle(t),{label:l,children:c,value:d,onValueChange:f,filter:h,shouldFilter:m,loop:p,disablePointerSelection:g=!1,vimBindings:b=!0,...k}=t,S=ro(),C=ro(),x=ro(),F=N.useRef(null),T=HYe();Rh(()=>{if(d!==void 0){let L=d.trim();n.current.value=L,E.emit()}},[d]),Rh(()=>{T(6,Z)},[]);let E=N.useMemo(()=>({subscribe:L=>(o.current.add(L),()=>o.current.delete(L)),snapshot:()=>n.current,setState:(L,j,$)=>{var W,J,K,fe;if(!Object.is(n.current[L],j)){if(n.current[L]=j,L==="search")P(),V(),T(1,U);else if(L==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ge=document.getElementById(x);ge?ge.focus():(W=document.getElementById(S))==null||W.focus()}if(T(7,()=>{var ge;n.current.selectedItemId=(ge=q())==null?void 0:ge.id,E.emit()}),$||T(5,Z),((J=s.current)==null?void 0:J.value)!==void 0){let ge=j??"";(fe=(K=s.current).onValueChange)==null||fe.call(K,ge);return}}E.emit()}},emit:()=>{o.current.forEach(L=>L())}}),[]),I=N.useMemo(()=>({value:(L,j,$)=>{var W;j!==((W=a.current.get(L))==null?void 0:W.value)&&(a.current.set(L,{value:j,keywords:$}),n.current.filtered.items.set(L,R(j,$)),T(2,()=>{V(),E.emit()}))},item:(L,j)=>(i.current.add(L),j&&(r.current.has(j)?r.current.get(j).add(L):r.current.set(j,new Set([L]))),T(3,()=>{P(),V(),n.current.value||U(),E.emit()}),()=>{a.current.delete(L),i.current.delete(L),n.current.filtered.items.delete(L);let $=q();T(4,()=>{P(),$?.getAttribute("id")===L&&U(),E.emit()})}),group:L=>(r.current.has(L)||r.current.set(L,new Set),()=>{a.current.delete(L),r.current.delete(L)}),filter:()=>s.current.shouldFilter,label:l||t["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:S,inputId:x,labelId:C,listInnerRef:F}),[]);function R(L,j){var $,W;let J=(W=($=s.current)==null?void 0:$.filter)!=null?W:DYe;return L?J(L,n.current.search,j):0}function V(){if(!n.current.search||s.current.shouldFilter===!1)return;let L=n.current.filtered.items,j=[];n.current.filtered.groups.forEach(W=>{let J=r.current.get(W),K=0;J.forEach(fe=>{let ge=L.get(fe);K=Math.max(ge,K)}),j.push([W,K])});let $=F.current;ae().sort((W,J)=>{var K,fe;let ge=W.getAttribute("id"),Se=J.getAttribute("id");return((K=L.get(Se))!=null?K:0)-((fe=L.get(ge))!=null?fe:0)}).forEach(W=>{let J=W.closest(YD);J?J.appendChild(W.parentElement===J?W:W.closest(`${YD} > *`)):$.appendChild(W.parentElement===$?W:W.closest(`${YD} > *`))}),j.sort((W,J)=>J[1]-W[1]).forEach(W=>{var J;let K=(J=F.current)==null?void 0:J.querySelector(`${fy}[${Og}="${encodeURIComponent(W[0])}"]`);K?.parentElement.appendChild(K)})}function U(){let L=ae().find($=>$.getAttribute("aria-disabled")!=="true"),j=L?.getAttribute(Og);E.setState("value",j||void 0)}function P(){var L,j,$,W;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=i.current.size;return}n.current.filtered.groups=new Set;let J=0;for(let K of i.current){let fe=(j=(L=a.current.get(K))==null?void 0:L.value)!=null?j:"",ge=(W=($=a.current.get(K))==null?void 0:$.keywords)!=null?W:[],Se=R(fe,ge);n.current.filtered.items.set(K,Se),Se>0&&J++}for(let[K,fe]of r.current)for(let ge of fe)if(n.current.filtered.items.get(ge)>0){n.current.filtered.groups.add(K);break}n.current.filtered.count=J}function Z(){var L,j,$;let W=q();W&&(((L=W.parentElement)==null?void 0:L.firstChild)===W&&(($=(j=W.closest(fy))==null?void 0:j.querySelector(TYe))==null||$.scrollIntoView({block:"nearest"})),W.scrollIntoView({block:"nearest"}))}function q(){var L;return(L=F.current)==null?void 0:L.querySelector(`${Kle}[aria-selected="true"]`)}function ae(){var L;return Array.from(((L=F.current)==null?void 0:L.querySelectorAll(SK))||[])}function H(L){let j=ae()[L];j&&E.setState("value",j.getAttribute(Og))}function te(L){var j;let $=q(),W=ae(),J=W.findIndex(fe=>fe===$),K=W[J+L];(j=s.current)!=null&&j.loop&&(K=J+L<0?W[W.length-1]:J+L===W.length?W[0]:W[J+L]),K&&E.setState("value",K.getAttribute(Og))}function Y(L){let j=q(),$=j?.closest(fy),W;for(;$&&!W;)$=L>0?jYe($,fy):QYe($,fy),W=$?.querySelector(SK);W?E.setState("value",W.getAttribute(Og)):te(L)}let ue=()=>H(ae().length-1),we=L=>{L.preventDefault(),L.metaKey?ue():L.altKey?Y(1):te(1)},ie=L=>{L.preventDefault(),L.metaKey?H(0):L.altKey?Y(-1):te(-1)};return N.createElement(pm.div,{ref:e,tabIndex:-1,...k,"cmdk-root":"",onKeyDown:L=>{var j;(j=k.onKeyDown)==null||j.call(k,L);let $=L.nativeEvent.isComposing||L.keyCode===229;if(!(L.defaultPrevented||$))switch(L.key){case"n":case"j":{b&&L.ctrlKey&&we(L);break}case"ArrowDown":{we(L);break}case"p":case"k":{b&&L.ctrlKey&&ie(L);break}case"ArrowUp":{ie(L);break}case"Home":{L.preventDefault(),H(0);break}case"End":{L.preventDefault(),ue();break}case"Enter":{L.preventDefault();let W=q();if(W){let J=new Event(dO);W.dispatchEvent(J)}}}}},N.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:VYe},l),FF(t,L=>N.createElement(Yle.Provider,{value:E},N.createElement(Wle.Provider,{value:I},L))))}),IYe=N.forwardRef((t,e)=>{var n,i;let r=ro(),a=N.useRef(null),o=N.useContext(Xle),s=Ab(),l=Jle(t),c=(i=(n=l.current)==null?void 0:n.forceMount)!=null?i:o?.forceMount;Rh(()=>{if(!c)return s.item(r,o?.id)},[c]);let d=ece(r,a,[t.value,t.children,a],t.keywords),f=h6(),h=im(T=>T.value&&T.value===d.current),m=im(T=>c||s.filter()===!1?!0:T.search?T.filtered.items.get(r)>0:!0);N.useEffect(()=>{let T=a.current;if(!(!T||t.disabled))return T.addEventListener(dO,p),()=>T.removeEventListener(dO,p)},[m,t.onSelect,t.disabled]);function p(){var T,E;g(),(E=(T=l.current).onSelect)==null||E.call(T,d.current)}function g(){f.setState("value",d.current,!0)}if(!m)return null;let{disabled:b,value:k,onSelect:S,forceMount:C,keywords:x,...F}=t;return N.createElement(pm.div,{ref:ws(a,e),...F,id:r,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!h,"data-disabled":!!b,"data-selected":!!h,onPointerMove:b||s.getDisablePointerSelection()?void 0:g,onClick:b?void 0:p},t.children)}),OYe=N.forwardRef((t,e)=>{let{heading:n,children:i,forceMount:r,...a}=t,o=ro(),s=N.useRef(null),l=N.useRef(null),c=ro(),d=Ab(),f=im(m=>r||d.filter()===!1?!0:m.search?m.filtered.groups.has(o):!0);Rh(()=>d.group(o),[]),ece(o,s,[t.value,t.heading,l]);let h=N.useMemo(()=>({id:o,forceMount:r}),[r]);return N.createElement(pm.div,{ref:ws(s,e),...a,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&N.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),FF(t,m=>N.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},N.createElement(Xle.Provider,{value:h},m))))}),RYe=N.forwardRef((t,e)=>{let{alwaysRender:n,...i}=t,r=N.useRef(null),a=im(o=>!o.search);return!n&&!a?null:N.createElement(pm.div,{ref:ws(r,e),...i,"cmdk-separator":"",role:"separator"})}),PYe=N.forwardRef((t,e)=>{let{onValueChange:n,...i}=t,r=t.value!=null,a=h6(),o=im(c=>c.search),s=im(c=>c.selectedItemId),l=Ab();return N.useEffect(()=>{t.value!=null&&a.setState("search",t.value)},[t.value]),N.createElement(pm.input,{ref:e,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:r?t.value:o,onChange:c=>{r||a.setState("search",c.target.value),n?.(c.target.value)}})}),LYe=N.forwardRef((t,e)=>{let{children:n,label:i="Suggestions",...r}=t,a=N.useRef(null),o=N.useRef(null),s=im(c=>c.selectedItemId),l=Ab();return N.useEffect(()=>{if(o.current&&a.current){let c=o.current,d=a.current,f,h=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let m=c.offsetHeight;d.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return h.observe(c),()=>{cancelAnimationFrame(f),h.unobserve(c)}}},[]),N.createElement(pm.div,{ref:ws(a,e),...r,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":i,id:l.listId},FF(t,c=>N.createElement("div",{ref:ws(o,l.listInnerRef),"cmdk-list-sizer":""},c)))}),UYe=N.forwardRef((t,e)=>{let{open:n,onOpenChange:i,overlayClassName:r,contentClassName:a,container:o,...s}=t;return N.createElement(h2,{open:n,onOpenChange:i},N.createElement(p2,{container:o},N.createElement(g2,{"cmdk-overlay":"",className:r}),N.createElement(v2,{"aria-label":t.label,"cmdk-dialog":"",className:a},N.createElement(Zle,{ref:e,...s}))))}),MYe=N.forwardRef((t,e)=>im(n=>n.filtered.count===0)?N.createElement(pm.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),$Ye=N.forwardRef((t,e)=>{let{progress:n,children:i,label:r="Loading...",...a}=t;return N.createElement(pm.div,{ref:e,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r},FF(t,o=>N.createElement("div",{"aria-hidden":!0},o)))}),ip=Object.assign(Zle,{List:LYe,Item:IYe,Input:PYe,Group:OYe,Separator:RYe,Dialog:UYe,Empty:MYe,Loading:$Ye});function jYe(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function QYe(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function Jle(t){let e=N.useRef(t);return Rh(()=>{e.current=t}),e}var Rh=typeof window>"u"?N.useEffect:N.useLayoutEffect;function Rg(t){let e=N.useRef();return e.current===void 0&&(e.current=t()),e}function im(t){let e=h6(),n=()=>t(e.snapshot());return N.useSyncExternalStore(e.subscribe,n,n)}function ece(t,e,n,i=[]){let r=N.useRef(),a=Ab();return Rh(()=>{var o;let s=(()=>{var c;for(let d of n){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(c=d.current.textContent)==null?void 0:c.trim():r.current}})(),l=i.map(c=>c.trim());a.value(t,s,l),(o=e.current)==null||o.setAttribute(Og,s),r.current=s}),r}var HYe=()=>{let[t,e]=N.useState(),n=Rg(()=>new Map);return Rh(()=>{n.current.forEach(i=>i()),n.current=new Map},[t]),(i,r)=>{n.current.set(i,r),e({})}};function zYe(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function FF({asChild:t,children:e},n){return t&&N.isValidElement(e)?N.cloneElement(zYe(e),{ref:e.ref},n(e.props.children)):n(e)}var VYe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function p6({className:t,...e}){return y.jsx(ip,{"data-slot":"command",className:Ut("bg-white text-gray-950 flex h-full w-full flex-col overflow-hidden rounded-md dark:bg-gray-950 dark:text-gray-50",t),...e})}function g6({className:t,...e}){return y.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[y.jsx(ube,{className:"size-4 shrink-0 opacity-50"}),y.jsx(ip.Input,{"data-slot":"command-input",className:Ut("placeholder:text-gray-500 flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-gray-400",t),...e})]})}function v6({className:t,...e}){return y.jsx(ip.List,{"data-slot":"command-list",className:Ut("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...e})}function y6({...t}){return y.jsx(ip.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}function Fx({className:t,...e}){return y.jsx(ip.Group,{"data-slot":"command-group",className:Ut("text-gray-950 [&_[cmdk-group-heading]]:text-gray-500 overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium dark:text-gray-50 dark:[&_[cmdk-group-heading]]:text-gray-400",t),...e})}function GYe({className:t,...e}){return y.jsx(ip.Separator,{"data-slot":"command-separator",className:Ut("bg-gray-200 -mx-1 h-px dark:bg-gray-800",t),...e})}function zg({className:t,...e}){return y.jsx(ip.Item,{"data-slot":"command-item",className:Ut("data-[selected=true]:bg-gray-100 data-[selected=true]:text-gray-900 [&_svg:not([class*='text-'])]:text-gray-500 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:data-[selected=true]:bg-gray-800 dark:data-[selected=true]:text-gray-50 dark:[&_svg:not([class*='text-'])]:text-gray-400",t),...e})}function qYe(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const tce=se.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}),mb=()=>{const t=se.useContext(tce);if(!t)throw new Error("useDrawerContext must be used within a Drawer.Root");return t};qYe(`[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(
|
|
173
|
+
`)}return""+n},e})();const SVe="updateDocument",cb=()=>{const[{fetching:t},e]=bs(vCe),n=N.useCallback(async i=>{const r=`Error updating document ID [${i.documentId}]`,a=`${SVe}-${i.documentId}`;fn.loading("Updating document",{id:a});try{const o=await e(i),s=Ss(o,r,a,"updateDocument");if(s)return fn.success("Success",{id:a,description:"Document updated"}),s.updateDocument}catch(o){console.error(`${r}: ${o}`),fn.error("Error",{id:a,description:r,duration:1e5,closeButton:!0})}},[e]);return{fetching:t,updateDocument:n}};function wVe({documentId:t}){const{updateDocument:e}=cb();function n(){e({documentId:t,fields:{chargeId:rZ}})}return y.jsx(BF,{onConfirm:n,title:"Are you sure you want to unlink this document from the charge?",children:y.jsx(Qt,{variant:"ghost",size:"icon",className:"size-7.5",children:y.jsx(_be,{className:"size-5"})})})}function NVe(t){const e=CVe(t),n=N.forwardRef((i,r)=>{const{children:a,...o}=i,s=N.Children.toArray(a),l=s.find(FVe);if(l){const c=l.props.children,d=s.map(f=>f===l?N.Children.count(c)>1?N.Children.only(null):N.isValidElement(c)?c.props.children:null:f);return y.jsx(e,{...o,ref:r,children:N.isValidElement(c)?N.cloneElement(c,void 0,d):null})}return y.jsx(e,{...o,ref:r,children:a})});return n.displayName=`${t}.Slot`,n}function CVe(t){const e=N.forwardRef((n,i)=>{const{children:r,...a}=n;if(N.isValidElement(r)){const o=EVe(r),s=_Ve(a,r.props);return r.type!==N.Fragment&&(s.ref=i?ws(i,o):o),N.cloneElement(r,s)}return N.Children.count(r)>1?N.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var xVe=Symbol("radix.slottable");function FVe(t){return N.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===xVe}function _Ve(t,e){const n={...e};for(const i in e){const r=t[i],a=e[i];/^on[A-Z]/.test(i)?r&&a?n[i]=(...s)=>{const l=a(...s);return r(...s),l}:r&&(n[i]=r):i==="style"?n[i]={...r,...a}:i==="className"&&(n[i]=[r,a].filter(Boolean).join(" "))}return{...t,...n}}function EVe(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function ZP(t){const e=N.useRef({value:t,previous:t});return N.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var BVe=[" ","Enter","ArrowUp","ArrowDown"],TVe=[" ","Enter"],Ih="Select",[pF,gF,DVe]=OR(Ih),[e0]=rl(Ih,[DVe,um]),vF=um(),[IVe,mm]=e0(Ih),[OVe,RVe]=e0(Ih),Roe=t=>{const{__scopeSelect:e,children:n,open:i,defaultOpen:r,onOpenChange:a,value:o,defaultValue:s,onValueChange:l,dir:c,name:d,autoComplete:f,disabled:h,required:m,form:p}=t,g=vF(e),[b,k]=N.useState(null),[S,C]=N.useState(null),[x,F]=N.useState(!1),T=Hk(c),[E,I]=md({prop:i,defaultProp:r??!1,onChange:a,caller:Ih}),[R,V]=md({prop:o,defaultProp:s,onChange:l,caller:Ih}),U=N.useRef(null),P=b?p||!!b.closest("form"):!0,[Z,q]=N.useState(new Set),ae=Array.from(Z).map(H=>H.props.value).join(";");return y.jsx(F2,{...g,children:y.jsxs(IVe,{required:m,scope:e,trigger:b,onTriggerChange:k,valueNode:S,onValueNodeChange:C,valueNodeHasChildren:x,onValueNodeHasChildrenChange:F,contentId:ro(),value:R,onValueChange:V,open:E,onOpenChange:I,dir:T,triggerPointerDownPosRef:U,disabled:h,children:[y.jsx(pF.Provider,{scope:e,children:y.jsx(OVe,{scope:t.__scopeSelect,onNativeOptionAdd:N.useCallback(H=>{q(te=>new Set(te).add(H))},[]),onNativeOptionRemove:N.useCallback(H=>{q(te=>{const Y=new Set(te);return Y.delete(H),Y})},[]),children:n})}),P?y.jsxs(ise,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:R,onChange:H=>V(H.target.value),disabled:h,form:p,children:[R===void 0?y.jsx("option",{value:""}):null,Array.from(Z)]},ae):null]})})};Roe.displayName=Ih;var Poe="SelectTrigger",Loe=N.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:i=!1,...r}=t,a=vF(n),o=mm(Poe,n),s=o.disabled||i,l=Jn(e,o.onTriggerChange),c=gF(n),d=N.useRef("touch"),[f,h,m]=ase(g=>{const b=c().filter(C=>!C.disabled),k=b.find(C=>C.value===o.value),S=ose(b,g,k);S!==void 0&&o.onValueChange(S.value)}),p=g=>{s||(o.onOpenChange(!0),m()),g&&(o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return y.jsx(Vk,{asChild:!0,...a,children:y.jsx(Cn.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":rse(o.value)?"":void 0,...r,ref:l,onClick:Ht(r.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&p(g)}),onPointerDown:Ht(r.onPointerDown,g=>{d.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(p(g),g.preventDefault())}),onKeyDown:Ht(r.onKeyDown,g=>{const b=f.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(b&&g.key===" ")&&BVe.includes(g.key)&&(p(),g.preventDefault())})})})});Loe.displayName=Poe;var Uoe="SelectValue",Moe=N.forwardRef((t,e)=>{const{__scopeSelect:n,className:i,style:r,children:a,placeholder:o="",...s}=t,l=mm(Uoe,n),{onValueNodeHasChildrenChange:c}=l,d=a!==void 0,f=Jn(e,l.onValueNodeChange);return xa(()=>{c(d)},[c,d]),y.jsx(Cn.span,{...s,ref:f,style:{pointerEvents:"none"},children:rse(l.value)?y.jsx(y.Fragment,{children:o}):a})});Moe.displayName=Uoe;var PVe="SelectIcon",$oe=N.forwardRef((t,e)=>{const{__scopeSelect:n,children:i,...r}=t;return y.jsx(Cn.span,{"aria-hidden":!0,...r,ref:e,children:i||"▼"})});$oe.displayName=PVe;var LVe="SelectPortal",joe=t=>y.jsx(Vv,{asChild:!0,...t});joe.displayName=LVe;var Oh="SelectContent",Qoe=N.forwardRef((t,e)=>{const n=mm(Oh,t.__scopeSelect),[i,r]=N.useState();if(xa(()=>{r(new DocumentFragment)},[]),!n.open){const a=i;return a?Uf.createPortal(y.jsx(Hoe,{scope:t.__scopeSelect,children:y.jsx(pF.Slot,{scope:t.__scopeSelect,children:y.jsx("div",{children:t.children})})}),a):null}return y.jsx(zoe,{...t,ref:e})});Qoe.displayName=Oh;var Jc=10,[Hoe,hm]=e0(Oh),UVe="SelectContentImpl",MVe=NVe("SelectContent.RemoveScroll"),zoe=N.forwardRef((t,e)=>{const{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:p,hideWhenDetached:g,avoidCollisions:b,...k}=t,S=mm(Oh,n),[C,x]=N.useState(null),[F,T]=N.useState(null),E=Jn(e,K=>x(K)),[I,R]=N.useState(null),[V,U]=N.useState(null),P=gF(n),[Z,q]=N.useState(!1),ae=N.useRef(!1);N.useEffect(()=>{if(C)return A2(C)},[C]),u2();const H=N.useCallback(K=>{const[fe,...ge]=P().map(le=>le.ref.current),[Se]=ge.slice(-1),oe=document.activeElement;for(const le of K)if(le===oe||(le?.scrollIntoView({block:"nearest"}),le===fe&&F&&(F.scrollTop=0),le===Se&&F&&(F.scrollTop=F.scrollHeight),le?.focus(),document.activeElement!==oe))return},[P,F]),te=N.useCallback(()=>H([I,C]),[H,I,C]);N.useEffect(()=>{Z&&te()},[Z,te]);const{onOpenChange:Y,triggerPointerDownPosRef:ue}=S;N.useEffect(()=>{if(C){let K={x:0,y:0};const fe=Se=>{K={x:Math.abs(Math.round(Se.pageX)-(ue.current?.x??0)),y:Math.abs(Math.round(Se.pageY)-(ue.current?.y??0))}},ge=Se=>{K.x<=10&&K.y<=10?Se.preventDefault():C.contains(Se.target)||Y(!1),document.removeEventListener("pointermove",fe),ue.current=null};return ue.current!==null&&(document.addEventListener("pointermove",fe),document.addEventListener("pointerup",ge,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",fe),document.removeEventListener("pointerup",ge,{capture:!0})}}},[C,Y,ue]),N.useEffect(()=>{const K=()=>Y(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[Y]);const[we,ie]=ase(K=>{const fe=P().filter(oe=>!oe.disabled),ge=fe.find(oe=>oe.ref.current===document.activeElement),Se=ose(fe,K,ge);Se&&setTimeout(()=>Se.ref.current.focus())}),L=N.useCallback((K,fe,ge)=>{const Se=!ae.current&&!ge;(S.value!==void 0&&S.value===fe||Se)&&(R(K),Se&&(ae.current=!0))},[S.value]),j=N.useCallback(()=>C?.focus(),[C]),$=N.useCallback((K,fe,ge)=>{const Se=!ae.current&&!ge;(S.value!==void 0&&S.value===fe||Se)&&U(K)},[S.value]),W=i==="popper"?XI:Voe,J=W===XI?{side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:p,hideWhenDetached:g,avoidCollisions:b}:{};return y.jsx(Hoe,{scope:n,content:C,viewport:F,onViewportChange:T,itemRefCallback:L,selectedItem:I,onItemLeave:j,itemTextRefCallback:$,focusSelectedItem:te,selectedItemText:V,position:i,isPositioned:Z,searchRef:we,children:y.jsx(Gv,{as:MVe,allowPinchZoom:!0,children:y.jsx(Qk,{asChild:!0,trapped:S.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:Ht(r,K=>{S.trigger?.focus({preventScroll:!0}),K.preventDefault()}),children:y.jsx(zv,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>S.onOpenChange(!1),children:y.jsx(W,{role:"listbox",id:S.contentId,"data-state":S.open?"open":"closed",dir:S.dir,onContextMenu:K=>K.preventDefault(),...k,...J,onPlaced:()=>q(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...k.style},onKeyDown:Ht(k.onKeyDown,K=>{const fe=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!fe&&K.key.length===1&&ie(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let Se=P().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(K.key)&&(Se=Se.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const oe=K.target,le=Se.indexOf(oe);Se=Se.slice(le+1)}setTimeout(()=>H(Se)),K.preventDefault()}})})})})})})});zoe.displayName=UVe;var $Ve="SelectItemAlignedPosition",Voe=N.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:i,...r}=t,a=mm(Oh,n),o=hm(Oh,n),[s,l]=N.useState(null),[c,d]=N.useState(null),f=Jn(e,E=>d(E)),h=gF(n),m=N.useRef(!1),p=N.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:k,focusSelectedItem:S}=o,C=N.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&c&&g&&b&&k){const E=a.trigger.getBoundingClientRect(),I=c.getBoundingClientRect(),R=a.valueNode.getBoundingClientRect(),V=k.getBoundingClientRect();if(a.dir!=="rtl"){const oe=V.left-I.left,le=R.left-oe,Ee=E.left-le,Le=E.width+Ee,ve=Math.max(Le,I.width),Ae=window.innerWidth-Jc,Q=X4(le,[Jc,Math.max(Jc,Ae-ve)]);s.style.minWidth=Le+"px",s.style.left=Q+"px"}else{const oe=I.right-V.right,le=window.innerWidth-R.right-oe,Ee=window.innerWidth-E.right-le,Le=E.width+Ee,ve=Math.max(Le,I.width),Ae=window.innerWidth-Jc,Q=X4(le,[Jc,Math.max(Jc,Ae-ve)]);s.style.minWidth=Le+"px",s.style.right=Q+"px"}const U=h(),P=window.innerHeight-Jc*2,Z=g.scrollHeight,q=window.getComputedStyle(c),ae=parseInt(q.borderTopWidth,10),H=parseInt(q.paddingTop,10),te=parseInt(q.borderBottomWidth,10),Y=parseInt(q.paddingBottom,10),ue=ae+H+Z+Y+te,we=Math.min(b.offsetHeight*5,ue),ie=window.getComputedStyle(g),L=parseInt(ie.paddingTop,10),j=parseInt(ie.paddingBottom,10),$=E.top+E.height/2-Jc,W=P-$,J=b.offsetHeight/2,K=b.offsetTop+J,fe=ae+H+K,ge=ue-fe;if(fe<=$){const oe=U.length>0&&b===U[U.length-1].ref.current;s.style.bottom="0px";const le=c.clientHeight-g.offsetTop-g.offsetHeight,Ee=Math.max(W,J+(oe?j:0)+le+te),Le=fe+Ee;s.style.height=Le+"px"}else{const oe=U.length>0&&b===U[0].ref.current;s.style.top="0px";const Ee=Math.max($,ae+g.offsetTop+(oe?L:0)+J)+ge;s.style.height=Ee+"px",g.scrollTop=fe-$+g.offsetTop}s.style.margin=`${Jc}px 0`,s.style.minHeight=we+"px",s.style.maxHeight=P+"px",i?.(),requestAnimationFrame(()=>m.current=!0)}},[h,a.trigger,a.valueNode,s,c,g,b,k,a.dir,i]);xa(()=>C(),[C]);const[x,F]=N.useState();xa(()=>{c&&F(window.getComputedStyle(c).zIndex)},[c]);const T=N.useCallback(E=>{E&&p.current===!0&&(C(),S?.(),p.current=!1)},[C,S]);return y.jsx(QVe,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:T,children:y.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:y.jsx(Cn.div,{...r,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Voe.displayName=$Ve;var jVe="SelectPopperPosition",XI=N.forwardRef((t,e)=>{const{__scopeSelect:n,align:i="start",collisionPadding:r=Jc,...a}=t,o=vF(n);return y.jsx(_2,{...o,...a,ref:e,align:i,collisionPadding:r,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});XI.displayName=jVe;var[QVe,JP]=e0(Oh,{}),ZI="SelectViewport",Goe=N.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:i,...r}=t,a=hm(ZI,n),o=JP(ZI,n),s=Jn(e,a.onViewportChange),l=N.useRef(0);return y.jsxs(y.Fragment,{children:[y.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),y.jsx(pF.Slot,{scope:n,children:y.jsx(Cn.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:Ht(r.onScroll,c=>{const d=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=o;if(h?.current&&f){const m=Math.abs(l.current-d.scrollTop);if(m>0){const p=window.innerHeight-Jc*2,g=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),k=Math.max(g,b);if(k<p){const S=k+m,C=Math.min(p,S),x=S-C;f.style.height=C+"px",f.style.bottom==="0px"&&(d.scrollTop=x>0?x:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});Goe.displayName=ZI;var qoe="SelectGroup",[HVe,zVe]=e0(qoe),VVe=N.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,r=ro();return y.jsx(HVe,{scope:n,id:r,children:y.jsx(Cn.div,{role:"group","aria-labelledby":r,...i,ref:e})})});VVe.displayName=qoe;var Koe="SelectLabel",GVe=N.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,r=zVe(Koe,n);return y.jsx(Cn.div,{id:r.id,...i,ref:e})});GVe.displayName=Koe;var tx="SelectItem",[qVe,Woe]=e0(tx),Yoe=N.forwardRef((t,e)=>{const{__scopeSelect:n,value:i,disabled:r=!1,textValue:a,...o}=t,s=mm(tx,n),l=hm(tx,n),c=s.value===i,[d,f]=N.useState(a??""),[h,m]=N.useState(!1),p=Jn(e,S=>l.itemRefCallback?.(S,i,r)),g=ro(),b=N.useRef("touch"),k=()=>{r||(s.onValueChange(i),s.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return y.jsx(qVe,{scope:n,value:i,disabled:r,textId:g,isSelected:c,onItemTextChange:N.useCallback(S=>{f(C=>C||(S?.textContent??"").trim())},[]),children:y.jsx(pF.ItemSlot,{scope:n,value:i,disabled:r,textValue:d,children:y.jsx(Cn.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...o,ref:p,onFocus:Ht(o.onFocus,()=>m(!0)),onBlur:Ht(o.onBlur,()=>m(!1)),onClick:Ht(o.onClick,()=>{b.current!=="mouse"&&k()}),onPointerUp:Ht(o.onPointerUp,()=>{b.current==="mouse"&&k()}),onPointerDown:Ht(o.onPointerDown,S=>{b.current=S.pointerType}),onPointerMove:Ht(o.onPointerMove,S=>{b.current=S.pointerType,r?l.onItemLeave?.():b.current==="mouse"&&S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ht(o.onPointerLeave,S=>{S.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:Ht(o.onKeyDown,S=>{l.searchRef?.current!==""&&S.key===" "||(TVe.includes(S.key)&&k(),S.key===" "&&S.preventDefault())})})})})});Yoe.displayName=tx;var Iy="SelectItemText",Xoe=N.forwardRef((t,e)=>{const{__scopeSelect:n,className:i,style:r,...a}=t,o=mm(Iy,n),s=hm(Iy,n),l=Woe(Iy,n),c=RVe(Iy,n),[d,f]=N.useState(null),h=Jn(e,k=>f(k),l.onItemTextChange,k=>s.itemTextRefCallback?.(k,l.value,l.disabled)),m=d?.textContent,p=N.useMemo(()=>y.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=c;return xa(()=>(g(p),()=>b(p)),[g,b,p]),y.jsxs(y.Fragment,{children:[y.jsx(Cn.span,{id:l.textId,...a,ref:h}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Uf.createPortal(a.children,o.valueNode):null]})});Xoe.displayName=Iy;var Zoe="SelectItemIndicator",Joe=N.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t;return Woe(Zoe,n).isSelected?y.jsx(Cn.span,{"aria-hidden":!0,...i,ref:e}):null});Joe.displayName=Zoe;var JI="SelectScrollUpButton",ese=N.forwardRef((t,e)=>{const n=hm(JI,t.__scopeSelect),i=JP(JI,t.__scopeSelect),[r,a]=N.useState(!1),o=Jn(e,i.onScrollButtonChange);return xa(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollTop>0;a(c)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),r?y.jsx(nse,{...t,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});ese.displayName=JI;var eO="SelectScrollDownButton",tse=N.forwardRef((t,e)=>{const n=hm(eO,t.__scopeSelect),i=JP(eO,t.__scopeSelect),[r,a]=N.useState(!1),o=Jn(e,i.onScrollButtonChange);return xa(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;a(d)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),r?y.jsx(nse,{...t,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});tse.displayName=eO;var nse=N.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:i,...r}=t,a=hm("SelectScrollButton",n),o=N.useRef(null),s=gF(n),l=N.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return N.useEffect(()=>()=>l(),[l]),xa(()=>{s().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),y.jsx(Cn.div,{"aria-hidden":!0,...r,ref:e,style:{flexShrink:0,...r.style},onPointerDown:Ht(r.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(i,50))}),onPointerMove:Ht(r.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(i,50))}),onPointerLeave:Ht(r.onPointerLeave,()=>{l()})})}),KVe="SelectSeparator",WVe=N.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t;return y.jsx(Cn.div,{"aria-hidden":!0,...i,ref:e})});WVe.displayName=KVe;var tO="SelectArrow",YVe=N.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,r=vF(n),a=mm(tO,n),o=hm(tO,n);return a.open&&o.position==="popper"?y.jsx(E2,{...r,...i,ref:e}):null});YVe.displayName=tO;var XVe="SelectBubbleInput",ise=N.forwardRef(({__scopeSelect:t,value:e,...n},i)=>{const r=N.useRef(null),a=Jn(i,r),o=ZP(e);return N.useEffect(()=>{const s=r.current;if(!s)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&d){const f=new Event("change",{bubbles:!0});d.call(s,e),s.dispatchEvent(f)}},[o,e]),y.jsx(Cn.select,{...n,style:{...kee,...n.style},ref:a,defaultValue:e})});ise.displayName=XVe;function rse(t){return t===""||t===void 0}function ase(t){const e=ko(t),n=N.useRef(""),i=N.useRef(0),r=N.useCallback(o=>{const s=n.current+o;e(s),(function l(c){n.current=c,window.clearTimeout(i.current),c!==""&&(i.current=window.setTimeout(()=>l(""),1e3))})(s)},[e]),a=N.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,r,a]}function ose(t,e,n){const r=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,a=n?t.indexOf(n):-1;let o=ZVe(t,Math.max(a,0));r.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function ZVe(t,e){return t.map((n,i)=>t[(e+i)%t.length])}var JVe=Roe,eGe=Loe,tGe=Moe,nGe=$oe,iGe=joe,rGe=Qoe,aGe=Goe,oGe=Yoe,sGe=Xoe,lGe=Joe,cGe=ese,dGe=tse;function Po({...t}){return y.jsx(JVe,{"data-slot":"select",...t})}function Lo({...t}){return y.jsx(tGe,{"data-slot":"select-value",...t})}function Uo({className:t,size:e="default",children:n,...i}){return y.jsxs(eGe,{"data-slot":"select-trigger","data-size":e,className:Ut("border-gray-200 data-[placeholder]:text-gray-500 [&_svg:not([class*='text-'])]:text-gray-500 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:bg-gray-200/30 dark:hover:bg-gray-200/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:border-gray-800 dark:data-[placeholder]:text-gray-400 dark:[&_svg:not([class*='text-'])]:text-gray-400 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900 dark:dark:bg-gray-800/30 dark:dark:hover:bg-gray-800/50",t),...i,children:[n,y.jsx(nGe,{asChild:!0,children:y.jsx(ps,{className:"size-4 opacity-50"})})]})}function Mo({className:t,children:e,position:n="popper",...i}){return y.jsx(iGe,{children:y.jsxs(rGe,{"data-slot":"select-content",className:Ut("bg-white text-gray-950 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-1001 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-gray-200 shadow-md dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:n,...i,children:[y.jsx(uGe,{}),y.jsx(aGe,{className:Ut("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:e}),y.jsx(fGe,{})]})})}function yo({className:t,children:e,...n}){return y.jsxs(oGe,{"data-slot":"select-item",className:Ut("focus:bg-gray-100 focus:text-gray-900 [&_svg:not([class*='text-'])]:text-gray-500 relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 dark:focus:bg-gray-800 dark:focus:text-gray-50 dark:[&_svg:not([class*='text-'])]:text-gray-400",t),...n,children:[y.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:y.jsx(lGe,{children:y.jsx(Sh,{className:"size-4"})})}),y.jsx(sGe,{children:e})]})}function uGe({className:t,...e}){return y.jsx(cGe,{"data-slot":"select-scroll-up-button",className:Ut("flex cursor-default items-center justify-center py-1",t),...e,children:y.jsx(iu,{className:"size-4"})})}function fGe({className:t,...e}){return y.jsx(dGe,{"data-slot":"select-scroll-down-button",className:Ut("flex cursor-default items-center justify-center py-1",t),...e,children:y.jsx(ps,{className:"size-4"})})}var db=t=>t.type==="checkbox",ch=t=>t instanceof Date,Xs=t=>t==null;const sse=t=>typeof t=="object";var Ma=t=>!Xs(t)&&!Array.isArray(t)&&sse(t)&&!ch(t),lse=t=>Ma(t)&&t.target?db(t.target)?t.target.checked:t.target.value:t,AGe=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,cse=(t,e)=>t.has(AGe(e)),mGe=t=>{const e=t.constructor&&t.constructor.prototype;return Ma(e)&&e.hasOwnProperty("isPrototypeOf")},e6=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Br(t){let e;const n=Array.isArray(t),i=typeof FileList<"u"?t instanceof FileList:!1;if(t instanceof Date)e=new Date(t);else if(!(e6&&(t instanceof Blob||i))&&(n||Ma(t)))if(e=n?[]:Object.create(Object.getPrototypeOf(t)),!n&&!mGe(t))e=t;else for(const r in t)t.hasOwnProperty(r)&&(e[r]=Br(t[r]));else return t;return e}var yF=t=>/^\w*$/.test(t),wr=t=>t===void 0,kF=t=>Array.isArray(t)?t.filter(Boolean):[],t6=t=>kF(t.replace(/["|']|\]/g,"").split(/\.|\[/)),jt=(t,e,n)=>{if(!e||!Ma(t))return n;const i=(yF(e)?[e]:t6(e)).reduce((r,a)=>Xs(r)?r:r[a],t);return wr(i)||i===t?wr(t[e])?n:t[e]:i},Sl=t=>typeof t=="boolean",Ki=(t,e,n)=>{let i=-1;const r=yF(e)?[e]:t6(e),a=r.length,o=a-1;for(;++i<a;){const s=r[i];let l=n;if(i!==o){const c=t[s];l=Ma(c)||Array.isArray(c)?c:isNaN(+r[i+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;t[s]=l,t=t[s]}};const nx={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},lc={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},pf={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},n6=se.createContext(null);n6.displayName="HookFormContext";const ub=()=>se.useContext(n6),hGe=t=>{const{children:e,...n}=t;return se.createElement(n6.Provider,{value:n},e)};var dse=(t,e,n,i=!0)=>{const r={defaultValues:e._defaultValues};for(const a in t)Object.defineProperty(r,a,{get:()=>{const o=a;return e._proxyFormState[o]!==lc.all&&(e._proxyFormState[o]=!i||lc.all),n&&(n[o]=!0),t[o]}});return r};const bF=typeof window<"u"?se.useLayoutEffect:se.useEffect;function use(t){const e=ub(),{control:n=e.control,disabled:i,name:r,exact:a}=t||{},[o,s]=se.useState(n._formState),l=se.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return bF(()=>n._subscribe({name:r,formState:l.current,exact:a,callback:c=>{!i&&s({...n._formState,...c})}}),[r,i,a]),se.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),se.useMemo(()=>dse(o,n,l.current,!1),[o,n])}var Nl=t=>typeof t=="string",nO=(t,e,n,i,r)=>Nl(t)?(i&&e.watch.add(t),jt(n,t,r)):Array.isArray(t)?t.map(a=>(i&&e.watch.add(a),jt(n,a))):(i&&(e.watchAll=!0),n),iO=t=>Xs(t)||!sse(t);function rd(t,e,n=new WeakSet){if(iO(t)||iO(e))return Object.is(t,e);if(ch(t)&&ch(e))return t.getTime()===e.getTime();const i=Object.keys(t),r=Object.keys(e);if(i.length!==r.length)return!1;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);for(const a of i){const o=t[a];if(!r.includes(a))return!1;if(a!=="ref"){const s=e[a];if(ch(o)&&ch(s)||Ma(o)&&Ma(s)||Array.isArray(o)&&Array.isArray(s)?!rd(o,s,n):!Object.is(o,s))return!1}}return!0}function pGe(t){const e=ub(),{control:n=e.control,name:i,defaultValue:r,disabled:a,exact:o,compute:s}=t||{},l=se.useRef(r),c=se.useRef(s),d=se.useRef(void 0),f=se.useRef(n),h=se.useRef(i);c.current=s;const[m,p]=se.useState(()=>{const x=n._getWatch(i,l.current);return c.current?c.current(x):x}),g=se.useCallback(x=>{const F=nO(i,n._names,x||n._formValues,!1,l.current);return c.current?c.current(F):F},[n._formValues,n._names,i]),b=se.useCallback(x=>{if(!a){const F=nO(i,n._names,x||n._formValues,!1,l.current);if(c.current){const T=c.current(F);rd(T,d.current)||(p(T),d.current=T)}else p(F)}},[n._formValues,n._names,a,i]);bF(()=>((f.current!==n||!rd(h.current,i))&&(f.current=n,h.current=i,b()),n._subscribe({name:i,formState:{values:!0},exact:o,callback:x=>{b(x.values)}})),[n,o,i,b]),se.useEffect(()=>n._removeUnmounted());const k=f.current!==n,S=h.current,C=se.useMemo(()=>{if(a)return null;const x=!k&&!rd(S,i);return k||x?g():null},[a,k,i,S,g]);return C!==null?C:m}function gGe(t){const e=ub(),{name:n,disabled:i,control:r=e.control,shouldUnregister:a,defaultValue:o,exact:s=!0}=t,l=cse(r._names.array,n),c=se.useMemo(()=>jt(r._formValues,n,jt(r._defaultValues,n,o)),[r,n,o]),d=pGe({control:r,name:n,defaultValue:c,exact:s}),f=use({control:r,name:n,exact:s}),h=se.useRef(t),m=se.useRef(void 0),p=se.useRef(r.register(n,{...t.rules,value:d,...Sl(t.disabled)?{disabled:t.disabled}:{}}));h.current=t;const g=se.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!jt(f.errors,n)},isDirty:{enumerable:!0,get:()=>!!jt(f.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!jt(f.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!jt(f.validatingFields,n)},error:{enumerable:!0,get:()=>jt(f.errors,n)}}),[f,n]),b=se.useCallback(x=>p.current.onChange({target:{value:lse(x),name:n},type:nx.CHANGE}),[n]),k=se.useCallback(()=>p.current.onBlur({target:{value:jt(r._formValues,n),name:n},type:nx.BLUR}),[n,r._formValues]),S=se.useCallback(x=>{const F=jt(r._fields,n);F&&x&&(F._f.ref={focus:()=>x.focus&&x.focus(),select:()=>x.select&&x.select(),setCustomValidity:T=>x.setCustomValidity(T),reportValidity:()=>x.reportValidity()})},[r._fields,n]),C=se.useMemo(()=>({name:n,value:d,...Sl(i)||f.disabled?{disabled:f.disabled||i}:{},onChange:b,onBlur:k,ref:S}),[n,i,f.disabled,b,k,S,d]);return se.useEffect(()=>{const x=r._options.shouldUnregister||a,F=m.current;F&&F!==n&&!l&&r.unregister(F),r.register(n,{...h.current.rules,...Sl(h.current.disabled)?{disabled:h.current.disabled}:{}});const T=(E,I)=>{const R=jt(r._fields,E);R&&R._f&&(R._f.mount=I)};if(T(n,!0),x){const E=Br(jt(r._options.defaultValues,n,h.current.defaultValue));Ki(r._defaultValues,n,E),wr(jt(r._formValues,n))&&Ki(r._formValues,n,E)}return!l&&r.register(n),m.current=n,()=>{(l?x&&!r._state.action:x)?r.unregister(n):T(n,!1)}},[n,r,l,a]),se.useEffect(()=>{r._setDisabledField({disabled:i,name:n})},[i,n,r]),se.useMemo(()=>({field:C,formState:f,fieldState:g}),[C,f,g])}const ed=t=>t.render(gGe(t));var i6=(t,e,n,i,r)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[i]:r||!0}}:{},tl=t=>Array.isArray(t)?t:[t],pq=()=>{let t=[];return{get observers(){return t},next:r=>{for(const a of t)a.next&&a.next(r)},subscribe:r=>(t.push(r),{unsubscribe:()=>{t=t.filter(a=>a!==r)}}),unsubscribe:()=>{t=[]}}};function fse(t,e){const n={};for(const i in t)if(t.hasOwnProperty(i)){const r=t[i],a=e[i];if(r&&Ma(r)&&a){const o=fse(r,a);Ma(o)&&(n[i]=o)}else t[i]&&(n[i]=a)}return n}var ns=t=>Ma(t)&&!Object.keys(t).length,r6=t=>t.type==="file",ad=t=>typeof t=="function",ix=t=>{if(!e6)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},Ase=t=>t.type==="select-multiple",a6=t=>t.type==="radio",vGe=t=>a6(t)||db(t),TD=t=>ix(t)&&t.isConnected;function yGe(t,e){const n=e.slice(0,-1).length;let i=0;for(;i<n;)t=wr(t)?i++:t[e[i++]];return t}function kGe(t){for(const e in t)if(t.hasOwnProperty(e)&&!wr(t[e]))return!1;return!0}function ka(t,e){const n=Array.isArray(e)?e:yF(e)?[e]:t6(e),i=n.length===1?t:yGe(t,n),r=n.length-1,a=n[r];return i&&delete i[a],r!==0&&(Ma(i)&&ns(i)||Array.isArray(i)&&kGe(i))&&ka(t,n.slice(0,-1)),t}var bGe=t=>{for(const e in t)if(ad(t[e]))return!0;return!1};function mse(t){return Array.isArray(t)||Ma(t)&&!bGe(t)}function rO(t,e={}){for(const n in t){const i=t[n];mse(i)?(e[n]=Array.isArray(i)?[]:{},rO(i,e[n])):wr(i)||(e[n]=!0)}return e}function Ig(t,e,n){n||(n=rO(e));for(const i in t){const r=t[i];if(mse(r))wr(e)||iO(n[i])?n[i]=rO(r,Array.isArray(r)?[]:{}):Ig(r,Xs(e)?{}:e[i],n[i]);else{const a=e[i];n[i]=!rd(r,a)}}return n}const gq={value:!1,isValid:!1},vq={value:!0,isValid:!0};var hse=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!wr(t[0].attributes.value)?wr(t[0].value)||t[0].value===""?vq:{value:t[0].value,isValid:!0}:vq:gq}return gq},pse=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:i})=>wr(t)?t:e?t===""?NaN:t&&+t:n&&Nl(t)?new Date(t):i?i(t):t;const yq={isValid:!1,value:null};var gse=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,yq):yq;function kq(t){const e=t.ref;return r6(e)?e.files:a6(e)?gse(t.refs).value:Ase(e)?[...e.selectedOptions].map(({value:n})=>n):db(e)?hse(t.refs).value:pse(wr(e.value)?t.ref.value:e.value,t)}var SGe=(t,e,n,i)=>{const r={};for(const a of t){const o=jt(e,a);o&&Ki(r,a,o._f)}return{criteriaMode:n,names:[...t],fields:r,shouldUseNativeValidation:i}},rx=t=>t instanceof RegExp,dy=t=>wr(t)?t:rx(t)?t.source:Ma(t)?rx(t.value)?t.value.source:t.value:t,Hg=t=>({isOnSubmit:!t||t===lc.onSubmit,isOnBlur:t===lc.onBlur,isOnChange:t===lc.onChange,isOnAll:t===lc.all,isOnTouch:t===lc.onTouched});const bq="AsyncFunction";var wGe=t=>!!t&&!!t.validate&&!!(ad(t.validate)&&t.validate.constructor.name===bq||Ma(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===bq)),NGe=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),aO=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(i=>t.startsWith(i)&&/^\.\w+/.test(t.slice(i.length))));const sv=(t,e,n,i)=>{for(const r of n||Object.keys(t)){const a=jt(t,r);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],r)&&!i)return!0;if(o.ref&&e(o.ref,o.name)&&!i)return!0;if(sv(s,e))break}else if(Ma(s)&&sv(s,e))break}}};function Sq(t,e,n){const i=jt(t,n);if(i||yF(n))return{error:i,name:n};const r=n.split(".");for(;r.length;){const a=r.join("."),o=jt(e,a),s=jt(t,a);if(o&&!Array.isArray(o)&&n!==a)return{name:n};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};r.pop()}return{name:n}}var CGe=(t,e,n,i)=>{n(t);const{name:r,...a}=t;return ns(a)||Object.keys(a).length>=Object.keys(e).length||Object.keys(a).find(o=>e[o]===(!i||lc.all))},xGe=(t,e,n)=>!t||!e||t===e||tl(t).some(i=>i&&(n?i===e:i.startsWith(e)||e.startsWith(i))),FGe=(t,e,n,i,r)=>r.isOnAll?!1:!n&&r.isOnTouch?!(e||t):(n?i.isOnBlur:r.isOnBlur)?!t:(n?i.isOnChange:r.isOnChange)?t:!0,_Ge=(t,e)=>!kF(jt(t,e)).length&&ka(t,e),vse=(t,e,n)=>{const i=tl(jt(t,n));return Ki(i,"root",e[n]),Ki(t,n,i),t};function wq(t,e,n="validate"){if(Nl(t)||Array.isArray(t)&&t.every(Nl)||Sl(t)&&!t)return{type:n,message:Nl(t)?t:"",ref:e}}var gg=t=>Ma(t)&&!rx(t)?t:{value:t,message:""},oO=async(t,e,n,i,r,a)=>{const{ref:o,refs:s,required:l,maxLength:c,minLength:d,min:f,max:h,pattern:m,validate:p,name:g,valueAsNumber:b,mount:k}=t._f,S=jt(n,g);if(!k||e.has(g))return{};const C=s?s[0]:o,x=P=>{r&&C.reportValidity&&(C.setCustomValidity(Sl(P)?"":P||""),C.reportValidity())},F={},T=a6(o),E=db(o),I=T||E,R=(b||r6(o))&&wr(o.value)&&wr(S)||ix(o)&&o.value===""||S===""||Array.isArray(S)&&!S.length,V=i6.bind(null,g,i,F),U=(P,Z,q,ae=pf.maxLength,H=pf.minLength)=>{const te=P?Z:q;F[g]={type:P?ae:H,message:te,ref:o,...V(P?ae:H,te)}};if(a?!Array.isArray(S)||!S.length:l&&(!I&&(R||Xs(S))||Sl(S)&&!S||E&&!hse(s).isValid||T&&!gse(s).isValid)){const{value:P,message:Z}=Nl(l)?{value:!!l,message:l}:gg(l);if(P&&(F[g]={type:pf.required,message:Z,ref:C,...V(pf.required,Z)},!i))return x(Z),F}if(!R&&(!Xs(f)||!Xs(h))){let P,Z;const q=gg(h),ae=gg(f);if(!Xs(S)&&!isNaN(S)){const H=o.valueAsNumber||S&&+S;Xs(q.value)||(P=H>q.value),Xs(ae.value)||(Z=H<ae.value)}else{const H=o.valueAsDate||new Date(S),te=we=>new Date(new Date().toDateString()+" "+we),Y=o.type=="time",ue=o.type=="week";Nl(q.value)&&S&&(P=Y?te(S)>te(q.value):ue?S>q.value:H>new Date(q.value)),Nl(ae.value)&&S&&(Z=Y?te(S)<te(ae.value):ue?S<ae.value:H<new Date(ae.value))}if((P||Z)&&(U(!!P,q.message,ae.message,pf.max,pf.min),!i))return x(F[g].message),F}if((c||d)&&!R&&(Nl(S)||a&&Array.isArray(S))){const P=gg(c),Z=gg(d),q=!Xs(P.value)&&S.length>+P.value,ae=!Xs(Z.value)&&S.length<+Z.value;if((q||ae)&&(U(q,P.message,Z.message),!i))return x(F[g].message),F}if(m&&!R&&Nl(S)){const{value:P,message:Z}=gg(m);if(rx(P)&&!S.match(P)&&(F[g]={type:pf.pattern,message:Z,ref:o,...V(pf.pattern,Z)},!i))return x(Z),F}if(p){if(ad(p)){const P=await p(S,n),Z=wq(P,C);if(Z&&(F[g]={...Z,...V(pf.validate,Z.message)},!i))return x(Z.message),F}else if(Ma(p)){let P={};for(const Z in p){if(!ns(P)&&!i)break;const q=wq(await p[Z](S,n),C,Z);q&&(P={...q,...V(Z,q.message)},x(q.message),i&&(F[g]=P))}if(!ns(P)&&(F[g]={ref:C,...P},!i))return F}}return x(!0),F};const EGe={mode:lc.onSubmit,reValidateMode:lc.onChange,shouldFocusError:!0};function BGe(t={}){let e={...EGe,...t},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:ad(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},i={},r=Ma(e.defaultValues)||Ma(e.values)?Br(e.defaultValues||e.values)||{}:{},a=e.shouldUnregister?{}:Br(r),o={action:!1,mount:!1,watch:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...d};const h={array:pq(),state:pq()},m=e.criteriaMode===lc.all,p=ce=>ke=>{clearTimeout(c),c=setTimeout(ce,ke)},g=async ce=>{if(!e.disabled&&(d.isValid||f.isValid||ce)){const ke=e.resolver?ns((await E()).errors):await R(i,!0);ke!==n.isValid&&h.state.next({isValid:ke})}},b=(ce,ke)=>{!e.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((ce||Array.from(s.mount)).forEach(Ne=>{Ne&&(ke?Ki(n.validatingFields,Ne,ke):ka(n.validatingFields,Ne))}),h.state.next({validatingFields:n.validatingFields,isValidating:!ns(n.validatingFields)}))},k=(ce,ke=[],Ne,$e,Ge=!0,He=!0)=>{if($e&&Ne&&!e.disabled){if(o.action=!0,He&&Array.isArray(jt(i,ce))){const We=Ne(jt(i,ce),$e.argA,$e.argB);Ge&&Ki(i,ce,We)}if(He&&Array.isArray(jt(n.errors,ce))){const We=Ne(jt(n.errors,ce),$e.argA,$e.argB);Ge&&Ki(n.errors,ce,We),_Ge(n.errors,ce)}if((d.touchedFields||f.touchedFields)&&He&&Array.isArray(jt(n.touchedFields,ce))){const We=Ne(jt(n.touchedFields,ce),$e.argA,$e.argB);Ge&&Ki(n.touchedFields,ce,We)}(d.dirtyFields||f.dirtyFields)&&(n.dirtyFields=Ig(r,a)),h.state.next({name:ce,isDirty:U(ce,ke),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ki(a,ce,ke)},S=(ce,ke)=>{Ki(n.errors,ce,ke),h.state.next({errors:n.errors})},C=ce=>{n.errors=ce,h.state.next({errors:n.errors,isValid:!1})},x=(ce,ke,Ne,$e)=>{const Ge=jt(i,ce);if(Ge){const He=jt(a,ce,wr(Ne)?jt(r,ce):Ne);wr(He)||$e&&$e.defaultChecked||ke?Ki(a,ce,ke?He:kq(Ge._f)):q(ce,He),o.mount&&!o.action&&g()}},F=(ce,ke,Ne,$e,Ge)=>{let He=!1,We=!1;const ct={name:ce};if(!e.disabled){if(!Ne||$e){(d.isDirty||f.isDirty)&&(We=n.isDirty,n.isDirty=ct.isDirty=U(),He=We!==ct.isDirty);const ut=rd(jt(r,ce),ke);We=!!jt(n.dirtyFields,ce),ut?ka(n.dirtyFields,ce):Ki(n.dirtyFields,ce,!0),ct.dirtyFields=n.dirtyFields,He=He||(d.dirtyFields||f.dirtyFields)&&We!==!ut}if(Ne){const ut=jt(n.touchedFields,ce);ut||(Ki(n.touchedFields,ce,Ne),ct.touchedFields=n.touchedFields,He=He||(d.touchedFields||f.touchedFields)&&ut!==Ne)}He&&Ge&&h.state.next(ct)}return He?ct:{}},T=(ce,ke,Ne,$e)=>{const Ge=jt(n.errors,ce),He=(d.isValid||f.isValid)&&Sl(ke)&&n.isValid!==ke;if(e.delayError&&Ne?(l=p(()=>S(ce,Ne)),l(e.delayError)):(clearTimeout(c),l=null,Ne?Ki(n.errors,ce,Ne):ka(n.errors,ce)),(Ne?!rd(Ge,Ne):Ge)||!ns($e)||He){const We={...$e,...He&&Sl(ke)?{isValid:ke}:{},errors:n.errors,name:ce};n={...n,...We},h.state.next(We)}},E=async ce=>{b(ce,!0);const ke=await e.resolver(a,e.context,SGe(ce||s.mount,i,e.criteriaMode,e.shouldUseNativeValidation));return b(ce),ke},I=async ce=>{const{errors:ke}=await E(ce);if(ce)for(const Ne of ce){const $e=jt(ke,Ne);$e?Ki(n.errors,Ne,$e):ka(n.errors,Ne)}else n.errors=ke;return ke},R=async(ce,ke,Ne={valid:!0})=>{for(const $e in ce){const Ge=ce[$e];if(Ge){const{_f:He,...We}=Ge;if(He){const ct=s.array.has(He.name),ut=Ge._f&&wGe(Ge._f);ut&&d.validatingFields&&b([He.name],!0);const yt=await oO(Ge,s.disabled,a,m,e.shouldUseNativeValidation&&!ke,ct);if(ut&&d.validatingFields&&b([He.name]),yt[He.name]&&(Ne.valid=!1,ke))break;!ke&&(jt(yt,He.name)?ct?vse(n.errors,yt,He.name):Ki(n.errors,He.name,yt[He.name]):ka(n.errors,He.name))}!ns(We)&&await R(We,ke,Ne)}}return Ne.valid},V=()=>{for(const ce of s.unMount){const ke=jt(i,ce);ke&&(ke._f.refs?ke._f.refs.every(Ne=>!TD(Ne)):!TD(ke._f.ref))&&K(ce)}s.unMount=new Set},U=(ce,ke)=>!e.disabled&&(ce&&ke&&Ki(a,ce,ke),!rd(we(),r)),P=(ce,ke,Ne)=>nO(ce,s,{...o.mount?a:wr(ke)?r:Nl(ce)?{[ce]:ke}:ke},Ne,ke),Z=ce=>kF(jt(o.mount?a:r,ce,e.shouldUnregister?jt(r,ce,[]):[])),q=(ce,ke,Ne={})=>{const $e=jt(i,ce);let Ge=ke;if($e){const He=$e._f;He&&(!He.disabled&&Ki(a,ce,pse(ke,He)),Ge=ix(He.ref)&&Xs(ke)?"":ke,Ase(He.ref)?[...He.ref.options].forEach(We=>We.selected=Ge.includes(We.value)):He.refs?db(He.ref)?He.refs.forEach(We=>{(!We.defaultChecked||!We.disabled)&&(Array.isArray(Ge)?We.checked=!!Ge.find(ct=>ct===We.value):We.checked=Ge===We.value||!!Ge)}):He.refs.forEach(We=>We.checked=We.value===Ge):r6(He.ref)?He.ref.value="":(He.ref.value=Ge,He.ref.type||h.state.next({name:ce,values:Br(a)})))}(Ne.shouldDirty||Ne.shouldTouch)&&F(ce,Ge,Ne.shouldTouch,Ne.shouldDirty,!0),Ne.shouldValidate&&ue(ce)},ae=(ce,ke,Ne)=>{for(const $e in ke){if(!ke.hasOwnProperty($e))return;const Ge=ke[$e],He=ce+"."+$e,We=jt(i,He);(s.array.has(ce)||Ma(Ge)||We&&!We._f)&&!ch(Ge)?ae(He,Ge,Ne):q(He,Ge,Ne)}},H=(ce,ke,Ne={})=>{const $e=jt(i,ce),Ge=s.array.has(ce),He=Br(ke);Ki(a,ce,He),Ge?(h.array.next({name:ce,values:Br(a)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&Ne.shouldDirty&&h.state.next({name:ce,dirtyFields:Ig(r,a),isDirty:U(ce,He)})):$e&&!$e._f&&!Xs(He)?ae(ce,He,Ne):q(ce,He,Ne),aO(ce,s)&&h.state.next({...n,name:ce}),h.state.next({name:o.mount?ce:void 0,values:Br(a)})},te=async ce=>{o.mount=!0;const ke=ce.target;let Ne=ke.name,$e=!0;const Ge=jt(i,Ne),He=ut=>{$e=Number.isNaN(ut)||ch(ut)&&isNaN(ut.getTime())||rd(ut,jt(a,Ne,ut))},We=Hg(e.mode),ct=Hg(e.reValidateMode);if(Ge){let ut,yt;const me=ke.type?kq(Ge._f):lse(ce),z=ce.type===nx.BLUR||ce.type===nx.FOCUS_OUT,ee=!NGe(Ge._f)&&!e.resolver&&!jt(n.errors,Ne)&&!Ge._f.deps||FGe(z,jt(n.touchedFields,Ne),n.isSubmitted,ct,We),xe=aO(Ne,s,z);Ki(a,Ne,me),z?(!ke||!ke.readOnly)&&(Ge._f.onBlur&&Ge._f.onBlur(ce),l&&l(0)):Ge._f.onChange&&Ge._f.onChange(ce);const Be=F(Ne,me,z),Ue=!ns(Be)||xe;if(!z&&h.state.next({name:Ne,type:ce.type,values:Br(a)}),ee)return(d.isValid||f.isValid)&&(e.mode==="onBlur"?z&&g():z||g()),Ue&&h.state.next({name:Ne,...xe?{}:Be});if(!z&&xe&&h.state.next({...n}),e.resolver){const{errors:_e}=await E([Ne]);if(He(me),$e){const Pe=Sq(n.errors,i,Ne),xt=Sq(_e,i,Pe.name||Ne);ut=xt.error,Ne=xt.name,yt=ns(_e)}}else b([Ne],!0),ut=(await oO(Ge,s.disabled,a,m,e.shouldUseNativeValidation))[Ne],b([Ne]),He(me),$e&&(ut?yt=!1:(d.isValid||f.isValid)&&(yt=await R(i,!0)));$e&&(Ge._f.deps&&(!Array.isArray(Ge._f.deps)||Ge._f.deps.length>0)&&ue(Ge._f.deps),T(Ne,yt,ut,Be))}},Y=(ce,ke)=>{if(jt(n.errors,ke)&&ce.focus)return ce.focus(),1},ue=async(ce,ke={})=>{let Ne,$e;const Ge=tl(ce);if(e.resolver){const He=await I(wr(ce)?ce:Ge);Ne=ns(He),$e=ce?!Ge.some(We=>jt(He,We)):Ne}else ce?($e=(await Promise.all(Ge.map(async He=>{const We=jt(i,He);return await R(We&&We._f?{[He]:We}:We)}))).every(Boolean),!(!$e&&!n.isValid)&&g()):$e=Ne=await R(i);return h.state.next({...!Nl(ce)||(d.isValid||f.isValid)&&Ne!==n.isValid?{}:{name:ce},...e.resolver||!ce?{isValid:Ne}:{},errors:n.errors}),ke.shouldFocus&&!$e&&sv(i,Y,ce?Ge:s.mount),$e},we=(ce,ke)=>{let Ne={...o.mount?a:r};return ke&&(Ne=fse(ke.dirtyFields?n.dirtyFields:n.touchedFields,Ne)),wr(ce)?Ne:Nl(ce)?jt(Ne,ce):ce.map($e=>jt(Ne,$e))},ie=(ce,ke)=>({invalid:!!jt((ke||n).errors,ce),isDirty:!!jt((ke||n).dirtyFields,ce),error:jt((ke||n).errors,ce),isValidating:!!jt(n.validatingFields,ce),isTouched:!!jt((ke||n).touchedFields,ce)}),L=ce=>{ce&&tl(ce).forEach(ke=>ka(n.errors,ke)),h.state.next({errors:ce?n.errors:{}})},j=(ce,ke,Ne)=>{const $e=(jt(i,ce,{_f:{}})._f||{}).ref,Ge=jt(n.errors,ce)||{},{ref:He,message:We,type:ct,...ut}=Ge;Ki(n.errors,ce,{...ut,...ke,ref:$e}),h.state.next({name:ce,errors:n.errors,isValid:!1}),Ne&&Ne.shouldFocus&&$e&&$e.focus&&$e.focus()},$=(ce,ke)=>ad(ce)?h.state.subscribe({next:Ne=>"values"in Ne&&ce(P(void 0,ke),Ne)}):P(ce,ke,!0),W=ce=>h.state.subscribe({next:ke=>{xGe(ce.name,ke.name,ce.exact)&&CGe(ke,ce.formState||d,Q,ce.reRenderRoot)&&ce.callback({values:{...a},...n,...ke,defaultValues:r})}}).unsubscribe,J=ce=>(o.mount=!0,f={...f,...ce.formState},W({...ce,formState:f})),K=(ce,ke={})=>{for(const Ne of ce?tl(ce):s.mount)s.mount.delete(Ne),s.array.delete(Ne),ke.keepValue||(ka(i,Ne),ka(a,Ne)),!ke.keepError&&ka(n.errors,Ne),!ke.keepDirty&&ka(n.dirtyFields,Ne),!ke.keepTouched&&ka(n.touchedFields,Ne),!ke.keepIsValidating&&ka(n.validatingFields,Ne),!e.shouldUnregister&&!ke.keepDefaultValue&&ka(r,Ne);h.state.next({values:Br(a)}),h.state.next({...n,...ke.keepDirty?{isDirty:U()}:{}}),!ke.keepIsValid&&g()},fe=({disabled:ce,name:ke})=>{(Sl(ce)&&o.mount||ce||s.disabled.has(ke))&&(ce?s.disabled.add(ke):s.disabled.delete(ke))},ge=(ce,ke={})=>{let Ne=jt(i,ce);const $e=Sl(ke.disabled)||Sl(e.disabled);return Ki(i,ce,{...Ne||{},_f:{...Ne&&Ne._f?Ne._f:{ref:{name:ce}},name:ce,mount:!0,...ke}}),s.mount.add(ce),Ne?fe({disabled:Sl(ke.disabled)?ke.disabled:e.disabled,name:ce}):x(ce,!0,ke.value),{...$e?{disabled:ke.disabled||e.disabled}:{},...e.progressive?{required:!!ke.required,min:dy(ke.min),max:dy(ke.max),minLength:dy(ke.minLength),maxLength:dy(ke.maxLength),pattern:dy(ke.pattern)}:{},name:ce,onChange:te,onBlur:te,ref:Ge=>{if(Ge){ge(ce,ke),Ne=jt(i,ce);const He=wr(Ge.value)&&Ge.querySelectorAll&&Ge.querySelectorAll("input,select,textarea")[0]||Ge,We=vGe(He),ct=Ne._f.refs||[];if(We?ct.find(ut=>ut===He):He===Ne._f.ref)return;Ki(i,ce,{_f:{...Ne._f,...We?{refs:[...ct.filter(TD),He,...Array.isArray(jt(r,ce))?[{}]:[]],ref:{type:He.type,name:ce}}:{ref:He}}}),x(ce,!1,void 0,He)}else Ne=jt(i,ce,{}),Ne._f&&(Ne._f.mount=!1),(e.shouldUnregister||ke.shouldUnregister)&&!(cse(s.array,ce)&&o.action)&&s.unMount.add(ce)}}},Se=()=>e.shouldFocusError&&sv(i,Y,s.mount),oe=ce=>{Sl(ce)&&(h.state.next({disabled:ce}),sv(i,(ke,Ne)=>{const $e=jt(i,Ne);$e&&(ke.disabled=$e._f.disabled||ce,Array.isArray($e._f.refs)&&$e._f.refs.forEach(Ge=>{Ge.disabled=$e._f.disabled||ce}))},0,!1))},le=(ce,ke)=>async Ne=>{let $e;Ne&&(Ne.preventDefault&&Ne.preventDefault(),Ne.persist&&Ne.persist());let Ge=Br(a);if(h.state.next({isSubmitting:!0}),e.resolver){const{errors:He,values:We}=await E();n.errors=He,Ge=Br(We)}else await R(i);if(s.disabled.size)for(const He of s.disabled)ka(Ge,He);if(ka(n.errors,"root"),ns(n.errors)){h.state.next({errors:{}});try{await ce(Ge,Ne)}catch(He){$e=He}}else ke&&await ke({...n.errors},Ne),Se(),setTimeout(Se);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ns(n.errors)&&!$e,submitCount:n.submitCount+1,errors:n.errors}),$e)throw $e},Ee=(ce,ke={})=>{jt(i,ce)&&(wr(ke.defaultValue)?H(ce,Br(jt(r,ce))):(H(ce,ke.defaultValue),Ki(r,ce,Br(ke.defaultValue))),ke.keepTouched||ka(n.touchedFields,ce),ke.keepDirty||(ka(n.dirtyFields,ce),n.isDirty=ke.defaultValue?U(ce,Br(jt(r,ce))):U()),ke.keepError||(ka(n.errors,ce),d.isValid&&g()),h.state.next({...n}))},Le=(ce,ke={})=>{const Ne=ce?Br(ce):r,$e=Br(Ne),Ge=ns(ce),He=Ge?r:$e;if(ke.keepDefaultValues||(r=Ne),!ke.keepValues){if(ke.keepDirtyValues){const We=new Set([...s.mount,...Object.keys(Ig(r,a))]);for(const ct of Array.from(We))jt(n.dirtyFields,ct)?Ki(He,ct,jt(a,ct)):H(ct,jt(He,ct))}else{if(e6&&wr(ce))for(const We of s.mount){const ct=jt(i,We);if(ct&&ct._f){const ut=Array.isArray(ct._f.refs)?ct._f.refs[0]:ct._f.ref;if(ix(ut)){const yt=ut.closest("form");if(yt){yt.reset();break}}}}if(ke.keepFieldsRef)for(const We of s.mount)H(We,jt(He,We));else i={}}a=e.shouldUnregister?ke.keepDefaultValues?Br(r):{}:Br(He),h.array.next({values:{...He}}),h.state.next({values:{...He}})}s={mount:ke.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!ke.keepIsValid||!!ke.keepDirtyValues||!e.shouldUnregister&&!ns(He),o.watch=!!e.shouldUnregister,o.action=!1,ke.keepErrors||(n.errors={}),h.state.next({submitCount:ke.keepSubmitCount?n.submitCount:0,isDirty:Ge?!1:ke.keepDirty?n.isDirty:!!(ke.keepDefaultValues&&!rd(ce,r)),isSubmitted:ke.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ge?{}:ke.keepDirtyValues?ke.keepDefaultValues&&a?Ig(r,a):n.dirtyFields:ke.keepDefaultValues&&ce?Ig(r,ce):ke.keepDirty?n.dirtyFields:{},touchedFields:ke.keepTouched?n.touchedFields:{},errors:ke.keepErrors?n.errors:{},isSubmitSuccessful:ke.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:r})},ve=(ce,ke)=>Le(ad(ce)?ce(a):ce,ke),Ae=(ce,ke={})=>{const Ne=jt(i,ce),$e=Ne&&Ne._f;if($e){const Ge=$e.refs?$e.refs[0]:$e.ref;Ge.focus&&(Ge.focus(),ke.shouldSelect&&ad(Ge.select)&&Ge.select())}},Q=ce=>{n={...n,...ce}},ne={control:{register:ge,unregister:K,getFieldState:ie,handleSubmit:le,setError:j,_subscribe:W,_runSchema:E,_focusError:Se,_getWatch:P,_getDirty:U,_setValid:g,_setFieldArray:k,_setDisabledField:fe,_setErrors:C,_getFieldArray:Z,_reset:Le,_resetDefaultValues:()=>ad(e.defaultValues)&&e.defaultValues().then(ce=>{ve(ce,e.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:V,_disableForm:oe,_subjects:h,_proxyFormState:d,get _fields(){return i},get _formValues(){return a},get _state(){return o},set _state(ce){o=ce},get _defaultValues(){return r},get _names(){return s},set _names(ce){s=ce},get _formState(){return n},get _options(){return e},set _options(ce){e={...e,...ce}}},subscribe:J,trigger:ue,register:ge,handleSubmit:le,watch:$,setValue:H,getValues:we,reset:ve,resetField:Ee,clearErrors:L,unregister:K,setError:j,setFocus:Ae,getFieldState:ie};return{...ne,formControl:ne}}var DA=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const t=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=(Math.random()*16+t)%16|0;return(e=="x"?n:n&3|8).toString(16)})},DD=(t,e,n={})=>n.shouldFocus||wr(n.shouldFocus)?n.focusName||`${t}.${wr(n.focusIndex)?e:n.focusIndex}.`:"",ID=(t,e)=>[...t,...tl(e)],OD=t=>Array.isArray(t)?t.map(()=>{}):void 0;function RD(t,e,n){return[...t.slice(0,e),...tl(n),...t.slice(e)]}var PD=(t,e,n)=>Array.isArray(t)?(wr(t[n])&&(t[n]=void 0),t.splice(n,0,t.splice(e,1)[0]),t):[],LD=(t,e)=>[...tl(e),...tl(t)];function TGe(t,e){let n=0;const i=[...t];for(const r of e)i.splice(r-n,1),n++;return kF(i).length?i:[]}var UD=(t,e)=>wr(e)?[]:TGe(t,tl(e).sort((n,i)=>n-i)),MD=(t,e,n)=>{[t[e],t[n]]=[t[n],t[e]]},Nq=(t,e,n)=>(t[e]=n,t);function DGe(t){const e=ub(),{control:n=e.control,name:i,keyName:r="id",shouldUnregister:a,rules:o}=t,[s,l]=se.useState(n._getFieldArray(i)),c=se.useRef(n._getFieldArray(i).map(DA)),d=se.useRef(!1);n._names.array.add(i),se.useMemo(()=>o&&s.length>=0&&n.register(i,o),[n,i,s.length,o]),bF(()=>n._subjects.array.subscribe({next:({values:x,name:F})=>{if(F===i||!F){const T=jt(x,i);Array.isArray(T)&&(l(T),c.current=T.map(DA))}}}).unsubscribe,[n,i]);const f=se.useCallback(x=>{d.current=!0,n._setFieldArray(i,x)},[n,i]),h=(x,F)=>{const T=tl(Br(x)),E=ID(n._getFieldArray(i),T);n._names.focus=DD(i,E.length-1,F),c.current=ID(c.current,T.map(DA)),f(E),l(E),n._setFieldArray(i,E,ID,{argA:OD(x)})},m=(x,F)=>{const T=tl(Br(x)),E=LD(n._getFieldArray(i),T);n._names.focus=DD(i,0,F),c.current=LD(c.current,T.map(DA)),f(E),l(E),n._setFieldArray(i,E,LD,{argA:OD(x)})},p=x=>{const F=UD(n._getFieldArray(i),x);c.current=UD(c.current,x),f(F),l(F),!Array.isArray(jt(n._fields,i))&&Ki(n._fields,i,void 0),n._setFieldArray(i,F,UD,{argA:x})},g=(x,F,T)=>{const E=tl(Br(F)),I=RD(n._getFieldArray(i),x,E);n._names.focus=DD(i,x,T),c.current=RD(c.current,x,E.map(DA)),f(I),l(I),n._setFieldArray(i,I,RD,{argA:x,argB:OD(F)})},b=(x,F)=>{const T=n._getFieldArray(i);MD(T,x,F),MD(c.current,x,F),f(T),l(T),n._setFieldArray(i,T,MD,{argA:x,argB:F},!1)},k=(x,F)=>{const T=n._getFieldArray(i);PD(T,x,F),PD(c.current,x,F),f(T),l(T),n._setFieldArray(i,T,PD,{argA:x,argB:F},!1)},S=(x,F)=>{const T=Br(F),E=Nq(n._getFieldArray(i),x,T);c.current=[...E].map((I,R)=>!I||R===x?DA():c.current[R]),f(E),l([...E]),n._setFieldArray(i,E,Nq,{argA:x,argB:T},!0,!1)},C=x=>{const F=tl(Br(x));c.current=F.map(DA),f([...F]),l([...F]),n._setFieldArray(i,[...F],T=>T,{},!0,!1)};return se.useEffect(()=>{if(n._state.action=!1,aO(i,n._names)&&n._subjects.state.next({...n._formState}),d.current&&(!Hg(n._options.mode).isOnSubmit||n._formState.isSubmitted)&&!Hg(n._options.reValidateMode).isOnSubmit)if(n._options.resolver)n._runSchema([i]).then(x=>{const F=jt(x.errors,i),T=jt(n._formState.errors,i);(T?!F&&T.type||F&&(T.type!==F.type||T.message!==F.message):F&&F.type)&&(F?Ki(n._formState.errors,i,F):ka(n._formState.errors,i),n._subjects.state.next({errors:n._formState.errors}))});else{const x=jt(n._fields,i);x&&x._f&&!(Hg(n._options.reValidateMode).isOnSubmit&&Hg(n._options.mode).isOnSubmit)&&oO(x,n._names.disabled,n._formValues,n._options.criteriaMode===lc.all,n._options.shouldUseNativeValidation,!0).then(F=>!ns(F)&&n._subjects.state.next({errors:vse(n._formState.errors,F,i)}))}n._subjects.state.next({name:i,values:Br(n._formValues)}),n._names.focus&&sv(n._fields,(x,F)=>{if(n._names.focus&&F.startsWith(n._names.focus)&&x.focus)return x.focus(),1}),n._names.focus="",n._setValid(),d.current=!1},[s,i,n]),se.useEffect(()=>(!jt(n._formValues,i)&&n._setFieldArray(i),()=>{const x=(F,T)=>{const E=jt(n._fields,F);E&&E._f&&(E._f.mount=T)};n._options.shouldUnregister||a?n.unregister(i):x(i,!1)}),[i,n,r,a]),{swap:se.useCallback(b,[f,i,n]),move:se.useCallback(k,[f,i,n]),prepend:se.useCallback(m,[f,i,n]),append:se.useCallback(h,[f,i,n]),remove:se.useCallback(p,[f,i,n]),insert:se.useCallback(g,[f,i,n]),update:se.useCallback(S,[f,i,n]),replace:se.useCallback(C,[f,i,n]),fields:se.useMemo(()=>s.map((x,F)=>({...x,[r]:c.current[F]||DA()})),[s,r])}}function t0(t={}){const e=se.useRef(void 0),n=se.useRef(void 0),[i,r]=se.useState({isDirty:!1,isValidating:!1,isLoading:ad(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,isReady:!1,defaultValues:ad(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:i},t.defaultValues&&!ad(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:o,...s}=BGe(t);e.current={...s,formState:i}}const a=e.current.control;return a._options=t,bF(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>r({...a._formState}),reRenderRoot:!0});return r(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),se.useEffect(()=>a._disableForm(t.disabled),[a,t.disabled]),se.useEffect(()=>{t.mode&&(a._options.mode=t.mode),t.reValidateMode&&(a._options.reValidateMode=t.reValidateMode)},[a,t.mode,t.reValidateMode]),se.useEffect(()=>{t.errors&&(a._setErrors(t.errors),a._focusError())},[a,t.errors]),se.useEffect(()=>{t.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,t.shouldUnregister]),se.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==i.isDirty&&a._subjects.state.next({isDirty:o})}},[a,i.isDirty]),se.useEffect(()=>{var o;t.values&&!rd(t.values,n.current)?(a._reset(t.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),n.current=t.values,r(s=>({...s}))):a._resetDefaultValues()},[a,t.values]),se.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),e.current.formState=dse(i,a),e.current}const o6=()=>{const[{data:t,fetching:e,error:n},i]=Ns({query:sCe});n&&(console.error(`Error fetching businesses: ${n}`),fn.error("Error",{description:"Unable to fetch businesses"}));const r=N.useMemo(()=>t?.allBusinesses?.nodes.sort((o,s)=>o.name>s.name?1:-1)??[],[t]),a=N.useMemo(()=>r.map(o=>({value:o.id,label:o.name})),[r]);return{fetching:e,refresh:()=>i(),businesses:r,selectableBusinesses:a}},IGe=()=>{const[{data:t,fetching:e,error:n},i]=Ns({query:fCe});n&&(console.error(`Error fetching tax categories: ${n}`),fn.error("Error",{description:"Unable to fetch tax categories"}));const r=N.useMemo(()=>t?.taxCategories?.sort((o,s)=>o.name>s.name?1:-1)??[],[t]),a=N.useMemo(()=>r.map(o=>({value:o.id,label:o.name})),[r]);return{fetching:e,refresh:()=>i(),taxCategories:r,selectableTaxCategories:a}},fb=hGe,yse=se.createContext({}),fi=({...t})=>y.jsx(yse.Provider,{value:{name:t.name},children:y.jsx(ed,{...t})}),SF=()=>{const t=se.useContext(yse),e=se.useContext(kse),{getFieldState:n}=ub(),i=use({name:t.name}),r=n(t.name,i);if(!t)throw new Error("useFormField should be used within <FormField>");const{id:a}=e;return{id:a,name:t.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...r}},kse=se.createContext({});function Ai({className:t,...e}){const n=se.useId();return y.jsx(kse.Provider,{value:{id:n},children:y.jsx("div",{"data-slot":"form-item",className:Ut("grid gap-2",t),...e})})}function Ji({className:t,...e}){const{error:n,formItemId:i}=SF();return y.jsx(gn,{"data-slot":"form-label","data-error":!!n,className:Ut("data-[error=true]:text-red-500 dark:data-[error=true]:text-red-900",t),htmlFor:i,...e})}function Li({...t}){const{error:e,formItemId:n,formDescriptionId:i,formMessageId:r}=SF();return y.jsx(aR,{"data-slot":"form-control",id:n,"aria-describedby":e?`${i} ${r}`:String(i),"aria-invalid":!!e,...t})}function OGe({className:t,...e}){const{formDescriptionId:n}=SF();return y.jsx("p",{"data-slot":"form-description",id:n,className:Ut("text-gray-500 text-sm dark:text-gray-400",t),...e})}function vi({className:t,...e}){const{error:n,formMessageId:i}=SF(),r=n?String(n?.message??""):e.children;return r?y.jsx("p",{"data-slot":"form-message",id:i,className:Ut("text-red-500 text-sm dark:text-red-900",t),...e,children:r}):null}var wF="Switch",[RGe]=rl(wF),[PGe,LGe]=RGe(wF),bse=N.forwardRef((t,e)=>{const{__scopeSwitch:n,name:i,checked:r,defaultChecked:a,required:o,disabled:s,value:l="on",onCheckedChange:c,form:d,...f}=t,[h,m]=N.useState(null),p=Jn(e,C=>m(C)),g=N.useRef(!1),b=h?d||!!h.closest("form"):!0,[k,S]=md({prop:r,defaultProp:a??!1,onChange:c,caller:wF});return y.jsxs(PGe,{scope:n,checked:k,disabled:s,children:[y.jsx(Cn.button,{type:"button",role:"switch","aria-checked":k,"aria-required":o,"data-state":Cse(k),"data-disabled":s?"":void 0,disabled:s,value:l,...f,ref:p,onClick:Ht(t.onClick,C=>{S(x=>!x),b&&(g.current=C.isPropagationStopped(),g.current||C.stopPropagation())})}),b&&y.jsx(Nse,{control:h,bubbles:!g.current,name:i,value:l,checked:k,required:o,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});bse.displayName=wF;var Sse="SwitchThumb",wse=N.forwardRef((t,e)=>{const{__scopeSwitch:n,...i}=t,r=LGe(Sse,n);return y.jsx(Cn.span,{"data-state":Cse(r.checked),"data-disabled":r.disabled?"":void 0,...i,ref:e})});wse.displayName=Sse;var UGe="SwitchBubbleInput",Nse=N.forwardRef(({__scopeSwitch:t,control:e,checked:n,bubbles:i=!0,...r},a)=>{const o=N.useRef(null),s=Jn(o,a),l=ZP(n),c=zR(e);return N.useEffect(()=>{const d=o.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const p=new Event("click",{bubbles:i});m.call(d,n),d.dispatchEvent(p)}},[l,n,i]),y.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:s,style:{...r.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Nse.displayName=UGe;function Cse(t){return t?"checked":"unchecked"}var MGe=bse,$Ge=wse;function jGe({className:t,...e}){return y.jsx(MGe,{"data-slot":"switch",className:Ut("peer data-[state=checked]:bg-gray-900 data-[state=unchecked]:bg-gray-200 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 dark:data-[state=unchecked]:bg-gray-200/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-gray-200 border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=checked]:bg-gray-50 dark:data-[state=unchecked]:bg-gray-800 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:dark:data-[state=unchecked]:bg-gray-800/80 dark:border-gray-800",t),...e,children:y.jsx($Ge,{"data-slot":"switch-thumb",className:Ut("bg-white dark:data-[state=unchecked]:bg-gray-950 dark:data-[state=checked]:bg-gray-50 pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-gray-950 dark:dark:data-[state=unchecked]:bg-gray-50 dark:dark:data-[state=checked]:bg-gray-900")})})}var QGe=Object.defineProperty,HGe=Object.defineProperties,zGe=Object.getOwnPropertyDescriptors,ax=Object.getOwnPropertySymbols,xse=Object.prototype.hasOwnProperty,Fse=Object.prototype.propertyIsEnumerable,Cq=(t,e,n)=>e in t?QGe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xq=(t,e)=>{for(var n in e||(e={}))xse.call(e,n)&&Cq(t,n,e[n]);if(ax)for(var n of ax(e))Fse.call(e,n)&&Cq(t,n,e[n]);return t},Fq=(t,e)=>HGe(t,zGe(e)),VGe=(t,e)=>{var n={};for(var i in t)xse.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&ax)for(var i of ax(t))e.indexOf(i)<0&&Fse.call(t,i)&&(n[i]=t[i]);return n};function sO(t){var e=t,{direction:n,style:i}=e,r=VGe(e,["direction","style"]);const a=Sc();return se.createElement(j4e,Fq(xq({},r),{style:Fq(xq({},i),{transform:n==="next"&&a.dir==="ltr"||n==="previous"&&a.dir==="rtl"?"rotate(270deg)":"rotate(90deg)"})}))}sO.displayName="@mantine/dates/Chevron";var GGe=Object.defineProperty,qGe=Object.defineProperties,KGe=Object.getOwnPropertyDescriptors,_q=Object.getOwnPropertySymbols,WGe=Object.prototype.hasOwnProperty,YGe=Object.prototype.propertyIsEnumerable,Eq=(t,e,n)=>e in t?GGe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,KS=(t,e)=>{for(var n in e||(e={}))WGe.call(e,n)&&Eq(t,n,e[n]);if(_q)for(var n of _q(e))YGe.call(e,n)&&Eq(t,n,e[n]);return t},Bq=(t,e)=>qGe(t,KGe(e));const kk={xs:At(30),sm:At(36),md:At(42),lg:At(48),xl:At(54)};var XGe=Rn((t,{radius:e,isStatic:n},{size:i})=>{const r=t.fn.variant({variant:"filled"}),a=t.fn.variant({variant:"light"});return{day:Bq(KS({width:Xt({size:i,sizes:kk}),height:Xt({size:i,sizes:kk}),fontSize:Xt({size:i,sizes:t.fontSizes}),display:"inline-flex",justifyContent:"center",alignItems:"center",userSelect:n?void 0:"none",cursor:n?"default":"pointer",borderRadius:t.fn.radius(e)},n?null:t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),{"&:active":n?void 0:t.activeStyles,"&[data-disabled]":Bq(KS({color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4],cursor:"not-allowed"},t.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}}),"&[data-weekend]":{color:t.colors.red[t.fn.primaryShade()]},"&[data-outside]":{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]},"&[data-in-range]":KS({backgroundColor:a.background,borderRadius:0},n?null:t.fn.hover({backgroundColor:a.hover})),"&[data-first-in-range]":{borderTopLeftRadius:t.radius.sm,borderBottomLeftRadius:t.radius.sm},"&[data-last-in-range]":{borderTopRightRadius:t.radius.sm,borderBottomRightRadius:t.radius.sm},"&[data-selected]":KS({color:r.color,backgroundColor:r.background},n?null:t.fn.hover({backgroundColor:r.hover})),"&[data-hidden]":{display:"none"}})}}),ZGe=Object.defineProperty,JGe=Object.defineProperties,eqe=Object.getOwnPropertyDescriptors,Tq=Object.getOwnPropertySymbols,tqe=Object.prototype.hasOwnProperty,nqe=Object.prototype.propertyIsEnumerable,Dq=(t,e,n)=>e in t?ZGe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,WS=(t,e)=>{for(var n in e||(e={}))tqe.call(e,n)&&Dq(t,n,e[n]);if(Tq)for(var n of Tq(e))nqe.call(e,n)&&Dq(t,n,e[n]);return t},YS=(t,e)=>JGe(t,eqe(e)),iqe=Rn((t,e,{size:n})=>{const i=Xt({size:n,sizes:kk});return{calendarHeaderControlIcon:{},calendarHeader:{display:"flex",maxWidth:`calc(${i} * 7 + ${At(7)})`},calendarHeaderControl:YS(WS({width:i,height:i,borderRadius:t.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none"},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),{"&:active":t.activeStyles,"&[data-disabled]":YS(WS({opacity:.2,cursor:"not-allowed"},t.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})}),calendarHeaderLevel:YS(WS({height:i,borderRadius:t.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",flex:1,fontSize:Xt({size:n,sizes:t.fontSizes}),fontWeight:500,textTransform:"capitalize"},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),{"&:active":t.activeStyles,"&[data-static]":YS(WS({cursor:"default",userSelect:"unset"},t.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}}),rqe=Object.defineProperty,ox=Object.getOwnPropertySymbols,_se=Object.prototype.hasOwnProperty,Ese=Object.prototype.propertyIsEnumerable,Iq=(t,e,n)=>e in t?rqe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aqe=(t,e)=>{for(var n in e||(e={}))_se.call(e,n)&&Iq(t,n,e[n]);if(ox)for(var n of ox(e))Ese.call(e,n)&&Iq(t,n,e[n]);return t},oqe=(t,e)=>{var n={};for(var i in t)_se.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&ox)for(var i of ox(t))e.indexOf(i)<0&&Ese.call(t,i)&&(n[i]=t[i]);return n};const sqe={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0,size:"sm"},NF=N.forwardRef((t,e)=>{const n=pn("CalendarHeader",sqe,t),{className:i,nextIcon:r,previousIcon:a,nextLabel:o,previousLabel:s,onNext:l,onPrevious:c,onLevelClick:d,label:f,classNames:h,styles:m,unstyled:p,nextDisabled:g,previousDisabled:b,hasNextLevel:k,levelControlAriaLabel:S,withNext:C,withPrevious:x,__staticSelector:F,__preventFocus:T,__stopPropagation:E,size:I,variant:R}=n,V=oqe(n,["className","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","label","classNames","styles","unstyled","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","__staticSelector","__preventFocus","__stopPropagation","size","variant"]),{classes:U,cx:P}=iqe(null,{name:["CalendarHeader",F],classNames:h,styles:m,unstyled:p,size:I,variant:R}),Z=T?q=>q.preventDefault():void 0;return se.createElement(mi,aqe({className:P(U.calendarHeader,i),ref:e},V),x&&se.createElement(ev,{className:U.calendarHeaderControl,"data-previous":!0,"aria-label":s,onClick:c,unstyled:p,onMouseDown:Z,disabled:b,"data-disabled":b||void 0,tabIndex:T?-1:0,"data-mantine-stop-propagation":E||void 0},a||se.createElement(sO,{className:U.calendarHeaderControlIcon,direction:"previous","data-previous":!0})),se.createElement(ev,{component:k?"button":"div",className:U.calendarHeaderLevel,onClick:k?d:void 0,unstyled:p,onMouseDown:k?Z:void 0,disabled:!k,"data-static":!k||void 0,"aria-label":S,tabIndex:T||!k?-1:0,"data-mantine-stop-propagation":E||void 0},f),C&&se.createElement(ev,{className:U.calendarHeaderControl,"data-next":!0,"aria-label":o,onClick:l,unstyled:p,onMouseDown:Z,disabled:g,"data-disabled":g||void 0,tabIndex:T?-1:0,"data-mantine-stop-propagation":E||void 0},r||se.createElement(sO,{className:U.calendarHeaderControlIcon,direction:"next","data-next":!0})))});NF.displayName="@mantine/dates/CalendarHeader";var eN={exports:{}},lqe=eN.exports,Oq;function cqe(){return Oq||(Oq=1,(function(t,e){(function(n,i){t.exports=i()})(lqe,(function(){var n=1e3,i=6e4,r=36e5,a="millisecond",o="second",s="minute",l="hour",c="day",d="week",f="month",h="quarter",m="year",p="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var ae=["th","st","nd","rd"],H=q%100;return"["+q+(ae[(H-20)%10]||ae[H]||ae[0])+"]"}},C=function(q,ae,H){var te=String(q);return!te||te.length>=ae?q:""+Array(ae+1-te.length).join(H)+q},x={s:C,z:function(q){var ae=-q.utcOffset(),H=Math.abs(ae),te=Math.floor(H/60),Y=H%60;return(ae<=0?"+":"-")+C(te,2,"0")+":"+C(Y,2,"0")},m:function q(ae,H){if(ae.date()<H.date())return-q(H,ae);var te=12*(H.year()-ae.year())+(H.month()-ae.month()),Y=ae.clone().add(te,f),ue=H-Y<0,we=ae.clone().add(te+(ue?-1:1),f);return+(-(te+(H-Y)/(ue?Y-we:we-Y))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:f,y:m,w:d,d:c,D:p,h:l,m:s,s:o,ms:a,Q:h}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},F="en",T={};T[F]=S;var E="$isDayjsObject",I=function(q){return q instanceof P||!(!q||!q[E])},R=function q(ae,H,te){var Y;if(!ae)return F;if(typeof ae=="string"){var ue=ae.toLowerCase();T[ue]&&(Y=ue),H&&(T[ue]=H,Y=ue);var we=ae.split("-");if(!Y&&we.length>1)return q(we[0])}else{var ie=ae.name;T[ie]=ae,Y=ie}return!te&&Y&&(F=Y),Y||!te&&F},V=function(q,ae){if(I(q))return q.clone();var H=typeof ae=="object"?ae:{};return H.date=q,H.args=arguments,new P(H)},U=x;U.l=R,U.i=I,U.w=function(q,ae){return V(q,{locale:ae.$L,utc:ae.$u,x:ae.$x,$offset:ae.$offset})};var P=(function(){function q(H){this.$L=R(H.locale,null,!0),this.parse(H),this.$x=this.$x||H.x||{},this[E]=!0}var ae=q.prototype;return ae.parse=function(H){this.$d=(function(te){var Y=te.date,ue=te.utc;if(Y===null)return new Date(NaN);if(U.u(Y))return new Date;if(Y instanceof Date)return new Date(Y);if(typeof Y=="string"&&!/Z$/i.test(Y)){var we=Y.match(b);if(we){var ie=we[2]-1||0,L=(we[7]||"0").substring(0,3);return ue?new Date(Date.UTC(we[1],ie,we[3]||1,we[4]||0,we[5]||0,we[6]||0,L)):new Date(we[1],ie,we[3]||1,we[4]||0,we[5]||0,we[6]||0,L)}}return new Date(Y)})(H),this.init()},ae.init=function(){var H=this.$d;this.$y=H.getFullYear(),this.$M=H.getMonth(),this.$D=H.getDate(),this.$W=H.getDay(),this.$H=H.getHours(),this.$m=H.getMinutes(),this.$s=H.getSeconds(),this.$ms=H.getMilliseconds()},ae.$utils=function(){return U},ae.isValid=function(){return this.$d.toString()!==g},ae.isSame=function(H,te){var Y=V(H);return this.startOf(te)<=Y&&Y<=this.endOf(te)},ae.isAfter=function(H,te){return V(H)<this.startOf(te)},ae.isBefore=function(H,te){return this.endOf(te)<V(H)},ae.$g=function(H,te,Y){return U.u(H)?this[te]:this.set(Y,H)},ae.unix=function(){return Math.floor(this.valueOf()/1e3)},ae.valueOf=function(){return this.$d.getTime()},ae.startOf=function(H,te){var Y=this,ue=!!U.u(te)||te,we=U.p(H),ie=function(ge,Se){var oe=U.w(Y.$u?Date.UTC(Y.$y,Se,ge):new Date(Y.$y,Se,ge),Y);return ue?oe:oe.endOf(c)},L=function(ge,Se){return U.w(Y.toDate()[ge].apply(Y.toDate("s"),(ue?[0,0,0,0]:[23,59,59,999]).slice(Se)),Y)},j=this.$W,$=this.$M,W=this.$D,J="set"+(this.$u?"UTC":"");switch(we){case m:return ue?ie(1,0):ie(31,11);case f:return ue?ie(1,$):ie(0,$+1);case d:var K=this.$locale().weekStart||0,fe=(j<K?j+7:j)-K;return ie(ue?W-fe:W+(6-fe),$);case c:case p:return L(J+"Hours",0);case l:return L(J+"Minutes",1);case s:return L(J+"Seconds",2);case o:return L(J+"Milliseconds",3);default:return this.clone()}},ae.endOf=function(H){return this.startOf(H,!1)},ae.$set=function(H,te){var Y,ue=U.p(H),we="set"+(this.$u?"UTC":""),ie=(Y={},Y[c]=we+"Date",Y[p]=we+"Date",Y[f]=we+"Month",Y[m]=we+"FullYear",Y[l]=we+"Hours",Y[s]=we+"Minutes",Y[o]=we+"Seconds",Y[a]=we+"Milliseconds",Y)[ue],L=ue===c?this.$D+(te-this.$W):te;if(ue===f||ue===m){var j=this.clone().set(p,1);j.$d[ie](L),j.init(),this.$d=j.set(p,Math.min(this.$D,j.daysInMonth())).$d}else ie&&this.$d[ie](L);return this.init(),this},ae.set=function(H,te){return this.clone().$set(H,te)},ae.get=function(H){return this[U.p(H)]()},ae.add=function(H,te){var Y,ue=this;H=Number(H);var we=U.p(te),ie=function($){var W=V(ue);return U.w(W.date(W.date()+Math.round($*H)),ue)};if(we===f)return this.set(f,this.$M+H);if(we===m)return this.set(m,this.$y+H);if(we===c)return ie(1);if(we===d)return ie(7);var L=(Y={},Y[s]=i,Y[l]=r,Y[o]=n,Y)[we]||1,j=this.$d.getTime()+H*L;return U.w(j,this)},ae.subtract=function(H,te){return this.add(-1*H,te)},ae.format=function(H){var te=this,Y=this.$locale();if(!this.isValid())return Y.invalidDate||g;var ue=H||"YYYY-MM-DDTHH:mm:ssZ",we=U.z(this),ie=this.$H,L=this.$m,j=this.$M,$=Y.weekdays,W=Y.months,J=Y.meridiem,K=function(Se,oe,le,Ee){return Se&&(Se[oe]||Se(te,ue))||le[oe].slice(0,Ee)},fe=function(Se){return U.s(ie%12||12,Se,"0")},ge=J||function(Se,oe,le){var Ee=Se<12?"AM":"PM";return le?Ee.toLowerCase():Ee};return ue.replace(k,(function(Se,oe){return oe||(function(le){switch(le){case"YY":return String(te.$y).slice(-2);case"YYYY":return U.s(te.$y,4,"0");case"M":return j+1;case"MM":return U.s(j+1,2,"0");case"MMM":return K(Y.monthsShort,j,W,3);case"MMMM":return K(W,j);case"D":return te.$D;case"DD":return U.s(te.$D,2,"0");case"d":return String(te.$W);case"dd":return K(Y.weekdaysMin,te.$W,$,2);case"ddd":return K(Y.weekdaysShort,te.$W,$,3);case"dddd":return $[te.$W];case"H":return String(ie);case"HH":return U.s(ie,2,"0");case"h":return fe(1);case"hh":return fe(2);case"a":return ge(ie,L,!0);case"A":return ge(ie,L,!1);case"m":return String(L);case"mm":return U.s(L,2,"0");case"s":return String(te.$s);case"ss":return U.s(te.$s,2,"0");case"SSS":return U.s(te.$ms,3,"0");case"Z":return we}return null})(Se)||we.replace(":","")}))},ae.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},ae.diff=function(H,te,Y){var ue,we=this,ie=U.p(te),L=V(H),j=(L.utcOffset()-this.utcOffset())*i,$=this-L,W=function(){return U.m(we,L)};switch(ie){case m:ue=W()/12;break;case f:ue=W();break;case h:ue=W()/3;break;case d:ue=($-j)/6048e5;break;case c:ue=($-j)/864e5;break;case l:ue=$/r;break;case s:ue=$/i;break;case o:ue=$/n;break;default:ue=$}return Y?ue:U.a(ue)},ae.daysInMonth=function(){return this.endOf(f).$D},ae.$locale=function(){return T[this.$L]},ae.locale=function(H,te){if(!H)return this.$L;var Y=this.clone(),ue=R(H,te,!0);return ue&&(Y.$L=ue),Y},ae.clone=function(){return U.w(this.$d,this)},ae.toDate=function(){return new Date(this.valueOf())},ae.toJSON=function(){return this.isValid()?this.toISOString():null},ae.toISOString=function(){return this.$d.toISOString()},ae.toString=function(){return this.$d.toUTCString()},q})(),Z=P.prototype;return V.prototype=Z,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",c],["$M",f],["$y",m],["$D",p]].forEach((function(q){Z[q[1]]=function(ae){return this.$g(ae,q[0],q[1])}})),V.extend=function(q,ae){return q.$i||(q(ae,P,V),q.$i=!0),V},V.locale=R,V.isDayjs=I,V.unix=function(q){return V(1e3*q)},V.en=T[F],V.Ls=T,V.p={},V}))})(eN)),eN.exports}var dqe=cqe();const dn=Rk(dqe);function $D(t,e){return t?t==="month"?0:t==="year"?1:2:e}function uqe(t){return t===0?"month":t===1?"year":"decade"}function uy(t,e,n){return uqe(Lw($D(t,0),$D(e,0),$D(n,2)))}var fqe=Rn(()=>({calendar:{}})),Aqe=Rn((t,e,{size:n})=>({monthLevelGroup:{display:"flex","& [data-month-level]:not(:last-of-type)":{marginRight:Xt({size:n,sizes:t.spacing})}}})),mqe=Rn(t=>({monthLevel:{},calendarHeader:{marginBottom:t.spacing.xs}}));const hqe={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–"},pqe=N.createContext(hqe);var gqe=Object.defineProperty,vqe=Object.defineProperties,yqe=Object.getOwnPropertyDescriptors,Rq=Object.getOwnPropertySymbols,kqe=Object.prototype.hasOwnProperty,bqe=Object.prototype.propertyIsEnumerable,Pq=(t,e,n)=>e in t?gqe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sqe=(t,e)=>{for(var n in e||(e={}))kqe.call(e,n)&&Pq(t,n,e[n]);if(Rq)for(var n of Rq(e))bqe.call(e,n)&&Pq(t,n,e[n]);return t},wqe=(t,e)=>vqe(t,yqe(e));function Hf(){const t=N.useContext(pqe),e=N.useCallback(a=>a||t.locale,[t.locale]),n=N.useCallback(a=>typeof a=="number"?a:t.firstDayOfWeek,[t.firstDayOfWeek]),i=N.useCallback(a=>Array.isArray(a)?a:t.weekendDays,[t.weekendDays]),r=N.useCallback(a=>typeof a=="string"?a:t.labelSeparator,[t.labelSeparator]);return wqe(Sqe({},t),{getLocale:e,getFirstDayOfWeek:n,getWeekendDays:i,getLabelSeparator:r})}function Nqe(t,e=1){const n=new Date(t);for(;n.getDay()!==e;)n.setDate(n.getDate()-1);return n}function Cqe(t,e=1){const n=new Date(t),i=e===0?6:e-1;for(;n.getDay()!==i;)n.setDate(n.getDate()+1);return n}function xqe(t,e=1){const n=t.getMonth(),i=new Date(t.getFullYear(),n,1),r=new Date(t.getFullYear(),t.getMonth()+1,0),a=Cqe(r,e),o=Nqe(i,e),s=[];for(;o<=a;){const l=[];for(let c=0;c<7;c+=1)l.push(new Date(o)),o.setDate(o.getDate()+1);s.push(l)}return s}function Bse(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function Tse(t,e){return e instanceof Date?dn(t).isBefore(dn(e).add(1,"day"),"day"):!0}function Dse(t,e){return e instanceof Date?dn(t).isAfter(dn(e).subtract(1,"day"),"day"):!0}var Fqe=Object.defineProperty,_qe=Object.defineProperties,Eqe=Object.getOwnPropertyDescriptors,Lq=Object.getOwnPropertySymbols,Bqe=Object.prototype.hasOwnProperty,Tqe=Object.prototype.propertyIsEnumerable,Uq=(t,e,n)=>e in t?Fqe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Dqe=(t,e)=>{for(var n in e||(e={}))Bqe.call(e,n)&&Uq(t,n,e[n]);if(Lq)for(var n of Lq(e))Tqe.call(e,n)&&Uq(t,n,e[n]);return t},Iqe=(t,e)=>_qe(t,Eqe(e)),Oqe=Rn(t=>({monthThead:{},monthRow:{},monthTbody:{},monthCell:{padding:0,"&[data-with-spacing]":{padding:At(.5)}},month:Iqe(Dqe({},t.fn.fontStyles()),{borderCollapse:"collapse",tableLayout:"fixed","& *":{boxSizing:"border-box"}})}));function Rqe(t,e,n,i,r,a,o){const s=t.flat().filter(d=>{var f;return Tse(d,n)&&Dse(d,e)&&!r?.(d)&&!((f=i?.(d))!=null&&f.disabled)&&(!a||Bse(d,o))}),l=s.find(d=>{var f;return(f=i?.(d))==null?void 0:f.selected});if(l)return l;const c=s.find(d=>dn().isSame(d,"date"));return c||s[0]}var Pqe=Object.defineProperty,sx=Object.getOwnPropertySymbols,Ise=Object.prototype.hasOwnProperty,Ose=Object.prototype.propertyIsEnumerable,Mq=(t,e,n)=>e in t?Pqe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Lqe=(t,e)=>{for(var n in e||(e={}))Ise.call(e,n)&&Mq(t,n,e[n]);if(sx)for(var n of sx(e))Ose.call(e,n)&&Mq(t,n,e[n]);return t},Uqe=(t,e)=>{var n={};for(var i in t)Ise.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&sx)for(var i of sx(t))e.indexOf(i)<0&&Ose.call(t,i)&&(n[i]=t[i]);return n};const Mqe={tabIndex:0,size:"sm"},Rse=N.forwardRef((t,e)=>{const n=pn("Day",Mqe,t),{className:i,date:r,radius:a,disabled:o,styles:s,classNames:l,unstyled:c,__staticSelector:d,weekend:f,outside:h,selected:m,renderDay:p,inRange:g,firstInRange:b,lastInRange:k,hidden:S,static:C,variant:x,size:F}=n,T=Uqe(n,["className","date","radius","disabled","styles","classNames","unstyled","__staticSelector","weekend","outside","selected","renderDay","inRange","firstInRange","lastInRange","hidden","static","variant","size"]),{classes:E,cx:I}=XGe({radius:a,isStatic:C},{name:["Day",d],classNames:l,styles:s,unstyled:c,variant:x,size:F});return se.createElement(ev,Lqe({component:C?"div":"button",ref:e,className:I(E.day,i),disabled:o,"data-today":dn(r).isSame(new Date,"day")||void 0,"data-hidden":S||void 0,"data-disabled":o||void 0,"data-weekend":!o&&!h&&f||void 0,"data-outside":!o&&h||void 0,"data-selected":!o&&m||void 0,"data-in-range":g&&!o||void 0,"data-first-in-range":b&&!o||void 0,"data-last-in-range":k&&!o||void 0,unstyled:c},T),p?.(r)||r.getDate())});Rse.displayName="@mantine/dates/Day";function $qe({locale:t,format:e="dd",firstDayOfWeek:n=1}){const i=dn().day(n),r=[];for(let a=0;a<7;a+=1)typeof e=="string"?r.push(dn(i).add(a,"days").locale(t).format(e)):r.push(e(dn(i).add(a,"days").toDate()));return r}var jqe=Rn((t,e,{size:n})=>({weekdaysRow:{},weekday:{color:t.colorScheme==="dark"?t.colors.dark[1]:t.colors.gray[5],fontWeight:400,fontSize:Xt({size:n,sizes:t.fontSizes}),textTransform:"capitalize",paddingBottom:`calc(${Xt({size:n,sizes:t.spacing})} / 2)`}})),Qqe=Object.defineProperty,lx=Object.getOwnPropertySymbols,Pse=Object.prototype.hasOwnProperty,Lse=Object.prototype.propertyIsEnumerable,$q=(t,e,n)=>e in t?Qqe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hqe=(t,e)=>{for(var n in e||(e={}))Pse.call(e,n)&&$q(t,n,e[n]);if(lx)for(var n of lx(e))Lse.call(e,n)&&$q(t,n,e[n]);return t},zqe=(t,e)=>{var n={};for(var i in t)Pse.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&lx)for(var i of lx(t))e.indexOf(i)<0&&Lse.call(t,i)&&(n[i]=t[i]);return n};const Vqe={weekdayFormat:"dd",cellComponent:"th",size:"sm"},Use=N.forwardRef((t,e)=>{const n=pn("WeekdaysRow",Vqe,t),{className:i,locale:r,firstDayOfWeek:a,weekdayFormat:o,cellComponent:s,__staticSelector:l,classNames:c,styles:d,unstyled:f,variant:h,size:m}=n,p=zqe(n,["className","locale","firstDayOfWeek","weekdayFormat","cellComponent","__staticSelector","classNames","styles","unstyled","variant","size"]),g=Hf(),{classes:b,cx:k}=jqe(null,{name:["WeekdaysRow",l],classNames:c,styles:d,unstyled:f,variant:h,size:m}),S=$qe({locale:g.getLocale(r),format:o,firstDayOfWeek:g.getFirstDayOfWeek(a)}).map((C,x)=>se.createElement(s,{key:x,className:b.weekday},C));return se.createElement(mi,Hqe({component:"tr",ref:e,className:k(b.weekdaysRow,i)},p),S)});Use.displayName="@mantine/dates/WeekdaysRow";var Gqe=Object.defineProperty,qqe=Object.defineProperties,Kqe=Object.getOwnPropertyDescriptors,cx=Object.getOwnPropertySymbols,Mse=Object.prototype.hasOwnProperty,$se=Object.prototype.propertyIsEnumerable,jq=(t,e,n)=>e in t?Gqe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,XS=(t,e)=>{for(var n in e||(e={}))Mse.call(e,n)&&jq(t,n,e[n]);if(cx)for(var n of cx(e))$se.call(e,n)&&jq(t,n,e[n]);return t},jD=(t,e)=>qqe(t,Kqe(e)),Wqe=(t,e)=>{var n={};for(var i in t)Mse.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&cx)for(var i of cx(t))e.indexOf(i)<0&&$se.call(t,i)&&(n[i]=t[i]);return n};const Yqe={size:"sm",withCellSpacing:!0},jse=N.forwardRef((t,e)=>{const n=pn("Month",Yqe,t),{className:i,classNames:r,styles:a,unstyled:o,__staticSelector:s,locale:l,firstDayOfWeek:c,weekdayFormat:d,month:f,weekendDays:h,getDayProps:m,excludeDate:p,minDate:g,maxDate:b,renderDay:k,hideOutsideDates:S,hideWeekdays:C,getDayAriaLabel:x,static:F,__getDayRef:T,__onDayKeyDown:E,__onDayClick:I,__onDayMouseEnter:R,__preventFocus:V,__stopPropagation:U,withCellSpacing:P,size:Z,variant:q}=n,ae=Wqe(n,["className","classNames","styles","unstyled","__staticSelector","locale","firstDayOfWeek","weekdayFormat","month","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","static","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","__preventFocus","__stopPropagation","withCellSpacing","size","variant"]),H=Hf(),{classes:te,cx:Y}=Oqe(null,{name:["Month",s],classNames:r,styles:a,unstyled:o,variant:q,size:Z}),ue={__staticSelector:s||"Month",classNames:r,styles:a,unstyled:o,variant:q,size:Z},we=xqe(f,H.getFirstDayOfWeek(c)),ie=Rqe(we,g,b,m,p,S,f),L=we.map((j,$)=>{const W=j.map((J,K)=>{const fe=!Bse(J,f),ge=x?.(J)||dn(J).locale(l||H.locale).format("D MMMM YYYY"),Se=m?.(J),oe=dn(J).isSame(ie,"date");return se.createElement("td",{key:J.toString(),className:te.monthCell,"data-with-spacing":P||void 0},se.createElement(Rse,jD(XS(jD(XS({},ue),{"data-mantine-stop-propagation":U||void 0,renderDay:k,date:J,weekend:H.getWeekendDays(h).includes(J.getDay()),outside:fe,hidden:S?fe:!1,"aria-label":ge,static:F,disabled:p?.(J)||!Tse(J,b)||!Dse(J,g),ref:le=>T?.($,K,le)}),Se),{onKeyDown:le=>{var Ee;(Ee=Se?.onKeyDown)==null||Ee.call(Se,le),E?.(le,{rowIndex:$,cellIndex:K,date:J})},onMouseEnter:le=>{var Ee;(Ee=Se?.onMouseEnter)==null||Ee.call(Se,le),R?.(le,J)},onClick:le=>{var Ee;(Ee=Se?.onClick)==null||Ee.call(Se,le),I?.(le,J)},onMouseDown:le=>{var Ee;(Ee=Se?.onMouseDown)==null||Ee.call(Se,le),V&&le.preventDefault()},tabIndex:V||!oe?-1:0})))});return se.createElement("tr",{key:$,className:te.monthRow},W)});return se.createElement(mi,XS({component:"table",className:Y(te.month,i),ref:e},ae),!C&&se.createElement("thead",{className:te.monthThead},se.createElement(Use,jD(XS({},ue),{locale:l,firstDayOfWeek:c,weekdayFormat:d}))),se.createElement("tbody",{className:te.monthTbody},L))});jse.displayName="@mantine/dates/Month";var Xqe=Object.defineProperty,dx=Object.getOwnPropertySymbols,Qse=Object.prototype.hasOwnProperty,Hse=Object.prototype.propertyIsEnumerable,Qq=(t,e,n)=>e in t?Xqe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,QD=(t,e)=>{for(var n in e||(e={}))Qse.call(e,n)&&Qq(t,n,e[n]);if(dx)for(var n of dx(e))Hse.call(e,n)&&Qq(t,n,e[n]);return t},Zqe=(t,e)=>{var n={};for(var i in t)Qse.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&dx)for(var i of dx(t))e.indexOf(i)<0&&Hse.call(t,i)&&(n[i]=t[i]);return n};const Jqe={monthLabelFormat:"MMMM YYYY"},zse=N.forwardRef((t,e)=>{const n=pn("MonthLevel",Jqe,t),{month:i,locale:r,firstDayOfWeek:a,weekdayFormat:o,weekendDays:s,getDayProps:l,excludeDate:c,minDate:d,maxDate:f,renderDay:h,hideOutsideDates:m,hideWeekdays:p,getDayAriaLabel:g,__getDayRef:b,__onDayKeyDown:k,__onDayClick:S,__onDayMouseEnter:C,withCellSpacing:x,__preventFocus:F,__stopPropagation:T,nextIcon:E,previousIcon:I,nextLabel:R,previousLabel:V,onNext:U,onPrevious:P,onLevelClick:Z,nextDisabled:q,previousDisabled:ae,hasNextLevel:H,levelControlAriaLabel:te,withNext:Y,withPrevious:ue,className:we,monthLabelFormat:ie,classNames:L,styles:j,unstyled:$,__staticSelector:W,size:J,variant:K,static:fe}=n,ge=Zqe(n,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","__stopPropagation","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","monthLabelFormat","classNames","styles","unstyled","__staticSelector","size","variant","static"]),{classes:Se,cx:oe}=mqe(null,{name:["MonthLevel",W],classNames:L,styles:j,unstyled:$,variant:K,size:J}),le=Hf(),Ee={__staticSelector:W||"MonthLevel",classNames:L,styles:j,unstyled:$,variant:K,size:J},Le=typeof q=="boolean"?q:f?!dn(i).endOf("month").isBefore(f):!1,ve=typeof ae=="boolean"?ae:d?!dn(i).startOf("month").isAfter(d):!1;return se.createElement(mi,QD({className:oe(Se.monthLevel,we),"data-month-level":!0,ref:e},ge),se.createElement(NF,QD({label:typeof ie=="function"?ie(i):dn(i).locale(r||le.locale).format(ie),className:Se.calendarHeader,__preventFocus:F,__stopPropagation:T,nextIcon:E,previousIcon:I,nextLabel:R,previousLabel:V,onNext:U,onPrevious:P,onLevelClick:Z,nextDisabled:Le,previousDisabled:ve,hasNextLevel:H,levelControlAriaLabel:te,withNext:Y,withPrevious:ue},Ee)),se.createElement(jse,QD({month:i,locale:r,firstDayOfWeek:a,weekdayFormat:o,weekendDays:s,getDayProps:l,excludeDate:c,minDate:d,maxDate:f,renderDay:h,hideOutsideDates:m,hideWeekdays:p,getDayAriaLabel:g,__getDayRef:b,__onDayKeyDown:k,__onDayClick:S,__onDayMouseEnter:C,__preventFocus:F,__stopPropagation:T,static:fe,withCellSpacing:x},Ee)))});zse.displayName="@mantine/dates/MonthLevel";function eKe({direction:t,levelIndex:e,rowIndex:n,cellIndex:i,size:r}){switch(t){case"up":return e===0&&n===0?null:n===0?{levelIndex:e-1,rowIndex:i<=r[e-1][r[e-1].length-1]-1?r[e-1].length-1:r[e-1].length-2,cellIndex:i}:{levelIndex:e,rowIndex:n-1,cellIndex:i};case"down":return n===r[e].length-1?{levelIndex:e+1,rowIndex:0,cellIndex:i}:n===r[e].length-2&&i>=r[e][r[e].length-1]?{levelIndex:e+1,rowIndex:0,cellIndex:i}:{levelIndex:e,rowIndex:n+1,cellIndex:i};case"left":return e===0&&n===0&&i===0?null:n===0&&i===0?{levelIndex:e-1,rowIndex:r[e-1].length-1,cellIndex:r[e-1][r[e-1].length-1]-1}:i===0?{levelIndex:e,rowIndex:n-1,cellIndex:r[e][n-1]-1}:{levelIndex:e,rowIndex:n,cellIndex:i-1};case"right":return n===r[e].length-1&&i===r[e][n]-1?{levelIndex:e+1,rowIndex:0,cellIndex:0}:i===r[e][n]-1?{levelIndex:e,rowIndex:n+1,cellIndex:0}:{levelIndex:e,rowIndex:n,cellIndex:i+1};default:return{levelIndex:e,rowIndex:n,cellIndex:i}}}function Vse({controlsRef:t,direction:e,levelIndex:n,rowIndex:i,cellIndex:r,size:a}){var o,s;const l=eKe({direction:e,size:a,rowIndex:i,cellIndex:r,levelIndex:n});if(!l)return;const c=(s=(o=t.current[l.levelIndex])==null?void 0:o[l.rowIndex])==null?void 0:s[l.cellIndex];c&&(c.disabled||c.getAttribute("data-hidden")||c.getAttribute("data-outside")?Vse({controlsRef:t,direction:e,levelIndex:l.levelIndex,cellIndex:l.cellIndex,rowIndex:l.rowIndex,size:a}):c.focus())}function tKe(t){switch(t){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function nKe(t){return t.current.map(e=>e.map(n=>n.length))}function s6({controlsRef:t,levelIndex:e,rowIndex:n,cellIndex:i,event:r}){const a=tKe(r.key);if(a){r.preventDefault();const o=nKe(t);Vse({controlsRef:t,direction:a,levelIndex:e,rowIndex:n,cellIndex:i,size:o})}}var iKe=Object.defineProperty,ux=Object.getOwnPropertySymbols,Gse=Object.prototype.hasOwnProperty,qse=Object.prototype.propertyIsEnumerable,Hq=(t,e,n)=>e in t?iKe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rKe=(t,e)=>{for(var n in e||(e={}))Gse.call(e,n)&&Hq(t,n,e[n]);if(ux)for(var n of ux(e))qse.call(e,n)&&Hq(t,n,e[n]);return t},aKe=(t,e)=>{var n={};for(var i in t)Gse.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&ux)for(var i of ux(t))e.indexOf(i)<0&&qse.call(t,i)&&(n[i]=t[i]);return n};const oKe={numberOfColumns:1},Kse=N.forwardRef((t,e)=>{const n=pn("MonthLevelGroup",oKe,t),{month:i,locale:r,firstDayOfWeek:a,weekdayFormat:o,weekendDays:s,getDayProps:l,excludeDate:c,minDate:d,maxDate:f,renderDay:h,hideOutsideDates:m,hideWeekdays:p,getDayAriaLabel:g,__onDayClick:b,__onDayMouseEnter:k,withCellSpacing:S,__preventFocus:C,nextIcon:x,previousIcon:F,nextLabel:T,previousLabel:E,onNext:I,onPrevious:R,onLevelClick:V,nextDisabled:U,previousDisabled:P,hasNextLevel:Z,className:q,classNames:ae,styles:H,unstyled:te,numberOfColumns:Y,levelControlAriaLabel:ue,monthLabelFormat:we,__staticSelector:ie,__stopPropagation:L,size:j,variant:$,static:W}=n,J=aKe(n,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","numberOfColumns","levelControlAriaLabel","monthLabelFormat","__staticSelector","__stopPropagation","size","variant","static"]),{classes:K,cx:fe}=Aqe(null,{name:["MonthLevelGroup",ie],classNames:ae,styles:H,unstyled:te,variant:$,size:j}),ge=N.useRef([]),Se=Array(Y).fill(0).map((oe,le)=>{const Ee=dn(i).add(le,"months").toDate();return se.createElement(zse,{key:le,month:Ee,withNext:le===Y-1,withPrevious:le===0,monthLabelFormat:we,__stopPropagation:L,__onDayClick:b,__onDayMouseEnter:k,__onDayKeyDown:(Le,ve)=>s6({levelIndex:le,rowIndex:ve.rowIndex,cellIndex:ve.cellIndex,event:Le,controlsRef:ge}),__getDayRef:(Le,ve,Ae)=>{Array.isArray(ge.current[le])||(ge.current[le]=[]),Array.isArray(ge.current[le][Le])||(ge.current[le][Le]=[]),ge.current[le][Le][ve]=Ae},levelControlAriaLabel:typeof ue=="function"?ue(Ee):ue,locale:r,firstDayOfWeek:a,weekdayFormat:o,weekendDays:s,getDayProps:l,excludeDate:c,minDate:d,maxDate:f,renderDay:h,hideOutsideDates:m,hideWeekdays:p,getDayAriaLabel:g,__preventFocus:C,nextIcon:x,previousIcon:F,nextLabel:T,previousLabel:E,onNext:I,onPrevious:R,onLevelClick:V,nextDisabled:U,previousDisabled:P,hasNextLevel:Z,classNames:ae,styles:H,unstyled:te,__staticSelector:ie||"MonthLevelGroup",size:j,variant:$,static:W,withCellSpacing:S})});return se.createElement(mi,rKe({className:fe(K.monthLevelGroup,q),ref:e},J),Se)});Kse.displayName="@mantine/dates/MonthLevelGroup";var sKe=Rn((t,e,{size:n})=>({yearLevelGroup:{display:"flex","& [data-year-level]:not(:last-of-type)":{marginRight:Xt({size:n,sizes:t.spacing})}}})),lKe=Rn(t=>({yearLevel:{},calendarHeader:{marginBottom:t.spacing.xs}}));function cKe(t){const e=dn(t).startOf("year").toDate(),n=[[],[],[],[]];let i=0;for(let r=0;r<4;r+=1)for(let a=0;a<3;a+=1)n[r].push(dn(e).add(i,"months").toDate()),i+=1;return n}function Wse(t,e,n){return!e&&!n?!1:!!(e&&dn(t).isBefore(e,"month")||n&&dn(t).isAfter(n,"month"))}var dKe=Rn(()=>({monthsList:{borderCollapse:"collapse",borderWidth:0,cursor:"pointer"},monthsListCell:{padding:0,"&[data-with-spacing]":{padding:At(.5)}},monthsListRow:{}}));function uKe(t,e,n,i){const r=t.flat().filter(s=>{var l;return!Wse(s,e,n)&&!((l=i?.(s))!=null&&l.disabled)}),a=r.find(s=>{var l;return(l=i?.(s))==null?void 0:l.selected});if(a)return a;const o=r.find(s=>dn().isSame(s,"month"));return o||r[0]}var fKe=Object.defineProperty,AKe=Object.defineProperties,mKe=Object.getOwnPropertyDescriptors,zq=Object.getOwnPropertySymbols,hKe=Object.prototype.hasOwnProperty,pKe=Object.prototype.propertyIsEnumerable,Vq=(t,e,n)=>e in t?fKe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ZS=(t,e)=>{for(var n in e||(e={}))hKe.call(e,n)&&Vq(t,n,e[n]);if(zq)for(var n of zq(e))pKe.call(e,n)&&Vq(t,n,e[n]);return t},Gq=(t,e)=>AKe(t,mKe(e)),gKe=Rn((t,e,{size:n})=>{const i=t.fn.variant({variant:"filled"}),r=t.fn.variant({variant:"light"});return{pickerControl:Gq(ZS({fontSize:Xt({size:n,sizes:t.fontSizes}),height:Xt({size:n,sizes:kk}),width:`calc((${Xt({size:n,sizes:kk})} * 7) / 3 + ${At(1.5)})`,display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",borderRadius:t.fn.radius()},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),{"&:active":t.activeStyles,"&[data-in-range]":ZS({backgroundColor:r.background,borderRadius:0},t.fn.hover({backgroundColor:r.hover})),"&[data-first-in-range]":{borderRadius:0,borderTopLeftRadius:t.radius.sm,borderBottomLeftRadius:t.radius.sm},"&[data-last-in-range]":{borderRadius:0,borderTopRightRadius:t.radius.sm,borderBottomRightRadius:t.radius.sm},"&[data-last-in-range][data-first-in-range]":{borderRadius:t.radius.sm},"&[data-selected]":ZS({color:i.color,backgroundColor:i.background},t.fn.hover({backgroundColor:i.hover})),"&[data-disabled]":Gq(ZS({color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4],cursor:"not-allowed"},t.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}}),vKe=Object.defineProperty,fx=Object.getOwnPropertySymbols,Yse=Object.prototype.hasOwnProperty,Xse=Object.prototype.propertyIsEnumerable,qq=(t,e,n)=>e in t?vKe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yKe=(t,e)=>{for(var n in e||(e={}))Yse.call(e,n)&&qq(t,n,e[n]);if(fx)for(var n of fx(e))Xse.call(e,n)&&qq(t,n,e[n]);return t},kKe=(t,e)=>{var n={};for(var i in t)Yse.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&fx)for(var i of fx(t))e.indexOf(i)<0&&Xse.call(t,i)&&(n[i]=t[i]);return n};const bKe={size:"sm"},l6=N.forwardRef((t,e)=>{const n=pn("PickerControl",bKe,t),{className:i,children:r,disabled:a,selected:o,classNames:s,styles:l,unstyled:c,firstInRange:d,lastInRange:f,inRange:h,__staticSelector:m,size:p,variant:g}=n,b=kKe(n,["className","children","disabled","selected","classNames","styles","unstyled","firstInRange","lastInRange","inRange","__staticSelector","size","variant"]),{classes:k,cx:S}=gKe(null,{name:["PickerControl",m],classNames:s,styles:l,unstyled:c,variant:g,size:p});return se.createElement(ev,yKe({className:S(k.pickerControl,i),ref:e,unstyled:c,"data-picker-control":!0,"data-selected":o&&!a||void 0,"data-disabled":a||void 0,"data-in-range":h&&!a&&!o||void 0,"data-first-in-range":d&&!a||void 0,"data-last-in-range":f&&!a||void 0,disabled:a},b),r)});l6.displayName="@mantine/dates/PickerControl";var SKe=Object.defineProperty,wKe=Object.defineProperties,NKe=Object.getOwnPropertyDescriptors,Ax=Object.getOwnPropertySymbols,Zse=Object.prototype.hasOwnProperty,Jse=Object.prototype.propertyIsEnumerable,Kq=(t,e,n)=>e in t?SKe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Wq=(t,e)=>{for(var n in e||(e={}))Zse.call(e,n)&&Kq(t,n,e[n]);if(Ax)for(var n of Ax(e))Jse.call(e,n)&&Kq(t,n,e[n]);return t},CKe=(t,e)=>wKe(t,NKe(e)),xKe=(t,e)=>{var n={};for(var i in t)Zse.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Ax)for(var i of Ax(t))e.indexOf(i)<0&&Jse.call(t,i)&&(n[i]=t[i]);return n};const FKe={monthsListFormat:"MMM",size:"sm",withCellSpacing:!0},ele=N.forwardRef((t,e)=>{const n=pn("MonthsList",FKe,t),{year:i,className:r,monthsListFormat:a,locale:o,minDate:s,maxDate:l,getMonthControlProps:c,classNames:d,styles:f,unstyled:h,__staticSelector:m,__getControlRef:p,__onControlKeyDown:g,__onControlClick:b,__onControlMouseEnter:k,__preventFocus:S,size:C,variant:x,__stopPropagation:F,withCellSpacing:T}=n,E=xKe(n,["year","className","monthsListFormat","locale","minDate","maxDate","getMonthControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","size","variant","__stopPropagation","withCellSpacing"]),{classes:I,cx:R}=dKe(null,{name:["MonthsList",m],classNames:d,styles:f,unstyled:h,variant:x,size:C}),V=Hf(),U=cKe(i),P=uKe(U,s,l,c),Z=U.map((q,ae)=>{const H=q.map((te,Y)=>{const ue=c?.(te),we=dn(te).isSame(P,"month");return se.createElement("td",{key:Y,className:I.monthsListCell,"data-with-spacing":T||void 0},se.createElement(l6,CKe(Wq({variant:x,size:C,classNames:d,styles:f,unstyled:h,__staticSelector:m||"MonthsList","data-mantine-stop-propagation":F||void 0,disabled:Wse(te,s,l),ref:ie=>p?.(ae,Y,ie)},ue),{onKeyDown:ie=>{var L;(L=ue?.onKeyDown)==null||L.call(ue,ie),g?.(ie,{rowIndex:ae,cellIndex:Y,date:te})},onClick:ie=>{var L;(L=ue?.onClick)==null||L.call(ue,ie),b?.(ie,te)},onMouseEnter:ie=>{var L;(L=ue?.onMouseEnter)==null||L.call(ue,ie),k?.(ie,te)},onMouseDown:ie=>{var L;(L=ue?.onMouseDown)==null||L.call(ue,ie),S&&ie.preventDefault()},tabIndex:S||!we?-1:0}),dn(te).locale(V.getLocale(o)).format(a)))});return se.createElement("tr",{key:ae,className:I.monthsListRow},H)});return se.createElement(mi,Wq({component:"table",ref:e,className:R(I.monthsList,r)},E),se.createElement("tbody",null,Z))});ele.displayName="@mantine/dates/MonthsList";var _Ke=Object.defineProperty,mx=Object.getOwnPropertySymbols,tle=Object.prototype.hasOwnProperty,nle=Object.prototype.propertyIsEnumerable,Yq=(t,e,n)=>e in t?_Ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,HD=(t,e)=>{for(var n in e||(e={}))tle.call(e,n)&&Yq(t,n,e[n]);if(mx)for(var n of mx(e))nle.call(e,n)&&Yq(t,n,e[n]);return t},EKe=(t,e)=>{var n={};for(var i in t)tle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&mx)for(var i of mx(t))e.indexOf(i)<0&&nle.call(t,i)&&(n[i]=t[i]);return n};const BKe={yearLabelFormat:"YYYY",size:"sm"},ile=N.forwardRef((t,e)=>{const n=pn("YearLevel",BKe,t),{year:i,locale:r,minDate:a,maxDate:o,monthsListFormat:s,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:d,__onControlClick:f,__onControlMouseEnter:h,withCellSpacing:m,__preventFocus:p,nextIcon:g,previousIcon:b,nextLabel:k,previousLabel:S,onNext:C,onPrevious:x,onLevelClick:F,nextDisabled:T,previousDisabled:E,hasNextLevel:I,levelControlAriaLabel:R,withNext:V,withPrevious:U,className:P,yearLabelFormat:Z,classNames:q,styles:ae,unstyled:H,__staticSelector:te,__stopPropagation:Y,size:ue,variant:we}=n,ie=EKe(n,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","yearLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","size","variant"]),{classes:L,cx:j}=lKe(null,{name:["YearLevel",te],classNames:q,styles:ae,unstyled:H,size:ue,variant:we}),$=Hf(),W={__staticSelector:te||"YearLevel",classNames:q,styles:ae,unstyled:H,size:ue,variant:we},J=typeof T=="boolean"?T:o?!dn(i).endOf("year").isBefore(o):!1,K=typeof E=="boolean"?E:a?!dn(i).startOf("year").isAfter(a):!1;return se.createElement(mi,HD({className:j(L.yearLevel,P),"data-year-level":!0,ref:e},ie),se.createElement(NF,HD({label:typeof Z=="function"?Z(i):dn(i).locale(r||$.locale).format(Z),className:L.calendarHeader,__preventFocus:p,__stopPropagation:Y,nextIcon:g,previousIcon:b,nextLabel:k,previousLabel:S,onNext:C,onPrevious:x,onLevelClick:F,nextDisabled:J,previousDisabled:K,hasNextLevel:I,levelControlAriaLabel:R,withNext:V,withPrevious:U},W)),se.createElement(ele,HD({year:i,locale:r,minDate:a,maxDate:o,monthsListFormat:s,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:d,__onControlClick:f,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:Y,withCellSpacing:m},W)))});ile.displayName="@mantine/dates/YearLevel";var TKe=Object.defineProperty,hx=Object.getOwnPropertySymbols,rle=Object.prototype.hasOwnProperty,ale=Object.prototype.propertyIsEnumerable,Xq=(t,e,n)=>e in t?TKe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,DKe=(t,e)=>{for(var n in e||(e={}))rle.call(e,n)&&Xq(t,n,e[n]);if(hx)for(var n of hx(e))ale.call(e,n)&&Xq(t,n,e[n]);return t},IKe=(t,e)=>{var n={};for(var i in t)rle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&hx)for(var i of hx(t))e.indexOf(i)<0&&ale.call(t,i)&&(n[i]=t[i]);return n};const OKe={numberOfColumns:1,size:"sm"},ole=N.forwardRef((t,e)=>{const n=pn("YearLevelGroup",OKe,t),{year:i,locale:r,minDate:a,maxDate:o,monthsListFormat:s,getMonthControlProps:l,__onControlClick:c,__onControlMouseEnter:d,withCellSpacing:f,__preventFocus:h,nextIcon:m,previousIcon:p,nextLabel:g,previousLabel:b,onNext:k,onPrevious:S,onLevelClick:C,nextDisabled:x,previousDisabled:F,hasNextLevel:T,className:E,classNames:I,styles:R,unstyled:V,__staticSelector:U,__stopPropagation:P,numberOfColumns:Z,levelControlAriaLabel:q,yearLabelFormat:ae,variant:H,size:te}=n,Y=IKe(n,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","yearLabelFormat","variant","size"]),{classes:ue,cx:we}=sKe(null,{name:["YearLevelGroup",U],styles:R,classNames:I,unstyled:V,variant:H,size:te}),ie=N.useRef([]),L=Array(Z).fill(0).map((j,$)=>{const W=dn(i).add($,"years").toDate();return se.createElement(ile,{key:$,variant:H,size:te,monthsListFormat:s,year:W,withNext:$===Z-1,withPrevious:$===0,yearLabelFormat:ae,__stopPropagation:P,__onControlClick:c,__onControlMouseEnter:d,__onControlKeyDown:(J,K)=>s6({levelIndex:$,rowIndex:K.rowIndex,cellIndex:K.cellIndex,event:J,controlsRef:ie}),__getControlRef:(J,K,fe)=>{Array.isArray(ie.current[$])||(ie.current[$]=[]),Array.isArray(ie.current[$][J])||(ie.current[$][J]=[]),ie.current[$][J][K]=fe},levelControlAriaLabel:typeof q=="function"?q(W):q,locale:r,minDate:a,maxDate:o,__preventFocus:h,nextIcon:m,previousIcon:p,nextLabel:g,previousLabel:b,onNext:k,onPrevious:S,onLevelClick:C,nextDisabled:x,previousDisabled:F,hasNextLevel:T,getMonthControlProps:l,classNames:I,styles:R,unstyled:V,__staticSelector:U||"YearLevelGroup",withCellSpacing:f})});return se.createElement(mi,DKe({className:we(ue.yearLevelGroup,E),ref:e},Y),L)});ole.displayName="@mantine/dates/YearLevelGroup";var RKe=Rn(t=>({decadeLevelGroup:{display:"flex",gap:t.spacing.md}}));function sle(t){const e=t.getFullYear(),n=e-e%10;let i=0;const r=[[],[],[],[]];for(let a=0;a<4;a+=1){const o=a===3?1:3;for(let s=0;s<o;s+=1)r[a].push(new Date(n+i,0)),i+=1}return r}function PKe(t){const e=sle(t);return[e[0][0],e[3][0]]}var LKe=Rn(t=>({decadeLevel:{},calendarHeader:{marginBottom:t.spacing.xs}}));function lle(t,e,n){return!e&&!n?!1:!!(e&&dn(t).isBefore(e,"year")||n&&dn(t).isAfter(n,"year"))}var UKe=Rn(()=>({yearsList:{borderCollapse:"collapse",borderWidth:0},yearsListCell:{padding:0,"&[data-with-spacing]":{padding:At(.5)}},yearsListRow:{}}));function MKe(t,e,n,i){const r=t.flat().filter(s=>{var l;return!lle(s,e,n)&&!((l=i?.(s))!=null&&l.disabled)}),a=r.find(s=>{var l;return(l=i?.(s))==null?void 0:l.selected});if(a)return a;const o=r.find(s=>dn().isSame(s,"year"));return o||r[0]}var $Ke=Object.defineProperty,jKe=Object.defineProperties,QKe=Object.getOwnPropertyDescriptors,px=Object.getOwnPropertySymbols,cle=Object.prototype.hasOwnProperty,dle=Object.prototype.propertyIsEnumerable,Zq=(t,e,n)=>e in t?$Ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jq=(t,e)=>{for(var n in e||(e={}))cle.call(e,n)&&Zq(t,n,e[n]);if(px)for(var n of px(e))dle.call(e,n)&&Zq(t,n,e[n]);return t},HKe=(t,e)=>jKe(t,QKe(e)),zKe=(t,e)=>{var n={};for(var i in t)cle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&px)for(var i of px(t))e.indexOf(i)<0&&dle.call(t,i)&&(n[i]=t[i]);return n};const VKe={yearsListFormat:"YYYY",size:"sm",withCellSpacing:!0},ule=N.forwardRef((t,e)=>{const n=pn("YearsList",VKe,t),{decade:i,className:r,yearsListFormat:a,locale:o,minDate:s,maxDate:l,getYearControlProps:c,classNames:d,styles:f,unstyled:h,__staticSelector:m,__getControlRef:p,__onControlKeyDown:g,__onControlClick:b,__onControlMouseEnter:k,__preventFocus:S,__stopPropagation:C,size:x,variant:F,withCellSpacing:T}=n,E=zKe(n,["decade","className","yearsListFormat","locale","minDate","maxDate","getYearControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","__stopPropagation","size","variant","withCellSpacing"]),{classes:I,cx:R}=UKe(null,{name:["YearsList",m],classNames:d,styles:f,unstyled:h,variant:F,size:x}),V=Hf(),U=sle(i),P=MKe(U,s,l,c),Z=U.map((q,ae)=>{const H=q.map((te,Y)=>{const ue=c?.(te),we=dn(te).isSame(P,"year");return se.createElement("td",{key:Y,className:I.yearsListCell,"data-with-spacing":T||void 0},se.createElement(l6,HKe(Jq({size:x,variant:F,classNames:d,styles:f,unstyled:h,__staticSelector:m||"YearsList","data-mantine-stop-propagation":C||void 0,disabled:lle(te,s,l),ref:ie=>p?.(ae,Y,ie)},ue),{onKeyDown:ie=>{var L;(L=ue?.onKeyDown)==null||L.call(ue,ie),g?.(ie,{rowIndex:ae,cellIndex:Y,date:te})},onClick:ie=>{var L;(L=ue?.onClick)==null||L.call(ue,ie),b?.(ie,te)},onMouseEnter:ie=>{var L;(L=ue?.onMouseEnter)==null||L.call(ue,ie),k?.(ie,te)},onMouseDown:ie=>{var L;(L=ue?.onMouseDown)==null||L.call(ue,ie),S&&ie.preventDefault()},tabIndex:S||!we?-1:0}),dn(te).locale(V.getLocale(o)).format(a)))});return se.createElement("tr",{key:ae,className:I.yearsListRow},H)});return se.createElement(mi,Jq({component:"table",ref:e,className:R(I.yearsList,r)},E),se.createElement("tbody",null,Z))});ule.displayName="@mantine/dates/YearsList";var GKe=Object.defineProperty,gx=Object.getOwnPropertySymbols,fle=Object.prototype.hasOwnProperty,Ale=Object.prototype.propertyIsEnumerable,eK=(t,e,n)=>e in t?GKe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zD=(t,e)=>{for(var n in e||(e={}))fle.call(e,n)&&eK(t,n,e[n]);if(gx)for(var n of gx(e))Ale.call(e,n)&&eK(t,n,e[n]);return t},qKe=(t,e)=>{var n={};for(var i in t)fle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&gx)for(var i of gx(t))e.indexOf(i)<0&&Ale.call(t,i)&&(n[i]=t[i]);return n};const KKe={decadeLabelFormat:"YYYY"},mle=N.forwardRef((t,e)=>{const n=pn("DecadeLevel",KKe,t),{decade:i,locale:r,minDate:a,maxDate:o,yearsListFormat:s,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:d,__onControlClick:f,__onControlMouseEnter:h,withCellSpacing:m,__preventFocus:p,nextIcon:g,previousIcon:b,nextLabel:k,previousLabel:S,onNext:C,onPrevious:x,nextDisabled:F,previousDisabled:T,levelControlAriaLabel:E,withNext:I,withPrevious:R,className:V,decadeLabelFormat:U,classNames:P,styles:Z,unstyled:q,__staticSelector:ae,__stopPropagation:H,variant:te,size:Y}=n,ue=qKe(n,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","levelControlAriaLabel","withNext","withPrevious","className","decadeLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","variant","size"]),{classes:we,cx:ie}=LKe(null,{name:["DecadeLevel",ae],classNames:P,styles:Z,unstyled:q,variant:te,size:Y}),L=Hf(),[j,$]=PKe(i),W={__staticSelector:ae||"DecadeLevel",classNames:P,styles:Z,unstyled:q,variant:te,size:Y},J=typeof F=="boolean"?F:o?!dn($).endOf("year").isBefore(o):!1,K=typeof T=="boolean"?T:a?!dn(j).startOf("year").isAfter(a):!1,fe=(ge,Se)=>dn(ge).locale(r||L.locale).format(Se);return se.createElement(mi,zD({className:ie(we.decadeLevel,V),"data-decade-level":!0,ref:e},ue),se.createElement(NF,zD({label:typeof U=="function"?U(j,$):`${fe(j,U)} – ${fe($,U)}`,className:we.calendarHeader,__preventFocus:p,__stopPropagation:H,nextIcon:g,previousIcon:b,nextLabel:k,previousLabel:S,onNext:C,onPrevious:x,nextDisabled:J,previousDisabled:K,hasNextLevel:!1,levelControlAriaLabel:E,withNext:I,withPrevious:R},W)),se.createElement(ule,zD({decade:i,locale:r,minDate:a,maxDate:o,yearsListFormat:s,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:d,__onControlClick:f,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:H,withCellSpacing:m},W)))});mle.displayName="@mantine/dates/DecadeLevel";var WKe=Object.defineProperty,vx=Object.getOwnPropertySymbols,hle=Object.prototype.hasOwnProperty,ple=Object.prototype.propertyIsEnumerable,tK=(t,e,n)=>e in t?WKe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,YKe=(t,e)=>{for(var n in e||(e={}))hle.call(e,n)&&tK(t,n,e[n]);if(vx)for(var n of vx(e))ple.call(e,n)&&tK(t,n,e[n]);return t},XKe=(t,e)=>{var n={};for(var i in t)hle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&vx)for(var i of vx(t))e.indexOf(i)<0&&ple.call(t,i)&&(n[i]=t[i]);return n};const ZKe={numberOfColumns:1},gle=N.forwardRef((t,e)=>{const n=pn("DecadeLevelGroup",ZKe,t),{decade:i,locale:r,minDate:a,maxDate:o,yearsListFormat:s,getYearControlProps:l,__onControlClick:c,__onControlMouseEnter:d,withCellSpacing:f,__preventFocus:h,nextIcon:m,previousIcon:p,nextLabel:g,previousLabel:b,onNext:k,onPrevious:S,nextDisabled:C,previousDisabled:x,className:F,classNames:T,styles:E,unstyled:I,__staticSelector:R,__stopPropagation:V,numberOfColumns:U,levelControlAriaLabel:P,decadeLabelFormat:Z,variant:q,size:ae}=n,H=XKe(n,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","decadeLabelFormat","variant","size"]),{classes:te,cx:Y}=RKe(null,{name:["DecadeLevelGroup",R],styles:E,classNames:T,unstyled:I,variant:q,size:ae}),ue=N.useRef([]),we=Array(U).fill(0).map((ie,L)=>{const j=dn(i).add(L*10,"years").toDate();return se.createElement(mle,{key:L,variant:q,size:ae,yearsListFormat:s,decade:j,withNext:L===U-1,withPrevious:L===0,decadeLabelFormat:Z,__onControlClick:c,__onControlMouseEnter:d,__onControlKeyDown:($,W)=>s6({levelIndex:L,rowIndex:W.rowIndex,cellIndex:W.cellIndex,event:$,controlsRef:ue}),__getControlRef:($,W,J)=>{Array.isArray(ue.current[L])||(ue.current[L]=[]),Array.isArray(ue.current[L][$])||(ue.current[L][$]=[]),ue.current[L][$][W]=J},levelControlAriaLabel:typeof P=="function"?P(j):P,locale:r,minDate:a,maxDate:o,__preventFocus:h,__stopPropagation:V,nextIcon:m,previousIcon:p,nextLabel:g,previousLabel:b,onNext:k,onPrevious:S,nextDisabled:C,previousDisabled:x,getYearControlProps:l,__staticSelector:R||"DecadeLevelGroup",classNames:T,styles:E,unstyled:I,withCellSpacing:f})});return se.createElement(mi,YKe({className:Y(te.decadeLevelGroup,F),ref:e},H),we)});gle.displayName="@mantine/dates/DecadeLevelGroup";var JKe=Object.defineProperty,yx=Object.getOwnPropertySymbols,vle=Object.prototype.hasOwnProperty,yle=Object.prototype.propertyIsEnumerable,nK=(t,e,n)=>e in t?JKe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,JS=(t,e)=>{for(var n in e||(e={}))vle.call(e,n)&&nK(t,n,e[n]);if(yx)for(var n of yx(e))yle.call(e,n)&&nK(t,n,e[n]);return t},eWe=(t,e)=>{var n={};for(var i in t)vle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&yx)for(var i of yx(t))e.indexOf(i)<0&&yle.call(t,i)&&(n[i]=t[i]);return n};const tWe={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},c6=N.forwardRef((t,e)=>{const n=pn("Calendar",tWe,t),{maxLevel:i,minLevel:r,defaultLevel:a,level:o,onLevelChange:s,date:l,defaultDate:c,onDateChange:d,numberOfColumns:f,columnsToScroll:h,ariaLabels:m,onYearSelect:p,onMonthSelect:g,onYearMouseEnter:b,onMonthMouseEnter:k,__updateDateOnYearSelect:S,__updateDateOnMonthSelect:C,firstDayOfWeek:x,weekdayFormat:F,weekendDays:T,getDayProps:E,excludeDate:I,renderDay:R,hideOutsideDates:V,hideWeekdays:U,getDayAriaLabel:P,monthLabelFormat:Z,nextIcon:q,previousIcon:ae,__onDayClick:H,__onDayMouseEnter:te,withCellSpacing:Y,monthsListFormat:ue,getMonthControlProps:we,yearLabelFormat:ie,yearsListFormat:L,getYearControlProps:j,decadeLabelFormat:$,minDate:W,maxDate:J,locale:K,className:fe,classNames:ge,styles:Se,__staticSelector:oe,unstyled:le,variant:Ee,size:Le,__preventFocus:ve,__stopPropagation:Ae,onNextDecade:Q,onPreviousDecade:X,onNextYear:ne,onPreviousYear:ce,onNextMonth:ke,onPreviousMonth:Ne,static:$e}=n,Ge=eWe(n,["maxLevel","minLevel","defaultLevel","level","onLevelChange","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","nextIcon","previousIcon","__onDayClick","__onDayMouseEnter","withCellSpacing","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","minDate","maxDate","locale","className","classNames","styles","__staticSelector","unstyled","variant","size","__preventFocus","__stopPropagation","onNextDecade","onPreviousDecade","onNextYear","onPreviousYear","onNextMonth","onPreviousMonth","static"]),{classes:He,cx:We}=fqe(null,{name:["Calendar",oe],classNames:ge,styles:Se,unstyled:le,variant:Ee,size:Le}),[ct,ut]=_h({value:o?uy(o,r,i):void 0,defaultValue:a?uy(a,r,i):void 0,finalValue:uy(void 0,r,i),onChange:s}),[yt,me]=_h({value:l,defaultValue:c,finalValue:null,onChange:d}),z={__staticSelector:oe||"Calendar",styles:Se,classNames:ge,unstyled:le,variant:Ee,size:Le},ee=h||f||1,xe=yt||new Date,Be=()=>{const ot=dn(xe).add(ee,"month").toDate();ke?.(ot),me(ot)},Ue=()=>{const ot=dn(xe).subtract(ee,"month").toDate();Ne?.(ot),me(ot)},_e=()=>{const ot=dn(xe).add(ee,"year").toDate();ne?.(ot),me(ot)},Pe=()=>{const ot=dn(xe).subtract(ee,"year").toDate();ce?.(ot),me(ot)},xt=()=>{const ot=dn(xe).add(10*ee,"year").toDate();Q?.(ot),me(ot)},Je=()=>{const ot=dn(xe).subtract(10*ee,"year").toDate();X?.(ot),me(ot)};return se.createElement(mi,JS({className:We(He.calendar,fe),ref:e},Ge),ct==="month"&&se.createElement(Kse,JS({month:xe,minDate:W,maxDate:J,firstDayOfWeek:x,weekdayFormat:F,weekendDays:T,getDayProps:E,excludeDate:I,renderDay:R,hideOutsideDates:V,hideWeekdays:U,getDayAriaLabel:P,onNext:Be,onPrevious:Ue,hasNextLevel:i!=="month",onLevelClick:()=>ut("year"),numberOfColumns:f,locale:K,levelControlAriaLabel:m?.monthLevelControl,nextLabel:m?.nextMonth,nextIcon:q,previousLabel:m?.previousMonth,previousIcon:ae,monthLabelFormat:Z,__onDayClick:H,__onDayMouseEnter:te,__preventFocus:ve,__stopPropagation:Ae,static:$e,withCellSpacing:Y},z)),ct==="year"&&se.createElement(ole,JS({year:xe,numberOfColumns:f,minDate:W,maxDate:J,monthsListFormat:ue,getMonthControlProps:we,locale:K,onNext:_e,onPrevious:Pe,hasNextLevel:i!=="month"&&i!=="year",onLevelClick:()=>ut("decade"),levelControlAriaLabel:m?.yearLevelControl,nextLabel:m?.nextYear,nextIcon:q,previousLabel:m?.previousYear,previousIcon:ae,yearLabelFormat:ie,__onControlMouseEnter:k,__onControlClick:(ot,dt)=>{C&&me(dt),ut(uy("month",r,i)),g?.(dt)},__preventFocus:ve,__stopPropagation:Ae,withCellSpacing:Y},z)),ct==="decade"&&se.createElement(gle,JS({decade:xe,minDate:W,maxDate:J,yearsListFormat:L,getYearControlProps:j,locale:K,onNext:xt,onPrevious:Je,numberOfColumns:f,nextLabel:m?.nextDecade,nextIcon:q,previousLabel:m?.previousDecade,previousIcon:ae,decadeLabelFormat:$,__onControlMouseEnter:b,__onControlClick:(ot,dt)=>{S&&me(dt),ut(uy("year",r,i)),p?.(dt)},__preventFocus:ve,__stopPropagation:Ae,withCellSpacing:Y},z)))});c6.displayName="@mantine/dates/Calendar";var iK=Object.getOwnPropertySymbols,nWe=Object.prototype.hasOwnProperty,iWe=Object.prototype.propertyIsEnumerable,rWe=(t,e)=>{var n={};for(var i in t)nWe.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&iK)for(var i of iK(t))e.indexOf(i)<0&&iWe.call(t,i)&&(n[i]=t[i]);return n};function d6(t){const e=t,{maxLevel:n,minLevel:i,defaultLevel:r,level:a,onLevelChange:o,nextIcon:s,previousIcon:l,date:c,defaultDate:d,onDateChange:f,numberOfColumns:h,columnsToScroll:m,ariaLabels:p,onYearSelect:g,onMonthSelect:b,onYearMouseEnter:k,onMonthMouseEnter:S,onNextMonth:C,onPreviousMonth:x,onNextYear:F,onPreviousYear:T,onNextDecade:E,onPreviousDecade:I,withCellSpacing:R,__updateDateOnYearSelect:V,__updateDateOnMonthSelect:U,firstDayOfWeek:P,weekdayFormat:Z,weekendDays:q,getDayProps:ae,excludeDate:H,renderDay:te,hideOutsideDates:Y,hideWeekdays:ue,getDayAriaLabel:we,monthLabelFormat:ie,monthsListFormat:L,getMonthControlProps:j,yearLabelFormat:$,yearsListFormat:W,getYearControlProps:J,decadeLabelFormat:K,allowSingleDateInRange:fe,allowDeselect:ge,minDate:Se,maxDate:oe,locale:le}=e,Ee=rWe(e,["maxLevel","minLevel","defaultLevel","level","onLevelChange","nextIcon","previousIcon","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","onNextMonth","onPreviousMonth","onNextYear","onPreviousYear","onNextDecade","onPreviousDecade","withCellSpacing","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","allowSingleDateInRange","allowDeselect","minDate","maxDate","locale"]);return{calendarProps:{maxLevel:n,minLevel:i,defaultLevel:r,level:a,onLevelChange:o,nextIcon:s,previousIcon:l,date:c,defaultDate:d,onDateChange:f,numberOfColumns:h,columnsToScroll:m,ariaLabels:p,onYearSelect:g,onMonthSelect:b,onYearMouseEnter:k,onMonthMouseEnter:S,onNextMonth:C,onPreviousMonth:x,onNextYear:F,onPreviousYear:T,onNextDecade:E,onPreviousDecade:I,withCellSpacing:R,__updateDateOnYearSelect:V,__updateDateOnMonthSelect:U,firstDayOfWeek:P,weekdayFormat:Z,weekendDays:q,getDayProps:ae,excludeDate:H,renderDay:te,hideOutsideDates:Y,hideWeekdays:ue,getDayAriaLabel:we,monthLabelFormat:ie,monthsListFormat:L,getMonthControlProps:j,yearLabelFormat:$,yearsListFormat:W,getYearControlProps:J,decadeLabelFormat:K,allowSingleDateInRange:fe,allowDeselect:ge,minDate:Se,maxDate:oe,locale:le},others:Ee}}function aWe(t,e){if(e==="range"&&Array.isArray(t)){const[n,i]=t;return n?i?`${n.toISOString()} – ${i.toISOString()}`:`${n.toISOString()} –`:""}return e==="multiple"&&Array.isArray(t)?t.map(n=>n.toISOString()).join(", "):!Array.isArray(t)&&t?t.toISOString():""}function kle({value:t,type:e,name:n,form:i}){return se.createElement("input",{type:"hidden",value:aWe(t,e),name:n,form:i})}kle.displayName="@mantine/dates/HiddenDatesInput";function rK(t,e){if(!t||!e)return e;const n=t.getHours(),i=t.getMinutes(),r=t.getSeconds(),a=t.getMilliseconds(),o=new Date(e);return o.setHours(n),o.setMinutes(i),o.setSeconds(r),o.setMilliseconds(a),o}const aK=t=>t==="range"?[null,null]:t==="multiple"?[]:null;function ble({type:t,value:e,defaultValue:n,onChange:i}){const r=N.useRef(t),[a,o]=_h({value:e,defaultValue:n,onChange:i,finalValue:aK(t)});let s=a;return r.current!==t&&(r.current=t,e===void 0&&(s=n!==void 0?n:aK(t),o(s))),[s,o]}function oK(t,e){const n=[...e].sort((i,r)=>i.getTime()-r.getTime());return dn(n[0]).startOf("day").subtract(1,"ms").isBefore(t)&&dn(n[1]).endOf("day").add(1,"ms").isAfter(t)}function Sle({type:t,level:e,value:n,defaultValue:i,onChange:r,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:s}){const[l,c]=ble({type:t,value:n,defaultValue:i,onChange:r}),[d,f]=N.useState(t==="range"&&l[0]&&!l[1]?l[0]:null),[h,m]=N.useState(null),p=F=>{if(t==="range"){if(d instanceof Date&&!l[1]){if(dn(F).isSame(d,e)&&!a){f(null),m(null),c([null,null]);return}const T=[F,d];T.sort((E,I)=>E.getTime()-I.getTime()),c(T),m(null),f(null);return}if(l[0]&&!l[1]&&dn(F).isSame(l[0],e)&&!a){f(null),m(null),c([null,null]);return}c([F,null]),m(null),f(F);return}if(t==="multiple"){l.some(T=>dn(T).isSame(F,e))?c(l.filter(T=>!dn(T).isSame(F,e))):c([...l,F]);return}l&&o&&dn(F).isSame(l,e)?c(null):c(F)},g=F=>d instanceof Date&&h instanceof Date?oK(F,[h,d]):l[0]instanceof Date&&l[1]instanceof Date?oK(F,l):!1,b=t==="range"?F=>{s?.(F),m(null)}:s,k=F=>l[0]instanceof Date&&dn(F).isSame(l[0],e)?!(h&&dn(h).isBefore(l[0])):!1,S=F=>l[1]instanceof Date?dn(F).isSame(l[1],e):!(l[0]instanceof Date)||!h?!1:dn(h).isBefore(l[0])&&dn(F).isSame(l[0],e);return{onDateChange:p,onRootMouseLeave:b,onHoveredDateChange:t==="range"&&d?m:()=>{},getControlProps:F=>{if(t==="range")return{selected:l.some(E=>E&&dn(E).isSame(F,e)),inRange:g(F),firstInRange:k(F),lastInRange:S(F),"data-autofocus":!!l[0]&&dn(l[0]).isSame(F,e)||void 0};if(t==="multiple")return{selected:l.some(E=>E&&dn(E).isSame(F,e)),"data-autofocus":!!l[0]&&dn(l[0]).isSame(F,e)||void 0};const T=dn(l).isSame(F,e);return{selected:T,"data-autofocus":T||void 0}},_value:l,setValue:c}}var oWe=Object.defineProperty,kx=Object.getOwnPropertySymbols,wle=Object.prototype.hasOwnProperty,Nle=Object.prototype.propertyIsEnumerable,sK=(t,e,n)=>e in t?oWe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,VD=(t,e)=>{for(var n in e||(e={}))wle.call(e,n)&&sK(t,n,e[n]);if(kx)for(var n of kx(e))Nle.call(e,n)&&sK(t,n,e[n]);return t},sWe=(t,e)=>{var n={};for(var i in t)wle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&kx)for(var i of kx(t))e.indexOf(i)<0&&Nle.call(t,i)&&(n[i]=t[i]);return n};const lWe={type:"default",numberOfColumns:1},u6=N.forwardRef((t,e)=>{const n=pn("DatePicker",lWe,t),{type:i,defaultValue:r,value:a,onChange:o,__staticSelector:s,getDayProps:l,allowSingleDateInRange:c,allowDeselect:d,onMouseLeave:f,numberOfColumns:h}=n,m=sWe(n,["type","defaultValue","value","onChange","__staticSelector","getDayProps","allowSingleDateInRange","allowDeselect","onMouseLeave","numberOfColumns"]),{onDateChange:p,onRootMouseLeave:g,onHoveredDateChange:b,getControlProps:k}=Sle({type:i,level:"day",allowDeselect:d,allowSingleDateInRange:c,value:a,defaultValue:r,onChange:o,onMouseLeave:f});return se.createElement(c6,VD({ref:e,minLevel:"month",__staticSelector:s||"DatePicker",onMouseLeave:g,hideOutsideDates:h!==1,numberOfColumns:h,__onDayMouseEnter:(S,C)=>b(C),__onDayClick:(S,C)=>p(C),getDayProps:S=>VD(VD({},k(S)),l?.(S))},m))});u6.displayName="@mantine/dates/DatePicker";function cWe({type:t,date:e,locale:n,format:i,labelSeparator:r}){const a=o=>dn(o).locale(n).format(i);return t==="default"?e===null?"":a(e):t==="multiple"?e.map(a).join(", "):t==="range"?e[0]&&e[1]?`${a(e[0])} ${r} ${a(e[1])}`:e[0]?`${a(e[0])} ${r} `:"":""}function Cle({type:t,value:e,defaultValue:n,onChange:i,locale:r,format:a,closeOnChange:o,sortDates:s,labelSeparator:l}){const c=Hf(),[d,f]=kP(!1),[h,m]=ble({type:t,value:e,defaultValue:n,onChange:i}),p=cWe({type:t,date:h,locale:c.getLocale(r),format:a,labelSeparator:c.getLabelSeparator(l)}),g=S=>{o&&(t==="default"&&f.close(),t==="range"&&S[0]&&S[1]&&f.close()),m(s&&t==="multiple"?[...S].sort((C,x)=>C.getTime()-x.getTime()):S)},b=()=>g(t==="range"?[null,null]:t==="multiple"?[]:null),k=t==="range"?!!h[0]:t==="multiple"?h.length>0:h!==null;return{_value:h,setValue:g,onClear:b,shouldClear:k,formattedValue:p,dropdownOpened:d,dropdownHandlers:f}}function lO({minDate:t,maxDate:e}){const n=new Date;return!t&&!e?n:dn(n).isBefore(t)?t:dn(n).isAfter(e)?e:n}var dWe=Rn(()=>({placeholder:{},input:{cursor:"pointer",lineHeight:"unset","&[data-read-only]":{cursor:"default"}}})),uWe=Object.defineProperty,fWe=Object.defineProperties,AWe=Object.getOwnPropertyDescriptors,bx=Object.getOwnPropertySymbols,xle=Object.prototype.hasOwnProperty,Fle=Object.prototype.propertyIsEnumerable,lK=(t,e,n)=>e in t?uWe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ym=(t,e)=>{for(var n in e||(e={}))xle.call(e,n)&&lK(t,n,e[n]);if(bx)for(var n of bx(e))Fle.call(e,n)&&lK(t,n,e[n]);return t},cK=(t,e)=>fWe(t,AWe(e)),mWe=(t,e)=>{var n={};for(var i in t)xle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&bx)for(var i of bx(t))e.indexOf(i)<0&&Fle.call(t,i)&&(n[i]=t[i]);return n};const hWe={},CF=N.forwardRef((t,e)=>{const n=BP("PickerInputBase",hWe,t),{inputProps:i,wrapperProps:r,placeholder:a,classNames:o,styles:s,unstyled:l,popoverProps:c,modalProps:d,dropdownType:f,children:h,formattedValue:m,dropdownHandlers:p,dropdownOpened:g,onClick:b,clearable:k,onClear:S,clearButtonProps:C,rightSection:x,shouldClear:F,readOnly:T,disabled:E,value:I,name:R,form:V,type:U}=n,P=mWe(n,["inputProps","wrapperProps","placeholder","classNames","styles","unstyled","popoverProps","modalProps","dropdownType","children","formattedValue","dropdownHandlers","dropdownOpened","onClick","clearable","onClear","clearButtonProps","rightSection","shouldClear","readOnly","disabled","value","name","form","type"]),{classes:Z,cx:q}=dWe(null,{name:i.__staticSelector,classNames:o,styles:s,unstyled:l,variant:i.variant,size:i.size}),ae=x||(k&&F&&!T&&!E?se.createElement(SP,Ym({variant:"transparent",onClick:S,unstyled:l,size:i.size},C)):null),H=()=>{U==="range"&&I[0]&&!I[1]&&S(),p.close()},te=r.label;return se.createElement(se.Fragment,null,f==="modal"&&!T&&se.createElement(fc,Ym({opened:g,onClose:H,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:l},d),h),se.createElement(Ef.Wrapper,Ym({},r),se.createElement(_f,Ym({position:"bottom-start",opened:g,onClose:H,disabled:f==="modal"||T,trapFocus:!0,returnFocus:!0,unstyled:l},c),se.createElement(_f.Target,{shouldOverrideDefaultTargetId:!te},se.createElement(Ef,Ym(cK(Ym({"aria-label":m,"data-dates-input":!0,"data-read-only":T||void 0,disabled:E,component:"button",type:"button",multiline:!0,onClick:Y=>{b?.(Y),p.toggle()},rightSection:ae},i),{ref:e,classNames:cK(Ym({},o),{input:q(Z.input,o?.input)})}),P),m||se.createElement(Ef.Placeholder,{className:Z.placeholder,sx:{color:i.error?"inherit":void 0}},a))),se.createElement(_f.Dropdown,{"data-dates-dropdown":!0},h))),se.createElement(kle,{value:I,name:R,form:V,type:U}))});CF.displayName="@mantine/dates/PickerInputBase";var pWe=Object.defineProperty,gWe=Object.defineProperties,vWe=Object.getOwnPropertyDescriptors,Sx=Object.getOwnPropertySymbols,_le=Object.prototype.hasOwnProperty,Ele=Object.prototype.propertyIsEnumerable,dK=(t,e,n)=>e in t?pWe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uK=(t,e)=>{for(var n in e||(e={}))_le.call(e,n)&&dK(t,n,e[n]);if(Sx)for(var n of Sx(e))Ele.call(e,n)&&dK(t,n,e[n]);return t},yWe=(t,e)=>gWe(t,vWe(e)),kWe=(t,e)=>{var n={};for(var i in t)_le.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Sx)for(var i of Sx(t))e.indexOf(i)<0&&Ele.call(t,i)&&(n[i]=t[i]);return n};const bWe={type:"default",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},f6=N.forwardRef((t,e)=>{const n=pn("DatePickerInput",bWe,t),{type:i,value:r,defaultValue:a,onChange:o,valueFormat:s,labelSeparator:l,locale:c,classNames:d,styles:f,unstyled:h,closeOnChange:m,size:p,variant:g,dropdownType:b,sortDates:k,maxDate:S,minDate:C,defaultDate:x}=n,F=kWe(n,["type","value","defaultValue","onChange","valueFormat","labelSeparator","locale","classNames","styles","unstyled","closeOnChange","size","variant","dropdownType","sortDates","maxDate","minDate","defaultDate"]),{calendarProps:T,others:E}=d6(F),{_value:I,setValue:R,formattedValue:V,dropdownHandlers:U,dropdownOpened:P,onClear:Z,shouldClear:q}=Cle({type:i,value:r,defaultValue:a,onChange:o,locale:c,format:s,labelSeparator:l,closeOnChange:m,sortDates:k}),ae=x||lO({maxDate:S,minDate:C});return se.createElement(CF,uK({formattedValue:V,dropdownOpened:P,dropdownHandlers:U,classNames:d,styles:f,unstyled:h,__staticSelector:"DatePickerInput",ref:e,onClear:Z,shouldClear:q,value:I,type:i,size:p,variant:g,dropdownType:b},E),se.createElement(u6,yWe(uK({},T),{size:p,variant:g,type:i,value:I,defaultDate:Array.isArray(I)?I[0]||ae:I||ae,onChange:R,locale:c,classNames:d,styles:f,unstyled:h,__staticSelector:"DatePickerInput",__stopPropagation:b==="popover",maxDate:S,minDate:C})))});f6.displayName="@mantine/dates/DatePickerInput";var SWe=Rn(t=>({timeWrapper:{display:"flex",marginTop:t.spacing.md},timeInput:{flex:1,marginRight:t.spacing.md}})),wWe=Rn(t=>({input:{paddingTop:0,paddingBottom:0,appearance:"none","&::-webkit-calendar-picker-indicator":{display:"none"},"&::-webkit-clear-button":{display:"none"},"&::-webkit-datetime-edit-hour-field, &::-webkit-datetime-edit-minute-field, &::-webkit-datetime-edit-second-field":{paddingTop:0,maxHeight:At(30),display:"inline","&:focus":{backgroundColor:t.fn.variant({variant:"filled"}).background,color:t.white}}}})),NWe=Object.defineProperty,CWe=Object.defineProperties,xWe=Object.getOwnPropertyDescriptors,wx=Object.getOwnPropertySymbols,Ble=Object.prototype.hasOwnProperty,Tle=Object.prototype.propertyIsEnumerable,fK=(t,e,n)=>e in t?NWe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AK=(t,e)=>{for(var n in e||(e={}))Ble.call(e,n)&&fK(t,n,e[n]);if(wx)for(var n of wx(e))Tle.call(e,n)&&fK(t,n,e[n]);return t},FWe=(t,e)=>CWe(t,xWe(e)),_We=(t,e)=>{var n={};for(var i in t)Ble.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&wx)for(var i of wx(t))e.indexOf(i)<0&&Tle.call(t,i)&&(n[i]=t[i]);return n};const EWe={},Dle=N.forwardRef((t,e)=>{const n=pn("TimeInput",EWe,t),{classNames:i,withSeconds:r,variant:a,size:o,styles:s,unstyled:l}=n,c=_We(n,["classNames","withSeconds","variant","size","styles","unstyled"]),{classes:d,cx:f}=wWe(null,{name:"TimeInput",classNames:i,styles:s,unstyled:l,variant:a,size:o});return se.createElement(RP,AK({type:"time",step:r?1:60,classNames:FWe(AK({},i),{input:f(d.input,i?.input)}),styles:s,unstyled:l,variant:a,size:o,ref:e,__staticSelector:"TimeInput"},c))});Dle.displayName="@mantine/dates/TimeInput";var BWe=Object.defineProperty,TWe=Object.defineProperties,DWe=Object.getOwnPropertyDescriptors,Nx=Object.getOwnPropertySymbols,Ile=Object.prototype.hasOwnProperty,Ole=Object.prototype.propertyIsEnumerable,mK=(t,e,n)=>e in t?BWe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ew=(t,e)=>{for(var n in e||(e={}))Ile.call(e,n)&&mK(t,n,e[n]);if(Nx)for(var n of Nx(e))Ole.call(e,n)&&mK(t,n,e[n]);return t},GD=(t,e)=>TWe(t,DWe(e)),hK=(t,e)=>{var n={};for(var i in t)Ile.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Nx)for(var i of Nx(t))e.indexOf(i)<0&&Ole.call(t,i)&&(n[i]=t[i]);return n};const IWe={size:"sm",dropdownType:"popover"},Rle=N.forwardRef((t,e)=>{const n=pn("DateTimePicker",IWe,t),{value:i,defaultValue:r,onChange:a,valueFormat:o,locale:s,classNames:l,styles:c,unstyled:d,timeInputProps:f,submitButtonProps:h,withSeconds:m,level:p,defaultLevel:g,size:b,variant:k,dropdownType:S}=n,C=hK(n,["value","defaultValue","onChange","valueFormat","locale","classNames","styles","unstyled","timeInputProps","submitButtonProps","withSeconds","level","defaultLevel","size","variant","dropdownType"]),x=o||(m?"DD/MM/YYYY HH:mm:ss":"DD/MM/YYYY HH:mm"),{classes:F,cx:T}=SWe(null,{name:"DateTimePicker",classNames:l,styles:c,unstyled:d,variant:k,size:b}),E=N.useRef(),I=Yh(E,f?.ref),R=d6(C),{calendarProps:V}=R,U=V,P=hK(U,["allowSingleDateInRange"]),{others:Z}=R,q=Hf(),[ae,H]=_h({value:i,defaultValue:r,finalValue:null,onChange:a}),te=ge=>ge?dn(ge).format(m?"HH:mm:ss":"HH:mm"):"",[Y,ue]=N.useState(te(ae)),[we,ie]=N.useState(p||g||"month"),[L,j]=kP(!1),$=ae?dn(ae).locale(q.getLocale(s)).format(x):"",W=ge=>{var Se;(Se=f?.onChange)==null||Se.call(f,ge);const oe=ge.currentTarget.value;if(ue(oe),oe){const[le,Ee,Le]=oe.split(":").map(Number),ve=new Date;ve.setHours(le),ve.setMinutes(Ee),Le!==void 0&&ve.setSeconds(Le),H(rK(ve,ae||new Date))}},J=ge=>{var Se;H(rK(ae,ge)),(Se=E.current)==null||Se.focus()},K=ge=>{var Se;(Se=f?.onKeyDown)==null||Se.call(f,ge),ge.key==="Enter"&&(ge.preventDefault(),j.close())};hc(()=>{L||ue(te(ae))},[ae,L]),hc(()=>{L&&ie("month")},[L]);const fe=S==="popover";return se.createElement(CF,ew({formattedValue:$,dropdownOpened:L,dropdownHandlers:j,classNames:l,styles:c,unstyled:d,__staticSelector:"DateTimePicker",ref:e,onClear:()=>H(null),shouldClear:!!ae,value:ae,type:"default",size:b,variant:k,dropdownType:S},Z),se.createElement(u6,GD(ew({},P),{size:b,variant:k,type:"default",value:ae,defaultDate:ae,onChange:J,locale:s,classNames:l,styles:c,unstyled:d,__staticSelector:"DateTimePicker",__stopPropagation:fe,level:p,defaultLevel:g,onLevelChange:ge=>{var Se;ie(ge),(Se=P.onLevelChange)==null||Se.call(P,ge)}})),we==="month"&&se.createElement("div",{className:F.timeWrapper},se.createElement(Dle,GD(ew({value:Y,withSeconds:m,ref:I,unstyled:d},f),{className:T(F.timeInput,f?.className),onChange:W,onKeyDown:K,size:b,"data-mantine-stop-propagation":fe||void 0})),se.createElement(zte,GD(ew({variant:"default",size:tc[b],unstyled:d,"data-mantine-stop-propagation":fe||void 0,children:se.createElement(kie,{width:`calc(${tc[b]} / 3)`})},h),{onClick:ge=>{var Se;(Se=h?.onClick)==null||Se.call(h,ge),j.close()}}))))});Rle.displayName="@mantine/dates/DateTimePicker";var OWe=Object.defineProperty,Cx=Object.getOwnPropertySymbols,Ple=Object.prototype.hasOwnProperty,Lle=Object.prototype.propertyIsEnumerable,pK=(t,e,n)=>e in t?OWe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qD=(t,e)=>{for(var n in e||(e={}))Ple.call(e,n)&&pK(t,n,e[n]);if(Cx)for(var n of Cx(e))Lle.call(e,n)&&pK(t,n,e[n]);return t},RWe=(t,e)=>{var n={};for(var i in t)Ple.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Cx)for(var i of Cx(t))e.indexOf(i)<0&&Lle.call(t,i)&&(n[i]=t[i]);return n};const PWe={type:"default"},Ule=N.forwardRef((t,e)=>{const n=pn("MonthPicker",PWe,t),{type:i,defaultValue:r,value:a,onChange:o,__staticSelector:s,getMonthControlProps:l,allowSingleDateInRange:c,allowDeselect:d,onMouseLeave:f,onMonthSelect:h}=n,m=RWe(n,["type","defaultValue","value","onChange","__staticSelector","getMonthControlProps","allowSingleDateInRange","allowDeselect","onMouseLeave","onMonthSelect"]),{onDateChange:p,onRootMouseLeave:g,onHoveredDateChange:b,getControlProps:k}=Sle({type:i,level:"month",allowDeselect:d,allowSingleDateInRange:c,value:a,defaultValue:r,onChange:o,onMouseLeave:f});return se.createElement(c6,qD({ref:e,minLevel:"year",__updateDateOnMonthSelect:!1,__staticSelector:s||"MonthPicker",onMouseLeave:g,onMonthMouseEnter:(S,C)=>b(C),onMonthSelect:S=>{p(S),h?.(S)},getMonthControlProps:S=>qD(qD({},k(S)),l?.(S))},m))});Ule.displayName="@mantine/dates/MonthPicker";var LWe=Object.defineProperty,UWe=Object.defineProperties,MWe=Object.getOwnPropertyDescriptors,xx=Object.getOwnPropertySymbols,Mle=Object.prototype.hasOwnProperty,$le=Object.prototype.propertyIsEnumerable,gK=(t,e,n)=>e in t?LWe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vK=(t,e)=>{for(var n in e||(e={}))Mle.call(e,n)&&gK(t,n,e[n]);if(xx)for(var n of xx(e))$le.call(e,n)&&gK(t,n,e[n]);return t},$We=(t,e)=>UWe(t,MWe(e)),jWe=(t,e)=>{var n={};for(var i in t)Mle.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&xx)for(var i of xx(t))e.indexOf(i)<0&&$le.call(t,i)&&(n[i]=t[i]);return n};const QWe={type:"default",valueFormat:"MMMM YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},jle=N.forwardRef((t,e)=>{const n=pn("MonthPickerInput",QWe,t),{type:i,value:r,defaultValue:a,onChange:o,valueFormat:s,labelSeparator:l,locale:c,classNames:d,styles:f,unstyled:h,closeOnChange:m,variant:p,size:g,dropdownType:b,sortDates:k,minDate:S,maxDate:C}=n,x=jWe(n,["type","value","defaultValue","onChange","valueFormat","labelSeparator","locale","classNames","styles","unstyled","closeOnChange","variant","size","dropdownType","sortDates","minDate","maxDate"]),{calendarProps:F,others:T}=d6(x),{_value:E,setValue:I,formattedValue:R,dropdownHandlers:V,dropdownOpened:U,onClear:P,shouldClear:Z}=Cle({type:i,value:r,defaultValue:a,onChange:o,locale:c,format:s,labelSeparator:l,closeOnChange:m,sortDates:k});return se.createElement(CF,vK({formattedValue:R,dropdownOpened:U,dropdownHandlers:V,classNames:d,styles:f,unstyled:h,__staticSelector:"MonthPickerInput",ref:e,onClear:P,shouldClear:Z,value:E,type:i,variant:p,size:g,dropdownType:b},T),se.createElement(Ule,$We(vK({},F),{type:i,value:E,defaultDate:Array.isArray(E)?E[0]||lO({maxDate:C,minDate:S}):E||lO({maxDate:C,minDate:S}),onChange:I,locale:c,classNames:d,styles:f,unstyled:h,__staticSelector:"MonthPickerInput",__stopPropagation:b==="popover",variant:p,size:g,minDate:S,maxDate:C})))});jle.displayName="@mantine/dates/MonthPickerInput";const Qle=()=>{const[{data:t,fetching:e,error:n},i]=Ns({query:cCe});n&&(console.error(`Error fetching financial entities: ${n}`),fn.error("Error",{description:"Unable to fetch financial entities"}));const r=N.useMemo(()=>t?.allFinancialEntities?.nodes.sort((o,s)=>o.name>s.name?1:-1)??[],[t]),a=N.useMemo(()=>r.map(o=>({value:o.id,label:o.name})),[r]);return{fetching:e,refresh:()=>i(),financialEntities:r,selectableFinancialEntities:a}},HWe=({formManager:t,document:e,defaultCurrency:n})=>{const{control:i,watch:r,trigger:a}=t,[o,s]=N.useState(!1),{selectableFinancialEntities:l,fetching:c}=Qle(),d=NCe(e)||CCe(e)||xCe(e)||_Ce(e)||FCe(e),f=r("documentType");return N.useEffect(()=>{s(!!f&&(f===In.Invoice||f===In.Receipt||f===In.InvoiceReceipt||f===In.Proforma||f===In.CreditInvoice))},[f]),y.jsxs(y.Fragment,{children:[y.jsx(fi,{name:"documentType",control:i,rules:{required:"Required"},defaultValue:e?.documentType??In.Unprocessed,render:({field:h})=>y.jsxs(Ai,{children:[y.jsx(Ji,{children:"Type"}),y.jsxs(Po,{onValueChange:h.onChange,value:h.value??void 0,children:[y.jsx(Li,{children:y.jsx(Uo,{className:"w-full truncate",children:y.jsx(Lo,{placeholder:"Select type"})})}),y.jsx(Mo,{onClick:m=>m.stopPropagation(),children:Object.entries(In).map(([m,p])=>y.jsx(yo,{value:p,children:m},p))})]}),y.jsx(vi,{})]})}),o&&y.jsxs(y.Fragment,{children:[y.jsx(ed,{name:"date",control:i,defaultValue:d?e?.date:void 0,rules:{pattern:{value:bN,message:"Date must be im format yyyy-mm-dd"}},render:({field:h,fieldState:m})=>y.jsx(f6,{...h,onChange:p=>{const g=p?typeof p=="string"?p:Nh(p,"yyyy-MM-dd"):void 0;g!==h.value&&h.onChange(g)},value:h.value?new Date(h.value):void 0,error:m.error?.message,label:"Date",popoverProps:{withinPortal:!0}})}),y.jsx(fi,{name:"serialNumber",control:i,defaultValue:d?e?.serialNumber:void 0,render:({field:h})=>y.jsxs(Ai,{children:[y.jsx(Ji,{children:"Serial Number"}),y.jsx(Li,{children:y.jsx(Qn,{...h,value:!h||h.value==="Missing"?"":h.value})}),y.jsx(vi,{})]})}),y.jsx(fi,{name:"allocationNumber",control:i,defaultValue:d?e?.allocationNumber:void 0,rules:{pattern:{value:/^\d{9}$/,message:"Allocation number must be 9 characters long"}},render:({field:h})=>y.jsxs(Ai,{children:[y.jsx(Ji,{children:"Allocation Number"}),y.jsx(Li,{children:y.jsx(Qn,{...h,value:h.value??void 0})}),y.jsx(vi,{})]})}),y.jsx(fi,{name:"debtorId",control:i,defaultValue:d?e?.debtor?.id:void 0,render:({field:h})=>y.jsxs(Ai,{className:"flex flex-col",children:[y.jsx(Ji,{children:"Debtor"}),y.jsx(bk,{...h,data:l,value:h.value??void 0,disabled:c,placeholder:"Scroll to see all options",formPart:!0}),y.jsx(vi,{})]})}),y.jsx(fi,{name:"creditorId",control:i,defaultValue:d?e?.creditor?.id:void 0,render:({field:h})=>y.jsxs(Ai,{className:"flex flex-col",children:[y.jsx(Ji,{children:"Creditor"}),y.jsx(bk,{...h,data:l,value:h.value??void 0,disabled:c,placeholder:"Scroll to see all options",formPart:!0}),y.jsx(vi,{})]})}),y.jsx(ed,{name:"vat.raw",control:i,defaultValue:d?e?.vat?.raw:void 0,render:({field:h,fieldState:m})=>y.jsx(ed,{name:"vat.currency",control:i,defaultValue:d?e?.amount?.currency??pr.Ils:n,render:({field:p,fieldState:g})=>y.jsx(tN,{...h,error:m.error?.message||g.error?.message,label:"VAT",currencyCodeProps:{...p,label:"Currency",disabled:!0}})})}),y.jsx(ed,{name:"amount.raw",control:i,defaultValue:d?e?.amount?.raw:void 0,render:({field:h,fieldState:m})=>y.jsx(ed,{name:"amount.currency",control:i,defaultValue:d?e?.amount?.currency??pr.Ils:n,render:({field:p,fieldState:g})=>y.jsx(tN,{...h,error:m.error?.message||g.error?.message,label:"Amount",currencyCodeProps:{...p,label:"Currency"}})})}),y.jsx(ed,{name:"vatReportDateOverride",control:i,defaultValue:d?e?.vatReportDateOverride:void 0,rules:{pattern:{value:bN,message:"Date must be im format yyyy-mm-dd"}},render:({field:h,fieldState:m})=>y.jsx(jle,{...h,label:"VAT report date",value:h.value?new Date(h.value):void 0,onChange:p=>{a("vatReportDateOverride"),h.onChange(p?`${Nh(p,"yyyy-MM")}-15`:void 0)},error:m.error?.message,popoverProps:{withinPortal:!0}})}),y.jsx(ed,{name:"noVatAmount",control:i,defaultValue:d?e?.noVatAmount??void 0:void 0,render:({field:h,fieldState:m})=>y.jsx(ed,{name:"amount.currency",control:i,defaultValue:d?e?.amount?.currency??pr.Ils:n,render:({field:p})=>y.jsx(tN,{...h,value:h.value??void 0,error:m.error?.message,label:"no VAT amount",currencyCodeProps:{...p,label:"Currency",disabled:!0}})})})]}),y.jsx(fi,{name:"image",control:i,defaultValue:e?.image,render:({field:h})=>y.jsxs(Ai,{children:[y.jsx(Ji,{children:"Image URL"}),y.jsx(Li,{children:y.jsx(Qn,{...h,value:h.value?.toString()})}),y.jsx(vi,{})]})}),y.jsx(fi,{name:"file",control:i,defaultValue:e?.file,render:({field:h})=>y.jsx("div",{className:"flex flex-row",children:y.jsxs(Ai,{children:[y.jsx(Ji,{children:"File URL"}),y.jsx(Li,{children:y.jsx(Qn,{className:"grow",...h,value:h.value?.toString()})}),y.jsx(vi,{})]})})}),y.jsx(fi,{name:"exchangeRateOverride",control:i,defaultValue:d?e?.exchangeRateOverride:void 0,render:({field:h})=>y.jsxs(Ai,{children:[y.jsxs(Ji,{children:["Exchange Rate Override",y.jsx("span",{className:"text-xs text-muted-foreground",children:`(${d?e?.amount?.currency??pr.Ils:n} => ${pr.Ils})`})]}),y.jsx(Li,{children:y.jsx(Ice,{onValueChange:m=>h.onChange(Number(m)),value:h.value??void 0,hideControls:!0,decimalScale:5,thousandSeparator:","})}),y.jsx(vi,{})]})})]})},zWe=({documentId:t,onDone:e,onChange:n})=>{const[{data:i,fetching:r}]=Ns({query:GNe,variables:{documentId:t}}),a=i?.documentById,o=t0({defaultValues:{...a}}),{handleSubmit:s,formState:{dirtyFields:l},setValue:c,watch:d}=o,[f,h]=N.useState(!1),{updateDocument:m,fetching:p}=cb(),g=k=>{if(!a)return;const S=oZ(k,l);e?.(),S&&Object.keys(S).length>0&&m({documentId:t,fields:S}).then(n)},b=d("amount.currency");return N.useEffect(()=>{c("vat.currency",b)},[c,b]),y.jsxs("div",{className:"flex flex-row",children:[r&&y.jsx(Y2,{className:"flex self-center my-5",color:"dark",size:"xl",variant:"dots"}),!r&&a&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"px-5 w-4/5 h-max justify-items-center",children:y.jsx(fb,{...o,children:y.jsxs("form",{onSubmit:s(g),children:[y.jsxs(mst,{cols:4,children:[y.jsx(HWe,{document:a,formManager:o}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"file",children:"File"}),y.jsx(no,{to:a?.file?.toString()||"",target:"_blank",rel:"noreferrer",className:"flex flex-col items-center justify-center mt-5",children:y.jsx(Qt,{variant:"outline",className:"w-full mb-2",children:"Open File"})})]})]}),y.jsx("div",{className:"flex justify-center mt-5",children:y.jsx(Qt,{type:"submit",variant:"default",disabled:p||Object.keys(l).length===0,children:"Save"})})]})})}),y.jsx("div",{className:" w-1/5 h-max flex flex-col ",children:y.jsx("div",{className:"flex justify-center",children:y.jsx(OP,{onClick:()=>h(!!a.image),src:a?.image?.toString(),className:" cursor-pointer bg-gray-300 p-5 mr-5 max-h-fit max-w-fit"})})}),a.image&&y.jsx(wd,{classNames:{content:"overflow-y-auto drop-shadow-lg"},withCloseButton:!0,withOverlay:!1,position:"right",opened:f,onClose:()=>h(!1),size:"30%",children:y.jsx("div",{className:"m-2",children:y.jsx(Gle,{src:a.image.toString(),zoomLevel:3,magnifierHeight:300,magnifierWidth:300})})})]})]})},VWe=()=>{const[{data:t,fetching:e,error:n},i]=Ns({query:lCe});return n&&(console.error(`Error fetching countries: ${n}`),fn.error("Error",{description:"Unable to fetch countries"})),{fetching:e,refresh:()=>i(),countries:t?.allCountries??[]}},GWe=()=>{const[{data:t,fetching:e,error:n},i]=Ns({query:dCe});n&&(console.error(`Error fetching sort codes: ${n}`),fn.error("Error",{description:"Unable to fetch sort codes"}));const r=N.useMemo(()=>t?.allSortCodes?.sort((o,s)=>(o.name??"")>(s.name??"")?1:-1)??[],[t]),a=N.useMemo(()=>r.map(o=>({value:o.key.toString(),label:o.name??""})),[r]);return{fetching:e,refresh:()=>i(),sortCodes:r,selectableSortCodes:a}},qWe=()=>{const[{data:t,fetching:e,error:n},i]=Ns({query:oCe});n&&(console.error(`Error fetching clients: ${n}`),fn.error("Error",{description:"Unable to fetch clients"}));const r=N.useMemo(()=>t?.allClients?.slice().sort((o,s)=>o.originalBusiness.name>s.originalBusiness.name?1:-1)??[],[t]),a=N.useMemo(()=>r.map(o=>({value:o.originalBusiness.id,label:o.originalBusiness.name})),[r]);return{fetching:e,refresh:()=>i(),clients:r,selectableClients:a}};function xF({className:t,...e}){return y.jsx("textarea",{"data-slot":"textarea",className:Ut("border-gray-200 placeholder:text-gray-500 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:bg-gray-200/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-gray-800 dark:placeholder:text-gray-400 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900 dark:dark:bg-gray-800/30",t),...e})}const KWe=()=>[{value:H4.English,label:"English"},{value:H4.Hebrew,label:"Hebrew"}],A6=()=>[{value:pr.Ils,label:"Israeli Shekel (ILS)"},{value:pr.Usd,label:"US Dollar (USD)"},{value:pr.Eur,label:"Euro (EUR)"},{value:pr.Gbp,label:"British Pound (GBP)"},{value:pr.Jpy,label:"Japanese Yen (JPY)"},{value:pr.Aud,label:"Australian Dollar (AUD)"},{value:pr.Cad,label:"Canadian Dollar (CAD)"},{value:pr.Sek,label:"Swedish Krona (SEK)"}],Hle=()=>[{value:zy.Default,label:"Default (Based on business type)"},{value:zy.Exempt,label:"Exempt (VAT free)"},{value:zy.Mixed,label:"Mixed (Contains exempt and due VAT income rows)"}],zle=()=>[In.CreditInvoice,In.Invoice,In.InvoiceReceipt,In.Receipt,In.Proforma].map(t=>({value:t,label:bv(t)})),WWe=()=>[{value:Me.Il,label:"Israel"},{value:Me.Us,label:"United States"},{value:Me.Gb,label:"United Kingdom"},{value:Me.De,label:"Germany"},{value:Me.Fr,label:"France"},{value:Me.Ca,label:"Canada"},{value:Me.Au,label:"Australia"},{value:Me.Jp,label:"Japan"},{value:Me.Cn,label:"China"},{value:Me.In,label:"India"},{value:Me.Af,label:"Afghanistan"},{value:Me.Ax,label:"Åland Islands"},{value:Me.Al,label:"Albania"},{value:Me.Dz,label:"Algeria"},{value:Me.As,label:"American Samoa"},{value:Me.Ad,label:"Andorra"},{value:Me.Ao,label:"Angola"},{value:Me.Ai,label:"Anguilla"},{value:Me.Aq,label:"Antarctica"},{value:Me.Ag,label:"Antigua and Barbuda"},{value:Me.Ar,label:"Argentina"},{value:Me.Am,label:"Armenia"},{value:Me.Aw,label:"Aruba"},{value:Me.At,label:"Austria"},{value:Me.Az,label:"Azerbaijan"},{value:Me.Bs,label:"Bahamas"},{value:Me.Bh,label:"Bahrain"},{value:Me.Bd,label:"Bangladesh"},{value:Me.Bb,label:"Barbados"},{value:Me.By,label:"Belarus"},{value:Me.Be,label:"Belgium"},{value:Me.Bz,label:"Belize"},{value:Me.Bj,label:"Benin"},{value:Me.Bm,label:"Bermuda"},{value:Me.Bt,label:"Bhutan"},{value:Me.Bo,label:"Bolivia"},{value:Me.Bq,label:"Bonaire, Sint Eustatius and Saba"},{value:Me.Ba,label:"Bosnia and Herzegovina"},{value:Me.Bw,label:"Botswana"},{value:Me.Bv,label:"Bouvet Island"},{value:Me.Br,label:"Brazil"},{value:Me.Io,label:"British Indian Ocean Territory"},{value:Me.Vg,label:"British Virgin Islands"},{value:Me.Bn,label:"Brunei"},{value:Me.Bg,label:"Bulgaria"},{value:Me.Bf,label:"Burkina Faso"},{value:Me.Bi,label:"Burundi"},{value:Me.Kh,label:"Cambodia"},{value:Me.Cm,label:"Cameroon"},{value:Me.Cv,label:"Cape Verde"},{value:Me.Ky,label:"Cayman Islands"},{value:Me.Cf,label:"Central African Republic"},{value:Me.Td,label:"Chad"},{value:Me.Cl,label:"Chile"},{value:Me.Cx,label:"Christmas Island"},{value:Me.Cc,label:"Cocos Islands"},{value:Me.Co,label:"Colombia"},{value:Me.Km,label:"Comoros"},{value:Me.Ck,label:"Cook Islands"},{value:Me.Cr,label:"Costa Rica"},{value:Me.Ci,label:"Côte d'Ivoire"},{value:Me.Hr,label:"Croatia"},{value:Me.Cu,label:"Cuba"},{value:Me.Cw,label:"Curaçao"},{value:Me.Cy,label:"Cyprus"},{value:Me.Cz,label:"Czech Republic"},{value:Me.Cd,label:"Democratic Republic of the Congo"},{value:Me.Dk,label:"Denmark"},{value:Me.Dj,label:"Djibouti"},{value:Me.Dm,label:"Dominica"},{value:Me.Do,label:"Dominican Republic"},{value:Me.Ec,label:"Ecuador"},{value:Me.Eg,label:"Egypt"},{value:Me.Sv,label:"El Salvador"},{value:Me.Gq,label:"Equatorial Guinea"},{value:Me.Er,label:"Eritrea"},{value:Me.Ee,label:"Estonia"},{value:Me.Sz,label:"Eswatini"},{value:Me.Et,label:"Ethiopia"},{value:Me.Fk,label:"Falkland Islands"},{value:Me.Fo,label:"Faroe Islands"},{value:Me.Fj,label:"Fiji"},{value:Me.Fi,label:"Finland"},{value:Me.Gf,label:"French Guiana"},{value:Me.Pf,label:"French Polynesia"},{value:Me.Tf,label:"French Southern Territories"},{value:Me.Ga,label:"Gabon"},{value:Me.Gm,label:"Gambia"},{value:Me.Ge,label:"Georgia"},{value:Me.Gh,label:"Ghana"},{value:Me.Gi,label:"Gibraltar"},{value:Me.Gr,label:"Greece"},{value:Me.Gl,label:"Greenland"},{value:Me.Gd,label:"Grenada"},{value:Me.Gp,label:"Guadeloupe"},{value:Me.Gu,label:"Guam"},{value:Me.Gt,label:"Guatemala"},{value:Me.Gg,label:"Guernsey"},{value:Me.Gn,label:"Guinea"},{value:Me.Gw,label:"Guinea-Bissau"},{value:Me.Gy,label:"Guyana"},{value:Me.Ht,label:"Haiti"},{value:Me.Hm,label:"Heard Island and McDonald Islands"},{value:Me.Hn,label:"Honduras"},{value:Me.Hk,label:"Hong Kong"},{value:Me.Hu,label:"Hungary"},{value:Me.Is,label:"Iceland"},{value:Me.Id,label:"Indonesia"},{value:Me.Ir,label:"Iran"},{value:Me.Iq,label:"Iraq"},{value:Me.Ie,label:"Ireland"},{value:Me.Im,label:"Isle of Man"},{value:Me.It,label:"Italy"},{value:Me.Jm,label:"Jamaica"},{value:Me.Je,label:"Jersey"},{value:Me.Jo,label:"Jordan"},{value:Me.Kz,label:"Kazakhstan"},{value:Me.Ke,label:"Kenya"},{value:Me.Ki,label:"Kiribati"},{value:Me.Xk,label:"Kosovo"},{value:Me.Kw,label:"Kuwait"},{value:Me.Kg,label:"Kyrgyzstan"},{value:Me.La,label:"Laos"},{value:Me.Lv,label:"Latvia"},{value:Me.Lb,label:"Lebanon"},{value:Me.Ls,label:"Lesotho"},{value:Me.Lr,label:"Liberia"},{value:Me.Ly,label:"Libya"},{value:Me.Li,label:"Liechtenstein"},{value:Me.Lt,label:"Lithuania"},{value:Me.Lu,label:"Luxembourg"},{value:Me.Mo,label:"Macao"},{value:Me.Mg,label:"Madagascar"},{value:Me.Mw,label:"Malawi"},{value:Me.My,label:"Malaysia"},{value:Me.Mv,label:"Maldives"},{value:Me.Ml,label:"Mali"},{value:Me.Mt,label:"Malta"},{value:Me.Mh,label:"Marshall Islands"},{value:Me.Mq,label:"Martinique"},{value:Me.Mr,label:"Mauritania"},{value:Me.Mu,label:"Mauritius"},{value:Me.Yt,label:"Mayotte"},{value:Me.Mx,label:"Mexico"},{value:Me.Fm,label:"Micronesia"},{value:Me.Md,label:"Moldova"},{value:Me.Mc,label:"Monaco"},{value:Me.Mn,label:"Mongolia"},{value:Me.Me,label:"Montenegro"},{value:Me.Ms,label:"Montserrat"},{value:Me.Ma,label:"Morocco"},{value:Me.Mz,label:"Mozambique"},{value:Me.Mm,label:"Myanmar"},{value:Me.Na,label:"Namibia"},{value:Me.Nr,label:"Nauru"},{value:Me.Np,label:"Nepal"},{value:Me.Nl,label:"Netherlands"},{value:Me.Nc,label:"New Caledonia"},{value:Me.Nz,label:"New Zealand"},{value:Me.Ni,label:"Nicaragua"},{value:Me.Ne,label:"Niger"},{value:Me.Ng,label:"Nigeria"},{value:Me.Nu,label:"Niue"},{value:Me.Nf,label:"Norfolk Island"},{value:Me.Kp,label:"North Korea"},{value:Me.Mk,label:"North Macedonia"},{value:Me.Mp,label:"Northern Mariana Islands"},{value:Me.No,label:"Norway"},{value:Me.Om,label:"Oman"},{value:Me.Pk,label:"Pakistan"},{value:Me.Pw,label:"Palau"},{value:Me.Ps,label:"Palestine"},{value:Me.Pa,label:"Panama"},{value:Me.Pg,label:"Papua New Guinea"},{value:Me.Py,label:"Paraguay"},{value:Me.Pe,label:"Peru"},{value:Me.Ph,label:"Philippines"},{value:Me.Pn,label:"Pitcairn Islands"},{value:Me.Pl,label:"Poland"},{value:Me.Pt,label:"Portugal"},{value:Me.Pr,label:"Puerto Rico"},{value:Me.Qa,label:"Qatar"},{value:Me.Cg,label:"Republic of the Congo"},{value:Me.Re,label:"Réunion"},{value:Me.Ro,label:"Romania"},{value:Me.Ru,label:"Russia"},{value:Me.Rw,label:"Rwanda"},{value:Me.Bl,label:"Saint Barthélemy"},{value:Me.Sh,label:"Saint Helena"},{value:Me.Kn,label:"Saint Kitts and Nevis"},{value:Me.Lc,label:"Saint Lucia"},{value:Me.Mf,label:"Saint Martin"},{value:Me.Pm,label:"Saint Pierre and Miquelon"},{value:Me.Vc,label:"Saint Vincent and the Grenadines"},{value:Me.Ws,label:"Samoa"},{value:Me.Sm,label:"San Marino"},{value:Me.St,label:"São Tomé and Príncipe"},{value:Me.Sa,label:"Saudi Arabia"},{value:Me.Sn,label:"Senegal"},{value:Me.Rs,label:"Serbia"},{value:Me.Sc,label:"Seychelles"},{value:Me.Sl,label:"Sierra Leone"},{value:Me.Sg,label:"Singapore"},{value:Me.Sx,label:"Sint Maarten"},{value:Me.Sk,label:"Slovakia"},{value:Me.Si,label:"Slovenia"},{value:Me.Sb,label:"Solomon Islands"},{value:Me.So,label:"Somalia"},{value:Me.Za,label:"South Africa"},{value:Me.Gs,label:"South Georgia and the South Sandwich Islands"},{value:Me.Kr,label:"South Korea"},{value:Me.Ss,label:"South Sudan"},{value:Me.Es,label:"Spain"},{value:Me.Lk,label:"Sri Lanka"},{value:Me.Sd,label:"Sudan"},{value:Me.Sr,label:"Suriname"},{value:Me.Sj,label:"Svalbard and Jan Mayen"},{value:Me.Se,label:"Sweden"},{value:Me.Ch,label:"Switzerland"},{value:Me.Sy,label:"Syria"},{value:Me.Tw,label:"Taiwan"},{value:Me.Tj,label:"Tajikistan"},{value:Me.Tz,label:"Tanzania"},{value:Me.Th,label:"Thailand"},{value:Me.Tl,label:"Timor-Leste"},{value:Me.Tg,label:"Togo"},{value:Me.Tk,label:"Tokelau"},{value:Me.To,label:"Tonga"},{value:Me.Tt,label:"Trinidad and Tobago"},{value:Me.Tn,label:"Tunisia"},{value:Me.Tr,label:"Turkey"},{value:Me.Tm,label:"Turkmenistan"},{value:Me.Tc,label:"Turks and Caicos Islands"},{value:Me.Tv,label:"Tuvalu"},{value:Me.Ug,label:"Uganda"},{value:Me.Ua,label:"Ukraine"},{value:Me.Ae,label:"United Arab Emirates"},{value:Me.Um,label:"United States Minor Outlying Islands"},{value:Me.Uy,label:"Uruguay"},{value:Me.Vi,label:"US Virgin Islands"},{value:Me.Uz,label:"Uzbekistan"},{value:Me.Vu,label:"Vanuatu"},{value:Me.Va,label:"Vatican City"},{value:Me.Ve,label:"Venezuela"},{value:Me.Vn,label:"Vietnam"},{value:Me.Wf,label:"Wallis and Futuna"},{value:Me.Eh,label:"Western Sahara"},{value:Me.Ye,label:"Yemen"},{value:Me.Zm,label:"Zambia"},{value:Me.Zw,label:"Zimbabwe"}],YWe=()=>[{value:Do.TaxDeduction,label:"Tax deduction (ניכוי במקור)"},{value:Do.Cash,label:"Cash (מזומן)"},{value:Do.Cheque,label:"Cheque (צ׳ק)"},{value:Do.CreditCard,label:"Credit card (כרטיס אשראי)"},{value:Do.WireTransfer,label:"Wire-transfer (העברה בנקאית)"},{value:Do.Paypal,label:"PayPal (פייפאל)"},{value:Do.OtherDeduction,label:"Other deduction (ניכוי אחר)"},{value:Do.PaymentApp,label:"Payment app (אפליקציית תשלום)"},{value:Do.Other,label:"Other (אחר)"}],XWe=()=>[{value:FA.Bitcoin,label:"Bitcoin (ביטקוין)"},{value:FA.MoneyEqual,label:"Money-equal (שווה כסף)"},{value:FA.VCheck,label:"V-Check"},{value:FA.GiftCard,label:"Gift card (שובר מתנה)"},{value:FA.NiiEmployeeDeduction,label:"NII employee deduction (ניכוי חלק עובד ביטוח לאומי)"},{value:FA.Ethereum,label:"Ethereum (אתריום)"},{value:FA.BuymeVoucher,label:"BUYME Voucher (BUYME שובר)"},{value:FA.Payoneer,label:"Payoneer"}],ZWe=()=>[{value:eg.Bit,label:"Bit"},{value:eg.PayByPepper,label:"Pay (by Pepper)"},{value:eg.Paybox,label:"PayBox"},{value:eg.Culo,label:"Culo"},{value:eg.GooglePay,label:"Google Pay"},{value:eg.ApplePay,label:"Apple Pay"}],JWe=()=>[{value:tg.Unknown,label:"Unknown (לא ידוע)"},{value:tg.Isracard,label:"Isracard (ישראכרט)"},{value:tg.Visa,label:"Visa (ויזה)"},{value:tg.Mastercard,label:"Mastercard (מאסטרקארד)"},{value:tg.AmericanExpress,label:"American Express (אמריקן אקספרס)"},{value:tg.Diners,label:"Diners (דיינרס)"}],eYe=()=>[{value:ng.Standard,label:"Standard (רגיל)"},{value:ng.Payments,label:"Payments (תשלומים)"},{value:ng.Credit,label:"Credit (קרדיט)"},{value:ng.Deferred,label:"Deferred (חיוב נדחה)"},{value:ng.Other,label:"Other (אחר)"},{value:ng.Recurring,label:"Recurring (הוראת קבע)"}];function Vle(t){return{...t,greenInvoiceId:t.greenInvoiceId||void 0,country:t.country||void 0,emails:t.emails||void 0,name:t.name||void 0,phone:t.phone||void 0,taxId:t.taxId||void 0,address:t.address||void 0,city:t.city||void 0,zip:t.zip||void 0,fax:t.fax||void 0,mobile:t.mobile||void 0}}const tYe=WWe();function nYe({client:t,onChange:e,fetching:n}){const i=(a,o)=>{e({...t,[a]:o})},r=a=>{const o=a.split(",").map(s=>s.trim()).filter(Boolean);i("emails",o)};return y.jsxs(fd,{children:[y.jsx(bu,{children:y.jsxs(Su,{className:"flex items-center gap-2",children:[y.jsx(Dbe,{className:"w-5 h-5"}),"Client Information"]})}),y.jsx(Ad,{className:"space-y-4",children:n?y.jsx("div",{children:"Loading..."}):y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"clientName",children:"Client Name"}),y.jsx(Qn,{id:"clientName",value:t.name||"",onChange:a=>i("name",a.target.value),placeholder:"Enter client name"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"taxId",children:"Tax ID"}),y.jsx(Qn,{id:"taxId",value:t.taxId||"",onChange:a=>i("taxId",a.target.value),placeholder:"Tax identification number"})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"emails",children:"Email Addresses"}),y.jsx(Qn,{id:"emails",value:t.emails?.join(", ")||"",onChange:a=>r(a.target.value),placeholder:"email1@example.com, email2@example.com"})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"phone",children:"Phone"}),y.jsx(Qn,{id:"phone",value:t.phone||"",onChange:a=>i("phone",a.target.value),placeholder:"Phone number"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"mobile",children:"Mobile"}),y.jsx(Qn,{id:"mobile",value:t.mobile||"",onChange:a=>i("mobile",a.target.value),placeholder:"Mobile number"})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"address",children:"Address"}),y.jsx(Qn,{id:"address",value:t.address||"",onChange:a=>i("address",a.target.value),placeholder:"Street address"})]}),y.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"city",children:"City"}),y.jsx(Qn,{id:"city",value:t.city||"",onChange:a=>i("city",a.target.value),placeholder:"City"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"zip",children:"ZIP Code"}),y.jsx(Qn,{id:"zip",value:t.zip||"",onChange:a=>i("zip",a.target.value),placeholder:"ZIP code"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"country",children:"Country"}),y.jsxs(Po,{value:t.country||"",onValueChange:a=>i("country",a),children:[y.jsx(Uo,{children:y.jsx(Lo,{placeholder:"Select country"})}),y.jsx(Mo,{children:tYe.map(a=>y.jsx(yo,{value:a.value,children:a.label},a.value))})]})]})]})]})})]})}const iYe=Hle(),rYe=A6();function aYe({income:t,currency:e,onChange:n}){const i=()=>{const s={description:"",price:0,quantity:1,currency:e,vatType:zy.Exempt};n([...t,s])},r=(s,l,c)=>{const d=[...t];d[s]={...d[s],[l]:c},n(d)},a=s=>{n(t.filter((l,c)=>c!==s))},o=s=>{const l=s.price*s.quantity,c=s.vatRate||0,d=l*(c/100);return l+d};return y.jsxs(fd,{children:[y.jsx(bu,{children:y.jsxs(Su,{className:"flex items-center gap-2",children:[y.jsx(Qy,{className:"w-5 h-5"}),"Income Items"]})}),y.jsxs(Ad,{className:"space-y-4",children:[t.map((s,l)=>y.jsxs("div",{className:"border rounded-lg p-4 space-y-4",children:[y.jsxs("div",{className:"flex justify-between items-center",children:[y.jsxs("h4",{className:"font-medium",children:["Item ",l+1]}),y.jsx(Qt,{variant:"outline",size:"sm",onClick:()=>a(l),className:"text-red-600 hover:text-red-700",children:y.jsx(lX,{className:"w-4 h-4"})})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Description"}),y.jsx(xF,{value:s.description,onChange:c=>r(l,"description",c.target.value),placeholder:"Item description",className:"min-h-[60px]"})]}),y.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Price"}),y.jsx(Qn,{type:"number",step:"0.01",value:s.price,onChange:c=>r(l,"price",Number.parseFloat(c.target.value)||0),placeholder:"0.00"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Currency"}),y.jsxs(Po,{value:s.currency,onValueChange:c=>r(l,"currency",c),children:[y.jsx(Uo,{children:y.jsx(Lo,{})}),y.jsx(Mo,{children:rYe.map(c=>y.jsx(yo,{value:c.value,children:c.label},c.value))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Quantity"}),y.jsx(Qn,{type:"number",step:"1",value:s.quantity,onChange:c=>r(l,"quantity",Number.parseInt(c.target.value)||1),placeholder:"1"})]})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"VAT Type"}),y.jsxs(Po,{value:s.vatType,onValueChange:c=>r(l,"vatType",c),children:[y.jsx(Uo,{children:y.jsx(Lo,{})}),y.jsx(Mo,{children:iYe.map(c=>y.jsx(yo,{value:c.value,children:c.label},c.value))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"VAT Rate (%)"}),y.jsx(Qn,{type:"number",step:"0.01",value:s.vatRate||0,onChange:c=>r(l,"vatRate",Number.parseFloat(c.target.value)||0),placeholder:"0.00"})]})]}),y.jsx("div",{className:"grid grid-cols-2 gap-4",children:y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Total"}),y.jsxs("div",{className:"px-3 py-2 bg-gray-50 rounded-md text-sm font-medium",children:[o(s).toFixed(2)," ",e]})]})})]},l)),y.jsxs(Qt,{onClick:i,variant:"outline",className:"w-full bg-transparent",children:[y.jsx(Tf,{className:"w-4 h-4 mr-2"}),"Add Income Item"]}),t.length>0&&y.jsx("div",{className:"border-t pt-4",children:y.jsxs("div",{className:"flex justify-between items-center font-medium",children:[y.jsx("span",{children:"Total Amount:"}),y.jsxs("span",{children:[t.reduce((s,l)=>s+o(l),0).toFixed(2)," ",e]})]})})]})]})}const oYe=A6(),yK=YWe(),sYe=XWe(),lYe=ZWe(),cYe=JWe(),dYe=eYe();function uYe({payments:t,currency:e,onChange:n}){const i=()=>{const p={currency:e,price:0,type:Do.Cash,date:new Date().toISOString().split("T")[0]};n([...t,p])},r=N.useCallback((p,g,b)=>{const k=[...t];k[p]={...k[p],[g]:b},n(k)},[t,n]),a=p=>{n(t.filter((g,b)=>b!==p))},o=p=>yK.find(g=>g.value===p)?.label||p,s=p=>p===Do.WireTransfer||p===Do.Cheque,l=p=>p===Do.Cheque,c=p=>p===Do.CreditCard,d=p=>p===Do.Paypal,f=p=>p===Do.PaymentApp,h=p=>p===Do.Other,m=N.useCallback((p,g)=>y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Account ID"}),y.jsx(Qn,{value:p.accountId||"",onChange:b=>r(g,"accountId",b.target.value),placeholder:"PayPal account ID"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Transaction ID"}),y.jsx(Qn,{value:p.transactionId||"",onChange:b=>r(g,"transactionId",b.target.value),placeholder:"Transaction ID"})]})]}),[r]);return y.jsxs(fd,{children:[y.jsx(bu,{children:y.jsxs(Su,{className:"flex items-center gap-2",children:[y.jsx(gke,{className:"w-5 h-5"}),"Payments"]})}),y.jsxs(Ad,{className:"space-y-4",children:[t.map((p,g)=>y.jsxs("div",{className:"border rounded-lg p-4 space-y-4",children:[y.jsxs("div",{className:"flex justify-between items-center",children:[y.jsxs("h4",{className:"font-medium",children:["Payment ",g+1," - ",o(p.type)]}),y.jsx(Qt,{variant:"outline",size:"sm",onClick:()=>a(g),className:"text-red-600 hover:text-red-700",children:y.jsx(lX,{className:"w-4 h-4"})})]}),y.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Payment Type"}),y.jsxs(Po,{value:p.type,onValueChange:b=>r(g,"type",b),children:[y.jsx(Uo,{children:y.jsx(Lo,{})}),y.jsx(Mo,{children:yK.map(b=>y.jsx(yo,{value:b.value,children:b.label},b.value))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Amount"}),y.jsx(Qn,{type:"number",step:"0.01",value:p.price,onChange:b=>r(g,"price",Number.parseFloat(b.target.value)||0),placeholder:"0.00"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Currency"}),y.jsxs(Po,{value:p.currency,onValueChange:b=>r(g,"currency",b),children:[y.jsx(Uo,{children:y.jsx(Lo,{})}),y.jsx(Mo,{children:oYe.map(b=>y.jsx(yo,{value:b.value,children:b.label},b.value))})]})]})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Date"}),y.jsx(Qn,{type:"date",value:p.date||"",onChange:b=>r(g,"date",b.target.value)})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Currency Rate (relative to ILS)"}),y.jsx(Qn,{type:"number",step:"0.0001",value:p.currencyRate||"",onChange:b=>r(g,"currencyRate",Number.parseFloat(b.target.value)||void 0),placeholder:"1.0000"})]})]}),s(p.type)&&y.jsxs("div",{className:"space-y-4",children:[y.jsx("h5",{className:"font-medium text-sm text-gray-700",children:"Bank Details"}),y.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Bank Name"}),y.jsx(Qn,{value:p.bankName||"",onChange:b=>r(g,"bankName",b.target.value),placeholder:"Bank name"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Bank Branch"}),y.jsx(Qn,{value:p.bankBranch||"",onChange:b=>r(g,"bankBranch",b.target.value),placeholder:"Branch number"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Bank Account"}),y.jsx(Qn,{value:p.bankAccount||"",onChange:b=>r(g,"bankAccount",b.target.value),placeholder:"Account number"})]})]})]}),l(p.type)&&y.jsx("div",{className:"space-y-4",children:y.jsx("div",{className:"grid grid-cols-2 gap-4",children:y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Cheque Number"}),y.jsx(Qn,{value:p.chequeNum||"",onChange:b=>r(g,"chequeNum",b.target.value),placeholder:"Cheque number"})]})})}),c(p.type)&&y.jsxs("div",{className:"space-y-4",children:[y.jsx("h5",{className:"font-medium text-sm text-gray-700",children:"Credit Card Details"}),y.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Card Type"}),y.jsxs(Po,{value:p.cardType||"",onValueChange:b=>r(g,"cardType",b||void 0),children:[y.jsx(Uo,{children:y.jsx(Lo,{placeholder:"Select card type"})}),y.jsx(Mo,{children:cYe.map(b=>y.jsx(yo,{value:b.value,children:b.label},b.value))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Last 4 Digits"}),y.jsx(Qn,{value:p.cardNum||"",onChange:b=>r(g,"cardNum",b.target.value),placeholder:"1234",maxLength:4})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Deal Type"}),y.jsxs(Po,{value:p.dealType||"",onValueChange:b=>r(g,"dealType",b||void 0),children:[y.jsx(Uo,{children:y.jsx(Lo,{placeholder:"Select deal type"})}),y.jsx(Mo,{children:dYe.map(b=>y.jsx(yo,{value:b.value,children:b.label},b.value))})]})]})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Number of Payments (1-36)"}),y.jsx(Qn,{type:"number",min:"1",max:"36",value:p.numPayments||"",onChange:b=>r(g,"numPayments",Number.parseInt(b.target.value)||void 0),placeholder:"1"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"First Payment Amount"}),y.jsx(Qn,{type:"number",step:"0.01",value:p.firstPayment||"",onChange:b=>r(g,"firstPayment",Number.parseFloat(b.target.value)||void 0),placeholder:"0.00"})]})]})]}),d(p.type)&&y.jsxs("div",{className:"space-y-4",children:[y.jsx("h5",{className:"font-medium text-sm text-gray-700",children:"PayPal Details"}),y.jsx("div",{className:"grid grid-cols-2 gap-4",children:m(p,g)})]}),f(p.type)&&y.jsxs("div",{className:"space-y-4",children:[y.jsx("h5",{className:"font-medium text-sm text-gray-700",children:"Payment App Details"}),y.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"App Type"}),y.jsxs(Po,{value:p.appType||"",onValueChange:b=>r(g,"appType",b||void 0),children:[y.jsx(Uo,{children:y.jsx(Lo,{placeholder:"Select app type"})}),y.jsx(Mo,{children:lYe.map(b=>y.jsx(yo,{value:b.value,children:b.label},b.value))})]})]}),m(p,g)]})]}),h(p.type)&&y.jsxs("div",{className:"space-y-4",children:[y.jsx("h5",{className:"font-medium text-sm text-gray-700",children:"Other Payment Details"}),y.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{children:"Sub Type"}),y.jsxs(Po,{value:p.subType||"",onValueChange:b=>r(g,"subType",b||void 0),children:[y.jsx(Uo,{children:y.jsx(Lo,{placeholder:"Select sub type"})}),y.jsxs(Mo,{children:[y.jsx(yo,{value:"NONE",children:"None"}),sYe.map(b=>y.jsx(yo,{value:b.value,children:b.label},b.value))]})]})]}),m(p,g)]})]})]},g)),y.jsxs(Qt,{onClick:i,variant:"outline",className:"w-full bg-transparent",children:[y.jsx(Tf,{className:"w-4 h-4 mr-2"}),"Add Payment"]}),t.length>0&&y.jsx("div",{className:"border-t pt-4",children:y.jsxs("div",{className:"flex justify-between items-center font-medium",children:[y.jsx("span",{children:"Total Payments:"}),y.jsxs("span",{children:[t.reduce((p,g)=>p+g.price,0).toFixed(2)," ",e]})]})})]})]})}const fYe=A6(),AYe=zle(),mYe=KWe(),hYe=Hle();function pYe({formData:t,updateFormData:e}){const[n,i]=N.useState(t.client?.businessId||""),{selectableClients:r}=qWe(),[a,o]=N.useState(t.client??null),[{data:s,fetching:l},c]=Ns({pause:!0,query:qNe,variables:{businessId:n}});N.useEffect(()=>{n&&c()},[n,c]);const d=N.useCallback(g=>{const b=Vle(g);o(b),e("client",b)},[e]);N.useEffect(()=>{if(s?.client?.integrations.greenInvoiceInfo){const g=Bh(iZ,s.client.integrations.greenInvoiceInfo);d(g)}},[s?.client?.integrations.greenInvoiceInfo,d,n]);const f=g=>{if(i(g),g==="new"){const b=`temp-${crypto.randomUUID()}`;e("client",{businessId:b,name:""})}else if(g){const b=r.find(k=>k.value===g);b&&e("client",{businessId:b.value,name:b.label})}},h=t.type===In.Proforma||t.type===In.Invoice,m=h||t.type===In.InvoiceReceipt||t.type===In.CreditInvoice,p=t.type===In.Receipt||t.type===In.InvoiceReceipt;return y.jsxs(y.Fragment,{children:[y.jsxs(fd,{children:[y.jsx(bu,{children:y.jsxs(Su,{className:"flex items-center gap-2",children:[y.jsx(mbe,{className:"w-5 h-5"}),"Document Settings"]})}),y.jsxs(Ad,{className:"space-y-4",children:[y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"documentType",children:"Document Type"}),y.jsxs(Po,{value:t.type,onValueChange:g=>e("type",g),children:[y.jsx(Uo,{children:y.jsx(Lo,{})}),y.jsx(Mo,{children:AYe.map(g=>y.jsx(yo,{value:g.value,children:g.label},g.value))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"language",children:"Language"}),y.jsxs(Po,{value:t.lang,onValueChange:g=>e("lang",g),children:[y.jsx(Uo,{children:y.jsx(Lo,{})}),y.jsx(Mo,{children:mYe.map(g=>y.jsx(yo,{value:g.value,children:g.label},g.value))})]})]})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"currency",children:"Currency"}),y.jsxs(Po,{value:t.currency,onValueChange:g=>e("currency",g),children:[y.jsx(Uo,{children:y.jsx(Lo,{})}),y.jsx(Mo,{children:fYe.map(g=>y.jsx(yo,{value:g.value,children:g.label},g.value))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"vatType",children:"VAT Type"}),y.jsxs(Po,{value:t.vatType,onValueChange:g=>e("vatType",g),children:[y.jsx(Uo,{children:y.jsx(Lo,{})}),y.jsx(Mo,{children:hYe.map(g=>y.jsx(yo,{value:g.value,children:g.label},g.value))})]})]})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"clientSelect",children:"Select Client"}),y.jsxs(Po,{value:n,onValueChange:f,children:[y.jsx(Uo,{children:y.jsx(Lo,{placeholder:"Choose existing client or create new"})}),y.jsx(Mo,{children:r.map(g=>y.jsx(yo,{value:g.value,children:g.label},g.value))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"date",children:"Document Date"}),y.jsx(Qn,{id:"date",type:"date",value:t.date||"",onChange:g=>e("date",g.target.value)})]})]}),h&&y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"maxPayments",children:"Max Payments"}),y.jsx(Qn,{id:"maxPayments",type:"number",min:"1",max:"36",value:t.maxPayments||"",onChange:g=>e("maxPayments",Number.parseInt(g.target.value)||void 0),placeholder:"1"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"dueDate",children:"Due Date"}),y.jsx(Qn,{id:"dueDate",type:"date",value:t.dueDate||"",onChange:g=>e("dueDate",g.target.value)})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(gn,{htmlFor:"remarks",children:"Remarks"}),y.jsx(xF,{id:"remarks",value:t.remarks||"",onChange:g=>e("remarks",g.target.value),placeholder:"Additional remarks",className:"min-h-[60px]"})]})]})]}),a&&y.jsx(nYe,{client:a,fetching:l,onChange:g=>d(g)}),m&&y.jsx(aYe,{income:t.income||[],currency:t.currency,onChange:g=>e("income",g)}),p&&y.jsx(uYe,{payments:t.payment||[],currency:t.currency,onChange:g=>e("payment",g)})]})}const m6=({data:t})=>{const e=t.map(n=>Bh(HNe,n));return y.jsx("div",{className:"flex flex-col gap-4 mt-5",children:e.filter(({charge:n})=>n).map(n=>y.jsx(no,{to:$n.CHARGES.DETAIL(n.charge.id),target:"_blank",rel:"noreferrer",onClick:i=>i.stopPropagation(),className:"inline-flex items-center font-semibold",children:`${n.charge.counterparty?.name??"Unknown"} - ${n.charge.userDescription}`},n.id))})},gYe="uploadMultipleDocuments",vYe=()=>{const[{fetching:t},e]=bs(kCe),n=N.useCallback(async i=>{const r="Error uploading documents",a=`${gYe}-${i.chargeId}`;fn.loading("Uploading Documents",{id:a});try{const o=await e(i),s=Ss(o,r,a,"batchUploadDocuments");if(s){let l=!1;const c=s.batchUploadDocuments.filter(d=>"message"in d?(console.error(`Error uploading document: ${d.message}`),l=!0,!1):"document"in d).map(({document:d})=>d);return fn.success("Upload Successful",{id:a,description:c.length>0?m6({data:c}):"No successful document uploads",duration:c.length>0?1/0:5e3,closeButton:!0}),l&&fn.error("Some files failed to upload",{duration:1e5,closeButton:!0}),c}}catch(o){console.error(`${r}: ${o}`),fn.error("Error",{id:a,description:r,duration:1e5,closeButton:!0})}},[e]);return{uploading:t,uploadMultipleDocuments:n}},yYe=({name:t,...e})=>y.jsx(OP,{src:`/icons/${t}.svg`,...e});function Gle({src:t,width:e,height:n,magnifierHeight:i=100,magnifierWidth:r=100,zoomLevel:a=1.5}){const[o,s]=N.useState({x:0,y:0}),[l,c]=N.useState({height:0,width:0}),[d,f]=N.useState(a),[h,m]=N.useState({width:r,height:i}),[p,g]=N.useState(!1);return y.jsxs("div",{style:{position:"relative",height:n,width:e},children:[y.jsx("img",{src:t,style:{height:n,width:e},onMouseEnter:b=>{const k=b.currentTarget,{width:S,height:C}=k.getBoundingClientRect();c({width:S,height:C}),g(!0)},onMouseMove:b=>{const k=b.currentTarget,{top:S,left:C}=k.getBoundingClientRect(),x=b.pageX-C-window.pageXOffset,F=b.pageY-S-window.pageYOffset;s({x,y:F})},onMouseLeave:()=>{g(!1)},alt:"img"}),y.jsx("div",{style:{display:p?"":"none",position:"absolute",pointerEvents:"none",height:`${h.height}px`,width:`${h.width}px`,top:`${o.y-h.height/2}px`,left:`${o.x-h.width/2}px`,opacity:"1",border:"1px solid lightgray",backgroundColor:"white",backgroundImage:`url('${t}')`,backgroundRepeat:"no-repeat",backgroundSize:`${l.width*d}px ${l.height*d}px`,backgroundPositionX:`${-o.x*d+h.width/2}px`,backgroundPositionY:`${-o.y*d+h.height/2}px`}}),y.jsxs("div",{className:"absolute top-10 right-10 flex flex-row gap-1",children:[y.jsx(sd,{label:"Increase zoom",children:y.jsx(Qt,{variant:"ghost",size:"icon",className:"size-7.5",onClick:()=>f(b=>b*1.2),children:y.jsx(o$,{className:"size-5"})})}),y.jsx(sd,{label:"Decrease zoom",children:y.jsx(Qt,{variant:"ghost",size:"icon",className:"size-7.5",onClick:()=>f(b=>b/1.2),children:y.jsx(s$,{className:"size-5"})})}),y.jsx(sd,{label:"Expand zoom area",children:y.jsx(Qt,{variant:"ghost",size:"icon",className:"size-7.5",onClick:()=>m(b=>({width:b.width*1.2,height:b.height*1.2})),children:y.jsx(o$,{className:"size-5"})})}),y.jsx(sd,{label:"Reduce zoom area",children:y.jsx(Qt,{variant:"ghost",size:"icon",className:"size-7.5",onClick:()=>m(b=>({width:b.width/1.2,height:b.height/1.2})),children:y.jsx(s$,{className:"size-5"})})})]})]})}function kYe(t){const[e,n]=se.useState(!1);return se.useEffect(()=>{function i(a){n(a.matches)}const r=matchMedia(t);return r.addEventListener("change",i),n(r.matches),()=>r.removeEventListener("change",i)},[t]),e}var kK=1,bYe=.9,SYe=.8,wYe=.17,KD=.1,WD=.999,NYe=.9999,CYe=.99,xYe=/[\\\/_+.#"@\[\(\{&]/,FYe=/[\\\/_+.#"@\[\(\{&]/g,_Ye=/[\s-]/,qle=/[\s-]/g;function cO(t,e,n,i,r,a,o){if(a===e.length)return r===t.length?kK:CYe;var s=`${r},${a}`;if(o[s]!==void 0)return o[s];for(var l=i.charAt(a),c=n.indexOf(l,r),d=0,f,h,m,p;c>=0;)f=cO(t,e,n,i,c+1,a+1,o),f>d&&(c===r?f*=kK:xYe.test(t.charAt(c-1))?(f*=SYe,m=t.slice(r,c-1).match(FYe),m&&r>0&&(f*=Math.pow(WD,m.length))):_Ye.test(t.charAt(c-1))?(f*=bYe,p=t.slice(r,c-1).match(qle),p&&r>0&&(f*=Math.pow(WD,p.length))):(f*=wYe,r>0&&(f*=Math.pow(WD,c-r))),t.charAt(c)!==e.charAt(a)&&(f*=NYe)),(f<KD&&n.charAt(c-1)===i.charAt(a+1)||i.charAt(a+1)===i.charAt(a)&&n.charAt(c-1)!==i.charAt(a))&&(h=cO(t,e,n,i,c+1,a+2,o),h*KD>f&&(f=h*KD)),f>d&&(d=f),c=n.indexOf(l,c+1);return o[s]=d,d}function bK(t){return t.toLowerCase().replace(qle," ")}function EYe(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,cO(t,e,bK(t),bK(e),0,0,{})}var BYe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pm=BYe.reduce((t,e)=>{const n=jv(`Primitive.${e}`),i=N.forwardRef((r,a)=>{const{asChild:o,...s}=r,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(l,{...s,ref:a})});return i.displayName=`Primitive.${e}`,{...t,[e]:i}},{}),fy='[cmdk-group=""]',YD='[cmdk-group-items=""]',TYe='[cmdk-group-heading=""]',Kle='[cmdk-item=""]',SK=`${Kle}:not([aria-disabled="true"])`,dO="cmdk-item-select",Og="data-value",DYe=(t,e,n)=>EYe(t,e,n),Wle=N.createContext(void 0),Ab=()=>N.useContext(Wle),Yle=N.createContext(void 0),h6=()=>N.useContext(Yle),Xle=N.createContext(void 0),Zle=N.forwardRef((t,e)=>{let n=Rg(()=>{var L,j;return{search:"",value:(j=(L=t.value)!=null?L:t.defaultValue)!=null?j:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=Rg(()=>new Set),r=Rg(()=>new Map),a=Rg(()=>new Map),o=Rg(()=>new Set),s=Jle(t),{label:l,children:c,value:d,onValueChange:f,filter:h,shouldFilter:m,loop:p,disablePointerSelection:g=!1,vimBindings:b=!0,...k}=t,S=ro(),C=ro(),x=ro(),F=N.useRef(null),T=HYe();Rh(()=>{if(d!==void 0){let L=d.trim();n.current.value=L,E.emit()}},[d]),Rh(()=>{T(6,Z)},[]);let E=N.useMemo(()=>({subscribe:L=>(o.current.add(L),()=>o.current.delete(L)),snapshot:()=>n.current,setState:(L,j,$)=>{var W,J,K,fe;if(!Object.is(n.current[L],j)){if(n.current[L]=j,L==="search")P(),V(),T(1,U);else if(L==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ge=document.getElementById(x);ge?ge.focus():(W=document.getElementById(S))==null||W.focus()}if(T(7,()=>{var ge;n.current.selectedItemId=(ge=q())==null?void 0:ge.id,E.emit()}),$||T(5,Z),((J=s.current)==null?void 0:J.value)!==void 0){let ge=j??"";(fe=(K=s.current).onValueChange)==null||fe.call(K,ge);return}}E.emit()}},emit:()=>{o.current.forEach(L=>L())}}),[]),I=N.useMemo(()=>({value:(L,j,$)=>{var W;j!==((W=a.current.get(L))==null?void 0:W.value)&&(a.current.set(L,{value:j,keywords:$}),n.current.filtered.items.set(L,R(j,$)),T(2,()=>{V(),E.emit()}))},item:(L,j)=>(i.current.add(L),j&&(r.current.has(j)?r.current.get(j).add(L):r.current.set(j,new Set([L]))),T(3,()=>{P(),V(),n.current.value||U(),E.emit()}),()=>{a.current.delete(L),i.current.delete(L),n.current.filtered.items.delete(L);let $=q();T(4,()=>{P(),$?.getAttribute("id")===L&&U(),E.emit()})}),group:L=>(r.current.has(L)||r.current.set(L,new Set),()=>{a.current.delete(L),r.current.delete(L)}),filter:()=>s.current.shouldFilter,label:l||t["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:S,inputId:x,labelId:C,listInnerRef:F}),[]);function R(L,j){var $,W;let J=(W=($=s.current)==null?void 0:$.filter)!=null?W:DYe;return L?J(L,n.current.search,j):0}function V(){if(!n.current.search||s.current.shouldFilter===!1)return;let L=n.current.filtered.items,j=[];n.current.filtered.groups.forEach(W=>{let J=r.current.get(W),K=0;J.forEach(fe=>{let ge=L.get(fe);K=Math.max(ge,K)}),j.push([W,K])});let $=F.current;ae().sort((W,J)=>{var K,fe;let ge=W.getAttribute("id"),Se=J.getAttribute("id");return((K=L.get(Se))!=null?K:0)-((fe=L.get(ge))!=null?fe:0)}).forEach(W=>{let J=W.closest(YD);J?J.appendChild(W.parentElement===J?W:W.closest(`${YD} > *`)):$.appendChild(W.parentElement===$?W:W.closest(`${YD} > *`))}),j.sort((W,J)=>J[1]-W[1]).forEach(W=>{var J;let K=(J=F.current)==null?void 0:J.querySelector(`${fy}[${Og}="${encodeURIComponent(W[0])}"]`);K?.parentElement.appendChild(K)})}function U(){let L=ae().find($=>$.getAttribute("aria-disabled")!=="true"),j=L?.getAttribute(Og);E.setState("value",j||void 0)}function P(){var L,j,$,W;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=i.current.size;return}n.current.filtered.groups=new Set;let J=0;for(let K of i.current){let fe=(j=(L=a.current.get(K))==null?void 0:L.value)!=null?j:"",ge=(W=($=a.current.get(K))==null?void 0:$.keywords)!=null?W:[],Se=R(fe,ge);n.current.filtered.items.set(K,Se),Se>0&&J++}for(let[K,fe]of r.current)for(let ge of fe)if(n.current.filtered.items.get(ge)>0){n.current.filtered.groups.add(K);break}n.current.filtered.count=J}function Z(){var L,j,$;let W=q();W&&(((L=W.parentElement)==null?void 0:L.firstChild)===W&&(($=(j=W.closest(fy))==null?void 0:j.querySelector(TYe))==null||$.scrollIntoView({block:"nearest"})),W.scrollIntoView({block:"nearest"}))}function q(){var L;return(L=F.current)==null?void 0:L.querySelector(`${Kle}[aria-selected="true"]`)}function ae(){var L;return Array.from(((L=F.current)==null?void 0:L.querySelectorAll(SK))||[])}function H(L){let j=ae()[L];j&&E.setState("value",j.getAttribute(Og))}function te(L){var j;let $=q(),W=ae(),J=W.findIndex(fe=>fe===$),K=W[J+L];(j=s.current)!=null&&j.loop&&(K=J+L<0?W[W.length-1]:J+L===W.length?W[0]:W[J+L]),K&&E.setState("value",K.getAttribute(Og))}function Y(L){let j=q(),$=j?.closest(fy),W;for(;$&&!W;)$=L>0?jYe($,fy):QYe($,fy),W=$?.querySelector(SK);W?E.setState("value",W.getAttribute(Og)):te(L)}let ue=()=>H(ae().length-1),we=L=>{L.preventDefault(),L.metaKey?ue():L.altKey?Y(1):te(1)},ie=L=>{L.preventDefault(),L.metaKey?H(0):L.altKey?Y(-1):te(-1)};return N.createElement(pm.div,{ref:e,tabIndex:-1,...k,"cmdk-root":"",onKeyDown:L=>{var j;(j=k.onKeyDown)==null||j.call(k,L);let $=L.nativeEvent.isComposing||L.keyCode===229;if(!(L.defaultPrevented||$))switch(L.key){case"n":case"j":{b&&L.ctrlKey&&we(L);break}case"ArrowDown":{we(L);break}case"p":case"k":{b&&L.ctrlKey&&ie(L);break}case"ArrowUp":{ie(L);break}case"Home":{L.preventDefault(),H(0);break}case"End":{L.preventDefault(),ue();break}case"Enter":{L.preventDefault();let W=q();if(W){let J=new Event(dO);W.dispatchEvent(J)}}}}},N.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:VYe},l),FF(t,L=>N.createElement(Yle.Provider,{value:E},N.createElement(Wle.Provider,{value:I},L))))}),IYe=N.forwardRef((t,e)=>{var n,i;let r=ro(),a=N.useRef(null),o=N.useContext(Xle),s=Ab(),l=Jle(t),c=(i=(n=l.current)==null?void 0:n.forceMount)!=null?i:o?.forceMount;Rh(()=>{if(!c)return s.item(r,o?.id)},[c]);let d=ece(r,a,[t.value,t.children,a],t.keywords),f=h6(),h=im(T=>T.value&&T.value===d.current),m=im(T=>c||s.filter()===!1?!0:T.search?T.filtered.items.get(r)>0:!0);N.useEffect(()=>{let T=a.current;if(!(!T||t.disabled))return T.addEventListener(dO,p),()=>T.removeEventListener(dO,p)},[m,t.onSelect,t.disabled]);function p(){var T,E;g(),(E=(T=l.current).onSelect)==null||E.call(T,d.current)}function g(){f.setState("value",d.current,!0)}if(!m)return null;let{disabled:b,value:k,onSelect:S,forceMount:C,keywords:x,...F}=t;return N.createElement(pm.div,{ref:ws(a,e),...F,id:r,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!h,"data-disabled":!!b,"data-selected":!!h,onPointerMove:b||s.getDisablePointerSelection()?void 0:g,onClick:b?void 0:p},t.children)}),OYe=N.forwardRef((t,e)=>{let{heading:n,children:i,forceMount:r,...a}=t,o=ro(),s=N.useRef(null),l=N.useRef(null),c=ro(),d=Ab(),f=im(m=>r||d.filter()===!1?!0:m.search?m.filtered.groups.has(o):!0);Rh(()=>d.group(o),[]),ece(o,s,[t.value,t.heading,l]);let h=N.useMemo(()=>({id:o,forceMount:r}),[r]);return N.createElement(pm.div,{ref:ws(s,e),...a,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&N.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),FF(t,m=>N.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},N.createElement(Xle.Provider,{value:h},m))))}),RYe=N.forwardRef((t,e)=>{let{alwaysRender:n,...i}=t,r=N.useRef(null),a=im(o=>!o.search);return!n&&!a?null:N.createElement(pm.div,{ref:ws(r,e),...i,"cmdk-separator":"",role:"separator"})}),PYe=N.forwardRef((t,e)=>{let{onValueChange:n,...i}=t,r=t.value!=null,a=h6(),o=im(c=>c.search),s=im(c=>c.selectedItemId),l=Ab();return N.useEffect(()=>{t.value!=null&&a.setState("search",t.value)},[t.value]),N.createElement(pm.input,{ref:e,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:r?t.value:o,onChange:c=>{r||a.setState("search",c.target.value),n?.(c.target.value)}})}),LYe=N.forwardRef((t,e)=>{let{children:n,label:i="Suggestions",...r}=t,a=N.useRef(null),o=N.useRef(null),s=im(c=>c.selectedItemId),l=Ab();return N.useEffect(()=>{if(o.current&&a.current){let c=o.current,d=a.current,f,h=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let m=c.offsetHeight;d.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return h.observe(c),()=>{cancelAnimationFrame(f),h.unobserve(c)}}},[]),N.createElement(pm.div,{ref:ws(a,e),...r,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":i,id:l.listId},FF(t,c=>N.createElement("div",{ref:ws(o,l.listInnerRef),"cmdk-list-sizer":""},c)))}),UYe=N.forwardRef((t,e)=>{let{open:n,onOpenChange:i,overlayClassName:r,contentClassName:a,container:o,...s}=t;return N.createElement(h2,{open:n,onOpenChange:i},N.createElement(p2,{container:o},N.createElement(g2,{"cmdk-overlay":"",className:r}),N.createElement(v2,{"aria-label":t.label,"cmdk-dialog":"",className:a},N.createElement(Zle,{ref:e,...s}))))}),MYe=N.forwardRef((t,e)=>im(n=>n.filtered.count===0)?N.createElement(pm.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),$Ye=N.forwardRef((t,e)=>{let{progress:n,children:i,label:r="Loading...",...a}=t;return N.createElement(pm.div,{ref:e,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r},FF(t,o=>N.createElement("div",{"aria-hidden":!0},o)))}),ip=Object.assign(Zle,{List:LYe,Item:IYe,Input:PYe,Group:OYe,Separator:RYe,Dialog:UYe,Empty:MYe,Loading:$Ye});function jYe(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function QYe(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function Jle(t){let e=N.useRef(t);return Rh(()=>{e.current=t}),e}var Rh=typeof window>"u"?N.useEffect:N.useLayoutEffect;function Rg(t){let e=N.useRef();return e.current===void 0&&(e.current=t()),e}function im(t){let e=h6(),n=()=>t(e.snapshot());return N.useSyncExternalStore(e.subscribe,n,n)}function ece(t,e,n,i=[]){let r=N.useRef(),a=Ab();return Rh(()=>{var o;let s=(()=>{var c;for(let d of n){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(c=d.current.textContent)==null?void 0:c.trim():r.current}})(),l=i.map(c=>c.trim());a.value(t,s,l),(o=e.current)==null||o.setAttribute(Og,s),r.current=s}),r}var HYe=()=>{let[t,e]=N.useState(),n=Rg(()=>new Map);return Rh(()=>{n.current.forEach(i=>i()),n.current=new Map},[t]),(i,r)=>{n.current.set(i,r),e({})}};function zYe(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function FF({asChild:t,children:e},n){return t&&N.isValidElement(e)?N.cloneElement(zYe(e),{ref:e.ref},n(e.props.children)):n(e)}var VYe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function p6({className:t,...e}){return y.jsx(ip,{"data-slot":"command",className:Ut("bg-white text-gray-950 flex h-full w-full flex-col overflow-hidden rounded-md dark:bg-gray-950 dark:text-gray-50",t),...e})}function g6({className:t,...e}){return y.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[y.jsx(ube,{className:"size-4 shrink-0 opacity-50"}),y.jsx(ip.Input,{"data-slot":"command-input",className:Ut("placeholder:text-gray-500 flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-gray-400",t),...e})]})}function v6({className:t,...e}){return y.jsx(ip.List,{"data-slot":"command-list",className:Ut("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...e})}function y6({...t}){return y.jsx(ip.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}function Fx({className:t,...e}){return y.jsx(ip.Group,{"data-slot":"command-group",className:Ut("text-gray-950 [&_[cmdk-group-heading]]:text-gray-500 overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium dark:text-gray-50 dark:[&_[cmdk-group-heading]]:text-gray-400",t),...e})}function GYe({className:t,...e}){return y.jsx(ip.Separator,{"data-slot":"command-separator",className:Ut("bg-gray-200 -mx-1 h-px dark:bg-gray-800",t),...e})}function zg({className:t,...e}){return y.jsx(ip.Item,{"data-slot":"command-item",className:Ut("data-[selected=true]:bg-gray-100 data-[selected=true]:text-gray-900 [&_svg:not([class*='text-'])]:text-gray-500 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:data-[selected=true]:bg-gray-800 dark:data-[selected=true]:text-gray-50 dark:[&_svg:not([class*='text-'])]:text-gray-400",t),...e})}function qYe(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const tce=se.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}),mb=()=>{const t=se.useContext(tce);if(!t)throw new Error("useDrawerContext must be used within a Drawer.Root");return t};qYe(`[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(
|
|
174
174
|
[data-state=closed]
|
|
175
175
|
){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 KYe(){const t=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(t)&&/Mobile/.test(t)||/FxiOS/.test(t))}function WYe(){return k6(/^Mac/)}function YYe(){return k6(/^iPhone/)}function wK(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function XYe(){return k6(/^iPad/)||WYe()&&navigator.maxTouchPoints>1}function nce(){return YYe()||XYe()}function k6(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.platform):void 0}const ZYe=24,JYe=typeof window<"u"?N.useLayoutEffect:N.useEffect;function NK(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const XD=typeof document<"u"&&window.visualViewport;function CK(t){let e=window.getComputedStyle(t);return/(auto|scroll)/.test(e.overflow+e.overflowX+e.overflowY)}function ice(t){for(CK(t)&&(t=t.parentElement);t&&!CK(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}const eXe=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let tw=0,ZD;function tXe(t={}){let{isDisabled:e}=t;JYe(()=>{if(!e)return tw++,tw===1&&nce()&&(ZD=nXe()),()=>{tw--,tw===0&&ZD?.()}},[e])}function nXe(){let t,e=0,n=f=>{t=ice(f.target),!(t===document.documentElement&&t===document.body)&&(e=f.changedTouches[0].pageY)},i=f=>{if(!t||t===document.documentElement||t===document.body){f.preventDefault();return}let h=f.changedTouches[0].pageY,m=t.scrollTop,p=t.scrollHeight-t.clientHeight;p!==0&&((m<=0&&h>e||m>=p&&h<e)&&f.preventDefault(),e=h)},r=f=>{let h=f.target;uO(h)&&h!==document.activeElement&&(f.preventDefault(),h.style.transform="translateY(-2000px)",h.focus(),requestAnimationFrame(()=>{h.style.transform=""}))},a=f=>{let h=f.target;uO(h)&&(h.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{h.style.transform="",XD&&(XD.height<window.innerHeight?requestAnimationFrame(()=>{xK(h)}):XD.addEventListener("resize",()=>xK(h),{once:!0}))}))},o=()=>{window.scrollTo(0,0)},s=window.pageXOffset,l=window.pageYOffset,c=NK(iXe(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let d=NK(Ay(document,"touchstart",n,{passive:!1,capture:!0}),Ay(document,"touchmove",i,{passive:!1,capture:!0}),Ay(document,"touchend",r,{passive:!1,capture:!0}),Ay(document,"focus",a,!0),Ay(window,"scroll",o));return()=>{c(),d(),window.scrollTo(s,l)}}function iXe(t,e,n){let i=t.style[e];return t.style[e]=n,()=>{t.style[e]=i}}function Ay(t,e,n,i){return t.addEventListener(e,n,i),()=>{t.removeEventListener(e,n,i)}}function xK(t){let e=document.scrollingElement||document.documentElement;for(;t&&t!==e;){let n=ice(t);if(n!==document.documentElement&&n!==document.body&&n!==t){let i=n.getBoundingClientRect().top,r=t.getBoundingClientRect().top,a=t.getBoundingClientRect().bottom;const o=n.getBoundingClientRect().bottom+ZYe;a>o&&(n.scrollTop+=r-i)}t=n.parentElement}}function uO(t){return t instanceof HTMLInputElement&&!eXe.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}function rXe(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function aXe(...t){return e=>t.forEach(n=>rXe(n,e))}function rce(...t){return N.useCallback(aXe(...t),t)}const ace=new WeakMap;function to(t,e,n=!1){if(!t||!(t instanceof HTMLElement))return;let i={};Object.entries(e).forEach(([r,a])=>{if(r.startsWith("--")){t.style.setProperty(r,a);return}i[r]=t.style[r],t.style[r]=a}),!n&&ace.set(t,i)}function oXe(t,e){if(!t||!(t instanceof HTMLElement))return;let n=ace.get(t);n&&(t.style[e]=n[e])}const Pa=t=>{switch(t){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return t}};function nw(t,e){if(!t)return null;const n=window.getComputedStyle(t),i=n.transform||n.webkitTransform||n.mozTransform;let r=i.match(/^matrix3d\((.+)\)$/);return r?parseFloat(r[1].split(", ")[Pa(e)?13:12]):(r=i.match(/^matrix\((.+)\)$/),r?parseFloat(r[1].split(", ")[Pa(e)?5:4]):null)}function sXe(t){return 8*(Math.log(t+1)-2)}function JD(t,e){if(!t)return()=>{};const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function lXe(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}const Xr={DURATION:.5,EASE:[.32,.72,0,1]},oce=.4,cXe=.25,dXe=100,sce=8,Xm=16,fO=26,e4="vaul-dragging";function lce(t){const e=se.useRef(t);return se.useEffect(()=>{e.current=t}),se.useMemo(()=>(...n)=>e.current==null?void 0:e.current.call(e,...n),[])}function uXe({defaultProp:t,onChange:e}){const n=se.useState(t),[i]=n,r=se.useRef(i),a=lce(e);return se.useEffect(()=>{r.current!==i&&(a(i),r.current=i)},[i,r,a]),n}function cce({prop:t,defaultProp:e,onChange:n=()=>{}}){const[i,r]=uXe({defaultProp:e,onChange:n}),a=t!==void 0,o=a?t:i,s=lce(n),l=se.useCallback(c=>{if(a){const f=typeof c=="function"?c(t):c;f!==t&&s(f)}else r(c)},[a,t,r,s]);return[o,l]}function fXe({activeSnapPointProp:t,setActiveSnapPointProp:e,snapPoints:n,drawerRef:i,overlayRef:r,fadeFromIndex:a,onSnapPointChange:o,direction:s="bottom",container:l,snapToSequentialPoint:c}){const[d,f]=cce({prop:t,defaultProp:n?.[0],onChange:e}),[h,m]=se.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);se.useEffect(()=>{function E(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);const p=se.useMemo(()=>d===n?.[n.length-1]||null,[n,d]),g=se.useMemo(()=>{var E;return(E=n?.findIndex(I=>I===d))!=null?E:null},[n,d]),b=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===d||!n,k=se.useMemo(()=>{const E=l?{width:l.getBoundingClientRect().width,height:l.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var I;return(I=n?.map(R=>{const V=typeof R=="string";let U=0;if(V&&(U=parseInt(R,10)),Pa(s)){const Z=V?U:h?R*E.height:0;return h?s==="bottom"?E.height-Z:-E.height+Z:Z}const P=V?U:h?R*E.width:0;return h?s==="right"?E.width-P:-E.width+P:P}))!=null?I:[]},[n,h,l]),S=se.useMemo(()=>g!==null?k?.[g]:null,[k,g]),C=se.useCallback(E=>{var I;const R=(I=k?.findIndex(V=>V===E))!=null?I:null;o(R),to(i.current,{transition:`transform ${Xr.DURATION}s cubic-bezier(${Xr.EASE.join(",")})`,transform:Pa(s)?`translate3d(0, ${E}px, 0)`:`translate3d(${E}px, 0, 0)`}),k&&R!==k.length-1&&a!==void 0&&R!==a&&R<a?to(r.current,{transition:`opacity ${Xr.DURATION}s cubic-bezier(${Xr.EASE.join(",")})`,opacity:"0"}):to(r.current,{transition:`opacity ${Xr.DURATION}s cubic-bezier(${Xr.EASE.join(",")})`,opacity:"1"}),f(n?.[Math.max(R,0)])},[i.current,n,k,a,r,f]);se.useEffect(()=>{if(d||t){var E;const I=(E=n?.findIndex(R=>R===t||R===d))!=null?E:-1;k&&I!==-1&&typeof k[I]=="number"&&C(k[I])}},[d,t,n,k,C]);function x({draggedDistance:E,closeDrawer:I,velocity:R,dismissible:V}){if(a===void 0)return;const U=s==="bottom"||s==="right"?(S??0)-E:(S??0)+E,P=g===a-1,Z=g===0,q=E>0;if(P&&to(r.current,{transition:`opacity ${Xr.DURATION}s cubic-bezier(${Xr.EASE.join(",")})`}),!c&&R>2&&!q){V?I():C(k[0]);return}if(!c&&R>2&&q&&k&&n){C(k[n.length-1]);return}const ae=k?.reduce((te,Y)=>typeof te!="number"||typeof Y!="number"?te:Math.abs(Y-U)<Math.abs(te-U)?Y:te),H=Pa(s)?window.innerHeight:window.innerWidth;if(R>oce&&Math.abs(E)<H*.4){const te=q?1:-1;if(te>0&&p&&n){C(k[n.length-1]);return}if(Z&&te<0&&V&&I(),g===null)return;C(k[g+te]);return}C(ae)}function F({draggedDistance:E}){if(S===null)return;const I=s==="bottom"||s==="right"?S-E:S+E;(s==="bottom"||s==="right")&&I<k[k.length-1]||(s==="top"||s==="left")&&I>k[k.length-1]||to(i.current,{transform:Pa(s)?`translate3d(0, ${I}px, 0)`:`translate3d(${I}px, 0, 0)`})}function T(E,I){if(!n||typeof g!="number"||!k||a===void 0)return null;const R=g===a-1;if(g>=a&&I)return 0;if(R&&!I)return 1;if(!b&&!R)return null;const U=R?g+1:g-1,P=R?k[U]-k[U-1]:k[U+1]-k[U],Z=E/Math.abs(P);return R?1-Z:Z}return{isLastSnapPoint:p,activeSnapPoint:d,shouldFade:b,getPercentageDragged:T,setActiveSnapPoint:f,activeSnapPointIndex:g,onRelease:x,onDrag:F,snapPointsOffset:k}}const AXe=()=>()=>{};function mXe(){const{direction:t,isOpen:e,shouldScaleBackground:n,setBackgroundColorOnScale:i,noBodyStyles:r}=mb(),a=se.useRef(null),o=N.useMemo(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-fO)/window.innerWidth}se.useEffect(()=>{if(e&&n){a.current&&clearTimeout(a.current);const l=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!l)return;lXe(i&&!r?JD(document.body,{background:"black"}):AXe,JD(l,{transformOrigin:Pa(t)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Xr.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Xr.EASE.join(",")})`}));const c=JD(l,{borderRadius:`${sce}px`,overflow:"hidden",...Pa(t)?{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()=>{c(),a.current=window.setTimeout(()=>{o?document.body.style.background=o:document.body.style.removeProperty("background")},Xr.DURATION*1e3)}}},[e,n,o])}let my=null;function hXe({isOpen:t,modal:e,nested:n,hasBeenOpened:i,preventScrollRestoration:r,noBodyStyles:a}){const[o,s]=se.useState(()=>typeof window<"u"?window.location.href:""),l=se.useRef(0),c=se.useCallback(()=>{if(wK()&&my===null&&t&&!a){my={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:`${-l.current}px`,left:`${-f}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const m=h-window.innerHeight;m&&l.current>=h&&(document.body.style.top=`${-(l.current+m)}px`)}),300)}},[t]),d=se.useCallback(()=>{if(wK()&&my!==null&&!a){const f=-parseInt(document.body.style.top,10),h=-parseInt(document.body.style.left,10);Object.assign(document.body.style,my),window.requestAnimationFrame(()=>{if(r&&o!==window.location.href){s(window.location.href);return}window.scrollTo(h,f)}),my=null}},[o]);return se.useEffect(()=>{function f(){l.current=window.scrollY}return f(),window.addEventListener("scroll",f),()=>{window.removeEventListener("scroll",f)}},[]),se.useEffect(()=>{if(e)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||d()}},[e,d]),se.useEffect(()=>{n||!i||(t?(!window.matchMedia("(display-mode: standalone)").matches&&c(),e||window.setTimeout(()=>{d()},500)):d())},[t,i,o,e,n,c,d]),{restorePositionSetting:d}}function pXe({open:t,onOpenChange:e,children:n,onDrag:i,onRelease:r,snapPoints:a,shouldScaleBackground:o=!1,setBackgroundColorOnScale:s=!0,closeThreshold:l=cXe,scrollLockTimeout:c=dXe,dismissible:d=!0,handleOnly:f=!1,fadeFromIndex:h=a&&a.length-1,activeSnapPoint:m,setActiveSnapPoint:p,fixed:g,modal:b=!0,onClose:k,nested:S,noBodyStyles:C=!1,direction:x="bottom",defaultOpen:F=!1,disablePreventScroll:T=!0,snapToSequentialPoint:E=!1,preventScrollRestoration:I=!1,repositionInputs:R=!0,onAnimationEnd:V,container:U,autoFocus:P=!1}){var Z,q;const[ae=!1,H]=cce({defaultProp:F,prop:t,onChange:Je=>{e?.(Je),!Je&&!S&&ct(),setTimeout(()=>{V?.(Je)},Xr.DURATION*1e3),Je&&!b&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),Je||(document.body.style.pointerEvents="auto")}}),[te,Y]=se.useState(!1),[ue,we]=se.useState(!1),[ie,L]=se.useState(!1),j=se.useRef(null),$=se.useRef(null),W=se.useRef(null),J=se.useRef(null),K=se.useRef(null),fe=se.useRef(!1),ge=se.useRef(null),Se=se.useRef(0),oe=se.useRef(!1),le=se.useRef(!F),Ee=se.useRef(0),Le=se.useRef(null),ve=se.useRef(((Z=Le.current)==null?void 0:Z.getBoundingClientRect().height)||0),Ae=se.useRef(((q=Le.current)==null?void 0:q.getBoundingClientRect().width)||0),Q=se.useRef(0),X=se.useCallback(Je=>{a&&Je===$e.length-1&&($.current=new Date)},[]),{activeSnapPoint:ne,activeSnapPointIndex:ce,setActiveSnapPoint:ke,onRelease:Ne,snapPointsOffset:$e,onDrag:Ge,shouldFade:He,getPercentageDragged:We}=fXe({snapPoints:a,activeSnapPointProp:m,setActiveSnapPointProp:p,drawerRef:Le,fadeFromIndex:h,overlayRef:j,onSnapPointChange:X,direction:x,container:U,snapToSequentialPoint:E});tXe({isDisabled:!ae||ue||!b||ie||!te||!R||!T});const{restorePositionSetting:ct}=hXe({isOpen:ae,modal:b,nested:S??!1,hasBeenOpened:te,preventScrollRestoration:I,noBodyStyles:C});function ut(){return(window.innerWidth-fO)/window.innerWidth}function yt(Je){var ot,dt;!d&&!a||Le.current&&!Le.current.contains(Je.target)||(ve.current=((ot=Le.current)==null?void 0:ot.getBoundingClientRect().height)||0,Ae.current=((dt=Le.current)==null?void 0:dt.getBoundingClientRect().width)||0,we(!0),W.current=new Date,nce()&&window.addEventListener("touchend",()=>fe.current=!1,{once:!0}),Je.target.setPointerCapture(Je.pointerId),Se.current=Pa(x)?Je.pageY:Je.pageX)}function me(Je,ot){var dt;let Tt=Je;const It=(dt=window.getSelection())==null?void 0:dt.toString(),wt=Le.current?nw(Le.current,x):null,An=new Date;if(Tt.tagName==="SELECT"||Tt.hasAttribute("data-vaul-no-drag")||Tt.closest("[data-vaul-no-drag]"))return!1;if(x==="right"||x==="left")return!0;if($.current&&An.getTime()-$.current.getTime()<500)return!1;if(wt!==null&&(x==="bottom"?wt>0:wt<0))return!0;if(It&&It.length>0)return!1;if(K.current&&An.getTime()-K.current.getTime()<c&&wt===0||ot)return K.current=An,!1;for(;Tt;){if(Tt.scrollHeight>Tt.clientHeight){if(Tt.scrollTop!==0)return K.current=new Date,!1;if(Tt.getAttribute("role")==="dialog")return!0}Tt=Tt.parentNode}return!0}function z(Je){if(Le.current&&ue){const ot=x==="bottom"||x==="right"?1:-1,dt=(Se.current-(Pa(x)?Je.pageY:Je.pageX))*ot,Tt=dt>0,It=a&&!d&&!Tt;if(It&&ce===0)return;const wt=Math.abs(dt),An=document.querySelector("[data-vaul-drawer-wrapper]"),yn=x==="bottom"||x==="top"?ve.current:Ae.current;let Zt=wt/yn;const Pn=We(wt,Tt);if(Pn!==null&&(Zt=Pn),It&&Zt>=1||!fe.current&&!me(Je.target,Tt))return;if(Le.current.classList.add(e4),fe.current=!0,to(Le.current,{transition:"none"}),to(j.current,{transition:"none"}),a&&Ge({draggedDistance:dt}),Tt&&!a){const xn=sXe(dt),Yi=Math.min(xn*-1,0)*ot;to(Le.current,{transform:Pa(x)?`translate3d(0, ${Yi}px, 0)`:`translate3d(${Yi}px, 0, 0)`});return}const Ot=1-Zt;if((He||h&&ce===h-1)&&(i?.(Je,Zt),to(j.current,{opacity:`${Ot}`,transition:"none"},!0)),An&&j.current&&o){const xn=Math.min(ut()+Zt*(1-ut()),1),Yi=8-Zt*8,Re=Math.max(0,14-Zt*14);to(An,{borderRadius:`${Yi}px`,transform:Pa(x)?`scale(${xn}) translate3d(0, ${Re}px, 0)`:`scale(${xn}) translate3d(${Re}px, 0, 0)`,transition:"none"},!0)}if(!a){const xn=wt*ot;to(Le.current,{transform:Pa(x)?`translate3d(0, ${xn}px, 0)`:`translate3d(${xn}px, 0, 0)`})}}}se.useEffect(()=>{window.requestAnimationFrame(()=>{le.current=!0})},[]),se.useEffect(()=>{var Je;function ot(){if(!Le.current||!R)return;const dt=document.activeElement;if(uO(dt)||oe.current){var Tt;const It=((Tt=window.visualViewport)==null?void 0:Tt.height)||0,wt=window.innerHeight;let An=wt-It;const yn=Le.current.getBoundingClientRect().height||0,Zt=yn>wt*.8;Q.current||(Q.current=yn);const Pn=Le.current.getBoundingClientRect().top;if(Math.abs(Ee.current-An)>60&&(oe.current=!oe.current),a&&a.length>0&&$e&&ce){const Ot=$e[ce]||0;An+=Ot}if(Ee.current=An,yn>It||oe.current){const Ot=Le.current.getBoundingClientRect().height;let xn=Ot;Ot>It&&(xn=It-(Zt?Pn:fO)),g?Le.current.style.height=`${Ot-Math.max(An,0)}px`:Le.current.style.height=`${Math.max(xn,It-Pn)}px`}else KYe()||(Le.current.style.height=`${Q.current}px`);a&&a.length>0&&!oe.current?Le.current.style.bottom="0px":Le.current.style.bottom=`${Math.max(An,0)}px`}}return(Je=window.visualViewport)==null||Je.addEventListener("resize",ot),()=>{var dt;return(dt=window.visualViewport)==null?void 0:dt.removeEventListener("resize",ot)}},[ce,a,$e]);function ee(Je){Be(),k?.(),Je||H(!1),setTimeout(()=>{a&&ke(a[0])},Xr.DURATION*1e3)}function xe(){if(!Le.current)return;const Je=document.querySelector("[data-vaul-drawer-wrapper]"),ot=nw(Le.current,x);to(Le.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Xr.DURATION}s cubic-bezier(${Xr.EASE.join(",")})`}),to(j.current,{transition:`opacity ${Xr.DURATION}s cubic-bezier(${Xr.EASE.join(",")})`,opacity:"1"}),o&&ot&&ot>0&&ae&&to(Je,{borderRadius:`${sce}px`,overflow:"hidden",...Pa(x)?{transform:`scale(${ut()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${ut()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Xr.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Xr.EASE.join(",")})`},!0)}function Be(){!ue||!Le.current||(Le.current.classList.remove(e4),fe.current=!1,we(!1),J.current=new Date)}function Ue(Je){if(!ue||!Le.current)return;Le.current.classList.remove(e4),fe.current=!1,we(!1),J.current=new Date;const ot=nw(Le.current,x);if(!Je||!me(Je.target,!1)||!ot||Number.isNaN(ot)||W.current===null)return;const dt=J.current.getTime()-W.current.getTime(),Tt=Se.current-(Pa(x)?Je.pageY:Je.pageX),It=Math.abs(Tt)/dt;if(It>.05&&(L(!0),setTimeout(()=>{L(!1)},200)),a){Ne({draggedDistance:Tt*(x==="bottom"||x==="right"?1:-1),closeDrawer:ee,velocity:It,dismissible:d}),r?.(Je,!0);return}if(x==="bottom"||x==="right"?Tt>0:Tt<0){xe(),r?.(Je,!0);return}if(It>oce){ee(),r?.(Je,!1);return}var wt;const An=Math.min((wt=Le.current.getBoundingClientRect().height)!=null?wt:0,window.innerHeight);var yn;const Zt=Math.min((yn=Le.current.getBoundingClientRect().width)!=null?yn:0,window.innerWidth),Pn=x==="left"||x==="right";if(Math.abs(ot)>=(Pn?Zt:An)*l){ee(),r?.(Je,!1);return}r?.(Je,!0),xe()}se.useEffect(()=>(ae&&(to(document.documentElement,{scrollBehavior:"auto"}),$.current=new Date),()=>{oXe(document.documentElement,"scrollBehavior")}),[ae]);function _e(Je){const ot=Je?(window.innerWidth-Xm)/window.innerWidth:1,dt=Je?-Xm:0;ge.current&&window.clearTimeout(ge.current),to(Le.current,{transition:`transform ${Xr.DURATION}s cubic-bezier(${Xr.EASE.join(",")})`,transform:Pa(x)?`scale(${ot}) translate3d(0, ${dt}px, 0)`:`scale(${ot}) translate3d(${dt}px, 0, 0)`}),!Je&&Le.current&&(ge.current=setTimeout(()=>{const Tt=nw(Le.current,x);to(Le.current,{transition:"none",transform:Pa(x)?`translate3d(0, ${Tt}px, 0)`:`translate3d(${Tt}px, 0, 0)`})},500))}function Pe(Je,ot){if(ot<0)return;const dt=(window.innerWidth-Xm)/window.innerWidth,Tt=dt+ot*(1-dt),It=-Xm+ot*Xm;to(Le.current,{transform:Pa(x)?`scale(${Tt}) translate3d(0, ${It}px, 0)`:`scale(${Tt}) translate3d(${It}px, 0, 0)`,transition:"none"})}function xt(Je,ot){const dt=Pa(x)?window.innerHeight:window.innerWidth,Tt=ot?(dt-Xm)/dt:1,It=ot?-Xm:0;ot&&to(Le.current,{transition:`transform ${Xr.DURATION}s cubic-bezier(${Xr.EASE.join(",")})`,transform:Pa(x)?`scale(${Tt}) translate3d(0, ${It}px, 0)`:`scale(${Tt}) translate3d(${It}px, 0, 0)`})}return se.useEffect(()=>{b||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[b]),se.createElement(h2,{defaultOpen:F,onOpenChange:Je=>{!d&&!Je||(Je?Y(!0):ee(!0),H(Je))},open:ae},se.createElement(tce.Provider,{value:{activeSnapPoint:ne,snapPoints:a,setActiveSnapPoint:ke,drawerRef:Le,overlayRef:j,onOpenChange:e,onPress:yt,onRelease:Ue,onDrag:z,dismissible:d,shouldAnimate:le,handleOnly:f,isOpen:ae,isDragging:ue,shouldFade:He,closeDrawer:ee,onNestedDrag:Pe,onNestedOpenChange:_e,onNestedRelease:xt,keyboardIsOpen:oe,modal:b,snapPointsOffset:$e,activeSnapPointIndex:ce,direction:x,shouldScaleBackground:o,setBackgroundColorOnScale:s,noBodyStyles:C,container:U,autoFocus:P}},n))}const dce=se.forwardRef(function({...t},e){const{overlayRef:n,snapPoints:i,onRelease:r,shouldFade:a,isOpen:o,modal:s,shouldAnimate:l}=mb(),c=rce(e,n),d=i&&i.length>0;if(!s)return null;const f=se.useCallback(h=>r(h),[r]);return se.createElement(g2,{onMouseUp:f,ref:c,"data-vaul-overlay":"","data-vaul-snap-points":o&&d?"true":"false","data-vaul-snap-points-overlay":o&&a?"true":"false","data-vaul-animate":l?.current?"true":"false",...t})});dce.displayName="Drawer.Overlay";const uce=se.forwardRef(function({onPointerDownOutside:t,style:e,onOpenAutoFocus:n,...i},r){const{drawerRef:a,onPress:o,onRelease:s,onDrag:l,keyboardIsOpen:c,snapPointsOffset:d,activeSnapPointIndex:f,modal:h,isOpen:m,direction:p,snapPoints:g,container:b,handleOnly:k,shouldAnimate:S,autoFocus:C}=mb(),[x,F]=se.useState(!1),T=rce(r,a),E=se.useRef(null),I=se.useRef(null),R=se.useRef(!1),V=g&&g.length>0;mXe();const U=(Z,q,ae=0)=>{if(R.current)return!0;const H=Math.abs(Z.y),te=Math.abs(Z.x),Y=te>H,ue=["bottom","right"].includes(q)?1:-1;if(q==="left"||q==="right"){if(!(Z.x*ue<0)&&te>=0&&te<=ae)return Y}else if(!(Z.y*ue<0)&&H>=0&&H<=ae)return!Y;return R.current=!0,!0};se.useEffect(()=>{V&&window.requestAnimationFrame(()=>{F(!0)})},[]);function P(Z){E.current=null,R.current=!1,s(Z)}return se.createElement(v2,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":x?"true":"false","data-vaul-snap-points":m&&V?"true":"false","data-vaul-custom-container":b?"true":"false","data-vaul-animate":S?.current?"true":"false",...i,ref:T,style:d&&d.length>0?{"--snap-point-height":`${d[f??0]}px`,...e}:e,onPointerDown:Z=>{k||(i.onPointerDown==null||i.onPointerDown.call(i,Z),E.current={x:Z.pageX,y:Z.pageY},o(Z))},onOpenAutoFocus:Z=>{n?.(Z),C||Z.preventDefault()},onPointerDownOutside:Z=>{if(t?.(Z),!h||Z.defaultPrevented){Z.preventDefault();return}c.current&&(c.current=!1)},onFocusOutside:Z=>{if(!h){Z.preventDefault();return}},onPointerMove:Z=>{if(I.current=Z,k||(i.onPointerMove==null||i.onPointerMove.call(i,Z),!E.current))return;const q=Z.pageY-E.current.y,ae=Z.pageX-E.current.x,H=Z.pointerType==="touch"?10:2;U({x:ae,y:q},p,H)?l(Z):(Math.abs(ae)>H||Math.abs(q)>H)&&(E.current=null)},onPointerUp:Z=>{i.onPointerUp==null||i.onPointerUp.call(i,Z),E.current=null,R.current=!1,s(Z)},onPointerOut:Z=>{i.onPointerOut==null||i.onPointerOut.call(i,Z),P(I.current)},onContextMenu:Z=>{i.onContextMenu==null||i.onContextMenu.call(i,Z),I.current&&P(I.current)}})});uce.displayName="Drawer.Content";const gXe=250,vXe=120,yXe=se.forwardRef(function({preventCycle:t=!1,children:e,...n},i){const{closeDrawer:r,isDragging:a,snapPoints:o,activeSnapPoint:s,setActiveSnapPoint:l,dismissible:c,handleOnly:d,isOpen:f,onPress:h,onDrag:m}=mb(),p=se.useRef(null),g=se.useRef(!1);function b(){if(g.current){C();return}window.setTimeout(()=>{k()},vXe)}function k(){if(a||t||g.current){C();return}if(C(),!o||o.length===0){c||r();return}if(s===o[o.length-1]&&c){r();return}const F=o.findIndex(E=>E===s);if(F===-1)return;const T=o[F+1];l(T)}function S(){p.current=window.setTimeout(()=>{g.current=!0},gXe)}function C(){p.current&&window.clearTimeout(p.current),g.current=!1}return se.createElement("div",{onClick:b,onPointerCancel:C,onPointerDown:x=>{d&&h(x),S()},onPointerMove:x=>{d&&m(x)},ref:i,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},se.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},e))});yXe.displayName="Drawer.Handle";function kXe(t){const e=mb(),{container:n=e.container,...i}=t;return se.createElement(p2,{container:n,...i})}const hb={Root:pXe,Content:uce,Overlay:dce,Trigger:_R,Portal:kXe};function fce({...t}){return y.jsx(hb.Root,{"data-slot":"drawer",...t})}function bXe({...t}){return y.jsx(hb.Trigger,{"data-slot":"drawer-trigger",...t})}function SXe({...t}){return y.jsx(hb.Portal,{"data-slot":"drawer-portal",...t})}function wXe({className:t,...e}){return y.jsx(hb.Overlay,{"data-slot":"drawer-overlay",className:Ut("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-1001 bg-black/50",t),...e})}function Ace({className:t,children:e,...n}){return y.jsxs(SXe,{"data-slot":"drawer-portal",children:[y.jsx(wXe,{}),y.jsxs(hb.Content,{"data-slot":"drawer-content",className:Ut("group/drawer-content bg-white fixed z-1001 flex h-auto flex-col dark:bg-gray-950","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",t),...n,children:[y.jsx("div",{className:"bg-gray-100 mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block dark:bg-gray-800"}),e]})]})}function NXe(t){const e=CXe(t),n=N.forwardRef((i,r)=>{const{children:a,...o}=i,s=N.Children.toArray(a),l=s.find(FXe);if(l){const c=l.props.children,d=s.map(f=>f===l?N.Children.count(c)>1?N.Children.only(null):N.isValidElement(c)?c.props.children:null:f);return y.jsx(e,{...o,ref:r,children:N.isValidElement(c)?N.cloneElement(c,void 0,d):null})}return y.jsx(e,{...o,ref:r,children:a})});return n.displayName=`${t}.Slot`,n}function CXe(t){const e=N.forwardRef((n,i)=>{const{children:r,...a}=n;if(N.isValidElement(r)){const o=EXe(r),s=_Xe(a,r.props);return r.type!==N.Fragment&&(s.ref=i?ws(i,o):o),N.cloneElement(r,s)}return N.Children.count(r)>1?N.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var xXe=Symbol("radix.slottable");function FXe(t){return N.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===xXe}function _Xe(t,e){const n={...e};for(const i in e){const r=t[i],a=e[i];/^on[A-Z]/.test(i)?r&&a?n[i]=(...s)=>{const l=a(...s);return r(...s),l}:r&&(n[i]=r):i==="style"?n[i]={...r,...a}:i==="className"&&(n[i]=[r,a].filter(Boolean).join(" "))}return{...t,...n}}function EXe(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var _F="Popover",[mce]=rl(_F,[um]),pb=um(),[BXe,gm]=mce(_F),hce=t=>{const{__scopePopover:e,children:n,open:i,defaultOpen:r,onOpenChange:a,modal:o=!1}=t,s=pb(e),l=N.useRef(null),[c,d]=N.useState(!1),[f,h]=md({prop:i,defaultProp:r??!1,onChange:a,caller:_F});return y.jsx(F2,{...s,children:y.jsx(BXe,{scope:e,contentId:ro(),triggerRef:l,open:f,onOpenChange:h,onOpenToggle:N.useCallback(()=>h(m=>!m),[h]),hasCustomAnchor:c,onCustomAnchorAdd:N.useCallback(()=>d(!0),[]),onCustomAnchorRemove:N.useCallback(()=>d(!1),[]),modal:o,children:n})})};hce.displayName=_F;var pce="PopoverAnchor",TXe=N.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,r=gm(pce,n),a=pb(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=r;return N.useEffect(()=>(o(),()=>s()),[o,s]),y.jsx(Vk,{...a,...i,ref:e})});TXe.displayName=pce;var gce="PopoverTrigger",vce=N.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,r=gm(gce,n),a=pb(n),o=Jn(e,r.triggerRef),s=y.jsx(Cn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":wce(r.open),...i,ref:o,onClick:Ht(t.onClick,r.onOpenToggle)});return r.hasCustomAnchor?s:y.jsx(Vk,{asChild:!0,...a,children:s})});vce.displayName=gce;var b6="PopoverPortal",[DXe,IXe]=mce(b6,{forceMount:void 0}),yce=t=>{const{__scopePopover:e,forceMount:n,children:i,container:r}=t,a=gm(b6,e);return y.jsx(DXe,{scope:e,forceMount:n,children:y.jsx(ao,{present:n||a.open,children:y.jsx(Vv,{asChild:!0,container:r,children:i})})})};yce.displayName=b6;var Ev="PopoverContent",kce=N.forwardRef((t,e)=>{const n=IXe(Ev,t.__scopePopover),{forceMount:i=n.forceMount,...r}=t,a=gm(Ev,t.__scopePopover);return y.jsx(ao,{present:i||a.open,children:a.modal?y.jsx(RXe,{...r,ref:e}):y.jsx(PXe,{...r,ref:e})})});kce.displayName=Ev;var OXe=NXe("PopoverContent.RemoveScroll"),RXe=N.forwardRef((t,e)=>{const n=gm(Ev,t.__scopePopover),i=N.useRef(null),r=Jn(e,i),a=N.useRef(!1);return N.useEffect(()=>{const o=i.current;if(o)return A2(o)},[]),y.jsx(Gv,{as:OXe,allowPinchZoom:!0,children:y.jsx(bce,{...t,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ht(t.onCloseAutoFocus,o=>{o.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Ht(t.onPointerDownOutside,o=>{const s=o.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,c=s.button===2||l;a.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:Ht(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),PXe=N.forwardRef((t,e)=>{const n=gm(Ev,t.__scopePopover),i=N.useRef(!1),r=N.useRef(!1);return y.jsx(bce,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),a.defaultPrevented||(i.current||n.triggerRef.current?.focus(),a.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),a.defaultPrevented||(i.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const o=a.target;n.triggerRef.current?.contains(o)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),bce=N.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,...f}=t,h=gm(Ev,n),m=pb(n);return u2(),y.jsx(Qk,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:a,children:y.jsx(zv,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1),children:y.jsx(_2,{"data-state":wce(h.open),role:"dialog",id:h.contentId,...m,...f,ref:e,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Sce="PopoverClose",LXe=N.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,r=gm(Sce,n);return y.jsx(Cn.button,{type:"button",...i,ref:e,onClick:Ht(t.onClick,()=>r.onOpenChange(!1))})});LXe.displayName=Sce;var UXe="PopoverArrow",MXe=N.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,r=pb(n);return y.jsx(E2,{...r,...i,ref:e})});MXe.displayName=UXe;function wce(t){return t?"open":"closed"}var $Xe=hce,jXe=vce,QXe=yce,HXe=kce;function S6({...t}){return y.jsx($Xe,{"data-slot":"popover",...t})}function w6({...t}){return y.jsx(jXe,{"data-slot":"popover-trigger",...t})}function N6({className:t,align:e="center",sideOffset:n=4,...i}){return y.jsx(QXe,{children:y.jsx(HXe,{"data-slot":"popover-content",align:e,sideOffset:n,className:Ut("bg-white text-gray-950 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-1001 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border border-gray-200 p-4 shadow-md outline-hidden dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800",t),...i})})}function bk({data:t,placeholder:e,triggerProps:n,disabled:i,onChange:r,value:a,formPart:o}){const[s,l]=se.useState(!1),c=kYe("(min-width: 768px)"),d=N.useMemo(()=>a&&t.find(f=>f.value===a)||null,[a,t]);return c?y.jsxs(S6,{modal:!0,open:s,onOpenChange:l,children:[y.jsx(w6,{asChild:!0,className:"w-fit min-w-40",children:y.jsx(FK,{placeholder:e,selectedDatum:d,disabled:i,formPart:o,...n})}),y.jsx(N6,{className:"w-[200px] p-0",align:"start",children:y.jsx(_K,{setOpen:l,onChange:r,data:t,placeholder:e,value:a})})]}):y.jsxs(fce,{open:s,onOpenChange:l,children:[y.jsx(bXe,{asChild:!0,children:y.jsx(FK,{placeholder:e,selectedDatum:d,disabled:i,formPart:o,...n})}),y.jsx(Ace,{children:y.jsx("div",{className:"mt-4 border-t",children:y.jsx(_K,{setOpen:l,onChange:r,data:t,placeholder:e,value:a})})})]})}function FK({formPart:t,placeholder:e,selectedDatum:n,...i}){return t?y.jsx(Li,{children:y.jsx(Qt,{variant:"outline",className:"w-full justify-start",...i,children:n?n.label:e})}):y.jsx(Qt,{variant:"outline",className:"w-[150px] justify-start",...i,children:n?n.label:e})}function _K({setOpen:t,onChange:e,placeholder:n,data:i,value:r}){return y.jsxs(p6,{children:[y.jsx(g6,{placeholder:n??"Filter options..."}),y.jsxs(v6,{children:[y.jsx(y6,{children:"No results found."}),y.jsx(Fx,{children:i.map(a=>y.jsxs(zg,{keywords:[a.label],value:a.value,onSelect:o=>{e?.(i.find(s=>s.value===o)?.value??null),t(!1)},children:[a.label,y.jsx(Sh,{className:Ut("ml-auto",a.value===r?"opacity-100":"opacity-0")})]},a.value))})]})]})}N.forwardRef(function({label:e,...n}){return y.jsxs("div",{className:"bottom-0 mt-6",children:[e&&y.jsx("label",{htmlFor:"currency",className:"sr-only",children:e}),y.jsx("select",{className:"bg-gray-100 border focus:ring-2 focus:ring-indigo-200 focus:bg-transparent focus:border-indigo-500 text-base outline-hidden text-gray-700 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out sm:text-sm rounded-md",...n,children:Object.keys(pr).map(i=>y.jsx("option",{value:pr[i],children:pr[i]},i))})]})});const tN=N.forwardRef(function({currencyCodeProps:{error:e,...n},error:i,...r}){let{precision:a}=r;const o=Math.abs(typeof r.value=="number"?r.value:0);if(o&&!a){if(o>.1)a=2;else for(let s=1;s<6;s++)if(o>10**-s){a=s+1;break}}return y.jsxs("div",{className:"w-full flex flex-row min-w-[150px]",children:[y.jsx(bre,{className:"w-full min-w-[75px]",...r,hideControls:!0,precision:a??2,error:i||e}),y.jsx(Eh,{className:"w-1/2 min-w-[75px]",...n,data:Object.keys(pr).map(s=>pr[s])})]})});N.forwardRef(function({type:e="text",label:n,error:i,onChange:r,showControls:a=!1,rightPadding:o="pr-2",precision:s,children:l,isDirty:c,className:d,...f}){function h(m){let p=Number(m.target.value);if(Number.isNaN(p))r(null);else{if(s){const g=Math.pow(10,s);p=Math.round((p+Number.EPSILON)*g)/g}r(p)}}return y.jsxs("div",{className:d,children:[n&&y.jsx("label",{htmlFor:f.name,className:"text-sm font-medium text-gray-700",children:n}),y.jsxs("div",{children:[!a&&e==="number"&&y.jsx("style",{children:`/* Chrome, Safari, Edge, Opera */
|
|
176
176
|
input::-webkit-outer-spin-button,
|
|
@@ -270,7 +270,7 @@ const theme = ${JSON.stringify(e,null,2)};
|
|
|
270
270
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
271
271
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
272
272
|
|
|
273
|
-
export default theme;`}function oY(t){return typeof t=="number"?`${(t*100).toFixed(0)}%`:`calc((${t}) * 100%)`}const sdt=t=>{if(!Number.isNaN(+t))return+t;const e=t.match(/\d*\.?\d+/g);if(!e)return 0;let n=0;for(let i=0;i<e.length;i+=1)n+=+e[i];return n};function ldt(t){Object.assign(t,{alpha(e,n){const i=this||t;return i.colorSpace?`oklch(from ${e} l c h / ${typeof n=="string"?`calc(${n})`:n})`:i.vars?`rgba(${e.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:bpe(e,sdt(n))},lighten(e,n){const i=this||t;return i.colorSpace?`color-mix(in ${i.colorSpace}, ${e}, #fff ${oY(n)})`:v_(e,n)},darken(e,n){const i=this||t;return i.colorSpace?`color-mix(in ${i.colorSpace}, ${e}, #000 ${oY(n)})`:g_(e,n)}})}function HO(t={},...e){const{breakpoints:n,mixins:i={},spacing:r,palette:a={},transitions:o={},typography:s={},shape:l,colorSpace:c,...d}=t;if(t.vars&&t.generateThemeVars===void 0)throw new Error(jh(20));const f=zL({...a,colorSpace:c}),h=gpe(t);let m=Tl(h,{mixins:Wct(h.breakpoints,i),palette:f,shadows:edt.slice(),typography:Bpe(f,s),transitions:rdt(o),zIndex:{...adt}});return m=Tl(m,d),m=e.reduce((p,g)=>Tl(p,g),m),m.unstable_sxConfig={...Mb,...d?.unstable_sxConfig},m.unstable_sx=function(g){return $b({sx:g,theme:this})},m.toRuntimeSource=Tpe,ldt(m),m}function cdt(t){let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,Math.round(e*10)/1e3}const ddt=[...Array(25)].map((t,e)=>{if(e===0)return"none";const n=cdt(e);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Dpe(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function Ipe(t){return t==="dark"?ddt:[]}function udt(t){const{palette:e={mode:"light"},opacity:n,overlays:i,colorSpace:r,...a}=t,o=zL({...e,colorSpace:r});return{palette:o,opacity:{...Dpe(o.mode),...n},overlays:i||Ipe(o.mode),...a}}function fdt(t){return!!t[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!t[0].match(/sxConfig$/)||t[0]==="palette"&&!!t[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const Adt=t=>[...[...Array(25)].map((e,n)=>`--${t?`${t}-`:""}overlays-${n}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],mdt=t=>(e,n)=>{const i=t.rootSelector||":root",r=t.colorSchemeSelector;let a=r;if(r==="class"&&(a=".%s"),r==="data"&&(a="[data-%s]"),r?.startsWith("data-")&&!r.includes("%s")&&(a=`[${r}="%s"]`),t.defaultColorScheme===e){if(e==="dark"){const o={};return Adt(t.cssVarPrefix).forEach(s=>{o[s]=n[s],delete n[s]}),a==="media"?{[i]:n,"@media (prefers-color-scheme: dark)":{[i]:o}}:a?{[a.replace("%s",e)]:o,[`${i}, ${a.replace("%s",e)}`]:n}:{[i]:{...n,...o}}}if(a&&a!=="media")return`${i}, ${a.replace("%s",String(e))}`}else if(e){if(a==="media")return{[`@media (prefers-color-scheme: ${String(e)})`]:{[i]:n}};if(a)return a.replace("%s",String(e))}return i};function hdt(t,e){e.forEach(n=>{t[n]||(t[n]={})})}function vt(t,e,n){!t[e]&&n&&(t[e]=n)}function jy(t){return typeof t!="string"||!t.startsWith("hsl")?t:kpe(t)}function gf(t,e){`${e}Channel`in t||(t[`${e}Channel`]=$y(jy(t[e])))}function pdt(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}const eu=t=>{try{return t()}catch{}},gdt=(t="mui")=>Pct(t);function F4(t,e,n,i,r){if(!n)return;n=n===!0?{}:n;const a=r==="dark"?"dark":"light";if(!i){e[r]=udt({...n,palette:{mode:a,...n?.palette},colorSpace:t});return}const{palette:o,...s}=HO({...i,palette:{mode:a,...n?.palette},colorSpace:t});return e[r]={...n,palette:o,opacity:{...Dpe(a),...n?.opacity},overlays:n?.overlays||Ipe(a)},s}function vdt(t={},...e){const{colorSchemes:n={light:!0},defaultColorScheme:i,disableCssColorScheme:r=!1,cssVarPrefix:a="mui",nativeColor:o=!1,shouldSkipGeneratingVar:s=fdt,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...d}=t,f=Object.keys(n)[0],h=i||(n.light&&f!=="light"?"light":f),m=gdt(a),{[h]:p,light:g,dark:b,...k}=n,S={...k};let C=p;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(C=!0),!C)throw new Error(jh(21,h));let x;o&&(x="oklch");const F=F4(x,S,C,d,h);g&&!S.light&&F4(x,S,g,void 0,"light"),b&&!S.dark&&F4(x,S,b,void 0,"dark");let T={defaultColorScheme:h,...F,cssVarPrefix:a,colorSchemeSelector:l,rootSelector:c,getCssVar:m,colorSchemes:S,font:{...Kct(F.typography),...F.font},spacing:pdt(d.spacing)};Object.keys(T.colorSchemes).forEach(U=>{const P=T.colorSchemes[U].palette,Z=ae=>{const H=ae.split("-"),te=H[1],Y=H[2];return m(ae,P[te][Y])};P.mode==="light"&&(vt(P.common,"background","#fff"),vt(P.common,"onBackground","#000")),P.mode==="dark"&&(vt(P.common,"background","#000"),vt(P.common,"onBackground","#fff"));function q(ae,H,te){if(x){let Y;return ae===Zm&&(Y=`transparent ${((1-te)*100).toFixed(0)}%`),ae===ir&&(Y=`#000 ${(te*100).toFixed(0)}%`),ae===rr&&(Y=`#fff ${(te*100).toFixed(0)}%`),`color-mix(in ${x}, ${H}, ${Y})`}return ae(H,te)}if(hdt(P,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),P.mode==="light"){vt(P.Alert,"errorColor",q(ir,P.error.light,.6)),vt(P.Alert,"infoColor",q(ir,P.info.light,.6)),vt(P.Alert,"successColor",q(ir,P.success.light,.6)),vt(P.Alert,"warningColor",q(ir,P.warning.light,.6)),vt(P.Alert,"errorFilledBg",Z("palette-error-main")),vt(P.Alert,"infoFilledBg",Z("palette-info-main")),vt(P.Alert,"successFilledBg",Z("palette-success-main")),vt(P.Alert,"warningFilledBg",Z("palette-warning-main")),vt(P.Alert,"errorFilledColor",eu(()=>P.getContrastText(P.error.main))),vt(P.Alert,"infoFilledColor",eu(()=>P.getContrastText(P.info.main))),vt(P.Alert,"successFilledColor",eu(()=>P.getContrastText(P.success.main))),vt(P.Alert,"warningFilledColor",eu(()=>P.getContrastText(P.warning.main))),vt(P.Alert,"errorStandardBg",q(rr,P.error.light,.9)),vt(P.Alert,"infoStandardBg",q(rr,P.info.light,.9)),vt(P.Alert,"successStandardBg",q(rr,P.success.light,.9)),vt(P.Alert,"warningStandardBg",q(rr,P.warning.light,.9)),vt(P.Alert,"errorIconColor",Z("palette-error-main")),vt(P.Alert,"infoIconColor",Z("palette-info-main")),vt(P.Alert,"successIconColor",Z("palette-success-main")),vt(P.Alert,"warningIconColor",Z("palette-warning-main")),vt(P.AppBar,"defaultBg",Z("palette-grey-100")),vt(P.Avatar,"defaultBg",Z("palette-grey-400")),vt(P.Button,"inheritContainedBg",Z("palette-grey-300")),vt(P.Button,"inheritContainedHoverBg",Z("palette-grey-A100")),vt(P.Chip,"defaultBorder",Z("palette-grey-400")),vt(P.Chip,"defaultAvatarColor",Z("palette-grey-700")),vt(P.Chip,"defaultIconColor",Z("palette-grey-700")),vt(P.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),vt(P.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),vt(P.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),vt(P.LinearProgress,"primaryBg",q(rr,P.primary.main,.62)),vt(P.LinearProgress,"secondaryBg",q(rr,P.secondary.main,.62)),vt(P.LinearProgress,"errorBg",q(rr,P.error.main,.62)),vt(P.LinearProgress,"infoBg",q(rr,P.info.main,.62)),vt(P.LinearProgress,"successBg",q(rr,P.success.main,.62)),vt(P.LinearProgress,"warningBg",q(rr,P.warning.main,.62)),vt(P.Skeleton,"bg",x?q(Zm,P.text.primary,.11):`rgba(${Z("palette-text-primaryChannel")} / 0.11)`),vt(P.Slider,"primaryTrack",q(rr,P.primary.main,.62)),vt(P.Slider,"secondaryTrack",q(rr,P.secondary.main,.62)),vt(P.Slider,"errorTrack",q(rr,P.error.main,.62)),vt(P.Slider,"infoTrack",q(rr,P.info.main,.62)),vt(P.Slider,"successTrack",q(rr,P.success.main,.62)),vt(P.Slider,"warningTrack",q(rr,P.warning.main,.62));const ae=x?q(ir,P.background.default,.6825):kw(P.background.default,.8);vt(P.SnackbarContent,"bg",ae),vt(P.SnackbarContent,"color",eu(()=>x?QO.text.primary:P.getContrastText(ae))),vt(P.SpeedDialAction,"fabHoverBg",kw(P.background.paper,.15)),vt(P.StepConnector,"border",Z("palette-grey-400")),vt(P.StepContent,"border",Z("palette-grey-400")),vt(P.Switch,"defaultColor",Z("palette-common-white")),vt(P.Switch,"defaultDisabledColor",Z("palette-grey-100")),vt(P.Switch,"primaryDisabledColor",q(rr,P.primary.main,.62)),vt(P.Switch,"secondaryDisabledColor",q(rr,P.secondary.main,.62)),vt(P.Switch,"errorDisabledColor",q(rr,P.error.main,.62)),vt(P.Switch,"infoDisabledColor",q(rr,P.info.main,.62)),vt(P.Switch,"successDisabledColor",q(rr,P.success.main,.62)),vt(P.Switch,"warningDisabledColor",q(rr,P.warning.main,.62)),vt(P.TableCell,"border",q(rr,q(Zm,P.divider,1),.88)),vt(P.Tooltip,"bg",q(Zm,P.grey[700],.92))}if(P.mode==="dark"){vt(P.Alert,"errorColor",q(rr,P.error.light,.6)),vt(P.Alert,"infoColor",q(rr,P.info.light,.6)),vt(P.Alert,"successColor",q(rr,P.success.light,.6)),vt(P.Alert,"warningColor",q(rr,P.warning.light,.6)),vt(P.Alert,"errorFilledBg",Z("palette-error-dark")),vt(P.Alert,"infoFilledBg",Z("palette-info-dark")),vt(P.Alert,"successFilledBg",Z("palette-success-dark")),vt(P.Alert,"warningFilledBg",Z("palette-warning-dark")),vt(P.Alert,"errorFilledColor",eu(()=>P.getContrastText(P.error.dark))),vt(P.Alert,"infoFilledColor",eu(()=>P.getContrastText(P.info.dark))),vt(P.Alert,"successFilledColor",eu(()=>P.getContrastText(P.success.dark))),vt(P.Alert,"warningFilledColor",eu(()=>P.getContrastText(P.warning.dark))),vt(P.Alert,"errorStandardBg",q(ir,P.error.light,.9)),vt(P.Alert,"infoStandardBg",q(ir,P.info.light,.9)),vt(P.Alert,"successStandardBg",q(ir,P.success.light,.9)),vt(P.Alert,"warningStandardBg",q(ir,P.warning.light,.9)),vt(P.Alert,"errorIconColor",Z("palette-error-main")),vt(P.Alert,"infoIconColor",Z("palette-info-main")),vt(P.Alert,"successIconColor",Z("palette-success-main")),vt(P.Alert,"warningIconColor",Z("palette-warning-main")),vt(P.AppBar,"defaultBg",Z("palette-grey-900")),vt(P.AppBar,"darkBg",Z("palette-background-paper")),vt(P.AppBar,"darkColor",Z("palette-text-primary")),vt(P.Avatar,"defaultBg",Z("palette-grey-600")),vt(P.Button,"inheritContainedBg",Z("palette-grey-800")),vt(P.Button,"inheritContainedHoverBg",Z("palette-grey-700")),vt(P.Chip,"defaultBorder",Z("palette-grey-700")),vt(P.Chip,"defaultAvatarColor",Z("palette-grey-300")),vt(P.Chip,"defaultIconColor",Z("palette-grey-300")),vt(P.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),vt(P.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),vt(P.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),vt(P.LinearProgress,"primaryBg",q(ir,P.primary.main,.5)),vt(P.LinearProgress,"secondaryBg",q(ir,P.secondary.main,.5)),vt(P.LinearProgress,"errorBg",q(ir,P.error.main,.5)),vt(P.LinearProgress,"infoBg",q(ir,P.info.main,.5)),vt(P.LinearProgress,"successBg",q(ir,P.success.main,.5)),vt(P.LinearProgress,"warningBg",q(ir,P.warning.main,.5)),vt(P.Skeleton,"bg",x?q(Zm,P.text.primary,.13):`rgba(${Z("palette-text-primaryChannel")} / 0.13)`),vt(P.Slider,"primaryTrack",q(ir,P.primary.main,.5)),vt(P.Slider,"secondaryTrack",q(ir,P.secondary.main,.5)),vt(P.Slider,"errorTrack",q(ir,P.error.main,.5)),vt(P.Slider,"infoTrack",q(ir,P.info.main,.5)),vt(P.Slider,"successTrack",q(ir,P.success.main,.5)),vt(P.Slider,"warningTrack",q(ir,P.warning.main,.5));const ae=x?q(rr,P.background.default,.985):kw(P.background.default,.98);vt(P.SnackbarContent,"bg",ae),vt(P.SnackbarContent,"color",eu(()=>x?_pe.text.primary:P.getContrastText(ae))),vt(P.SpeedDialAction,"fabHoverBg",kw(P.background.paper,.15)),vt(P.StepConnector,"border",Z("palette-grey-600")),vt(P.StepContent,"border",Z("palette-grey-600")),vt(P.Switch,"defaultColor",Z("palette-grey-300")),vt(P.Switch,"defaultDisabledColor",Z("palette-grey-600")),vt(P.Switch,"primaryDisabledColor",q(ir,P.primary.main,.55)),vt(P.Switch,"secondaryDisabledColor",q(ir,P.secondary.main,.55)),vt(P.Switch,"errorDisabledColor",q(ir,P.error.main,.55)),vt(P.Switch,"infoDisabledColor",q(ir,P.info.main,.55)),vt(P.Switch,"successDisabledColor",q(ir,P.success.main,.55)),vt(P.Switch,"warningDisabledColor",q(ir,P.warning.main,.55)),vt(P.TableCell,"border",q(ir,q(Zm,P.divider,1),.68)),vt(P.Tooltip,"bg",q(Zm,P.grey[700],.92))}gf(P.background,"default"),gf(P.background,"paper"),gf(P.common,"background"),gf(P.common,"onBackground"),gf(P,"divider"),Object.keys(P).forEach(ae=>{const H=P[ae];ae!=="tonalOffset"&&H&&typeof H=="object"&&(H.main&&vt(P[ae],"mainChannel",$y(jy(H.main))),H.light&&vt(P[ae],"lightChannel",$y(jy(H.light))),H.dark&&vt(P[ae],"darkChannel",$y(jy(H.dark))),H.contrastText&&vt(P[ae],"contrastTextChannel",$y(jy(H.contrastText))),ae==="text"&&(gf(P[ae],"primary"),gf(P[ae],"secondary")),ae==="action"&&(H.active&&gf(P[ae],"active"),H.selected&&gf(P[ae],"selected")))})}),T=e.reduce((U,P)=>Tl(U,P),T);const E={prefix:a,disableCssColorScheme:r,shouldSkipGeneratingVar:s,getSelector:mdt(T),enableContrastVars:o},{vars:I,generateThemeVars:R,generateStyleSheets:V}=Mct(T,E);return T.vars=I,Object.entries(T.colorSchemes[T.defaultColorScheme]).forEach(([U,P])=>{T[U]=P}),T.generateThemeVars=R,T.generateStyleSheets=V,T.generateSpacing=function(){return ppe(d.spacing,LL(this))},T.getColorSchemeSelector=$ct(l),T.spacing=T.generateSpacing(),T.shouldSkipGeneratingVar=s,T.unstable_sxConfig={...Mb,...d?.unstable_sxConfig},T.unstable_sx=function(P){return $b({sx:P,theme:this})},T.toRuntimeSource=Tpe,T}function sY(t,e,n){t.colorSchemes&&n&&(t.colorSchemes[e]={...n!==!0&&n,palette:zL({...n===!0?{}:n.palette,mode:e})})}function VL(t={},...e){const{palette:n,cssVariables:i=!1,colorSchemes:r=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...o}=t,s=a||"light",l=r?.[s],c={...r,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(i===!1){if(!("colorSchemes"in t))return HO(t,...e);let d=n;"palette"in t||c[s]&&(c[s]!==!0?d=c[s].palette:s==="dark"&&(d={mode:"dark"}));const f=HO({...t,palette:d},...e);return f.defaultColorScheme=s,f.colorSchemes=c,f.palette.mode==="light"&&(f.colorSchemes.light={...c.light!==!0&&c.light,palette:f.palette},sY(f,"dark",c.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:f.palette},sY(f,"light",c.light)),f}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),vdt({...o,colorSchemes:c,defaultColorScheme:s,...typeof i!="boolean"&&i},...e)}const ydt=VL();function kdt({theme:t,...e}){const n=bh in t?t[bh]:void 0;return y.jsx(Cpe,{...e,themeId:n?bh:void 0,theme:n||t})}const bw={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:bdt}=Rct({themeId:bh,theme:()=>VL({cssVariables:!0}),colorSchemeStorageKey:bw.colorSchemeStorageKey,modeStorageKey:bw.modeStorageKey,defaultColorScheme:{light:bw.defaultLightColorScheme,dark:bw.defaultDarkColorScheme},resolveTheme:t=>{const e={...t,typography:Bpe(t.palette,t.typography)};return e.unstable_sx=function(i){return $b({sx:i,theme:this})},e}}),Sdt=bdt;function wdt({theme:t,...e}){const n=N.useMemo(()=>{if(typeof t=="function")return t;const i=bh in t?t[bh]:t;return"colorSchemes"in i?null:"vars"in i?t:{...t,vars:null}},[t]);return n?y.jsx(kdt,{theme:n,...e}):y.jsx(Sdt,{theme:t,...e})}function Ndt(t){return y.jsx(vpe,{...t,defaultTheme:ydt,themeId:bh})}function Ope(t){return function(n){return y.jsx(Ndt,{styles:typeof t=="function"?i=>t({theme:i,...n}):t})}}function pgt(){return dct}function Cdt(t){return wct(t)}const zO=typeof Ope({})=="function",xdt=(t,e)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...e&&!t.vars&&{colorScheme:t.palette.mode}}),Fdt=t=>({color:(t.vars||t).palette.text.primary,...t.typography.body1,backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),Rpe=(t,e=!1)=>{const n={};e&&t.colorSchemes&&typeof t.getColorSchemeSelector=="function"&&Object.entries(t.colorSchemes).forEach(([a,o])=>{const s=t.getColorSchemeSelector(a);s.startsWith("@")?n[s]={":root":{colorScheme:o.palette?.mode}}:n[s.replace(/\s*&/,"")]={colorScheme:o.palette?.mode}});let i={html:xdt(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:{margin:0,...Fdt(t),"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}},...n};const r=t.components?.MuiCssBaseline?.styleOverrides;return r&&(i=[i,r]),i},oN="mui-ecs",_dt=t=>{const e=Rpe(t,!1),n=Array.isArray(e)?e[0]:e;return!t.vars&&n&&(n.html[`:root:has(${oN})`]={colorScheme:t.palette.mode}),t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([i,r])=>{const a=t.getColorSchemeSelector(i);a.startsWith("@")?n[a]={[`:root:not(:has(.${oN}))`]:{colorScheme:r.palette?.mode}}:n[a.replace(/\s*&/,"")]={[`&:not(:has(.${oN}))`]:{colorScheme:r.palette?.mode}}}),e},Edt=Ope(zO?({theme:t,enableColorScheme:e})=>Rpe(t,e):({theme:t})=>_dt(t));function Bdt(t){const e=Cdt({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:i=!1}=e;return y.jsxs(N.Fragment,{children:[zO&&y.jsx(Edt,{enableColorScheme:i}),!zO&&!i&&y.jsx("span",{className:oN,style:{display:"none"}}),n]})}var y_=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Tdt={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Ddt=class{#e=Tdt;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},VO=new Ddt;function Idt(t){setTimeout(t,0)}var k_=typeof window>"u"||"Deno"in globalThis;function nd(){}function Odt(t,e){return typeof t=="function"?t(e):t}function Rdt(t){return typeof t=="number"&&t>=0&&t!==1/0}function Pdt(t,e){return Math.max(t+(e||0)-Date.now(),0)}function GO(t,e){return typeof t=="function"?t(e):t}function Ldt(t,e){return typeof t=="function"?t(e):t}function lY(t,e){const{type:n="all",exact:i,fetchStatus:r,predicate:a,queryKey:o,stale:s}=t;if(o){if(i){if(e.queryHash!==GL(o,e.options))return!1}else if(!Ok(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&e.isStale()!==s||r&&r!==e.state.fetchStatus||a&&!a(e))}function cY(t,e){const{exact:n,status:i,predicate:r,mutationKey:a}=t;if(a){if(!e.options.mutationKey)return!1;if(n){if(Ik(e.options.mutationKey)!==Ik(a))return!1}else if(!Ok(e.options.mutationKey,a))return!1}return!(i&&e.state.status!==i||r&&!r(e))}function GL(t,e){return(e?.queryKeyHashFn||Ik)(t)}function Ik(t){return JSON.stringify(t,(e,n)=>qO(n)?Object.keys(n).sort().reduce((i,r)=>(i[r]=n[r],i),{}):n)}function Ok(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Ok(t[n],e[n])):!1}var Udt=Object.prototype.hasOwnProperty;function Ppe(t,e){if(t===e)return t;const n=dY(t)&&dY(e);if(!n&&!(qO(t)&&qO(e)))return e;const r=(n?t:Object.keys(t)).length,a=n?e:Object.keys(e),o=a.length,s=n?new Array(o):{};let l=0;for(let c=0;c<o;c++){const d=n?c:a[c],f=t[d],h=e[d];if(f===h){s[d]=f,(n?c<r:Udt.call(t,d))&&l++;continue}if(f===null||h===null||typeof f!="object"||typeof h!="object"){s[d]=h;continue}const m=Ppe(f,h);s[d]=m,m===f&&l++}return r===o&&l===r?t:s}function dY(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function qO(t){if(!uY(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!uY(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function uY(t){return Object.prototype.toString.call(t)==="[object Object]"}function Mdt(t){return new Promise(e=>{VO.setTimeout(e,t)})}function $dt(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Ppe(t,e):e}function jdt(t,e,n=0){const i=[...t,e];return n&&i.length>n?i.slice(1):i}function Qdt(t,e,n=0){const i=[e,...t];return n&&i.length>n?i.slice(0,-1):i}var qL=Symbol();function Lpe(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===qL?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Hdt=class extends y_{#e;#t;#n;constructor(){super(),this.#n=t=>{if(!k_&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Upe=new Hdt;function zdt(){let t,e;const n=new Promise((r,a)=>{t=r,e=a});n.status="pending",n.catch(()=>{});function i(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{i({status:"fulfilled",value:r}),t(r)},n.reject=r=>{i({status:"rejected",reason:r}),e(r)},n}var Vdt=Idt;function Gdt(){let t=[],e=0,n=s=>{s()},i=s=>{s()},r=Vdt;const a=s=>{e?t.push(s):r(()=>{n(s)})},o=()=>{const s=t;t=[],s.length&&r(()=>{i(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;e++;try{l=s()}finally{e--,e||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{i=s},setScheduler:s=>{r=s}}}var vs=Gdt(),qdt=class extends y_{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(!k_&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(n=>{n(t)}))}isOnline(){return this.#e}},Kx=new qdt;function Kdt(t){return Math.min(1e3*2**t,3e4)}function Mpe(t){return(t??"online")==="online"?Kx.isOnline():!0}var KO=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function $pe(t){let e=!1,n=0,i;const r=zdt(),a=()=>r.status!=="pending",o=g=>{if(!a()){const b=new KO(g);h(b),t.onCancel?.(b)}},s=()=>{e=!0},l=()=>{e=!1},c=()=>Upe.isFocused()&&(t.networkMode==="always"||Kx.isOnline())&&t.canRun(),d=()=>Mpe(t.networkMode)&&t.canRun(),f=g=>{a()||(i?.(),r.resolve(g))},h=g=>{a()||(i?.(),r.reject(g))},m=()=>new Promise(g=>{i=b=>{(a()||c())&&g(b)},t.onPause?.()}).then(()=>{i=void 0,a()||t.onContinue?.()}),p=()=>{if(a())return;let g;const b=n===0?t.initialPromise:void 0;try{g=b??t.fn()}catch(k){g=Promise.reject(k)}Promise.resolve(g).then(f).catch(k=>{if(a())return;const S=t.retry??(k_?0:3),C=t.retryDelay??Kdt,x=typeof C=="function"?C(n,k):C,F=S===!0||typeof S=="number"&&n<S||typeof S=="function"&&S(n,k);if(e||!F){h(k);return}n++,t.onFail?.(n,k),Mdt(x).then(()=>c()?void 0:m()).then(()=>{e?h(k):p()})})};return{promise:r,status:()=>r.status,cancel:o,continue:()=>(i?.(),r),cancelRetry:s,continueRetry:l,canStart:d,start:()=>(d()?p():m().then(p),r)}}var jpe=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Rdt(this.gcTime)&&(this.#e=VO.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(k_?1/0:300*1e3))}clearGcTimeout(){this.#e&&(VO.clearTimeout(this.#e),this.#e=void 0)}},Wdt=class extends jpe{#e;#t;#n;#i;#r;#o;#a;constructor(t){super(),this.#a=!1,this.#o=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#n=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=AY(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#o,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=AY(this.options);e.data!==void 0&&(this.setState(fY(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,e){const n=$dt(this.state.data,t,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t,e){this.#s({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#r?.promise;return this.#r?.cancel(t),e?e.then(nd).catch(nd):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(t=>Ldt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===qL||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>GO(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Pdt(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#r&&(this.#a?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(t&&this.setOptions(t),!this.options.queryFn){const s=this.observers.find(l=>l.options.queryFn);s&&this.setOptions(s.options)}const n=new AbortController,i=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},r=()=>{const s=Lpe(this.options,e),c=(()=>{const d={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(d),d})();return this.#a=!1,this.options.persister?this.options.persister(s,c,this):s(c)},o=(()=>{const s={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:r};return i(s),s})();this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#s({type:"fetch",meta:o.fetchOptions?.meta}),this.#r=$pe({initialPromise:e?.initialPromise,fn:o.fetchFn,onCancel:s=>{s instanceof KO&&s.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(s,l)=>{this.#s({type:"failed",failureCount:s,error:l})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const s=await this.#r.start();if(s===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(s),this.#n.config.onSuccess?.(s,this),this.#n.config.onSettled?.(s,this.state.error,this),s}catch(s){if(s instanceof KO){if(s.silent)return this.#r.promise;if(s.revert){if(this.state.data===void 0)throw s;return this.state.data}}throw this.#s({type:"error",error:s}),this.#n.config.onError?.(s,this),this.#n.config.onSettled?.(this.state.data,s,this),s}finally{this.scheduleGc()}}#s(t){const e=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Ydt(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...fY(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=t.manual?i:void 0,i;case"error":const r=t.error;return{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),vs.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function Ydt(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Mpe(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function fY(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function AY(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,i=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}function mY(t){return{onFetch:(e,n)=>{const i=e.options,r=e.fetchOptions?.meta?.fetchMore?.direction,a=e.state.data?.pages||[],o=e.state.data?.pageParams||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let d=!1;const f=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(e.signal.aborted?d=!0:e.signal.addEventListener("abort",()=>{d=!0}),e.signal)})},h=Lpe(e.options,e.fetchOptions),m=async(p,g,b)=>{if(d)return Promise.reject();if(g==null&&p.pages.length)return Promise.resolve(p);const S=(()=>{const T={client:e.client,queryKey:e.queryKey,pageParam:g,direction:b?"backward":"forward",meta:e.options.meta};return f(T),T})(),C=await h(S),{maxPages:x}=e.options,F=b?Qdt:jdt;return{pages:F(p.pages,C,x),pageParams:F(p.pageParams,g,x)}};if(r&&a.length){const p=r==="backward",g=p?Xdt:hY,b={pages:a,pageParams:o},k=g(i,b);s=await m(b,k,p)}else{const p=t??a.length;do{const g=l===0?o[0]??i.initialPageParam:hY(i,s);if(l>0&&g==null)break;s=await m(s,g),l++}while(l<p)}return s};e.options.persister?e.fetchFn=()=>e.options.persister?.(c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=c}}}function hY(t,{pages:e,pageParams:n}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,n[i],n):void 0}function Xdt(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}var Zdt=class extends jpe{#e;#t;#n;#i;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||Jdt(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=$pe({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(a,o)=>{this.#r({type:"failed",failureCount:a,error:o})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",r=!this.#i.canStart();try{if(i)e();else{this.#r({type:"pending",variables:t,isPaused:r}),await this.#n.config.onMutate?.(t,this,n);const o=await this.options.onMutate?.(t,n);o!==this.state.context&&this.#r({type:"pending",context:o,variables:t,isPaused:r})}const a=await this.#i.start();return await this.#n.config.onSuccess?.(a,t,this.state.context,this,n),await this.options.onSuccess?.(a,t,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,t,this.state.context,n),this.#r({type:"success",data:a}),a}catch(a){try{throw await this.#n.config.onError?.(a,t,this.state.context,this,n),await this.options.onError?.(a,t,this.state.context,n),await this.#n.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,a,t,this.state.context,n),a}finally{this.#r({type:"error",error:a})}}finally{this.#n.runNext(this)}}#r(t){const e=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),vs.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function Jdt(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var eut=class extends y_{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,e,n){const i=new Zdt({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(e),state:n});return this.add(i),i}add(t){this.#e.add(t);const e=Sw(t);if(typeof e=="string"){const n=this.#t.get(e);n?n.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=Sw(t);if(typeof e=="string"){const n=this.#t.get(e);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Sw(t);if(typeof e=="string"){const i=this.#t.get(e)?.find(r=>r.state.status==="pending");return!i||i===t}else return!0}runNext(t){const e=Sw(t);return typeof e=="string"?this.#t.get(e)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){vs.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(n=>cY(e,n))}findAll(t={}){return this.getAll().filter(e=>cY(t,e))}notify(t){vs.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return vs.batch(()=>Promise.all(t.map(e=>e.continue().catch(nd))))}};function Sw(t){return t.options.scope?.id}var tut=class extends y_{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const i=e.queryKey,r=e.queryHash??GL(i,e);let a=this.get(r);return a||(a=new Wdt({client:t,queryKey:i,queryHash:r,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){vs.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(n=>lY(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>lY(t,n)):e}notify(t){vs.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){vs.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){vs.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nut=class{#e;#t;#n;#i;#r;#o;#a;#s;constructor(t={}){this.#e=t.queryCache||new tut,this.#t=t.mutationCache||new eut,this.#n=t.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=Upe.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Kx.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=this.#e.build(this,e),i=n.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(GO(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:n})=>{const i=n.data;return[e,i]})}setQueryData(t,e,n){const i=this.defaultQueryOptions({queryKey:t}),a=this.#e.get(i.queryHash)?.state.data,o=Odt(e,a);if(o!==void 0)return this.#e.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return vs.batch(()=>this.#e.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,n)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;vs.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return vs.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},i=vs.batch(()=>this.#e.findAll(t).map(r=>r.cancel(n)));return Promise.all(i).then(nd).catch(nd)}invalidateQueries(t,e={}){return vs.batch(()=>(this.#e.findAll(t).forEach(n=>{n.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},i=vs.batch(()=>this.#e.findAll(t).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let a=r.fetch(void 0,n);return n.throwOnError||(a=a.catch(nd)),r.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(i).then(nd)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(GO(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(nd).catch(nd)}fetchInfiniteQuery(t){return t.behavior=mY(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(nd).catch(nd)}ensureInfiniteQueryData(t){return t.behavior=mY(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Kx.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#i.set(Ik(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#i.values()],n={};return e.forEach(i=>{Ok(t,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(t,e){this.#r.set(Ik(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(i=>{Ok(t,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=GL(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===qL&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},iut=N.createContext(void 0),rut=({client:t,children:e})=>(N.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),y.jsx(iut.Provider,{value:t,children:e}));function aut(){const t=KY();return N.useEffect(()=>{const e=t[t.length-1],n=e?.handle;if(n?.title){const i=typeof n.title=="function"?n.title(e.data):n.title;document.title=`${i} - Accounter`}else document.title="Accounter"},[t]),y.jsx("div",{style:{display:"none"}})}var out=(t,e,n,i,r,a,o,s)=>{let l=document.documentElement,c=["light","dark"];function d(m){(Array.isArray(t)?t:[t]).forEach(p=>{let g=p==="class",b=g&&a?r.map(k=>a[k]||k):r;g?(l.classList.remove(...b),l.classList.add(a&&a[m]?a[m]:m)):l.setAttribute(p,m)}),f(m)}function f(m){s&&c.includes(m)&&(l.style.colorScheme=m)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)d(i);else try{let m=localStorage.getItem(e)||n,p=o&&m==="system"?h():m;d(p)}catch{}},sut=N.createContext(void 0),lut={setTheme:t=>{},themes:[]},cut=()=>{var t;return(t=N.useContext(sut))!=null?t:lut};N.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:i,enableColorScheme:r,defaultTheme:a,value:o,themes:s,nonce:l,scriptProps:c})=>{let d=JSON.stringify([n,e,a,t,s,o,i,r]).slice(1,-1);return N.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${out.toString()})(${d})`}})});const dut=({...t})=>{const{theme:e="system"}=cut();return y.jsx(KBe,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-white group-[.toaster]:text-gray-950 group-[.toaster]:border-gray-200 group-[.toaster]:shadow-lg dark:group-[.toaster]:bg-gray-950 dark:group-[.toaster]:text-gray-50 dark:group-[.toaster]:border-gray-800",description:"group-[.toast]:text-gray-500 dark:group-[.toast]:text-gray-400",actionButton:"group-[.toast]:bg-gray-900 group-[.toast]:text-gray-50 font-medium dark:group-[.toast]:bg-gray-50 dark:group-[.toast]:text-gray-900",cancelButton:"group-[.toast]:bg-gray-100 group-[.toast]:text-gray-500 font-medium dark:group-[.toast]:bg-gray-800 dark:group-[.toast]:text-gray-400"}},...t})},uut=new nut({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),fut=VL({palette:{primary:{main:"#556cd6"},secondary:{main:"#19857b"},error:{main:th.A400}}});function Aut(){return y.jsx(vte,{withGlobalStyles:!0,theme:{fontFamily:"Roboto, sans-serif",fontSizes:{md:"14"}},children:y.jsxs(wdt,{theme:fut,children:[y.jsx(Bdt,{}),y.jsxs(bBe,{children:[y.jsx(dut,{}),y.jsx(WBe,{children:y.jsx(rut,{client:uut,children:y.jsxs(hst,{children:[y.jsx(aut,{}),y.jsx(dpe,{}),y.jsx(XY,{})]})})})]})]})})}function mut(){if(!new Yk().isLoggedIn())throw IY($n.LOGIN);return null}function hut(){if(new Yk().isLoggedIn())throw IY($n.HOME);return null}let ww=null;function Qpe(){if(ww)return ww;const t=new Yk;let e;return e="https://accounter.onrender.com/graphql",ww=eZ({url:e,exchanges:[JX({onResult(n){Oee(n)}}),Iee(async n=>({addAuthToOperation(i){const r=t.authToken();return r?n.appendHeaders(i,{Authorization:r}):i},didAuthError(i,r){return i?.response?.status===401||i?.graphQLErrors?.some(a=>a.extensions?.code==="FORBIDDEN")},async refreshAuth(){t.logout()}})),ZX]}),ww}function put(t){if(!t.chargeId)throw new Response("Charge ID is required",{status:400});return{chargeId:t.chargeId}}function gut(t){if(!t.businessId)throw new Response("Business ID is required",{status:400});return{businessId:t.businessId}}async function vut({params:t}){const{chargeId:e}=put(t),i=await Qpe().query(ZNe,{chargeId:e}).toPromise();if(!i.data?.charge)throw new Response("Charge not found",{status:404});return i.data}async function yut({params:t}){const{businessId:e}=gut(t),i=await Qpe().query(XNe,{businessId:e}).toPromise();if(!i.data?.business)throw new Response("Business not found",{status:404});return i.data}const pY=N.lazy(()=>li(()=>import("./all-charges-Cks6Qu5G.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27])).then(t=>({default:t.AllCharges}))),kut=N.lazy(()=>li(()=>import("./missing-info-charges-BDOaJ6UE.js"),__vite__mapDeps([28,1,9,10,11,12,13,6,14,15,16,17,18,19,20,21,22,23,24,25,26,3,27])).then(t=>({default:t.MissingInfoCharges}))),but=N.lazy(()=>li(()=>import("./charge-DVtJqjdK.js"),__vite__mapDeps([29,9,10,11,12,13,6,14,15,16,17,18,19,20,21,22,23,24,25,26,3])).then(t=>({default:t.Charge}))),Sut=N.lazy(()=>li(()=>import("./charges-ledger-validation-BZg8EMCw.js"),__vite__mapDeps([30,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,31])).then(t=>({default:t.ChargesLedgerValidation}))),wut=N.lazy(()=>li(()=>import("./index-B6mBG1MP.js"),__vite__mapDeps([32,1,33,34,19,27,11])).then(t=>({default:t.Businesses}))),Nut=N.lazy(()=>li(()=>import("./business-Dno1A6jP.js"),__vite__mapDeps([35,36,34,37,21,22,38,33,9,10,11,12,13,6,14,15,16,17,18,19,20,39,40,41,42])).then(t=>({default:t.BusinessScreen}))),Cut=N.lazy(()=>li(()=>import("./index-CmfnH4xk.js"),__vite__mapDeps([43,1,26,16,27,37,21,22,38,44,3,4,8,11])).then(t=>({default:t.BusinessLedgerRecordsSummery}))),xut=N.lazy(()=>li(()=>import("./business-ledger-single-DDhKLx24.js"),__vite__mapDeps([45,1,26,16,37,21,22,38,44,3,4,8])).then(t=>({default:t.BusinessLedgerRecordsSingle}))),Fut=N.lazy(()=>li(()=>import("./contracts-ClNGcf8d.js"),__vite__mapDeps([46,41,21,22,4,47,7])).then(t=>({default:t.ContractsScreen}))),_ut=N.lazy(()=>li(()=>import("./index-CnMKxzm2.js"),__vite__mapDeps([48,49,14,17,16,10,11,8,13,15,25,27])).then(t=>({default:t.BusinessTrips}))),Eut=N.lazy(()=>li(()=>import("./business-trip-BnveFg2c.js"),__vite__mapDeps([50,49,14,17,16,10,11,8,13,15,27])).then(t=>({default:t.BusinessTrip}))),But=N.lazy(()=>li(()=>import("./index-DBNrjrq3.js"),__vite__mapDeps([51,1,27,3,4])).then(t=>({default:t.ChartPage}))),Tut=N.lazy(()=>li(()=>import("./index-BqFRXexC.js"),__vite__mapDeps([52,1,27,3,4,53,40,5,6,7])).then(t=>({default:t.MonthlyIncomeExpenseChart}))),Dut=N.lazy(()=>li(()=>import("./index-DEZ8dlzN.js"),__vite__mapDeps([54,1,26,16,55,3,27,4,8,5,6,7,56])).then(t=>({default:t.DocumentsReport}))),Iut=N.lazy(()=>li(()=>import("./issue-document-CPLyogyO.js"),__vite__mapDeps([57,27])).then(t=>({default:t.IssueDocumentScreen}))),Out=N.lazy(()=>li(()=>import("./index-CTLLkXH-.js"),__vite__mapDeps([58,47,7])).then(t=>({default:t.IssueDocuments}))),Rut=N.lazy(()=>li(()=>import("./index-C9y79RyT.js"),__vite__mapDeps([59,1,27,3,4,8,38,37,21,22,11,16])).then(t=>({default:t.TrialBalanceReport}))),Put=N.lazy(()=>li(()=>import("./index-DZzIbM_J.js"),__vite__mapDeps([60,1,15,56,38,37,21,22,53,42,11,4,8])).then(t=>({default:t.ContoReport}))),Lut=N.lazy(()=>li(()=>import("./index-DFm1EDu-.js"),__vite__mapDeps([61,62,1,9,10,11,12,13,6,14,15,16,17,18,19,20,21,22,23,24,25,26,3,27,2,4,5,7,8])).then(t=>({default:t.VatMonthlyReport}))),gY=N.lazy(()=>li(()=>import("./index-rSwlhOyI.js"),__vite__mapDeps([63,62,27,64,10,11,16,3,24,4])).then(t=>({default:t.ProfitAndLossReport}))),vY=N.lazy(()=>li(()=>import("./index-COk6IP-t.js"),__vite__mapDeps([65,62,27,64,10,11,16,3,24,4])).then(t=>({default:t.TaxReport}))),Uut=N.lazy(()=>li(()=>import("./index-CAQL2y3o.js"),__vite__mapDeps([66,1,27,4])).then(t=>({default:t.DepreciationReport}))),Mut=N.lazy(()=>li(()=>import("./index-DTnVMhvV.js"),__vite__mapDeps([67,27,24])).then(t=>({default:t.AnnualRevenueReport}))),$ut=N.lazy(()=>li(()=>import("./index-BLrRZOvt.js"),__vite__mapDeps([68,4,34,22,36])).then(t=>({default:t.Shaam6111Report}))),jut=N.lazy(()=>li(()=>import("./index-B5-fF043.js"),__vite__mapDeps([69,55,27,38,24])).then(t=>({default:t.YearlyLedgerReport}))),yY=N.lazy(()=>li(()=>import("./index-BUPuU_bZ.js"),__vite__mapDeps([70,62,27,3,24,4,16])).then(t=>({default:t.CorporateTaxRulingComplianceReport}))),Qut=N.lazy(()=>li(()=>import("./index-Co4SaacM.js"),__vite__mapDeps([71,1,27,39,12,13,6,14,15,40,3,4,8,5,7])).then(t=>({default:t.BalanceReport}))),Hut=N.lazy(()=>li(()=>import("./index-DV2OrCkl.js"),__vite__mapDeps([72,1,27,20,3,4])).then(t=>({default:t.ValidateReportsScreen}))),zut=N.lazy(()=>li(()=>import("./accountant-approvals-Bm-uJEAl.js"),__vite__mapDeps([73,1,2,3,4,5,6,7,8,27,31])).then(t=>({default:t.AccountantApprovals}))),Vut=N.lazy(()=>li(()=>import("./index-CVfZ5u4R.js"),__vite__mapDeps([74,1,27,3,4,8])).then(t=>({default:t.Salaries}))),Gut=N.lazy(()=>li(()=>import("./index-BLJd02du.js"),__vite__mapDeps([75,27,14])).then(t=>({default:t.TagsManager}))),qut=N.lazy(()=>li(()=>import("./index-CDfzW3jE.js"),__vite__mapDeps([76,55,27,56])).then(t=>({default:t.TaxCategories}))),Kut=N.lazy(()=>li(()=>import("./index-Cs6U0hYg.js"),__vite__mapDeps([77,55,27,56])).then(t=>({default:t.SortCodes}))),Wut=N.lazy(()=>li(()=>import("./index-D6uO9Mo0.js"),__vite__mapDeps([78,18])).then(t=>({default:t.DepositsScreen}))),Yut=N.lazy(()=>li(()=>import("./page-not-found-SZ2CB0YT.js"),[]).then(t=>({default:t.PageNotFound}))),Xut=N.lazy(()=>li(()=>import("./login-page-D8tIHKR8.js"),[]).then(t=>({default:t.LoginPage})));function ii(t,e){return y.jsx(N.Suspense,{fallback:e||y.jsx(I1e,{}),children:y.jsx(t,{})})}const Zut=[{path:"/",element:y.jsx(Aut,{}),errorElement:y.jsx(p$,{}),children:[{path:$n.LOGIN,loader:hut,element:ii(Xut),handle:{title:"Login"}},{path:"/",loader:mut,element:y.jsx(Jst,{}),errorElement:y.jsx(p$,{}),children:[{index:!0,element:ii(pY,y.jsx(gl,{})),handle:{title:"All Charges",breadcrumb:"Charges"}},{path:"charges",handle:{breadcrumb:"Charges"},children:[{index:!0,element:ii(pY,y.jsx(gl,{})),handle:{title:"All Charges"}},{path:"missing-info",element:ii(kut,y.jsx(gl,{})),handle:{title:"Missing Info Charges",breadcrumb:"Missing Info"}},{path:"ledger-validation",element:ii(Sut,y.jsx(gl,{})),handle:{title:"Ledger Validation",breadcrumb:"Ledger Validation"}},{path:":chargeId",loader:vut,element:ii(but),handle:{title:"Charge Details",breadcrumb:"Details"}}]},{path:"businesses",handle:{breadcrumb:"Businesses"},children:[{index:!0,element:ii(wut,y.jsx(gl,{})),handle:{title:"All Businesses"}},{path:"ledger",element:ii(Cut,y.jsx(gl,{})),handle:{title:"Business Ledger Records Summary",breadcrumb:"Ledger"}},{path:":businessId",loader:yut,element:ii(Nut),handle:{title:"Business Details",breadcrumb:"Details"}},{path:":businessId/ledger",element:ii(xut,y.jsx(gl,{})),handle:{title:"Business Ledger",breadcrumb:"Ledger"}},{path:"contracts",element:ii(Fut,y.jsx(gl,{})),handle:{title:"Clients Contracts",breadcrumb:"Contracts"}}]},{path:"business-trips",handle:{breadcrumb:"Business Trips"},children:[{index:!0,element:ii(_ut,y.jsx(gl,{})),handle:{title:"Business Trips"}},{path:":businessTripId",element:ii(Eut),handle:{title:"Business Trip Details",breadcrumb:"Details"}}]},{path:"charts",handle:{breadcrumb:"Charts"},children:[{index:!0,element:ii(But),handle:{title:"Charts"}},{path:"monthly-income-expense",element:ii(Tut),handle:{title:"Monthly Income/Expense",breadcrumb:"Income/Expense"}}]},{path:"documents",handle:{breadcrumb:"Documents"},children:[{index:!0,element:ii(Dut,y.jsx(gl,{})),handle:{title:"All Documents"}},{path:"issue-document",element:ii(Iut),handle:{title:"Issue Document",breadcrumb:"Issue Document"}},{path:"issue-documents",element:ii(Out),handle:{title:"Issue Documents",breadcrumb:"Issue Documents"}}]},{path:"reports",handle:{breadcrumb:"Reports"},children:[{path:"trial-balance",element:ii(Rut,y.jsx(Gs,{})),handle:{title:"Trial Balance Report",breadcrumb:"Trial Balance"}},{path:"conto",element:ii(Put,y.jsx(Gs,{})),handle:{title:"Conto Report",breadcrumb:"Conto"}},{path:"vat-monthly",element:ii(Lut,y.jsx(Gs,{})),handle:{title:"VAT Monthly Report",breadcrumb:"VAT Monthly"}},{path:"profit-and-loss",handle:{breadcrumb:"Profit & Loss"},children:[{index:!0,element:ii(gY,y.jsx(Gs,{})),handle:{title:"Profit & Loss Report"}},{path:":year",element:ii(gY,y.jsx(Gs,{})),handle:{title:"Profit & Loss Report",breadcrumb:t=>t?.year||"Year"}}]},{path:"tax",handle:{breadcrumb:"Tax"},children:[{index:!0,element:ii(vY,y.jsx(Gs,{})),handle:{title:"Tax Report"}},{path:":year",element:ii(vY,y.jsx(Gs,{})),handle:{title:"Tax Report",breadcrumb:t=>t?.year||"Year"}}]},{path:"depreciation",element:ii(Uut,y.jsx(Gs,{})),handle:{title:"Depreciation Report",breadcrumb:"Depreciation"}},{path:"annual-revenue",element:ii(Mut,y.jsx(Gs,{})),handle:{title:"Annual Revenue Report",breadcrumb:"Annual Revenue"}},{path:"shaam-6111",element:ii($ut,y.jsx(Gs,{})),handle:{title:"Shaam 6111 Report",breadcrumb:"Shaam 6111"}},{path:"yearly-ledger",element:ii(jut,y.jsx(Gs,{})),handle:{title:"Yearly Ledger Report",breadcrumb:"Yearly Ledger"}},{path:"corporate-tax-ruling-compliance",handle:{breadcrumb:"Tax Ruling"},children:[{index:!0,element:ii(yY,y.jsx(Gs,{})),handle:{title:"Corporate Tax Ruling Compliance Report"}},{path:":year",element:ii(yY,y.jsx(Gs,{})),handle:{title:"Corporate Tax Ruling Compliance Report",breadcrumb:t=>t?.year||"Year"}}]},{path:"balance",element:ii(Qut,y.jsx(Gs,{})),handle:{title:"Balance Report",breadcrumb:"Balance"}},{path:"validate-reports",element:ii(Hut),handle:{title:"Validate Reports",breadcrumb:"Validate"}}]},{path:"bank-deposits",element:ii(Wut,y.jsx(gl,{})),handle:{title:"Bank Deposits",breadcrumb:"Bank Deposits"}},{path:"accountant-approvals",element:ii(zut,y.jsx(gl,{})),handle:{title:"Accountant Approvals",breadcrumb:"Accountant Approvals"}},{path:"salaries",element:ii(Vut,y.jsx(gl,{})),handle:{title:"Salaries",breadcrumb:"Salaries"}},{path:"tags",element:ii(Gut),handle:{title:"Tags",breadcrumb:"Tags"}},{path:"tax-categories",element:ii(qut),handle:{title:"Tax Categories",breadcrumb:"Tax Categories"}},{path:"sort-codes",element:ii(Kut),handle:{title:"Sort Codes",breadcrumb:"Sort Codes"}},{path:"*",element:ii(Yut),handle:{title:"Page Not Found"}}]}]}];var kY={},bY;function Jut(){if(bY)return kY;bY=1;var t={};const e=(...r)=>t.stringify(...r);(function(){var r=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a,o,s={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},l;function c(f){return r.lastIndex=0,r.test(f)?'"'+f.replace(r,function(h){var m=s[h];return typeof m=="string"?m:"\\u"+("0000"+h.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'}function d(f,h){var m,p,g,b,k=a,S,C=h[f];switch(C&&typeof C=="object"&&typeof C.toJSON=="function"&&(C=C.toJSON(f)),typeof l=="function"&&(C=l.call(h,f,C)),typeof C){case"string":return c(C);case"number":return isFinite(C)?String(C):"null";case"bigint":case"boolean":case"null":return String(C);case"object":if(!C)return"null";if(a+=o,S=[],Object.prototype.toString.apply(C)==="[object Array]"){for(b=C.length,m=0;m<b;m+=1)S[m]=d(m,C)||"null";return g=S.length===0?"[]":a?`[
|
|
273
|
+
export default theme;`}function oY(t){return typeof t=="number"?`${(t*100).toFixed(0)}%`:`calc((${t}) * 100%)`}const sdt=t=>{if(!Number.isNaN(+t))return+t;const e=t.match(/\d*\.?\d+/g);if(!e)return 0;let n=0;for(let i=0;i<e.length;i+=1)n+=+e[i];return n};function ldt(t){Object.assign(t,{alpha(e,n){const i=this||t;return i.colorSpace?`oklch(from ${e} l c h / ${typeof n=="string"?`calc(${n})`:n})`:i.vars?`rgba(${e.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:bpe(e,sdt(n))},lighten(e,n){const i=this||t;return i.colorSpace?`color-mix(in ${i.colorSpace}, ${e}, #fff ${oY(n)})`:v_(e,n)},darken(e,n){const i=this||t;return i.colorSpace?`color-mix(in ${i.colorSpace}, ${e}, #000 ${oY(n)})`:g_(e,n)}})}function HO(t={},...e){const{breakpoints:n,mixins:i={},spacing:r,palette:a={},transitions:o={},typography:s={},shape:l,colorSpace:c,...d}=t;if(t.vars&&t.generateThemeVars===void 0)throw new Error(jh(20));const f=zL({...a,colorSpace:c}),h=gpe(t);let m=Tl(h,{mixins:Wct(h.breakpoints,i),palette:f,shadows:edt.slice(),typography:Bpe(f,s),transitions:rdt(o),zIndex:{...adt}});return m=Tl(m,d),m=e.reduce((p,g)=>Tl(p,g),m),m.unstable_sxConfig={...Mb,...d?.unstable_sxConfig},m.unstable_sx=function(g){return $b({sx:g,theme:this})},m.toRuntimeSource=Tpe,ldt(m),m}function cdt(t){let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,Math.round(e*10)/1e3}const ddt=[...Array(25)].map((t,e)=>{if(e===0)return"none";const n=cdt(e);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Dpe(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function Ipe(t){return t==="dark"?ddt:[]}function udt(t){const{palette:e={mode:"light"},opacity:n,overlays:i,colorSpace:r,...a}=t,o=zL({...e,colorSpace:r});return{palette:o,opacity:{...Dpe(o.mode),...n},overlays:i||Ipe(o.mode),...a}}function fdt(t){return!!t[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!t[0].match(/sxConfig$/)||t[0]==="palette"&&!!t[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const Adt=t=>[...[...Array(25)].map((e,n)=>`--${t?`${t}-`:""}overlays-${n}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],mdt=t=>(e,n)=>{const i=t.rootSelector||":root",r=t.colorSchemeSelector;let a=r;if(r==="class"&&(a=".%s"),r==="data"&&(a="[data-%s]"),r?.startsWith("data-")&&!r.includes("%s")&&(a=`[${r}="%s"]`),t.defaultColorScheme===e){if(e==="dark"){const o={};return Adt(t.cssVarPrefix).forEach(s=>{o[s]=n[s],delete n[s]}),a==="media"?{[i]:n,"@media (prefers-color-scheme: dark)":{[i]:o}}:a?{[a.replace("%s",e)]:o,[`${i}, ${a.replace("%s",e)}`]:n}:{[i]:{...n,...o}}}if(a&&a!=="media")return`${i}, ${a.replace("%s",String(e))}`}else if(e){if(a==="media")return{[`@media (prefers-color-scheme: ${String(e)})`]:{[i]:n}};if(a)return a.replace("%s",String(e))}return i};function hdt(t,e){e.forEach(n=>{t[n]||(t[n]={})})}function vt(t,e,n){!t[e]&&n&&(t[e]=n)}function jy(t){return typeof t!="string"||!t.startsWith("hsl")?t:kpe(t)}function gf(t,e){`${e}Channel`in t||(t[`${e}Channel`]=$y(jy(t[e])))}function pdt(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}const eu=t=>{try{return t()}catch{}},gdt=(t="mui")=>Pct(t);function F4(t,e,n,i,r){if(!n)return;n=n===!0?{}:n;const a=r==="dark"?"dark":"light";if(!i){e[r]=udt({...n,palette:{mode:a,...n?.palette},colorSpace:t});return}const{palette:o,...s}=HO({...i,palette:{mode:a,...n?.palette},colorSpace:t});return e[r]={...n,palette:o,opacity:{...Dpe(a),...n?.opacity},overlays:n?.overlays||Ipe(a)},s}function vdt(t={},...e){const{colorSchemes:n={light:!0},defaultColorScheme:i,disableCssColorScheme:r=!1,cssVarPrefix:a="mui",nativeColor:o=!1,shouldSkipGeneratingVar:s=fdt,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...d}=t,f=Object.keys(n)[0],h=i||(n.light&&f!=="light"?"light":f),m=gdt(a),{[h]:p,light:g,dark:b,...k}=n,S={...k};let C=p;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(C=!0),!C)throw new Error(jh(21,h));let x;o&&(x="oklch");const F=F4(x,S,C,d,h);g&&!S.light&&F4(x,S,g,void 0,"light"),b&&!S.dark&&F4(x,S,b,void 0,"dark");let T={defaultColorScheme:h,...F,cssVarPrefix:a,colorSchemeSelector:l,rootSelector:c,getCssVar:m,colorSchemes:S,font:{...Kct(F.typography),...F.font},spacing:pdt(d.spacing)};Object.keys(T.colorSchemes).forEach(U=>{const P=T.colorSchemes[U].palette,Z=ae=>{const H=ae.split("-"),te=H[1],Y=H[2];return m(ae,P[te][Y])};P.mode==="light"&&(vt(P.common,"background","#fff"),vt(P.common,"onBackground","#000")),P.mode==="dark"&&(vt(P.common,"background","#000"),vt(P.common,"onBackground","#fff"));function q(ae,H,te){if(x){let Y;return ae===Zm&&(Y=`transparent ${((1-te)*100).toFixed(0)}%`),ae===ir&&(Y=`#000 ${(te*100).toFixed(0)}%`),ae===rr&&(Y=`#fff ${(te*100).toFixed(0)}%`),`color-mix(in ${x}, ${H}, ${Y})`}return ae(H,te)}if(hdt(P,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),P.mode==="light"){vt(P.Alert,"errorColor",q(ir,P.error.light,.6)),vt(P.Alert,"infoColor",q(ir,P.info.light,.6)),vt(P.Alert,"successColor",q(ir,P.success.light,.6)),vt(P.Alert,"warningColor",q(ir,P.warning.light,.6)),vt(P.Alert,"errorFilledBg",Z("palette-error-main")),vt(P.Alert,"infoFilledBg",Z("palette-info-main")),vt(P.Alert,"successFilledBg",Z("palette-success-main")),vt(P.Alert,"warningFilledBg",Z("palette-warning-main")),vt(P.Alert,"errorFilledColor",eu(()=>P.getContrastText(P.error.main))),vt(P.Alert,"infoFilledColor",eu(()=>P.getContrastText(P.info.main))),vt(P.Alert,"successFilledColor",eu(()=>P.getContrastText(P.success.main))),vt(P.Alert,"warningFilledColor",eu(()=>P.getContrastText(P.warning.main))),vt(P.Alert,"errorStandardBg",q(rr,P.error.light,.9)),vt(P.Alert,"infoStandardBg",q(rr,P.info.light,.9)),vt(P.Alert,"successStandardBg",q(rr,P.success.light,.9)),vt(P.Alert,"warningStandardBg",q(rr,P.warning.light,.9)),vt(P.Alert,"errorIconColor",Z("palette-error-main")),vt(P.Alert,"infoIconColor",Z("palette-info-main")),vt(P.Alert,"successIconColor",Z("palette-success-main")),vt(P.Alert,"warningIconColor",Z("palette-warning-main")),vt(P.AppBar,"defaultBg",Z("palette-grey-100")),vt(P.Avatar,"defaultBg",Z("palette-grey-400")),vt(P.Button,"inheritContainedBg",Z("palette-grey-300")),vt(P.Button,"inheritContainedHoverBg",Z("palette-grey-A100")),vt(P.Chip,"defaultBorder",Z("palette-grey-400")),vt(P.Chip,"defaultAvatarColor",Z("palette-grey-700")),vt(P.Chip,"defaultIconColor",Z("palette-grey-700")),vt(P.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),vt(P.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),vt(P.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),vt(P.LinearProgress,"primaryBg",q(rr,P.primary.main,.62)),vt(P.LinearProgress,"secondaryBg",q(rr,P.secondary.main,.62)),vt(P.LinearProgress,"errorBg",q(rr,P.error.main,.62)),vt(P.LinearProgress,"infoBg",q(rr,P.info.main,.62)),vt(P.LinearProgress,"successBg",q(rr,P.success.main,.62)),vt(P.LinearProgress,"warningBg",q(rr,P.warning.main,.62)),vt(P.Skeleton,"bg",x?q(Zm,P.text.primary,.11):`rgba(${Z("palette-text-primaryChannel")} / 0.11)`),vt(P.Slider,"primaryTrack",q(rr,P.primary.main,.62)),vt(P.Slider,"secondaryTrack",q(rr,P.secondary.main,.62)),vt(P.Slider,"errorTrack",q(rr,P.error.main,.62)),vt(P.Slider,"infoTrack",q(rr,P.info.main,.62)),vt(P.Slider,"successTrack",q(rr,P.success.main,.62)),vt(P.Slider,"warningTrack",q(rr,P.warning.main,.62));const ae=x?q(ir,P.background.default,.6825):kw(P.background.default,.8);vt(P.SnackbarContent,"bg",ae),vt(P.SnackbarContent,"color",eu(()=>x?QO.text.primary:P.getContrastText(ae))),vt(P.SpeedDialAction,"fabHoverBg",kw(P.background.paper,.15)),vt(P.StepConnector,"border",Z("palette-grey-400")),vt(P.StepContent,"border",Z("palette-grey-400")),vt(P.Switch,"defaultColor",Z("palette-common-white")),vt(P.Switch,"defaultDisabledColor",Z("palette-grey-100")),vt(P.Switch,"primaryDisabledColor",q(rr,P.primary.main,.62)),vt(P.Switch,"secondaryDisabledColor",q(rr,P.secondary.main,.62)),vt(P.Switch,"errorDisabledColor",q(rr,P.error.main,.62)),vt(P.Switch,"infoDisabledColor",q(rr,P.info.main,.62)),vt(P.Switch,"successDisabledColor",q(rr,P.success.main,.62)),vt(P.Switch,"warningDisabledColor",q(rr,P.warning.main,.62)),vt(P.TableCell,"border",q(rr,q(Zm,P.divider,1),.88)),vt(P.Tooltip,"bg",q(Zm,P.grey[700],.92))}if(P.mode==="dark"){vt(P.Alert,"errorColor",q(rr,P.error.light,.6)),vt(P.Alert,"infoColor",q(rr,P.info.light,.6)),vt(P.Alert,"successColor",q(rr,P.success.light,.6)),vt(P.Alert,"warningColor",q(rr,P.warning.light,.6)),vt(P.Alert,"errorFilledBg",Z("palette-error-dark")),vt(P.Alert,"infoFilledBg",Z("palette-info-dark")),vt(P.Alert,"successFilledBg",Z("palette-success-dark")),vt(P.Alert,"warningFilledBg",Z("palette-warning-dark")),vt(P.Alert,"errorFilledColor",eu(()=>P.getContrastText(P.error.dark))),vt(P.Alert,"infoFilledColor",eu(()=>P.getContrastText(P.info.dark))),vt(P.Alert,"successFilledColor",eu(()=>P.getContrastText(P.success.dark))),vt(P.Alert,"warningFilledColor",eu(()=>P.getContrastText(P.warning.dark))),vt(P.Alert,"errorStandardBg",q(ir,P.error.light,.9)),vt(P.Alert,"infoStandardBg",q(ir,P.info.light,.9)),vt(P.Alert,"successStandardBg",q(ir,P.success.light,.9)),vt(P.Alert,"warningStandardBg",q(ir,P.warning.light,.9)),vt(P.Alert,"errorIconColor",Z("palette-error-main")),vt(P.Alert,"infoIconColor",Z("palette-info-main")),vt(P.Alert,"successIconColor",Z("palette-success-main")),vt(P.Alert,"warningIconColor",Z("palette-warning-main")),vt(P.AppBar,"defaultBg",Z("palette-grey-900")),vt(P.AppBar,"darkBg",Z("palette-background-paper")),vt(P.AppBar,"darkColor",Z("palette-text-primary")),vt(P.Avatar,"defaultBg",Z("palette-grey-600")),vt(P.Button,"inheritContainedBg",Z("palette-grey-800")),vt(P.Button,"inheritContainedHoverBg",Z("palette-grey-700")),vt(P.Chip,"defaultBorder",Z("palette-grey-700")),vt(P.Chip,"defaultAvatarColor",Z("palette-grey-300")),vt(P.Chip,"defaultIconColor",Z("palette-grey-300")),vt(P.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),vt(P.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),vt(P.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),vt(P.LinearProgress,"primaryBg",q(ir,P.primary.main,.5)),vt(P.LinearProgress,"secondaryBg",q(ir,P.secondary.main,.5)),vt(P.LinearProgress,"errorBg",q(ir,P.error.main,.5)),vt(P.LinearProgress,"infoBg",q(ir,P.info.main,.5)),vt(P.LinearProgress,"successBg",q(ir,P.success.main,.5)),vt(P.LinearProgress,"warningBg",q(ir,P.warning.main,.5)),vt(P.Skeleton,"bg",x?q(Zm,P.text.primary,.13):`rgba(${Z("palette-text-primaryChannel")} / 0.13)`),vt(P.Slider,"primaryTrack",q(ir,P.primary.main,.5)),vt(P.Slider,"secondaryTrack",q(ir,P.secondary.main,.5)),vt(P.Slider,"errorTrack",q(ir,P.error.main,.5)),vt(P.Slider,"infoTrack",q(ir,P.info.main,.5)),vt(P.Slider,"successTrack",q(ir,P.success.main,.5)),vt(P.Slider,"warningTrack",q(ir,P.warning.main,.5));const ae=x?q(rr,P.background.default,.985):kw(P.background.default,.98);vt(P.SnackbarContent,"bg",ae),vt(P.SnackbarContent,"color",eu(()=>x?_pe.text.primary:P.getContrastText(ae))),vt(P.SpeedDialAction,"fabHoverBg",kw(P.background.paper,.15)),vt(P.StepConnector,"border",Z("palette-grey-600")),vt(P.StepContent,"border",Z("palette-grey-600")),vt(P.Switch,"defaultColor",Z("palette-grey-300")),vt(P.Switch,"defaultDisabledColor",Z("palette-grey-600")),vt(P.Switch,"primaryDisabledColor",q(ir,P.primary.main,.55)),vt(P.Switch,"secondaryDisabledColor",q(ir,P.secondary.main,.55)),vt(P.Switch,"errorDisabledColor",q(ir,P.error.main,.55)),vt(P.Switch,"infoDisabledColor",q(ir,P.info.main,.55)),vt(P.Switch,"successDisabledColor",q(ir,P.success.main,.55)),vt(P.Switch,"warningDisabledColor",q(ir,P.warning.main,.55)),vt(P.TableCell,"border",q(ir,q(Zm,P.divider,1),.68)),vt(P.Tooltip,"bg",q(Zm,P.grey[700],.92))}gf(P.background,"default"),gf(P.background,"paper"),gf(P.common,"background"),gf(P.common,"onBackground"),gf(P,"divider"),Object.keys(P).forEach(ae=>{const H=P[ae];ae!=="tonalOffset"&&H&&typeof H=="object"&&(H.main&&vt(P[ae],"mainChannel",$y(jy(H.main))),H.light&&vt(P[ae],"lightChannel",$y(jy(H.light))),H.dark&&vt(P[ae],"darkChannel",$y(jy(H.dark))),H.contrastText&&vt(P[ae],"contrastTextChannel",$y(jy(H.contrastText))),ae==="text"&&(gf(P[ae],"primary"),gf(P[ae],"secondary")),ae==="action"&&(H.active&&gf(P[ae],"active"),H.selected&&gf(P[ae],"selected")))})}),T=e.reduce((U,P)=>Tl(U,P),T);const E={prefix:a,disableCssColorScheme:r,shouldSkipGeneratingVar:s,getSelector:mdt(T),enableContrastVars:o},{vars:I,generateThemeVars:R,generateStyleSheets:V}=Mct(T,E);return T.vars=I,Object.entries(T.colorSchemes[T.defaultColorScheme]).forEach(([U,P])=>{T[U]=P}),T.generateThemeVars=R,T.generateStyleSheets=V,T.generateSpacing=function(){return ppe(d.spacing,LL(this))},T.getColorSchemeSelector=$ct(l),T.spacing=T.generateSpacing(),T.shouldSkipGeneratingVar=s,T.unstable_sxConfig={...Mb,...d?.unstable_sxConfig},T.unstable_sx=function(P){return $b({sx:P,theme:this})},T.toRuntimeSource=Tpe,T}function sY(t,e,n){t.colorSchemes&&n&&(t.colorSchemes[e]={...n!==!0&&n,palette:zL({...n===!0?{}:n.palette,mode:e})})}function VL(t={},...e){const{palette:n,cssVariables:i=!1,colorSchemes:r=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...o}=t,s=a||"light",l=r?.[s],c={...r,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(i===!1){if(!("colorSchemes"in t))return HO(t,...e);let d=n;"palette"in t||c[s]&&(c[s]!==!0?d=c[s].palette:s==="dark"&&(d={mode:"dark"}));const f=HO({...t,palette:d},...e);return f.defaultColorScheme=s,f.colorSchemes=c,f.palette.mode==="light"&&(f.colorSchemes.light={...c.light!==!0&&c.light,palette:f.palette},sY(f,"dark",c.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:f.palette},sY(f,"light",c.light)),f}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),vdt({...o,colorSchemes:c,defaultColorScheme:s,...typeof i!="boolean"&&i},...e)}const ydt=VL();function kdt({theme:t,...e}){const n=bh in t?t[bh]:void 0;return y.jsx(Cpe,{...e,themeId:n?bh:void 0,theme:n||t})}const bw={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:bdt}=Rct({themeId:bh,theme:()=>VL({cssVariables:!0}),colorSchemeStorageKey:bw.colorSchemeStorageKey,modeStorageKey:bw.modeStorageKey,defaultColorScheme:{light:bw.defaultLightColorScheme,dark:bw.defaultDarkColorScheme},resolveTheme:t=>{const e={...t,typography:Bpe(t.palette,t.typography)};return e.unstable_sx=function(i){return $b({sx:i,theme:this})},e}}),Sdt=bdt;function wdt({theme:t,...e}){const n=N.useMemo(()=>{if(typeof t=="function")return t;const i=bh in t?t[bh]:t;return"colorSchemes"in i?null:"vars"in i?t:{...t,vars:null}},[t]);return n?y.jsx(kdt,{theme:n,...e}):y.jsx(Sdt,{theme:t,...e})}function Ndt(t){return y.jsx(vpe,{...t,defaultTheme:ydt,themeId:bh})}function Ope(t){return function(n){return y.jsx(Ndt,{styles:typeof t=="function"?i=>t({theme:i,...n}):t})}}function pgt(){return dct}function Cdt(t){return wct(t)}const zO=typeof Ope({})=="function",xdt=(t,e)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...e&&!t.vars&&{colorScheme:t.palette.mode}}),Fdt=t=>({color:(t.vars||t).palette.text.primary,...t.typography.body1,backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),Rpe=(t,e=!1)=>{const n={};e&&t.colorSchemes&&typeof t.getColorSchemeSelector=="function"&&Object.entries(t.colorSchemes).forEach(([a,o])=>{const s=t.getColorSchemeSelector(a);s.startsWith("@")?n[s]={":root":{colorScheme:o.palette?.mode}}:n[s.replace(/\s*&/,"")]={colorScheme:o.palette?.mode}});let i={html:xdt(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:{margin:0,...Fdt(t),"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}},...n};const r=t.components?.MuiCssBaseline?.styleOverrides;return r&&(i=[i,r]),i},oN="mui-ecs",_dt=t=>{const e=Rpe(t,!1),n=Array.isArray(e)?e[0]:e;return!t.vars&&n&&(n.html[`:root:has(${oN})`]={colorScheme:t.palette.mode}),t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([i,r])=>{const a=t.getColorSchemeSelector(i);a.startsWith("@")?n[a]={[`:root:not(:has(.${oN}))`]:{colorScheme:r.palette?.mode}}:n[a.replace(/\s*&/,"")]={[`&:not(:has(.${oN}))`]:{colorScheme:r.palette?.mode}}}),e},Edt=Ope(zO?({theme:t,enableColorScheme:e})=>Rpe(t,e):({theme:t})=>_dt(t));function Bdt(t){const e=Cdt({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:i=!1}=e;return y.jsxs(N.Fragment,{children:[zO&&y.jsx(Edt,{enableColorScheme:i}),!zO&&!i&&y.jsx("span",{className:oN,style:{display:"none"}}),n]})}var y_=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Tdt={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Ddt=class{#e=Tdt;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},VO=new Ddt;function Idt(t){setTimeout(t,0)}var k_=typeof window>"u"||"Deno"in globalThis;function nd(){}function Odt(t,e){return typeof t=="function"?t(e):t}function Rdt(t){return typeof t=="number"&&t>=0&&t!==1/0}function Pdt(t,e){return Math.max(t+(e||0)-Date.now(),0)}function GO(t,e){return typeof t=="function"?t(e):t}function Ldt(t,e){return typeof t=="function"?t(e):t}function lY(t,e){const{type:n="all",exact:i,fetchStatus:r,predicate:a,queryKey:o,stale:s}=t;if(o){if(i){if(e.queryHash!==GL(o,e.options))return!1}else if(!Ok(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&e.isStale()!==s||r&&r!==e.state.fetchStatus||a&&!a(e))}function cY(t,e){const{exact:n,status:i,predicate:r,mutationKey:a}=t;if(a){if(!e.options.mutationKey)return!1;if(n){if(Ik(e.options.mutationKey)!==Ik(a))return!1}else if(!Ok(e.options.mutationKey,a))return!1}return!(i&&e.state.status!==i||r&&!r(e))}function GL(t,e){return(e?.queryKeyHashFn||Ik)(t)}function Ik(t){return JSON.stringify(t,(e,n)=>qO(n)?Object.keys(n).sort().reduce((i,r)=>(i[r]=n[r],i),{}):n)}function Ok(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Ok(t[n],e[n])):!1}var Udt=Object.prototype.hasOwnProperty;function Ppe(t,e){if(t===e)return t;const n=dY(t)&&dY(e);if(!n&&!(qO(t)&&qO(e)))return e;const r=(n?t:Object.keys(t)).length,a=n?e:Object.keys(e),o=a.length,s=n?new Array(o):{};let l=0;for(let c=0;c<o;c++){const d=n?c:a[c],f=t[d],h=e[d];if(f===h){s[d]=f,(n?c<r:Udt.call(t,d))&&l++;continue}if(f===null||h===null||typeof f!="object"||typeof h!="object"){s[d]=h;continue}const m=Ppe(f,h);s[d]=m,m===f&&l++}return r===o&&l===r?t:s}function dY(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function qO(t){if(!uY(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!uY(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function uY(t){return Object.prototype.toString.call(t)==="[object Object]"}function Mdt(t){return new Promise(e=>{VO.setTimeout(e,t)})}function $dt(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Ppe(t,e):e}function jdt(t,e,n=0){const i=[...t,e];return n&&i.length>n?i.slice(1):i}function Qdt(t,e,n=0){const i=[e,...t];return n&&i.length>n?i.slice(0,-1):i}var qL=Symbol();function Lpe(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===qL?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Hdt=class extends y_{#e;#t;#n;constructor(){super(),this.#n=t=>{if(!k_&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Upe=new Hdt;function zdt(){let t,e;const n=new Promise((r,a)=>{t=r,e=a});n.status="pending",n.catch(()=>{});function i(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{i({status:"fulfilled",value:r}),t(r)},n.reject=r=>{i({status:"rejected",reason:r}),e(r)},n}var Vdt=Idt;function Gdt(){let t=[],e=0,n=s=>{s()},i=s=>{s()},r=Vdt;const a=s=>{e?t.push(s):r(()=>{n(s)})},o=()=>{const s=t;t=[],s.length&&r(()=>{i(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;e++;try{l=s()}finally{e--,e||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{i=s},setScheduler:s=>{r=s}}}var vs=Gdt(),qdt=class extends y_{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(!k_&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(n=>{n(t)}))}isOnline(){return this.#e}},Kx=new qdt;function Kdt(t){return Math.min(1e3*2**t,3e4)}function Mpe(t){return(t??"online")==="online"?Kx.isOnline():!0}var KO=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function $pe(t){let e=!1,n=0,i;const r=zdt(),a=()=>r.status!=="pending",o=g=>{if(!a()){const b=new KO(g);h(b),t.onCancel?.(b)}},s=()=>{e=!0},l=()=>{e=!1},c=()=>Upe.isFocused()&&(t.networkMode==="always"||Kx.isOnline())&&t.canRun(),d=()=>Mpe(t.networkMode)&&t.canRun(),f=g=>{a()||(i?.(),r.resolve(g))},h=g=>{a()||(i?.(),r.reject(g))},m=()=>new Promise(g=>{i=b=>{(a()||c())&&g(b)},t.onPause?.()}).then(()=>{i=void 0,a()||t.onContinue?.()}),p=()=>{if(a())return;let g;const b=n===0?t.initialPromise:void 0;try{g=b??t.fn()}catch(k){g=Promise.reject(k)}Promise.resolve(g).then(f).catch(k=>{if(a())return;const S=t.retry??(k_?0:3),C=t.retryDelay??Kdt,x=typeof C=="function"?C(n,k):C,F=S===!0||typeof S=="number"&&n<S||typeof S=="function"&&S(n,k);if(e||!F){h(k);return}n++,t.onFail?.(n,k),Mdt(x).then(()=>c()?void 0:m()).then(()=>{e?h(k):p()})})};return{promise:r,status:()=>r.status,cancel:o,continue:()=>(i?.(),r),cancelRetry:s,continueRetry:l,canStart:d,start:()=>(d()?p():m().then(p),r)}}var jpe=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Rdt(this.gcTime)&&(this.#e=VO.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(k_?1/0:300*1e3))}clearGcTimeout(){this.#e&&(VO.clearTimeout(this.#e),this.#e=void 0)}},Wdt=class extends jpe{#e;#t;#n;#i;#r;#o;#a;constructor(t){super(),this.#a=!1,this.#o=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#n=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=AY(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#o,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=AY(this.options);e.data!==void 0&&(this.setState(fY(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,e){const n=$dt(this.state.data,t,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t,e){this.#s({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#r?.promise;return this.#r?.cancel(t),e?e.then(nd).catch(nd):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(t=>Ldt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===qL||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>GO(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Pdt(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#r&&(this.#a?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(t&&this.setOptions(t),!this.options.queryFn){const s=this.observers.find(l=>l.options.queryFn);s&&this.setOptions(s.options)}const n=new AbortController,i=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},r=()=>{const s=Lpe(this.options,e),c=(()=>{const d={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(d),d})();return this.#a=!1,this.options.persister?this.options.persister(s,c,this):s(c)},o=(()=>{const s={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:r};return i(s),s})();this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#s({type:"fetch",meta:o.fetchOptions?.meta}),this.#r=$pe({initialPromise:e?.initialPromise,fn:o.fetchFn,onCancel:s=>{s instanceof KO&&s.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(s,l)=>{this.#s({type:"failed",failureCount:s,error:l})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const s=await this.#r.start();if(s===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(s),this.#n.config.onSuccess?.(s,this),this.#n.config.onSettled?.(s,this.state.error,this),s}catch(s){if(s instanceof KO){if(s.silent)return this.#r.promise;if(s.revert){if(this.state.data===void 0)throw s;return this.state.data}}throw this.#s({type:"error",error:s}),this.#n.config.onError?.(s,this),this.#n.config.onSettled?.(this.state.data,s,this),s}finally{this.scheduleGc()}}#s(t){const e=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Ydt(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...fY(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=t.manual?i:void 0,i;case"error":const r=t.error;return{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),vs.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function Ydt(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Mpe(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function fY(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function AY(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,i=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}function mY(t){return{onFetch:(e,n)=>{const i=e.options,r=e.fetchOptions?.meta?.fetchMore?.direction,a=e.state.data?.pages||[],o=e.state.data?.pageParams||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let d=!1;const f=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(e.signal.aborted?d=!0:e.signal.addEventListener("abort",()=>{d=!0}),e.signal)})},h=Lpe(e.options,e.fetchOptions),m=async(p,g,b)=>{if(d)return Promise.reject();if(g==null&&p.pages.length)return Promise.resolve(p);const S=(()=>{const T={client:e.client,queryKey:e.queryKey,pageParam:g,direction:b?"backward":"forward",meta:e.options.meta};return f(T),T})(),C=await h(S),{maxPages:x}=e.options,F=b?Qdt:jdt;return{pages:F(p.pages,C,x),pageParams:F(p.pageParams,g,x)}};if(r&&a.length){const p=r==="backward",g=p?Xdt:hY,b={pages:a,pageParams:o},k=g(i,b);s=await m(b,k,p)}else{const p=t??a.length;do{const g=l===0?o[0]??i.initialPageParam:hY(i,s);if(l>0&&g==null)break;s=await m(s,g),l++}while(l<p)}return s};e.options.persister?e.fetchFn=()=>e.options.persister?.(c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=c}}}function hY(t,{pages:e,pageParams:n}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,n[i],n):void 0}function Xdt(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}var Zdt=class extends jpe{#e;#t;#n;#i;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||Jdt(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=$pe({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(a,o)=>{this.#r({type:"failed",failureCount:a,error:o})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",r=!this.#i.canStart();try{if(i)e();else{this.#r({type:"pending",variables:t,isPaused:r}),await this.#n.config.onMutate?.(t,this,n);const o=await this.options.onMutate?.(t,n);o!==this.state.context&&this.#r({type:"pending",context:o,variables:t,isPaused:r})}const a=await this.#i.start();return await this.#n.config.onSuccess?.(a,t,this.state.context,this,n),await this.options.onSuccess?.(a,t,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,t,this.state.context,n),this.#r({type:"success",data:a}),a}catch(a){try{throw await this.#n.config.onError?.(a,t,this.state.context,this,n),await this.options.onError?.(a,t,this.state.context,n),await this.#n.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,a,t,this.state.context,n),a}finally{this.#r({type:"error",error:a})}}finally{this.#n.runNext(this)}}#r(t){const e=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),vs.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function Jdt(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var eut=class extends y_{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,e,n){const i=new Zdt({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(e),state:n});return this.add(i),i}add(t){this.#e.add(t);const e=Sw(t);if(typeof e=="string"){const n=this.#t.get(e);n?n.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=Sw(t);if(typeof e=="string"){const n=this.#t.get(e);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Sw(t);if(typeof e=="string"){const i=this.#t.get(e)?.find(r=>r.state.status==="pending");return!i||i===t}else return!0}runNext(t){const e=Sw(t);return typeof e=="string"?this.#t.get(e)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){vs.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(n=>cY(e,n))}findAll(t={}){return this.getAll().filter(e=>cY(t,e))}notify(t){vs.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return vs.batch(()=>Promise.all(t.map(e=>e.continue().catch(nd))))}};function Sw(t){return t.options.scope?.id}var tut=class extends y_{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const i=e.queryKey,r=e.queryHash??GL(i,e);let a=this.get(r);return a||(a=new Wdt({client:t,queryKey:i,queryHash:r,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){vs.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(n=>lY(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>lY(t,n)):e}notify(t){vs.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){vs.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){vs.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nut=class{#e;#t;#n;#i;#r;#o;#a;#s;constructor(t={}){this.#e=t.queryCache||new tut,this.#t=t.mutationCache||new eut,this.#n=t.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=Upe.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Kx.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=this.#e.build(this,e),i=n.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(GO(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:n})=>{const i=n.data;return[e,i]})}setQueryData(t,e,n){const i=this.defaultQueryOptions({queryKey:t}),a=this.#e.get(i.queryHash)?.state.data,o=Odt(e,a);if(o!==void 0)return this.#e.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return vs.batch(()=>this.#e.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,n)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;vs.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return vs.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},i=vs.batch(()=>this.#e.findAll(t).map(r=>r.cancel(n)));return Promise.all(i).then(nd).catch(nd)}invalidateQueries(t,e={}){return vs.batch(()=>(this.#e.findAll(t).forEach(n=>{n.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},i=vs.batch(()=>this.#e.findAll(t).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let a=r.fetch(void 0,n);return n.throwOnError||(a=a.catch(nd)),r.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(i).then(nd)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(GO(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(nd).catch(nd)}fetchInfiniteQuery(t){return t.behavior=mY(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(nd).catch(nd)}ensureInfiniteQueryData(t){return t.behavior=mY(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Kx.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#i.set(Ik(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#i.values()],n={};return e.forEach(i=>{Ok(t,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(t,e){this.#r.set(Ik(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(i=>{Ok(t,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=GL(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===qL&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},iut=N.createContext(void 0),rut=({client:t,children:e})=>(N.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),y.jsx(iut.Provider,{value:t,children:e}));function aut(){const t=KY();return N.useEffect(()=>{const e=t[t.length-1],n=e?.handle;if(n?.title){const i=typeof n.title=="function"?n.title(e.data):n.title;document.title=`${i} - Accounter`}else document.title="Accounter"},[t]),y.jsx("div",{style:{display:"none"}})}var out=(t,e,n,i,r,a,o,s)=>{let l=document.documentElement,c=["light","dark"];function d(m){(Array.isArray(t)?t:[t]).forEach(p=>{let g=p==="class",b=g&&a?r.map(k=>a[k]||k):r;g?(l.classList.remove(...b),l.classList.add(a&&a[m]?a[m]:m)):l.setAttribute(p,m)}),f(m)}function f(m){s&&c.includes(m)&&(l.style.colorScheme=m)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)d(i);else try{let m=localStorage.getItem(e)||n,p=o&&m==="system"?h():m;d(p)}catch{}},sut=N.createContext(void 0),lut={setTheme:t=>{},themes:[]},cut=()=>{var t;return(t=N.useContext(sut))!=null?t:lut};N.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:i,enableColorScheme:r,defaultTheme:a,value:o,themes:s,nonce:l,scriptProps:c})=>{let d=JSON.stringify([n,e,a,t,s,o,i,r]).slice(1,-1);return N.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${out.toString()})(${d})`}})});const dut=({...t})=>{const{theme:e="system"}=cut();return y.jsx(KBe,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-white group-[.toaster]:text-gray-950 group-[.toaster]:border-gray-200 group-[.toaster]:shadow-lg dark:group-[.toaster]:bg-gray-950 dark:group-[.toaster]:text-gray-50 dark:group-[.toaster]:border-gray-800",description:"group-[.toast]:text-gray-500 dark:group-[.toast]:text-gray-400",actionButton:"group-[.toast]:bg-gray-900 group-[.toast]:text-gray-50 font-medium dark:group-[.toast]:bg-gray-50 dark:group-[.toast]:text-gray-900",cancelButton:"group-[.toast]:bg-gray-100 group-[.toast]:text-gray-500 font-medium dark:group-[.toast]:bg-gray-800 dark:group-[.toast]:text-gray-400"}},...t})},uut=new nut({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),fut=VL({palette:{primary:{main:"#556cd6"},secondary:{main:"#19857b"},error:{main:th.A400}}});function Aut(){return y.jsx(vte,{withGlobalStyles:!0,theme:{fontFamily:"Roboto, sans-serif",fontSizes:{md:"14"}},children:y.jsxs(wdt,{theme:fut,children:[y.jsx(Bdt,{}),y.jsxs(bBe,{children:[y.jsx(dut,{}),y.jsx(WBe,{children:y.jsx(rut,{client:uut,children:y.jsxs(hst,{children:[y.jsx(aut,{}),y.jsx(dpe,{}),y.jsx(XY,{})]})})})]})]})})}function mut(){if(!new Yk().isLoggedIn())throw IY($n.LOGIN);return null}function hut(){if(new Yk().isLoggedIn())throw IY($n.HOME);return null}let ww=null;function Qpe(){if(ww)return ww;const t=new Yk;let e;return e="https://accounter.onrender.com/graphql",ww=eZ({url:e,exchanges:[JX({onResult(n){Oee(n)}}),Iee(async n=>({addAuthToOperation(i){const r=t.authToken();return r?n.appendHeaders(i,{Authorization:r}):i},didAuthError(i,r){return i?.response?.status===401||i?.graphQLErrors?.some(a=>a.extensions?.code==="FORBIDDEN")},async refreshAuth(){t.logout()}})),ZX]}),ww}function put(t){if(!t.chargeId)throw new Response("Charge ID is required",{status:400});return{chargeId:t.chargeId}}function gut(t){if(!t.businessId)throw new Response("Business ID is required",{status:400});return{businessId:t.businessId}}async function vut({params:t}){const{chargeId:e}=put(t),i=await Qpe().query(ZNe,{chargeId:e}).toPromise();if(!i.data?.charge)throw new Response("Charge not found",{status:404});return i.data}async function yut({params:t}){const{businessId:e}=gut(t),i=await Qpe().query(XNe,{businessId:e}).toPromise();if(!i.data?.business)throw new Response("Business not found",{status:404});return i.data}const pY=N.lazy(()=>li(()=>import("./all-charges-C3I6gJKM.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27])).then(t=>({default:t.AllCharges}))),kut=N.lazy(()=>li(()=>import("./missing-info-charges-RuQGgfpb.js"),__vite__mapDeps([28,1,9,10,11,12,13,6,14,15,16,17,18,19,20,21,22,23,24,25,26,3,27])).then(t=>({default:t.MissingInfoCharges}))),but=N.lazy(()=>li(()=>import("./charge-C4Z7p9BE.js"),__vite__mapDeps([29,9,10,11,12,13,6,14,15,16,17,18,19,20,21,22,23,24,25,26,3])).then(t=>({default:t.Charge}))),Sut=N.lazy(()=>li(()=>import("./charges-ledger-validation-DjnQeNKG.js"),__vite__mapDeps([30,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,31])).then(t=>({default:t.ChargesLedgerValidation}))),wut=N.lazy(()=>li(()=>import("./index-Cj_iGueQ.js"),__vite__mapDeps([32,1,33,34,19,27,11])).then(t=>({default:t.Businesses}))),Nut=N.lazy(()=>li(()=>import("./business-CwKrbxfy.js"),__vite__mapDeps([35,36,34,37,21,22,38,33,9,10,11,12,13,6,14,15,16,17,18,19,20,39,40,41,42])).then(t=>({default:t.BusinessScreen}))),Cut=N.lazy(()=>li(()=>import("./index-TR4dupWm.js"),__vite__mapDeps([43,1,26,16,27,37,21,22,38,44,3,4,8,11])).then(t=>({default:t.BusinessLedgerRecordsSummery}))),xut=N.lazy(()=>li(()=>import("./business-ledger-single-DBNTJatb.js"),__vite__mapDeps([45,1,26,16,37,21,22,38,44,3,4,8])).then(t=>({default:t.BusinessLedgerRecordsSingle}))),Fut=N.lazy(()=>li(()=>import("./contracts-Bx_1c5oy.js"),__vite__mapDeps([46,41,21,22,4,47,7])).then(t=>({default:t.ContractsScreen}))),_ut=N.lazy(()=>li(()=>import("./index-DcV-vnxv.js"),__vite__mapDeps([48,49,14,17,16,10,11,8,13,15,25,27])).then(t=>({default:t.BusinessTrips}))),Eut=N.lazy(()=>li(()=>import("./business-trip-PPyW2Xvg.js"),__vite__mapDeps([50,49,14,17,16,10,11,8,13,15,27])).then(t=>({default:t.BusinessTrip}))),But=N.lazy(()=>li(()=>import("./index-BwJarodg.js"),__vite__mapDeps([51,1,27,3,4])).then(t=>({default:t.ChartPage}))),Tut=N.lazy(()=>li(()=>import("./index-DLfRFpYq.js"),__vite__mapDeps([52,1,27,3,4,53,40,5,6,7])).then(t=>({default:t.MonthlyIncomeExpenseChart}))),Dut=N.lazy(()=>li(()=>import("./index-2O50cLQv.js"),__vite__mapDeps([54,1,26,16,55,3,27,4,8,5,6,7,56])).then(t=>({default:t.DocumentsReport}))),Iut=N.lazy(()=>li(()=>import("./issue-document-BCtEHbVp.js"),__vite__mapDeps([57,27])).then(t=>({default:t.IssueDocumentScreen}))),Out=N.lazy(()=>li(()=>import("./index-DZ5X5R27.js"),__vite__mapDeps([58,47,7])).then(t=>({default:t.IssueDocuments}))),Rut=N.lazy(()=>li(()=>import("./index-BHENHnSU.js"),__vite__mapDeps([59,1,27,3,4,8,38,37,21,22,11,16])).then(t=>({default:t.TrialBalanceReport}))),Put=N.lazy(()=>li(()=>import("./index-CczsIZNQ.js"),__vite__mapDeps([60,1,15,56,38,37,21,22,53,42,11,4,8])).then(t=>({default:t.ContoReport}))),Lut=N.lazy(()=>li(()=>import("./index-C8syveJp.js"),__vite__mapDeps([61,62,1,9,10,11,12,13,6,14,15,16,17,18,19,20,21,22,23,24,25,26,3,27,2,4,5,7,8])).then(t=>({default:t.VatMonthlyReport}))),gY=N.lazy(()=>li(()=>import("./index-DFR7JIGa.js"),__vite__mapDeps([63,62,27,64,10,11,16,3,24,4])).then(t=>({default:t.ProfitAndLossReport}))),vY=N.lazy(()=>li(()=>import("./index-DTSkV39X.js"),__vite__mapDeps([65,62,27,64,10,11,16,3,24,4])).then(t=>({default:t.TaxReport}))),Uut=N.lazy(()=>li(()=>import("./index-Fw4weAYq.js"),__vite__mapDeps([66,1,27,4])).then(t=>({default:t.DepreciationReport}))),Mut=N.lazy(()=>li(()=>import("./index-C4kEP-j2.js"),__vite__mapDeps([67,27,24])).then(t=>({default:t.AnnualRevenueReport}))),$ut=N.lazy(()=>li(()=>import("./index-DkZTWC5F.js"),__vite__mapDeps([68,4,34,22,36])).then(t=>({default:t.Shaam6111Report}))),jut=N.lazy(()=>li(()=>import("./index-Mls6HkOJ.js"),__vite__mapDeps([69,55,27,38,24])).then(t=>({default:t.YearlyLedgerReport}))),yY=N.lazy(()=>li(()=>import("./index-D9r_4FAV.js"),__vite__mapDeps([70,62,27,3,24,4,16])).then(t=>({default:t.CorporateTaxRulingComplianceReport}))),Qut=N.lazy(()=>li(()=>import("./index-B_c7vg1A.js"),__vite__mapDeps([71,1,27,39,12,13,6,14,15,40,3,4,8,5,7])).then(t=>({default:t.BalanceReport}))),Hut=N.lazy(()=>li(()=>import("./index-YTwKTBQZ.js"),__vite__mapDeps([72,1,27,20,3,4])).then(t=>({default:t.ValidateReportsScreen}))),zut=N.lazy(()=>li(()=>import("./accountant-approvals-Y-wWPVfh.js"),__vite__mapDeps([73,1,2,3,4,5,6,7,8,27,31])).then(t=>({default:t.AccountantApprovals}))),Vut=N.lazy(()=>li(()=>import("./index-DuMEnxDo.js"),__vite__mapDeps([74,1,27,3,4,8])).then(t=>({default:t.Salaries}))),Gut=N.lazy(()=>li(()=>import("./index-y15qSIV2.js"),__vite__mapDeps([75,27,14])).then(t=>({default:t.TagsManager}))),qut=N.lazy(()=>li(()=>import("./index-6nLMj-WX.js"),__vite__mapDeps([76,55,27,56])).then(t=>({default:t.TaxCategories}))),Kut=N.lazy(()=>li(()=>import("./index-DMa2qIgG.js"),__vite__mapDeps([77,55,27,56])).then(t=>({default:t.SortCodes}))),Wut=N.lazy(()=>li(()=>import("./index-CLZMOilr.js"),__vite__mapDeps([78,18])).then(t=>({default:t.DepositsScreen}))),Yut=N.lazy(()=>li(()=>import("./page-not-found-DFQ8qtlR.js"),[]).then(t=>({default:t.PageNotFound}))),Xut=N.lazy(()=>li(()=>import("./login-page-CSFlyy9e.js"),[]).then(t=>({default:t.LoginPage})));function ii(t,e){return y.jsx(N.Suspense,{fallback:e||y.jsx(I1e,{}),children:y.jsx(t,{})})}const Zut=[{path:"/",element:y.jsx(Aut,{}),errorElement:y.jsx(p$,{}),children:[{path:$n.LOGIN,loader:hut,element:ii(Xut),handle:{title:"Login"}},{path:"/",loader:mut,element:y.jsx(Jst,{}),errorElement:y.jsx(p$,{}),children:[{index:!0,element:ii(pY,y.jsx(gl,{})),handle:{title:"All Charges",breadcrumb:"Charges"}},{path:"charges",handle:{breadcrumb:"Charges"},children:[{index:!0,element:ii(pY,y.jsx(gl,{})),handle:{title:"All Charges"}},{path:"missing-info",element:ii(kut,y.jsx(gl,{})),handle:{title:"Missing Info Charges",breadcrumb:"Missing Info"}},{path:"ledger-validation",element:ii(Sut,y.jsx(gl,{})),handle:{title:"Ledger Validation",breadcrumb:"Ledger Validation"}},{path:":chargeId",loader:vut,element:ii(but),handle:{title:"Charge Details",breadcrumb:"Details"}}]},{path:"businesses",handle:{breadcrumb:"Businesses"},children:[{index:!0,element:ii(wut,y.jsx(gl,{})),handle:{title:"All Businesses"}},{path:"ledger",element:ii(Cut,y.jsx(gl,{})),handle:{title:"Business Ledger Records Summary",breadcrumb:"Ledger"}},{path:":businessId",loader:yut,element:ii(Nut),handle:{title:"Business Details",breadcrumb:"Details"}},{path:":businessId/ledger",element:ii(xut,y.jsx(gl,{})),handle:{title:"Business Ledger",breadcrumb:"Ledger"}},{path:"contracts",element:ii(Fut,y.jsx(gl,{})),handle:{title:"Clients Contracts",breadcrumb:"Contracts"}}]},{path:"business-trips",handle:{breadcrumb:"Business Trips"},children:[{index:!0,element:ii(_ut,y.jsx(gl,{})),handle:{title:"Business Trips"}},{path:":businessTripId",element:ii(Eut),handle:{title:"Business Trip Details",breadcrumb:"Details"}}]},{path:"charts",handle:{breadcrumb:"Charts"},children:[{index:!0,element:ii(But),handle:{title:"Charts"}},{path:"monthly-income-expense",element:ii(Tut),handle:{title:"Monthly Income/Expense",breadcrumb:"Income/Expense"}}]},{path:"documents",handle:{breadcrumb:"Documents"},children:[{index:!0,element:ii(Dut,y.jsx(gl,{})),handle:{title:"All Documents"}},{path:"issue-document",element:ii(Iut),handle:{title:"Issue Document",breadcrumb:"Issue Document"}},{path:"issue-documents",element:ii(Out),handle:{title:"Issue Documents",breadcrumb:"Issue Documents"}}]},{path:"reports",handle:{breadcrumb:"Reports"},children:[{path:"trial-balance",element:ii(Rut,y.jsx(Gs,{})),handle:{title:"Trial Balance Report",breadcrumb:"Trial Balance"}},{path:"conto",element:ii(Put,y.jsx(Gs,{})),handle:{title:"Conto Report",breadcrumb:"Conto"}},{path:"vat-monthly",element:ii(Lut,y.jsx(Gs,{})),handle:{title:"VAT Monthly Report",breadcrumb:"VAT Monthly"}},{path:"profit-and-loss",handle:{breadcrumb:"Profit & Loss"},children:[{index:!0,element:ii(gY,y.jsx(Gs,{})),handle:{title:"Profit & Loss Report"}},{path:":year",element:ii(gY,y.jsx(Gs,{})),handle:{title:"Profit & Loss Report",breadcrumb:t=>t?.year||"Year"}}]},{path:"tax",handle:{breadcrumb:"Tax"},children:[{index:!0,element:ii(vY,y.jsx(Gs,{})),handle:{title:"Tax Report"}},{path:":year",element:ii(vY,y.jsx(Gs,{})),handle:{title:"Tax Report",breadcrumb:t=>t?.year||"Year"}}]},{path:"depreciation",element:ii(Uut,y.jsx(Gs,{})),handle:{title:"Depreciation Report",breadcrumb:"Depreciation"}},{path:"annual-revenue",element:ii(Mut,y.jsx(Gs,{})),handle:{title:"Annual Revenue Report",breadcrumb:"Annual Revenue"}},{path:"shaam-6111",element:ii($ut,y.jsx(Gs,{})),handle:{title:"Shaam 6111 Report",breadcrumb:"Shaam 6111"}},{path:"yearly-ledger",element:ii(jut,y.jsx(Gs,{})),handle:{title:"Yearly Ledger Report",breadcrumb:"Yearly Ledger"}},{path:"corporate-tax-ruling-compliance",handle:{breadcrumb:"Tax Ruling"},children:[{index:!0,element:ii(yY,y.jsx(Gs,{})),handle:{title:"Corporate Tax Ruling Compliance Report"}},{path:":year",element:ii(yY,y.jsx(Gs,{})),handle:{title:"Corporate Tax Ruling Compliance Report",breadcrumb:t=>t?.year||"Year"}}]},{path:"balance",element:ii(Qut,y.jsx(Gs,{})),handle:{title:"Balance Report",breadcrumb:"Balance"}},{path:"validate-reports",element:ii(Hut),handle:{title:"Validate Reports",breadcrumb:"Validate"}}]},{path:"bank-deposits",element:ii(Wut,y.jsx(gl,{})),handle:{title:"Bank Deposits",breadcrumb:"Bank Deposits"}},{path:"accountant-approvals",element:ii(zut,y.jsx(gl,{})),handle:{title:"Accountant Approvals",breadcrumb:"Accountant Approvals"}},{path:"salaries",element:ii(Vut,y.jsx(gl,{})),handle:{title:"Salaries",breadcrumb:"Salaries"}},{path:"tags",element:ii(Gut),handle:{title:"Tags",breadcrumb:"Tags"}},{path:"tax-categories",element:ii(qut),handle:{title:"Tax Categories",breadcrumb:"Tax Categories"}},{path:"sort-codes",element:ii(Kut),handle:{title:"Sort Codes",breadcrumb:"Sort Codes"}},{path:"*",element:ii(Yut),handle:{title:"Page Not Found"}}]}]}];var kY={},bY;function Jut(){if(bY)return kY;bY=1;var t={};const e=(...r)=>t.stringify(...r);(function(){var r=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a,o,s={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},l;function c(f){return r.lastIndex=0,r.test(f)?'"'+f.replace(r,function(h){var m=s[h];return typeof m=="string"?m:"\\u"+("0000"+h.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'}function d(f,h){var m,p,g,b,k=a,S,C=h[f];switch(C&&typeof C=="object"&&typeof C.toJSON=="function"&&(C=C.toJSON(f)),typeof l=="function"&&(C=l.call(h,f,C)),typeof C){case"string":return c(C);case"number":return isFinite(C)?String(C):"null";case"bigint":case"boolean":case"null":return String(C);case"object":if(!C)return"null";if(a+=o,S=[],Object.prototype.toString.apply(C)==="[object Array]"){for(b=C.length,m=0;m<b;m+=1)S[m]=d(m,C)||"null";return g=S.length===0?"[]":a?`[
|
|
274
274
|
`+a+S.join(`,
|
|
275
275
|
`+a)+`
|
|
276
276
|
`+k+"]":"["+S.join(",")+"]",a=k,g}if(l&&typeof l=="object")for(b=l.length,m=0;m<b;m+=1)typeof l[m]=="string"&&(p=l[m],g=d(p,C),g&&S.push(c(p)+(a?": ":":")+g));else Object.keys(C).forEach(function(x){var F=d(x,C);F&&S.push(c(x)+(a?": ":":")+F)});return g=S.length===0?"{}":a?`{
|