function VZ(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var E2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function tye(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var nN={exports:{}},qy={},iN={exports:{}},Qn={};var cQ;function rye(){if(cQ)return Qn;cQ=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator;function m(ae){return ae===null||typeof ae!="object"?null:(ae=f&&ae[f]||ae["@@iterator"],typeof ae=="function"?ae:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,v={};function b(ae,pe,_e){this.props=ae,this.context=pe,this.refs=v,this.updater=_e||g}b.prototype.isReactComponent={},b.prototype.setState=function(ae,pe){if(typeof ae!="object"&&typeof ae!="function"&&ae!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,ae,pe,"setState")},b.prototype.forceUpdate=function(ae){this.updater.enqueueForceUpdate(this,ae,"forceUpdate")};function E(){}E.prototype=b.prototype;function I(ae,pe,_e){this.props=ae,this.context=pe,this.refs=v,this.updater=_e||g}var S=I.prototype=new E;S.constructor=I,A(S,b.prototype),S.isPureReactComponent=!0;var _=Array.isArray,B=Object.prototype.hasOwnProperty,T={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function O(ae,pe,_e){var we,xe={},Me=null,ye=null;if(pe!=null)for(we in pe.ref!==void 0&&(ye=pe.ref),pe.key!==void 0&&(Me=""+pe.key),pe)B.call(pe,we)&&!P.hasOwnProperty(we)&&(xe[we]=pe[we]);var Ee=arguments.length-2;if(Ee===1)xe.children=_e;else if(1>>1,pe=Y[ae];if(0>>1;ae<_e;){var we=2*(ae+1)-1,xe=Y[we],Me=we+1,ye=Y[Me];if(0>i(xe,ge))Mei(ye,xe)?(Y[ae]=ye,Y[Me]=ge,ae=Me):(Y[ae]=xe,Y[we]=ge,ae=we);else if(Mei(ye,ge))Y[ae]=ye,Y[Me]=ge,ae=Me;else break e}}return ne}function i(Y,ne){var ge=Y.sortIndex-ne.sortIndex;return ge!==0?ge:Y.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,f=null,m=3,g=!1,A=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(Y){for(var ne=r(u);ne!==null;){if(ne.callback===null)n(u);else if(ne.startTime<=Y)n(u),ne.sortIndex=ne.expirationTime,t(c,ne);else break;ne=r(u)}}function _(Y){if(v=!1,S(Y),!A)if(r(c)!==null)A=!0,K(B);else{var ne=r(u);ne!==null&&q(_,ne.startTime-Y)}}function B(Y,ne){A=!1,v&&(v=!1,E(O),O=-1),g=!0;var ge=m;try{for(S(ne),f=r(c);f!==null&&(!(f.expirationTime>ne)||Y&&!W());){var ae=f.callback;if(typeof ae=="function"){f.callback=null,m=f.priorityLevel;var pe=ae(f.expirationTime<=ne);ne=e.unstable_now(),typeof pe=="function"?f.callback=pe:f===r(c)&&n(c),S(ne)}else n(c);f=r(c)}if(f!==null)var _e=!0;else{var we=r(u);we!==null&&q(_,we.startTime-ne),_e=!1}return _e}finally{f=null,m=ge,g=!1}}var T=!1,P=null,O=-1,z=5,L=-1;function W(){return!(e.unstable_now()-LY||125ae?(Y.sortIndex=ge,t(u,Y),r(c)===null&&Y===r(u)&&(v?(E(O),O=-1):v=!0,q(_,ge-ae))):(Y.sortIndex=pe,t(c,Y),A||g||(A=!0,K(B))),Y},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(Y){var ne=m;return function(){var ge=m;m=ne;try{return Y.apply(this,arguments)}finally{m=ge}}}})(oN)),oN}var mQ;function sye(){return mQ||(mQ=1,sN.exports=aye()),sN.exports}var pQ;function oye(){if(pQ)return Hc;pQ=1;var e=ty(),t=sye();function r(h){for(var p="https://reactjs.org/docs/error-decoder.html?invariant="+h,C=1;C"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},f={};function m(h){return c.call(f,h)?!0:c.call(d,h)?!1:u.test(h)?f[h]=!0:(d[h]=!0,!1)}function g(h,p,C,j){if(C!==null&&C.type===0)return!1;switch(typeof p){case"function":case"symbol":return!0;case"boolean":return j?!1:C!==null?!C.acceptsBooleans:(h=h.toLowerCase().slice(0,5),h!=="data-"&&h!=="aria-");default:return!1}}function A(h,p,C,j){if(p===null||typeof p>"u"||g(h,p,C,j))return!0;if(j)return!1;if(C!==null)switch(C.type){case 3:return!p;case 4:return p===!1;case 5:return isNaN(p);case 6:return isNaN(p)||1>p}return!1}function v(h,p,C,j,Q,H,oe){this.acceptsBooleans=p===2||p===3||p===4,this.attributeName=j,this.attributeNamespace=Q,this.mustUseProperty=C,this.propertyName=h,this.type=p,this.sanitizeURL=H,this.removeEmptyString=oe}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(h){b[h]=new v(h,0,!1,h,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(h){var p=h[0];b[p]=new v(p,1,!1,h[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(h){b[h]=new v(h,2,!1,h.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(h){b[h]=new v(h,2,!1,h,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(h){b[h]=new v(h,3,!1,h.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(h){b[h]=new v(h,3,!0,h,null,!1,!1)}),["capture","download"].forEach(function(h){b[h]=new v(h,4,!1,h,null,!1,!1)}),["cols","rows","size","span"].forEach(function(h){b[h]=new v(h,6,!1,h,null,!1,!1)}),["rowSpan","start"].forEach(function(h){b[h]=new v(h,5,!1,h.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function I(h){return h[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(h){var p=h.replace(E,I);b[p]=new v(p,1,!1,h,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(h){var p=h.replace(E,I);b[p]=new v(p,1,!1,h,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(h){var p=h.replace(E,I);b[p]=new v(p,1,!1,h,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(h){b[h]=new v(h,1,!1,h.toLowerCase(),null,!1,!1)}),b.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(h){b[h]=new v(h,1,!1,h.toLowerCase(),null,!0,!0)});function S(h,p,C,j){var Q=b.hasOwnProperty(p)?b[p]:null;(Q!==null?Q.type!==0:j||!(2De||Q[oe]!==H[De]){var $e=` `+Q[oe].replace(" at new "," at ");return h.displayName&&$e.includes("")&&($e=$e.replace("",h.displayName)),$e}while(1<=oe&&0<=De);break}}}finally{_e=!1,Error.prepareStackTrace=C}return(h=h?h.displayName||h.name:"")?pe(h):""}function xe(h){switch(h.tag){case 5:return pe(h.type);case 16:return pe("Lazy");case 13:return pe("Suspense");case 19:return pe("SuspenseList");case 0:case 2:case 15:return h=we(h.type,!1),h;case 11:return h=we(h.type.render,!1),h;case 1:return h=we(h.type,!0),h;default:return""}}function Me(h){if(h==null)return null;if(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case P:return"Fragment";case T:return"Portal";case z:return"Profiler";case O:return"StrictMode";case $:return"Suspense";case X:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case W:return(h.displayName||"Context")+".Consumer";case L:return(h._context.displayName||"Context")+".Provider";case R:var p=h.render;return h=h.displayName,h||(h=p.displayName||p.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case Z:return p=h.displayName||null,p!==null?p:Me(h.type)||"Memo";case K:p=h._payload,h=h._init;try{return Me(h(p))}catch{}}return null}function ye(h){var p=h.type;switch(h.tag){case 24:return"Cache";case 9:return(p.displayName||"Context")+".Consumer";case 10:return(p._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return h=p.render,h=h.displayName||h.name||"",p.displayName||(h!==""?"ForwardRef("+h+")":"ForwardRef");case 7:return"Fragment";case 5:return p;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Me(p);case 8:return p===O?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p}return null}function Ee(h){switch(typeof h){case"boolean":case"number":case"string":case"undefined":return h;case"object":return h;default:return""}}function me(h){var p=h.type;return(h=h.nodeName)&&h.toLowerCase()==="input"&&(p==="checkbox"||p==="radio")}function Se(h){var p=me(h)?"checked":"value",C=Object.getOwnPropertyDescriptor(h.constructor.prototype,p),j=""+h[p];if(!h.hasOwnProperty(p)&&typeof C<"u"&&typeof C.get=="function"&&typeof C.set=="function"){var Q=C.get,H=C.set;return Object.defineProperty(h,p,{configurable:!0,get:function(){return Q.call(this)},set:function(oe){j=""+oe,H.call(this,oe)}}),Object.defineProperty(h,p,{enumerable:C.enumerable}),{getValue:function(){return j},setValue:function(oe){j=""+oe},stopTracking:function(){h._valueTracker=null,delete h[p]}}}}function Ie(h){h._valueTracker||(h._valueTracker=Se(h))}function Be(h){if(!h)return!1;var p=h._valueTracker;if(!p)return!0;var C=p.getValue(),j="";return h&&(j=me(h)?h.checked?"true":"false":h.value),h=j,h!==C?(p.setValue(h),!0):!1}function Xe(h){if(h=h||(typeof document<"u"?document:void 0),typeof h>"u")return null;try{return h.activeElement||h.body}catch{return h.body}}function ke(h,p){var C=p.checked;return ge({},p,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:C??h._wrapperState.initialChecked})}function he(h,p){var C=p.defaultValue==null?"":p.defaultValue,j=p.checked!=null?p.checked:p.defaultChecked;C=Ee(p.value!=null?p.value:C),h._wrapperState={initialChecked:j,initialValue:C,controlled:p.type==="checkbox"||p.type==="radio"?p.checked!=null:p.value!=null}}function Le(h,p){p=p.checked,p!=null&&S(h,"checked",p,!1)}function Ye(h,p){Le(h,p);var C=Ee(p.value),j=p.type;if(C!=null)j==="number"?(C===0&&h.value===""||h.value!=C)&&(h.value=""+C):h.value!==""+C&&(h.value=""+C);else if(j==="submit"||j==="reset"){h.removeAttribute("value");return}p.hasOwnProperty("value")?it(h,p.type,C):p.hasOwnProperty("defaultValue")&&it(h,p.type,Ee(p.defaultValue)),p.checked==null&&p.defaultChecked!=null&&(h.defaultChecked=!!p.defaultChecked)}function Oe(h,p,C){if(p.hasOwnProperty("value")||p.hasOwnProperty("defaultValue")){var j=p.type;if(!(j!=="submit"&&j!=="reset"||p.value!==void 0&&p.value!==null))return;p=""+h._wrapperState.initialValue,C||p===h.value||(h.value=p),h.defaultValue=p}C=h.name,C!==""&&(h.name=""),h.defaultChecked=!!h._wrapperState.initialChecked,C!==""&&(h.name=C)}function it(h,p,C){(p!=="number"||Xe(h.ownerDocument)!==h)&&(C==null?h.defaultValue=""+h._wrapperState.initialValue:h.defaultValue!==""+C&&(h.defaultValue=""+C))}var vt=Array.isArray;function mt(h,p,C,j){if(h=h.options,p){p={};for(var Q=0;Q"+p.valueOf().toString()+"",p=Yt.firstChild;h.firstChild;)h.removeChild(h.firstChild);for(;p.firstChild;)h.appendChild(p.firstChild)}});function pr(h,p){if(p){var C=h.firstChild;if(C&&C===h.lastChild&&C.nodeType===3){C.nodeValue=p;return}}h.textContent=p}var de={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},st=["Webkit","ms","Moz","O"];Object.keys(de).forEach(function(h){st.forEach(function(p){p=p+h.charAt(0).toUpperCase()+h.substring(1),de[p]=de[h]})});function gt(h,p,C){return p==null||typeof p=="boolean"||p===""?"":C||typeof p!="number"||p===0||de.hasOwnProperty(h)&&de[h]?(""+p).trim():p+"px"}function ve(h,p){h=h.style;for(var C in p)if(p.hasOwnProperty(C)){var j=C.indexOf("--")===0,Q=gt(C,p[C],j);C==="float"&&(C="cssFloat"),j?h.setProperty(C,Q):h[C]=Q}}var ce=ge({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ge(h,p){if(p){if(ce[h]&&(p.children!=null||p.dangerouslySetInnerHTML!=null))throw Error(r(137,h));if(p.dangerouslySetInnerHTML!=null){if(p.children!=null)throw Error(r(60));if(typeof p.dangerouslySetInnerHTML!="object"||!("__html"in p.dangerouslySetInnerHTML))throw Error(r(61))}if(p.style!=null&&typeof p.style!="object")throw Error(r(62))}}function ie(h,p){if(h.indexOf("-")===-1)return typeof p.is=="string";switch(h){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var at=null;function bt(h){return h=h.target||h.srcElement||window,h.correspondingUseElement&&(h=h.correspondingUseElement),h.nodeType===3?h.parentNode:h}var U=null,Re=null,He=null;function se(h){if(h=cd(h)){if(typeof U!="function")throw Error(r(280));var p=h.stateNode;p&&(p=hu(p),U(h.stateNode,h.type,p))}}function be(h){Re?He?He.push(h):He=[h]:Re=h}function We(){if(Re){var h=Re,p=He;if(He=Re=null,se(h),p)for(h=0;h>>=0,h===0?32:31-(le(h)/ue|0)|0}var ze=64,tt=4194304;function xt(h){switch(h&-h){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return h&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return h}}function Pt(h,p){var C=h.pendingLanes;if(C===0)return 0;var j=0,Q=h.suspendedLanes,H=h.pingedLanes,oe=C&268435455;if(oe!==0){var De=oe&~Q;De!==0?j=xt(De):(H&=oe,H!==0&&(j=xt(H)))}else oe=C&~Q,oe!==0?j=xt(oe):H!==0&&(j=xt(H));if(j===0)return 0;if(p!==0&&p!==j&&(p&Q)===0&&(Q=j&-j,H=p&-p,Q>=H||Q===16&&(H&4194240)!==0))return p;if((j&4)!==0&&(j|=C&16),p=h.entangledLanes,p!==0)for(h=h.entanglements,p&=j;0C;C++)p.push(h);return p}function fn(h,p,C){h.pendingLanes|=p,p!==536870912&&(h.suspendedLanes=0,h.pingedLanes=0),h=h.eventTimes,p=31-Na(p),h[p]=C}function bi(h,p){var C=h.pendingLanes&~p;h.pendingLanes=p,h.suspendedLanes=0,h.pingedLanes=0,h.expiredLanes&=p,h.mutableReadLanes&=p,h.entangledLanes&=p,p=h.entanglements;var j=h.eventTimes;for(h=h.expirationTimes;0=cc),xh=" ",Vd=!1;function Dc(h,p){switch(h){case"keyup":return zl.indexOf(p.keyCode)!==-1;case"keydown":return p.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uc(h){return h=h.detail,typeof h=="object"&&"data"in h?h.data:null}var vl=!1;function Xu(h,p){switch(h){case"compositionend":return uc(p);case"keypress":return p.which!==32?null:(Vd=!0,xh);case"textInput":return h=p.data,h===xh&&Vd?null:h;default:return null}}function Yd(h,p){if(vl)return h==="compositionend"||!vh&&Dc(h,p)?(h=Bi(),sa=ao=zs=null,vl=!1,h):null;switch(h){case"paste":return null;case"keypress":if(!(p.ctrlKey||p.altKey||p.metaKey)||p.ctrlKey&&p.altKey){if(p.char&&1=p)return{node:C,offset:p-h};h=j}e:{for(;C;){if(C.nextSibling){C=C.nextSibling;break e}C=C.parentNode}C=void 0}C=oa(C)}}function xl(h,p){return h&&p?h===p?!0:h&&h.nodeType===3?!1:p&&p.nodeType===3?xl(h,p.parentNode):"contains"in h?h.contains(p):h.compareDocumentPosition?!!(h.compareDocumentPosition(p)&16):!1:!1}function yl(){for(var h=window,p=Xe();p instanceof h.HTMLIFrameElement;){try{var C=typeof p.contentWindow.location.href=="string"}catch{C=!1}if(C)h=p.contentWindow;else break;p=Xe(h.document)}return p}function Pc(h){var p=h&&h.nodeName&&h.nodeName.toLowerCase();return p&&(p==="input"&&(h.type==="text"||h.type==="search"||h.type==="tel"||h.type==="url"||h.type==="password")||p==="textarea"||h.contentEditable==="true")}function td(h){var p=yl(),C=h.focusedElem,j=h.selectionRange;if(p!==C&&C&&C.ownerDocument&&xl(C.ownerDocument.documentElement,C)){if(j!==null&&Pc(C)){if(p=j.start,h=j.end,h===void 0&&(h=p),"selectionStart"in C)C.selectionStart=p,C.selectionEnd=Math.min(h,C.value.length);else if(h=(p=C.ownerDocument||document)&&p.defaultView||window,h.getSelection){h=h.getSelection();var Q=C.textContent.length,H=Math.min(j.start,Q);j=j.end===void 0?H:Math.min(j.end,Q),!h.extend&&H>j&&(Q=j,j=H,H=Q),Q=Km(C,H);var oe=Km(C,j);Q&&oe&&(h.rangeCount!==1||h.anchorNode!==Q.node||h.anchorOffset!==Q.offset||h.focusNode!==oe.node||h.focusOffset!==oe.offset)&&(p=p.createRange(),p.setStart(Q.node,Q.offset),h.removeAllRanges(),H>j?(h.addRange(p),h.extend(oe.node,oe.offset)):(p.setEnd(oe.node,oe.offset),h.addRange(p)))}}for(p=[],h=C;h=h.parentNode;)h.nodeType===1&&p.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C=document.documentMode,Oc=null,rd=null,r0=null,Yr=!1;function wo(h,p,C){var j=C.window===C?C.document:C.nodeType===9?C:C.ownerDocument;Yr||Oc==null||Oc!==Xe(j)||(j=Oc,"selectionStart"in j&&Pc(j)?j={start:j.selectionStart,end:j.selectionEnd}:(j=(j.ownerDocument&&j.ownerDocument.defaultView||window).getSelection(),j={anchorNode:j.anchorNode,anchorOffset:j.anchorOffset,focusNode:j.focusNode,focusOffset:j.focusOffset}),r0&&t0(r0,j)||(r0=j,j=ks(rd,"onSelect"),0a0||(h.current=El[a0],El[a0]=null,a0--)}function gi(h,p){a0++,El[a0]=h.current,h.current=p}var Go={},Ws=Lc(Go),Gs=Lc(!1),s0=Go;function o0(h,p){var C=h.type.contextTypes;if(!C)return Go;var j=h.stateNode;if(j&&j.__reactInternalMemoizedUnmaskedChildContext===p)return j.__reactInternalMemoizedMaskedChildContext;var Q={},H;for(H in C)Q[H]=p[H];return j&&(h=h.stateNode,h.__reactInternalMemoizedUnmaskedChildContext=p,h.__reactInternalMemoizedMaskedChildContext=Q),Q}function qs(h){return h=h.childContextTypes,h!=null}function af(){Vn(Gs),Vn(Ws)}function lv(h,p,C){if(Ws.current!==Go)throw Error(r(168));gi(Ws,p),gi(Gs,C)}function k(h,p,C){var j=h.stateNode;if(p=p.childContextTypes,typeof j.getChildContext!="function")return C;j=j.getChildContext();for(var Q in j)if(!(Q in p))throw Error(r(108,ye(h)||"Unknown",Q));return ge({},C,j)}function N(h){return h=(h=h.stateNode)&&h.__reactInternalMemoizedMergedChildContext||Go,s0=Ws.current,gi(Ws,h),gi(Gs,Gs.current),!0}function F(h,p,C){var j=h.stateNode;if(!j)throw Error(r(169));C?(h=k(h,p,s0),j.__reactInternalMemoizedMergedChildContext=h,Vn(Gs),Vn(Ws),gi(Ws,h)):Vn(Gs),gi(Gs,C)}var J=null,te=!1,Ae=!1;function Qe(h){J===null?J=[h]:J.push(h)}function yt(h){te=!0,Qe(h)}function kt(){if(!Ae&&J!==null){Ae=!0;var h=0,p=Vr;try{var C=J;for(Vr=1;h>=oe,Q-=oe,pt=1<<32-Na(p)+Q|C<xn?(Yo=nn,nn=null):Yo=nn.sibling;var Ni=Gt(lt,nn,ht[xn],or);if(Ni===null){nn===null&&(nn=Yo);break}h&&nn&&Ni.alternate===null&&p(lt,nn),Ke=H(Ni,Ke,xn),rn===null?zr=Ni:rn.sibling=Ni,rn=Ni,nn=Yo}if(xn===ht.length)return C(lt,nn),En&&Et(lt,xn),zr;if(nn===null){for(;xnxn?(Yo=nn,nn=null):Yo=nn.sibling;var yp=Gt(lt,nn,Ni.value,or);if(yp===null){nn===null&&(nn=Yo);break}h&&nn&&yp.alternate===null&&p(lt,nn),Ke=H(yp,Ke,xn),rn===null?zr=yp:rn.sibling=yp,rn=yp,nn=Yo}if(Ni.done)return C(lt,nn),En&&Et(lt,xn),zr;if(nn===null){for(;!Ni.done;xn++,Ni=ht.next())Ni=Xt(lt,Ni.value,or),Ni!==null&&(Ke=H(Ni,Ke,xn),rn===null?zr=Ni:rn.sibling=Ni,rn=Ni);return En&&Et(lt,xn),zr}for(nn=j(lt,nn);!Ni.done;xn++,Ni=ht.next())Ni=Nr(nn,lt,xn,Ni.value,or),Ni!==null&&(h&&Ni.alternate!==null&&nn.delete(Ni.key===null?xn:Ni.key),Ke=H(Ni,Ke,xn),rn===null?zr=Ni:rn.sibling=Ni,rn=Ni);return h&&nn.forEach(function(eye){return p(lt,eye)}),En&&Et(lt,xn),zr}function Ys(lt,Ke,ht,or){if(typeof ht=="object"&&ht!==null&&ht.type===P&&ht.key===null&&(ht=ht.props.children),typeof ht=="object"&&ht!==null){switch(ht.$$typeof){case B:e:{for(var zr=ht.key,rn=Ke;rn!==null;){if(rn.key===zr){if(zr=ht.type,zr===P){if(rn.tag===7){C(lt,rn.sibling),Ke=Q(rn,ht.props.children),Ke.return=lt,lt=Ke;break e}}else if(rn.elementType===zr||typeof zr=="object"&&zr!==null&&zr.$$typeof===K&&N5(zr)===rn.type){C(lt,rn.sibling),Ke=Q(rn,ht.props),Ke.ref=Nh(lt,rn,ht),Ke.return=lt,lt=Ke;break e}C(lt,rn);break}else p(lt,rn);rn=rn.sibling}ht.type===P?(Ke=hA(ht.props.children,lt.mode,or,ht.key),Ke.return=lt,lt=Ke):(or=H5(ht.type,ht.key,ht.props,null,lt.mode,or),or.ref=Nh(lt,Ke,ht),or.return=lt,lt=or)}return oe(lt);case T:e:{for(rn=ht.key;Ke!==null;){if(Ke.key===rn)if(Ke.tag===4&&Ke.stateNode.containerInfo===ht.containerInfo&&Ke.stateNode.implementation===ht.implementation){C(lt,Ke.sibling),Ke=Q(Ke,ht.children||[]),Ke.return=lt,lt=Ke;break e}else{C(lt,Ke);break}else p(lt,Ke);Ke=Ke.sibling}Ke=JB(ht,lt.mode,or),Ke.return=lt,lt=Ke}return oe(lt);case K:return rn=ht._init,Ys(lt,Ke,rn(ht._payload),or)}if(vt(ht))return Fr(lt,Ke,ht,or);if(ne(ht))return Lr(lt,Ke,ht,or);tp(lt,ht)}return typeof ht=="string"&&ht!==""||typeof ht=="number"?(ht=""+ht,Ke!==null&&Ke.tag===6?(C(lt,Ke.sibling),Ke=Q(Ke,ht),Ke.return=lt,lt=Ke):(C(lt,Ke),Ke=ZB(ht,lt.mode,or),Ke.return=lt,lt=Ke),oe(lt)):C(lt,Ke)}return Ys}var ql=k5(!0),Fy=k5(!1),cv=Lc(null),Zg=null,rp=null,My=null;function Qy(){My=rp=Zg=null}function uv(h){var p=cv.current;Vn(cv),h._currentValue=p}function Cl(h,p,C){for(;h!==null;){var j=h.alternate;if((h.childLanes&p)!==p?(h.childLanes|=p,j!==null&&(j.childLanes|=p)):j!==null&&(j.childLanes&p)!==p&&(j.childLanes|=p),h===C)break;h=h.return}}function kh(h,p){Zg=h,My=rp=null,h=h.dependencies,h!==null&&h.firstContext!==null&&((h.lanes&p)!==0&&(Ko=!0),h.firstContext=null)}function Il(h){var p=h._currentValue;if(My!==h)if(h={context:h,memoizedValue:p,next:null},rp===null){if(Zg===null)throw Error(r(308));rp=h,Zg.dependencies={lanes:0,firstContext:h}}else rp=rp.next=h;return p}var l0=null;function dv(h){l0===null?l0=[h]:l0.push(h)}function _h(h,p,C,j){var Q=p.interleaved;return Q===null?(C.next=C,dv(p)):(C.next=Q.next,Q.next=C),p.interleaved=C,Kl(h,j)}function Kl(h,p){h.lanes|=p;var C=h.alternate;for(C!==null&&(C.lanes|=p),C=h,h=h.return;h!==null;)h.childLanes|=p,C=h.alternate,C!==null&&(C.childLanes|=p),C=h,h=h.return;return C.tag===3?C.stateNode:null}var ud=!1;function gu(h){h.updateQueue={baseState:h.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function np(h,p){h=h.updateQueue,p.updateQueue===h&&(p.updateQueue={baseState:h.baseState,firstBaseUpdate:h.firstBaseUpdate,lastBaseUpdate:h.lastBaseUpdate,shared:h.shared,effects:h.effects})}function Uc(h,p){return{eventTime:h,lane:p,tag:0,payload:null,callback:null,next:null}}function Au(h,p,C){var j=h.updateQueue;if(j===null)return null;if(j=j.shared,(wi&2)!==0){var Q=j.pending;return Q===null?p.next=p:(p.next=Q.next,Q.next=p),j.pending=p,Kl(h,C)}return Q=j.interleaved,Q===null?(p.next=p,dv(j)):(p.next=Q.next,Q.next=p),j.interleaved=p,Kl(h,C)}function fv(h,p,C){if(p=p.updateQueue,p!==null&&(p=p.shared,(C&4194240)!==0)){var j=p.lanes;j&=h.pendingLanes,C|=j,p.lanes=C,pn(h,C)}}function c0(h,p){var C=h.updateQueue,j=h.alternate;if(j!==null&&(j=j.updateQueue,C===j)){var Q=null,H=null;if(C=C.firstBaseUpdate,C!==null){do{var oe={eventTime:C.eventTime,lane:C.lane,tag:C.tag,payload:C.payload,callback:C.callback,next:null};H===null?Q=H=oe:H=H.next=oe,C=C.next}while(C!==null);H===null?Q=H=p:H=H.next=p}else Q=H=p;C={baseState:j.baseState,firstBaseUpdate:Q,lastBaseUpdate:H,shared:j.shared,effects:j.effects},h.updateQueue=C;return}h=C.lastBaseUpdate,h===null?C.firstBaseUpdate=p:h.next=p,C.lastBaseUpdate=p}function Sl(h,p,C,j){var Q=h.updateQueue;ud=!1;var H=Q.firstBaseUpdate,oe=Q.lastBaseUpdate,De=Q.shared.pending;if(De!==null){Q.shared.pending=null;var $e=De,At=$e.next;$e.next=null,oe===null?H=At:oe.next=At,oe=$e;var Kt=h.alternate;Kt!==null&&(Kt=Kt.updateQueue,De=Kt.lastBaseUpdate,De!==oe&&(De===null?Kt.firstBaseUpdate=At:De.next=At,Kt.lastBaseUpdate=$e))}if(H!==null){var Xt=Q.baseState;oe=0,Kt=At=$e=null,De=H;do{var Gt=De.lane,Nr=De.eventTime;if((j&Gt)===Gt){Kt!==null&&(Kt=Kt.next={eventTime:Nr,lane:0,tag:De.tag,payload:De.payload,callback:De.callback,next:null});e:{var Fr=h,Lr=De;switch(Gt=p,Nr=C,Lr.tag){case 1:if(Fr=Lr.payload,typeof Fr=="function"){Xt=Fr.call(Nr,Xt,Gt);break e}Xt=Fr;break e;case 3:Fr.flags=Fr.flags&-65537|128;case 0:if(Fr=Lr.payload,Gt=typeof Fr=="function"?Fr.call(Nr,Xt,Gt):Fr,Gt==null)break e;Xt=ge({},Xt,Gt);break e;case 2:ud=!0}}De.callback!==null&&De.lane!==0&&(h.flags|=64,Gt=Q.effects,Gt===null?Q.effects=[De]:Gt.push(De))}else Nr={eventTime:Nr,lane:Gt,tag:De.tag,payload:De.payload,callback:De.callback,next:null},Kt===null?(At=Kt=Nr,$e=Xt):Kt=Kt.next=Nr,oe|=Gt;if(De=De.next,De===null){if(De=Q.shared.pending,De===null)break;Gt=De,De=Gt.next,Gt.next=null,Q.lastBaseUpdate=Gt,Q.shared.pending=null}}while(!0);if(Kt===null&&($e=Xt),Q.baseState=$e,Q.firstBaseUpdate=At,Q.lastBaseUpdate=Kt,p=Q.shared.interleaved,p!==null){Q=p;do oe|=Q.lane,Q=Q.next;while(Q!==p)}else H===null&&(Q.shared.lanes=0);cA|=oe,h.lanes=oe,h.memoizedState=Xt}}function jh(h,p,C){if(h=p.effects,p.effects=null,h!==null)for(p=0;pC?C:4,h(!0);var j=Ph.transition;Ph.transition={};try{h(!1),p()}finally{Vr=C,Ph.transition=j}}function Uy(){return on().memoizedState}function cp(h,p,C){var j=Ap(h);if(C={lane:j,action:C,hasEagerState:!1,eagerState:null,next:null},qo(h))vv(p,C);else if(C=_h(h,p,C,j),C!==null){var Q=hc();md(C,h,j,Q),$y(C,p,j)}}function fd(h,p,C){var j=Ap(h),Q={lane:j,action:C,hasEagerState:!1,eagerState:null,next:null};if(qo(h))vv(p,Q);else{var H=h.alternate;if(h.lanes===0&&(H===null||H.lanes===0)&&(H=p.lastRenderedReducer,H!==null))try{var oe=p.lastRenderedState,De=H(oe,C);if(Q.hasEagerState=!0,Q.eagerState=De,bo(De,oe)){var $e=p.interleaved;$e===null?(Q.next=Q,dv(p)):(Q.next=$e.next,$e.next=Q),p.interleaved=Q;return}}catch{}C=_h(h,p,Q,j),C!==null&&(Q=hc(),md(C,h,j,Q),$y(C,p,j))}}function qo(h){var p=h.alternate;return h===la||p!==null&&p===la}function vv(h,p){m0=cf=!0;var C=h.pending;C===null?p.next=p:(p.next=C.next,C.next=p),h.pending=p}function $y(h,p,C){if((C&4194240)!==0){var j=p.lanes;j&=h.pendingLanes,C|=j,p.lanes=C,pn(h,C)}}var hs={readContext:Il,useCallback:Ks,useContext:Ks,useEffect:Ks,useImperativeHandle:Ks,useInsertionEffect:Ks,useLayoutEffect:Ks,useMemo:Ks,useReducer:Ks,useRef:Ks,useState:Ks,useDebugValue:Ks,useDeferredValue:Ks,useTransition:Ks,useMutableSource:Ks,useSyncExternalStore:Ks,useId:Ks,unstable_isNewReconciler:!1},P5={readContext:Il,useCallback:function(h,p){return Co().memoizedState=[h,p===void 0?null:p],h},useContext:Il,useEffect:Ly,useImperativeHandle:function(h,p,C){return C=C!=null?C.concat([h]):null,p0(4194308,4,rA.bind(null,p,h),C)},useLayoutEffect:function(h,p){return p0(4194308,4,h,p)},useInsertionEffect:function(h,p){return p0(4,2,h,p)},useMemo:function(h,p){var C=Co();return p=p===void 0?null:p,h=h(),C.memoizedState=[h,p],h},useReducer:function(h,p,C){var j=Co();return p=C!==void 0?C(p):p,j.memoizedState=j.baseState=p,h={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:p},j.queue=h,h=h.dispatch=cp.bind(null,la,h),[j.memoizedState,h]},useRef:function(h){var p=Co();return h={current:h},p.memoizedState=h},useState:bu,useDebugValue:nA,useDeferredValue:function(h){return Co().memoizedState=h},useTransition:function(){var h=bu(!1),p=h[0];return h=Vs.bind(null,h[1]),Co().memoizedState=h,[p,h]},useMutableSource:function(){},useSyncExternalStore:function(h,p,C){var j=la,Q=Co();if(En){if(C===void 0)throw Error(r(407));C=C()}else{if(C=p(),Vo===null)throw Error(r(349));(lf&30)!==0||mv(j,p,C)}Q.memoizedState=C;var H={value:C,getSnapshot:p};return Q.queue=H,Ly(Rh.bind(null,j,H,h),[h]),j.flags|=2048,wu(9,op.bind(null,j,H,C,p),void 0,null),C},useId:function(){var h=Co(),p=Vo.identifierPrefix;if(En){var C=ot,j=pt;C=(j&~(1<<32-Na(j)-1)).toString(32)+C,p=":"+p+"R"+C,C=tA++,0<\/script>",h=h.removeChild(h.firstChild)):typeof j.is=="string"?h=oe.createElement(C,{is:j.is}):(h=oe.createElement(C),C==="select"&&(oe=h,j.multiple?oe.multiple=!0:j.size&&(oe.size=j.size))):h=oe.createElementNS(h,C),h[oo]=p,h[Ih]=j,Ue(h,p,!1,!1),p.stateNode=h;e:{switch(oe=ie(C,j),C){case"dialog":Oi("cancel",h),Oi("close",h),Q=j;break;case"iframe":case"object":case"embed":Oi("load",h),Q=j;break;case"video":case"audio":for(Q=0;QIv&&(p.flags|=128,j=!0,cr(H,!1),p.lanes=4194304)}else{if(!j)if(h=f0(oe),h!==null){if(p.flags|=128,j=!0,C=h.updateQueue,C!==null&&(p.updateQueue=C,p.flags|=4),cr(H,!0),H.tail===null&&H.tailMode==="hidden"&&!oe.alternate&&!En)return $t(p),null}else 2*lr()-H.renderingStartTime>Iv&&C!==1073741824&&(p.flags|=128,j=!0,cr(H,!1),p.lanes=4194304);H.isBackwards?(oe.sibling=p.child,p.child=oe):(C=H.last,C!==null?C.sibling=oe:p.child=oe,H.last=oe)}return H.tail!==null?(p=H.tail,H.rendering=p,H.tail=p.sibling,H.renderingStartTime=lr(),p.sibling=null,C=Ri.current,gi(Ri,j?C&1|2:C&1),p):($t(p),null);case 22:case 23:return KB(),j=p.memoizedState!==null,h!==null&&h.memoizedState!==null!==j&&(p.flags|=8192),j&&(p.mode&1)!==0?(Bu&1073741824)!==0&&($t(p),p.subtreeFlags&6&&(p.flags|=8192)):$t(p),null;case 24:return null;case 25:return null}throw Error(r(156,p.tag))}function wa(h,p){switch(ii(p),p.tag){case 1:return qs(p.type)&&af(),h=p.flags,h&65536?(p.flags=h&-65537|128,p):null;case 3:return vu(),Vn(Gs),Vn(Ws),eA(),h=p.flags,(h&65536)!==0&&(h&128)===0?(p.flags=h&-65537|128,p):null;case 5:return Xg(p),null;case 13:if(Vn(Ri),h=p.memoizedState,h!==null&&h.dehydrated!==null){if(p.alternate===null)throw Error(r(340));ep()}return h=p.flags,h&65536?(p.flags=h&-65537|128,p):null;case 19:return Vn(Ri),null;case 4:return vu(),null;case 10:return uv(p.type._context),null;case 22:case 23:return KB(),null;case 24:return null;default:return null}}var ut=!1,nt=!1,Ct=typeof WeakSet=="function"?WeakSet:Set,ft=null;function en(h,p){var C=h.ref;if(C!==null)if(typeof C=="function")try{C(null)}catch(j){Ts(h,p,j)}else C.current=null}function Mi(h,p,C){try{C()}catch(j){Ts(h,p,j)}}var An=!1;function Mn(h,p){if(i0=aa,h=yl(),Pc(h)){if("selectionStart"in h)var C={start:h.selectionStart,end:h.selectionEnd};else e:{C=(C=h.ownerDocument)&&C.defaultView||window;var j=C.getSelection&&C.getSelection();if(j&&j.rangeCount!==0){C=j.anchorNode;var Q=j.anchorOffset,H=j.focusNode;j=j.focusOffset;try{C.nodeType,H.nodeType}catch{C=null;break e}var oe=0,De=-1,$e=-1,At=0,Kt=0,Xt=h,Gt=null;t:for(;;){for(var Nr;Xt!==C||Q!==0&&Xt.nodeType!==3||(De=oe+Q),Xt!==H||j!==0&&Xt.nodeType!==3||($e=oe+j),Xt.nodeType===3&&(oe+=Xt.nodeValue.length),(Nr=Xt.firstChild)!==null;)Gt=Xt,Xt=Nr;for(;;){if(Xt===h)break t;if(Gt===C&&++At===Q&&(De=oe),Gt===H&&++Kt===j&&($e=oe),(Nr=Xt.nextSibling)!==null)break;Xt=Gt,Gt=Xt.parentNode}Xt=Nr}C=De===-1||$e===-1?null:{start:De,end:$e}}else C=null}C=C||{start:0,end:0}}else C=null;for(Qc={focusedElem:h,selectionRange:C},aa=!1,ft=p;ft!==null;)if(p=ft,h=p.child,(p.subtreeFlags&1028)!==0&&h!==null)h.return=p,ft=h;else for(;ft!==null;){p=ft;try{var Fr=p.alternate;if((p.flags&1024)!==0)switch(p.tag){case 0:case 11:case 15:break;case 1:if(Fr!==null){var Lr=Fr.memoizedProps,Ys=Fr.memoizedState,lt=p.stateNode,Ke=lt.getSnapshotBeforeUpdate(p.elementType===p.type?Lr:Eu(p.type,Lr),Ys);lt.__reactInternalSnapshotBeforeUpdate=Ke}break;case 3:var ht=p.stateNode.containerInfo;ht.nodeType===1?ht.textContent="":ht.nodeType===9&&ht.documentElement&&ht.removeChild(ht.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(or){Ts(p,p.return,or)}if(h=p.sibling,h!==null){h.return=p.return,ft=h;break}ft=p.return}return Fr=An,An=!1,Fr}function si(h,p,C){var j=p.updateQueue;if(j=j!==null?j.lastEffect:null,j!==null){var Q=j=j.next;do{if((Q.tag&h)===h){var H=Q.destroy;Q.destroy=void 0,H!==void 0&&Mi(p,C,H)}Q=Q.next}while(Q!==j)}}function Ds(h,p){if(p=p.updateQueue,p=p!==null?p.lastEffect:null,p!==null){var C=p=p.next;do{if((C.tag&h)===h){var j=C.create;C.destroy=j()}C=C.next}while(C!==p)}}function ps(h){var p=h.ref;if(p!==null){var C=h.stateNode;h.tag,h=C,typeof p=="function"?p(h):p.current=h}}function ca(h){var p=h.alternate;p!==null&&(h.alternate=null,ca(p)),h.child=null,h.deletions=null,h.sibling=null,h.tag===5&&(p=h.stateNode,p!==null&&(delete p[oo],delete p[Ih],delete p[Sh],delete p[Kg],delete p[ov])),h.stateNode=null,h.return=null,h.dependencies=null,h.memoizedProps=null,h.memoizedState=null,h.pendingProps=null,h.stateNode=null,h.updateQueue=null}function ln(h){return h.tag===5||h.tag===3||h.tag===4}function _n(h){e:for(;;){for(;h.sibling===null;){if(h.return===null||ln(h.return))return null;h=h.return}for(h.sibling.return=h.return,h=h.sibling;h.tag!==5&&h.tag!==6&&h.tag!==18;){if(h.flags&2||h.child===null||h.tag===4)continue e;h.child.return=h,h=h.child}if(!(h.flags&2))return h.stateNode}}function Oa(h,p,C){var j=h.tag;if(j===5||j===6)h=h.stateNode,p?C.nodeType===8?C.parentNode.insertBefore(h,p):C.insertBefore(h,p):(C.nodeType===8?(p=C.parentNode,p.insertBefore(h,C)):(p=C,p.appendChild(h)),C=C._reactRootContainer,C!=null||p.onclick!==null||(p.onclick=od));else if(j!==4&&(h=h.child,h!==null))for(Oa(h,p,C),h=h.sibling;h!==null;)Oa(h,p,C),h=h.sibling}function zn(h,p,C){var j=h.tag;if(j===5||j===6)h=h.stateNode,p?C.insertBefore(h,p):C.appendChild(h);else if(j!==4&&(h=h.child,h!==null))for(zn(h,p,C),h=h.sibling;h!==null;)zn(h,p,C),h=h.sibling}var Ea=null,Su=!1;function mp(h,p,C){for(C=C.child;C!==null;)UM(h,p,C),C=C.sibling}function UM(h,p,C){if(ri&&typeof ri.onCommitFiberUnmount=="function")try{ri.onCommitFiberUnmount(Wa,C)}catch{}switch(C.tag){case 5:nt||en(C,p);case 6:var j=Ea,Q=Su;Ea=null,mp(h,p,C),Ea=j,Su=Q,Ea!==null&&(Su?(h=Ea,C=C.stateNode,h.nodeType===8?h.parentNode.removeChild(C):h.removeChild(C)):Ea.removeChild(C.stateNode));break;case 18:Ea!==null&&(Su?(h=Ea,C=C.stateNode,h.nodeType===8?nf(h.parentNode,C):h.nodeType===1&&nf(h,C),jc(h)):nf(Ea,C.stateNode));break;case 4:j=Ea,Q=Su,Ea=C.stateNode.containerInfo,Su=!0,mp(h,p,C),Ea=j,Su=Q;break;case 0:case 11:case 14:case 15:if(!nt&&(j=C.updateQueue,j!==null&&(j=j.lastEffect,j!==null))){Q=j=j.next;do{var H=Q,oe=H.destroy;H=H.tag,oe!==void 0&&((H&2)!==0||(H&4)!==0)&&Mi(C,p,oe),Q=Q.next}while(Q!==j)}mp(h,p,C);break;case 1:if(!nt&&(en(C,p),j=C.stateNode,typeof j.componentWillUnmount=="function"))try{j.props=C.memoizedProps,j.state=C.memoizedState,j.componentWillUnmount()}catch(De){Ts(C,p,De)}mp(h,p,C);break;case 21:mp(h,p,C);break;case 22:C.mode&1?(nt=(j=nt)||C.memoizedState!==null,mp(h,p,C),nt=j):mp(h,p,C);break;default:mp(h,p,C)}}function $M(h){var p=h.updateQueue;if(p!==null){h.updateQueue=null;var C=h.stateNode;C===null&&(C=h.stateNode=new Ct),p.forEach(function(j){var Q=Wxe.bind(null,h,j);C.has(j)||(C.add(j),j.then(Q,Q))})}}function hd(h,p){var C=p.deletions;if(C!==null)for(var j=0;jQ&&(Q=oe),j&=~H}if(j=Q,j=lr()-j,j=(120>j?120:480>j?480:1080>j?1080:1920>j?1920:3e3>j?3e3:4320>j?4320:1960*Mxe(j/1960))-j,10h?16:h,gp===null)var j=!1;else{if(h=gp,gp=null,L5=0,(wi&6)!==0)throw Error(r(331));var Q=wi;for(wi|=4,ft=h.current;ft!==null;){var H=ft,oe=H.child;if((ft.flags&16)!==0){var De=H.deletions;if(De!==null){for(var $e=0;$elr()-$B?dA(h,0):UB|=C),zc(h,p)}function tQ(h,p){p===0&&((h.mode&1)===0?p=1:(p=tt,tt<<=1,(tt&130023424)===0&&(tt=4194304)));var C=hc();h=Kl(h,p),h!==null&&(fn(h,p,C),zc(h,C))}function Hxe(h){var p=h.memoizedState,C=0;p!==null&&(C=p.retryLane),tQ(h,C)}function Wxe(h,p){var C=0;switch(h.tag){case 13:var j=h.stateNode,Q=h.memoizedState;Q!==null&&(C=Q.retryLane);break;case 19:j=h.stateNode;break;default:throw Error(r(314))}j!==null&&j.delete(p),tQ(h,C)}var rQ;rQ=function(h,p,C){if(h!==null)if(h.memoizedProps!==p.pendingProps||Gs.current)Ko=!0;else{if((h.lanes&C)===0&&(p.flags&128)===0)return Ko=!1,Ce(h,p,C);Ko=(h.flags&131072)!==0}else Ko=!1,En&&(p.flags&1048576)!==0&&_r(p,Yn,p.index);switch(p.lanes=0,p.tag){case 2:var j=p.type;V(h,p),h=p.pendingProps;var Q=o0(p,Ws.current);kh(p,C),Q=yu(null,p,j,h,Q,C);var H=fs();return p.flags|=1,typeof Q=="object"&&Q!==null&&typeof Q.render=="function"&&Q.$$typeof===void 0?(p.tag=1,p.memoizedState=null,p.updateQueue=null,qs(j)?(H=!0,N(p)):H=!1,p.memoizedState=Q.state!==null&&Q.state!==void 0?Q.state:null,gu(p),Q.updater=xv,p.stateNode=Q,Q._reactInternals=p,Vi(p,j,h,C),p=x0(null,p,j,!0,H,C)):(p.tag=0,En&&H&&Jr(p),ta(null,p,Q,C),p=p.child),p;case 16:j=p.elementType;e:{switch(V(h,p),h=p.pendingProps,Q=j._init,j=Q(j._payload),p.type=j,Q=p.tag=qxe(j),h=Eu(j,h),Q){case 0:p=aA(null,p,j,h,C);break e;case 1:p=sA(null,p,j,h,C);break e;case 11:p=dp(null,p,j,h,C);break e;case 14:p=fp(null,p,j,Eu(j.type,h),C);break e}throw Error(r(306,j,""))}return p;case 0:return j=p.type,Q=p.pendingProps,Q=p.elementType===j?Q:Eu(j,Q),aA(h,p,j,Q,C);case 1:return j=p.type,Q=p.pendingProps,Q=p.elementType===j?Q:Eu(j,Q),sA(h,p,j,Q,C);case 3:e:{if(oA(p),h===null)throw Error(r(387));j=p.pendingProps,H=p.memoizedState,Q=H.element,np(h,p),Sl(p,j,null,C);var oe=p.memoizedState;if(j=oe.element,H.isDehydrated)if(H={element:j,isDehydrated:!1,cache:oe.cache,pendingSuspenseBoundaries:oe.pendingSuspenseBoundaries,transitions:oe.transitions},p.updateQueue.baseState=H,p.memoizedState=H,p.flags&256){Q=In(Error(r(423)),p),p=hf(h,p,j,C,Q);break e}else if(j!==Q){Q=In(Error(r(424)),p),p=hf(h,p,j,C,Q);break e}else for(gn=Wo(p.stateNode.containerInfo.firstChild),Ur=p,En=!0,Cn=null,C=Fy(p,null,j,C),p.child=C;C;)C.flags=C.flags&-3|4096,C=C.sibling;else{if(ep(),j===Q){p=ee(h,p,C);break e}ta(h,p,j,C)}p=p.child}return p;case 5:return ip(p),h===null&&of(p),j=p.type,Q=p.pendingProps,H=h!==null?h.memoizedProps:null,oe=Q.children,Zm(j,Q)?oe=null:H!==null&&Zm(j,H)&&(p.flags|=32),wv(h,p),ta(h,p,oe,C),p.child;case 6:return h===null&&of(p),null;case 13:return Ev(h,p,C);case 4:return Jg(p,p.stateNode.containerInfo),j=p.pendingProps,h===null?p.child=ql(p,null,j,C):ta(h,p,j,C),p.child;case 11:return j=p.type,Q=p.pendingProps,Q=p.elementType===j?Q:Eu(j,Q),dp(h,p,j,Q,C);case 7:return ta(h,p,p.pendingProps,C),p.child;case 8:return ta(h,p,p.pendingProps.children,C),p.child;case 12:return ta(h,p,p.pendingProps.children,C),p.child;case 10:e:{if(j=p.type._context,Q=p.pendingProps,H=p.memoizedProps,oe=Q.value,gi(cv,j._currentValue),j._currentValue=oe,H!==null)if(bo(H.value,oe)){if(H.children===Q.children&&!Gs.current){p=ee(h,p,C);break e}}else for(H=p.child,H!==null&&(H.return=p);H!==null;){var De=H.dependencies;if(De!==null){oe=H.child;for(var $e=De.firstContext;$e!==null;){if($e.context===j){if(H.tag===1){$e=Uc(-1,C&-C),$e.tag=2;var At=H.updateQueue;if(At!==null){At=At.shared;var Kt=At.pending;Kt===null?$e.next=$e:($e.next=Kt.next,Kt.next=$e),At.pending=$e}}H.lanes|=C,$e=H.alternate,$e!==null&&($e.lanes|=C),Cl(H.return,C,p),De.lanes|=C;break}$e=$e.next}}else if(H.tag===10)oe=H.type===p.type?null:H.child;else if(H.tag===18){if(oe=H.return,oe===null)throw Error(r(341));oe.lanes|=C,De=oe.alternate,De!==null&&(De.lanes|=C),Cl(oe,C,p),oe=H.sibling}else oe=H.child;if(oe!==null)oe.return=H;else for(oe=H;oe!==null;){if(oe===p){oe=null;break}if(H=oe.sibling,H!==null){H.return=oe.return,oe=H;break}oe=oe.return}H=oe}ta(h,p,Q.children,C),p=p.child}return p;case 9:return Q=p.type,j=p.pendingProps.children,kh(p,C),Q=Il(Q),j=j(Q),p.flags|=1,ta(h,p,j,C),p.child;case 14:return j=p.type,Q=Eu(j,p.pendingProps),Q=Eu(j.type,Q),fp(h,p,j,Q,C);case 15:return Iu(h,p,p.type,p.pendingProps,C);case 17:return j=p.type,Q=p.pendingProps,Q=p.elementType===j?Q:Eu(j,Q),V(h,p),p.tag=1,qs(j)?(h=!0,N(p)):h=!1,kh(p,C),O5(p,j,Q),Vi(p,j,Q,C),x0(null,p,j,!0,h,C);case 19:return M(h,p,C);case 22:return bv(h,p,C)}throw Error(r(156,p.tag))};function nQ(h,p){return Ua(h,p)}function Gxe(h,p,C,j){this.tag=h,this.key=C,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=j,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function b0(h,p,C,j){return new Gxe(h,p,C,j)}function YB(h){return h=h.prototype,!(!h||!h.isReactComponent)}function qxe(h){if(typeof h=="function")return YB(h)?1:0;if(h!=null){if(h=h.$$typeof,h===R)return 11;if(h===Z)return 14}return 2}function xp(h,p){var C=h.alternate;return C===null?(C=b0(h.tag,p,h.key,h.mode),C.elementType=h.elementType,C.type=h.type,C.stateNode=h.stateNode,C.alternate=h,h.alternate=C):(C.pendingProps=p,C.type=h.type,C.flags=0,C.subtreeFlags=0,C.deletions=null),C.flags=h.flags&14680064,C.childLanes=h.childLanes,C.lanes=h.lanes,C.child=h.child,C.memoizedProps=h.memoizedProps,C.memoizedState=h.memoizedState,C.updateQueue=h.updateQueue,p=h.dependencies,C.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},C.sibling=h.sibling,C.index=h.index,C.ref=h.ref,C}function H5(h,p,C,j,Q,H){var oe=2;if(j=h,typeof h=="function")YB(h)&&(oe=1);else if(typeof h=="string")oe=5;else e:switch(h){case P:return hA(C.children,Q,H,p);case O:oe=8,Q|=8;break;case z:return h=b0(12,C,p,Q|2),h.elementType=z,h.lanes=H,h;case $:return h=b0(13,C,p,Q),h.elementType=$,h.lanes=H,h;case X:return h=b0(19,C,p,Q),h.elementType=X,h.lanes=H,h;case q:return W5(C,Q,H,p);default:if(typeof h=="object"&&h!==null)switch(h.$$typeof){case L:oe=10;break e;case W:oe=9;break e;case R:oe=11;break e;case Z:oe=14;break e;case K:oe=16,j=null;break e}throw Error(r(130,h==null?h:typeof h,""))}return p=b0(oe,C,p,Q),p.elementType=h,p.type=j,p.lanes=H,p}function hA(h,p,C,j){return h=b0(7,h,j,p),h.lanes=C,h}function W5(h,p,C,j){return h=b0(22,h,j,p),h.elementType=q,h.lanes=C,h.stateNode={isHidden:!1},h}function ZB(h,p,C){return h=b0(6,h,null,p),h.lanes=C,h}function JB(h,p,C){return p=b0(4,h.children!==null?h.children:[],h.key,p),p.lanes=C,p.stateNode={containerInfo:h.containerInfo,pendingChildren:null,implementation:h.implementation},p}function Kxe(h,p,C,j,Q){this.tag=p,this.containerInfo=h,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jr(0),this.expirationTimes=jr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jr(0),this.identifierPrefix=j,this.onRecoverableError=Q,this.mutableSourceEagerHydrationData=null}function XB(h,p,C,j,Q,H,oe,De,$e){return h=new Kxe(h,p,C,De,$e),p===1?(p=1,H===!0&&(p|=8)):p=0,H=b0(3,null,null,p),h.current=H,H.stateNode=h,H.memoizedState={element:j,isDehydrated:C,cache:null,transitions:null,pendingSuspenseBoundaries:null},gu(H),h}function Vxe(h,p,C){var j=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),aN.exports=oye(),aN.exports}var AQ;function lye(){if(AQ)return J5;AQ=1;var e=YZ();return J5.createRoot=e.createRoot,J5.hydrateRoot=e.hydrateRoot,J5}var cye=lye(),B1=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},uye={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},dye=class{#t=uye;#e=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,t){return this.#t.setTimeout(e,t)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,t){return this.#t.setInterval(e,t)}clearInterval(e){this.#t.clearInterval(e)}},IA=new dye;function fye(e){setTimeout(e,0)}var e1=typeof window>"u"||"Deno"in globalThis;function Zl(){}function hye(e,t){return typeof e=="function"?e(t):e}function m8(e){return typeof e=="number"&&e>=0&&e!==1/0}function ZZ(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Kp(e,t){return typeof e=="function"?e(t):e}function j0(e,t){return typeof e=="function"?e(t):e}function vQ(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:l}=e;if(s){if(n){if(t.queryHash!==GT(s,t.options))return!1}else if(!F2(t.queryKey,s))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||a&&!a(t))}function xQ(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(t1(t.options.mutationKey)!==t1(a))return!1}else if(!F2(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function GT(e,t){return(t?.queryKeyHashFn||t1)(e)}function t1(e){return JSON.stringify(e,(t,r)=>p8(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function F2(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>F2(e[r],t[r])):!1}var mye=Object.prototype.hasOwnProperty;function qT(e,t){if(e===t)return e;const r=yQ(e)&&yQ(t);if(!r&&!(p8(e)&&p8(t)))return t;const i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),s=a.length,l=r?new Array(s):{};let c=0;for(let u=0;u{IA.setTimeout(t,e)})}function g8(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?qT(e,t):t}function gye(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Aye(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var KT=Symbol();function JZ(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===KT?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function XZ(e,t){return typeof e=="function"?e(...t):!!e}function vye(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var xye=class extends B1{#t;#e;#r;constructor(){super(),this.#r=e=>{if(!e1&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#r=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},VT=new xye;function A8(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var yye=fye;function bye(){let e=[],t=0,r=l=>{l()},n=l=>{l()},i=yye;const a=l=>{t?e.push(l):i(()=>{r(l)})},s=()=>{const l=e;e=[],l.length&&i(()=>{n(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||s()}return c},batchCalls:l=>(...c)=>{a(()=>{l(...c)})},schedule:a,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{i=l}}}var xs=bye(),wye=class extends B1{#t=!0;#e;#r;constructor(){super(),this.#r=e=>{if(!e1&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#r=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#t}},IC=new wye;function Eye(e){return Math.min(1e3*2**e,3e4)}function eJ(e){return(e??"online")==="online"?IC.isOnline():!0}var v8=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function tJ(e){let t=!1,r=0,n;const i=A8(),a=()=>i.status!=="pending",s=v=>{if(!a()){const b=new v8(v);m(b),e.onCancel?.(b)}},l=()=>{t=!0},c=()=>{t=!1},u=()=>VT.isFocused()&&(e.networkMode==="always"||IC.isOnline())&&e.canRun(),d=()=>eJ(e.networkMode)&&e.canRun(),f=v=>{a()||(n?.(),i.resolve(v))},m=v=>{a()||(n?.(),i.reject(v))},g=()=>new Promise(v=>{n=b=>{(a()||u())&&v(b)},e.onPause?.()}).then(()=>{n=void 0,a()||e.onContinue?.()}),A=()=>{if(a())return;let v;const b=r===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(E){v=Promise.reject(E)}Promise.resolve(v).then(f).catch(E=>{if(a())return;const I=e.retry??(e1?0:3),S=e.retryDelay??Eye,_=typeof S=="function"?S(r,E):S,B=I===!0||typeof I=="number"&&ru()?void 0:g()).then(()=>{t?m(E):A()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n?.(),i),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?A():g().then(A),i)}}var rJ=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),m8(this.gcTime)&&(this.#t=IA.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(e1?1/0:300*1e3))}clearGcTimeout(){this.#t&&(IA.clearTimeout(this.#t),this.#t=void 0)}},Cye=class extends rJ{#t;#e;#r;#i;#n;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=EQ(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=EQ(this.options);t.data!==void 0&&(this.setState(wQ(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const r=g8(this.state.data,e,this.options);return this.#s({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(Zl).catch(Zl):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(e=>j0(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===KT||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Kp(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!ZZ(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#n&&(this.#o?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const l=this.observers.find(c=>c.options.queryFn);l&&this.setOptions(l.options)}const r=new AbortController,n=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(this.#o=!0,r.signal)})},i=()=>{const l=JZ(this.options,t),u=(()=>{const d={client:this.#i,queryKey:this.queryKey,meta:this.meta};return n(d),d})();return this.#o=!1,this.options.persister?this.options.persister(l,u,this):l(u)},s=(()=>{const l={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return n(l),l})();this.options.behavior?.onFetch(s,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#s({type:"fetch",meta:s.fetchOptions?.meta}),this.#n=tJ({initialPromise:t?.initialPromise,fn:s.fetchFn,onCancel:l=>{l instanceof v8&&l.revert&&this.setState({...this.#e,fetchStatus:"idle"}),r.abort()},onFail:(l,c)=>{this.#s({type:"failed",failureCount:l,error:c})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const l=await this.#n.start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),this.#r.config.onSuccess?.(l,this),this.#r.config.onSettled?.(l,this.state.error,this),l}catch(l){if(l instanceof v8){if(l.silent)return this.#n.promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw this.#s({type:"error",error:l}),this.#r.config.onError?.(l,this),this.#r.config.onSettled?.(this.state.data,l,this),l}finally{this.scheduleGc()}}#s(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...nJ(r.data,this.options),fetchMeta:e.meta??null};case"success":const n={...r,...wQ(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=e.manual?n:void 0,n;case"error":const i=e.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),xs.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function nJ(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:eJ(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function wQ(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function EQ(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var YT=class extends B1{constructor(e,t){super(),this.options=t,this.#t=e,this.#s=null,this.#o=A8(),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#r=void 0;#i=void 0;#n;#a;#o;#s;#h;#d;#f;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),CQ(this.#e,this.options)?this.#m():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return x8(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return x8(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#b(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,r=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof j0(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#e.setOptions(this.options),t._defaulted&&!M2(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const n=this.hasListeners();n&&IQ(this.#e,r,this.options,t)&&this.#m(),this.updateResult(),n&&(this.#e!==r||j0(this.options.enabled,this.#e)!==j0(t.enabled,this.#e)||Kp(this.options.staleTime,this.#e)!==Kp(t.staleTime,this.#e))&&this.#g();const i=this.#A();n&&(this.#e!==r||j0(this.options.enabled,this.#e)!==j0(t.enabled,this.#e)||i!==this.#l)&&this.#v(i)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),r=this.createResult(t,e);return Sye(this,r)&&(this.#i=r,this.#a=this.options,this.#n=this.#e.state),r}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(r,n)=>(this.trackProp(n),t?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#t.defaultQueryOptions(e),r=this.#t.getQueryCache().build(this.#t,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#m(e){this.#w();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Zl)),t}#g(){this.#y();const e=Kp(this.options.staleTime,this.#e);if(e1||this.#i.isStale||!m8(e))return;const r=ZZ(this.#i.dataUpdatedAt,e)+1;this.#c=IA.setTimeout(()=>{this.#i.isStale||this.updateResult()},r)}#A(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(e){this.#b(),this.#l=e,!(e1||j0(this.options.enabled,this.#e)===!1||!m8(this.#l)||this.#l===0)&&(this.#u=IA.setInterval(()=>{(this.options.refetchIntervalInBackground||VT.isFocused())&&this.#m()},this.#l))}#x(){this.#g(),this.#v(this.#A())}#y(){this.#c&&(IA.clearTimeout(this.#c),this.#c=void 0)}#b(){this.#u&&(IA.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const r=this.#e,n=this.options,i=this.#i,a=this.#n,s=this.#a,c=e!==r?e.state:this.#r,{state:u}=e;let d={...u},f=!1,m;if(t._optimisticResults){const O=this.hasListeners(),z=!O&&CQ(e,t),L=O&&IQ(e,r,t,n);(z||L)&&(d={...d,...nJ(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:A,status:v}=d;m=d.data;let b=!1;if(t.placeholderData!==void 0&&m===void 0&&v==="pending"){let O;i?.isPlaceholderData&&t.placeholderData===s?.placeholderData?(O=i.data,b=!0):O=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,O!==void 0&&(v="success",m=g8(i?.data,O,t),f=!0)}if(t.select&&m!==void 0&&!b)if(i&&m===a?.data&&t.select===this.#h)m=this.#d;else try{this.#h=t.select,m=t.select(m),m=g8(i?.data,m,t),this.#d=m,this.#s=null}catch(O){this.#s=O}this.#s&&(g=this.#s,m=this.#d,A=Date.now(),v="error");const E=d.fetchStatus==="fetching",I=v==="pending",S=v==="error",_=I&&E,B=m!==void 0,P={status:v,fetchStatus:d.fetchStatus,isPending:I,isSuccess:v==="success",isError:S,isInitialLoading:_,isLoading:_,data:m,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:A,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:E,isRefetching:E&&!I,isLoadingError:S&&!B,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&B,isStale:ZT(e,t),refetch:this.refetch,promise:this.#o,isEnabled:j0(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const O=W=>{P.status==="error"?W.reject(P.error):P.data!==void 0&&W.resolve(P.data)},z=()=>{const W=this.#o=P.promise=A8();O(W)},L=this.#o;switch(L.status){case"pending":e.queryHash===r.queryHash&&O(L);break;case"fulfilled":(P.status==="error"||P.data!==L.value)&&z();break;case"rejected":(P.status!=="error"||P.error!==L.reason)&&z();break}}return P}updateResult(){const e=this.#i,t=this.createResult(this.#e,this.options);if(this.#n=this.#e.state,this.#a=this.options,this.#n.data!==void 0&&(this.#f=this.#e),M2(t,e))return;this.#i=t;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:n}=this.options,i=typeof n=="function"?n():n;if(i==="all"||!i&&!this.#p.size)return!0;const a=new Set(i??this.#p);return this.options.throwOnError&&a.add("error"),Object.keys(this.#i).some(s=>{const l=s;return this.#i[l]!==e[l]&&a.has(l)})};this.#E({listeners:r()})}#w(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#E(e){xs.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function Iye(e,t){return j0(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function CQ(e,t){return Iye(e,t)||e.state.data!==void 0&&x8(e,t,t.refetchOnMount)}function x8(e,t,r){if(j0(t.enabled,e)!==!1&&Kp(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&ZT(e,t)}return!1}function IQ(e,t,r,n){return(e!==t||j0(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&ZT(e,r)}function ZT(e,t){return j0(t.enabled,e)!==!1&&e.isStaleByTime(Kp(t.staleTime,e))}function Sye(e,t){return!M2(e.getCurrentResult(),t)}function SQ(e){return{onFetch:(t,r)=>{const n=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],s=t.state.data?.pageParams||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let d=!1;const f=A=>{vye(A,()=>t.signal,()=>d=!0)},m=JZ(t.options,t.fetchOptions),g=async(A,v,b)=>{if(d)return Promise.reject();if(v==null&&A.pages.length)return Promise.resolve(A);const I=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:v,direction:b?"backward":"forward",meta:t.options.meta};return f(T),T})(),S=await m(I),{maxPages:_}=t.options,B=b?Aye:gye;return{pages:B(A.pages,S,_),pageParams:B(A.pageParams,v,_)}};if(i&&a.length){const A=i==="backward",v=A?Bye:BQ,b={pages:a,pageParams:s},E=v(n,b);l=await g(b,E,A)}else{const A=e??a.length;do{const v=c===0?s[0]??n.initialPageParam:BQ(n,l);if(c>0&&v==null)break;l=await g(l,v),c++}while(ct.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=u}}}function BQ(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Bye(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var Nye=class extends rJ{#t;#e;#r;#i;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#r=e.mutationCache,this.#e=[],this.state=e.state||iJ(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#r.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#n({type:"continue"})},r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=tJ({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(a,s)=>{this.#n({type:"failed",failureCount:a,error:s})},onPause:()=>{this.#n({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});const n=this.state.status==="pending",i=!this.#i.canStart();try{if(n)t();else{this.#n({type:"pending",variables:e,isPaused:i}),await this.#r.config.onMutate?.(e,this,r);const s=await this.options.onMutate?.(e,r);s!==this.state.context&&this.#n({type:"pending",context:s,variables:e,isPaused:i})}const a=await this.#i.start();return await this.#r.config.onSuccess?.(a,e,this.state.context,this,r),await this.options.onSuccess?.(a,e,this.state.context,r),await this.#r.config.onSettled?.(a,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(a,null,e,this.state.context,r),this.#n({type:"success",data:a}),a}catch(a){try{throw await this.#r.config.onError?.(a,e,this.state.context,this,r),await this.options.onError?.(a,e,this.state.context,r),await this.#r.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,a,e,this.state.context,r),a}finally{this.#n({type:"error",error:a})}}finally{this.#r.runNext(this)}}#n(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),xs.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(e)}),this.#r.notify({mutation:this,type:"updated",action:e})})}};function iJ(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kye=class extends B1{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#r=0}#t;#e;#r;build(e,t,r){const n=new Nye({client:e,mutationCache:this,mutationId:++this.#r,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){this.#t.add(e);const t=X5(e);if(typeof t=="string"){const r=this.#e.get(t);r?r.push(e):this.#e.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const t=X5(e);if(typeof t=="string"){const r=this.#e.get(t);if(r)if(r.length>1){const n=r.indexOf(e);n!==-1&&r.splice(n,1)}else r[0]===e&&this.#e.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=X5(e);if(typeof t=="string"){const n=this.#e.get(t)?.find(i=>i.state.status==="pending");return!n||n===e}else return!0}runNext(e){const t=X5(e);return typeof t=="string"?this.#e.get(t)?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){xs.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const t={exact:!0,...e};return this.getAll().find(r=>xQ(t,r))}findAll(e={}){return this.getAll().filter(t=>xQ(e,t))}notify(e){xs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return xs.batch(()=>Promise.all(e.map(t=>t.continue().catch(Zl))))}};function X5(e){return e.options.scope?.id}var _ye=class extends B1{#t;#e=void 0;#r;#i;constructor(t,r){super(),this.#t=t,this.setOptions(r),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const r=this.options;this.options=this.#t.defaultMutationOptions(t),M2(this.options,r)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),r?.mutationKey&&this.options.mutationKey&&t1(r.mutationKey)!==t1(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#n(),this.#a(t)}getCurrentResult(){return this.#e}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#n(),this.#a()}mutate(t,r){return this.#i=r,this.#r?.removeObserver(this),this.#r=this.#t.getMutationCache().build(this.#t,this.options),this.#r.addObserver(this),this.#r.execute(t)}#n(){const t=this.#r?.state??iJ();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#a(t){xs.batch(()=>{if(this.#i&&this.hasListeners()){const r=this.#e.variables,n=this.#e.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#i.onSuccess?.(t.data,r,n,i),this.#i.onSettled?.(t.data,null,r,n,i)):t?.type==="error"&&(this.#i.onError?.(t.error,r,n,i),this.#i.onSettled?.(void 0,t.error,r,n,i))}this.listeners.forEach(r=>{r(this.#e)})})}};function NQ(e,t){const r=new Set(t);return e.filter(n=>!r.has(n))}function jye(e,t,r){const n=e.slice(0);return n[t]=r,n}var Dye=class extends B1{#t;#e;#r;#i;#n;#a;#o;#s;#h=[];constructor(e,t,r){super(),this.#t=e,this.#i=r,this.#r=[],this.#n=[],this.#e=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#n.forEach(e=>{e.subscribe(t=>{this.#u(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#n.forEach(e=>{e.destroy()})}setQueries(e,t){this.#r=e,this.#i=t,xs.batch(()=>{const r=this.#n,n=this.#c(this.#r);this.#h=n,n.forEach(d=>d.observer.setOptions(d.defaultedQueryOptions));const i=n.map(d=>d.observer),a=i.map(d=>d.getCurrentResult()),s=r.length!==i.length,l=i.some((d,f)=>d!==r[f]),c=s||l,u=c?!0:a.some((d,f)=>{const m=this.#e[f];return!m||!M2(d,m)});!c&&!u||(c&&(this.#n=i),this.#e=a,this.hasListeners()&&(c&&(NQ(r,i).forEach(d=>{d.destroy()}),NQ(i,r).forEach(d=>{d.subscribe(f=>{this.#u(d,f)})})),this.#l()))})}getCurrentResult(){return this.#e}getQueries(){return this.#n.map(e=>e.getCurrentQuery())}getObservers(){return this.#n}getOptimisticResult(e,t){const r=this.#c(e),n=r.map(i=>i.observer.getOptimisticResult(i.defaultedQueryOptions));return[n,i=>this.#f(i??n,t),()=>this.#d(n,r)]}#d(e,t){return t.map((r,n)=>{const i=e[n];return r.defaultedQueryOptions.notifyOnChangeProps?i:r.observer.trackResult(i,a=>{t.forEach(s=>{s.observer.trackProp(a)})})})}#f(e,t){return t?((!this.#a||this.#e!==this.#s||t!==this.#o)&&(this.#o=t,this.#s=this.#e,this.#a=qT(this.#a,t(e))),this.#a):e}#c(e){const t=new Map;this.#n.forEach(n=>{const i=n.options.queryHash;if(!i)return;const a=t.get(i);a?a.push(n):t.set(i,[n])});const r=[];return e.forEach(n=>{const i=this.#t.defaultQueryOptions(n),s=t.get(i.queryHash)?.shift()??new YT(this.#t,i);r.push({defaultedQueryOptions:i,observer:s})}),r}#u(e,t){const r=this.#n.indexOf(e);r!==-1&&(this.#e=jye(this.#e,r,t),this.#l())}#l(){if(this.hasListeners()){const e=this.#a,t=this.#d(this.#e,this.#h),r=this.#f(t,this.#i?.combine);e!==r&&xs.batch(()=>{this.listeners.forEach(n=>{n(this.#e)})})}}},Tye=class extends B1{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,r){const n=t.queryKey,i=t.queryHash??GT(n,t);let a=this.get(i);return a||(a=new Cye({client:e,queryKey:n,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(a)),a}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){xs.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>vQ(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>vQ(e,r)):t}notify(e){xs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){xs.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){xs.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Pye=class{#t;#e;#r;#i;#n;#a;#o;#s;constructor(e={}){this.#t=e.queryCache||new Tye,this.#e=e.mutationCache||new kye,this.#r=e.defaultOptions||{},this.#i=new Map,this.#n=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=VT.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#s=IC.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#t.build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Kp(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),a=this.#t.get(n.queryHash)?.state.data,s=hye(t,a);if(s!==void 0)return this.#t.build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return xs.batch(()=>this.#t.findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state}removeQueries(e){const t=this.#t;xs.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#t;return xs.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=xs.batch(()=>this.#t.findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Zl).catch(Zl)}invalidateQueries(e,t={}){return xs.batch(()=>(this.#t.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=xs.batch(()=>this.#t.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(Zl)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Zl)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#t.build(this,t);return r.isStaleByTime(Kp(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zl).catch(Zl)}fetchInfiniteQuery(e){return e.behavior=SQ(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zl).catch(Zl)}ensureInfiniteQueryData(e){return e.behavior=SQ(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return IC.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,t){this.#i.set(t1(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],r={};return t.forEach(n=>{F2(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){this.#n.set(t1(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#n.values()],r={};return t.forEach(n=>{F2(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=GT(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===KT&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},w=ty();const gr=hi(w),Fb=VZ({__proto__:null,default:gr},[w]);var aJ=w.createContext(void 0),zu=e=>{const t=w.useContext(aJ);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Oye=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),o.jsx(aJ.Provider,{value:e,children:t})),sJ=w.createContext(!1),oJ=()=>w.useContext(sJ);sJ.Provider;function Rye(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Fye=w.createContext(Rye()),lJ=()=>w.useContext(Fye),cJ=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},uJ=e=>{w.useEffect(()=>{e.clearReset()},[e])},dJ=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||XZ(r,[e.error,n])),fJ=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},hJ=(e,t)=>e.isLoading&&e.isFetching&&!t,y8=(e,t)=>e?.suspense&&t.isPending,SC=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function mJ({queries:e,...t},r){const n=zu(),i=oJ(),a=lJ(),s=w.useMemo(()=>e.map(v=>{const b=n.defaultQueryOptions(v);return b._optimisticResults=i?"isRestoring":"optimistic",b}),[e,n,i]);s.forEach(v=>{fJ(v),cJ(v,a)}),uJ(a);const[l]=w.useState(()=>new Dye(n,s,t)),[c,u,d]=l.getOptimisticResult(s,t.combine),f=!i&&t.subscribed!==!1;w.useSyncExternalStore(w.useCallback(v=>f?l.subscribe(xs.batchCalls(v)):Zl,[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),w.useEffect(()=>{l.setQueries(s,t)},[s,t,l]);const g=c.some((v,b)=>y8(s[b],v))?c.flatMap((v,b)=>{const E=s[b];if(E){const I=new YT(n,E);if(y8(E,v))return SC(E,I,a);hJ(v,i)&&SC(E,I,a)}return[]}):[];if(g.length>0)throw Promise.all(g);const A=c.find((v,b)=>{const E=s[b];return E&&dJ({result:v,errorResetBoundary:a,throwOnError:E.throwOnError,query:n.getQueryCache().get(E.queryHash),suspense:E.suspense})});if(A?.error)throw A.error;return u(d())}function Mye(e,t,r){const n=oJ(),i=lJ(),a=zu(),s=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(s),s._optimisticResults=n?"isRestoring":"optimistic",fJ(s),cJ(s,i),uJ(i);const l=!a.getQueryCache().get(s.queryHash),[c]=w.useState(()=>new t(a,s)),u=c.getOptimisticResult(s),d=!n&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(f=>{const m=d?c.subscribe(xs.batchCalls(f)):Zl;return c.updateResult(),m},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),w.useEffect(()=>{c.setOptions(s)},[s,c]),y8(s,u))throw SC(s,c,i);if(dJ({result:u,errorResetBoundary:i,throwOnError:s.throwOnError,query:a.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(s,u),s.experimental_prefetchInRender&&!e1&&hJ(u,n)&&(l?SC(s,c,i):a.getQueryCache().get(s.queryHash)?.promise)?.catch(Zl).finally(()=>{c.updateResult()}),s.notifyOnChangeProps?u:c.trackResult(u)}function Ar(e,t){return Mye(e,YT)}function Qye(e,t){const r=zu(),n=r.getQueryCache();return w.useSyncExternalStore(w.useCallback(i=>n.subscribe(xs.batchCalls(i)),[n]),()=>r.isFetching(e),()=>r.isFetching(e))}function qr(e,t){const r=zu(),[n]=w.useState(()=>new _ye(r,e));w.useEffect(()=>{n.setOptions(e)},[n,e]);const i=w.useSyncExternalStore(w.useCallback(s=>n.subscribe(xs.batchCalls(s)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=w.useCallback((s,l)=>{n.mutate(s,l).catch(Zl)},[n]);if(i.error&&XZ(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function Lye(){const e="https://apiparcapp.jrbxsolutions.com";if(e.trim()===""){const t="VITE_API_BASE_URL ou VITE_API_URL manquant : API non configurée. Veuillez définir cette variable d'environnement.";throw console.error("❌ ERREUR CRITIQUE:",t),new Error(t)}return e}function ch(e){if(e.startsWith("http://")||e.startsWith("https://"))return e;const t=Lye();console.log("[apiUrl] DEBUG:",{path:e,baseUrl:t,mode:"production",viteApiBaseUrl:"https://apiparcapp.jrbxsolutions.com",viteApiUrl:void 0});const r=e.startsWith("/")?e:`/${e}`;if(!t||t.trim()==="")throw console.error("[apiUrl] ERREUR: baseUrl est vide en production!"),new Error("VITE_API_BASE_URL manquant : API non configurée pour la production.");const i=`${t.endsWith("/")?t.slice(0,-1):t}${r}`;return console.log("[apiUrl] URL finale:",i),i}async function pJ(e){if(!e.ok){const t=e.clone();let r=e.statusText;try{const n=e.headers.get("content-type");if(n&&n.includes("application/json")){const i=await t.json();r=i.message||i.error||JSON.stringify(i)}else{const i=await t.text();i.trim().startsWith("async({queryKey:t})=>{const r=t.join("/"),n=r.startsWith("http")?r:ch(r),i=localStorage.getItem("parcapp_token"),a={};i&&(a.Authorization=`Bearer ${i}`);const s=await fetch(n,{headers:a,credentials:"include"});return await pJ(s),await s.json()},br=new Pye({defaultOptions:{queries:{queryFn:HA({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!0,refetchOnReconnect:!0,staleTime:0,retry:!1},mutations:{retry:!1}}});function Uye(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var r,n,i,a,s=[],l="",c=e.split("/");for(c[0]||c.shift();i=c.shift();)r=i[0],r==="*"?(s.push(r),l+=i[1]==="?"?"(?:/(.*))?":"/(.*)"):r===":"?(n=i.indexOf("?",1),a=i.indexOf(".",1),s.push(i.substring(1,~n?n:~a?a:i.length)),l+=~n&&!~a?"(?:/([^/]+?))?":"/([^/]+?)",~a&&(l+=(~n?"?":"")+"\\"+i.substring(a))):l+="/"+i;return{keys:s,pattern:new RegExp("^"+l+(t?"(?=$|/)":"/?$"),"i")}}var lN={exports:{}},cN={};var kQ;function $ye(){if(kQ)return cN;kQ=1;var e=ty();function t(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function l(f,m){var g=m(),A=n({inst:{value:g,getSnapshot:m}}),v=A[0].inst,b=A[1];return a(function(){v.value=g,v.getSnapshot=m,c(v)&&b({inst:v})},[f,g,m]),i(function(){return c(v)&&b({inst:v}),f(function(){c(v)&&b({inst:v})})},[f]),s(g),g}function c(f){var m=f.getSnapshot;f=f.value;try{var g=m();return!r(f,g)}catch{return!0}}function u(f,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return cN.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,cN}var _Q;function gJ(){return _Q||(_Q=1,lN.exports=$ye()),lN.exports}var zye=gJ();const Hye=Fb.useInsertionEffect,Wye=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gye=Wye?w.useLayoutEffect:w.useEffect,qye=Hye||Gye,AJ=e=>{const t=w.useRef([e,(...r)=>t[0](...r)]).current;return qye(()=>{t[0]=e}),t[1]},Kye="popstate",JT="pushState",XT="replaceState",Vye="hashchange",jQ=[Kye,JT,XT,Vye],Yye=e=>{for(const t of jQ)addEventListener(t,e);return()=>{for(const t of jQ)removeEventListener(t,e)}},vJ=(e,t)=>zye.useSyncExternalStore(Yye,e,t),DQ=()=>location.search,Zye=({ssrSearch:e}={})=>vJ(DQ,e!=null?()=>e:DQ),TQ=()=>location.pathname,Jye=({ssrPath:e}={})=>vJ(TQ,e!=null?()=>e:TQ),Xye=(e,{replace:t=!1,state:r=null}={})=>history[t?XT:JT](r,"",e),e2e=(e={})=>[Jye(e),Xye],PQ=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[PQ]>"u"){for(const e of[JT,XT]){const t=history[e];history[e]=function(){const r=t.apply(this,arguments),n=new Event(e);return n.arguments=arguments,dispatchEvent(n),r}}Object.defineProperty(window,PQ,{value:!0})}const t2e=(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())?"~"+t:t.slice(e.length)||"/",xJ=(e="")=>e==="/"?"":e,r2e=(e,t)=>e[0]==="~"?e.slice(1):xJ(t)+e,n2e=(e="",t)=>t2e(OQ(xJ(e)),OQ(t)),OQ=e=>{try{return decodeURI(e)}catch{return e}},yJ={hook:e2e,searchHook:Zye,parser:Uye,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e,aroundNav:(e,t,r)=>e(t,r)},bJ=w.createContext(yJ),ry=()=>w.useContext(bJ),wJ={},EJ=w.createContext(wJ),i2e=()=>w.useContext(EJ),y3=e=>{const[t,r]=e.hook(e);return[n2e(e.base,t),AJ((n,i)=>e.aroundNav(r,r2e(n,e.base),i))]},Ic=()=>y3(ry()),eP=(e,t,r,n)=>{const{pattern:i,keys:a}=t instanceof RegExp?{keys:!1,pattern:t}:e(t||"*",n),s=i.exec(r)||[],[l,...c]=s;return l!==void 0?[!0,(()=>{const u=a!==!1?Object.fromEntries(a.map((f,m)=>[f,c[m]])):s.groups;let d={...c};return u&&Object.assign(d,u),d})(),...n?[l]:[]]:[!1,null]},tP=e=>eP(ry().parser,e,Ic()[0]),a2e=({children:e,...t})=>{const r=ry(),n=t.hook?yJ:r;let i=n;const[a,s=t.ssrSearch??""]=t.ssrPath?.split("?")??[];a&&(t.ssrSearch=s,t.ssrPath=a),t.hrefs=t.hrefs??t.hook?.hrefs,t.searchHook=t.searchHook??t.hook?.searchHook;let l=w.useRef({}),c=l.current,u=c;for(let d in n){const f=d==="base"?n[d]+(t[d]??""):t[d]??n[d];c===u&&f!==u[d]&&(l.current=u={...u}),u[d]=f,(f!==n[d]||f!==i[d])&&(i=u)}return w.createElement(bJ.Provider,{value:i,children:e})},RQ=({children:e,component:t},r)=>t?w.createElement(t,{params:r}):typeof e=="function"?e(r):e,s2e=e=>{let t=w.useRef(wJ);const r=t.current;return t.current=Object.keys(e).length!==Object.keys(r).length||Object.entries(e).some(([n,i])=>i!==r[n])?e:r},So=({path:e,nest:t,match:r,...n})=>{const i=ry(),[a]=y3(i),[s,l,c]=r??eP(i.parser,e,a,t),u=s2e({...i2e(),...l});if(!s)return null;const d=c?w.createElement(a2e,{base:c},RQ(n,u)):RQ(n,u);return w.createElement(EJ.Provider,{value:u,children:d})},ny=w.forwardRef((e,t)=>{const r=ry(),[n,i]=y3(r),{to:a="",href:s=a,onClick:l,asChild:c,children:u,className:d,replace:f,state:m,transition:g,...A}=e,v=AJ(E=>{E.ctrlKey||E.metaKey||E.altKey||E.shiftKey||E.button!==0||(l?.(E),E.defaultPrevented||(E.preventDefault(),i(s,e)))}),b=r.hrefs(s[0]==="~"?s.slice(1):r.base+s,r);return c&&w.isValidElement(u)?w.cloneElement(u,{onClick:v,href:b}):w.createElement("a",{...A,onClick:v,href:b,className:d?.call?d(n===s):d,children:u,ref:t})}),CJ=e=>Array.isArray(e)?e.flatMap(t=>CJ(t&&t.type===w.Fragment?t.props.children:t)):[e],o2e=({children:e,location:t})=>{const r=ry(),[n]=y3(r);for(const i of CJ(e)){let a=0;if(w.isValidElement(i)&&(a=eP(r.parser,i.props.path,t||n,i.props.nest))[0])return w.cloneElement(i,{match:a})}return null},l2e=1,c2e=1e6;let uN=0;function u2e(){return uN=(uN+1)%Number.MAX_SAFE_INTEGER,uN.toString()}const dN=new Map,FQ=e=>{if(dN.has(e))return;const t=setTimeout(()=>{dN.delete(e),C2({type:"REMOVE_TOAST",toastId:e})},c2e);dN.set(e,t)},d2e=(e,t)=>{let r={toasts:[]};try{e&&typeof e=="object"&&e!==null?"toasts"in e&&Array.isArray(e.toasts)?r=e:r={toasts:[]}:r={toasts:[]}}catch(i){console.warn("Error in reducer state validation:",i),r={toasts:[]}}let n=[];try{if(r&&typeof r=="object"&&r!==null&&"toasts"in r){const i=r.toasts;Array.isArray(i)&&(n=i)}}catch(i){console.warn("Error getting safe toasts:",i),n=[]}switch(t.type){case"ADD_TOAST":return{...r,toasts:[t.toast,...n].slice(0,l2e)};case"UPDATE_TOAST":return{...r,toasts:n.map(i=>i.id===t.toast.id?{...i,...t.toast}:i)};case"DISMISS_TOAST":{const{toastId:i}=t;return i?FQ(i):n.forEach(a=>{FQ(a.id)}),{...r,toasts:n.map(a=>a.id===i||i===void 0?{...a,open:!1}:a)}}case"REMOVE_TOAST":return t.toastId===void 0?{...r,toasts:[]}:{...r,toasts:n.filter(i=>i.id!==t.toastId)}}},f2e=(()=>{let e=[];return{get:()=>(Array.isArray(e)||(e=[]),e),set:t=>{e=t}}})(),Uv=(()=>{let e={toasts:[]};return{get:()=>((!e||typeof e!="object"||!e.toasts||!Array.isArray(e.toasts))&&(e={toasts:[]}),e),set:t=>{t&&typeof t=="object"&&t.toasts&&Array.isArray(t.toasts)?e=t:e={toasts:[]}}}})();function b8(){return f2e.get()}function IJ(){const e={toasts:[]};try{const t=Uv.get();if(!t||typeof t!="object"||t===null||!("toasts"in t))return Uv.set(e),e;const r=t.toasts;return Array.isArray(r)?t:(Uv.set(e),e)}catch(t){return console.warn("Error getting memory state:",t),Uv.set(e),e}}function e4(e){Uv.set(e)}function C2(e){try{const t=IJ();if(!t||typeof t!="object"||t===null||!("toasts"in t)){console.warn("Invalid currentState in dispatch, using empty state"),e4({toasts:[]});return}const r=d2e(t,e);if(!r||typeof r!="object"||r===null||!("toasts"in r)||!Array.isArray(r.toasts)){console.warn("Invalid newState from reducer, using empty state"),e4({toasts:[]});return}e4(r);const n=b8();Array.isArray(n)&&n.forEach(i=>{try{i(r)}catch(a){console.warn("Error calling toast listener:",a)}})}catch(t){console.error("Error in dispatch:",t),e4({toasts:[]})}}function h2e({...e}){try{const t=u2e(),r=i=>{try{C2({type:"UPDATE_TOAST",toast:{...i,id:t}})}catch(a){console.warn("Error updating toast:",a)}},n=()=>{try{C2({type:"DISMISS_TOAST",toastId:t})}catch(i){console.warn("Error dismissing toast:",i)}};try{C2({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||n()}}})}catch(i){console.warn("Error adding toast:",i)}return{id:t,dismiss:n,update:r}}catch(t){return console.error("Error in toast function:",t),{id:"",dismiss:()=>{},update:()=>{}}}}function sn(){const[e,t]=w.useState({toasts:[]});return w.useEffect(()=>{try{const i=IJ();i&&typeof i=="object"&&i!==null&&"toasts"in i&&Array.isArray(i.toasts)&&t(i)}catch{}const n=t;try{const i=b8();if(Array.isArray(i))return i.push(n),()=>{try{const a=b8();if(Array.isArray(a)){const s=a.indexOf(n);s>-1&&a.splice(s,1)}}catch{}}}catch{}},[]),{toasts:e&&typeof e=="object"&&e!==null&&"toasts"in e&&Array.isArray(e.toasts)?e.toasts:[],toast:h2e,dismiss:n=>{try{C2({type:"DISMISS_TOAST",toastId:n})}catch{}}}}var Sm=YZ();const m2e=hi(Sm);function dr(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e?.(i),r===!1||!i.defaultPrevented)return t?.(i)}}function MQ(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function uh(...e){return t=>{let r=!1;const n=e.map(i=>{const a=MQ(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i{const{children:s,...l}=a,c=w.useMemo(()=>l,Object.values(l));return o.jsx(r.Provider,{value:c,children:s})};n.displayName=e+"Provider";function i(a){const s=w.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function Hu(e,t=[]){let r=[];function n(a,s){const l=w.createContext(s),c=r.length;r=[...r,s];const u=f=>{const{scope:m,children:g,...A}=f,v=m?.[e]?.[c]||l,b=w.useMemo(()=>A,Object.values(A));return o.jsx(v.Provider,{value:b,children:g})};u.displayName=a+"Provider";function d(f,m){const g=m?.[e]?.[c]||l,A=w.useContext(g);if(A)return A;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[u,d]}const i=()=>{const a=r.map(s=>w.createContext(s));return function(l){const c=l?.[e]||a;return w.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[n,g2e(i,...t)]}function g2e(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=n.reduce((l,{useScope:c,scopeName:u})=>{const f=c(a)[`__scope${u}`];return{...l,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function QQ(e){const t=A2e(e),r=w.forwardRef((n,i)=>{const{children:a,...s}=n,l=w.Children.toArray(a),c=l.find(x2e);if(c){const u=c.props.children,d=l.map(f=>f===c?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:f);return o.jsx(t,{...s,ref:i,children:w.isValidElement(u)?w.cloneElement(u,void 0,d):null})}return o.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function A2e(e){const t=w.forwardRef((r,n)=>{const{children:i,...a}=r;if(w.isValidElement(i)){const s=b2e(i),l=y2e(a,i.props);return i.type!==w.Fragment&&(l.ref=n?uh(n,s):s),w.cloneElement(i,l)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var v2e=Symbol("radix.slottable");function x2e(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===v2e}function y2e(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function b2e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function b3(e){const t=e+"CollectionProvider",[r,n]=Hu(t),[i,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:b,children:E}=v,I=gr.useRef(null),S=gr.useRef(new Map).current;return o.jsx(i,{scope:b,itemMap:S,collectionRef:I,children:E})};s.displayName=t;const l=e+"CollectionSlot",c=QQ(l),u=gr.forwardRef((v,b)=>{const{scope:E,children:I}=v,S=a(l,E),_=qn(b,S.collectionRef);return o.jsx(c,{ref:_,children:I})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=QQ(d),g=gr.forwardRef((v,b)=>{const{scope:E,children:I,...S}=v,_=gr.useRef(null),B=qn(b,_),T=a(d,E);return gr.useEffect(()=>(T.itemMap.set(_,{ref:_,...S}),()=>{T.itemMap.delete(_)})),o.jsx(m,{[f]:"",ref:B,children:I})});g.displayName=d;function A(v){const b=a(e+"CollectionConsumer",v);return gr.useCallback(()=>{const I=b.collectionRef.current;if(!I)return[];const S=Array.from(I.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((T,P)=>S.indexOf(T.ref.current)-S.indexOf(P.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:u,ItemSlot:g},A,n]}function w2e(e){const t=E2e(e),r=w.forwardRef((n,i)=>{const{children:a,...s}=n,l=w.Children.toArray(a),c=l.find(I2e);if(c){const u=c.props.children,d=l.map(f=>f===c?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:f);return o.jsx(t,{...s,ref:i,children:w.isValidElement(u)?w.cloneElement(u,void 0,d):null})}return o.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function E2e(e){const t=w.forwardRef((r,n)=>{const{children:i,...a}=r;if(w.isValidElement(i)){const s=B2e(i),l=S2e(a,i.props);return i.type!==w.Fragment&&(l.ref=n?uh(n,s):s),w.cloneElement(i,l)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var C2e=Symbol("radix.slottable");function I2e(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===C2e}function S2e(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function B2e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var N2e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],mn=N2e.reduce((e,t)=>{const r=w2e(`Primitive.${t}`),n=w.forwardRef((i,a)=>{const{asChild:s,...l}=i,c=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(c,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function rP(e,t){e&&Sm.flushSync(()=>e.dispatchEvent(t))}function Yc(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...r)=>t.current?.(...r),[])}function k2e(e,t=globalThis?.document){const r=Yc(e);w.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var _2e="DismissableLayer",w8="dismissableLayer.update",j2e="dismissableLayer.pointerDownOutside",D2e="dismissableLayer.focusOutside",LQ,SJ=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),N1=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,u=w.useContext(SJ),[d,f]=w.useState(null),m=d?.ownerDocument??globalThis?.document,[,g]=w.useState({}),A=qn(t,P=>f(P)),v=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),E=v.indexOf(b),I=d?v.indexOf(d):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,_=I>=E,B=P2e(P=>{const O=P.target,z=[...u.branches].some(L=>L.contains(O));!_||z||(i?.(P),s?.(P),P.defaultPrevented||l?.())},m),T=O2e(P=>{const O=P.target;[...u.branches].some(L=>L.contains(O))||(a?.(P),s?.(P),P.defaultPrevented||l?.())},m);return k2e(P=>{I===u.layers.size-1&&(n?.(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},m),w.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(LQ=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),UQ(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=LQ)}},[d,m,r,u]),w.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),UQ())},[d,u]),w.useEffect(()=>{const P=()=>g({});return document.addEventListener(w8,P),()=>document.removeEventListener(w8,P)},[]),o.jsx(mn.div,{...c,ref:A,style:{pointerEvents:S?_?"auto":"none":void 0,...e.style},onFocusCapture:dr(e.onFocusCapture,T.onFocusCapture),onBlurCapture:dr(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:dr(e.onPointerDownCapture,B.onPointerDownCapture)})});N1.displayName=_2e;var T2e="DismissableLayerBranch",BJ=w.forwardRef((e,t)=>{const r=w.useContext(SJ),n=w.useRef(null),i=qn(t,n);return w.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),o.jsx(mn.div,{...e,ref:i})});BJ.displayName=T2e;function P2e(e,t=globalThis?.document){const r=Yc(e),n=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let c=function(){NJ(j2e,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function O2e(e,t=globalThis?.document){const r=Yc(e),n=w.useRef(!1);return w.useEffect(()=>{const i=a=>{a.target&&!n.current&&NJ(D2e,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function UQ(){const e=new CustomEvent(w8);document.dispatchEvent(e)}function NJ(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?rP(i,a):i.dispatchEvent(a)}var R2e=N1,F2e=BJ,Fl=globalThis?.document?w.useLayoutEffect:()=>{},M2e="Portal",iy=w.forwardRef((e,t)=>{const{container:r,...n}=e,[i,a]=w.useState(!1);Fl(()=>a(!0),[]);const s=r||i&&globalThis?.document?.body;return s?m2e.createPortal(o.jsx(mn.div,{...n,ref:t}),s):null});iy.displayName=M2e;function Q2e(e,t){return w.useReducer((r,n)=>t[r][n]??r,e)}var Jc=e=>{const{present:t,children:r}=e,n=L2e(t),i=typeof r=="function"?r({present:n.isPresent}):w.Children.only(r),a=qn(n.ref,U2e(i));return typeof r=="function"||n.isPresent?w.cloneElement(i,{ref:a}):null};Jc.displayName="Presence";function L2e(e){const[t,r]=w.useState(),n=w.useRef(null),i=w.useRef(e),a=w.useRef("none"),s=e?"mounted":"unmounted",[l,c]=Q2e(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=t4(n.current);a.current=l==="mounted"?u:"none"},[l]),Fl(()=>{const u=n.current,d=i.current;if(d!==e){const m=a.current,g=t4(u);e?c("MOUNT"):g==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&m!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Fl(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=g=>{const v=t4(n.current).includes(CSS.escape(g.animationName));if(g.target===t&&v&&(c("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=g=>{g.target===t&&(a.current=t4(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:w.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function t4(e){return e?.animationName||"none"}function U2e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var $2e=Fb[" useInsertionEffect ".trim().toString()]||Fl;function Hf({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,s]=z2e({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:i;{const d=w.useRef(e!==void 0);w.useEffect(()=>{const f=d.current;f!==l&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,n])}const u=w.useCallback(d=>{if(l){const f=H2e(d)?d(e):d;f!==e&&s.current?.(f)}else a(d)},[l,e,a,s]);return[c,u]}function z2e({defaultProp:e,onChange:t}){const[r,n]=w.useState(e),i=w.useRef(r),a=w.useRef(t);return $2e(()=>{a.current=t},[t]),w.useEffect(()=>{i.current!==r&&(a.current?.(r),i.current=r)},[r,i]),[r,n,a]}function H2e(e){return typeof e=="function"}var kJ=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),W2e="VisuallyHidden",w3=w.forwardRef((e,t)=>o.jsx(mn.span,{...e,ref:t,style:{...kJ,...e.style}}));w3.displayName=W2e;var G2e=w3,nP="ToastProvider",[iP,q2e,K2e]=b3("Toast"),[_J]=Hu("Toast",[K2e]),[V2e,E3]=_J(nP),jJ=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:i="right",swipeThreshold:a=50,children:s}=e,[l,c]=w.useState(null),[u,d]=w.useState(0),f=w.useRef(!1),m=w.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${nP}\`. Expected non-empty \`string\`.`),o.jsx(iP.Provider,{scope:t,children:o.jsx(V2e,{scope:t,label:r,duration:n,swipeDirection:i,swipeThreshold:a,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:w.useCallback(()=>d(g=>g+1),[]),onToastRemove:w.useCallback(()=>d(g=>g-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:m,children:s})})};jJ.displayName=nP;var DJ="ToastViewport",Y2e=["F8"],E8="toast.viewportPause",C8="toast.viewportResume",TJ=w.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Y2e,label:i="Notifications ({hotkey})",...a}=e,s=E3(DJ,r),l=q2e(r),c=w.useRef(null),u=w.useRef(null),d=w.useRef(null),f=w.useRef(null),m=qn(t,f,s.onViewportChange),g=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=s.toastCount>0;w.useEffect(()=>{const b=E=>{n.length!==0&&n.every(S=>E[S]||E.code===S)&&f.current?.focus()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]),w.useEffect(()=>{const b=c.current,E=f.current;if(A&&b&&E){const I=()=>{if(!s.isClosePausedRef.current){const T=new CustomEvent(E8);E.dispatchEvent(T),s.isClosePausedRef.current=!0}},S=()=>{if(s.isClosePausedRef.current){const T=new CustomEvent(C8);E.dispatchEvent(T),s.isClosePausedRef.current=!1}},_=T=>{!b.contains(T.relatedTarget)&&S()},B=()=>{b.contains(document.activeElement)||S()};return b.addEventListener("focusin",I),b.addEventListener("focusout",_),b.addEventListener("pointermove",I),b.addEventListener("pointerleave",B),window.addEventListener("blur",I),window.addEventListener("focus",S),()=>{b.removeEventListener("focusin",I),b.removeEventListener("focusout",_),b.removeEventListener("pointermove",I),b.removeEventListener("pointerleave",B),window.removeEventListener("blur",I),window.removeEventListener("focus",S)}}},[A,s.isClosePausedRef]);const v=w.useCallback(({tabbingDirection:b})=>{const I=l().map(S=>{const _=S.ref.current,B=[_,...cbe(_)];return b==="forwards"?B:B.reverse()});return(b==="forwards"?I.reverse():I).flat()},[l]);return w.useEffect(()=>{const b=f.current;if(b){const E=I=>{const S=I.altKey||I.ctrlKey||I.metaKey;if(I.key==="Tab"&&!S){const B=document.activeElement,T=I.shiftKey;if(I.target===b&&T){u.current?.focus();return}const z=v({tabbingDirection:T?"backwards":"forwards"}),L=z.findIndex(W=>W===B);fN(z.slice(L+1))?I.preventDefault():T?u.current?.focus():d.current?.focus()}};return b.addEventListener("keydown",E),()=>b.removeEventListener("keydown",E)}},[l,v]),o.jsxs(F2e,{ref:c,role:"region","aria-label":i.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:A?void 0:"none"},children:[A&&o.jsx(I8,{ref:u,onFocusFromOutsideViewport:()=>{const b=v({tabbingDirection:"forwards"});fN(b)}}),o.jsx(iP.Slot,{scope:r,children:o.jsx(mn.ol,{tabIndex:-1,...a,ref:m})}),A&&o.jsx(I8,{ref:d,onFocusFromOutsideViewport:()=>{const b=v({tabbingDirection:"backwards"});fN(b)}})]})});TJ.displayName=DJ;var PJ="ToastFocusProxy",I8=w.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...i}=e,a=E3(PJ,r);return o.jsx(w3,{tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:s=>{const l=s.relatedTarget;!a.viewport?.contains(l)&&n()}})});I8.displayName=PJ;var Mb="Toast",Z2e="toast.swipeStart",J2e="toast.swipeMove",X2e="toast.swipeCancel",ebe="toast.swipeEnd",OJ=w.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:i,onOpenChange:a,...s}=e,[l,c]=Hf({prop:n,defaultProp:i??!0,onChange:a,caller:Mb});return o.jsx(Jc,{present:r||l,children:o.jsx(nbe,{open:l,...s,ref:t,onClose:()=>c(!1),onPause:Yc(e.onPause),onResume:Yc(e.onResume),onSwipeStart:dr(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:dr(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:dr(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:dr(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});OJ.displayName=Mb;var[tbe,rbe]=_J(Mb,{onClose(){}}),nbe=w.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:i,open:a,onClose:s,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:m,onSwipeEnd:g,...A}=e,v=E3(Mb,r),[b,E]=w.useState(null),I=qn(t,X=>E(X)),S=w.useRef(null),_=w.useRef(null),B=i||v.duration,T=w.useRef(0),P=w.useRef(B),O=w.useRef(0),{onToastAdd:z,onToastRemove:L}=v,W=Yc(()=>{b?.contains(document.activeElement)&&v.viewport?.focus(),s()}),R=w.useCallback(X=>{!X||X===1/0||(window.clearTimeout(O.current),T.current=new Date().getTime(),O.current=window.setTimeout(W,X))},[W]);w.useEffect(()=>{const X=v.viewport;if(X){const Z=()=>{R(P.current),u?.()},K=()=>{const q=new Date().getTime()-T.current;P.current=P.current-q,window.clearTimeout(O.current),c?.()};return X.addEventListener(E8,K),X.addEventListener(C8,Z),()=>{X.removeEventListener(E8,K),X.removeEventListener(C8,Z)}}},[v.viewport,B,c,u,R]),w.useEffect(()=>{a&&!v.isClosePausedRef.current&&R(B)},[a,B,v.isClosePausedRef,R]),w.useEffect(()=>(z(),()=>L()),[z,L]);const $=w.useMemo(()=>b?$J(b):null,[b]);return v.viewport?o.jsxs(o.Fragment,{children:[$&&o.jsx(ibe,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite",children:$}),o.jsx(tbe,{scope:r,onClose:W,children:Sm.createPortal(o.jsx(iP.ItemSlot,{scope:r,children:o.jsx(R2e,{asChild:!0,onEscapeKeyDown:dr(l,()=>{v.isFocusedToastEscapeKeyDownRef.current||W(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:o.jsx(mn.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":v.swipeDirection,...A,ref:I,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:dr(e.onKeyDown,X=>{X.key==="Escape"&&(l?.(X.nativeEvent),X.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,W()))}),onPointerDown:dr(e.onPointerDown,X=>{X.button===0&&(S.current={x:X.clientX,y:X.clientY})}),onPointerMove:dr(e.onPointerMove,X=>{if(!S.current)return;const Z=X.clientX-S.current.x,K=X.clientY-S.current.y,q=!!_.current,Y=["left","right"].includes(v.swipeDirection),ne=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,ge=Y?ne(0,Z):0,ae=Y?0:ne(0,K),pe=X.pointerType==="touch"?10:2,_e={x:ge,y:ae},we={originalEvent:X,delta:_e};q?(_.current=_e,r4(J2e,f,we,{discrete:!1})):$Q(_e,v.swipeDirection,pe)?(_.current=_e,r4(Z2e,d,we,{discrete:!1}),X.target.setPointerCapture(X.pointerId)):(Math.abs(Z)>pe||Math.abs(K)>pe)&&(S.current=null)}),onPointerUp:dr(e.onPointerUp,X=>{const Z=_.current,K=X.target;if(K.hasPointerCapture(X.pointerId)&&K.releasePointerCapture(X.pointerId),_.current=null,S.current=null,Z){const q=X.currentTarget,Y={originalEvent:X,delta:Z};$Q(Z,v.swipeDirection,v.swipeThreshold)?r4(ebe,g,Y,{discrete:!0}):r4(X2e,m,Y,{discrete:!0}),q.addEventListener("click",ne=>ne.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),ibe=e=>{const{__scopeToast:t,children:r,...n}=e,i=E3(Mb,t),[a,s]=w.useState(!1),[l,c]=w.useState(!1);return obe(()=>s(!0)),w.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:o.jsx(iy,{asChild:!0,children:o.jsx(w3,{...n,children:a&&o.jsxs(o.Fragment,{children:[i.label," ",r]})})})},abe="ToastTitle",RJ=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return o.jsx(mn.div,{...n,ref:t})});RJ.displayName=abe;var sbe="ToastDescription",FJ=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return o.jsx(mn.div,{...n,ref:t})});FJ.displayName=sbe;var MJ="ToastAction",QJ=w.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?o.jsx(UJ,{altText:r,asChild:!0,children:o.jsx(aP,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${MJ}\`. Expected non-empty \`string\`.`),null)});QJ.displayName=MJ;var LJ="ToastClose",aP=w.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,i=rbe(LJ,r);return o.jsx(UJ,{asChild:!0,children:o.jsx(mn.button,{type:"button",...n,ref:t,onClick:dr(e.onClick,i.onClose)})})});aP.displayName=LJ;var UJ=w.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...i}=e;return o.jsx(mn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...i,ref:t})});function $J(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),lbe(n)){const i=n.ariaHidden||n.hidden||n.style.display==="none",a=n.dataset.radixToastAnnounceExclude==="";if(!i)if(a){const s=n.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...$J(n))}}),t}function r4(e,t,r,{discrete:n}){const i=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?rP(i,a):i.dispatchEvent(a)}var $Q=(e,t,r=0)=>{const n=Math.abs(e.x),i=Math.abs(e.y),a=n>i;return t==="left"||t==="right"?a&&n>r:!a&&i>r};function obe(e=()=>{}){const t=Yc(e);Fl(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function lbe(e){return e.nodeType===e.ELEMENT_NODE}function cbe(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function fN(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var ube=jJ,zJ=TJ,HJ=OJ,WJ=RJ,GJ=FJ,qJ=QJ,KJ=aP;function VJ(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,HQ=vi,k1=(e,t)=>r=>{var n;if(t?.variants==null)return HQ(e,r?.class,r?.className);const{variants:i,defaultVariants:a}=t,s=Object.keys(i).map(u=>{const d=r?.[u],f=a?.[u];if(d===null)return null;const m=zQ(d)||zQ(f);return i[u][m]}),l=r&&Object.entries(r).reduce((u,d)=>{let[f,m]=d;return m===void 0||(u[f]=m),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:f,className:m,...g}=d;return Object.entries(g).every(A=>{let[v,b]=A;return Array.isArray(b)?b.includes({...a,...l}[v]):{...a,...l}[v]===b})?[...u,f,m]:u},[]);return HQ(e,s,c,r?.class,r?.className)};const dbe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),YJ=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();var fbe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const hbe=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:s,...l},c)=>w.createElement("svg",{ref:c,...fbe,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:YJ("lucide",i),...l},[...s.map(([u,d])=>w.createElement(u,d)),...Array.isArray(a)?a:[a]]));const Er=(e,t)=>{const r=w.forwardRef(({className:n,...i},a)=>w.createElement(hbe,{ref:a,iconNode:t,className:YJ(`lucide-${dbe(e)}`,n),...i}));return r.displayName=`${e}`,r};const P0=Er("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const BC=Er("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const NC=Er("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);const tc=Er("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const _u=Er("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);const sP=Er("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const ZJ=Er("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const mbe=Er("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const JJ=Er("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const pbe=Er("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const r1=Er("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const n4=Er("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const es=Er("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const yx=Er("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const C3=Er("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);const ay=Er("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const I3=Er("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const kC=Er("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const XJ=Er("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);const hN=Er("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);const eX=Er("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);const gbe=Er("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);const Abe=Er("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const oP=Er("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const S8=Er("FileSpreadsheet",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]]);const ng=Er("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const WQ=Er("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]);const _C=Er("Fuel",[["line",{x1:"3",x2:"15",y1:"22",y2:"22",key:"xegly4"}],["line",{x1:"4",x2:"14",y1:"9",y2:"9",key:"xcnuvu"}],["path",{d:"M14 22V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v18",key:"16j0yd"}],["path",{d:"M14 13h2a2 2 0 0 1 2 2v2a2 2 0 0 0 2 2a2 2 0 0 0 2-2V9.83a2 2 0 0 0-.59-1.42L18 5",key:"7cu91f"}]]);const Qb=Er("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);const lP=Er("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);const vbe=Er("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const tX=Er("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);const rX=Er("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);const xbe=Er("Link2Off",[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);const Lb=Er("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);const ybe=Er("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);const wr=Er("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const bbe=Er("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);const cP=Er("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);const rs=Er("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);const D0=Er("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);const mN=Er("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);const bd=Er("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const wbe=Er("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);const jC=Er("Navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);const uo=Er("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);const Ebe=Er("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);const Lf=Er("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const Cbe=Er("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);const Ma=Er("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Ibe=Er("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);const bx=Er("Receipt",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]]);const Sbe=Er("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);const Bbe=Er("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const Nbe=Er("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const U0=Er("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const _1=Er("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const S3=Er("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);const uP=Er("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const kbe=Er("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);const fo=Er("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const _be=Er("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);const B8=Er("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);const Vp=Er("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Do=Er("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);const N8=Er("Unlink",[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]]);const Pd=Er("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);const sy=Er("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);const Uf=Er("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);const Q2=Er("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);const jbe=Er("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);const Dbe=Er("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);const Tbe=Er("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const dP=Er("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);const G0=Er("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const B3=Er("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),fP="-",Pbe=e=>{const t=Rbe(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const l=s.split(fP);return l[0]===""&&l.length!==1&&l.shift(),nX(l,t)||Obe(s)},getConflictingClassGroupIds:(s,l)=>{const c=r[s]||[];return l&&n[s]?[...c,...n[s]]:c}}},nX=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?nX(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(fP);return t.validators.find(({validator:s})=>s(a))?.classGroupId},GQ=/^\[(.+)\]$/,Obe=e=>{if(GQ.test(e)){const t=GQ.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Rbe=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Mbe(Object.entries(e.classGroups),r).forEach(([a,s])=>{k8(s,n,a,t)}),n},k8=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:qQ(t,i);a.classGroupId=r;return}if(typeof i=="function"){if(Fbe(i)){k8(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([a,s])=>{k8(s,qQ(t,a),r,n)})})},qQ=(e,t)=>{let r=e;return t.split(fP).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Fbe=e=>e.isThemeGetter,Mbe=(e,t)=>t?e.map(([r,n])=>{const i=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,l])=>[t+s,l])):a);return[r,i]}):e,Qbe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(a,s)=>{r.set(a,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let s=r.get(a);if(s!==void 0)return s;if((s=n.get(a))!==void 0)return i(a,s),s},set(a,s){r.has(a)?r.set(a,s):i(a,s)}}},iX="!",Lbe=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],a=t.length,s=l=>{const c=[];let u=0,d=0,f;for(let b=0;bd?f-d:void 0;return{modifiers:c,hasImportantModifier:g,baseClassName:A,maybePostfixModifierPosition:v}};return r?l=>r({className:l,parseClassName:s}):s},Ube=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},$be=e=>({cache:Qbe(e.cacheSize),parseClassName:Lbe(e),...Pbe(e)}),zbe=/\s+/,Hbe=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,a=[],s=e.trim().split(zbe);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{modifiers:d,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:g}=r(u);let A=!!g,v=n(A?m.substring(0,g):m);if(!v){if(!A){l=u+(l.length>0?" "+l:l);continue}if(v=n(m),!v){l=u+(l.length>0?" "+l:l);continue}A=!1}const b=Ube(d).join(":"),E=f?b+iX:b,I=E+v;if(a.includes(I))continue;a.push(I);const S=i(v,A);for(let _=0;_0?" "+l:l)}return l};function Wbe(){let e=0,t,r,n="";for(;e{if(typeof e=="string")return e;let t,r="";for(let n=0;nf(d),e());return r=$be(u),n=r.cache.get,i=r.cache.set,a=l,l(c)}function l(c){const u=n(c);if(u)return u;const d=Hbe(c,r);return i(c,d),d}return function(){return a(Wbe.apply(null,arguments))}}const Ra=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},sX=/^\[(?:([a-z-]+):)?(.+)\]$/i,qbe=/^\d+\/\d+$/,Kbe=new Set(["px","full","screen"]),Vbe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ybe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Zbe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Jbe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xbe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Uh=e=>tx(e)||Kbe.has(e)||qbe.test(e),bp=e=>oy(e,"length",owe),tx=e=>!!e&&!Number.isNaN(Number(e)),pN=e=>oy(e,"number",tx),Ky=e=>!!e&&Number.isInteger(Number(e)),ewe=e=>e.endsWith("%")&&tx(e.slice(0,-1)),jn=e=>sX.test(e),wp=e=>Vbe.test(e),twe=new Set(["length","size","percentage"]),rwe=e=>oy(e,twe,oX),nwe=e=>oy(e,"position",oX),iwe=new Set(["image","url"]),awe=e=>oy(e,iwe,cwe),swe=e=>oy(e,"",lwe),Vy=()=>!0,oy=(e,t,r)=>{const n=sX.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},owe=e=>Ybe.test(e)&&!Zbe.test(e),oX=()=>!1,lwe=e=>Jbe.test(e),cwe=e=>Xbe.test(e),uwe=()=>{const e=Ra("colors"),t=Ra("spacing"),r=Ra("blur"),n=Ra("brightness"),i=Ra("borderColor"),a=Ra("borderRadius"),s=Ra("borderSpacing"),l=Ra("borderWidth"),c=Ra("contrast"),u=Ra("grayscale"),d=Ra("hueRotate"),f=Ra("invert"),m=Ra("gap"),g=Ra("gradientColorStops"),A=Ra("gradientColorStopPositions"),v=Ra("inset"),b=Ra("margin"),E=Ra("opacity"),I=Ra("padding"),S=Ra("saturate"),_=Ra("scale"),B=Ra("sepia"),T=Ra("skew"),P=Ra("space"),O=Ra("translate"),z=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto",jn,t],R=()=>[jn,t],$=()=>["",Uh,bp],X=()=>["auto",tx,jn],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",jn],ge=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ae=()=>[tx,jn];return{cacheSize:500,separator:":",theme:{colors:[Vy],spacing:[Uh,bp],blur:["none","",wp,jn],brightness:ae(),borderColor:[e],borderRadius:["none","","full",wp,jn],borderSpacing:R(),borderWidth:$(),contrast:ae(),grayscale:ne(),hueRotate:ae(),invert:ne(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[ewe,bp],inset:W(),margin:W(),opacity:ae(),padding:R(),saturate:ae(),scale:ae(),sepia:ne(),skew:ae(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",jn]}],container:["container"],columns:[{columns:[wp]}],"break-after":[{"break-after":ge()}],"break-before":[{"break-before":ge()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),jn]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ky,jn]}],basis:[{basis:W()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",jn]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",Ky,jn]}],"grid-cols":[{"grid-cols":[Vy]}],"col-start-end":[{col:["auto",{span:["full",Ky,jn]},jn]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[Vy]}],"row-start-end":[{row:["auto",{span:[Ky,jn]},jn]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",jn]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",jn]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",jn,t]}],"min-w":[{"min-w":[jn,t,"min","max","fit"]}],"max-w":[{"max-w":[jn,t,"none","full","min","max","fit","prose",{screen:[wp]},wp]}],h:[{h:[jn,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[jn,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[jn,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[jn,t,"auto","min","max","fit"]}],"font-size":[{text:["base",wp,bp]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pN]}],"font-family":[{font:[Vy]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",jn]}],"line-clamp":[{"line-clamp":["none",tx,pN]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Uh,jn]}],"list-image":[{"list-image":["none",jn]}],"list-style-type":[{list:["none","disc","decimal",jn]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Uh,bp]}],"underline-offset":[{"underline-offset":["auto",Uh,jn]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",jn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",jn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),nwe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",rwe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},awe]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...K(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:K()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...K()]}],"outline-offset":[{"outline-offset":[Uh,jn]}],"outline-w":[{outline:[Uh,bp]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[Uh,bp]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",wp,swe]}],"shadow-color":[{shadow:[Vy]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",wp,jn]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[S]}],sepia:[{sepia:[B]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",jn]}],duration:[{duration:ae()}],ease:[{ease:["linear","in","out","in-out",jn]}],delay:[{delay:ae()}],animate:[{animate:["none","spin","ping","pulse","bounce",jn]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Ky,jn]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",jn]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",jn]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",jn]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Uh,bp,pN]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},dwe=Gbe(uwe);function qt(...e){return dwe(vi(e))}const fwe=ube,lX=w.forwardRef(({className:e,...t},r)=>o.jsx(zJ,{ref:r,className:qt("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));lX.displayName=zJ.displayName;const hwe=k1("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),cX=w.forwardRef(({className:e,variant:t,...r},n)=>o.jsx(HJ,{ref:n,className:qt(hwe({variant:t}),e),...r}));cX.displayName=HJ.displayName;const mwe=w.forwardRef(({className:e,...t},r)=>o.jsx(qJ,{ref:r,className:qt("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));mwe.displayName=qJ.displayName;const uX=w.forwardRef(({className:e,...t},r)=>o.jsx(KJ,{ref:r,className:qt("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:o.jsx(G0,{className:"h-4 w-4"})}));uX.displayName=KJ.displayName;const dX=w.forwardRef(({className:e,...t},r)=>o.jsx(WJ,{ref:r,className:qt("text-sm font-semibold",e),...t}));dX.displayName=WJ.displayName;const fX=w.forwardRef(({className:e,...t},r)=>o.jsx(GJ,{ref:r,className:qt("text-sm opacity-90",e),...t}));fX.displayName=GJ.displayName;function hX(){const{toasts:e}=sn();return o.jsxs(fwe,{children:[(e||[]).map(function({id:t,title:r,description:n,action:i,...a}){return o.jsxs(cX,{...a,children:[o.jsxs("div",{className:"grid gap-1",children:[r&&o.jsx(dX,{children:r}),n&&o.jsx(fX,{children:n})]}),i,o.jsx(uX,{})]},t)}),o.jsx(lX,{})]})}var pwe=Fb[" useId ".trim().toString()]||(()=>{}),gwe=0;function R0(e){const[t,r]=w.useState(pwe());return Fl(()=>{r(n=>n??String(gwe++))},[e]),t?`radix-${t}`:""}const Awe=["top","right","bottom","left"],ig=Math.min,Du=Math.max,DC=Math.round,i4=Math.floor,$f=e=>({x:e,y:e}),vwe={left:"right",right:"left",bottom:"top",top:"bottom"},xwe={start:"end",end:"start"};function _8(e,t,r){return Du(e,ig(t,r))}function fm(e,t){return typeof e=="function"?e(t):e}function hm(e){return e.split("-")[0]}function ly(e){return e.split("-")[1]}function hP(e){return e==="x"?"y":"x"}function mP(e){return e==="y"?"height":"width"}const ywe=new Set(["top","bottom"]);function Df(e){return ywe.has(hm(e))?"y":"x"}function pP(e){return hP(Df(e))}function bwe(e,t,r){r===void 0&&(r=!1);const n=ly(e),i=pP(e),a=mP(i);let s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=TC(s)),[s,TC(s)]}function wwe(e){const t=TC(e);return[j8(e),t,j8(t)]}function j8(e){return e.replace(/start|end/g,t=>xwe[t])}const KQ=["left","right"],VQ=["right","left"],Ewe=["top","bottom"],Cwe=["bottom","top"];function Iwe(e,t,r){switch(e){case"top":case"bottom":return r?t?VQ:KQ:t?KQ:VQ;case"left":case"right":return t?Ewe:Cwe;default:return[]}}function Swe(e,t,r,n){const i=ly(e);let a=Iwe(hm(e),r==="start",n);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(j8)))),a}function TC(e){return e.replace(/left|right|bottom|top/g,t=>vwe[t])}function Bwe(e){return{top:0,right:0,bottom:0,left:0,...e}}function mX(e){return typeof e!="number"?Bwe(e):{top:e,right:e,bottom:e,left:e}}function PC(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function YQ(e,t,r){let{reference:n,floating:i}=e;const a=Df(t),s=pP(t),l=mP(s),c=hm(t),u=a==="y",d=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,m=n[l]/2-i[l]/2;let g;switch(c){case"top":g={x:d,y:n.y-i.height};break;case"bottom":g={x:d,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:f};break;case"left":g={x:n.x-i.width,y:f};break;default:g={x:n.x,y:n.y}}switch(ly(t)){case"start":g[s]-=m*(r&&u?-1:1);break;case"end":g[s]+=m*(r&&u?-1:1);break}return g}const Nwe=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=r,l=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=YQ(u,n,c),m=n,g={},A=0;for(let v=0;v({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:a,platform:s,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=fm(e,t)||{};if(u==null)return{};const f=mX(d),m={x:r,y:n},g=pP(i),A=mP(g),v=await s.getDimensions(u),b=g==="y",E=b?"top":"left",I=b?"bottom":"right",S=b?"clientHeight":"clientWidth",_=a.reference[A]+a.reference[g]-m[g]-a.floating[A],B=m[g]-a.reference[g],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let P=T?T[S]:0;(!P||!await(s.isElement==null?void 0:s.isElement(T)))&&(P=l.floating[S]||a.floating[A]);const O=_/2-B/2,z=P/2-v[A]/2-1,L=ig(f[E],z),W=ig(f[I],z),R=L,$=P-v[A]-W,X=P/2-v[A]/2+O,Z=_8(R,X,$),K=!c.arrow&&ly(i)!=null&&X!==Z&&a.reference[A]/2-(XX<=0)){var W,R;const X=(((W=a.flip)==null?void 0:W.index)||0)+1,Z=P[X];if(Z&&(!(f==="alignment"?I!==Df(Z):!1)||L.every(Y=>Df(Y.placement)===I?Y.overflows[0]>0:!0)))return{data:{index:X,overflows:L},reset:{placement:Z}};let K=(R=L.filter(q=>q.overflows[0]<=0).sort((q,Y)=>q.overflows[1]-Y.overflows[1])[0])==null?void 0:R.placement;if(!K)switch(g){case"bestFit":{var $;const q=($=L.filter(Y=>{if(T){const ne=Df(Y.placement);return ne===I||ne==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(ne=>ne>0).reduce((ne,ge)=>ne+ge,0)]).sort((Y,ne)=>Y[1]-ne[1])[0])==null?void 0:$[0];q&&(K=q);break}case"initialPlacement":K=l;break}if(i!==K)return{reset:{placement:K}}}return{}}}};function ZQ(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JQ(e){return Awe.some(t=>e[t]>=0)}const jwe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...i}=fm(e,t);switch(n){case"referenceHidden":{const a=await L2(t,{...i,elementContext:"reference"}),s=ZQ(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:JQ(s)}}}case"escaped":{const a=await L2(t,{...i,altBoundary:!0}),s=ZQ(a,r.floating);return{data:{escapedOffsets:s,escaped:JQ(s)}}}default:return{}}}}},pX=new Set(["left","top"]);async function Dwe(e,t){const{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=hm(r),l=ly(r),c=Df(r)==="y",u=pX.has(s)?-1:1,d=a&&c?-1:1,f=fm(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:A}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof A=="number"&&(g=l==="end"?A*-1:A),c?{x:g*d,y:m*u}:{x:m*u,y:g*d}}const Twe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:a,placement:s,middlewareData:l}=t,c=await Dwe(t,e);return s===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:s}}}}},Pwe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x:E,y:I}=b;return{x:E,y:I}}},...c}=fm(e,t),u={x:r,y:n},d=await L2(t,c),f=Df(hm(i)),m=hP(f);let g=u[m],A=u[f];if(a){const b=m==="y"?"top":"left",E=m==="y"?"bottom":"right",I=g+d[b],S=g-d[E];g=_8(I,g,S)}if(s){const b=f==="y"?"top":"left",E=f==="y"?"bottom":"right",I=A+d[b],S=A-d[E];A=_8(I,A,S)}const v=l.fn({...t,[m]:g,[f]:A});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[m]:a,[f]:s}}}}}},Owe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:a,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=fm(e,t),d={x:r,y:n},f=Df(i),m=hP(f);let g=d[m],A=d[f];const v=fm(l,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const S=m==="y"?"height":"width",_=a.reference[m]-a.floating[S]+b.mainAxis,B=a.reference[m]+a.reference[S]-b.mainAxis;g<_?g=_:g>B&&(g=B)}if(u){var E,I;const S=m==="y"?"width":"height",_=pX.has(hm(i)),B=a.reference[f]-a.floating[S]+(_&&((E=s.offset)==null?void 0:E[f])||0)+(_?0:b.crossAxis),T=a.reference[f]+a.reference[S]+(_?0:((I=s.offset)==null?void 0:I[f])||0)-(_?b.crossAxis:0);AT&&(A=T)}return{[m]:g,[f]:A}}}},Rwe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:a,platform:s,elements:l}=t,{apply:c=()=>{},...u}=fm(e,t),d=await L2(t,u),f=hm(i),m=ly(i),g=Df(i)==="y",{width:A,height:v}=a.floating;let b,E;f==="top"||f==="bottom"?(b=f,E=m===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(E=f,b=m==="end"?"top":"bottom");const I=v-d.top-d.bottom,S=A-d.left-d.right,_=ig(v-d[b],I),B=ig(A-d[E],S),T=!t.middlewareData.shift;let P=_,O=B;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(O=S),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(P=I),T&&!m){const L=Du(d.left,0),W=Du(d.right,0),R=Du(d.top,0),$=Du(d.bottom,0);g?O=A-2*(L!==0||W!==0?L+W:Du(d.left,d.right)):P=v-2*(R!==0||$!==0?R+$:Du(d.top,d.bottom))}await c({...t,availableWidth:O,availableHeight:P});const z=await s.getDimensions(l.floating);return A!==z.width||v!==z.height?{reset:{rects:!0}}:{}}}};function N3(){return typeof window<"u"}function cy(e){return gX(e)?(e.nodeName||"").toLowerCase():"#document"}function Ru(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function dh(e){var t;return(t=(gX(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gX(e){return N3()?e instanceof Node||e instanceof Ru(e).Node:!1}function Od(e){return N3()?e instanceof Element||e instanceof Ru(e).Element:!1}function Wf(e){return N3()?e instanceof HTMLElement||e instanceof Ru(e).HTMLElement:!1}function XQ(e){return!N3()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ru(e).ShadowRoot}const Fwe=new Set(["inline","contents"]);function Ub(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Rd(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Fwe.has(i)}const Mwe=new Set(["table","td","th"]);function Qwe(e){return Mwe.has(cy(e))}const Lwe=[":popover-open",":modal"];function k3(e){return Lwe.some(t=>{try{return e.matches(t)}catch{return!1}})}const Uwe=["transform","translate","scale","rotate","perspective"],$we=["transform","translate","scale","rotate","perspective","filter"],zwe=["paint","layout","strict","content"];function gP(e){const t=AP(),r=Od(e)?Rd(e):e;return Uwe.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||$we.some(n=>(r.willChange||"").includes(n))||zwe.some(n=>(r.contain||"").includes(n))}function Hwe(e){let t=ag(e);for(;Wf(t)&&!wx(t);){if(gP(t))return t;if(k3(t))return null;t=ag(t)}return null}function AP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Wwe=new Set(["html","body","#document"]);function wx(e){return Wwe.has(cy(e))}function Rd(e){return Ru(e).getComputedStyle(e)}function _3(e){return Od(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ag(e){if(cy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||XQ(e)&&e.host||dh(e);return XQ(t)?t.host:t}function AX(e){const t=ag(e);return wx(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wf(t)&&Ub(t)?t:AX(t)}function U2(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=AX(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),s=Ru(i);if(a){const l=D8(s);return t.concat(s,s.visualViewport||[],Ub(i)?i:[],l&&r?U2(l):[])}return t.concat(i,U2(i,[],r))}function D8(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vX(e){const t=Rd(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=Wf(e),a=i?e.offsetWidth:r,s=i?e.offsetHeight:n,l=DC(r)!==a||DC(n)!==s;return l&&(r=a,n=s),{width:r,height:n,$:l}}function vP(e){return Od(e)?e:e.contextElement}function rx(e){const t=vP(e);if(!Wf(t))return $f(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=vX(t);let s=(a?DC(r.width):r.width)/n,l=(a?DC(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Gwe=$f(0);function xX(e){const t=Ru(e);return!AP()||!t.visualViewport?Gwe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qwe(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ru(e)?!1:t}function n1(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=vP(e);let s=$f(1);t&&(n?Od(n)&&(s=rx(n)):s=rx(e));const l=qwe(a,r,n)?xX(a):$f(0);let c=(i.left+l.x)/s.x,u=(i.top+l.y)/s.y,d=i.width/s.x,f=i.height/s.y;if(a){const m=Ru(a),g=n&&Od(n)?Ru(n):n;let A=m,v=D8(A);for(;v&&n&&g!==A;){const b=rx(v),E=v.getBoundingClientRect(),I=Rd(v),S=E.left+(v.clientLeft+parseFloat(I.paddingLeft))*b.x,_=E.top+(v.clientTop+parseFloat(I.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,f*=b.y,c+=S,u+=_,A=Ru(v),v=D8(A)}}return PC({width:d,height:f,x:c,y:u})}function j3(e,t){const r=_3(e).scrollLeft;return t?t.left+r:n1(dh(e)).left+r}function yX(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-j3(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function Kwe(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",s=dh(n),l=t?k3(t.floating):!1;if(n===s||l&&a)return r;let c={scrollLeft:0,scrollTop:0},u=$f(1);const d=$f(0),f=Wf(n);if((f||!f&&!a)&&((cy(n)!=="body"||Ub(s))&&(c=_3(n)),Wf(n))){const g=n1(n);u=rx(n),d.x=g.x+n.clientLeft,d.y=g.y+n.clientTop}const m=s&&!f&&!a?yX(s,c):$f(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+m.x,y:r.y*u.y-c.scrollTop*u.y+d.y+m.y}}function Vwe(e){return Array.from(e.getClientRects())}function Ywe(e){const t=dh(e),r=_3(e),n=e.ownerDocument.body,i=Du(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=Du(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+j3(e);const l=-r.scrollTop;return Rd(n).direction==="rtl"&&(s+=Du(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:l}}const eL=25;function Zwe(e,t){const r=Ru(e),n=dh(e),i=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,l=0,c=0;if(i){a=i.width,s=i.height;const d=AP();(!d||d&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const u=j3(n);if(u<=0){const d=n.ownerDocument,f=d.body,m=getComputedStyle(f),g=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,A=Math.abs(n.clientWidth-f.clientWidth-g);A<=eL&&(a-=A)}else u<=eL&&(a+=u);return{width:a,height:s,x:l,y:c}}const Jwe=new Set(["absolute","fixed"]);function Xwe(e,t){const r=n1(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=Wf(e)?rx(e):$f(1),s=e.clientWidth*a.x,l=e.clientHeight*a.y,c=i*a.x,u=n*a.y;return{width:s,height:l,x:c,y:u}}function tL(e,t,r){let n;if(t==="viewport")n=Zwe(e,r);else if(t==="document")n=Ywe(dh(e));else if(Od(t))n=Xwe(t,r);else{const i=xX(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return PC(n)}function bX(e,t){const r=ag(e);return r===t||!Od(r)||wx(r)?!1:Rd(r).position==="fixed"||bX(r,t)}function e5e(e,t){const r=t.get(e);if(r)return r;let n=U2(e,[],!1).filter(l=>Od(l)&&cy(l)!=="body"),i=null;const a=Rd(e).position==="fixed";let s=a?ag(e):e;for(;Od(s)&&!wx(s);){const l=Rd(s),c=gP(s);!c&&l.position==="fixed"&&(i=null),(a?!c&&!i:!c&&l.position==="static"&&!!i&&Jwe.has(i.position)||Ub(s)&&!c&&bX(e,s))?n=n.filter(d=>d!==s):i=l,s=ag(s)}return t.set(e,n),n}function t5e(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?k3(t)?[]:e5e(t,this._c):[].concat(r),n],l=s[0],c=s.reduce((u,d)=>{const f=tL(t,d,i);return u.top=Du(f.top,u.top),u.right=ig(f.right,u.right),u.bottom=ig(f.bottom,u.bottom),u.left=Du(f.left,u.left),u},tL(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function r5e(e){const{width:t,height:r}=vX(e);return{width:t,height:r}}function n5e(e,t,r){const n=Wf(t),i=dh(t),a=r==="fixed",s=n1(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=$f(0);function u(){c.x=j3(i)}if(n||!n&&!a)if((cy(t)!=="body"||Ub(i))&&(l=_3(t)),n){const g=n1(t,!0,a,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else i&&u();a&&!n&&i&&u();const d=i&&!n&&!a?yX(i,l):$f(0),f=s.left+l.scrollLeft-c.x-d.x,m=s.top+l.scrollTop-c.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function gN(e){return Rd(e).position==="static"}function rL(e,t){if(!Wf(e)||Rd(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return dh(e)===r&&(r=r.ownerDocument.body),r}function wX(e,t){const r=Ru(e);if(k3(e))return r;if(!Wf(e)){let i=ag(e);for(;i&&!wx(i);){if(Od(i)&&!gN(i))return i;i=ag(i)}return r}let n=rL(e,t);for(;n&&Qwe(n)&&gN(n);)n=rL(n,t);return n&&wx(n)&&gN(n)&&!gP(n)?r:n||Hwe(e)||r}const i5e=async function(e){const t=this.getOffsetParent||wX,r=this.getDimensions,n=await r(e.floating);return{reference:n5e(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function a5e(e){return Rd(e).direction==="rtl"}const s5e={convertOffsetParentRelativeRectToViewportRelativeRect:Kwe,getDocumentElement:dh,getClippingRect:t5e,getOffsetParent:wX,getElementRects:i5e,getClientRects:Vwe,getDimensions:r5e,getScale:rx,isElement:Od,isRTL:a5e};function EX(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function o5e(e,t){let r=null,n;const i=dh(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:d,top:f,width:m,height:g}=u;if(l||t(),!m||!g)return;const A=i4(f),v=i4(i.clientWidth-(d+m)),b=i4(i.clientHeight-(f+g)),E=i4(d),S={rootMargin:-A+"px "+-v+"px "+-b+"px "+-E+"px",threshold:Du(0,ig(1,c))||1};let _=!0;function B(T){const P=T[0].intersectionRatio;if(P!==c){if(!_)return s();P?s(!1,P):n=setTimeout(()=>{s(!1,1e-7)},1e3)}P===1&&!EX(u,e.getBoundingClientRect())&&s(),_=!1}try{r=new IntersectionObserver(B,{...S,root:i.ownerDocument})}catch{r=new IntersectionObserver(B,S)}r.observe(e)}return s(!0),a}function l5e(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=vP(e),d=i||a?[...u?U2(u):[],...U2(t)]:[];d.forEach(E=>{i&&E.addEventListener("scroll",r,{passive:!0}),a&&E.addEventListener("resize",r)});const f=u&&l?o5e(u,r):null;let m=-1,g=null;s&&(g=new ResizeObserver(E=>{let[I]=E;I&&I.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var S;(S=g)==null||S.observe(t)})),r()}),u&&!c&&g.observe(u),g.observe(t));let A,v=c?n1(e):null;c&&b();function b(){const E=n1(e);v&&!EX(v,E)&&r(),v=E,A=requestAnimationFrame(b)}return r(),()=>{var E;d.forEach(I=>{i&&I.removeEventListener("scroll",r),a&&I.removeEventListener("resize",r)}),f?.(),(E=g)==null||E.disconnect(),g=null,c&&cancelAnimationFrame(A)}}const c5e=Twe,u5e=Pwe,d5e=_we,f5e=Rwe,h5e=jwe,nL=kwe,m5e=Owe,p5e=(e,t,r)=>{const n=new Map,i={platform:s5e,...r},a={...i.platform,_c:n};return Nwe(e,t,{...i,platform:a})};var g5e=typeof document<"u",A5e=function(){},mE=g5e?w.useLayoutEffect:A5e;function OC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!OC(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const a=i[n];if(!(a==="_owner"&&e.$$typeof)&&!OC(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function CX(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function iL(e,t){const r=CX(e);return Math.round(t*r)/r}function AN(e){const t=w.useRef(e);return mE(()=>{t.current=e}),t}function v5e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=w.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=w.useState(n);OC(m,n)||g(n);const[A,v]=w.useState(null),[b,E]=w.useState(null),I=w.useCallback(Y=>{Y!==T.current&&(T.current=Y,v(Y))},[]),S=w.useCallback(Y=>{Y!==P.current&&(P.current=Y,E(Y))},[]),_=a||A,B=s||b,T=w.useRef(null),P=w.useRef(null),O=w.useRef(d),z=c!=null,L=AN(c),W=AN(i),R=AN(u),$=w.useCallback(()=>{if(!T.current||!P.current)return;const Y={placement:t,strategy:r,middleware:m};W.current&&(Y.platform=W.current),p5e(T.current,P.current,Y).then(ne=>{const ge={...ne,isPositioned:R.current!==!1};X.current&&!OC(O.current,ge)&&(O.current=ge,Sm.flushSync(()=>{f(ge)}))})},[m,t,r,W,R]);mE(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(Y=>({...Y,isPositioned:!1})))},[u]);const X=w.useRef(!1);mE(()=>(X.current=!0,()=>{X.current=!1}),[]),mE(()=>{if(_&&(T.current=_),B&&(P.current=B),_&&B){if(L.current)return L.current(_,B,$);$()}},[_,B,$,L,z]);const Z=w.useMemo(()=>({reference:T,floating:P,setReference:I,setFloating:S}),[I,S]),K=w.useMemo(()=>({reference:_,floating:B}),[_,B]),q=w.useMemo(()=>{const Y={position:r,left:0,top:0};if(!K.floating)return Y;const ne=iL(K.floating,d.x),ge=iL(K.floating,d.y);return l?{...Y,transform:"translate("+ne+"px, "+ge+"px)",...CX(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ne,top:ge}},[r,l,K.floating,d.x,d.y]);return w.useMemo(()=>({...d,update:$,refs:Z,elements:K,floatingStyles:q}),[d,$,Z,K,q])}const x5e=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?nL({element:n.current,padding:i}).fn(r):{}:n?nL({element:n,padding:i}).fn(r):{}}}},y5e=(e,t)=>({...c5e(e),options:[e,t]}),b5e=(e,t)=>({...u5e(e),options:[e,t]}),w5e=(e,t)=>({...m5e(e),options:[e,t]}),E5e=(e,t)=>({...d5e(e),options:[e,t]}),C5e=(e,t)=>({...f5e(e),options:[e,t]}),I5e=(e,t)=>({...h5e(e),options:[e,t]}),S5e=(e,t)=>({...x5e(e),options:[e,t]});var B5e="Arrow",IX=w.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...a}=e;return o.jsx(mn.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:o.jsx("polygon",{points:"0,0 30,0 15,10"})})});IX.displayName=B5e;var N5e=IX;function SX(e){const[t,r]=w.useState(void 0);return Fl(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,l;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;r({width:s,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var xP="Popper",[BX,Ag]=Hu(xP),[k5e,NX]=BX(xP),kX=e=>{const{__scopePopper:t,children:r}=e,[n,i]=w.useState(null);return o.jsx(k5e,{scope:t,anchor:n,onAnchorChange:i,children:r})};kX.displayName=xP;var _X="PopperAnchor",jX=w.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,a=NX(_X,r),s=w.useRef(null),l=qn(t,s),c=w.useRef(null);return w.useEffect(()=>{const u=c.current;c.current=n?.current||s.current,u!==c.current&&a.onAnchorChange(c.current)}),n?null:o.jsx(mn.div,{...i,ref:l})});jX.displayName=_X;var yP="PopperContent",[_5e,j5e]=BX(yP),DX=w.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:A,...v}=e,b=NX(yP,r),[E,I]=w.useState(null),S=qn(t,ye=>I(ye)),[_,B]=w.useState(null),T=SX(_),P=T?.width??0,O=T?.height??0,z=n+(a!=="center"?"-"+a:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},W=Array.isArray(u)?u:[u],R=W.length>0,$={padding:L,boundary:W.filter(T5e),altBoundary:R},{refs:X,floatingStyles:Z,placement:K,isPositioned:q,middlewareData:Y}=v5e({strategy:"fixed",placement:z,whileElementsMounted:(...ye)=>l5e(...ye,{animationFrame:g==="always"}),elements:{reference:b.anchor},middleware:[y5e({mainAxis:i+O,alignmentAxis:s}),c&&b5e({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?w5e():void 0,...$}),c&&E5e({...$}),C5e({...$,apply:({elements:ye,rects:Ee,availableWidth:me,availableHeight:Se})=>{const{width:Ie,height:Be}=Ee.reference,Xe=ye.floating.style;Xe.setProperty("--radix-popper-available-width",`${me}px`),Xe.setProperty("--radix-popper-available-height",`${Se}px`),Xe.setProperty("--radix-popper-anchor-width",`${Ie}px`),Xe.setProperty("--radix-popper-anchor-height",`${Be}px`)}}),_&&S5e({element:_,padding:l}),P5e({arrowWidth:P,arrowHeight:O}),m&&I5e({strategy:"referenceHidden",...$})]}),[ne,ge]=OX(K),ae=Yc(A);Fl(()=>{q&&ae?.()},[q,ae]);const pe=Y.arrow?.x,_e=Y.arrow?.y,we=Y.arrow?.centerOffset!==0,[xe,Me]=w.useState();return Fl(()=>{E&&Me(window.getComputedStyle(E).zIndex)},[E]),o.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:q?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[Y.transformOrigin?.x,Y.transformOrigin?.y].join(" "),...Y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:o.jsx(_5e,{scope:r,placedSide:ne,onArrowChange:B,arrowX:pe,arrowY:_e,shouldHideArrow:we,children:o.jsx(mn.div,{"data-side":ne,"data-align":ge,...v,ref:S,style:{...v.style,animation:q?void 0:"none"}})})})});DX.displayName=yP;var TX="PopperArrow",D5e={top:"bottom",right:"left",bottom:"top",left:"right"},PX=w.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,a=j5e(TX,n),s=D5e[a.placedSide];return o.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:o.jsx(N5e,{...i,ref:r,style:{...i.style,display:"block"}})})});PX.displayName=TX;function T5e(e){return e!==null}var P5e=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,d]=OX(r),f={start:"0%",center:"50%",end:"100%"}[d],m=(i.arrow?.x??0)+l/2,g=(i.arrow?.y??0)+c/2;let A="",v="";return u==="bottom"?(A=s?f:`${m}px`,v=`${-c}px`):u==="top"?(A=s?f:`${m}px`,v=`${n.floating.height+c}px`):u==="right"?(A=`${-c}px`,v=s?f:`${g}px`):u==="left"&&(A=`${n.floating.width+c}px`,v=s?f:`${g}px`),{data:{x:A,y:v}}}});function OX(e){const[t,r="center"]=e.split("-");return[t,r]}var D3=kX,$b=jX,T3=DX,P3=PX,O5e=Symbol("radix.slottable");function R5e(e){const t=({children:r})=>o.jsx(o.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=O5e,t}var[O3]=Hu("Tooltip",[Ag]),R3=Ag(),RX="TooltipProvider",F5e=700,T8="tooltip.open",[M5e,bP]=O3(RX),FX=e=>{const{__scopeTooltip:t,delayDuration:r=F5e,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:a}=e,s=w.useRef(!0),l=w.useRef(!1),c=w.useRef(0);return w.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),o.jsx(M5e,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:w.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:w.useCallback(u=>{l.current=u},[]),disableHoverableContent:i,children:a})};FX.displayName=RX;var $2="Tooltip",[Q5e,F3]=O3($2),MX=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:i,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=e,c=bP($2,e.__scopeTooltip),u=R3(t),[d,f]=w.useState(null),m=R0(),g=w.useRef(0),A=s??c.disableHoverableContent,v=l??c.delayDuration,b=w.useRef(!1),[E,I]=Hf({prop:n,defaultProp:i??!1,onChange:P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(T8))):c.onClose(),a?.(P)},caller:$2}),S=w.useMemo(()=>E?b.current?"delayed-open":"instant-open":"closed",[E]),_=w.useCallback(()=>{window.clearTimeout(g.current),g.current=0,b.current=!1,I(!0)},[I]),B=w.useCallback(()=>{window.clearTimeout(g.current),g.current=0,I(!1)},[I]),T=w.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{b.current=!0,I(!0),g.current=0},v)},[v,I]);return w.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),o.jsx(D3,{...u,children:o.jsx(Q5e,{scope:t,contentId:m,open:E,stateAttribute:S,trigger:d,onTriggerChange:f,onTriggerEnter:w.useCallback(()=>{c.isOpenDelayedRef.current?T():_()},[c.isOpenDelayedRef,T,_]),onTriggerLeave:w.useCallback(()=>{A?B():(window.clearTimeout(g.current),g.current=0)},[B,A]),onOpen:_,onClose:B,disableHoverableContent:A,children:r})})};MX.displayName=$2;var P8="TooltipTrigger",QX=w.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=F3(P8,r),a=bP(P8,r),s=R3(r),l=w.useRef(null),c=qn(t,l,i.onTriggerChange),u=w.useRef(!1),d=w.useRef(!1),f=w.useCallback(()=>u.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),o.jsx($b,{asChild:!0,...s,children:o.jsx(mn.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...n,ref:c,onPointerMove:dr(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:dr(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:dr(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:dr(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:dr(e.onBlur,i.onClose),onClick:dr(e.onClick,i.onClose)})})});QX.displayName=P8;var L5e="TooltipPortal",[KCt,U5e]=O3(L5e,{forceMount:void 0}),Ex="TooltipContent",LX=w.forwardRef((e,t)=>{const r=U5e(Ex,e.__scopeTooltip),{forceMount:n=r.forceMount,side:i="top",...a}=e,s=F3(Ex,e.__scopeTooltip);return o.jsx(Jc,{present:n||s.open,children:s.disableHoverableContent?o.jsx(UX,{side:i,...a,ref:t}):o.jsx($5e,{side:i,...a,ref:t})})}),$5e=w.forwardRef((e,t)=>{const r=F3(Ex,e.__scopeTooltip),n=bP(Ex,e.__scopeTooltip),i=w.useRef(null),a=qn(t,i),[s,l]=w.useState(null),{trigger:c,onClose:u}=r,d=i.current,{onPointerInTransitChange:f}=n,m=w.useCallback(()=>{l(null),f(!1)},[f]),g=w.useCallback((A,v)=>{const b=A.currentTarget,E={x:A.clientX,y:A.clientY},I=q5e(E,b.getBoundingClientRect()),S=K5e(E,I),_=V5e(v.getBoundingClientRect()),B=Z5e([...S,..._]);l(B),f(!0)},[f]);return w.useEffect(()=>()=>m(),[m]),w.useEffect(()=>{if(c&&d){const A=b=>g(b,d),v=b=>g(b,c);return c.addEventListener("pointerleave",A),d.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",A),d.removeEventListener("pointerleave",v)}}},[c,d,g,m]),w.useEffect(()=>{if(s){const A=v=>{const b=v.target,E={x:v.clientX,y:v.clientY},I=c?.contains(b)||d?.contains(b),S=!Y5e(E,s);I?m():S&&(m(),u())};return document.addEventListener("pointermove",A),()=>document.removeEventListener("pointermove",A)}},[c,d,s,u,m]),o.jsx(UX,{...e,ref:a})}),[z5e,H5e]=O3($2,{isInside:!1}),W5e=R5e("TooltipContent"),UX=w.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=e,c=F3(Ex,r),u=R3(r),{onClose:d}=c;return w.useEffect(()=>(document.addEventListener(T8,d),()=>document.removeEventListener(T8,d)),[d]),w.useEffect(()=>{if(c.trigger){const f=m=>{m.target?.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),o.jsx(N1,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:o.jsxs(T3,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[o.jsx(W5e,{children:n}),o.jsx(z5e,{scope:r,isInside:!0,children:o.jsx(G2e,{id:c.contentId,role:"tooltip",children:i||n})})]})})});LX.displayName=Ex;var $X="TooltipArrow",G5e=w.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=R3(r);return H5e($X,r).isInside?null:o.jsx(P3,{...i,...n,ref:t})});G5e.displayName=$X;function q5e(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,i,a)){case a:return"left";case i:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function K5e(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function V5e(e){const{top:t,right:r,bottom:n,left:i}=e;return[{x:i,y:t},{x:r,y:t},{x:r,y:n},{x:i,y:n}]}function Y5e(e,t){const{x:r,y:n}=e;let i=!1;for(let a=0,s=t.length-1;an!=m>n&&r<(f-u)*(n-d)/(m-d)+u&&(i=!i)}return i}function Z5e(e){const t=e.slice();return t.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),J5e(t)}function J5e(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(i.y-s.y)>=(a.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const i=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(i.y-s.y)>=(a.y-s.y)*(i.x-s.x))r.pop();else break}r.push(i)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var X5e=FX,e4e=MX,t4e=QX,zX=LX;const cm=X5e,zb=e4e,Hb=t4e,uy=w.forwardRef(({className:e,sideOffset:t=4,...r},n)=>o.jsx(zX,{ref:n,sideOffset:t,className:qt("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 origin-[--radix-tooltip-content-transform-origin]",e),...r}));uy.displayName=zX.displayName;var r4e=Symbol.for("react.lazy"),RC=Fb[" use ".trim().toString()];function n4e(e){return typeof e=="object"&&e!==null&&"then"in e}function HX(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===r4e&&"_payload"in e&&n4e(e._payload)}function M3(e){const t=i4e(e),r=w.forwardRef((n,i)=>{let{children:a,...s}=n;HX(a)&&typeof RC=="function"&&(a=RC(a._payload));const l=w.Children.toArray(a),c=l.find(s4e);if(c){const u=c.props.children,d=l.map(f=>f===c?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:f);return o.jsx(t,{...s,ref:i,children:w.isValidElement(u)?w.cloneElement(u,void 0,d):null})}return o.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}var wP=M3("Slot");function i4e(e){const t=w.forwardRef((r,n)=>{let{children:i,...a}=r;if(HX(i)&&typeof RC=="function"&&(i=RC(i._payload)),w.isValidElement(i)){const s=l4e(i),l=o4e(a,i.props);return i.type!==w.Fragment&&(l.ref=n?uh(n,s):s),w.cloneElement(i,l)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var a4e=Symbol("radix.slottable");function s4e(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===a4e}function o4e(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function l4e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const vN=768;function c4e(){const[e,t]=w.useState(void 0);return w.useEffect(()=>{const r=window.matchMedia(`(max-width: ${vN-1}px)`),n=()=>{t(window.innerWidthr.removeEventListener("change",n)},[]),!!e}const z2=k1("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover-elevate active-elevate-2",{variants:{variant:{default:"bg-primary text-primary-foreground border border-primary-border",destructive:"bg-destructive text-destructive-foreground border border-destructive-border",outline:" border [border-color:var(--button-outline)] shadow-xs active:shadow-none ",secondary:"border bg-secondary text-secondary-foreground border border-secondary-border ",ghost:"border border-transparent"},size:{default:"min-h-9 px-4 py-2",sm:"min-h-8 rounded-md px-3 text-xs",lg:"min-h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Pe=w.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...i},a)=>{const s=n?wP:"button";return o.jsx(s,{className:qt(z2({variant:t,size:r,className:e})),ref:a,...i})});Pe.displayName="Button";const wt=w.forwardRef(({className:e,type:t,...r},n)=>o.jsx("input",{type:t,className:qt("flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));wt.displayName="Input";var u4e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],d4e=u4e.reduce((e,t)=>{const r=M3(`Primitive.${t}`),n=w.forwardRef((i,a)=>{const{asChild:s,...l}=i,c=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(c,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),f4e="Separator",aL="horizontal",h4e=["horizontal","vertical"],WX=w.forwardRef((e,t)=>{const{decorative:r,orientation:n=aL,...i}=e,a=m4e(n)?n:aL,l=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return o.jsx(d4e.div,{"data-orientation":a,...l,...i,ref:t})});WX.displayName=f4e;function m4e(e){return h4e.includes(e)}var GX=WX;const vd=w.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},i)=>o.jsx(GX,{ref:i,decorative:r,orientation:t,className:qt("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));vd.displayName=GX.displayName;var xN="focusScope.autoFocusOnMount",yN="focusScope.autoFocusOnUnmount",sL={bubbles:!1,cancelable:!0},p4e="FocusScope",Wb=w.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[l,c]=w.useState(null),u=Yc(i),d=Yc(a),f=w.useRef(null),m=qn(t,v=>c(v)),g=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(n){let v=function(S){if(g.paused||!l)return;const _=S.target;l.contains(_)?f.current=_:_p(f.current,{select:!0})},b=function(S){if(g.paused||!l)return;const _=S.relatedTarget;_!==null&&(l.contains(_)||_p(f.current,{select:!0}))},E=function(S){if(document.activeElement===document.body)for(const B of S)B.removedNodes.length>0&&_p(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const I=new MutationObserver(E);return l&&I.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),I.disconnect()}}},[n,l,g.paused]),w.useEffect(()=>{if(l){lL.add(g);const v=document.activeElement;if(!l.contains(v)){const E=new CustomEvent(xN,sL);l.addEventListener(xN,u),l.dispatchEvent(E),E.defaultPrevented||(g4e(b4e(qX(l)),{select:!0}),document.activeElement===v&&_p(l))}return()=>{l.removeEventListener(xN,u),setTimeout(()=>{const E=new CustomEvent(yN,sL);l.addEventListener(yN,d),l.dispatchEvent(E),E.defaultPrevented||_p(v??document.body,{select:!0}),l.removeEventListener(yN,d),lL.remove(g)},0)}}},[l,u,d,g]);const A=w.useCallback(v=>{if(!r&&!n||g.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,E=document.activeElement;if(b&&E){const I=v.currentTarget,[S,_]=A4e(I);S&&_?!v.shiftKey&&E===_?(v.preventDefault(),r&&_p(S,{select:!0})):v.shiftKey&&E===S&&(v.preventDefault(),r&&_p(_,{select:!0})):E===I&&v.preventDefault()}},[r,n,g.paused]);return o.jsx(mn.div,{tabIndex:-1,...s,ref:m,onKeyDown:A})});Wb.displayName=p4e;function g4e(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(_p(n,{select:t}),document.activeElement!==r)return}function A4e(e){const t=qX(e),r=oL(t,e),n=oL(t.reverse(),e);return[r,n]}function qX(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function oL(e,t){for(const r of e)if(!v4e(r,{upTo:t}))return r}function v4e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function x4e(e){return e instanceof HTMLInputElement&&"select"in e}function _p(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&x4e(e)&&t&&e.select()}}var lL=y4e();function y4e(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=cL(e,t),e.unshift(t)},remove(t){e=cL(e,t),e[0]?.resume()}}}function cL(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function b4e(e){return e.filter(t=>t.tagName!=="A")}var bN=0;function Q3(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??uL()),document.body.insertAdjacentElement("beforeend",e[1]??uL()),bN++,()=>{bN===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),bN--}},[])}function uL(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ef=function(){return Ef=Object.assign||function(t){for(var r,n=1,i=arguments.length;n=0;l--)(s=e[l])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function w4e(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n"u")return M4e;var t=Q4e(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},U4e=ZX(),nx="data-scroll-locked",$4e=function(e,t,r,n){var i=e.left,a=e.top,s=e.right,l=e.gap;return r===void 0&&(r="margin"),` .`.concat(E4e,` { overflow: hidden `).concat(n,`; padding-right: `).concat(l,"px ").concat(n,`; } body[`).concat(nx,`] { overflow: hidden `).concat(n,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` padding-left: `.concat(i,`px; padding-top: `).concat(a,`px; padding-right: `).concat(s,`px; margin-left:0; margin-top:0; margin-right: `).concat(l,"px ").concat(n,`; `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),` } .`).concat(pE,` { right: `).concat(l,"px ").concat(n,`; } .`).concat(gE,` { margin-right: `).concat(l,"px ").concat(n,`; } .`).concat(pE," .").concat(pE,` { right: 0 `).concat(n,`; } .`).concat(gE," .").concat(gE,` { margin-right: 0 `).concat(n,`; } body[`).concat(nx,`] { `).concat(C4e,": ").concat(l,`px; } `)},fL=function(){var e=parseInt(document.body.getAttribute(nx)||"0",10);return isFinite(e)?e:0},z4e=function(){w.useEffect(function(){return document.body.setAttribute(nx,(fL()+1).toString()),function(){var e=fL()-1;e<=0?document.body.removeAttribute(nx):document.body.setAttribute(nx,e.toString())}},[])},H4e=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;z4e();var a=w.useMemo(function(){return L4e(i)},[i]);return w.createElement(U4e,{styles:$4e(a,!t,i,r?"":"!important")})},O8=!1;if(typeof window<"u")try{var a4=Object.defineProperty({},"passive",{get:function(){return O8=!0,!0}});window.addEventListener("test",a4,a4),window.removeEventListener("test",a4,a4)}catch{O8=!1}var Bv=O8?{passive:!1}:!1,W4e=function(e){return e.tagName==="TEXTAREA"},JX=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!W4e(e)&&r[t]==="visible")},G4e=function(e){return JX(e,"overflowY")},q4e=function(e){return JX(e,"overflowX")},hL=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=XX(e,n);if(i){var a=eee(e,n),s=a[1],l=a[2];if(s>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},K4e=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},V4e=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},XX=function(e,t){return e==="v"?G4e(t):q4e(t)},eee=function(e,t){return e==="v"?K4e(t):V4e(t)},Y4e=function(e,t){return e==="h"&&t==="rtl"?-1:1},Z4e=function(e,t,r,n,i){var a=Y4e(e,window.getComputedStyle(t).direction),s=a*n,l=r.target,c=t.contains(l),u=!1,d=s>0,f=0,m=0;do{if(!l)break;var g=eee(e,l),A=g[0],v=g[1],b=g[2],E=v-b-a*A;(A||E)&&XX(e,l)&&(f+=E,m+=A);var I=l.parentNode;l=I&&I.nodeType===Node.DOCUMENT_FRAGMENT_NODE?I.host:I}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(u=!0),u},s4=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},mL=function(e){return[e.deltaX,e.deltaY]},pL=function(e){return e&&"current"in e?e.current:e},J4e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},X4e=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},eEe=0,Nv=[];function tEe(e){var t=w.useRef([]),r=w.useRef([0,0]),n=w.useRef(),i=w.useState(eEe++)[0],a=w.useState(ZX)[0],s=w.useRef(e);w.useEffect(function(){s.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=w4e([e.lockRef.current],(e.shards||[]).map(pL),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=w.useCallback(function(v,b){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!s.current.allowPinchZoom;var E=s4(v),I=r.current,S="deltaX"in v?v.deltaX:I[0]-E[0],_="deltaY"in v?v.deltaY:I[1]-E[1],B,T=v.target,P=Math.abs(S)>Math.abs(_)?"h":"v";if("touches"in v&&P==="h"&&T.type==="range")return!1;var O=window.getSelection(),z=O&&O.anchorNode,L=z?z===T||z.contains(T):!1;if(L)return!1;var W=hL(P,T);if(!W)return!0;if(W?B=P:(B=P==="v"?"h":"v",W=hL(P,T)),!W)return!1;if(!n.current&&"changedTouches"in v&&(S||_)&&(n.current=B),!B)return!0;var R=n.current||B;return Z4e(R,b,v,R==="h"?S:_)},[]),c=w.useCallback(function(v){var b=v;if(!(!Nv.length||Nv[Nv.length-1]!==a)){var E="deltaY"in b?mL(b):s4(b),I=t.current.filter(function(B){return B.name===b.type&&(B.target===b.target||b.target===B.shadowParent)&&J4e(B.delta,E)})[0];if(I&&I.should){b.cancelable&&b.preventDefault();return}if(!I){var S=(s.current.shards||[]).map(pL).filter(Boolean).filter(function(B){return B.contains(b.target)}),_=S.length>0?l(b,S[0]):!s.current.noIsolation;_&&b.cancelable&&b.preventDefault()}}},[]),u=w.useCallback(function(v,b,E,I){var S={name:v,delta:b,target:E,should:I,shadowParent:rEe(E)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(_){return _!==S})},1)},[]),d=w.useCallback(function(v){r.current=s4(v),n.current=void 0},[]),f=w.useCallback(function(v){u(v.type,mL(v),v.target,l(v,e.lockRef.current))},[]),m=w.useCallback(function(v){u(v.type,s4(v),v.target,l(v,e.lockRef.current))},[]);w.useEffect(function(){return Nv.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Bv),document.addEventListener("touchmove",c,Bv),document.addEventListener("touchstart",d,Bv),function(){Nv=Nv.filter(function(v){return v!==a}),document.removeEventListener("wheel",c,Bv),document.removeEventListener("touchmove",c,Bv),document.removeEventListener("touchstart",d,Bv)}},[]);var g=e.removeScrollBar,A=e.inert;return w.createElement(w.Fragment,null,A?w.createElement(a,{styles:X4e(i)}):null,g?w.createElement(H4e,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function rEe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const nEe=j4e(YX,tEe);var Gb=w.forwardRef(function(e,t){return w.createElement(L3,Ef({},e,{ref:t,sideCar:nEe}))});Gb.classNames=L3.classNames;var iEe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},kv=new WeakMap,o4=new WeakMap,l4={},IN=0,tee=function(e){return e&&(e.host||tee(e.parentNode))},aEe=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=tee(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},sEe=function(e,t,r,n){var i=aEe(t,Array.isArray(e)?e:[e]);l4[r]||(l4[r]=new WeakMap);var a=l4[r],s=[],l=new Set,c=new Set(i),u=function(f){!f||l.has(f)||(l.add(f),u(f.parentNode))};i.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(m){if(l.has(m))d(m);else try{var g=m.getAttribute(n),A=g!==null&&g!=="false",v=(kv.get(m)||0)+1,b=(a.get(m)||0)+1;kv.set(m,v),a.set(m,b),s.push(m),v===1&&A&&o4.set(m,!0),b===1&&m.setAttribute(r,"true"),A||m.setAttribute(n,"true")}catch(E){console.error("aria-hidden: cannot operate on ",m,E)}})};return d(t),l.clear(),IN++,function(){s.forEach(function(f){var m=kv.get(f)-1,g=a.get(f)-1;kv.set(f,m),a.set(f,g),m||(o4.has(f)||f.removeAttribute(n),o4.delete(f)),g||f.removeAttribute(r)}),IN--,IN||(kv=new WeakMap,kv=new WeakMap,o4=new WeakMap,l4={})}},U3=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=iEe(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),sEe(n,i,r,"aria-hidden")):function(){return null}};function oEe(e){const t=lEe(e),r=w.forwardRef((n,i)=>{const{children:a,...s}=n,l=w.Children.toArray(a),c=l.find(uEe);if(c){const u=c.props.children,d=l.map(f=>f===c?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:f);return o.jsx(t,{...s,ref:i,children:w.isValidElement(u)?w.cloneElement(u,void 0,d):null})}return o.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function lEe(e){const t=w.forwardRef((r,n)=>{const{children:i,...a}=r;if(w.isValidElement(i)){const s=fEe(i),l=dEe(a,i.props);return i.type!==w.Fragment&&(l.ref=n?uh(n,s):s),w.cloneElement(i,l)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var cEe=Symbol("radix.slottable");function uEe(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===cEe}function dEe(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function fEe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var $3="Dialog",[ree,nee]=Hu($3),[hEe,zd]=ree($3),iee=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=w.useRef(null),c=w.useRef(null),[u,d]=Hf({prop:n,defaultProp:i??!1,onChange:a,caller:$3});return o.jsx(hEe,{scope:t,triggerRef:l,contentRef:c,contentId:R0(),titleId:R0(),descriptionId:R0(),open:u,onOpenChange:d,onOpenToggle:w.useCallback(()=>d(f=>!f),[d]),modal:s,children:r})};iee.displayName=$3;var aee="DialogTrigger",see=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=zd(aee,r),a=qn(t,i.triggerRef);return o.jsx(mn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":IP(i.open),...n,ref:a,onClick:dr(e.onClick,i.onOpenToggle)})});see.displayName=aee;var EP="DialogPortal",[mEe,oee]=ree(EP,{forceMount:void 0}),lee=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=zd(EP,t);return o.jsx(mEe,{scope:t,forceMount:r,children:w.Children.map(n,s=>o.jsx(Jc,{present:r||a.open,children:o.jsx(iy,{asChild:!0,container:i,children:s})}))})};lee.displayName=EP;var FC="DialogOverlay",cee=w.forwardRef((e,t)=>{const r=oee(FC,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=zd(FC,e.__scopeDialog);return a.modal?o.jsx(Jc,{present:n||a.open,children:o.jsx(gEe,{...i,ref:t})}):null});cee.displayName=FC;var pEe=oEe("DialogOverlay.RemoveScroll"),gEe=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=zd(FC,r);return o.jsx(Gb,{as:pEe,allowPinchZoom:!0,shards:[i.contentRef],children:o.jsx(mn.div,{"data-state":IP(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),i1="DialogContent",uee=w.forwardRef((e,t)=>{const r=oee(i1,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=zd(i1,e.__scopeDialog);return o.jsx(Jc,{present:n||a.open,children:a.modal?o.jsx(AEe,{...i,ref:t}):o.jsx(vEe,{...i,ref:t})})});uee.displayName=i1;var AEe=w.forwardRef((e,t)=>{const r=zd(i1,e.__scopeDialog),n=w.useRef(null),i=qn(t,r.contentRef,n);return w.useEffect(()=>{const a=n.current;if(a)return U3(a)},[]),o.jsx(dee,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:dr(e.onCloseAutoFocus,a=>{a.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:dr(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&a.preventDefault()}),onFocusOutside:dr(e.onFocusOutside,a=>a.preventDefault())})}),vEe=w.forwardRef((e,t)=>{const r=zd(i1,e.__scopeDialog),n=w.useRef(!1),i=w.useRef(!1);return o.jsx(dee,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(n.current||r.triggerRef.current?.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;r.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),dee=w.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,l=zd(i1,r),c=w.useRef(null),u=qn(t,c);return Q3(),o.jsxs(o.Fragment,{children:[o.jsx(Wb,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:o.jsx(N1,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":IP(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),o.jsxs(o.Fragment,{children:[o.jsx(yEe,{titleId:l.titleId}),o.jsx(wEe,{contentRef:c,descriptionId:l.descriptionId})]})]})}),CP="DialogTitle",fee=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=zd(CP,r);return o.jsx(mn.h2,{id:i.titleId,...n,ref:t})});fee.displayName=CP;var hee="DialogDescription",mee=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=zd(hee,r);return o.jsx(mn.p,{id:i.descriptionId,...n,ref:t})});mee.displayName=hee;var pee="DialogClose",gee=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=zd(pee,r);return o.jsx(mn.button,{type:"button",...n,ref:t,onClick:dr(e.onClick,()=>i.onOpenChange(!1))})});gee.displayName=pee;function IP(e){return e?"open":"closed"}var Aee="DialogTitleWarning",[xEe,vee]=p2e(Aee,{contentName:i1,titleName:CP,docsSlug:"dialog"}),yEe=({titleId:e})=>{const t=vee(Aee),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},bEe="DialogDescriptionWarning",wEe=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${vee(bEe).contentName}}.`;return w.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},SP=iee,xee=see,BP=lee,qb=cee,Kb=uee,Vb=fee,Yb=mee,z3=gee;const EEe=SP,CEe=BP,yee=w.forwardRef(({className:e,...t},r)=>o.jsx(qb,{className:qt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));yee.displayName=qb.displayName;const IEe=k1("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),bee=w.forwardRef(({side:e="right",className:t,children:r,...n},i)=>o.jsxs(CEe,{children:[o.jsx(yee,{}),o.jsxs(Kb,{ref:i,className:qt(IEe({side:e}),t),...n,children:[r,o.jsxs(z3,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[o.jsx(G0,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));bee.displayName=Kb.displayName;const wee=({className:e,...t})=>o.jsx("div",{className:qt("flex flex-col space-y-2 text-center sm:text-left",e),...t});wee.displayName="SheetHeader";const Eee=w.forwardRef(({className:e,...t},r)=>o.jsx(Vb,{ref:r,className:qt("text-lg font-semibold text-foreground",e),...t}));Eee.displayName=Vb.displayName;const Cee=w.forwardRef(({className:e,...t},r)=>o.jsx(Yb,{ref:r,className:qt("text-sm text-muted-foreground",e),...t}));Cee.displayName=Yb.displayName;const SEe="sidebar_state",BEe=3600*24*7,NEe="16rem",kEe="18rem",_Ee="3rem",jEe="b",Iee=w.createContext(null);function NP(){const e=w.useContext(Iee);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function DEe({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:i,children:a,...s}){const l=c4e(),[c,u]=w.useState(!1),[d,f]=w.useState(e),m=t??d,g=w.useCallback(E=>{const I=typeof E=="function"?E(m):E;r?r(I):f(I),document.cookie=`${SEe}=${I}; path=/; max-age=${BEe}`},[r,m]),A=w.useCallback(()=>l?u(E=>!E):g(E=>!E),[l,g,u]);w.useEffect(()=>{const E=I=>{I.key===jEe&&(I.metaKey||I.ctrlKey)&&(I.preventDefault(),A())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[A]);const v=m?"expanded":"collapsed",b=w.useMemo(()=>({state:v,open:m,setOpen:g,isMobile:l,openMobile:c,setOpenMobile:u,toggleSidebar:A}),[v,m,g,l,c,u,A]);return o.jsx(Iee.Provider,{value:b,children:o.jsx(cm,{delayDuration:0,children:o.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":NEe,"--sidebar-width-icon":_Ee,...i},className:qt("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",n),...s,children:a})})})}function TEe({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:i,...a}){const{isMobile:s,state:l,openMobile:c,setOpenMobile:u}=NP();return r==="none"?o.jsx("div",{"data-slot":"sidebar",className:qt("bg-sidebar text-sidebar-foreground flex h-full w-[var(--sidebar-width)] flex-col",n),...a,children:i}):s?o.jsx(EEe,{open:c,onOpenChange:u,...a,children:o.jsxs(bee,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-[var(--sidebar-width)] p-0 [&>button]:hidden",style:{"--sidebar-width":kEe},side:e,children:[o.jsxs(wee,{className:"sr-only",children:[o.jsx(Eee,{children:"Sidebar"}),o.jsx(Cee,{children:"Displays the mobile sidebar."})]}),o.jsx("div",{className:"flex h-full w-full flex-col",children:i})]})}):o.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":l,"data-collapsible":l==="collapsed"?r:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[o.jsx("div",{"data-slot":"sidebar-gap",className:qt("relative w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+var(--spacing-4))]":"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]")}),o.jsx("div",{"data-slot":"sidebar-container",className:qt("fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+var(--spacing-4)+2px)]":"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...a,children:o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:i})})]})}function PEe({className:e,onClick:t,...r}){const{toggleSidebar:n}=NP();return o.jsxs(Pe,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:qt("h-7 w-7",e),onClick:i=>{t?.(i),n()},...r,children:[o.jsx(Ebe,{}),o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function OEe({className:e,...t}){return o.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:qt("flex flex-col gap-2 p-2",e),...t})}function REe({className:e,...t}){return o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:qt("flex flex-col gap-2 p-2",e),...t})}function FEe({className:e,...t}){return o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:qt("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function MEe({className:e,...t}){return o.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:qt("relative flex w-full min-w-0 flex-col p-2",e),...t})}function QEe({className:e,asChild:t=!1,...r}){const n=t?wP:"div";return o.jsx(n,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:qt("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:h-4 [&>svg]:w-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})}function LEe({className:e,...t}){return o.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:qt("w-full text-sm",e),...t})}function UEe({className:e,...t}){return o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:qt("flex w-full min-w-0 flex-col gap-1",e),...t})}function $Ee({className:e,...t}){return o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:qt("group/menu-item relative",e),...t})}const zEe=k1("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:w-8! group-data-[collapsible=icon]:h-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function HEe({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:i,className:a,...s}){const l=e?wP:"button",{isMobile:c,state:u}=NP(),d=o.jsx(l,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":n,"data-active":t,className:qt(zEe({variant:r,size:n}),a),...s});return i?(typeof i=="string"&&(i={children:i}),o.jsxs(zb,{children:[o.jsx(Hb,{asChild:!0,children:d}),o.jsx(uy,{side:"right",align:"center",hidden:u!=="collapsed"||c,...i})]})):d}function mm(){return localStorage.getItem("parcapp_token")}function WEe(e){localStorage.setItem("parcapp_token",e)}function gL(){localStorage.removeItem("parcapp_token")}async function SN(e,t={}){const r=mm(),n=e.startsWith("http")?e:ch(e),i={Accept:"application/json",...t.headers||{}};r&&(i.Authorization=`Bearer ${r}`);let a=t.body;const s=typeof FormData<"u"&&a instanceof FormData;a!=null&&!s&&typeof a=="object"&&(a=JSON.stringify(a)),a!=null&&!s&&(Object.keys(i).some(m=>m.toLowerCase()==="content-type")||(i["Content-Type"]="application/json"));const l=await fetch(n,{...t,headers:i,body:a,redirect:"manual",credentials:"include"});if(l.status===204)return;const c=l.headers.get("content-type")||"",u=await l.text();let d=null;if(u)if(c.includes("application/json"))try{d=JSON.parse(u)}catch{throw{status:l.status,message:"La réponse n'est pas du JSON valide."}}else d=u;if(!l.ok){const f=d&&d.message||d&&d.error||d&&d.errors&&Object.values(d.errors)[0]?.[0]||l.statusText||"Erreur API";throw{status:l.status,message:f}}return d}function H3(){const e=zu(),[t,r]=w.useState(mm()),[n,i]=w.useState(!!t);w.useEffect(()=>{i(!!t)},[t]),w.useEffect(()=>{const u=()=>{const d=mm();r(d)};return window.addEventListener("storage",u),()=>{window.removeEventListener("storage",u)}},[]);const{data:a,isLoading:s}=Ar({queryKey:["auth","me"],queryFn:async()=>{if(!t)return null;try{return await SN("/api/me")}catch(u){if(u.status===401)return gL(),r(null),i(!1),null;throw u}},enabled:!!t,staleTime:300*1e3,retry:!1}),l=qr({mutationFn:async u=>await SN("/api/login",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:u}),onSuccess:u=>{WEe(u.token),r(u.token),i(!0),e.setQueryData(["auth","me"],u.user),e.invalidateQueries({queryKey:["auth","me"]})}}),c=w.useCallback(async()=>{try{await SN("/api/logout",{method:"POST"})}catch(u){console.error("Erreur lors de la déconnexion:",u)}finally{gL(),r(null),i(!1),e.clear(),e.setQueryData(["auth","me"],null)}},[e]);return{isAuthenticated:n,token:t,user:a||null,isLoading:s,login:l.mutate,loginAsync:l.mutateAsync,isLoggingIn:l.isPending,logout:c}}function j1(){const{user:e,isLoading:t}=H3();return{data:e,isLoading:t}}function kP(){const{logout:e}=H3(),[,t]=Ic();return qr({mutationFn:async()=>{await e(),t("/login")},onError:r=>{console.error("Erreur lors de la déconnexion:",r),t("/login")}})}const GEe=[{title:"Tableau de bord",url:"/",icon:tX,roles:["admin","gestionnaire_parc","gestionnaire_mobile","secretaire","comptable","atelier"]},{title:"Véhicules",url:"/vehicules",icon:Do,roles:["admin","gestionnaire_parc"]},{title:"Remorques",url:"/remorques",icon:uo,roles:["admin","gestionnaire_parc"]},{title:"Attelages",url:"/attelages",icon:Lb,roles:["admin","gestionnaire_parc"]},{title:"Chauffeurs",url:"/equipage",icon:Uf,roles:["admin","gestionnaire_parc"]},{title:"Missions",url:"/missions",icon:ng,roles:["admin","gestionnaire_parc","gestionnaire_mobile","secretaire","comptable"]},{title:"Voyages",url:"/trajets",icon:rs,roles:["admin","gestionnaire_parc","gestionnaire_mobile","secretaire","comptable"]},{title:"Entretiens",url:"/maintenances",icon:dP,roles:["admin","gestionnaire_parc","gestionnaire_mobile","secretaire","atelier"]},{title:"Pannes",url:"/pannes",icon:Vp,roles:["admin","gestionnaire_parc","gestionnaire_mobile","secretaire","atelier"]},{title:"Finance",url:"/finance",icon:eX,roles:["admin","gestionnaire_parc","comptable"]},{title:"Utilisateurs",url:"/utilisateurs",icon:sy,roles:["admin"]},{title:"Paramètres",url:"/parametres",icon:_1,roles:["admin","gestionnaire_parc"]}];function qEe(e){return e?e==="chauffeur"||e==="apprenti"?[]:GEe.filter(t=>t.roles?t.roles.includes(e):!0):[]}function KEe(){const[e]=Ic(),{data:t}=j1(),r=kP(),n=qEe(t?.role),i=()=>{r.mutate()};return o.jsxs(TEe,{className:"hidden md:flex",children:[o.jsx(OEe,{className:"border-b p-4",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary text-primary-foreground",children:o.jsx(Do,{className:"h-6 w-6"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-lg font-semibold",children:"Parc'App"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Gestion de flotte"})]})]})}),o.jsx(FEe,{children:o.jsxs(MEe,{children:[o.jsx(QEe,{children:"Navigation"}),o.jsx(LEe,{children:o.jsx(UEe,{className:"space-y-1",children:n.map(a=>{const s=e===a.url;return o.jsx($Ee,{children:o.jsx(HEe,{asChild:!0,isActive:s,className:`${s?"bg-primary/10 border-l-4 border-l-primary font-semibold":""} py-3 px-4 gap-3`,children:o.jsxs(ny,{href:a.url,to:a.url,"data-testid":`link-${a.title.toLowerCase().replace(/\s+/g,"-")}`,className:"w-full flex items-center",children:[o.jsx(a.icon,{className:`h-7 w-7 flex-shrink-0 ${s?"text-primary":""}`}),o.jsx("span",{className:"text-base font-medium",children:a.title})]})})},a.title)})})})]})}),o.jsx(REe,{className:"border-t p-4",children:o.jsxs("div",{className:"space-y-2",children:[t&&o.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5 text-sm text-muted-foreground",children:[o.jsx(sy,{className:"h-4 w-4"}),o.jsx("span",{className:"truncate",children:t.username})]}),o.jsxs(Pe,{variant:"ghost",className:"w-full justify-start gap-2",onClick:i,disabled:r.isPending,children:[o.jsx(cP,{className:"h-4 w-4"}),o.jsx("span",{children:r.isPending?"Déconnexion...":"Se déconnecter"})]})]})})]})}function VEe(){const[e,t]=w.useState("light");w.useEffect(()=>{const i=localStorage.getItem("theme")||"light";t(i),document.documentElement.classList.toggle("dark",i==="dark")},[]);const r=()=>{const n=e==="light"?"dark":"light";t(n),localStorage.setItem("theme",n),document.documentElement.classList.toggle("dark",n==="dark")};return o.jsx(Pe,{variant:"ghost",size:"icon",onClick:r,"data-testid":"button-theme-toggle",children:e==="light"?o.jsx(wbe,{className:"h-5 w-5"}):o.jsx(kbe,{className:"h-5 w-5"})})}const YEe=[{title:"Tableau de bord",path:"/",icon:tX,roles:["admin","gestionnaire_parc","gestionnaire_mobile","secretaire","comptable","atelier"]},{title:"Véhicules",path:"/vehicules",icon:Do,roles:["admin","gestionnaire_parc"]},{title:"Remorques",path:"/remorques",icon:uo,roles:["admin","gestionnaire_parc"]},{title:"Attelages",path:"/attelages",icon:Lb,roles:["admin","gestionnaire_parc"]},{title:"Chauffeurs",path:"/equipage",icon:Uf,roles:["admin","gestionnaire_parc"]},{title:"Missions",path:"/missions",icon:ng,roles:["admin","gestionnaire_parc","gestionnaire_mobile","secretaire","comptable"]},{title:"Voyages",path:"/trajets",icon:rs,roles:["admin","gestionnaire_parc","gestionnaire_mobile","secretaire","comptable"]},{title:"Entretiens",path:"/maintenances",icon:dP,roles:["admin","gestionnaire_parc","gestionnaire_mobile","secretaire","atelier"]},{title:"Pannes",path:"/pannes",icon:Vp,roles:["admin","gestionnaire_parc","gestionnaire_mobile","secretaire","atelier"]},{title:"Paramètres",path:"/parametres",icon:_1,roles:["admin","gestionnaire_parc"]}];function ZEe(e){return e?e==="chauffeur"||e==="apprenti"?[]:YEe.filter(t=>t.roles?t.roles.includes(e):!0):[]}function JEe(){const[e]=Ic(),{data:t}=j1(),r=ZEe(t?.role);return o.jsx("nav",{className:"fixed bottom-0 left-0 right-0 z-50 border-t bg-background md:hidden shadow-lg",children:o.jsx("div",{className:"flex items-center justify-around",children:r.map(n=>{const i=e===n.path,a=n.icon;return o.jsxs(ny,{href:n.path,className:`flex flex-col items-center gap-1.5 py-3 px-4 min-w-0 flex-1 hover-elevate active-elevate-2 transition-all ${i?"text-primary bg-primary/10 border-t-3 border-t-primary":"text-muted-foreground"}`,"data-testid":`nav-${n.title.toLowerCase().replace(/\s+/g,"-")}`,children:[o.jsx(a,{className:`h-8 w-8 flex-shrink-0 ${i?"scale-110":""} transition-transform`}),o.jsx("span",{className:`text-xs font-semibold truncate w-full text-center ${i?"font-bold":""}`,children:n.title})]},n.path)})})})}function See({queriesToInvalidate:e,className:t,label:r="Actualiser",variant:n="ghost",size:i="sm"}){const a=zu(),{toast:s}=sn(),[l,c]=w.useState(!1),u=Qye(e&&e.length>0?{predicate:m=>e.some(g=>{const A=g.join("/");return m.queryKey.join("/").startsWith(A)})}:void 0);w.useEffect(()=>{l&&u===0&&(c(!1),s({title:"Actualisation terminée",description:"Les données ont été mises à jour avec succès"}))},[l,u,s]);const d=async()=>{c(!0);try{if(e&&e.length>0){const m=e.map(g=>a.invalidateQueries({queryKey:g}));await Promise.all(m)}else await a.invalidateQueries();await new Promise(m=>setTimeout(m,100))}catch{c(!1),s({variant:"destructive",title:"Erreur",description:"Impossible de rafraîchir les données"})}},f=l||u>0;return o.jsxs(Pe,{type:"button",onClick:d,variant:n,size:i,className:t??"gap-2",disabled:f,children:[o.jsx(Sbe,{className:`h-4 w-4 ${f?"animate-spin":""}`}),o.jsx("span",{className:"hidden sm:inline",children:f?"Actualisation...":r})]})}function Bee(){const[e,t]=w.useState(navigator.onLine),[r,n]=w.useState(!1),{toast:i}=sn(),a=zu();return w.useEffect(()=>{const s=()=>{t(!0),r&&(i({title:"Connexion rétablie",description:"Les données sont en cours de rafraîchissement..."}),n(!1),a.invalidateQueries())},l=()=>{t(!1),n(!0),i({variant:"destructive",title:"Connexion perdue",description:"Vous êtes hors ligne. Les données seront rafraîchies à la reconnexion."})};return window.addEventListener("online",s),window.addEventListener("offline",l),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",l)}},[r,i,a]),e?null:o.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 rounded-md bg-destructive/10 text-destructive text-xs",children:[o.jsx(Tbe,{className:"h-3.5 w-3.5"}),o.jsx("span",{className:"hidden sm:inline",children:"Hors ligne"})]})}function XEe({children:e}){const{data:t}=j1(),r=kP(),n=()=>{r.mutate()},i=[["/api/driver/mission"],["/api/trips"],["/api/missions"]];return o.jsx(cm,{children:o.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[t&&o.jsxs("header",{className:"flex items-center justify-between gap-4 p-3 md:p-4 border-b",children:[o.jsx("h1",{className:"text-lg font-semibold",children:"Parc'App - Mode Chauffeur"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Bee,{}),o.jsx(See,{queriesToInvalidate:i}),o.jsxs(Pe,{variant:"ghost",size:"sm",onClick:n,disabled:r.isPending,className:"gap-2",children:[o.jsx(cP,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:r.isPending?"Déconnexion...":"Se déconnecter"})]})]})]}),o.jsx("main",{className:"flex-1 w-full",children:e}),o.jsx(hX,{})]})})}function kl({children:e}){const{isAuthenticated:t,isLoading:r}=H3(),[,n]=Ic();return w.useEffect(()=>{!r&&!t&&n("/login")},[t,r,n]),r?o.jsx("div",{className:"flex items-center justify-center min-h-screen",children:o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto mb-4"}),o.jsx("p",{className:"text-muted-foreground",children:"Chargement..."})]})}):t?o.jsx(o.Fragment,{children:e}):null}const _t=w.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:qt("shadcn-card rounded-xl border bg-card border-card-border text-card-foreground shadow-sm",e),...t}));_t.displayName="Card";const Xr=w.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:qt("flex flex-col space-y-1.5 p-6",e),...t}));Xr.displayName="CardHeader";const cn=w.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:qt("text-2xl font-semibold leading-none tracking-tight",e),...t}));cn.displayName="CardTitle";const Qi=w.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:qt("text-sm text-muted-foreground",e),...t}));Qi.displayName="CardDescription";const ar=w.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:qt("p-6 pt-0",e),...t}));ar.displayName="CardContent";const Zb=w.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:qt("flex items-center p-6 pt-0",e),...t}));Zb.displayName="CardFooter";function c4({title:e,value:t,icon:r,trend:n,color:i="primary"}){const a={primary:"bg-primary/10 text-primary",secondary:"bg-secondary/10 text-secondary-foreground",accent:"bg-accent/10 text-accent-foreground"};return o.jsx(_t,{className:"p-4 md:p-6 hover-elevate",children:o.jsxs("div",{className:"flex items-start justify-between gap-3",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-xs md:text-sm font-medium uppercase tracking-wide text-muted-foreground truncate",children:e}),o.jsx("p",{className:"mt-2 text-4xl md:text-5xl font-bold truncate",children:t}),n&&o.jsx("p",{className:"mt-1 text-xs text-muted-foreground truncate",children:n})]}),o.jsx("div",{className:`rounded-lg p-3 md:p-4 flex-shrink-0 ${a[i]}`,children:o.jsx(r,{className:"h-6 w-6 md:h-8 md:w-8"})})]})})}const eCe=k1("whitespace-nowrap inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 hover-elevate ",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow-xs",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground shadow-xs",outline:" border [border-color:var(--badge-outline)] shadow-xs"}},defaultVariants:{variant:"default"}});function ir({className:e,variant:t,...r}){return o.jsx("div",{className:qt(eCe({variant:t}),e),...r})}const $p={success:{bg:"bg-green-500",text:"text-green-900",border:"border-green-600",badge:"bg-green-100 text-green-800 border-green-300"},warning:{bg:"bg-orange-500",text:"text-orange-900",border:"border-orange-600",badge:"bg-orange-100 text-orange-800 border-orange-300"},info:{bg:"bg-blue-500",text:"text-blue-900",border:"border-blue-600",badge:"bg-blue-100 text-blue-800 border-blue-300"},danger:{bg:"bg-red-500",text:"text-red-900",border:"border-red-600",badge:"bg-red-100 text-red-800 border-red-300"}},MC={chauffeur:{bg:"bg-purple-500",text:"text-purple-900",badge:"bg-purple-100 text-purple-800 border-purple-300"},apprenti:{bg:"bg-blue-500",text:"text-blue-900",badge:"bg-blue-100 text-blue-800 border-blue-300"},mecanique:{bg:"bg-orange-500",text:"text-orange-900",badge:"bg-orange-100 text-orange-800 border-orange-300"},superviseur:{bg:"bg-green-500",text:"text-green-900",badge:"bg-green-100 text-green-800 border-green-300"}},tCe={completed:{label:"Terminé",color:$p.success,icon:"✓"},in_transit:{label:"En cours",color:$p.warning,icon:"🔄"},scheduled:{label:"Programmé",color:$p.info,icon:"⏳"},cancelled:{label:"Annulé",color:$p.danger,icon:"✕"}},qv={vidange:"🛢️",pneus:"🛞",filtres:"🔧",liquide_frein:"🛑",adblue:"💧",autre:"⚙️"},Kv={"Problème moteur":"🔥","Panne moteur":"🔥","Problème électrique":"⚡","Pneu crevé":"🛞",Pneu:"🛞",Surchauffe:"🌡️",Carburant:"⛽","Panne sèche":"⛽",Autre:"⚠️"},Gf={plateau:"https://picsum.photos/seed/plateau/400/250",benne:"https://picsum.photos/seed/benne/400/250",citerne:"https://picsum.photos/seed/citerne/400/250",frigorifique:"https://picsum.photos/seed/frigorifique/400/250",autre:"https://picsum.photos/seed/remorque/400/250"};function _P({status:e,label:t,showIcon:r=!0,size:n="md"}){const i=tCe[e];let a,s;i?(a=i,e==="completed"?s=es:e==="in_transit"?s=kC:e==="scheduled"?s=tc:s=r1):e==="actif"||e==="completed"?(a={label:t||"OK",color:$p.success,icon:"✓"},s=es):e==="maintenance"||e==="in_transit"?(a={label:t||"En cours",color:$p.warning,icon:"🔄"},s=kC):e==="scheduled"?(a={label:t||"Programmé",color:$p.info,icon:"⏳"},s=tc):(a={label:t||"Problème",color:$p.danger,icon:"⚠️"},s=r1);const l={sm:"text-xs px-2 py-0.5",md:"text-sm px-3 py-1",lg:"text-base px-4 py-1.5"},c={sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"};return o.jsxs(ir,{variant:"secondary",className:`${a.color.badge} border font-semibold ${l[n]} flex items-center gap-1.5`,children:[r&&s&&o.jsx(s,{className:c[n]}),a.label]})}function rCe(){return{playCardSummary:t=>{let r="";switch(t.type){case"vehicle":r=t.details?.nom?`Véhicule ${t.details.nom}`:`Véhicule ${t.title}`,t.details?.couleur&&(r+=`. Couleur: ${t.details.couleur}`),t.details?.immatriculation&&(r+=`. Immatriculation: ${t.details.immatriculation}`),t.details?.marque&&(r+=`. Marque: ${t.details.marque}`),t.details?.modele&&(r+=`. Modèle: ${t.details.modele}`),t.details?.annee&&(r+=`. Année: ${t.details.annee}`),t.details?.status&&(r+=`. Statut: ${t.details.status}`);break;case"trailer":r=`Remorque ${t.title}`,t.details?.capacite&&(r+=`. Capacité: ${t.details.capacite} tonnes`);break;case"crew":r=`${t.title}`,t.details?.role&&(r+=`. Rôle: ${t.details.role}`),t.details?.telephone&&(r+=`. Téléphone: ${t.details.telephone}`);break;case"maintenance":r=`Entretien: ${t.title}`,t.details?.type&&(r+=`. Type: ${t.details.type}`),t.details?.date&&(r+=`. Date: ${t.details.date}`),t.details?.cout&&(r+=`. Coût: ${t.details.cout} FCFA`);break;case"breakdown":r=`Panne: ${t.title}`,t.details?.type&&(r+=`. Type: ${t.details.type}`),t.details?.date&&(r+=`. Date: ${t.details.date}`),t.details?.lieu&&(r+=`. Lieu: ${t.details.lieu}`),t.details?.cout&&(r+=`. Coût: ${t.details.cout} FCFA`);break;case"trip":r=`Voyage: ${t.title}`,t.details?.origine&&(r+=`. De: ${t.details.origine}`),t.details?.destination&&(r+=`. Vers: ${t.details.destination}`),t.details?.status&&(r+=`. Statut: ${t.details.status}`),t.details?.chauffeur&&(r+=`. Chauffeur: ${t.details.chauffeur}`);break}if("speechSynthesis"in window){const n=new SpeechSynthesisUtterance(r);n.lang="fr-FR",n.rate=.9,n.pitch=1,speechSynthesis.speak(n)}else alert(r)}}}function Cx({cardData:e,size:t="sm",className:r=""}){const{playCardSummary:n}=rCe(),i={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"},a={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"};return o.jsx(cm,{children:o.jsxs(zb,{children:[o.jsx(Hb,{asChild:!0,children:o.jsx(Pe,{size:"icon",variant:"ghost",className:`${i[t]} ${r}`,onClick:()=>n(e),"aria-label":"Lire la description audio",children:o.jsx(jbe,{className:a[t]})})}),o.jsx(uy,{children:o.jsx("p",{children:"Lire la description audio"})})]})})}const nCe={vidange:"Vidange",filtres:"Filtres",pneus:"Pneus",liquide_frein:"Freins",adblue:"AdBlue",autre:"Autre"};function H2({type:e,data:t}){const n=(()=>{switch(e){case"vehicle":return{icon:o.jsx(Do,{className:"h-3 w-3"}),text:t.kilometrage?`${(t.kilometrage/1e3).toFixed(0)}k km`:"—"};case"trailer":return{icon:o.jsx(uo,{className:"h-3 w-3"}),text:t.capacite?`${t.capacite} t`:"—"};case"maintenance":return{icon:o.jsx(Do,{className:"h-3 w-3"}),text:t.immatriculation||(t.maintenanceType?nCe[t.maintenanceType]||t.maintenanceType:"Entretien")};case"breakdown":return{icon:o.jsx(Do,{className:"h-3 w-3"}),text:t.immatriculation||t.breakdownType||"Panne"};default:return null}})();return n?e==="vehicle"||e==="trailer"?o.jsxs(ir,{variant:"secondary",className:"inline-flex items-center gap-1.5 px-2.5 py-1 bg-background/95 backdrop-blur-sm border shadow-md text-xs font-medium w-fit max-w-full",children:[n.icon,o.jsx("span",{className:"whitespace-nowrap",children:n.text})]}):o.jsxs(ir,{variant:"secondary",className:"absolute bottom-10 left-3 inline-flex items-center gap-1.5 px-2.5 py-1 bg-background/95 backdrop-blur-sm border shadow-md text-xs font-medium z-10 w-fit max-w-full",children:[n.icon,o.jsx("span",{className:"whitespace-nowrap",children:n.text})]}):null}function hn(e){if(!e)return null;if(e.startsWith("http://")||e.startsWith("https://"))return e;const t=e.startsWith("/")?e:`/${e}`;return ch(t)}function Nee({id:e,immatriculation:t,nom:r,couleur:n,marque:i,modele:a,annee:s,photoUrl:l,kilometrage:c,onEdit:u,onDelete:d,onViewTrips:f}){return o.jsxs(_t,{"data-testid":`card-vehicle-${e}`,className:"hover-elevate overflow-hidden",children:[l&&o.jsxs("div",{className:"relative w-full aspect-video overflow-hidden rounded-t-xl bg-muted mb-3",children:[o.jsx("img",{src:hn(l)||void 0,alt:`Véhicule ${t}`,className:"w-full h-full object-cover",onError:m=>{m.target.style.display="none"}}),o.jsxs("div",{className:"absolute top-3 left-3 flex items-center gap-2 z-20",children:[o.jsx(ir,{variant:"secondary",className:"font-mono font-semibold text-xs px-2.5 py-1 bg-background/95 backdrop-blur-sm shadow-md border inline-flex items-center","data-testid":`text-registration-${e}`,children:t}),o.jsx(H2,{type:"vehicle",data:{kilometrage:c||null}})]})]}),o.jsx(Xr,{className:l?"space-y-3 pb-4 pt-4":"space-y-3 pb-4",children:o.jsxs("div",{className:"flex items-start justify-between gap-2",children:[o.jsxs("div",{className:"flex-1",children:[r&&o.jsx("h3",{className:"text-base md:text-lg font-semibold","data-testid":`text-name-${e}`,children:r}),!l&&!r&&o.jsx("h3",{className:"text-base md:text-lg font-semibold font-mono","data-testid":`text-registration-${e}`,children:t}),n&&o.jsx("div",{className:"flex items-center gap-2 mt-1",children:o.jsx("span",{className:"text-xs text-muted-foreground","data-testid":`text-color-${e}`,children:n})}),status&&o.jsx("div",{className:"flex items-center gap-2 mt-2",children:o.jsx(_P,{status,size:"sm"})})]}),o.jsx(Cx,{cardData:{type:"vehicle",title:r||t,details:{nom:r||void 0,couleur:n||void 0,immatriculation:t,marque:i||void 0,modele:a||void 0,annee:s||void 0,status:status||void 0}},size:"sm"})]})}),o.jsxs(ar,{className:"pb-4 space-y-3",children:[!r&&o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Immatriculation"}),o.jsx("p",{className:"font-mono font-semibold text-base","data-testid":`text-registration-${e}`,children:t})]}),r&&o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Immatriculation"}),o.jsx("p",{className:"font-mono text-sm","data-testid":`text-registration-${e}`,children:t})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Marque"}),o.jsx("p",{className:"font-semibold text-base","data-testid":`text-brand-${e}`,children:i||"—"})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Modèle"}),o.jsx("p",{className:"font-semibold text-base","data-testid":`text-model-${e}`,children:a||"—"})]})]}),s&&o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Année"}),o.jsx("p",{className:"font-medium text-sm","data-testid":`text-year-${e}`,children:s})]})]}),o.jsx(Zb,{className:"gap-2 pt-4 border-t",children:o.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 w-full",children:[o.jsxs(Pe,{size:"sm",variant:"outline",onClick:()=>u?.(e),"data-testid":`button-edit-${e}`,className:"flex-1 h-10",children:[o.jsx(Lf,{className:"h-4 w-4 mr-2"}),"Modifier"]}),o.jsxs(Pe,{size:"sm",variant:"outline",onClick:()=>f?.(e),"data-testid":`button-view-trips-${e}`,className:"flex-1 h-10",children:[o.jsx(oP,{className:"h-4 w-4 mr-2"}),"Voyages"]}),d&&o.jsxs(Pe,{size:"sm",variant:"destructive",onClick:()=>d(e),"data-testid":`button-delete-${e}`,className:"flex-1 h-10",children:[o.jsx(fo,{className:"h-4 w-4 mr-2"}),"Supprimer"]})]})})]})}const kee=6048e5,iCe=864e5,AL=Symbol.for("constructDateFrom");function go(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&AL in e?e[AL](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ui(e,t){return go(t||e,e)}function _ee(e,t,r){const n=Ui(e,r?.in);return isNaN(t)?go(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function jee(e,t,r){const n=Ui(e,r?.in);if(isNaN(t))return go(e,NaN);if(!t)return n;const i=n.getDate(),a=go(e,n.getTime());a.setMonth(n.getMonth()+t+1,0);const s=a.getDate();return i>=s?a:(n.setFullYear(a.getFullYear(),a.getMonth(),i),n)}let aCe={};function Jb(){return aCe}function a1(e,t){const r=Jb(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Ui(e,t?.in),a=i.getDay(),s=(a=a.getTime()?n+1:r.getTime()>=l.getTime()?n:n-1}function vL(e){const t=Ui(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function D1(e,...t){const r=go.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function s1(e,t){const r=Ui(e,t?.in);return r.setHours(0,0,0,0),r}function W3(e,t,r){const[n,i]=D1(r?.in,e,t),a=s1(n),s=s1(i),l=+a-vL(a),c=+s-vL(s);return Math.round((l-c)/iCe)}function sCe(e,t){const r=Dee(e,t),n=go(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),W2(n)}function oCe(e,t,r){return _ee(e,t*7,r)}function lCe(e,t,r){return jee(e,t*12,r)}function cCe(e,t){let r,n=t?.in;return e.forEach(i=>{!n&&typeof i=="object"&&(n=go.bind(null,i));const a=Ui(i,n);(!r||r{!n&&typeof i=="object"&&(n=go.bind(null,i));const a=Ui(i,n);(!r||r>a||isNaN(+a))&&(r=a)}),go(n,r||NaN)}function dCe(e,t,r){const[n,i]=D1(r?.in,e,t);return+s1(n)==+s1(i)}function Tee(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function fCe(e){return!(!Tee(e)&&typeof e!="number"||isNaN(+Ui(e)))}function Pee(e,t,r){const[n,i]=D1(r?.in,e,t),a=n.getFullYear()-i.getFullYear(),s=n.getMonth()-i.getMonth();return a*12+s}function hCe(e,t,r){const[n,i]=D1(r?.in,e,t),a=xL(n,i),s=Math.abs(W3(n,i));n.setDate(n.getDate()-a*s);const l=+(xL(n,i)===-a),c=a*(s-l);return c===0?0:c}function xL(e,t){const r=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return r<0?-1:r>0?1:r}function yL(e,t){const r=Ui(e,t?.in);return r.setHours(23,59,59,999),r}function Oee(e,t){const r=Ui(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function Ree(e,t){const[r,n]=D1(e,t.start,t.end);return{start:r,end:n}}function mCe(e,t){const{start:r,end:n}=Ree(t?.in,e);let i=+r>+n;const a=i?+r:+n,s=i?n:r;s.setHours(0,0,0,0),s.setDate(1);let l=1;const c=[];for(;+s<=a;)c.push(go(r,s)),s.setMonth(s.getMonth()+l);return i?c.reverse():c}function pCe(e,t){const r=Ui(e,t?.in),n=r.getMonth(),i=n-n%3;return r.setMonth(i,1),r.setHours(0,0,0,0),r}function Fee(e,t){const r=Ui(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function Mee(e,t){const r=Ui(e,t?.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}function jP(e,t){const r=Ui(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function gCe(e,t){const{start:r,end:n}=Ree(t?.in,e);let i=+r>+n;const a=i?+r:+n,s=i?n:r;s.setHours(0,0,0,0),s.setMonth(0,1);let l=1;const c=[];for(;+s<=a;)c.push(go(r,s)),s.setFullYear(s.getFullYear()+l);return i?c.reverse():c}function DP(e,t){const r=Jb(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Ui(e,t?.in),a=i.getDay(),s=(a{let n;const i=xCe[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function ix(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const bCe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wCe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ECe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},CCe={date:ix({formats:bCe,defaultWidth:"full"}),time:ix({formats:wCe,defaultWidth:"full"}),dateTime:ix({formats:ECe,defaultWidth:"full"})},ICe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},SCe=(e,t,r,n)=>ICe[e];function Cf(e){return(t,r)=>{const n=r?.context?String(r.context):"standalone";let i;if(n==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,l=r?.width?String(r.width):s;i=e.formattingValues[l]||e.formattingValues[s]}else{const s=e.defaultWidth,l=r?.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const BCe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},NCe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},kCe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},_Ce={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},jCe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},DCe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},TCe=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},PCe={ordinalNumber:TCe,era:Cf({values:BCe,defaultWidth:"wide"}),quarter:Cf({values:NCe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Cf({values:kCe,defaultWidth:"wide"}),day:Cf({values:_Ce,defaultWidth:"wide"}),dayPeriod:Cf({values:jCe,defaultWidth:"wide",formattingValues:DCe,defaultFormattingWidth:"wide"})};function If(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const s=a[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?RCe(l,f=>f.test(s)):OCe(l,f=>f.test(s));let u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;const d=t.slice(s.length);return{value:u,rest:d}}}function OCe(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function RCe(e,t){for(let r=0;r{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=r.valueCallback?r.valueCallback(s):s;const l=t.slice(i.length);return{value:s,rest:l}}}const FCe=/^(\d+)(th|st|nd|rd)?/i,MCe=/\d+/i,QCe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},LCe={any:[/^b/i,/^(a|c)/i]},UCe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},$Ce={any:[/1/i,/2/i,/3/i,/4/i]},zCe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},HCe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},WCe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},GCe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},qCe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},KCe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},VCe={ordinalNumber:Qee({matchPattern:FCe,parsePattern:MCe,valueCallback:e=>parseInt(e,10)}),era:If({matchPatterns:QCe,defaultMatchWidth:"wide",parsePatterns:LCe,defaultParseWidth:"any"}),quarter:If({matchPatterns:UCe,defaultMatchWidth:"wide",parsePatterns:$Ce,defaultParseWidth:"any",valueCallback:e=>e+1}),month:If({matchPatterns:zCe,defaultMatchWidth:"wide",parsePatterns:HCe,defaultParseWidth:"any"}),day:If({matchPatterns:WCe,defaultMatchWidth:"wide",parsePatterns:GCe,defaultParseWidth:"any"}),dayPeriod:If({matchPatterns:qCe,defaultMatchWidth:"any",parsePatterns:KCe,defaultParseWidth:"any"})},$v={code:"en-US",formatDistance:yCe,formatLong:CCe,formatRelative:SCe,localize:PCe,match:VCe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function YCe(e,t){const r=Ui(e,t?.in);return W3(r,jP(r))+1}function TP(e,t){const r=Ui(e,t?.in),n=+W2(r)-+sCe(r);return Math.round(n/kee)+1}function Lee(e,t){const r=Ui(e,t?.in),n=r.getFullYear(),i=Jb(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,s=go(t?.in||e,0);s.setFullYear(n+1,0,a),s.setHours(0,0,0,0);const l=a1(s,t),c=go(t?.in||e,0);c.setFullYear(n,0,a),c.setHours(0,0,0,0);const u=a1(c,t);return+r>=+l?n+1:+r>=+u?n:n-1}function ZCe(e,t){const r=Jb(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=Lee(e,t),a=go(t?.in||e,0);return a.setFullYear(i,0,n),a.setHours(0,0,0,0),a1(a,t)}function PP(e,t){const r=Ui(e,t?.in),n=+a1(r,t)-+ZCe(r,t);return Math.round(n/kee)+1}function Yi(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const Ep={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Yi(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Yi(r+1,2)},d(e,t){return Yi(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Yi(e.getHours()%12||12,t.length)},H(e,t){return Yi(e.getHours(),t.length)},m(e,t){return Yi(e.getMinutes(),t.length)},s(e,t){return Yi(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return Yi(i,t.length)}},_v={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},bL={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return Ep.y(e,t)},Y:function(e,t,r,n){const i=Lee(e,n),a=i>0?i:1-i;if(t==="YY"){const s=a%100;return Yi(s,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):Yi(a,t.length)},R:function(e,t){const r=Dee(e);return Yi(r,t.length)},u:function(e,t){const r=e.getFullYear();return Yi(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Yi(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Yi(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Ep.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Yi(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const i=PP(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):Yi(i,t.length)},I:function(e,t,r){const n=TP(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Yi(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Ep.d(e,t)},D:function(e,t,r){const n=YCe(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Yi(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const i=e.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Yi(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const i=e.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Yi(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return Yi(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let i;switch(n===12?i=_v.noon:n===0?i=_v.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let i;switch(n>=17?i=_v.evening:n>=12?i=_v.afternoon:n>=4?i=_v.morning:i=_v.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Ep.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Ep.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Yi(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Yi(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ep.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Ep.s(e,t)},S:function(e,t){return Ep.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return EL(n);case"XXXX":case"XX":return vA(n);default:return vA(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return EL(n);case"xxxx":case"xx":return vA(n);default:return vA(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+wL(n,":");default:return"GMT"+vA(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+wL(n,":");default:return"GMT"+vA(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return Yi(n,t.length)},T:function(e,t,r){return Yi(+e,t.length)}};function wL(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),a=n%60;return a===0?r+String(i):r+String(i)+t+Yi(a,2)}function EL(e,t){return e%60===0?(e>0?"-":"+")+Yi(Math.abs(e)/60,2):vA(e,t)}function vA(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Yi(Math.trunc(n/60),2),a=Yi(n%60,2);return r+i+t+a}const CL=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Uee=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},JCe=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return CL(e,t);let a;switch(n){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",CL(n,t)).replace("{{time}}",Uee(i,t))},XCe={p:Uee,P:JCe},eIe=/^D+$/,tIe=/^Y+$/,rIe=["D","DD","YY","YYYY"];function nIe(e){return eIe.test(e)}function iIe(e){return tIe.test(e)}function aIe(e,t,r){const n=sIe(e,t,r);if(console.warn(n),rIe.includes(e))throw new RangeError(n)}function sIe(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const oIe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,lIe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cIe=/^'([^]*?)'?$/,uIe=/''/g,dIe=/[a-zA-Z]/;function Kr(e,t,r){const n=Jb(),i=r?.locale??n.locale??$v,a=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,l=Ui(e,r?.in);if(!fCe(l))throw new RangeError("Invalid time value");let c=t.match(lIe).map(d=>{const f=d[0];if(f==="p"||f==="P"){const m=XCe[f];return m(d,i.formatLong)}return d}).join("").match(oIe).map(d=>{if(d==="''")return{isToken:!1,value:"'"};const f=d[0];if(f==="'")return{isToken:!1,value:fIe(d)};if(bL[f])return{isToken:!0,value:d};if(f.match(dIe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});i.localize.preprocessor&&(c=i.localize.preprocessor(l,c));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:i};return c.map(d=>{if(!d.isToken)return d.value;const f=d.value;(!r?.useAdditionalWeekYearTokens&&iIe(f)||!r?.useAdditionalDayOfYearTokens&&nIe(f))&&aIe(f,t,String(e));const m=bL[f[0]];return m(l,f,i.localize,u)}).join("")}function fIe(e){const t=e.match(cIe);return t?t[1].replace(uIe,"'"):e}function hIe(e,t){const r=Ui(e,t?.in),n=r.getFullYear(),i=r.getMonth(),a=go(r,0);return a.setFullYear(n,i+1,0),a.setHours(0,0,0,0),a.getDate()}function mIe(e,t){return Ui(e,t?.in).getMonth()}function pIe(e,t){return Ui(e,t?.in).getFullYear()}function gIe(e,t){return+Ui(e)>+Ui(t)}function AIe(e,t){return+Ui(e)<+Ui(t)}function vIe(e,t,r){const[n,i]=D1(r?.in,e,t);return n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()}function xIe(e,t,r){const[n,i]=D1(r?.in,e,t);return n.getFullYear()===i.getFullYear()}function yIe(e,t,r){const n=Ui(e,r?.in),i=n.getFullYear(),a=n.getDate(),s=go(e,0);s.setFullYear(i,t,15),s.setHours(0,0,0,0);const l=hIe(s);return n.setMonth(t,Math.min(a,l)),n}function bIe(e,t,r){const n=Ui(e,r?.in);return isNaN(+n)?go(e,NaN):(n.setFullYear(t),n)}const wIe={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},EIe=(e,t,r)=>{let n;const i=wIe[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",String(t)),r?.addSuffix?r.comparison&&r.comparison>0?"dans "+n:"il y a "+n:n},CIe={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},IIe={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},SIe={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},BIe={date:ix({formats:CIe,defaultWidth:"full"}),time:ix({formats:IIe,defaultWidth:"full"}),dateTime:ix({formats:SIe,defaultWidth:"full"})},NIe={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},kIe=(e,t,r,n)=>NIe[e],_Ie={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},jIe={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},DIe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},TIe={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},PIe={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},OIe=(e,t)=>{const r=Number(e),n=t?.unit;if(r===0)return"0";const i=["year","week","hour","minute","second"];let a;return r===1?a=n&&i.includes(n)?"ère":"er":a="ème",r+a},RIe=["MMM","MMMM"],FIe={preprocessor:(e,t)=>e.getDate()===1||!t.some(n=>n.isToken&&RIe.includes(n.value))?t:t.map(n=>n.isToken&&n.value==="do"?{isToken:!0,value:"d"}:n),ordinalNumber:OIe,era:Cf({values:_Ie,defaultWidth:"wide"}),quarter:Cf({values:jIe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Cf({values:DIe,defaultWidth:"wide"}),day:Cf({values:TIe,defaultWidth:"wide"}),dayPeriod:Cf({values:PIe,defaultWidth:"wide"})},MIe=/^(\d+)(ième|ère|ème|er|e)?/i,QIe=/\d+/i,LIe={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},UIe={any:[/^av/i,/^ap/i]},$Ie={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},zIe={any:[/1/i,/2/i,/3/i,/4/i]},HIe={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},WIe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},GIe={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},qIe={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},KIe={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},VIe={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},YIe={ordinalNumber:Qee({matchPattern:MIe,parsePattern:QIe,valueCallback:e=>parseInt(e)}),era:If({matchPatterns:LIe,defaultMatchWidth:"wide",parsePatterns:UIe,defaultParseWidth:"any"}),quarter:If({matchPatterns:$Ie,defaultMatchWidth:"wide",parsePatterns:zIe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:If({matchPatterns:HIe,defaultMatchWidth:"wide",parsePatterns:WIe,defaultParseWidth:"any"}),day:If({matchPatterns:GIe,defaultMatchWidth:"wide",parsePatterns:qIe,defaultParseWidth:"any"}),dayPeriod:If({matchPatterns:KIe,defaultMatchWidth:"any",parsePatterns:VIe,defaultParseWidth:"any"})},tn={code:"fr",formatDistance:EIe,formatLong:BIe,formatRelative:kIe,localize:FIe,match:YIe,options:{weekStartsOn:1,firstWeekContainsDate:4}};function OP({id:e,vehicleRegistration:t,origine:r,destination:n,dateDepart:i,dateArrivee:a,status:s="scheduled",vehiclePhotoUrl:l,driverPhotoUrl:c,driverName:u,onEdit:d,onDelete:f,hasBreakdown:m=!1}){return o.jsxs(_t,{"data-testid":`card-trip-${e}`,className:"hover-elevate",children:[o.jsxs(ny,{href:`/trajets/${e}`,className:"block",children:[o.jsx(Xr,{className:"space-y-3 pb-4 cursor-pointer",children:o.jsxs("div",{className:"flex items-start justify-between gap-3",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Véhicule"}),o.jsxs("div",{className:"flex items-center gap-3",children:[l?o.jsx("img",{src:l,alt:t,className:"w-12 h-12 object-cover rounded-lg border flex-shrink-0",onError:g=>{g.target.style.display="none"}}):o.jsx("div",{className:"w-12 h-12 bg-muted rounded-lg flex items-center justify-center border flex-shrink-0",children:o.jsx(Do,{className:"h-6 w-6 text-muted-foreground"})}),o.jsx("p",{className:"font-mono font-semibold text-base","data-testid":`text-vehicle-${e}`,children:t})]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[c&&u&&o.jsx(cm,{children:o.jsxs(zb,{children:[o.jsx(Hb,{asChild:!0,children:o.jsx("div",{className:"w-10 h-10 rounded-full overflow-hidden border-2 border-border shadow-sm cursor-help",children:o.jsx("img",{src:c,alt:u,className:"w-full h-full object-cover",onError:g=>{g.target.style.display="none"}})})}),o.jsx(uy,{children:o.jsxs("p",{children:["Chauffeur : ",u]})})]})}),o.jsxs("div",{className:"flex flex-col gap-1.5 items-end",children:[o.jsx("div",{"data-testid":`badge-status-${e}`,children:o.jsx(_P,{status:s,size:"sm"})}),m&&o.jsxs(ir,{variant:"destructive",className:"text-xs px-2 py-1 border shadow-md flex items-center gap-1",children:[o.jsx(Vp,{className:"h-3 w-3"}),"Panne"]})]}),o.jsx(Cx,{cardData:{type:"trip",title:t,details:{origine:r,destination:n,status:s,chauffeur:u,dateDepart:Kr(i,"dd MMM yyyy HH:mm",{locale:tn}),dateArrivee:a?Kr(a,"dd MMM yyyy HH:mm",{locale:tn}):void 0}},size:"sm"})]})]})}),o.jsxs(ar,{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx(rs,{className:"h-5 w-5 mt-0.5 text-primary flex-shrink-0"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm font-semibold truncate","data-testid":`text-origin-${e}`,children:r}),o.jsx("p",{className:"text-xs text-muted-foreground my-1",children:"→"}),o.jsx("p",{className:"text-sm font-semibold truncate","data-testid":`text-destination-${e}`,children:n})]})]}),o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx(tc,{className:"h-5 w-5 mt-0.5 text-primary flex-shrink-0"}),o.jsxs("div",{className:"flex-1 text-sm",children:[o.jsxs("p",{"data-testid":`text-departure-${e}`,className:"mb-1",children:[o.jsx("span",{className:"text-muted-foreground",children:"Départ:"})," ",o.jsx("span",{className:"font-medium",children:Kr(i,"dd MMM yyyy HH:mm",{locale:tn})})]}),a&&o.jsxs("p",{"data-testid":`text-arrival-${e}`,children:[o.jsx("span",{className:"text-muted-foreground",children:"Arrivée:"})," ",o.jsx("span",{className:"font-medium",children:Kr(a,"dd MMM yyyy HH:mm",{locale:tn})})]})]})]})]})]}),(d||f)&&o.jsxs(Zb,{className:"gap-2 pt-4 border-t flex-wrap",children:[d&&o.jsxs(Pe,{size:"sm",variant:"outline",onClick:g=>{g.preventDefault(),g.stopPropagation(),d(e)},"data-testid":`button-edit-${e}`,className:"flex-1 min-w-[100px] h-10",children:[o.jsx(Lf,{className:"h-4 w-4 mr-2"}),"Modifier"]}),f&&o.jsxs(Pe,{size:"sm",variant:"outline",onClick:g=>{g.preventDefault(),g.stopPropagation(),f(e)},"data-testid":`button-delete-${e}`,className:"flex-1 min-w-[100px] h-10 text-destructive hover:text-destructive",children:[o.jsx(fo,{className:"h-4 w-4 mr-2"}),"Supprimer"]})]})]})}var ZIe=w.createContext(void 0);function G3(e){const t=w.useContext(ZIe);return e||t||"ltr"}var BN="rovingFocusGroup.onEntryFocus",JIe={bubbles:!1,cancelable:!0},Xb="RovingFocusGroup",[R8,$ee,XIe]=b3(Xb),[e3e,q3]=Hu(Xb,[XIe]),[t3e,r3e]=e3e(Xb),zee=w.forwardRef((e,t)=>o.jsx(R8.Provider,{scope:e.__scopeRovingFocusGroup,children:o.jsx(R8.Slot,{scope:e.__scopeRovingFocusGroup,children:o.jsx(n3e,{...e,ref:t})})}));zee.displayName=Xb;var n3e=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,m=w.useRef(null),g=qn(t,m),A=G3(a),[v,b]=Hf({prop:s,defaultProp:l??null,onChange:c,caller:Xb}),[E,I]=w.useState(!1),S=Yc(u),_=$ee(r),B=w.useRef(!1),[T,P]=w.useState(0);return w.useEffect(()=>{const O=m.current;if(O)return O.addEventListener(BN,S),()=>O.removeEventListener(BN,S)},[S]),o.jsx(t3e,{scope:r,orientation:n,dir:A,loop:i,currentTabStopId:v,onItemFocus:w.useCallback(O=>b(O),[b]),onItemShiftTab:w.useCallback(()=>I(!0),[]),onFocusableItemAdd:w.useCallback(()=>P(O=>O+1),[]),onFocusableItemRemove:w.useCallback(()=>P(O=>O-1),[]),children:o.jsx(mn.div,{tabIndex:E||T===0?-1:0,"data-orientation":n,...f,ref:g,style:{outline:"none",...e.style},onMouseDown:dr(e.onMouseDown,()=>{B.current=!0}),onFocus:dr(e.onFocus,O=>{const z=!B.current;if(O.target===O.currentTarget&&z&&!E){const L=new CustomEvent(BN,JIe);if(O.currentTarget.dispatchEvent(L),!L.defaultPrevented){const W=_().filter(K=>K.focusable),R=W.find(K=>K.active),$=W.find(K=>K.id===v),Z=[R,$,...W].filter(Boolean).map(K=>K.ref.current);Gee(Z,d)}}B.current=!1}),onBlur:dr(e.onBlur,()=>I(!1))})})}),Hee="RovingFocusGroupItem",Wee=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:a,children:s,...l}=e,c=R0(),u=a||c,d=r3e(Hee,r),f=d.currentTabStopId===u,m=$ee(r),{onFocusableItemAdd:g,onFocusableItemRemove:A,currentTabStopId:v}=d;return w.useEffect(()=>{if(n)return g(),()=>A()},[n,g,A]),o.jsx(R8.ItemSlot,{scope:r,id:u,focusable:n,active:i,children:o.jsx(mn.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:dr(e.onMouseDown,b=>{n?d.onItemFocus(u):b.preventDefault()}),onFocus:dr(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:dr(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const E=s3e(b,d.orientation,d.dir);if(E!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let S=m().filter(_=>_.focusable).map(_=>_.ref.current);if(E==="last")S.reverse();else if(E==="prev"||E==="next"){E==="prev"&&S.reverse();const _=S.indexOf(b.currentTarget);S=d.loop?o3e(S,_+1):S.slice(_+1)}setTimeout(()=>Gee(S))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:v!=null}):s})})});Wee.displayName=Hee;var i3e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function a3e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function s3e(e,t,r){const n=a3e(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return i3e[n]}function Gee(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function o3e(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var qee=zee,Kee=Wee,K3="Tabs",[l3e]=Hu(K3,[q3]),Vee=q3(),[c3e,RP]=l3e(K3),Yee=w.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=G3(l),[f,m]=Hf({prop:n,onChange:i,defaultProp:a??"",caller:K3});return o.jsx(c3e,{scope:r,baseId:R0(),value:f,onValueChange:m,orientation:s,dir:d,activationMode:c,children:o.jsx(mn.div,{dir:d,"data-orientation":s,...u,ref:t})})});Yee.displayName=K3;var Zee="TabsList",Jee=w.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...i}=e,a=RP(Zee,r),s=Vee(r);return o.jsx(qee,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:n,children:o.jsx(mn.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});Jee.displayName=Zee;var Xee="TabsTrigger",ete=w.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...a}=e,s=RP(Xee,r),l=Vee(r),c=nte(s.baseId,n),u=ite(s.baseId,n),d=n===s.value;return o.jsx(Kee,{asChild:!0,...l,focusable:!i,active:d,children:o.jsx(mn.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...a,ref:t,onMouseDown:dr(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?s.onValueChange(n):f.preventDefault()}),onKeyDown:dr(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&s.onValueChange(n)}),onFocus:dr(e.onFocus,()=>{const f=s.activationMode!=="manual";!d&&!i&&f&&s.onValueChange(n)})})})});ete.displayName=Xee;var tte="TabsContent",rte=w.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:i,children:a,...s}=e,l=RP(tte,r),c=nte(l.baseId,n),u=ite(l.baseId,n),d=n===l.value,f=w.useRef(d);return w.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),o.jsx(Jc,{present:i||d,children:({present:m})=>o.jsx(mn.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!m,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&a})})});rte.displayName=tte;function nte(e,t){return`${e}-trigger-${t}`}function ite(e,t){return`${e}-content-${t}`}var u3e=Yee,ate=Jee,ste=ete,ote=rte;const vg=u3e,Bm=w.forwardRef(({className:e,...t},r)=>o.jsx(ate,{ref:r,className:qt("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Bm.displayName=ate.displayName;const Ii=w.forwardRef(({className:e,...t},r)=>o.jsx(ste,{ref:r,className:qt("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Ii.displayName=ste.displayName;const Ms=w.forwardRef(({className:e,...t},r)=>o.jsx(ote,{ref:r,className:qt("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ms.displayName=ote.displayName;function d3e(){const{data:e=[],isLoading:t}=Ar({queryKey:["/api/vehicles"]}),{data:r=[],isLoading:n}=Ar({queryKey:["/api/trips"]}),{data:i=[]}=Ar({queryKey:["/api/maintenances"]}),a=mJ({queries:r.map(m=>({queryKey:["/api/trips",m.id.toString(),"crew"],queryFn:HA({on401:"throw"}),enabled:r.length>0}))}),s=w.useMemo(()=>{const m=new Map;return a.forEach((g,A)=>{g.data&&r[A]&&m.set(r[A].id,g.data)}),m},[a,r]),l=w.useMemo(()=>e.map(m=>{const g=i.filter(A=>A.vehicleId===m.id&&A.kilometrageEffectue).sort((A,v)=>{const b=A.dateEffectuee?new Date(A.dateEffectuee).getTime():0;return(v.dateEffectuee?new Date(v.dateEffectuee).getTime():0)-b})[0];return{...m,kilometrage:g?.kilometrageEffectue||null}}),[e,i]),c=w.useMemo(()=>r.map(m=>{const g=e.find(E=>E.id===m.vehicleId),v=(s.get(m.id)||[]).find(E=>E.role==="chauffeur"),b=v;return{...m,vehicleRegistration:g?.immatriculation||"",vehiclePhotoUrl:g?.photoUrl||null,driverPhotoUrl:b?.photoUrl||null,driverName:v?`${v.prenom} ${v.nom}`:void 0}}),[r,e,s]),u=r.filter(m=>m.status==="in_transit").length,d=r.filter(m=>m.status==="scheduled").length;return t||n?o.jsx("div",{className:"flex justify-center items-center h-[calc(100vh-200px)]",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):o.jsxs("div",{className:"space-y-6 md:space-y-8 pb-20 md:pb-0",children:[o.jsx("div",{className:"flex flex-col items-center md:items-start gap-4",children:o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("img",{src:"/logo-parc-app.png",alt:"Parc'App Logo",className:"h-12 md:h-16 w-auto"}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl md:text-2xl font-semibold","data-testid":"text-page-title",children:"Tableau de bord"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Vue d'ensemble de vos opérations"})]})]})}),o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 md:gap-4",children:[o.jsx(c4,{title:"Véhicules",value:e.length,icon:Do,color:"primary"}),o.jsx(c4,{title:"En cours",value:u,icon:rs,color:"secondary"}),o.jsx(c4,{title:"À venir",value:d,icon:tc,color:"accent"}),o.jsx(c4,{title:"Terminés",value:r.filter(m=>m.status==="completed").length,icon:es,color:"primary"})]}),o.jsxs(vg,{defaultValue:"recent-trips",className:"space-y-4",children:[o.jsxs(Bm,{className:"w-full md:w-auto",children:[o.jsx(Ii,{value:"recent-trips","data-testid":"tab-recent-trips",className:"flex-1 md:flex-none",children:"Derniers voyages"}),o.jsx(Ii,{value:"fleet","data-testid":"tab-fleet",className:"flex-1 md:flex-none",children:"Parc"})]}),o.jsxs(Ms,{value:"recent-trips",className:"space-y-4",children:[o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:c.slice(0,6).map(m=>o.jsx(OP,{...m,dateArrivee:m.dateArrivee??void 0,vehiclePhotoUrl:m.vehiclePhotoUrl,driverPhotoUrl:m.driverPhotoUrl,driverName:m.driverName},m.id))}),c.length===0&&o.jsx("div",{className:"text-center py-12",children:o.jsx("p",{className:"text-muted-foreground",children:"Aucun voyage récent"})})]}),o.jsxs(Ms,{value:"fleet",className:"space-y-4",children:[o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:l.map(m=>o.jsx(Nee,{...m,onEdit:g=>console.log("Modifier véhicule",g),onViewTrips:g=>console.log("Voir voyages pour véhicule",g)},m.id))}),e.length===0&&o.jsx("div",{className:"text-center py-12",children:o.jsx("p",{className:"text-muted-foreground",children:"Aucun véhicule dans votre parc"})})]})]})]})}const ci=SP,xg=xee,f3e=BP,lte=w.forwardRef(({className:e,...t},r)=>o.jsx(qb,{ref:r,className:qt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));lte.displayName=qb.displayName;const Zn=w.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(f3e,{children:[o.jsx(lte,{}),o.jsxs(Kb,{ref:n,className:qt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,o.jsxs(z3,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[o.jsx(G0,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Zn.displayName=Kb.displayName;const Jn=({className:e,...t})=>o.jsx("div",{className:qt("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Jn.displayName="DialogHeader";const ji=({className:e,...t})=>o.jsx("div",{className:qt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ji.displayName="DialogFooter";const Xn=w.forwardRef(({className:e,...t},r)=>o.jsx(Vb,{ref:r,className:qt("text-lg font-semibold leading-none tracking-tight",e),...t}));Xn.displayName=Vb.displayName;const Ci=w.forwardRef(({className:e,...t},r)=>o.jsx(Yb,{ref:r,className:qt("text-sm text-muted-foreground",e),...t}));Ci.displayName=Yb.displayName;var h3e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],m3e=h3e.reduce((e,t)=>{const r=M3(`Primitive.${t}`),n=w.forwardRef((i,a)=>{const{asChild:s,...l}=i,c=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(c,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),p3e="Label",cte=w.forwardRef((e,t)=>o.jsx(m3e.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));cte.displayName=p3e;var ute=cte;const g3e=k1("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Je=w.forwardRef(({className:e,...t},r)=>o.jsx(ute,{ref:r,className:qt(g3e(),e),...t}));Je.displayName=ute.displayName;function A3e({onAdd:e,trigger:t,open:r,onOpenChange:n}){const[i,a]=w.useState(!1),s=r!==void 0?r:i,l=n||a,{toast:c}=sn(),[u,d]=w.useState({immatriculation:"",nom:"",couleur:"",marque:"",modele:"",annee:new Date().getFullYear(),photoUrl:""}),[f,m]=w.useState(null),[g,A]=w.useState(null),[v,b]=w.useState(!1),E=B=>{const T=B.target.files?.[0];if(T){if(!T.type.startsWith("image/")){c({variant:"destructive",title:"Erreur",description:"Veuillez sélectionner un fichier image"});return}if(T.size>5*1024*1024){c({variant:"destructive",title:"Erreur",description:"Le fichier est trop volumineux (max 5MB)"});return}m(T);const P=new FileReader;P.onloadend=()=>{A(P.result)},P.readAsDataURL(T),d({...u,photoUrl:""})}},I=()=>{m(null),A(null)},S=async()=>{if(!f)return null;b(!0);try{const B=new FormData;B.append("photo",f);const T=ch("/api/upload/vehicle-photo"),P=mm(),O={};P&&(O.Authorization=`Bearer ${P}`);const z=await fetch(T,{method:"POST",headers:O,body:B,credentials:"include"});if(!z.ok){const W=await z.json().catch(()=>({message:"Erreur lors de l'upload"}));throw new Error(W.message||"Erreur lors de l'upload")}const L=await z.json();return{url:L.url,publicId:L.publicId}}catch(B){return c({variant:"destructive",title:"Erreur",description:B instanceof Error?B.message:"Erreur lors de l'upload du fichier"}),null}finally{b(!1)}},_=async B=>{B.preventDefault();let T=u.photoUrl?.trim()||void 0,P;if(f){const z=await S();if(z)T=z.url,P=z.publicId;else return}const O={...u,photoUrl:T,photoCloudinaryPublicId:P,annee:u.annee&&!isNaN(u.annee)?u.annee:void 0,nom:u.nom?.trim()||void 0,couleur:u.couleur?.trim()||void 0,marque:u.marque?.trim()||void 0,modele:u.modele?.trim()||void 0};if(!O.immatriculation||!O.immatriculation.trim()){c({variant:"destructive",title:"Erreur",description:"L'immatriculation est obligatoire"});return}console.log("[AddVehicleDialog] Submitting vehicle:",O),e?.(O),l(!1),d({immatriculation:"",nom:"",couleur:"",marque:"",modele:"",annee:new Date().getFullYear(),photoUrl:""}),m(null),A(null)};return o.jsxs(ci,{open:s,onOpenChange:l,children:[o.jsx(xg,{asChild:!0,children:t||o.jsxs(Pe,{"data-testid":"button-add-vehicle",className:"w-full md:w-auto",children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Ajouter un véhicule"]})}),o.jsxs(Zn,{className:"sm:max-w-[500px] max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Ajouter un véhicule"}),o.jsx(Ci,{children:"Entrez les détails du véhicule à ajouter à votre parc."})]}),o.jsxs("form",{onSubmit:_,children:[o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"immatriculation",children:["Immatriculation ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"immatriculation",placeholder:"AB-123-CD",value:u.immatriculation,onChange:B=>d({...u,immatriculation:B.target.value}),className:"font-mono h-12",required:!0,"data-testid":"input-registration"})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"nom",children:"Nom du camion"}),o.jsx(wt,{id:"nom",placeholder:"Ex: Le Rouge",value:u.nom||"",onChange:B=>d({...u,nom:B.target.value||void 0}),className:"h-12","data-testid":"input-name"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"couleur",children:"Couleur"}),o.jsx(wt,{id:"couleur",placeholder:"Ex: Rouge, Bleu, Blanc",value:u.couleur||"",onChange:B=>d({...u,couleur:B.target.value||void 0}),className:"h-12","data-testid":"input-color"})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"marque",children:"Marque"}),o.jsx(wt,{id:"marque",placeholder:"Volvo",value:u.marque,onChange:B=>d({...u,marque:B.target.value}),className:"h-12","data-testid":"input-brand"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"modele",children:"Modèle"}),o.jsx(wt,{id:"modele",placeholder:"FH16",value:u.modele,onChange:B=>d({...u,modele:B.target.value}),className:"h-12","data-testid":"input-model"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"annee",children:"Année"}),o.jsx(wt,{id:"annee",type:"number",placeholder:"2023",value:u.annee||"",onChange:B=>{const T=B.target.value,P=T===""?void 0:parseInt(T);d({...u,annee:isNaN(P)?void 0:P})},min:"1900",max:new Date().getFullYear()+1,className:"h-12","data-testid":"input-year"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{children:"Photo du véhicule"}),g?o.jsxs("div",{className:"relative",children:[o.jsx("img",{src:g,alt:"Aperçu",className:"w-full h-48 object-cover rounded-lg border"}),o.jsx(Pe,{type:"button",variant:"destructive",size:"icon",className:"absolute top-2 right-2",onClick:I,children:o.jsx(G0,{className:"h-4 w-4"})})]}):o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Je,{htmlFor:"photo-upload",className:"flex-1 cursor-pointer",children:o.jsxs("div",{className:"flex items-center justify-center gap-2 h-12 border-2 border-dashed rounded-lg hover:bg-accent transition-colors",children:[o.jsx(Pd,{className:"h-4 w-4"}),o.jsx("span",{className:"text-sm",children:"Téléverser une photo"})]})}),o.jsx(wt,{id:"photo-upload",type:"file",accept:"image/*",onChange:E,className:"hidden","data-testid":"input-photo-upload"})]}),o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"absolute inset-0 flex items-center",children:o.jsx("span",{className:"w-full border-t"})}),o.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:o.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"ou"})})]}),o.jsx(wt,{id:"photoUrl",type:"url",placeholder:"https://example.com/photo.jpg",value:u.photoUrl||"",onChange:B=>{d({...u,photoUrl:B.target.value||void 0}),m(null),A(null)},className:"h-12","data-testid":"input-photo-url"})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:f?`Fichier sélectionné : ${f.name} (${(f.size/1024/1024).toFixed(2)} MB)`:"Téléversez une photo ou entrez une URL (optionnel)"})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>l(!1),"data-testid":"button-cancel",className:"w-full sm:w-auto h-12",children:"Annuler"}),o.jsx(Pe,{type:"submit","data-testid":"button-submit",className:"w-full sm:w-auto h-12",disabled:v,children:v?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Upload en cours..."]}):"Ajouter"})]})]})]})]})}function IL(e,[t,r]){return Math.min(r,Math.max(t,e))}function v3e(e){const t=x3e(e),r=w.forwardRef((n,i)=>{const{children:a,...s}=n,l=w.Children.toArray(a),c=l.find(b3e);if(c){const u=c.props.children,d=l.map(f=>f===c?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:f);return o.jsx(t,{...s,ref:i,children:w.isValidElement(u)?w.cloneElement(u,void 0,d):null})}return o.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function x3e(e){const t=w.forwardRef((r,n)=>{const{children:i,...a}=r;if(w.isValidElement(i)){const s=E3e(i),l=w3e(a,i.props);return i.type!==w.Fragment&&(l.ref=n?uh(n,s):s),w.cloneElement(i,l)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var y3e=Symbol("radix.slottable");function b3e(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===y3e}function w3e(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function E3e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function dte(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var C3e=[" ","Enter","ArrowUp","ArrowDown"],I3e=[" ","Enter"],o1="Select",[V3,Y3,S3e]=b3(o1),[dy]=Hu(o1,[S3e,Ag]),Z3=Ag(),[B3e,yg]=dy(o1),[N3e,k3e]=dy(o1),fte=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:a,value:s,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:m,required:g,form:A}=e,v=Z3(t),[b,E]=w.useState(null),[I,S]=w.useState(null),[_,B]=w.useState(!1),T=G3(u),[P,O]=Hf({prop:n,defaultProp:i??!1,onChange:a,caller:o1}),[z,L]=Hf({prop:s,defaultProp:l,onChange:c,caller:o1}),W=w.useRef(null),R=b?A||!!b.closest("form"):!0,[$,X]=w.useState(new Set),Z=Array.from($).map(K=>K.props.value).join(";");return o.jsx(D3,{...v,children:o.jsxs(B3e,{required:g,scope:t,trigger:b,onTriggerChange:E,valueNode:I,onValueNodeChange:S,valueNodeHasChildren:_,onValueNodeHasChildrenChange:B,contentId:R0(),value:z,onValueChange:L,open:P,onOpenChange:O,dir:T,triggerPointerDownPosRef:W,disabled:m,children:[o.jsx(V3.Provider,{scope:t,children:o.jsx(N3e,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(K=>{X(q=>new Set(q).add(K))},[]),onNativeOptionRemove:w.useCallback(K=>{X(q=>{const Y=new Set(q);return Y.delete(K),Y})},[]),children:r})}),R?o.jsxs(Rte,{"aria-hidden":!0,required:g,tabIndex:-1,name:d,autoComplete:f,value:z,onChange:K=>L(K.target.value),disabled:m,form:A,children:[z===void 0?o.jsx("option",{value:""}):null,Array.from($)]},Z):null]})})};fte.displayName=o1;var hte="SelectTrigger",mte=w.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...i}=e,a=Z3(r),s=yg(hte,r),l=s.disabled||n,c=qn(t,s.onTriggerChange),u=Y3(r),d=w.useRef("touch"),[f,m,g]=Mte(v=>{const b=u().filter(S=>!S.disabled),E=b.find(S=>S.value===s.value),I=Qte(b,v,E);I!==void 0&&s.onValueChange(I.value)}),A=v=>{l||(s.onOpenChange(!0),g()),v&&(s.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return o.jsx($b,{asChild:!0,...a,children:o.jsx(mn.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Fte(s.value)?"":void 0,...i,ref:c,onClick:dr(i.onClick,v=>{v.currentTarget.focus(),d.current!=="mouse"&&A(v)}),onPointerDown:dr(i.onPointerDown,v=>{d.current=v.pointerType;const b=v.target;b.hasPointerCapture(v.pointerId)&&b.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(A(v),v.preventDefault())}),onKeyDown:dr(i.onKeyDown,v=>{const b=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&m(v.key),!(b&&v.key===" ")&&C3e.includes(v.key)&&(A(),v.preventDefault())})})})});mte.displayName=hte;var pte="SelectValue",gte=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,children:a,placeholder:s="",...l}=e,c=yg(pte,r),{onValueNodeHasChildrenChange:u}=c,d=a!==void 0,f=qn(t,c.onValueNodeChange);return Fl(()=>{u(d)},[u,d]),o.jsx(mn.span,{...l,ref:f,style:{pointerEvents:"none"},children:Fte(c.value)?o.jsx(o.Fragment,{children:s}):a})});gte.displayName=pte;var _3e="SelectIcon",Ate=w.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...i}=e;return o.jsx(mn.span,{"aria-hidden":!0,...i,ref:t,children:n||"▼"})});Ate.displayName=_3e;var j3e="SelectPortal",vte=e=>o.jsx(iy,{asChild:!0,...e});vte.displayName=j3e;var l1="SelectContent",xte=w.forwardRef((e,t)=>{const r=yg(l1,e.__scopeSelect),[n,i]=w.useState();if(Fl(()=>{i(new DocumentFragment)},[]),!r.open){const a=n;return a?Sm.createPortal(o.jsx(yte,{scope:e.__scopeSelect,children:o.jsx(V3.Slot,{scope:e.__scopeSelect,children:o.jsx("div",{children:e.children})})}),a):null}return o.jsx(bte,{...e,ref:t})});xte.displayName=l1;var Ad=10,[yte,bg]=dy(l1),D3e="SelectContentImpl",T3e=v3e("SelectContent.RemoveScroll"),bte=w.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:g,sticky:A,hideWhenDetached:v,avoidCollisions:b,...E}=e,I=yg(l1,r),[S,_]=w.useState(null),[B,T]=w.useState(null),P=qn(t,ye=>_(ye)),[O,z]=w.useState(null),[L,W]=w.useState(null),R=Y3(r),[$,X]=w.useState(!1),Z=w.useRef(!1);w.useEffect(()=>{if(S)return U3(S)},[S]),Q3();const K=w.useCallback(ye=>{const[Ee,...me]=R().map(Be=>Be.ref.current),[Se]=me.slice(-1),Ie=document.activeElement;for(const Be of ye)if(Be===Ie||(Be?.scrollIntoView({block:"nearest"}),Be===Ee&&B&&(B.scrollTop=0),Be===Se&&B&&(B.scrollTop=B.scrollHeight),Be?.focus(),document.activeElement!==Ie))return},[R,B]),q=w.useCallback(()=>K([O,S]),[K,O,S]);w.useEffect(()=>{$&&q()},[$,q]);const{onOpenChange:Y,triggerPointerDownPosRef:ne}=I;w.useEffect(()=>{if(S){let ye={x:0,y:0};const Ee=Se=>{ye={x:Math.abs(Math.round(Se.pageX)-(ne.current?.x??0)),y:Math.abs(Math.round(Se.pageY)-(ne.current?.y??0))}},me=Se=>{ye.x<=10&&ye.y<=10?Se.preventDefault():S.contains(Se.target)||Y(!1),document.removeEventListener("pointermove",Ee),ne.current=null};return ne.current!==null&&(document.addEventListener("pointermove",Ee),document.addEventListener("pointerup",me,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ee),document.removeEventListener("pointerup",me,{capture:!0})}}},[S,Y,ne]),w.useEffect(()=>{const ye=()=>Y(!1);return window.addEventListener("blur",ye),window.addEventListener("resize",ye),()=>{window.removeEventListener("blur",ye),window.removeEventListener("resize",ye)}},[Y]);const[ge,ae]=Mte(ye=>{const Ee=R().filter(Ie=>!Ie.disabled),me=Ee.find(Ie=>Ie.ref.current===document.activeElement),Se=Qte(Ee,ye,me);Se&&setTimeout(()=>Se.ref.current.focus())}),pe=w.useCallback((ye,Ee,me)=>{const Se=!Z.current&&!me;(I.value!==void 0&&I.value===Ee||Se)&&(z(ye),Se&&(Z.current=!0))},[I.value]),_e=w.useCallback(()=>S?.focus(),[S]),we=w.useCallback((ye,Ee,me)=>{const Se=!Z.current&&!me;(I.value!==void 0&&I.value===Ee||Se)&&W(ye)},[I.value]),xe=n==="popper"?F8:wte,Me=xe===F8?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:g,sticky:A,hideWhenDetached:v,avoidCollisions:b}:{};return o.jsx(yte,{scope:r,content:S,viewport:B,onViewportChange:T,itemRefCallback:pe,selectedItem:O,onItemLeave:_e,itemTextRefCallback:we,focusSelectedItem:q,selectedItemText:L,position:n,isPositioned:$,searchRef:ge,children:o.jsx(Gb,{as:T3e,allowPinchZoom:!0,children:o.jsx(Wb,{asChild:!0,trapped:I.open,onMountAutoFocus:ye=>{ye.preventDefault()},onUnmountAutoFocus:dr(i,ye=>{I.trigger?.focus({preventScroll:!0}),ye.preventDefault()}),children:o.jsx(N1,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:ye=>ye.preventDefault(),onDismiss:()=>I.onOpenChange(!1),children:o.jsx(xe,{role:"listbox",id:I.contentId,"data-state":I.open?"open":"closed",dir:I.dir,onContextMenu:ye=>ye.preventDefault(),...E,...Me,onPlaced:()=>X(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:dr(E.onKeyDown,ye=>{const Ee=ye.ctrlKey||ye.altKey||ye.metaKey;if(ye.key==="Tab"&&ye.preventDefault(),!Ee&&ye.key.length===1&&ae(ye.key),["ArrowUp","ArrowDown","Home","End"].includes(ye.key)){let Se=R().filter(Ie=>!Ie.disabled).map(Ie=>Ie.ref.current);if(["ArrowUp","End"].includes(ye.key)&&(Se=Se.slice().reverse()),["ArrowUp","ArrowDown"].includes(ye.key)){const Ie=ye.target,Be=Se.indexOf(Ie);Se=Se.slice(Be+1)}setTimeout(()=>K(Se)),ye.preventDefault()}})})})})})})});bte.displayName=D3e;var P3e="SelectItemAlignedPosition",wte=w.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...i}=e,a=yg(l1,r),s=bg(l1,r),[l,c]=w.useState(null),[u,d]=w.useState(null),f=qn(t,P=>d(P)),m=Y3(r),g=w.useRef(!1),A=w.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:E,focusSelectedItem:I}=s,S=w.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&u&&v&&b&&E){const P=a.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),z=a.valueNode.getBoundingClientRect(),L=E.getBoundingClientRect();if(a.dir!=="rtl"){const Ie=L.left-O.left,Be=z.left-Ie,Xe=P.left-Be,ke=P.width+Xe,he=Math.max(ke,O.width),Le=window.innerWidth-Ad,Ye=IL(Be,[Ad,Math.max(Ad,Le-he)]);l.style.minWidth=ke+"px",l.style.left=Ye+"px"}else{const Ie=O.right-L.right,Be=window.innerWidth-z.right-Ie,Xe=window.innerWidth-P.right-Be,ke=P.width+Xe,he=Math.max(ke,O.width),Le=window.innerWidth-Ad,Ye=IL(Be,[Ad,Math.max(Ad,Le-he)]);l.style.minWidth=ke+"px",l.style.right=Ye+"px"}const W=m(),R=window.innerHeight-Ad*2,$=v.scrollHeight,X=window.getComputedStyle(u),Z=parseInt(X.borderTopWidth,10),K=parseInt(X.paddingTop,10),q=parseInt(X.borderBottomWidth,10),Y=parseInt(X.paddingBottom,10),ne=Z+K+$+Y+q,ge=Math.min(b.offsetHeight*5,ne),ae=window.getComputedStyle(v),pe=parseInt(ae.paddingTop,10),_e=parseInt(ae.paddingBottom,10),we=P.top+P.height/2-Ad,xe=R-we,Me=b.offsetHeight/2,ye=b.offsetTop+Me,Ee=Z+K+ye,me=ne-Ee;if(Ee<=we){const Ie=W.length>0&&b===W[W.length-1].ref.current;l.style.bottom="0px";const Be=u.clientHeight-v.offsetTop-v.offsetHeight,Xe=Math.max(xe,Me+(Ie?_e:0)+Be+q),ke=Ee+Xe;l.style.height=ke+"px"}else{const Ie=W.length>0&&b===W[0].ref.current;l.style.top="0px";const Xe=Math.max(we,Z+v.offsetTop+(Ie?pe:0)+Me)+me;l.style.height=Xe+"px",v.scrollTop=Ee-we+v.offsetTop}l.style.margin=`${Ad}px 0`,l.style.minHeight=ge+"px",l.style.maxHeight=R+"px",n?.(),requestAnimationFrame(()=>g.current=!0)}},[m,a.trigger,a.valueNode,l,u,v,b,E,a.dir,n]);Fl(()=>S(),[S]);const[_,B]=w.useState();Fl(()=>{u&&B(window.getComputedStyle(u).zIndex)},[u]);const T=w.useCallback(P=>{P&&A.current===!0&&(S(),I?.(),A.current=!1)},[S,I]);return o.jsx(R3e,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:g,onScrollButtonChange:T,children:o.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:o.jsx(mn.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});wte.displayName=P3e;var O3e="SelectPopperPosition",F8=w.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=Ad,...a}=e,s=Z3(r);return o.jsx(T3,{...s,...a,ref:t,align:n,collisionPadding:i,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)"}})});F8.displayName=O3e;var[R3e,FP]=dy(l1,{}),M8="SelectViewport",Ete=w.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...i}=e,a=bg(M8,r),s=FP(M8,r),l=qn(t,a.onViewportChange),c=w.useRef(0);return o.jsxs(o.Fragment,{children:[o.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:n}),o.jsx(V3.Slot,{scope:r,children:o.jsx(mn.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:dr(i.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=s;if(m?.current&&f){const g=Math.abs(c.current-d.scrollTop);if(g>0){const A=window.innerHeight-Ad*2,v=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),E=Math.max(v,b);if(E0?_:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});Ete.displayName=M8;var Cte="SelectGroup",[F3e,M3e]=dy(Cte),Q3e=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=R0();return o.jsx(F3e,{scope:r,id:i,children:o.jsx(mn.div,{role:"group","aria-labelledby":i,...n,ref:t})})});Q3e.displayName=Cte;var Ite="SelectLabel",Ste=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=M3e(Ite,r);return o.jsx(mn.div,{id:i.id,...n,ref:t})});Ste.displayName=Ite;var QC="SelectItem",[L3e,Bte]=dy(QC),Nte=w.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:a,...s}=e,l=yg(QC,r),c=bg(QC,r),u=l.value===n,[d,f]=w.useState(a??""),[m,g]=w.useState(!1),A=qn(t,I=>c.itemRefCallback?.(I,n,i)),v=R0(),b=w.useRef("touch"),E=()=>{i||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")throw new Error("A 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 o.jsx(L3e,{scope:r,value:n,disabled:i,textId:v,isSelected:u,onItemTextChange:w.useCallback(I=>{f(S=>S||(I?.textContent??"").trim())},[]),children:o.jsx(V3.ItemSlot,{scope:r,value:n,disabled:i,textValue:d,children:o.jsx(mn.div,{role:"option","aria-labelledby":v,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:A,onFocus:dr(s.onFocus,()=>g(!0)),onBlur:dr(s.onBlur,()=>g(!1)),onClick:dr(s.onClick,()=>{b.current!=="mouse"&&E()}),onPointerUp:dr(s.onPointerUp,()=>{b.current==="mouse"&&E()}),onPointerDown:dr(s.onPointerDown,I=>{b.current=I.pointerType}),onPointerMove:dr(s.onPointerMove,I=>{b.current=I.pointerType,i?c.onItemLeave?.():b.current==="mouse"&&I.currentTarget.focus({preventScroll:!0})}),onPointerLeave:dr(s.onPointerLeave,I=>{I.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:dr(s.onKeyDown,I=>{c.searchRef?.current!==""&&I.key===" "||(I3e.includes(I.key)&&E(),I.key===" "&&I.preventDefault())})})})})});Nte.displayName=QC;var d2="SelectItemText",kte=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,...a}=e,s=yg(d2,r),l=bg(d2,r),c=Bte(d2,r),u=k3e(d2,r),[d,f]=w.useState(null),m=qn(t,E=>f(E),c.onItemTextChange,E=>l.itemTextRefCallback?.(E,c.value,c.disabled)),g=d?.textContent,A=w.useMemo(()=>o.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=u;return Fl(()=>(v(A),()=>b(A)),[v,b,A]),o.jsxs(o.Fragment,{children:[o.jsx(mn.span,{id:c.textId,...a,ref:m}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Sm.createPortal(a.children,s.valueNode):null]})});kte.displayName=d2;var _te="SelectItemIndicator",jte=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return Bte(_te,r).isSelected?o.jsx(mn.span,{"aria-hidden":!0,...n,ref:t}):null});jte.displayName=_te;var Q8="SelectScrollUpButton",Dte=w.forwardRef((e,t)=>{const r=bg(Q8,e.__scopeSelect),n=FP(Q8,e.__scopeSelect),[i,a]=w.useState(!1),s=qn(t,n.onScrollButtonChange);return Fl(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollTop>0;a(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),i?o.jsx(Pte,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});Dte.displayName=Q8;var L8="SelectScrollDownButton",Tte=w.forwardRef((e,t)=>{const r=bg(L8,e.__scopeSelect),n=FP(L8,e.__scopeSelect),[i,a]=w.useState(!1),s=qn(t,n.onScrollButtonChange);return Fl(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),i?o.jsx(Pte,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});Tte.displayName=L8;var Pte=w.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...i}=e,a=bg("SelectScrollButton",r),s=w.useRef(null),l=Y3(r),c=w.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return w.useEffect(()=>()=>c(),[c]),Fl(()=>{l().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),o.jsx(mn.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:dr(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:dr(i.onPointerMove,()=>{a.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:dr(i.onPointerLeave,()=>{c()})})}),U3e="SelectSeparator",Ote=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return o.jsx(mn.div,{"aria-hidden":!0,...n,ref:t})});Ote.displayName=U3e;var U8="SelectArrow",$3e=w.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Z3(r),a=yg(U8,r),s=bg(U8,r);return a.open&&s.position==="popper"?o.jsx(P3,{...i,...n,ref:t}):null});$3e.displayName=U8;var z3e="SelectBubbleInput",Rte=w.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const i=w.useRef(null),a=qn(n,i),s=dte(t);return w.useEffect(()=>{const l=i.current;if(!l)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==t&&d){const f=new Event("change",{bubbles:!0});d.call(l,t),l.dispatchEvent(f)}},[s,t]),o.jsx(mn.select,{...r,style:{...kJ,...r.style},ref:a,defaultValue:t})});Rte.displayName=z3e;function Fte(e){return e===""||e===void 0}function Mte(e){const t=Yc(e),r=w.useRef(""),n=w.useRef(0),i=w.useCallback(s=>{const l=r.current+s;t(l),(function c(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),a=w.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,a]}function Qte(e,t,r){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let s=H3e(e,Math.max(a,0));i.length===1&&(s=s.filter(u=>u!==r));const c=s.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function H3e(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var W3e=fte,Lte=mte,G3e=gte,q3e=Ate,K3e=vte,Ute=xte,V3e=Ete,$te=Ste,zte=Nte,Y3e=kte,Z3e=jte,Hte=Dte,Wte=Tte,Gte=Ote;const ui=W3e,di=G3e,ei=w.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(Lte,{ref:n,className:qt("flex h-9 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,o.jsx(q3e,{asChild:!0,children:o.jsx(ZJ,{className:"h-4 w-4 opacity-50"})})]}));ei.displayName=Lte.displayName;const qte=w.forwardRef(({className:e,...t},r)=>o.jsx(Hte,{ref:r,className:qt("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(pbe,{className:"h-4 w-4"})}));qte.displayName=Hte.displayName;const Kte=w.forwardRef(({className:e,...t},r)=>o.jsx(Wte,{ref:r,className:qt("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(ZJ,{className:"h-4 w-4"})}));Kte.displayName=Wte.displayName;const ti=w.forwardRef(({className:e,children:t,position:r="popper",...n},i)=>o.jsx(K3e,{children:o.jsxs(Ute,{ref:i,className:qt("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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 origin-[--radix-select-content-transform-origin]",r==="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",e),position:r,...n,children:[o.jsx(qte,{}),o.jsx(V3e,{className:qt("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),o.jsx(Kte,{})]})}));ti.displayName=Ute.displayName;const J3e=w.forwardRef(({className:e,...t},r)=>o.jsx($te,{ref:r,className:qt("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));J3e.displayName=$te.displayName;const Tr=w.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(zte,{ref:n,className:qt("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(Z3e,{children:o.jsx(sP,{className:"h-4 w-4"})})}),o.jsx(Y3e,{children:t})]}));Tr.displayName=zte.displayName;const X3e=w.forwardRef(({className:e,...t},r)=>o.jsx(Gte,{ref:r,className:qt("-mx-1 my-1 h-px bg-muted",e),...t}));X3e.displayName=Gte.displayName;function eSe({vehicle:e,open:t,onOpenChange:r,onUpdate:n}){const{toast:i}=sn(),[a,s]=w.useState({immatriculation:"",nom:"",couleur:"",marque:"",modele:"",annee:new Date().getFullYear(),photoUrl:""}),[l,c]=w.useState(null),[u,d]=w.useState(null),[f,m]=w.useState(!1);w.useEffect(()=>{e&&t&&(s({immatriculation:e.immatriculation,nom:e.nom||"",couleur:e.couleur||"",marque:e.marque||"",modele:e.modele||"",annee:e.annee||new Date().getFullYear(),photoUrl:e.photoUrl||"",status:e.status||"actif"}),c(null),d(e.photoUrl?hn(e.photoUrl):null))},[e,t]);const g=E=>{const I=E.target.files?.[0];if(I){if(!I.type.startsWith("image/")){i({variant:"destructive",title:"Erreur",description:"Veuillez sélectionner un fichier image"});return}if(I.size>5*1024*1024){i({variant:"destructive",title:"Erreur",description:"Le fichier est trop volumineux (max 5MB)"});return}c(I);const S=new FileReader;S.onloadend=()=>{d(S.result)},S.readAsDataURL(I),s({...a,photoUrl:""})}},A=()=>{c(null),d(e?.photoUrl?hn(e.photoUrl):null)},v=async()=>{if(!l)return null;m(!0);try{const E=new FormData;E.append("photo",l);const I=ch("/api/upload/vehicle-photo"),S=mm(),_={};S&&(_.Authorization=`Bearer ${S}`);const B=await fetch(I,{method:"POST",headers:_,body:E,credentials:"include"});if(!B.ok){const P=await B.json().catch(()=>({message:"Erreur lors de l'upload"}));throw new Error(P.message||"Erreur lors de l'upload")}const T=await B.json();return{url:T.url,publicId:T.publicId}}catch(E){return i({variant:"destructive",title:"Erreur",description:E instanceof Error?E.message:"Erreur lors de l'upload du fichier"}),null}finally{m(!1)}},b=async E=>{if(E.preventDefault(),!e)return;let I=a.photoUrl?.trim()||void 0,S;if(l){const B=await v();if(B)I=B.url,S=B.publicId;else return}const _={...a,photoUrl:I,photoCloudinaryPublicId:S,annee:a.annee&&!isNaN(a.annee)?a.annee:void 0,nom:a.nom?.trim()||void 0,couleur:a.couleur?.trim()||void 0,marque:a.marque?.trim()||void 0,modele:a.modele?.trim()||void 0};n?.(e.id,_),r(!1)};return e?o.jsx(ci,{open:t,onOpenChange:r,children:o.jsxs(Zn,{className:"sm:max-w-[500px] max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Modifier le véhicule"}),o.jsxs(Ci,{children:["Modifiez les détails du véhicule ",e.immatriculation,"."]})]}),o.jsxs("form",{onSubmit:b,children:[o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"immatriculation",children:["Immatriculation ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"immatriculation",placeholder:"AB-123-CD",value:a.immatriculation,onChange:E=>s({...a,immatriculation:E.target.value}),className:"font-mono h-12",required:!0,"data-testid":"input-registration"})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"nom",children:"Nom du camion"}),o.jsx(wt,{id:"nom",placeholder:"Ex: Le Rouge",value:a.nom||"",onChange:E=>s({...a,nom:E.target.value||void 0}),className:"h-12","data-testid":"input-name"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"couleur",children:"Couleur"}),o.jsx(wt,{id:"couleur",placeholder:"Ex: Rouge, Bleu, Blanc",value:a.couleur||"",onChange:E=>s({...a,couleur:E.target.value||void 0}),className:"h-12","data-testid":"input-color"})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"marque",children:"Marque"}),o.jsx(wt,{id:"marque",placeholder:"Volvo",value:a.marque,onChange:E=>s({...a,marque:E.target.value}),className:"h-12","data-testid":"input-brand"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"modele",children:"Modèle"}),o.jsx(wt,{id:"modele",placeholder:"FH16",value:a.modele,onChange:E=>s({...a,modele:E.target.value}),className:"h-12","data-testid":"input-model"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"annee",children:"Année"}),o.jsx(wt,{id:"annee",type:"number",placeholder:"2023",value:a.annee||"",onChange:E=>{const I=E.target.value,S=I===""?void 0:parseInt(I);s({...a,annee:isNaN(S)?void 0:S})},min:"1900",max:new Date().getFullYear()+1,className:"h-12","data-testid":"input-year"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"status",children:"Statut"}),o.jsxs(ui,{value:a.status||"actif",onValueChange:E=>s({...a,status:E}),children:[o.jsx(ei,{id:"status",className:"h-12","data-testid":"select-status",children:o.jsx(di,{placeholder:"Sélectionner un statut"})}),o.jsxs(ti,{children:[o.jsx(Tr,{value:"actif",children:"Actif"}),o.jsx(Tr,{value:"maintenance",children:"En maintenance"}),o.jsx(Tr,{value:"hors_service",children:"Hors service"})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{children:"Photo du véhicule"}),u?o.jsxs("div",{className:"relative",children:[o.jsx("img",{src:hn(u)||u,alt:"Aperçu",className:"w-full h-48 object-cover rounded-lg border"}),o.jsx(Pe,{type:"button",variant:"destructive",size:"icon",className:"absolute top-2 right-2",onClick:A,children:o.jsx(G0,{className:"h-4 w-4"})})]}):o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Je,{htmlFor:"photo-upload-edit",className:"flex-1 cursor-pointer",children:o.jsxs("div",{className:"flex items-center justify-center gap-2 h-12 border-2 border-dashed rounded-lg hover:bg-accent transition-colors",children:[o.jsx(Pd,{className:"h-4 w-4"}),o.jsx("span",{className:"text-sm",children:"Téléverser une photo"})]})}),o.jsx(wt,{id:"photo-upload-edit",type:"file",accept:"image/*",onChange:g,className:"hidden","data-testid":"input-photo-upload"})]}),o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"absolute inset-0 flex items-center",children:o.jsx("span",{className:"w-full border-t"})}),o.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:o.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"ou"})})]}),o.jsx(wt,{id:"photoUrl",type:"url",placeholder:"https://example.com/photo.jpg",value:a.photoUrl||"",onChange:E=>{s({...a,photoUrl:E.target.value||void 0}),c(null),d(null)},className:"h-12","data-testid":"input-photo-url"})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:l?`Fichier sélectionné : ${l.name} (${(l.size/1024/1024).toFixed(2)} MB)`:"Téléversez une photo ou entrez une URL (optionnel)"})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>r(!1),"data-testid":"button-cancel",className:"w-full sm:w-auto h-12",children:"Annuler"}),o.jsx(Pe,{type:"submit","data-testid":"button-submit",className:"w-full sm:w-auto h-12",disabled:f,children:f?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Upload en cours..."]}):"Enregistrer"})]})]})]})}):null}function wg({onClick:e,label:t,className:r}){return o.jsx(cm,{children:o.jsxs(zb,{children:[o.jsx(Hb,{asChild:!0,children:o.jsx(Pe,{onClick:e,size:"lg",className:qt("fixed bottom-20 md:bottom-8 right-4 md:right-8 z-40","h-16 w-16 md:h-14 md:w-14 rounded-full shadow-lg","hover:shadow-xl transition-all hover:scale-110 active:scale-95",r),"data-testid":"fab-button","aria-label":t,children:o.jsx(Ma,{className:"h-7 w-7 md:h-6 md:w-6"})})}),t&&o.jsx(uy,{side:"left",className:"md:block hidden",children:o.jsx("p",{children:t})})]})})}var tSe=Symbol("radix.slottable");function rSe(e){const t=({children:r})=>o.jsx(o.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=tSe,t}var Vte="AlertDialog",[nSe]=Hu(Vte,[nee]),Nm=nee(),Yte=e=>{const{__scopeAlertDialog:t,...r}=e,n=Nm(t);return o.jsx(SP,{...n,...r,modal:!0})};Yte.displayName=Vte;var iSe="AlertDialogTrigger",Zte=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Nm(r);return o.jsx(xee,{...i,...n,ref:t})});Zte.displayName=iSe;var aSe="AlertDialogPortal",Jte=e=>{const{__scopeAlertDialog:t,...r}=e,n=Nm(t);return o.jsx(BP,{...n,...r})};Jte.displayName=aSe;var sSe="AlertDialogOverlay",Xte=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Nm(r);return o.jsx(qb,{...i,...n,ref:t})});Xte.displayName=sSe;var ax="AlertDialogContent",[oSe,lSe]=nSe(ax),cSe=rSe("AlertDialogContent"),ere=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...i}=e,a=Nm(r),s=w.useRef(null),l=qn(t,s),c=w.useRef(null);return o.jsx(xEe,{contentName:ax,titleName:tre,docsSlug:"alert-dialog",children:o.jsx(oSe,{scope:r,cancelRef:c,children:o.jsxs(Kb,{role:"alertdialog",...a,...i,ref:l,onOpenAutoFocus:dr(i.onOpenAutoFocus,u=>{u.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[o.jsx(cSe,{children:n}),o.jsx(dSe,{contentRef:s})]})})})});ere.displayName=ax;var tre="AlertDialogTitle",rre=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Nm(r);return o.jsx(Vb,{...i,...n,ref:t})});rre.displayName=tre;var nre="AlertDialogDescription",ire=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Nm(r);return o.jsx(Yb,{...i,...n,ref:t})});ire.displayName=nre;var uSe="AlertDialogAction",are=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Nm(r);return o.jsx(z3,{...i,...n,ref:t})});are.displayName=uSe;var sre="AlertDialogCancel",ore=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:i}=lSe(sre,r),a=Nm(r),s=qn(t,i);return o.jsx(z3,{...a,...n,ref:s})});ore.displayName=sre;var dSe=({contentRef:e})=>{const t=`\`${ax}\` requires a description for the component to be accessible for screen reader users. You can add a description to the \`${ax}\` by passing a \`${nre}\` component as a child, which also benefits sighted users by adding visible context to the dialog. Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ax}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return w.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},fSe=Yte,hSe=Zte,mSe=Jte,lre=Xte,cre=ere,ure=are,dre=ore,fre=rre,hre=ire;const pm=fSe,pSe=hSe,gSe=mSe,mre=w.forwardRef(({className:e,...t},r)=>o.jsx(lre,{className:qt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));mre.displayName=lre.displayName;const qf=w.forwardRef(({className:e,...t},r)=>o.jsxs(gSe,{children:[o.jsx(mre,{}),o.jsx(cre,{ref:r,className:qt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));qf.displayName=cre.displayName;const Kf=({className:e,...t})=>o.jsx("div",{className:qt("flex flex-col space-y-2 text-center sm:text-left",e),...t});Kf.displayName="AlertDialogHeader";const Vf=({className:e,...t})=>o.jsx("div",{className:qt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Vf.displayName="AlertDialogFooter";const Yf=w.forwardRef(({className:e,...t},r)=>o.jsx(fre,{ref:r,className:qt("text-lg font-semibold",e),...t}));Yf.displayName=fre.displayName;const Zf=w.forwardRef(({className:e,...t},r)=>o.jsx(hre,{ref:r,className:qt("text-sm text-muted-foreground",e),...t}));Zf.displayName=hre.displayName;const Jf=w.forwardRef(({className:e,...t},r)=>o.jsx(ure,{ref:r,className:qt(z2(),e),...t}));Jf.displayName=ure.displayName;const Xf=w.forwardRef(({className:e,...t},r)=>o.jsx(dre,{ref:r,className:qt(z2({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Xf.displayName=dre.displayName;function ASe(){const[e,t]=w.useState(""),[r,n]=w.useState(!1),[i,a]=w.useState(null),[s,l]=w.useState(!1),[c,u]=w.useState(null),{toast:d}=sn(),{data:f=[],isLoading:m}=Ar({queryKey:["/api/vehicles"]}),{data:g=[]}=Ar({queryKey:["/api/maintenances"]}),A=w.useMemo(()=>f.map(O=>{const z=g.filter(L=>L.vehicleId===O.id&&L.kilometrageEffectue).sort((L,W)=>{const R=L.dateEffectuee?new Date(L.dateEffectuee).getTime():0;return(W.dateEffectuee?new Date(W.dateEffectuee).getTime():0)-R})[0];return{...O,kilometrage:z?.kilometrageEffectue||null}}),[f,g]),v=qr({mutationFn:async O=>{console.log("[Client] Creating vehicle:",O);try{const z=await fr("/api/vehicles",{method:"POST",body:O});return console.log("[Client] Vehicle created successfully:",z),z}catch(z){throw console.error("[Client] Error creating vehicle:",z),z}},onSuccess:()=>{br.invalidateQueries({queryKey:["/api/vehicles"]}),d({title:"Succès",description:"Le véhicule a été ajouté avec succès"})},onError:O=>{console.error("[Client] Mutation error:",O),d({variant:"destructive",title:"Erreur",description:O.message||"Impossible d'ajouter le véhicule"})}}),b=qr({mutationFn:async({id:O,data:z})=>await fr(`/api/vehicles/${O}`,{method:"PATCH",body:z}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/vehicles"]}),d({title:"Succès",description:"Le véhicule a été modifié avec succès"}),l(!1),a(null)},onError:O=>{d({variant:"destructive",title:"Erreur",description:O.message||"Impossible de modifier le véhicule"})}}),E=qr({mutationFn:async O=>await fr(`/api/vehicles/${O}`,{method:"DELETE"}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/vehicles"]}),d({title:"Succès",description:"Le véhicule a été supprimé avec succès"}),u(null)},onError:O=>{d({variant:"destructive",title:"Erreur",description:O.message||"Impossible de supprimer le véhicule"})}}),I=A.filter(O=>O.immatriculation.toLowerCase().includes(e.toLowerCase())||O.marque?.toLowerCase().includes(e.toLowerCase())||O.modele?.toLowerCase().includes(e.toLowerCase())),S=O=>{v.mutate(O)},_=O=>{const z=f.find(L=>L.id===O);z&&(a(z),l(!0))},B=(O,z)=>{b.mutate({id:O,data:z})},T=O=>{u(O)},P=()=>{c&&E.mutate(c)};return o.jsxs("div",{className:"space-y-4 md:space-y-6 pb-20 md:pb-0",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl md:text-2xl font-semibold","data-testid":"text-page-title",children:"Véhicules"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Gérez votre parc de véhicules"})]}),o.jsx(A3e,{onAdd:S,open:r,onOpenChange:n})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"relative flex-1",children:[o.jsx(U0,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(wt,{placeholder:"Rechercher...",value:e,onChange:O=>t(O.target.value),className:"pl-9 h-12","data-testid":"input-search"})]}),o.jsx(Pe,{size:"icon",variant:"outline",className:"h-12 w-12 flex-shrink-0","data-testid":"button-view-grid",children:o.jsx(rX,{className:"h-5 w-5"})})]}),m?o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:I.map(O=>o.jsx(Nee,{...O,onEdit:_,onDelete:T,onViewTrips:z=>console.log("Voir voyages pour véhicule",z)},O.id))}),I.length===0&&o.jsx("div",{className:"text-center py-12",children:o.jsx("p",{className:"text-muted-foreground",children:"Aucun véhicule trouvé"})})]}),o.jsx(wg,{onClick:()=>n(!0),label:"Ajouter un véhicule"}),o.jsx(eSe,{vehicle:i,open:s,onOpenChange:l,onUpdate:B}),o.jsx(pm,{open:c!==null,onOpenChange:O=>!O&&u(null),children:o.jsxs(qf,{children:[o.jsxs(Kf,{children:[o.jsx(Yf,{children:"Supprimer le véhicule"}),o.jsxs(Zf,{children:["Êtes-vous sûr de vouloir supprimer ce véhicule ? Cette action est irréversible.",c&&o.jsxs("span",{className:"block mt-2 font-semibold",children:["Véhicule : ",f.find(O=>O.id===c)?.immatriculation]})]})]}),o.jsxs(Vf,{children:[o.jsx(Xf,{children:"Annuler"}),o.jsx(Jf,{onClick:P,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Supprimer"})]})]})})]})}async function J3(e){const t=e?`/api/breakdowns?vehicleId=${e}`:"/api/breakdowns";return await fr(t)}async function vSe(e){return await fr("/api/breakdowns",{method:"POST",body:e})}async function xSe(e,t){return await fr(`/api/breakdowns/${e}/respond`,{method:"POST",body:t})}var X3="Checkbox",[ySe]=Hu(X3),[bSe,MP]=ySe(X3);function wSe(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:i,disabled:a,form:s,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:f}=e,[m,g]=Hf({prop:r,defaultProp:i??!1,onChange:c,caller:X3}),[A,v]=w.useState(null),[b,E]=w.useState(null),I=w.useRef(!1),S=A?!!s||!!A.closest("form"):!0,_={checked:m,disabled:a,setChecked:g,control:A,setControl:v,name:l,form:s,value:d,hasConsumerStoppedPropagationRef:I,required:u,defaultChecked:Yp(i)?!1:i,isFormControl:S,bubbleInput:b,setBubbleInput:E};return o.jsx(bSe,{scope:t,..._,children:ESe(f)?f(_):n})}var pre="CheckboxTrigger",gre=w.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},i)=>{const{control:a,value:s,disabled:l,checked:c,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:m,isFormControl:g,bubbleInput:A}=MP(pre,e),v=qn(i,d),b=w.useRef(c);return w.useEffect(()=>{const E=a?.form;if(E){const I=()=>f(b.current);return E.addEventListener("reset",I),()=>E.removeEventListener("reset",I)}},[a,f]),o.jsx(mn.button,{type:"button",role:"checkbox","aria-checked":Yp(c)?"mixed":c,"aria-required":u,"data-state":bre(c),"data-disabled":l?"":void 0,disabled:l,value:s,...n,ref:v,onKeyDown:dr(t,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:dr(r,E=>{f(I=>Yp(I)?!0:!I),A&&g&&(m.current=E.isPropagationStopped(),m.current||E.stopPropagation())})})});gre.displayName=pre;var QP=w.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:a,required:s,disabled:l,value:c,onCheckedChange:u,form:d,...f}=e;return o.jsx(wSe,{__scopeCheckbox:r,checked:i,defaultChecked:a,disabled:l,required:s,onCheckedChange:u,name:n,form:d,value:c,internal_do_not_use_render:({isFormControl:m})=>o.jsxs(o.Fragment,{children:[o.jsx(gre,{...f,ref:t,__scopeCheckbox:r}),m&&o.jsx(yre,{__scopeCheckbox:r})]})})});QP.displayName=X3;var Are="CheckboxIndicator",vre=w.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...i}=e,a=MP(Are,r);return o.jsx(Jc,{present:n||Yp(a.checked)||a.checked===!0,children:o.jsx(mn.span,{"data-state":bre(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});vre.displayName=Are;var xre="CheckboxBubbleInput",yre=w.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:s,required:l,disabled:c,name:u,value:d,form:f,bubbleInput:m,setBubbleInput:g}=MP(xre,e),A=qn(r,g),v=dte(a),b=SX(n);w.useEffect(()=>{const I=m;if(!I)return;const S=window.HTMLInputElement.prototype,B=Object.getOwnPropertyDescriptor(S,"checked").set,T=!i.current;if(v!==a&&B){const P=new Event("click",{bubbles:T});I.indeterminate=Yp(a),B.call(I,Yp(a)?!1:a),I.dispatchEvent(P)}},[m,v,a,i]);const E=w.useRef(Yp(a)?!1:a);return o.jsx(mn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??E.current,required:l,disabled:c,name:u,value:d,form:f,...t,tabIndex:-1,ref:A,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});yre.displayName=xre;function ESe(e){return typeof e=="function"}function Yp(e){return e==="indeterminate"}function bre(e){return Yp(e)?"indeterminate":e?"checked":"unchecked"}const ew=w.forwardRef(({className:e,...t},r)=>o.jsx(QP,{ref:r,className:qt("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:o.jsx(vre,{className:qt("flex items-center justify-center text-current"),children:o.jsx(sP,{className:"h-4 w-4"})})}));ew.displayName=QP.displayName;const Ut=Symbol.for("drizzle:entityKind");function Xo(e,t){if(!e||typeof e!="object")return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,Ut))throw new Error(`Class "${t.name??""}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let r=Object.getPrototypeOf(e).constructor;if(r)for(;r;){if(Ut in r&&r[Ut]===t[Ut])return!0;r=Object.getPrototypeOf(r)}return!1}class G2{constructor(t,r){this.table=t,this.config=r,this.name=r.name,this.keyAsName=r.keyAsName,this.notNull=r.notNull,this.default=r.default,this.defaultFn=r.defaultFn,this.onUpdateFn=r.onUpdateFn,this.hasDefault=r.hasDefault,this.primary=r.primaryKey,this.isUnique=r.isUnique,this.uniqueName=r.uniqueName,this.uniqueType=r.uniqueType,this.dataType=r.dataType,this.columnType=r.columnType,this.generated=r.generated,this.generatedIdentity=r.generatedIdentity}static[Ut]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue(t){return t}mapToDriverValue(t){return t}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}}class CSe{static[Ut]="ColumnBuilder";config;constructor(t,r,n){this.config={name:t,keyAsName:t==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:r,columnType:n,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(t){return this.config.default=t,this.config.hasDefault=!0,this}$defaultFn(t){return this.config.defaultFn=t,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn(t){return this.config.onUpdateFn=t,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(t){this.config.name===""&&(this.config.name=t)}}const sx=Symbol.for("drizzle:Name");class ISe{static[Ut]="PgForeignKeyBuilder";reference;_onUpdate="no action";_onDelete="no action";constructor(t,r){this.reference=()=>{const{name:n,columns:i,foreignColumns:a}=t();return{name:n,columns:i,foreignTable:a[0].table,foreignColumns:a}},r&&(this._onUpdate=r.onUpdate,this._onDelete=r.onDelete)}onUpdate(t){return this._onUpdate=t===void 0?"no action":t,this}onDelete(t){return this._onDelete=t===void 0?"no action":t,this}build(t){return new SSe(t,this)}}class SSe{constructor(t,r){this.table=t,this.reference=r.reference,this.onUpdate=r._onUpdate,this.onDelete=r._onDelete}static[Ut]="PgForeignKey";reference;onUpdate;onDelete;getName(){const{name:t,columns:r,foreignColumns:n}=this.reference(),i=r.map(l=>l.name),a=n.map(l=>l.name),s=[this.table[sx],...i,n[0].table[sx],...a];return t??`${s.join("_")}_fk`}}function BSe(e,...t){return e(...t)}function NSe(e,t){return`${e[sx]}_${t.join("_")}_unique`}function SL(e,t,r){for(let n=t;nArray.isArray(t)?Ere(t):typeof t=="string"?`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:`${t}`).join(",")}}`}class mi extends CSe{foreignKeyConfigs=[];static[Ut]="PgColumnBuilder";array(t){return new jSe(this.config.name,this,t)}references(t,r={}){return this.foreignKeyConfigs.push({ref:t,actions:r}),this}unique(t,r){return this.config.isUnique=!0,this.config.uniqueName=t,this.config.uniqueType=r?.nulls,this}generatedAlwaysAs(t){return this.config.generated={as:t,type:"always",mode:"stored"},this}buildForeignKeys(t,r){return this.foreignKeyConfigs.map(({ref:n,actions:i})=>BSe((a,s)=>{const l=new ISe(()=>{const c=a();return{columns:[t],foreignColumns:[c]}});return s.onUpdate&&l.onUpdate(s.onUpdate),s.onDelete&&l.onDelete(s.onDelete),l.build(r)},n,i))}buildExtraConfigColumn(t){return new _Se(t,this.config)}}class Nn extends G2{constructor(t,r){r.uniqueName||(r.uniqueName=NSe(t,[r.name])),super(t,r),this.table=t}static[Ut]="PgColumn"}class _Se extends Nn{static[Ut]="ExtraConfigColumn";getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op(t){return this.indexConfig.opClass=t,this}}class jSe extends mi{static[Ut]="PgArrayBuilder";constructor(t,r,n){super(t,"array","PgArray"),this.config.baseBuilder=r,this.config.size=n}build(t){const r=this.config.baseBuilder.build(t);return new LP(t,this.config,r)}}class LP extends Nn{constructor(t,r,n,i){super(t,r),this.baseColumn=n,this.range=i,this.size=r.size}size;static[Ut]="PgArray";getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size=="number"?this.size:""}]`}mapFromDriverValue(t){return typeof t=="string"&&(t=kSe(t)),t.map(r=>this.baseColumn.mapFromDriverValue(r))}mapToDriverValue(t,r=!1){const n=t.map(i=>i===null?null:Xo(this.baseColumn,LP)?this.baseColumn.mapToDriverValue(i,!0):this.baseColumn.mapToDriverValue(i));return r?n:Ere(n)}}const BL=Symbol.for("drizzle:isPgEnum");function DSe(e){return!!e&&typeof e=="function"&&BL in e&&e[BL]===!0}class Cre{static[Ut]="Subquery";constructor(t,r,n,i=!1,a=[]){this._={brand:"Subquery",sql:t,selectedFields:r,alias:n,isWith:i,usedTables:a}}}const TSe={startActiveSpan(e,t){return t()}},ox=Symbol.for("drizzle:ViewBaseConfig"),NN=Symbol.for("drizzle:Schema"),NL=Symbol.for("drizzle:Columns"),kL=Symbol.for("drizzle:ExtraConfigColumns"),kN=Symbol.for("drizzle:OriginalName"),_N=Symbol.for("drizzle:BaseName"),LC=Symbol.for("drizzle:IsAlias"),_L=Symbol.for("drizzle:ExtraConfigBuilder"),Ire=Symbol.for("drizzle:IsDrizzleTable");let el=class{static[Ut]="Table";static Symbol={Name:sx,Schema:NN,OriginalName:kN,Columns:NL,ExtraConfigColumns:kL,BaseName:_N,IsAlias:LC,ExtraConfigBuilder:_L};[sx];[kN];[NN];[NL];[kL];[_N];[LC]=!1;[Ire]=!0;[_L]=void 0;constructor(t,r,n){this[sx]=this[kN]=t,this[NN]=r,this[_N]=n}};function Sre(e){return typeof e=="object"&&e!==null&&Ire in e}function PSe(e){return e!=null&&typeof e.getSQL=="function"}function OSe(e){const t={sql:"",params:[]};for(const r of e)t.sql+=r.sql,t.params.push(...r.params),r.typings?.length&&(t.typings||(t.typings=[]),t.typings.push(...r.typings));return t}class xd{static[Ut]="StringChunk";value;constructor(t){this.value=Array.isArray(t)?t:[t]}getSQL(){return new Qs([this])}}class Qs{constructor(t){this.queryChunks=t;for(const r of t)if(Xo(r,el)){const n=r[el.Symbol.Schema];this.usedTables.push(n===void 0?r[el.Symbol.Name]:n+"."+r[el.Symbol.Name])}}static[Ut]="SQL";decoder=Bre;shouldInlineParams=!1;usedTables=[];append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return TSe.startActiveSpan("drizzle.buildSQL",r=>{const n=this.buildQueryFromSourceParams(this.queryChunks,t);return r?.setAttributes({"drizzle.query.text":n.sql,"drizzle.query.params":JSON.stringify(n.params)}),n})}buildQueryFromSourceParams(t,r){const n=Object.assign({},r,{inlineParams:r.inlineParams||this.shouldInlineParams,paramStartIndex:r.paramStartIndex||{value:0}}),{casing:i,escapeName:a,escapeParam:s,prepareTyping:l,inlineParams:c,paramStartIndex:u}=n;return OSe(t.map(d=>{if(Xo(d,xd))return{sql:d.value.join(""),params:[]};if(Xo(d,$8))return{sql:a(d.value),params:[]};if(d===void 0)return{sql:"",params:[]};if(Array.isArray(d)){const f=[new xd("(")];for(const[m,g]of d.entries())f.push(g),me},Nre={mapToDriverValue:e=>e};({...Bre,...Nre});class kre{constructor(t,r=Nre){this.value=t,this.encoder=r}static[Ut]="Param";brand;getSQL(){return new Qs([this])}}function q2(e,...t){const r=[];(t.length>0||e.length>0&&e[0]!=="")&&r.push(new xd(e[0]));for(const[n,i]of t.entries())r.push(i,new xd(e[n+1]));return new Qs(r)}(e=>{function t(){return new Qs([])}e.empty=t;function r(c){return new Qs(c)}e.fromList=r;function n(c){return new Qs([new xd(c)])}e.raw=n;function i(c,u){const d=[];for(const[f,m]of c.entries())f>0&&u!==void 0&&d.push(u),d.push(m);return new Qs(d)}e.join=i;function a(c){return new $8(c)}e.identifier=a;function s(c){return new z8(c)}e.placeholder=s;function l(c,u){return new kre(c,u)}e.param=l})(q2||(q2={}));(e=>{class t{constructor(n,i){this.sql=n,this.fieldAlias=i}static[Ut]="SQL.Aliased";isSelectionField=!1;getSQL(){return this.sql}clone(){return new t(this.sql,this.fieldAlias)}}e.Aliased=t})(Qs||(Qs={}));class z8{constructor(t){this.name=t}static[Ut]="Placeholder";getSQL(){return new Qs([this])}}const _re=Symbol.for("drizzle:IsDrizzleView");let RSe=class{static[Ut]="View";[ox];[_re]=!0;constructor({name:t,schema:r,selectedFields:n,query:i}){this[ox]={name:t,originalName:t,schema:r,selectedFields:n,query:i,isExisting:!i,isAlias:!1}}getSQL(){return new Qs([this])}};function FSe(e){return typeof e=="object"&&e!==null&&_re in e}G2.prototype.getSQL=function(){return new Qs([this])};el.prototype.getSQL=function(){return new Qs([this])};Cre.prototype.getSQL=function(){return new Qs([this])};function MSe(e){return e[el.Symbol.Columns]}function QSe(e){return e[ox].selectedFields}function ol(e,t){return{name:typeof e=="string"&&e.length>0?e:"",config:typeof e=="object"?e:t}}typeof TextDecoder>"u"||new TextDecoder;class eS extends mi{static[Ut]="PgIntColumnBaseBuilder";generatedAlwaysAsIdentity(t){if(t){const{name:r,...n}=t;this.config.generatedIdentity={type:"always",sequenceName:r,sequenceOptions:n}}else this.config.generatedIdentity={type:"always"};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity(t){if(t){const{name:r,...n}=t;this.config.generatedIdentity={type:"byDefault",sequenceName:r,sequenceOptions:n}}else this.config.generatedIdentity={type:"byDefault"};return this.config.hasDefault=!0,this.config.notNull=!0,this}}class LSe extends eS{static[Ut]="PgBigInt53Builder";constructor(t){super(t,"number","PgBigInt53")}build(t){return new USe(t,this.config)}}class USe extends Nn{static[Ut]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}}class $Se extends eS{static[Ut]="PgBigInt64Builder";constructor(t){super(t,"bigint","PgBigInt64")}build(t){return new zSe(t,this.config)}}class zSe extends Nn{static[Ut]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue(t){return BigInt(t)}}function HSe(e,t){const{name:r,config:n}=ol(e,t);return n.mode==="number"?new LSe(r):new $Se(r)}class WSe extends mi{static[Ut]="PgBigSerial53Builder";constructor(t){super(t,"number","PgBigSerial53"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new GSe(t,this.config)}}class GSe extends Nn{static[Ut]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}}class qSe extends mi{static[Ut]="PgBigSerial64Builder";constructor(t){super(t,"bigint","PgBigSerial64"),this.config.hasDefault=!0}build(t){return new KSe(t,this.config)}}class KSe extends Nn{static[Ut]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue(t){return BigInt(t)}}function VSe(e,t){const{name:r,config:n}=ol(e,t);return n.mode==="number"?new WSe(r):new qSe(r)}class YSe extends mi{static[Ut]="PgBooleanBuilder";constructor(t){super(t,"boolean","PgBoolean")}build(t){return new ZSe(t,this.config)}}class ZSe extends Nn{static[Ut]="PgBoolean";getSQLType(){return"boolean"}}function Ix(e){return new YSe(e??"")}class JSe extends mi{static[Ut]="PgCharBuilder";constructor(t,r){super(t,"string","PgChar"),this.config.length=r.length,this.config.enumValues=r.enum}build(t){return new XSe(t,this.config)}}class XSe extends Nn{static[Ut]="PgChar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"char":`char(${this.length})`}}function e6e(e,t={}){const{name:r,config:n}=ol(e,t);return new JSe(r,n)}class t6e extends mi{static[Ut]="PgCidrBuilder";constructor(t){super(t,"string","PgCidr")}build(t){return new r6e(t,this.config)}}class r6e extends Nn{static[Ut]="PgCidr";getSQLType(){return"cidr"}}function n6e(e){return new t6e(e??"")}class i6e extends mi{static[Ut]="PgCustomColumnBuilder";constructor(t,r,n){super(t,"custom","PgCustomColumn"),this.config.fieldConfig=r,this.config.customTypeParams=n}build(t){return new a6e(t,this.config)}}class a6e extends Nn{static[Ut]="PgCustomColumn";sqlName;mapTo;mapFrom;constructor(t,r){super(t,r),this.sqlName=r.customTypeParams.dataType(r.fieldConfig),this.mapTo=r.customTypeParams.toDriver,this.mapFrom=r.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue(t){return typeof this.mapFrom=="function"?this.mapFrom(t):t}mapToDriverValue(t){return typeof this.mapTo=="function"?this.mapTo(t):t}}function s6e(e){return(t,r)=>{const{name:n,config:i}=ol(t,r);return new i6e(n,i,e)}}class tw extends mi{static[Ut]="PgDateColumnBaseBuilder";defaultNow(){return this.default(q2`now()`)}}class o6e extends tw{static[Ut]="PgDateBuilder";constructor(t){super(t,"date","PgDate")}build(t){return new l6e(t,this.config)}}class l6e extends Nn{static[Ut]="PgDate";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?new Date(t):t}mapToDriverValue(t){return t.toISOString()}}class c6e extends tw{static[Ut]="PgDateStringBuilder";constructor(t){super(t,"string","PgDateString")}build(t){return new u6e(t,this.config)}}class u6e extends Nn{static[Ut]="PgDateString";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?t:t.toISOString().slice(0,-14)}}function c1(e,t){const{name:r,config:n}=ol(e,t);return n?.mode==="date"?new o6e(r):new c6e(r)}class d6e extends mi{static[Ut]="PgDoublePrecisionBuilder";constructor(t){super(t,"number","PgDoublePrecision")}build(t){return new f6e(t,this.config)}}class f6e extends Nn{static[Ut]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue(t){return typeof t=="string"?Number.parseFloat(t):t}}function h6e(e){return new d6e(e??"")}class m6e extends mi{static[Ut]="PgInetBuilder";constructor(t){super(t,"string","PgInet")}build(t){return new p6e(t,this.config)}}class p6e extends Nn{static[Ut]="PgInet";getSQLType(){return"inet"}}function g6e(e){return new m6e(e??"")}class A6e extends eS{static[Ut]="PgIntegerBuilder";constructor(t){super(t,"number","PgInteger")}build(t){return new v6e(t,this.config)}}class v6e extends Nn{static[Ut]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue(t){return typeof t=="string"?Number.parseInt(t):t}}function Qr(e){return new A6e(e??"")}class x6e extends mi{static[Ut]="PgIntervalBuilder";constructor(t,r){super(t,"string","PgInterval"),this.config.intervalConfig=r}build(t){return new y6e(t,this.config)}}class y6e extends Nn{static[Ut]="PgInterval";fields=this.config.intervalConfig.fields;precision=this.config.intervalConfig.precision;getSQLType(){const t=this.fields?` ${this.fields}`:"",r=this.precision?`(${this.precision})`:"";return`interval${t}${r}`}}function b6e(e,t={}){const{name:r,config:n}=ol(e,t);return new x6e(r,n)}class w6e extends mi{static[Ut]="PgJsonBuilder";constructor(t){super(t,"json","PgJson")}build(t){return new E6e(t,this.config)}}class E6e extends Nn{static[Ut]="PgJson";constructor(t,r){super(t,r)}getSQLType(){return"json"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}}function C6e(e){return new w6e(e??"")}class I6e extends mi{static[Ut]="PgJsonbBuilder";constructor(t){super(t,"json","PgJsonb")}build(t){return new S6e(t,this.config)}}class S6e extends Nn{static[Ut]="PgJsonb";constructor(t,r){super(t,r)}getSQLType(){return"jsonb"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}}function fy(e){return new I6e(e??"")}class B6e extends mi{static[Ut]="PgLineBuilder";constructor(t){super(t,"array","PgLine")}build(t){return new N6e(t,this.config)}}class N6e extends Nn{static[Ut]="PgLine";getSQLType(){return"line"}mapFromDriverValue(t){const[r,n,i]=t.slice(1,-1).split(",");return[Number.parseFloat(r),Number.parseFloat(n),Number.parseFloat(i)]}mapToDriverValue(t){return`{${t[0]},${t[1]},${t[2]}}`}}class k6e extends mi{static[Ut]="PgLineABCBuilder";constructor(t){super(t,"json","PgLineABC")}build(t){return new _6e(t,this.config)}}class _6e extends Nn{static[Ut]="PgLineABC";getSQLType(){return"line"}mapFromDriverValue(t){const[r,n,i]=t.slice(1,-1).split(",");return{a:Number.parseFloat(r),b:Number.parseFloat(n),c:Number.parseFloat(i)}}mapToDriverValue(t){return`{${t.a},${t.b},${t.c}}`}}function j6e(e,t){const{name:r,config:n}=ol(e,t);return!n?.mode||n.mode==="tuple"?new B6e(r):new k6e(r)}class D6e extends mi{static[Ut]="PgMacaddrBuilder";constructor(t){super(t,"string","PgMacaddr")}build(t){return new T6e(t,this.config)}}class T6e extends Nn{static[Ut]="PgMacaddr";getSQLType(){return"macaddr"}}function P6e(e){return new D6e(e??"")}class O6e extends mi{static[Ut]="PgMacaddr8Builder";constructor(t){super(t,"string","PgMacaddr8")}build(t){return new R6e(t,this.config)}}class R6e extends Nn{static[Ut]="PgMacaddr8";getSQLType(){return"macaddr8"}}function F6e(e){return new O6e(e??"")}class M6e extends mi{static[Ut]="PgNumericBuilder";constructor(t,r,n){super(t,"string","PgNumeric"),this.config.precision=r,this.config.scale=n}build(t){return new Q6e(t,this.config)}}class Q6e extends Nn{static[Ut]="PgNumeric";precision;scale;constructor(t,r){super(t,r),this.precision=r.precision,this.scale=r.scale}mapFromDriverValue(t){return typeof t=="string"?t:String(t)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}}class L6e extends mi{static[Ut]="PgNumericNumberBuilder";constructor(t,r,n){super(t,"number","PgNumericNumber"),this.config.precision=r,this.config.scale=n}build(t){return new U6e(t,this.config)}}class U6e extends Nn{static[Ut]="PgNumericNumber";precision;scale;constructor(t,r){super(t,r),this.precision=r.precision,this.scale=r.scale}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}}class $6e extends mi{static[Ut]="PgNumericBigIntBuilder";constructor(t,r,n){super(t,"bigint","PgNumericBigInt"),this.config.precision=r,this.config.scale=n}build(t){return new z6e(t,this.config)}}class z6e extends Nn{static[Ut]="PgNumericBigInt";precision;scale;constructor(t,r){super(t,r),this.precision=r.precision,this.scale=r.scale}mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}}function H6e(e,t){const{name:r,config:n}=ol(e,t),i=n?.mode;return i==="number"?new L6e(r,n?.precision,n?.scale):i==="bigint"?new $6e(r,n?.precision,n?.scale):new M6e(r,n?.precision,n?.scale)}class W6e extends mi{static[Ut]="PgPointTupleBuilder";constructor(t){super(t,"array","PgPointTuple")}build(t){return new G6e(t,this.config)}}class G6e extends Nn{static[Ut]="PgPointTuple";getSQLType(){return"point"}mapFromDriverValue(t){if(typeof t=="string"){const[r,n]=t.slice(1,-1).split(",");return[Number.parseFloat(r),Number.parseFloat(n)]}return[t.x,t.y]}mapToDriverValue(t){return`(${t[0]},${t[1]})`}}class q6e extends mi{static[Ut]="PgPointObjectBuilder";constructor(t){super(t,"json","PgPointObject")}build(t){return new K6e(t,this.config)}}class K6e extends Nn{static[Ut]="PgPointObject";getSQLType(){return"point"}mapFromDriverValue(t){if(typeof t=="string"){const[r,n]=t.slice(1,-1).split(",");return{x:Number.parseFloat(r),y:Number.parseFloat(n)}}return t}mapToDriverValue(t){return`(${t.x},${t.y})`}}function V6e(e,t){const{name:r,config:n}=ol(e,t);return!n?.mode||n.mode==="tuple"?new W6e(r):new q6e(r)}function Y6e(e){const t=[];for(let r=0;rtypeof t=="string"?Number.parseFloat(t):t}function Sa(e){return new rBe(e??"")}class iBe extends mi{static[Ut]="PgSerialBuilder";constructor(t){super(t,"number","PgSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new aBe(t,this.config)}}class aBe extends Nn{static[Ut]="PgSerial";getSQLType(){return"serial"}}function sBe(e){return new iBe(e??"")}class oBe extends eS{static[Ut]="PgSmallIntBuilder";constructor(t){super(t,"number","PgSmallInt")}build(t){return new lBe(t,this.config)}}class lBe extends Nn{static[Ut]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue=t=>typeof t=="string"?Number(t):t}function cBe(e){return new oBe(e??"")}class uBe extends mi{static[Ut]="PgSmallSerialBuilder";constructor(t){super(t,"number","PgSmallSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new dBe(t,this.config)}}class dBe extends Nn{static[Ut]="PgSmallSerial";getSQLType(){return"smallserial"}}function fBe(e){return new uBe(e??"")}class hBe extends mi{static[Ut]="PgTextBuilder";constructor(t,r){super(t,"string","PgText"),this.config.enumValues=r.enum}build(t){return new mBe(t,this.config)}}class mBe extends Nn{static[Ut]="PgText";enumValues=this.config.enumValues;getSQLType(){return"text"}}function Dt(e,t={}){const{name:r,config:n}=ol(e,t);return new hBe(r,n)}class pBe extends tw{constructor(t,r,n){super(t,"string","PgTime"),this.withTimezone=r,this.precision=n,this.config.withTimezone=r,this.config.precision=n}static[Ut]="PgTimeBuilder";build(t){return new gBe(t,this.config)}}class gBe extends Nn{static[Ut]="PgTime";withTimezone;precision;constructor(t,r){super(t,r),this.withTimezone=r.withTimezone,this.precision=r.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}function ABe(e,t={}){const{name:r,config:n}=ol(e,t);return new pBe(r,n.withTimezone??!1,n.precision)}class vBe extends tw{static[Ut]="PgTimestampBuilder";constructor(t,r,n){super(t,"date","PgTimestamp"),this.config.withTimezone=r,this.config.precision=n}build(t){return new xBe(t,this.config)}}class xBe extends Nn{static[Ut]="PgTimestamp";withTimezone;precision;constructor(t,r){super(t,r),this.withTimezone=r.withTimezone,this.precision=r.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(t){return typeof t=="string"?new Date(this.withTimezone?t:t+"+0000"):t}mapToDriverValue=t=>t.toISOString()}class yBe extends tw{static[Ut]="PgTimestampStringBuilder";constructor(t,r,n){super(t,"string","PgTimestampString"),this.config.withTimezone=r,this.config.precision=n}build(t){return new bBe(t,this.config)}}class bBe extends Nn{static[Ut]="PgTimestampString";withTimezone;precision;constructor(t,r){super(t,r),this.withTimezone=r.withTimezone,this.precision=r.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(t){if(typeof t=="string")return t;const r=t.toISOString().slice(0,-1).replace("T"," ");if(this.withTimezone){const n=t.getTimezoneOffset(),i=n<=0?"+":"-";return`${r}${i}${Math.floor(Math.abs(n)/60).toString().padStart(2,"0")}`}return r}}function Gr(e,t={}){const{name:r,config:n}=ol(e,t);return n?.mode==="string"?new yBe(r,n.withTimezone??!1,n.precision):new vBe(r,n?.withTimezone??!1,n?.precision)}class wBe extends mi{static[Ut]="PgUUIDBuilder";constructor(t){super(t,"string","PgUUID")}defaultRandom(){return this.default(q2`gen_random_uuid()`)}build(t){return new EBe(t,this.config)}}class EBe extends Nn{static[Ut]="PgUUID";getSQLType(){return"uuid"}}function CBe(e){return new wBe(e??"")}class IBe extends mi{static[Ut]="PgVarcharBuilder";constructor(t,r){super(t,"string","PgVarchar"),this.config.length=r.length,this.config.enumValues=r.enum}build(t){return new SBe(t,this.config)}}class SBe extends Nn{static[Ut]="PgVarchar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"varchar":`varchar(${this.length})`}}function hy(e,t={}){const{name:r,config:n}=ol(e,t);return new IBe(r,n)}class BBe extends mi{static[Ut]="PgBinaryVectorBuilder";constructor(t,r){super(t,"string","PgBinaryVector"),this.config.dimensions=r.dimensions}build(t){return new NBe(t,this.config)}}class NBe extends Nn{static[Ut]="PgBinaryVector";dimensions=this.config.dimensions;getSQLType(){return`bit(${this.dimensions})`}}function kBe(e,t){const{name:r,config:n}=ol(e,t);return new BBe(r,n)}class _Be extends mi{static[Ut]="PgHalfVectorBuilder";constructor(t,r){super(t,"array","PgHalfVector"),this.config.dimensions=r.dimensions}build(t){return new jBe(t,this.config)}}class jBe extends Nn{static[Ut]="PgHalfVector";dimensions=this.config.dimensions;getSQLType(){return`halfvec(${this.dimensions})`}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){return t.slice(1,-1).split(",").map(r=>Number.parseFloat(r))}}function DBe(e,t){const{name:r,config:n}=ol(e,t);return new _Be(r,n)}class TBe extends mi{static[Ut]="PgSparseVectorBuilder";constructor(t,r){super(t,"string","PgSparseVector"),this.config.dimensions=r.dimensions}build(t){return new PBe(t,this.config)}}class PBe extends Nn{static[Ut]="PgSparseVector";dimensions=this.config.dimensions;getSQLType(){return`sparsevec(${this.dimensions})`}}function OBe(e,t){const{name:r,config:n}=ol(e,t);return new TBe(r,n)}class RBe extends mi{static[Ut]="PgVectorBuilder";constructor(t,r){super(t,"array","PgVector"),this.config.dimensions=r.dimensions}build(t){return new FBe(t,this.config)}}class FBe extends Nn{static[Ut]="PgVector";dimensions=this.config.dimensions;getSQLType(){return`vector(${this.dimensions})`}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){return t.slice(1,-1).split(",").map(r=>Number.parseFloat(r))}}function MBe(e,t){const{name:r,config:n}=ol(e,t);return new RBe(r,n)}function QBe(){return{bigint:HSe,bigserial:VSe,boolean:Ix,char:e6e,cidr:n6e,customType:s6e,date:c1,doublePrecision:h6e,inet:g6e,integer:Qr,interval:b6e,json:C6e,jsonb:fy,line:j6e,macaddr:P6e,macaddr8:F6e,numeric:H6e,point:V6e,geometry:tBe,real:Sa,serial:sBe,smallint:cBe,smallserial:fBe,text:Dt,time:ABe,timestamp:Gr,uuid:CBe,varchar:hy,bit:kBe,halfvec:DBe,sparsevec:OBe,vector:MBe}}const H8=Symbol.for("drizzle:PgInlineForeignKeys"),DL=Symbol.for("drizzle:EnableRLS");class TL extends el{static[Ut]="PgTable";static Symbol=Object.assign({},el.Symbol,{InlineForeignKeys:H8,EnableRLS:DL});[H8]=[];[DL]=!1;[el.Symbol.ExtraConfigBuilder]=void 0;[el.Symbol.ExtraConfigColumns]={}}function LBe(e,t,r,n,i=e){const a=new TL(e,n,i),s=typeof t=="function"?t(QBe()):t,l=Object.fromEntries(Object.entries(s).map(([d,f])=>{const m=f;m.setName(d);const g=m.build(a);return a[H8].push(...m.buildForeignKeys(g,a)),[d,g]})),c=Object.fromEntries(Object.entries(s).map(([d,f])=>{const m=f;m.setName(d);const g=m.buildExtraConfigColumn(a);return[d,g]})),u=Object.assign(a,l);return u[el.Symbol.Columns]=l,u[el.Symbol.ExtraConfigColumns]=c,Object.assign(u,{enableRLS:()=>(u[TL.Symbol.EnableRLS]=!0,u)})}const La=(e,t,r)=>LBe(e,t,r,void 0),Dre=Object.freeze({status:"aborted"});function rt(e,t,r){function n(l,c){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,c);const u=s.prototype,d=Object.keys(u);for(let f=0;fr?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}const Tre=Symbol("zod_brand");class WA extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class tS extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const UC={};function rc(e){return e&&Object.assign(UC,e),UC}function UBe(e){return e}function $Be(e){return e}function zBe(e){}function HBe(e){throw new Error("Unexpected value in exhaustive check")}function WBe(e){}function UP(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}function sr(e,t="|"){return e.map(r=>vn(r)).join(t)}function $C(e,t){return typeof t=="bigint"?t.toString():t}function rw(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function T1(e){return e==null}function rS(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Pre(e,t){const r=(e.toString().split(".")[1]||"").length,n=t.toString();let i=(n.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(n)){const c=n.match(/\d?e-(\d?)/);c?.[1]&&(i=Number.parseInt(c[1]))}const a=r>i?r:i,s=Number.parseInt(e.toFixed(a).replace(".","")),l=Number.parseInt(t.toFixed(a).replace(".",""));return s%l/10**a}const PL=Symbol("evaluating");function Gn(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==PL)return n===void 0&&(n=PL,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function GBe(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Eg(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function km(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function qBe(e){return km(e._zod.def)}function KBe(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function VBe(e){const t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{const i={};for(let a=0;a{};function Sx(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Rre=rw(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function u1(e){if(Sx(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Sx(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function nS(e){return u1(e)?{...e}:Array.isArray(e)?[...e]:e}function ZBe(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const JBe=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},zC=new Set(["string","number","symbol"]),Fre=new Set(["string","number","bigint","boolean","symbol","undefined"]);function gm(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function q0(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function Rt(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function XBe(e){let t;return new Proxy({},{get(r,n,i){return t??(t=e()),Reflect.get(t,n,i)},set(r,n,i,a){return t??(t=e()),Reflect.set(t,n,i,a)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,i){return t??(t=e()),Reflect.defineProperty(t,n,i)}})}function vn(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Mre(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Qre={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Lre={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Ure(e,t){const r=e._zod.def,n=km(e._zod.def,{get shape(){const i={};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=r.shape[a])}return Eg(this,"shape",i),i},checks:[]});return q0(e,n)}function $re(e,t){const r=e._zod.def,n=km(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return Eg(this,"shape",i),i},checks:[]});return q0(e,n)}function zre(e,t){if(!u1(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const i=km(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return Eg(this,"shape",a),a},checks:[]});return q0(e,i)}function Hre(e,t){if(!u1(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return Eg(this,"shape",n),n},checks:e._zod.def.checks};return q0(e,r)}function Wre(e,t){const r=km(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Eg(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return q0(e,r)}function Gre(e,t,r){const n=km(t._zod.def,{get shape(){const i=t._zod.def.shape,a={...i};if(r)for(const s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(a[s]=e?new e({type:"optional",innerType:i[s]}):i[s])}else for(const s in i)a[s]=e?new e({type:"optional",innerType:i[s]}):i[s];return Eg(this,"shape",a),a},checks:[]});return q0(t,n)}function qre(e,t,r){const n=km(t._zod.def,{get shape(){const i=t._zod.def.shape,a={...i};if(r)for(const s in r){if(!(s in a))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(a[s]=new e({type:"nonoptional",innerType:i[s]}))}else for(const s in i)a[s]=new e({type:"nonoptional",innerType:i[s]});return Eg(this,"shape",a),a},checks:[]});return q0(t,n)}function SA(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function f2(e){return typeof e=="string"?e:e?.message}function $0(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const i=f2(e.inst?._zod.def?.error?.(e))??f2(t?.error?.(e))??f2(r.customError?.(e))??f2(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function iS(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function aS(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Bx(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function eNe(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Kre(e){const t=atob(e),r=new Uint8Array(t.length);for(let n=0;nt.toString(16).padStart(2,"0")).join("")}class aNe{constructor(...t){}}const Yre=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:Lre,Class:aNe,NUMBER_FORMAT_RANGES:Qre,aborted:SA,allowsEval:Rre,assert:WBe,assertEqual:UBe,assertIs:zBe,assertNever:HBe,assertNotEqual:$Be,assignProp:Eg,base64ToUint8Array:Kre,base64urlToUint8Array:tNe,cached:rw,captureStackTrace:$P,cleanEnum:eNe,cleanRegex:rS,clone:q0,cloneDef:qBe,createTransparentProxy:XBe,defineLazy:Gn,esc:W8,escapeRegex:gm,extend:zre,finalizeIssue:$0,floatSafeRemainder:Pre,getElementAtPath:KBe,getEnumValues:UP,getLengthableOrigin:aS,getParsedType:JBe,getSizableOrigin:iS,hexToUint8Array:nNe,isObject:Sx,isPlainObject:u1,issue:Bx,joinValues:sr,jsonStringifyReplacer:$C,merge:Wre,mergeDefs:km,normalizeParams:Rt,nullish:T1,numKeys:ZBe,objectClone:GBe,omit:$re,optionalKeys:Mre,partial:Gre,pick:Ure,prefixIssues:Id,primitiveTypes:Fre,promiseAllObject:VBe,propertyKeyTypes:zC,randomString:YBe,required:qre,safeExtend:Hre,shallowClone:nS,slugify:Ore,stringifyPrimitive:vn,uint8ArrayToBase64:Vre,uint8ArrayToBase64url:rNe,uint8ArrayToHex:iNe,unwrapMessage:f2},Symbol.toStringTag,{value:"Module"})),Zre=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,$C,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},zP=rt("$ZodError",Zre),Wu=rt("$ZodError",Zre,{Parent:Error});function HP(e,t=r=>r.message){const r={},n=[];for(const i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}function WP(e,t=r=>r.message){const r={_errors:[]},n=i=>{for(const a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>n({issues:s}));else if(a.code==="invalid_key")n({issues:a.issues});else if(a.code==="invalid_element")n({issues:a.issues});else if(a.path.length===0)r._errors.push(t(a));else{let s=r,l=0;for(;lr.message){const r={errors:[]},n=(i,a=[])=>{var s,l;for(const c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>n({issues:u},c.path));else if(c.code==="invalid_key")n({issues:c.issues},c.path);else if(c.code==="invalid_element")n({issues:c.issues},c.path);else{const u=[...a,...c.path];if(u.length===0){r.errors.push(t(c));continue}let d=r,f=0;for(;ftypeof n=="object"?n.key:n);for(const n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}function ene(e){const t=[],r=[...e.issues].sort((n,i)=>(n.path??[]).length-(i.path??[]).length);for(const n of r)t.push(`✖ ${n.message}`),n.path?.length&&t.push(` → at ${Xre(n.path)}`);return t.join(` `)}const nw=e=>(t,r,n,i)=>{const a=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new WA;if(s.issues.length){const l=new(i?.Err??e)(s.issues.map(c=>$0(c,a,rc())));throw $P(l,i?.callee),l}return s.value},G8=nw(Wu),iw=e=>async(t,r,n,i)=>{const a=n?Object.assign(n,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){const l=new(i?.Err??e)(s.issues.map(c=>$0(c,a,rc())));throw $P(l,i?.callee),l}return s.value},q8=iw(Wu),aw=e=>(t,r,n)=>{const i=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new WA;return a.issues.length?{success:!1,error:new(e??zP)(a.issues.map(s=>$0(s,i,rc())))}:{success:!0,data:a.value}},tne=aw(Wu),sw=e=>async(t,r,n)=>{const i=n?Object.assign(n,{async:!0}):{async:!0};let a=t._zod.run({value:r,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(s=>$0(s,i,rc())))}:{success:!0,data:a.value}},rne=sw(Wu),GP=e=>(t,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return nw(e)(t,r,i)},sNe=GP(Wu),qP=e=>(t,r,n)=>nw(e)(t,r,n),oNe=qP(Wu),KP=e=>async(t,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return iw(e)(t,r,i)},lNe=KP(Wu),VP=e=>async(t,r,n)=>iw(e)(t,r,n),cNe=VP(Wu),YP=e=>(t,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return aw(e)(t,r,i)},uNe=YP(Wu),ZP=e=>(t,r,n)=>aw(e)(t,r,n),dNe=ZP(Wu),JP=e=>async(t,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return sw(e)(t,r,i)},fNe=JP(Wu),XP=e=>async(t,r,n)=>sw(e)(t,r,n),hNe=XP(Wu),nne=/^[cC][^\s-]{8,}$/,ine=/^[0-9a-z]+$/,ane=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,sne=/^[0-9a-vA-V]{20}$/,one=/^[A-Za-z0-9]{27}$/,lne=/^[a-zA-Z0-9_-]{21}$/,cne=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,mNe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,une=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Nx=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,pNe=Nx(4),gNe=Nx(6),ANe=Nx(7),dne=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,vNe=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,xNe=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,fne=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,yNe=fne,bNe=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,wNe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function hne(){return new RegExp(wNe,"u")}const mne=/^(?:(?:25[0-5]|2[0-4][0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-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,wne=/^\+(?:[0-9]){6,14}[0-9]$/,Ene="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Cne=new RegExp(`^${Ene}$`);function Ine(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Sne(e){return new RegExp(`^${Ine(e)}$`)}function Bne(e){const t=Ine({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Ene}T(?:${n})$`)}const Nne=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},kne=/^-?\d+n?$/,_ne=/^-?\d+$/,jne=/^-?\d+(?:\.\d+)?/,Dne=/^(?:true|false)$/i,Tne=/^null$/i,Pne=/^undefined$/i,One=/^[^A-Z]*$/,Rne=/^[^a-z]*$/,Fne=/^[0-9a-fA-F]*$/;function ow(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function lw(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const ENe=/^[0-9a-fA-F]{32}$/,CNe=ow(22,"=="),INe=lw(22),SNe=/^[0-9a-fA-F]{40}$/,BNe=ow(27,"="),NNe=lw(27),kNe=/^[0-9a-fA-F]{64}$/,_Ne=ow(43,"="),jNe=lw(43),DNe=/^[0-9a-fA-F]{96}$/,TNe=ow(64,""),PNe=lw(64),ONe=/^[0-9a-fA-F]{128}$/,RNe=ow(86,"=="),FNe=lw(86),t7=Object.freeze(Object.defineProperty({__proto__:null,base64:xne,base64url:e7,bigint:kne,boolean:Dne,browserEmail:bNe,cidrv4:Ane,cidrv6:vne,cuid:nne,cuid2:ine,date:Cne,datetime:Bne,domain:bne,duration:cne,e164:wne,email:dne,emoji:hne,extendedDuration:mNe,guid:une,hex:Fne,hostname:yne,html5Email:vNe,idnEmail:yNe,integer:_ne,ipv4:mne,ipv6:pne,ksuid:one,lowercase:One,mac:gne,md5_base64:CNe,md5_base64url:INe,md5_hex:ENe,nanoid:lne,null:Tne,number:jne,rfc5322Email:xNe,sha1_base64:BNe,sha1_base64url:NNe,sha1_hex:SNe,sha256_base64:_Ne,sha256_base64url:jNe,sha256_hex:kNe,sha384_base64:TNe,sha384_base64url:PNe,sha384_hex:DNe,sha512_base64:RNe,sha512_base64url:FNe,sha512_hex:ONe,string:Nne,time:Sne,ulid:ane,undefined:Pne,unicodeEmail:fne,uppercase:Rne,uuid:Nx,uuid4:pNe,uuid6:gNe,uuid7:ANe,xid:sne},Symbol.toStringTag,{value:"Module"})),is=rt("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Mne={number:"number",bigint:"bigint",object:"date"},r7=rt("$ZodCheckLessThan",(e,t)=>{is.init(e,t);const r=Mne[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,a=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?n.value<=t.value:n.value{is.init(e,t);const r=Mne[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,a=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Qne=rt("$ZodCheckMultipleOf",(e,t)=>{is.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Pre(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Lne=rt("$ZodCheckNumberFormat",(e,t)=>{is.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[i,a]=Qre[t.format];e._zod.onattach.push(s=>{const l=s._zod.bag;l.format=t.format,l.minimum=i,l.maximum=a,r&&(l.pattern=_ne)}),e._zod.check=s=>{const l=s.value;if(r){if(!Number.isInteger(l)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?s.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):s.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}la&&s.issues.push({origin:"number",input:l,code:"too_big",maximum:a,inst:e})}}),Une=rt("$ZodCheckBigIntFormat",(e,t)=>{is.init(e,t);const[r,n]=Lre[t.format];e._zod.onattach.push(i=>{const a=i._zod.bag;a.format=t.format,a.minimum=r,a.maximum=n}),e._zod.check=i=>{const a=i.value;an&&i.issues.push({origin:"bigint",input:a,code:"too_big",maximum:n,inst:e})}}),$ne=rt("$ZodCheckMaxSize",(e,t)=>{var r;is.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!T1(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const i=n.value;i.size<=t.maximum||n.issues.push({origin:iS(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),zne=rt("$ZodCheckMinSize",(e,t)=>{var r;is.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!T1(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;i.size>=t.minimum||n.issues.push({origin:iS(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Hne=rt("$ZodCheckSizeEquals",(e,t)=>{var r;is.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!T1(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag;i.minimum=t.size,i.maximum=t.size,i.size=t.size}),e._zod.check=n=>{const i=n.value,a=i.size;if(a===t.size)return;const s=a>t.size;n.issues.push({origin:iS(i),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Wne=rt("$ZodCheckMaxLength",(e,t)=>{var r;is.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!T1(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const i=n.value;if(i.length<=t.maximum)return;const s=aS(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Gne=rt("$ZodCheckMinLength",(e,t)=>{var r;is.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!T1(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const s=aS(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),qne=rt("$ZodCheckLengthEquals",(e,t)=>{var r;is.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!T1(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=n=>{const i=n.value,a=i.length;if(a===t.length)return;const s=aS(i),l=a>t.length;n.issues.push({origin:s,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),cw=rt("$ZodCheckStringFormat",(e,t)=>{var r,n;is.init(e,t),e._zod.onattach.push(i=>{const a=i._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),Kne=rt("$ZodCheckRegex",(e,t)=>{cw.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Vne=rt("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=One),cw.init(e,t)}),Yne=rt("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Rne),cw.init(e,t)}),Zne=rt("$ZodCheckIncludes",(e,t)=>{is.init(e,t);const r=gm(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(i=>{const a=i._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),Jne=rt("$ZodCheckStartsWith",(e,t)=>{is.init(e,t);const r=new RegExp(`^${gm(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Xne=rt("$ZodCheckEndsWith",(e,t)=>{is.init(e,t);const r=new RegExp(`.*${gm(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function OL(e,t,r){e.issues.length&&t.issues.push(...Id(r,e.issues))}const eie=rt("$ZodCheckProperty",(e,t)=>{is.init(e,t),e._zod.check=r=>{const n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(i=>OL(i,r,t.property));OL(n,r,t.property)}}),tie=rt("$ZodCheckMimeType",(e,t)=>{is.init(e,t);const r=new Set(t.mime);e._zod.onattach.push(n=>{n._zod.bag.mime=t.mime}),e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort})}}),rie=rt("$ZodCheckOverwrite",(e,t)=>{is.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class nie{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(` `).filter(s=>s),i=Math.min(...n.map(s=>s.length-s.trimStart().length)),a=n.map(s=>s.slice(i)).map(s=>" ".repeat(this.indent*2)+s);for(const s of a)this.content.push(s)}compile(){const t=Function,r=this?.args,i=[...(this?.content??[""]).map(a=>` ${a}`)];return new t(...r,i.join(` `))}}const iie={major:4,minor:2,patch:1},Sn=rt("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=iie;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const i of n)for(const a of i._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(s,l,c)=>{let u=SA(s),d;for(const f of l){if(f._zod.def.when){if(!f._zod.def.when(s))continue}else if(u)continue;const m=s.issues.length,g=f._zod.check(s);if(g instanceof Promise&&c?.async===!1)throw new WA;if(d||g instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await g,s.issues.length!==m&&(u||(u=SA(s,m)))});else{if(s.issues.length===m)continue;u||(u=SA(s,m))}}return d?d.then(()=>s):s},a=(s,l,c)=>{if(SA(s))return s.aborted=!0,s;const u=i(l,n,c);if(u instanceof Promise){if(c.async===!1)throw new WA;return u.then(d=>e._zod.parse(d,c))}return e._zod.parse(u,c)};e._zod.run=(s,l)=>{if(l.skipChecks)return e._zod.parse(s,l);if(l.direction==="backward"){const u=e._zod.parse({value:s.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(d=>a(d,s,l)):a(u,s,l)}const c=e._zod.parse(s,l);if(c instanceof Promise){if(l.async===!1)throw new WA;return c.then(u=>i(u,n,l))}return i(c,n,l)}}e["~standard"]={validate:i=>{try{const a=tne(e,i);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return rne(e,i).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),uw=rt("$ZodString",(e,t)=>{Sn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Nne(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ma=rt("$ZodStringFormat",(e,t)=>{cw.init(e,t),uw.init(e,t)}),aie=rt("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=une),ma.init(e,t)}),sie=rt("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Nx(n))}else t.pattern??(t.pattern=Nx());ma.init(e,t)}),oie=rt("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=dne),ma.init(e,t)}),lie=rt("$ZodURL",(e,t)=>{ma.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),cie=rt("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=hne()),ma.init(e,t)}),uie=rt("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=lne),ma.init(e,t)}),die=rt("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=nne),ma.init(e,t)}),fie=rt("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ine),ma.init(e,t)}),hie=rt("$ZodULID",(e,t)=>{t.pattern??(t.pattern=ane),ma.init(e,t)}),mie=rt("$ZodXID",(e,t)=>{t.pattern??(t.pattern=sne),ma.init(e,t)}),pie=rt("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=one),ma.init(e,t)}),gie=rt("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Bne(t)),ma.init(e,t)}),Aie=rt("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Cne),ma.init(e,t)}),vie=rt("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Sne(t)),ma.init(e,t)}),xie=rt("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=cne),ma.init(e,t)}),yie=rt("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=mne),ma.init(e,t),e._zod.bag.format="ipv4"}),bie=rt("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=pne),ma.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),wie=rt("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=gne(t.delimiter)),ma.init(e,t),e._zod.bag.format="mac"}),Eie=rt("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ane),ma.init(e,t)}),Cie=rt("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=vne),ma.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[i,a]=n;if(!a)throw new Error;const s=Number(a);if(`${s}`!==a)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function i7(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Iie=rt("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=xne),ma.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{i7(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Sie(e){if(!e7.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return i7(r)}const Bie=rt("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=e7),ma.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Sie(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Nie=rt("$ZodE164",(e,t)=>{t.pattern??(t.pattern=wne),ma.init(e,t)});function kie(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const _ie=rt("$ZodJWT",(e,t)=>{ma.init(e,t),e._zod.check=r=>{kie(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),jie=rt("$ZodCustomStringFormat",(e,t)=>{ma.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),a7=rt("$ZodNumber",(e,t)=>{Sn.init(e,t),e._zod.pattern=e._zod.bag.pattern??jne,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;const a=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...a?{received:a}:{}}),r}}),Die=rt("$ZodNumberFormat",(e,t)=>{Lne.init(e,t),a7.init(e,t)}),s7=rt("$ZodBoolean",(e,t)=>{Sn.init(e,t),e._zod.pattern=Dne,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),o7=rt("$ZodBigInt",(e,t)=>{Sn.init(e,t),e._zod.pattern=kne,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Tie=rt("$ZodBigIntFormat",(e,t)=>{Une.init(e,t),o7.init(e,t)}),Pie=rt("$ZodSymbol",(e,t)=>{Sn.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),r}}),Oie=rt("$ZodUndefined",(e,t)=>{Sn.init(e,t),e._zod.pattern=Pne,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,n)=>{const i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),r}}),Rie=rt("$ZodNull",(e,t)=>{Sn.init(e,t),e._zod.pattern=Tne,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{const i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),r}}),Fie=rt("$ZodAny",(e,t)=>{Sn.init(e,t),e._zod.parse=r=>r}),Mie=rt("$ZodUnknown",(e,t)=>{Sn.init(e,t),e._zod.parse=r=>r}),Qie=rt("$ZodNever",(e,t)=>{Sn.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Lie=rt("$ZodVoid",(e,t)=>{Sn.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),Uie=rt("$ZodDate",(e,t)=>{Sn.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}const i=r.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...a?{received:"Invalid Date"}:{},inst:e}),r}});function RL(e,t,r){e.issues.length&&t.issues.push(...Id(r,e.issues)),t.value[r]=e.value}const $ie=rt("$ZodArray",(e,t)=>{Sn.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);const a=[];for(let s=0;sRL(u,r,s))):RL(c,r,s)}return a.length?Promise.all(a).then(()=>r):r}});function HC(e,t,r,n){e.issues.length&&t.issues.push(...Id(r,e.issues)),e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function zie(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=Mre(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Hie(e,t,r,n,i,a){const s=[],l=i.keySet,c=i.catchall._zod,u=c.def.type;for(const d in t){if(l.has(d))continue;if(u==="never"){s.push(d);continue}const f=c.run({value:t[d],issues:[]},n);f instanceof Promise?e.push(f.then(m=>HC(m,r,d,t))):HC(f,r,d,t)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:a}),e.length?Promise.all(e).then(()=>r):r}const Wie=rt("$ZodObject",(e,t)=>{if(Sn.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const l=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...l};return Object.defineProperty(t,"shape",{value:c}),c}})}const n=rw(()=>zie(t));Gn(e._zod,"propValues",()=>{const l=t.shape,c={};for(const u in l){const d=l[u]._zod;if(d.values){c[u]??(c[u]=new Set);for(const f of d.values)c[u].add(f)}}return c});const i=Sx,a=t.catchall;let s;e._zod.parse=(l,c)=>{s??(s=n.value);const u=l.value;if(!i(u))return l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l;l.value={};const d=[],f=s.shape;for(const m of s.keys){const A=f[m]._zod.run({value:u[m],issues:[]},c);A instanceof Promise?d.push(A.then(v=>HC(v,l,m,u))):HC(A,l,m,u)}return a?Hie(d,u,l,c,n.value,e):d.length?Promise.all(d).then(()=>l):l}}),Gie=rt("$ZodObjectJIT",(e,t)=>{Wie.init(e,t);const r=e._zod.parse,n=rw(()=>zie(t)),i=m=>{const g=new nie(["shape","payload","ctx"]),A=n.value,v=S=>{const _=W8(S);return`shape[${_}]._zod.run({ value: input[${_}], issues: [] }, ctx)`};g.write("const input = payload.value;");const b=Object.create(null);let E=0;for(const S of A.keys)b[S]=`key_${E++}`;g.write("const newResult = {};");for(const S of A.keys){const _=b[S],B=W8(S);g.write(`const ${_} = ${v(S)};`),g.write(` if (${_}.issues.length) { payload.issues = payload.issues.concat(${_}.issues.map(iss => ({ ...iss, path: iss.path ? [${B}, ...iss.path] : [${B}] }))); } if (${_}.value === undefined) { if (${B} in input) { newResult[${B}] = undefined; } } else { newResult[${B}] = ${_}.value; } `)}g.write("payload.value = newResult;"),g.write("return payload;");const I=g.compile();return(S,_)=>I(m,S,_)};let a;const s=Sx,l=!UC.jitless,u=l&&Rre.value,d=t.catchall;let f;e._zod.parse=(m,g)=>{f??(f=n.value);const A=m.value;return s(A)?l&&u&&g?.async===!1&&g.jitless!==!0?(a||(a=i(t.shape)),m=a(m,g),d?Hie([],A,m,g,f,e):m):r(m,g):(m.issues.push({expected:"object",code:"invalid_type",input:A,inst:e}),m)}});function FL(e,t,r,n){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const i=e.filter(a=>!SA(a));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(a=>a.issues.map(s=>$0(s,n,rc())))}),t)}const sS=rt("$ZodUnion",(e,t)=>{Sn.init(e,t),Gn(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Gn(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Gn(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Gn(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${i.map(a=>rS(a.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(r)return n(i,a);let s=!1;const l=[];for(const c of t.options){const u=c._zod.run({value:i.value,issues:[]},a);if(u instanceof Promise)l.push(u),s=!0;else{if(u.issues.length===0)return u;l.push(u)}}return s?Promise.all(l).then(c=>FL(c,i,e,a)):FL(l,i,e,a)}});function ML(e,t,r,n){const i=e.filter(a=>a.issues.length===0);return i.length===1?(t.value=i[0].value,t):(i.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(a=>a.issues.map(s=>$0(s,n,rc())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}const qie=rt("$ZodXor",(e,t)=>{sS.init(e,t),t.inclusive=!1;const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(r)return n(i,a);let s=!1;const l=[];for(const c of t.options){const u=c._zod.run({value:i.value,issues:[]},a);u instanceof Promise?(l.push(u),s=!0):l.push(u)}return s?Promise.all(l).then(c=>ML(c,i,e,a)):ML(l,i,e,a)}}),Kie=rt("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,sS.init(e,t);const r=e._zod.parse;Gn(e._zod,"propValues",()=>{const i={};for(const a of t.options){const s=a._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const[l,c]of Object.entries(s)){i[l]||(i[l]=new Set);for(const u of c)i[l].add(u)}}return i});const n=rw(()=>{const i=t.options,a=new Map;for(const s of i){const l=s._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const c of l){if(a.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);a.set(c,s)}}return a});e._zod.parse=(i,a)=>{const s=i.value;if(!Sx(s))return i.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),i;const l=n.value.get(s?.[t.discriminator]);return l?l._zod.run(i,a):t.unionFallback?r(i,a):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),i)}}),Vie=rt("$ZodIntersection",(e,t)=>{Sn.init(e,t),e._zod.parse=(r,n)=>{const i=r.value,a=t.left._zod.run({value:i,issues:[]},n),s=t.right._zod.run({value:i,issues:[]},n);return a instanceof Promise||s instanceof Promise?Promise.all([a,s]).then(([c,u])=>QL(r,c,u)):QL(r,a,s)}});function K8(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(u1(e)&&u1(t)){const r=Object.keys(t),n=Object.keys(e).filter(a=>r.indexOf(a)!==-1),i={...e,...t};for(const a of n){const s=K8(e[a],t[a]);if(!s.valid)return{valid:!1,mergeErrorPath:[a,...s.mergeErrorPath]};i[a]=s.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n{Sn.init(e,t);const r=t.items;e._zod.parse=(n,i)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];const s=[],l=[...r].reverse().findIndex(d=>d._zod.optin!=="optional"),c=l===-1?0:r.length-l;if(!t.rest){const d=a.length>r.length,f=a.length=a.length&&u>=c)continue;const f=d._zod.run({value:a[u],issues:[]},i);f instanceof Promise?s.push(f.then(m=>u4(m,n,u))):u4(f,n,u)}if(t.rest){const d=a.slice(r.length);for(const f of d){u++;const m=t.rest._zod.run({value:f,issues:[]},i);m instanceof Promise?s.push(m.then(g=>u4(g,n,u))):u4(m,n,u)}}return s.length?Promise.all(s).then(()=>n):n}});function u4(e,t,r){e.issues.length&&t.issues.push(...Id(r,e.issues)),t.value[r]=e.value}const Yie=rt("$ZodRecord",(e,t)=>{Sn.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;if(!u1(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;const a=[],s=t.keyType._zod.values;if(s){r.value={};const l=new Set;for(const u of s)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){l.add(typeof u=="number"?u.toString():u);const d=t.valueType._zod.run({value:i[u],issues:[]},n);d instanceof Promise?a.push(d.then(f=>{f.issues.length&&r.issues.push(...Id(u,f.issues)),r.value[u]=f.value})):(d.issues.length&&r.issues.push(...Id(u,d.issues)),r.value[u]=d.value)}let c;for(const u in i)l.has(u)||(c=c??[],c.push(u));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c})}else{r.value={};for(const l of Reflect.ownKeys(i)){if(l==="__proto__")continue;const c=t.keyType._zod.run({value:l,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(c.issues.length){t.mode==="loose"?r.value[l]=i[l]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>$0(d,n,rc())),input:l,path:[l],inst:e});continue}const u=t.valueType._zod.run({value:i[l],issues:[]},n);u instanceof Promise?a.push(u.then(d=>{d.issues.length&&r.issues.push(...Id(l,d.issues)),r.value[c.value]=d.value})):(u.issues.length&&r.issues.push(...Id(l,u.issues)),r.value[c.value]=u.value)}}return a.length?Promise.all(a).then(()=>r):r}}),Zie=rt("$ZodMap",(e,t)=>{Sn.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),r;const a=[];r.value=new Map;for(const[s,l]of i){const c=t.keyType._zod.run({value:s,issues:[]},n),u=t.valueType._zod.run({value:l,issues:[]},n);c instanceof Promise||u instanceof Promise?a.push(Promise.all([c,u]).then(([d,f])=>{LL(d,f,r,s,i,e,n)})):LL(c,u,r,s,i,e,n)}return a.length?Promise.all(a).then(()=>r):r}});function LL(e,t,r,n,i,a,s){e.issues.length&&(zC.has(typeof n)?r.issues.push(...Id(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:i,inst:a,issues:e.issues.map(l=>$0(l,s,rc()))})),t.issues.length&&(zC.has(typeof n)?r.issues.push(...Id(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:a,key:n,issues:t.issues.map(l=>$0(l,s,rc()))})),r.value.set(e.value,t.value)}const Jie=rt("$ZodSet",(e,t)=>{Sn.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),r;const a=[];r.value=new Set;for(const s of i){const l=t.valueType._zod.run({value:s,issues:[]},n);l instanceof Promise?a.push(l.then(c=>UL(c,r))):UL(l,r)}return a.length?Promise.all(a).then(()=>r):r}});function UL(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const Xie=rt("$ZodEnum",(e,t)=>{Sn.init(e,t);const r=UP(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>zC.has(typeof i)).map(i=>typeof i=="string"?gm(i):i.toString()).join("|")})$`),e._zod.parse=(i,a)=>{const s=i.value;return n.has(s)||i.issues.push({code:"invalid_value",values:r,input:s,inst:e}),i}}),eae=rt("$ZodLiteral",(e,t)=>{if(Sn.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?gm(n):n?gm(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{const a=n.value;return r.has(a)||n.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),n}}),tae=rt("$ZodFile",(e,t)=>{Sn.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),r}}),rae=rt("$ZodTransform",(e,t)=>{Sn.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new tS(e.constructor.name);const i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(r.value=s,r));if(i instanceof Promise)throw new WA;return r.value=i,r}});function $L(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const nae=rt("$ZodOptional",(e,t)=>{Sn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Gn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Gn(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${rS(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>$L(a,r.value)):$L(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),iae=rt("$ZodNullable",(e,t)=>{Sn.init(e,t),Gn(e._zod,"optin",()=>t.innerType._zod.optin),Gn(e._zod,"optout",()=>t.innerType._zod.optout),Gn(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${rS(r.source)}|null)$`):void 0}),Gn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),aae=rt("$ZodDefault",(e,t)=>{Sn.init(e,t),e._zod.optin="optional",Gn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>zL(a,t)):zL(i,t)}});function zL(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const sae=rt("$ZodPrefault",(e,t)=>{Sn.init(e,t),e._zod.optin="optional",Gn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),oae=rt("$ZodNonOptional",(e,t)=>{Sn.init(e,t),Gn(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>HL(a,e)):HL(i,e)}});function HL(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const lae=rt("$ZodSuccess",(e,t)=>{Sn.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new tS("ZodSuccess");const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>(r.value=a.issues.length===0,r)):(r.value=i.issues.length===0,r)}}),cae=rt("$ZodCatch",(e,t)=>{Sn.init(e,t),Gn(e._zod,"optin",()=>t.innerType._zod.optin),Gn(e._zod,"optout",()=>t.innerType._zod.optout),Gn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>(r.value=a.value,a.issues.length&&(r.value=t.catchValue({...r,error:{issues:a.issues.map(s=>$0(s,n,rc()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(a=>$0(a,n,rc()))},input:r.value}),r.issues=[]),r)}}),uae=rt("$ZodNaN",(e,t)=>{Sn.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),dae=rt("$ZodPipe",(e,t)=>{Sn.init(e,t),Gn(e._zod,"values",()=>t.in._zod.values),Gn(e._zod,"optin",()=>t.in._zod.optin),Gn(e._zod,"optout",()=>t.out._zod.optout),Gn(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const a=t.out._zod.run(r,n);return a instanceof Promise?a.then(s=>d4(s,t.in,n)):d4(a,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(a=>d4(a,t.out,n)):d4(i,t.out,n)}});function d4(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const c7=rt("$ZodCodec",(e,t)=>{Sn.init(e,t),Gn(e._zod,"values",()=>t.in._zod.values),Gn(e._zod,"optin",()=>t.in._zod.optin),Gn(e._zod,"optout",()=>t.out._zod.optout),Gn(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){const a=t.in._zod.run(r,n);return a instanceof Promise?a.then(s=>f4(s,t,n)):f4(a,t,n)}else{const a=t.out._zod.run(r,n);return a instanceof Promise?a.then(s=>f4(s,t,n)):f4(a,t,n)}}});function f4(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){const i=t.transform(e.value,e);return i instanceof Promise?i.then(a=>h4(e,a,t.out,r)):h4(e,i,t.out,r)}else{const i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(a=>h4(e,a,t.in,r)):h4(e,i,t.in,r)}}function h4(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}const fae=rt("$ZodReadonly",(e,t)=>{Sn.init(e,t),Gn(e._zod,"propValues",()=>t.innerType._zod.propValues),Gn(e._zod,"values",()=>t.innerType._zod.values),Gn(e._zod,"optin",()=>t.innerType?._zod?.optin),Gn(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(WL):WL(i)}});function WL(e){return e.value=Object.freeze(e.value),e}const hae=rt("$ZodTemplateLiteral",(e,t)=>{Sn.init(e,t);const r=[];for(const n of t.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);const i=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${n._zod.traits}`);const a=i.startsWith("^")?1:0,s=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(a,s))}else if(n===null||Fre.has(typeof n))r.push(gm(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"template_literal",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),mae=rt("$ZodFunction",(e,t)=>(Sn.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){const i=e._def.input?G8(e._def.input,n):n,a=Reflect.apply(r,this,i);return e._def.output?G8(e._def.output,a):a}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){const i=e._def.input?await q8(e._def.input,n):n,a=await Reflect.apply(r,this,i);return e._def.output?await q8(e._def.output,a):a}},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{const n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new l7({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{const n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),pae=rt("$ZodPromise",(e,t)=>{Sn.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>t.innerType._zod.run({value:i,issues:[]},n))}),gae=rt("$ZodLazy",(e,t)=>{Sn.init(e,t),Gn(e._zod,"innerType",()=>t.getter()),Gn(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Gn(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Gn(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Gn(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),Aae=rt("$ZodCustom",(e,t)=>{is.init(e,t),Sn.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(a=>GL(a,r,n,e));GL(i,r,n,e)}});function GL(e,t,r,n){if(!e){const i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(Bx(i))}}const MNe=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"};return i=>{switch(i.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${i.expected}، ولكن تم إدخال ${r(i.input)}`;case"invalid_value":return i.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${vn(i.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?` أكبر من اللازم: يفترض أن تكون ${i.origin??"القيمة"} ${a} ${i.maximum.toString()} ${s.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${i.origin??"القيمة"} ${a} ${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`أصغر من اللازم: يفترض لـ ${i.origin} أن يكون ${a} ${i.minimum.toString()} ${s.unit}`:`أصغر من اللازم: يفترض لـ ${i.origin} أن يكون ${a} ${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${i.prefix}"`:a.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${a.suffix}"`:a.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${a.includes}"`:a.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${a.pattern}`:`${n[a.format]??i.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${i.divisor}`;case"unrecognized_keys":return`معرف${i.keys.length>1?"ات":""} غريب${i.keys.length>1?"ة":""}: ${sr(i.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${i.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${i.origin}`;default:return"مدخل غير مقبول"}}};function QNe(){return{localeError:MNe()}}const LNe=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${i.expected}, daxil olan ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Yanlış dəyər: gözlənilən ${vn(i.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Çox böyük: gözlənilən ${i.origin??"dəyər"} ${a}${i.maximum.toString()} ${s.unit??"element"}`:`Çox böyük: gözlənilən ${i.origin??"dəyər"} ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Çox kiçik: gözlənilən ${i.origin} ${a}${i.minimum.toString()} ${s.unit}`:`Çox kiçik: gözlənilən ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Yanlış mətn: "${a.prefix}" ilə başlamalıdır`:a.format==="ends_with"?`Yanlış mətn: "${a.suffix}" ilə bitməlidir`:a.format==="includes"?`Yanlış mətn: "${a.includes}" daxil olmalıdır`:a.format==="regex"?`Yanlış mətn: ${a.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[a.format]??i.format}`}case"not_multiple_of":return`Yanlış ədəd: ${i.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${i.keys.length>1?"lar":""}: ${sr(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${i.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function UNe(){return{localeError:LNe()}}function qL(e,t,r,n){const i=Math.abs(e),a=i%10,s=i%100;return s>=11&&s<=19?n:a===1?t:a>=2&&a<=4?r:n}const $Ne=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"лік";case"object":{if(Array.isArray(i))return"масіў";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"};return i=>{switch(i.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${i.expected}, атрымана ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Няправільны ўвод: чакалася ${vn(i.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);if(s){const l=Number(i.maximum),c=qL(l,s.unit.one,s.unit.few,s.unit.many);return`Занадта вялікі: чакалася, што ${i.origin??"значэнне"} павінна ${s.verb} ${a}${i.maximum.toString()} ${c}`}return`Занадта вялікі: чакалася, што ${i.origin??"значэнне"} павінна быць ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);if(s){const l=Number(i.minimum),c=qL(l,s.unit.one,s.unit.few,s.unit.many);return`Занадта малы: чакалася, што ${i.origin} павінна ${s.verb} ${a}${i.minimum.toString()} ${c}`}return`Занадта малы: чакалася, што ${i.origin} павінна быць ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${a.prefix}"`:a.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${a.suffix}"`:a.format==="includes"?`Няправільны радок: павінен змяшчаць "${a.includes}"`:a.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${a.pattern}`:`Няправільны ${n[a.format]??i.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${i.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${i.keys.length>1?"ключы":"ключ"}: ${sr(i.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${i.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${i.origin}`;default:return"Няправільны ўвод"}}};function zNe(){return{localeError:$Ne()}}const HNe=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":{if(Array.isArray(e))return"масив";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},WNe=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(n){return e[n]??null}const r={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"};return n=>{switch(n.code){case"invalid_type":return`Невалиден вход: очакван ${n.expected}, получен ${HNe(n.input)}`;case"invalid_value":return n.values.length===1?`Невалиден вход: очакван ${vn(n.values[0])}`:`Невалидна опция: очаквано едно от ${sr(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Твърде голямо: очаква се ${n.origin??"стойност"} да съдържа ${i}${n.maximum.toString()} ${a.unit??"елемента"}`:`Твърде голямо: очаква се ${n.origin??"стойност"} да бъде ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Твърде малко: очаква се ${n.origin} да съдържа ${i}${n.minimum.toString()} ${a.unit}`:`Твърде малко: очаква се ${n.origin} да бъде ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;if(i.format==="starts_with")return`Невалиден низ: трябва да започва с "${i.prefix}"`;if(i.format==="ends_with")return`Невалиден низ: трябва да завършва с "${i.suffix}"`;if(i.format==="includes")return`Невалиден низ: трябва да включва "${i.includes}"`;if(i.format==="regex")return`Невалиден низ: трябва да съвпада с ${i.pattern}`;let a="Невалиден";return i.format==="emoji"&&(a="Невалидно"),i.format==="datetime"&&(a="Невалидно"),i.format==="date"&&(a="Невалидна"),i.format==="time"&&(a="Невалидно"),i.format==="duration"&&(a="Невалидна"),`${a} ${r[i.format]??n.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${n.divisor}`;case"unrecognized_keys":return`Неразпознат${n.keys.length>1?"и":""} ключ${n.keys.length>1?"ове":""}: ${sr(n.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${n.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${n.origin}`;default:return"Невалиден вход"}}};function GNe(){return{localeError:WNe()}}const qNe=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Tipus invàlid: s'esperava ${i.expected}, s'ha rebut ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Valor invàlid: s'esperava ${vn(i.values[0])}`:`Opció invàlida: s'esperava una de ${sr(i.values," o ")}`;case"too_big":{const a=i.inclusive?"com a màxim":"menys de",s=t(i.origin);return s?`Massa gran: s'esperava que ${i.origin??"el valor"} contingués ${a} ${i.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${a} ${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?"com a mínim":"més de",s=t(i.origin);return s?`Massa petit: s'esperava que ${i.origin} contingués ${a} ${i.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${a} ${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Format invàlid: ha de començar amb "${a.prefix}"`:a.format==="ends_with"?`Format invàlid: ha d'acabar amb "${a.suffix}"`:a.format==="includes"?`Format invàlid: ha d'incloure "${a.includes}"`:a.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${a.pattern}`:`Format invàlid per a ${n[a.format]??i.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${sr(i.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${i.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${i.origin}`;default:return"Entrada invàlida"}}};function KNe(){return{localeError:qNe()}}const VNe=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(i))return"pole";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"};return i=>{switch(i.code){case"invalid_type":return`Neplatný vstup: očekáváno ${i.expected}, obdrženo ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Neplatný vstup: očekáváno ${vn(i.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Hodnota je příliš velká: ${i.origin??"hodnota"} musí mít ${a}${i.maximum.toString()} ${s.unit??"prvků"}`:`Hodnota je příliš velká: ${i.origin??"hodnota"} musí být ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Hodnota je příliš malá: ${i.origin??"hodnota"} musí mít ${a}${i.minimum.toString()} ${s.unit??"prvků"}`:`Hodnota je příliš malá: ${i.origin??"hodnota"} musí být ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Neplatný řetězec: musí začínat na "${a.prefix}"`:a.format==="ends_with"?`Neplatný řetězec: musí končit na "${a.suffix}"`:a.format==="includes"?`Neplatný řetězec: musí obsahovat "${a.includes}"`:a.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${a.pattern}`:`Neplatný formát ${n[a.format]??i.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${i.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${sr(i.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${i.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${i.origin}`;default:return"Neplatný vstup"}}};function YNe(){return{localeError:VNe()}}const ZNe=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function r(s){return e[s]??null}function n(s){return t[s]??s}const i=s=>{const l=typeof s;switch(l){case"number":return Number.isNaN(s)?"NaN":"tal";case"object":return Array.isArray(s)?"liste":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype&&s.constructor?s.constructor.name:"objekt"}return l},a={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return s=>{switch(s.code){case"invalid_type":return`Ugyldigt input: forventede ${n(s.expected)}, fik ${n(i(s.input))}`;case"invalid_value":return s.values.length===1?`Ugyldig værdi: forventede ${vn(s.values[0])}`:`Ugyldigt valg: forventede en af følgende ${sr(s.values,"|")}`;case"too_big":{const l=s.inclusive?"<=":"<",c=r(s.origin),u=n(s.origin);return c?`For stor: forventede ${u??"value"} ${c.verb} ${l} ${s.maximum.toString()} ${c.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${l} ${s.maximum.toString()}`}case"too_small":{const l=s.inclusive?">=":">",c=r(s.origin),u=n(s.origin);return c?`For lille: forventede ${u} ${c.verb} ${l} ${s.minimum.toString()} ${c.unit}`:`For lille: forventede ${u} havde ${l} ${s.minimum.toString()}`}case"invalid_format":{const l=s;return l.format==="starts_with"?`Ugyldig streng: skal starte med "${l.prefix}"`:l.format==="ends_with"?`Ugyldig streng: skal ende med "${l.suffix}"`:l.format==="includes"?`Ugyldig streng: skal indeholde "${l.includes}"`:l.format==="regex"?`Ugyldig streng: skal matche mønsteret ${l.pattern}`:`Ugyldig ${a[l.format]??s.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${s.divisor}`;case"unrecognized_keys":return`${s.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${sr(s.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${s.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${s.origin}`;default:return"Ugyldigt input"}}};function JNe(){return{localeError:ZNe()}}const XNe=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"Zahl";case"object":{if(Array.isArray(i))return"Array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return i=>{switch(i.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${i.expected}, erhalten ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ungültige Eingabe: erwartet ${vn(i.values[0])}`:`Ungültige Option: erwartet eine von ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Zu groß: erwartet, dass ${i.origin??"Wert"} ${a}${i.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${i.origin??"Wert"} ${a}${i.maximum.toString()} ist`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Zu klein: erwartet, dass ${i.origin} ${a}${i.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${a}${i.minimum.toString()} ist`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Ungültiger String: muss mit "${a.prefix}" beginnen`:a.format==="ends_with"?`Ungültiger String: muss mit "${a.suffix}" enden`:a.format==="includes"?`Ungültiger String: muss "${a.includes}" enthalten`:a.format==="regex"?`Ungültiger String: muss dem Muster ${a.pattern} entsprechen`:`Ungültig: ${n[a.format]??i.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${sr(i.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${i.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${i.origin}`;default:return"Ungültige Eingabe"}}};function eke(){return{localeError:XNe()}}const tke=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},rke=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(n){return e[n]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Invalid input: expected ${n.expected}, received ${tke(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${vn(n.values[0])}`:`Invalid option: expected one of ${sr(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${a.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${sr(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function vae(){return{localeError:rke()}}const nke=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},ike=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return n=>{switch(n.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${n.expected}, riceviĝis ${nke(n.input)}`;case"invalid_value":return n.values.length===1?`Nevalida enigo: atendiĝis ${vn(n.values[0])}`:`Nevalida opcio: atendiĝis unu el ${sr(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendiĝis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendiĝis ke ${n.origin} havu ${i}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendiĝis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} ŝlosilo${n.keys.length>1?"j":""}: ${sr(n.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function ake(){return{localeError:ike()}}const ske=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};function r(s){return e[s]??null}function n(s){return t[s]??s}const i=s=>{const l=typeof s;switch(l){case"number":return Number.isNaN(s)?"NaN":"number";case"object":return Array.isArray(s)?"array":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype?s.constructor.name:"object"}return l},a={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return s=>{switch(s.code){case"invalid_type":return`Entrada inválida: se esperaba ${n(s.expected)}, recibido ${n(i(s.input))}`;case"invalid_value":return s.values.length===1?`Entrada inválida: se esperaba ${vn(s.values[0])}`:`Opción inválida: se esperaba una de ${sr(s.values,"|")}`;case"too_big":{const l=s.inclusive?"<=":"<",c=r(s.origin),u=n(s.origin);return c?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${l}${s.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${l}${s.maximum.toString()}`}case"too_small":{const l=s.inclusive?">=":">",c=r(s.origin),u=n(s.origin);return c?`Demasiado pequeño: se esperaba que ${u} tuviera ${l}${s.minimum.toString()} ${c.unit}`:`Demasiado pequeño: se esperaba que ${u} fuera ${l}${s.minimum.toString()}`}case"invalid_format":{const l=s;return l.format==="starts_with"?`Cadena inválida: debe comenzar con "${l.prefix}"`:l.format==="ends_with"?`Cadena inválida: debe terminar en "${l.suffix}"`:l.format==="includes"?`Cadena inválida: debe incluir "${l.includes}"`:l.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${l.pattern}`:`Inválido ${a[l.format]??s.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${s.divisor}`;case"unrecognized_keys":return`Llave${s.keys.length>1?"s":""} desconocida${s.keys.length>1?"s":""}: ${sr(s.keys,", ")}`;case"invalid_key":return`Llave inválida en ${n(s.origin)}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${n(s.origin)}`;default:return"Entrada inválida"}}};function oke(){return{localeError:ske()}}const lke=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"عدد";case"object":{if(Array.isArray(i))return"آرایه";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"};return i=>{switch(i.code){case"invalid_type":return`ورودی نامعتبر: می‌بایست ${i.expected} می‌بود، ${r(i.input)} دریافت شد`;case"invalid_value":return i.values.length===1?`ورودی نامعتبر: می‌بایست ${vn(i.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${sr(i.values,"|")} می‌بود`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`خیلی بزرگ: ${i.origin??"مقدار"} باید ${a}${i.maximum.toString()} ${s.unit??"عنصر"} باشد`:`خیلی بزرگ: ${i.origin??"مقدار"} باید ${a}${i.maximum.toString()} باشد`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`خیلی کوچک: ${i.origin} باید ${a}${i.minimum.toString()} ${s.unit} باشد`:`خیلی کوچک: ${i.origin} باید ${a}${i.minimum.toString()} باشد`}case"invalid_format":{const a=i;return a.format==="starts_with"?`رشته نامعتبر: باید با "${a.prefix}" شروع شود`:a.format==="ends_with"?`رشته نامعتبر: باید با "${a.suffix}" تمام شود`:a.format==="includes"?`رشته نامعتبر: باید شامل "${a.includes}" باشد`:a.format==="regex"?`رشته نامعتبر: باید با الگوی ${a.pattern} مطابقت داشته باشد`:`${n[a.format]??i.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${i.divisor} باشد`;case"unrecognized_keys":return`کلید${i.keys.length>1?"های":""} ناشناس: ${sr(i.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${i.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${i.origin}`;default:return"ورودی نامعتبر"}}};function cke(){return{localeError:lke()}}const uke=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return i=>{switch(i.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${i.expected}, oli ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Virheellinen syöte: täytyy olla ${vn(i.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Liian suuri: ${s.subject} täytyy olla ${a}${i.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon täytyy olla ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Liian pieni: ${s.subject} täytyy olla ${a}${i.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon täytyy olla ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${a.prefix}"`:a.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${a.suffix}"`:a.format==="includes"?`Virheellinen syöte: täytyy sisältää "${a.includes}"`:a.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${a.pattern}`:`Virheellinen ${n[a.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${sr(i.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function dke(){return{localeError:uke()}}const fke=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"nombre";case"object":{if(Array.isArray(i))return"tableau";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return i=>{switch(i.code){case"invalid_type":return`Entrée invalide : ${i.expected} attendu, ${r(i.input)} reçu`;case"invalid_value":return i.values.length===1?`Entrée invalide : ${vn(i.values[0])} attendu`:`Option invalide : une valeur parmi ${sr(i.values,"|")} attendue`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Trop grand : ${i.origin??"valeur"} doit ${s.verb} ${a}${i.maximum.toString()} ${s.unit??"élément(s)"}`:`Trop grand : ${i.origin??"valeur"} doit être ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Trop petit : ${i.origin} doit ${s.verb} ${a}${i.minimum.toString()} ${s.unit}`:`Trop petit : ${i.origin} doit être ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Chaîne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Chaîne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Chaîne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${a.pattern}`:`${n[a.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${i.divisor}`;case"unrecognized_keys":return`Clé${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${sr(i.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${i.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entrée invalide"}}};function hke(){return{localeError:fke()}}const mke=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return i=>{switch(i.code){case"invalid_type":return`Entrée invalide : attendu ${i.expected}, reçu ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Entrée invalide : attendu ${vn(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"≤":"<",s=t(i.origin);return s?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${a}${i.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?"≥":">",s=t(i.origin);return s?`Trop petit : attendu que ${i.origin} ait ${a}${i.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${i.origin} soit ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Chaîne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Chaîne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Chaîne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Chaîne invalide : doit correspondre au motif ${a.pattern}`:`${n[a.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${i.divisor}`;case"unrecognized_keys":return`Clé${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${sr(i.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${i.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entrée invalide"}}};function pke(){return{localeError:mke()}}const gke=()=>{const e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},r=u=>u?e[u]:void 0,n=u=>{const d=r(u);return d?d.label:u??e.unknown.label},i=u=>`ה${n(u)}`,a=u=>(r(u)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות",s=u=>u?t[u]??null:null,l=u=>{const d=typeof u;switch(d){case"number":return Number.isNaN(u)?"NaN":"number";case"object":return Array.isArray(u)?"array":u===null?"null":Object.getPrototypeOf(u)!==Object.prototype&&u.constructor?u.constructor.name:"object";default:return d}},c={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}};return u=>{switch(u.code){case"invalid_type":{const d=u.expected,f=n(d),m=l(u.input),g=e[m]?.label??m;return`קלט לא תקין: צריך להיות ${f}, התקבל ${g}`}case"invalid_value":{if(u.values.length===1)return`ערך לא תקין: הערך חייב להיות ${vn(u.values[0])}`;const d=u.values.map(g=>vn(g));if(u.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${d[0]} או ${d[1]}`;const f=d[d.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${d.slice(0,-1).join(", ")} או ${f}`}case"too_big":{const d=s(u.origin),f=i(u.origin??"value");if(u.origin==="string")return`${d?.longLabel??"ארוך"} מדי: ${f} צריכה להכיל ${u.maximum.toString()} ${d?.unit??""} ${u.inclusive?"או פחות":"לכל היותר"}`.trim();if(u.origin==="number"){const A=u.inclusive?`קטן או שווה ל-${u.maximum}`:`קטן מ-${u.maximum}`;return`גדול מדי: ${f} צריך להיות ${A}`}if(u.origin==="array"||u.origin==="set"){const A=u.origin==="set"?"צריכה":"צריך",v=u.inclusive?`${u.maximum} ${d?.unit??""} או פחות`:`פחות מ-${u.maximum} ${d?.unit??""}`;return`גדול מדי: ${f} ${A} להכיל ${v}`.trim()}const m=u.inclusive?"<=":"<",g=a(u.origin??"value");return d?.unit?`${d.longLabel} מדי: ${f} ${g} ${m}${u.maximum.toString()} ${d.unit}`:`${d?.longLabel??"גדול"} מדי: ${f} ${g} ${m}${u.maximum.toString()}`}case"too_small":{const d=s(u.origin),f=i(u.origin??"value");if(u.origin==="string")return`${d?.shortLabel??"קצר"} מדי: ${f} צריכה להכיל ${u.minimum.toString()} ${d?.unit??""} ${u.inclusive?"או יותר":"לפחות"}`.trim();if(u.origin==="number"){const A=u.inclusive?`גדול או שווה ל-${u.minimum}`:`גדול מ-${u.minimum}`;return`קטן מדי: ${f} צריך להיות ${A}`}if(u.origin==="array"||u.origin==="set"){const A=u.origin==="set"?"צריכה":"צריך";if(u.minimum===1&&u.inclusive){const b=(u.origin==="set","לפחות פריט אחד");return`קטן מדי: ${f} ${A} להכיל ${b}`}const v=u.inclusive?`${u.minimum} ${d?.unit??""} או יותר`:`יותר מ-${u.minimum} ${d?.unit??""}`;return`קטן מדי: ${f} ${A} להכיל ${v}`.trim()}const m=u.inclusive?">=":">",g=a(u.origin??"value");return d?.unit?`${d.shortLabel} מדי: ${f} ${g} ${m}${u.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"קטן"} מדי: ${f} ${g} ${m}${u.minimum.toString()}`}case"invalid_format":{const d=u;if(d.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${d.prefix}"`;if(d.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${d.suffix}"`;if(d.format==="includes")return`המחרוזת חייבת לכלול "${d.includes}"`;if(d.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${d.pattern}`;const f=c[d.format],m=f?.label??d.format,A=(f?.gender??"m")==="f"?"תקינה":"תקין";return`${m} לא ${A}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${u.divisor}`;case"unrecognized_keys":return`מפתח${u.keys.length>1?"ות":""} לא מזוה${u.keys.length>1?"ים":"ה"}: ${sr(u.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${i(u.origin??"array")}`;default:return"קלט לא תקין"}}};function Ake(){return{localeError:gke()}}const vke=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"szám";case"object":{if(Array.isArray(i))return"tömb";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return i=>{switch(i.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${i.expected}, a kapott érték ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Érvénytelen bemenet: a várt érték ${vn(i.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Túl nagy: ${i.origin??"érték"} mérete túl nagy ${a}${i.maximum.toString()} ${s.unit??"elem"}`:`Túl nagy: a bemeneti érték ${i.origin??"érték"} túl nagy: ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Túl kicsi: a bemeneti érték ${i.origin} mérete túl kicsi ${a}${i.minimum.toString()} ${s.unit}`:`Túl kicsi: a bemeneti érték ${i.origin} túl kicsi ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Érvénytelen string: "${a.prefix}" értékkel kell kezdődnie`:a.format==="ends_with"?`Érvénytelen string: "${a.suffix}" értékkel kell végződnie`:a.format==="includes"?`Érvénytelen string: "${a.includes}" értéket kell tartalmaznia`:a.format==="regex"?`Érvénytelen string: ${a.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[a.format]??i.format}`}case"not_multiple_of":return`Érvénytelen szám: ${i.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${sr(i.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${i.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${i.origin}`;default:return"Érvénytelen bemenet"}}};function xke(){return{localeError:vke()}}const yke=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input tidak valid: diharapkan ${i.expected}, diterima ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${vn(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${a}${i.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Terlalu kecil: diharapkan ${i.origin} memiliki ${a}${i.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`String tidak valid: harus dimulai dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak valid: harus berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak valid: harus menyertakan "${a.includes}"`:a.format==="regex"?`String tidak valid: harus sesuai pola ${a.pattern}`:`${n[a.format]??i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${sr(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}};function bke(){return{localeError:yke()}}const wke=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"númer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Eke=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(n){return e[n]??null}const r={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"};return n=>{switch(n.code){case"invalid_type":return`Rangt gildi: Þú slóst inn ${wke(n.input)} þar sem á að vera ${n.expected}`;case"invalid_value":return n.values.length===1?`Rangt gildi: gert ráð fyrir ${vn(n.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${sr(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of stórt: gert er ráð fyrir að ${n.origin??"gildi"} hafi ${i}${n.maximum.toString()} ${a.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${n.origin??"gildi"} sé ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Of lítið: gert er ráð fyrir að ${n.origin} hafi ${i}${n.minimum.toString()} ${a.unit}`:`Of lítið: gert er ráð fyrir að ${n.origin} sé ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ógildur strengur: verður að byrja á "${i.prefix}"`:i.format==="ends_with"?`Ógildur strengur: verður að enda á "${i.suffix}"`:i.format==="includes"?`Ógildur strengur: verður að innihalda "${i.includes}"`:i.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${i.pattern}`:`Rangt ${r[i.format]??n.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`Óþekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${sr(n.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${n.origin}`;default:return"Rangt gildi"}}};function Cke(){return{localeError:Eke()}}const Ike=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"numero";case"object":{if(Array.isArray(i))return"vettore";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input non valido: atteso ${i.expected}, ricevuto ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Input non valido: atteso ${vn(i.values[0])}`:`Opzione non valida: atteso uno tra ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Troppo grande: ${i.origin??"valore"} deve avere ${a}${i.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Troppo piccolo: ${i.origin} deve avere ${a}${i.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${i.origin} deve essere ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Stringa non valida: deve iniziare con "${a.prefix}"`:a.format==="ends_with"?`Stringa non valida: deve terminare con "${a.suffix}"`:a.format==="includes"?`Stringa non valida: deve includere "${a.includes}"`:a.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${a.pattern}`:`Invalid ${n[a.format]??i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${sr(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}};function Ske(){return{localeError:Ike()}}const Bke=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"数値";case"object":{if(Array.isArray(i))return"配列";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"};return i=>{switch(i.code){case"invalid_type":return`無効な入力: ${i.expected}が期待されましたが、${r(i.input)}が入力されました`;case"invalid_value":return i.values.length===1?`無効な入力: ${vn(i.values[0])}が期待されました`:`無効な選択: ${sr(i.values,"、")}のいずれかである必要があります`;case"too_big":{const a=i.inclusive?"以下である":"より小さい",s=t(i.origin);return s?`大きすぎる値: ${i.origin??"値"}は${i.maximum.toString()}${s.unit??"要素"}${a}必要があります`:`大きすぎる値: ${i.origin??"値"}は${i.maximum.toString()}${a}必要があります`}case"too_small":{const a=i.inclusive?"以上である":"より大きい",s=t(i.origin);return s?`小さすぎる値: ${i.origin}は${i.minimum.toString()}${s.unit}${a}必要があります`:`小さすぎる値: ${i.origin}は${i.minimum.toString()}${a}必要があります`}case"invalid_format":{const a=i;return a.format==="starts_with"?`無効な文字列: "${a.prefix}"で始まる必要があります`:a.format==="ends_with"?`無効な文字列: "${a.suffix}"で終わる必要があります`:a.format==="includes"?`無効な文字列: "${a.includes}"を含む必要があります`:a.format==="regex"?`無効な文字列: パターン${a.pattern}に一致する必要があります`:`無効な${n[a.format]??i.format}`}case"not_multiple_of":return`無効な数値: ${i.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${i.keys.length>1?"群":""}: ${sr(i.keys,"、")}`;case"invalid_key":return`${i.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${i.origin}内の無効な値`;default:return"無効な入力"}}};function Nke(){return{localeError:Bke()}}const kke=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"რიცხვი";case"object":{if(Array.isArray(e))return"მასივი";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return{string:"სტრინგი",boolean:"ბულეანი",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"ფუნქცია"}[t]??t},_ke=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(n){return e[n]??null}const r={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"};return n=>{switch(n.code){case"invalid_type":return`არასწორი შეყვანა: მოსალოდნელი ${n.expected}, მიღებული ${kke(n.input)}`;case"invalid_value":return n.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${vn(n.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${sr(n.values,"|")}-დან`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`ზედმეტად დიდი: მოსალოდნელი ${n.origin??"მნიშვნელობა"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${n.origin??"მნიშვნელობა"} იყოს ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`ზედმეტად პატარა: მოსალოდნელი ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${n.origin} იყოს ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${i.prefix}"-ით`:i.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${i.suffix}"-ით`:i.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${i.includes}"-ს`:i.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${i.pattern}`:`არასწორი ${r[i.format]??n.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${n.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${n.keys.length>1?"ები":"ი"}: ${sr(n.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${n.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${n.origin}-ში`;default:return"არასწორი შეყვანა"}}};function jke(){return{localeError:_ke()}}const Dke=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(i))return"អារេ (Array)";if(i===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"};return i=>{switch(i.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${i.expected} ប៉ុន្តែទទួលបាន ${r(i.input)}`;case"invalid_value":return i.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${vn(i.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`ធំពេក៖ ត្រូវការ ${i.origin??"តម្លៃ"} ${a} ${i.maximum.toString()} ${s.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${i.origin??"តម្លៃ"} ${a} ${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`តូចពេក៖ ត្រូវការ ${i.origin} ${a} ${i.minimum.toString()} ${s.unit}`:`តូចពេក៖ ត្រូវការ ${i.origin} ${a} ${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${a.prefix}"`:a.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${a.suffix}"`:a.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${a.includes}"`:a.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${a.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[a.format]??i.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${i.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${sr(i.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${i.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${i.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function xae(){return{localeError:Dke()}}function Tke(){return xae()}const Pke=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"};return i=>{switch(i.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${i.expected}, 받은 타입은 ${r(i.input)}입니다`;case"invalid_value":return i.values.length===1?`잘못된 입력: 값은 ${vn(i.values[0])} 이어야 합니다`:`잘못된 옵션: ${sr(i.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const a=i.inclusive?"이하":"미만",s=a==="미만"?"이어야 합니다":"여야 합니다",l=t(i.origin),c=l?.unit??"요소";return l?`${i.origin??"값"}이 너무 큽니다: ${i.maximum.toString()}${c} ${a}${s}`:`${i.origin??"값"}이 너무 큽니다: ${i.maximum.toString()} ${a}${s}`}case"too_small":{const a=i.inclusive?"이상":"초과",s=a==="이상"?"이어야 합니다":"여야 합니다",l=t(i.origin),c=l?.unit??"요소";return l?`${i.origin??"값"}이 너무 작습니다: ${i.minimum.toString()}${c} ${a}${s}`:`${i.origin??"값"}이 너무 작습니다: ${i.minimum.toString()} ${a}${s}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`잘못된 문자열: "${a.prefix}"(으)로 시작해야 합니다`:a.format==="ends_with"?`잘못된 문자열: "${a.suffix}"(으)로 끝나야 합니다`:a.format==="includes"?`잘못된 문자열: "${a.includes}"을(를) 포함해야 합니다`:a.format==="regex"?`잘못된 문자열: 정규식 ${a.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[a.format]??i.format}`}case"not_multiple_of":return`잘못된 숫자: ${i.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${sr(i.keys,", ")}`;case"invalid_key":return`잘못된 키: ${i.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${i.origin}`;default:return"잘못된 입력"}}};function Oke(){return{localeError:Pke()}}const Rke=e=>h2(typeof e,e),h2=(e,t=void 0)=>{switch(e){case"number":return Number.isNaN(t)?"NaN":"skaičius";case"bigint":return"sveikasis skaičius";case"string":return"eilutė";case"boolean":return"loginė reikšmė";case"undefined":case"void":return"neapibrėžta reikšmė";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return t===void 0?"nežinomas objektas":t===null?"nulinė reikšmė":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case"null":return"nulinė reikšmė"}return e},Yy=e=>e.charAt(0).toUpperCase()+e.slice(1);function KL(e){const t=Math.abs(e),r=t%10,n=t%100;return n>=11&&n<=19||r===0?"many":r===1?"one":"few"}const Fke=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(n,i,a,s){const l=e[n]??null;return l===null?l:{unit:l.unit[i],verb:l.verb[s][a?"inclusive":"notInclusive"]}}const r={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"};return n=>{switch(n.code){case"invalid_type":return`Gautas tipas ${Rke(n.input)}, o tikėtasi - ${h2(n.expected)}`;case"invalid_value":return n.values.length===1?`Privalo būti ${vn(n.values[0])}`:`Privalo būti vienas iš ${sr(n.values,"|")} pasirinkimų`;case"too_big":{const i=h2(n.origin),a=t(n.origin,KL(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${Yy(i??n.origin??"reikšmė")} ${a.verb} ${n.maximum.toString()} ${a.unit??"elementų"}`;const s=n.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Yy(i??n.origin??"reikšmė")} turi būti ${s} ${n.maximum.toString()} ${a?.unit}`}case"too_small":{const i=h2(n.origin),a=t(n.origin,KL(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${Yy(i??n.origin??"reikšmė")} ${a.verb} ${n.minimum.toString()} ${a.unit??"elementų"}`;const s=n.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Yy(i??n.origin??"reikšmė")} turi būti ${s} ${n.minimum.toString()} ${a?.unit}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Eilutė privalo prasidėti "${i.prefix}"`:i.format==="ends_with"?`Eilutė privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilutė privalo įtraukti "${i.includes}"`:i.format==="regex"?`Eilutė privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.format]??n.format}`}case"not_multiple_of":return`Skaičius privalo būti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${sr(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const i=h2(n.origin);return`${Yy(i??n.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function Mke(){return{localeError:Fke()}}const Qke=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"број";case"object":{if(Array.isArray(i))return"низа";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"};return i=>{switch(i.code){case"invalid_type":return`Грешен внес: се очекува ${i.expected}, примено ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${vn(i.values[0])}`:`Грешана опција: се очекува една ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Премногу голем: се очекува ${i.origin??"вредноста"} да има ${a}${i.maximum.toString()} ${s.unit??"елементи"}`:`Премногу голем: се очекува ${i.origin??"вредноста"} да биде ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Премногу мал: се очекува ${i.origin} да има ${a}${i.minimum.toString()} ${s.unit}`:`Премногу мал: се очекува ${i.origin} да биде ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Неважечка низа: мора да започнува со "${a.prefix}"`:a.format==="ends_with"?`Неважечка низа: мора да завршува со "${a.suffix}"`:a.format==="includes"?`Неважечка низа: мора да вклучува "${a.includes}"`:a.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${a.pattern}`:`Invalid ${n[a.format]??i.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${sr(i.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${i.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${i.origin}`;default:return"Грешен внес"}}};function Lke(){return{localeError:Qke()}}const Uke=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"nombor";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input tidak sah: dijangka ${i.expected}, diterima ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${vn(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Terlalu besar: dijangka ${i.origin??"nilai"} ${s.verb} ${a}${i.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Terlalu kecil: dijangka ${i.origin} ${s.verb} ${a}${i.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`String tidak sah: mesti bermula dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak sah: mesti mengandungi "${a.includes}"`:a.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${a.pattern}`:`${n[a.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${sr(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}};function $ke(){return{localeError:Uke()}}const zke=()=>{const e={string:{unit:"tekens",verb:"te hebben"},file:{unit:"bytes",verb:"te hebben"},array:{unit:"elementen",verb:"te hebben"},set:{unit:"elementen",verb:"te hebben"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"getal";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return i=>{switch(i.code){case"invalid_type":return`Ongeldige invoer: verwacht ${i.expected}, ontving ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${vn(i.values[0])}`:`Ongeldige optie: verwacht één van ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Te groot: verwacht dat ${i.origin??"waarde"} ${s.verb} ${a}${i.maximum.toString()} ${s.unit??"elementen"}`:`Te groot: verwacht dat ${i.origin??"waarde"} ${a}${i.maximum.toString()} is`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Te klein: verwacht dat ${i.origin} ${s.verb} ${a}${i.minimum.toString()} ${s.unit}`:`Te klein: verwacht dat ${i.origin} ${a}${i.minimum.toString()} is`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Ongeldige tekst: moet met "${a.prefix}" beginnen`:a.format==="ends_with"?`Ongeldige tekst: moet op "${a.suffix}" eindigen`:a.format==="includes"?`Ongeldige tekst: moet "${a.includes}" bevatten`:a.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${a.pattern}`:`Ongeldig: ${n[a.format]??i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${sr(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}};function Hke(){return{localeError:zke()}}const Wke=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"tall";case"object":{if(Array.isArray(i))return"liste";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Ugyldig input: forventet ${i.expected}, fikk ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${vn(i.values[0])}`:`Ugyldig valg: forventet en av ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`For stor(t): forventet ${i.origin??"value"} til å ha ${a}${i.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til å ha ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`For lite(n): forventet ${i.origin} til å ha ${a}${i.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${i.origin} til å ha ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Ugyldig streng: må starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: må ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: må inneholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: må matche mønsteret ${a.pattern}`:`Ugyldig ${n[a.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${sr(i.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}};function Gke(){return{localeError:Wke()}}const qke=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"numara";case"object":{if(Array.isArray(i))return"saf";if(i===null)return"gayb";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return i=>{switch(i.code){case"invalid_type":return`Fâsit giren: umulan ${i.expected}, alınan ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Fâsit giren: umulan ${vn(i.values[0])}`:`Fâsit tercih: mûteberler ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Fazla büyük: ${i.origin??"value"}, ${a}${i.maximum.toString()} ${s.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${i.origin??"value"}, ${a}${i.maximum.toString()} olmalıydı.`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Fazla küçük: ${i.origin}, ${a}${i.minimum.toString()} ${s.unit} sahip olmalıydı.`:`Fazla küçük: ${i.origin}, ${a}${i.minimum.toString()} olmalıydı.`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Fâsit metin: "${a.prefix}" ile başlamalı.`:a.format==="ends_with"?`Fâsit metin: "${a.suffix}" ile bitmeli.`:a.format==="includes"?`Fâsit metin: "${a.includes}" ihtivâ etmeli.`:a.format==="regex"?`Fâsit metin: ${a.pattern} nakşına uymalı.`:`Fâsit ${n[a.format]??i.format}`}case"not_multiple_of":return`Fâsit sayı: ${i.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${i.keys.length>1?"s":""}: ${sr(i.keys,", ")}`;case"invalid_key":return`${i.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${i.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function Kke(){return{localeError:qke()}}const Vke=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"عدد";case"object":{if(Array.isArray(i))return"ارې";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"};return i=>{switch(i.code){case"invalid_type":return`ناسم ورودي: باید ${i.expected} وای, مګر ${r(i.input)} ترلاسه شو`;case"invalid_value":return i.values.length===1?`ناسم ورودي: باید ${vn(i.values[0])} وای`:`ناسم انتخاب: باید یو له ${sr(i.values,"|")} څخه وای`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`ډیر لوی: ${i.origin??"ارزښت"} باید ${a}${i.maximum.toString()} ${s.unit??"عنصرونه"} ولري`:`ډیر لوی: ${i.origin??"ارزښت"} باید ${a}${i.maximum.toString()} وي`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`ډیر کوچنی: ${i.origin} باید ${a}${i.minimum.toString()} ${s.unit} ولري`:`ډیر کوچنی: ${i.origin} باید ${a}${i.minimum.toString()} وي`}case"invalid_format":{const a=i;return a.format==="starts_with"?`ناسم متن: باید د "${a.prefix}" سره پیل شي`:a.format==="ends_with"?`ناسم متن: باید د "${a.suffix}" سره پای ته ورسيږي`:a.format==="includes"?`ناسم متن: باید "${a.includes}" ولري`:a.format==="regex"?`ناسم متن: باید د ${a.pattern} سره مطابقت ولري`:`${n[a.format]??i.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${i.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${i.keys.length>1?"کلیډونه":"کلیډ"}: ${sr(i.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${i.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${i.origin} کې`;default:return"ناسمه ورودي"}}};function Yke(){return{localeError:Vke()}}const Zke=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"liczba";case"object":{if(Array.isArray(i))return"tablica";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"};return i=>{switch(i.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${i.expected}, otrzymano ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${vn(i.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Za duża wartość: oczekiwano, że ${i.origin??"wartość"} będzie mieć ${a}${i.maximum.toString()} ${s.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${i.origin??"wartość"} będzie wynosić ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Za mała wartość: oczekiwano, że ${i.origin??"wartość"} będzie mieć ${a}${i.minimum.toString()} ${s.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${i.origin??"wartość"} będzie wynosić ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${a.prefix}"`:a.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${a.suffix}"`:a.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${a.includes}"`:a.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${a.pattern}`:`Nieprawidłow(y/a/e) ${n[a.format]??i.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${sr(i.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${i.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${i.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function Jke(){return{localeError:Zke()}}const Xke=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"número";case"object":{if(Array.isArray(i))return"array";if(i===null)return"nulo";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Tipo inválido: esperado ${i.expected}, recebido ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Entrada inválida: esperado ${vn(i.values[0])}`:`Opção inválida: esperada uma das ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${a}${i.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Muito pequeno: esperado que ${i.origin} tivesse ${a}${i.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Texto inválido: deve começar com "${a.prefix}"`:a.format==="ends_with"?`Texto inválido: deve terminar com "${a.suffix}"`:a.format==="includes"?`Texto inválido: deve incluir "${a.includes}"`:a.format==="regex"?`Texto inválido: deve corresponder ao padrão ${a.pattern}`:`${n[a.format]??i.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${sr(i.keys,", ")}`;case"invalid_key":return`Chave inválida em ${i.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${i.origin}`;default:return"Campo inválido"}}};function e_e(){return{localeError:Xke()}}function VL(e,t,r,n){const i=Math.abs(e),a=i%10,s=i%100;return s>=11&&s<=19?n:a===1?t:a>=2&&a<=4?r:n}const t_e=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"число";case"object":{if(Array.isArray(i))return"массив";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"};return i=>{switch(i.code){case"invalid_type":return`Неверный ввод: ожидалось ${i.expected}, получено ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Неверный ввод: ожидалось ${vn(i.values[0])}`:`Неверный вариант: ожидалось одно из ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);if(s){const l=Number(i.maximum),c=VL(l,s.unit.one,s.unit.few,s.unit.many);return`Слишком большое значение: ожидалось, что ${i.origin??"значение"} будет иметь ${a}${i.maximum.toString()} ${c}`}return`Слишком большое значение: ожидалось, что ${i.origin??"значение"} будет ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);if(s){const l=Number(i.minimum),c=VL(l,s.unit.one,s.unit.few,s.unit.many);return`Слишком маленькое значение: ожидалось, что ${i.origin} будет иметь ${a}${i.minimum.toString()} ${c}`}return`Слишком маленькое значение: ожидалось, что ${i.origin} будет ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Неверная строка: должна начинаться с "${a.prefix}"`:a.format==="ends_with"?`Неверная строка: должна заканчиваться на "${a.suffix}"`:a.format==="includes"?`Неверная строка: должна содержать "${a.includes}"`:a.format==="regex"?`Неверная строка: должна соответствовать шаблону ${a.pattern}`:`Неверный ${n[a.format]??i.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${i.divisor}`;case"unrecognized_keys":return`Нераспознанн${i.keys.length>1?"ые":"ый"} ключ${i.keys.length>1?"и":""}: ${sr(i.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${i.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${i.origin}`;default:return"Неверные входные данные"}}};function r_e(){return{localeError:t_e()}}const n_e=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"število";case"object":{if(Array.isArray(i))return"tabela";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"};return i=>{switch(i.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${i.expected}, prejeto ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Neveljaven vnos: pričakovano ${vn(i.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Preveliko: pričakovano, da bo ${i.origin??"vrednost"} imelo ${a}${i.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${i.origin??"vrednost"} ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Premajhno: pričakovano, da bo ${i.origin} imelo ${a}${i.minimum.toString()} ${s.unit}`:`Premajhno: pričakovano, da bo ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Neveljaven niz: mora se začeti z "${a.prefix}"`:a.format==="ends_with"?`Neveljaven niz: mora se končati z "${a.suffix}"`:a.format==="includes"?`Neveljaven niz: mora vsebovati "${a.includes}"`:a.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${a.pattern}`:`Neveljaven ${n[a.format]??i.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i ključi":" ključ"}: ${sr(i.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}};function i_e(){return{localeError:n_e()}}const a_e=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"antal";case"object":{if(Array.isArray(i))return"lista";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return i=>{switch(i.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${i.expected}, fick ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ogiltig inmatning: förväntat ${vn(i.values[0])}`:`Ogiltigt val: förväntade en av ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`För stor(t): förväntade ${i.origin??"värdet"} att ha ${a}${i.maximum.toString()} ${s.unit??"element"}`:`För stor(t): förväntat ${i.origin??"värdet"} att ha ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`För lite(t): förväntade ${i.origin??"värdet"} att ha ${a}${i.minimum.toString()} ${s.unit}`:`För lite(t): förväntade ${i.origin??"värdet"} att ha ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Ogiltig sträng: måste börja med "${a.prefix}"`:a.format==="ends_with"?`Ogiltig sträng: måste sluta med "${a.suffix}"`:a.format==="includes"?`Ogiltig sträng: måste innehålla "${a.includes}"`:a.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${a.pattern}"`:`Ogiltig(t) ${n[a.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${sr(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${i.origin??"värdet"}`;default:return"Ogiltig input"}}};function s_e(){return{localeError:a_e()}}const o_e=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(i))return"அணி";if(i===null)return"வெறுமை";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${i.expected}, பெறப்பட்டது ${r(i.input)}`;case"invalid_value":return i.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${vn(i.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${sr(i.values,"|")} இல் ஒன்று`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${i.origin??"மதிப்பு"} ${a}${i.maximum.toString()} ${s.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${i.origin??"மதிப்பு"} ${a}${i.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${i.origin} ${a}${i.minimum.toString()} ${s.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${i.origin} ${a}${i.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const a=i;return a.format==="starts_with"?`தவறான சரம்: "${a.prefix}" இல் தொடங்க வேண்டும்`:a.format==="ends_with"?`தவறான சரம்: "${a.suffix}" இல் முடிவடைய வேண்டும்`:a.format==="includes"?`தவறான சரம்: "${a.includes}" ஐ உள்ளடக்க வேண்டும்`:a.format==="regex"?`தவறான சரம்: ${a.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[a.format]??i.format}`}case"not_multiple_of":return`தவறான எண்: ${i.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${i.keys.length>1?"கள்":""}: ${sr(i.keys,", ")}`;case"invalid_key":return`${i.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${i.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function l_e(){return{localeError:o_e()}}const c_e=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(i))return"อาร์เรย์ (Array)";if(i===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"};return i=>{switch(i.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${i.expected} แต่ได้รับ ${r(i.input)}`;case"invalid_value":return i.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${vn(i.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"ไม่เกิน":"น้อยกว่า",s=t(i.origin);return s?`เกินกำหนด: ${i.origin??"ค่า"} ควรมี${a} ${i.maximum.toString()} ${s.unit??"รายการ"}`:`เกินกำหนด: ${i.origin??"ค่า"} ควรมี${a} ${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?"อย่างน้อย":"มากกว่า",s=t(i.origin);return s?`น้อยกว่ากำหนด: ${i.origin} ควรมี${a} ${i.minimum.toString()} ${s.unit}`:`น้อยกว่ากำหนด: ${i.origin} ควรมี${a} ${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${a.prefix}"`:a.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${a.suffix}"`:a.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${a.includes}" อยู่ในข้อความ`:a.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${a.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[a.format]??i.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${i.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${sr(i.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${i.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${i.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function u_e(){return{localeError:c_e()}}const d_e=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},f_e=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(n){return e[n]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"};return n=>{switch(n.code){case"invalid_type":return`Geçersiz değer: beklenen ${n.expected}, alınan ${d_e(n.input)}`;case"invalid_value":return n.values.length===1?`Geçersiz değer: beklenen ${vn(n.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${sr(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Çok büyük: beklenen ${n.origin??"değer"} ${i}${n.maximum.toString()} ${a.unit??"öğe"}`:`Çok büyük: beklenen ${n.origin??"değer"} ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Çok küçük: beklenen ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`Çok küçük: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Geçersiz metin: "${i.prefix}" ile başlamalı`:i.format==="ends_with"?`Geçersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Geçersiz metin: "${i.includes}" içermeli`:i.format==="regex"?`Geçersiz metin: ${i.pattern} desenine uymalı`:`Geçersiz ${r[i.format]??n.format}`}case"not_multiple_of":return`Geçersiz sayı: ${n.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${n.keys.length>1?"lar":""}: ${sr(n.keys,", ")}`;case"invalid_key":return`${n.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${n.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function h_e(){return{localeError:f_e()}}const m_e=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"число";case"object":{if(Array.isArray(i))return"масив";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"};return i=>{switch(i.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${i.expected}, отримано ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Неправильні вхідні дані: очікується ${vn(i.values[0])}`:`Неправильна опція: очікується одне з ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Занадто велике: очікується, що ${i.origin??"значення"} ${s.verb} ${a}${i.maximum.toString()} ${s.unit??"елементів"}`:`Занадто велике: очікується, що ${i.origin??"значення"} буде ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Занадто мале: очікується, що ${i.origin} ${s.verb} ${a}${i.minimum.toString()} ${s.unit}`:`Занадто мале: очікується, що ${i.origin} буде ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Неправильний рядок: повинен починатися з "${a.prefix}"`:a.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${a.suffix}"`:a.format==="includes"?`Неправильний рядок: повинен містити "${a.includes}"`:a.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${a.pattern}`:`Неправильний ${n[a.format]??i.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${i.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${i.keys.length>1?"і":""}: ${sr(i.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${i.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${i.origin}`;default:return"Неправильні вхідні дані"}}};function yae(){return{localeError:m_e()}}function p_e(){return yae()}const g_e=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"نمبر";case"object":{if(Array.isArray(i))return"آرے";if(i===null)return"نل";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"};return i=>{switch(i.code){case"invalid_type":return`غلط ان پٹ: ${i.expected} متوقع تھا، ${r(i.input)} موصول ہوا`;case"invalid_value":return i.values.length===1?`غلط ان پٹ: ${vn(i.values[0])} متوقع تھا`:`غلط آپشن: ${sr(i.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`بہت بڑا: ${i.origin??"ویلیو"} کے ${a}${i.maximum.toString()} ${s.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${i.origin??"ویلیو"} کا ${a}${i.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`بہت چھوٹا: ${i.origin} کے ${a}${i.minimum.toString()} ${s.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${i.origin} کا ${a}${i.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const a=i;return a.format==="starts_with"?`غلط سٹرنگ: "${a.prefix}" سے شروع ہونا چاہیے`:a.format==="ends_with"?`غلط سٹرنگ: "${a.suffix}" پر ختم ہونا چاہیے`:a.format==="includes"?`غلط سٹرنگ: "${a.includes}" شامل ہونا چاہیے`:a.format==="regex"?`غلط سٹرنگ: پیٹرن ${a.pattern} سے میچ ہونا چاہیے`:`غلط ${n[a.format]??i.format}`}case"not_multiple_of":return`غلط نمبر: ${i.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${i.keys.length>1?"ز":""}: ${sr(i.keys,"، ")}`;case"invalid_key":return`${i.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${i.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function A_e(){return{localeError:g_e()}}const v_e=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"số";case"object":{if(Array.isArray(i))return"mảng";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"};return i=>{switch(i.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${i.expected}, nhận được ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Đầu vào không hợp lệ: mong đợi ${vn(i.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Quá lớn: mong đợi ${i.origin??"giá trị"} ${s.verb} ${a}${i.maximum.toString()} ${s.unit??"phần tử"}`:`Quá lớn: mong đợi ${i.origin??"giá trị"} ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Quá nhỏ: mong đợi ${i.origin} ${s.verb} ${a}${i.minimum.toString()} ${s.unit}`:`Quá nhỏ: mong đợi ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${a.prefix}"`:a.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${a.suffix}"`:a.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${a.includes}"`:a.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${a.pattern}`:`${n[a.format]??i.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${i.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${sr(i.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${i.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${i.origin}`;default:return"Đầu vào không hợp lệ"}}};function x_e(){return{localeError:v_e()}}const y_e=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(i))return"数组";if(i===null)return"空值(null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"};return i=>{switch(i.code){case"invalid_type":return`无效输入:期望 ${i.expected},实际接收 ${r(i.input)}`;case"invalid_value":return i.values.length===1?`无效输入:期望 ${vn(i.values[0])}`:`无效选项:期望以下之一 ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`数值过大:期望 ${i.origin??"值"} ${a}${i.maximum.toString()} ${s.unit??"个元素"}`:`数值过大:期望 ${i.origin??"值"} ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`数值过小:期望 ${i.origin} ${a}${i.minimum.toString()} ${s.unit}`:`数值过小:期望 ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`无效字符串:必须以 "${a.prefix}" 开头`:a.format==="ends_with"?`无效字符串:必须以 "${a.suffix}" 结尾`:a.format==="includes"?`无效字符串:必须包含 "${a.includes}"`:a.format==="regex"?`无效字符串:必须满足正则表达式 ${a.pattern}`:`无效${n[a.format]??i.format}`}case"not_multiple_of":return`无效数字:必须是 ${i.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${sr(i.keys,", ")}`;case"invalid_key":return`${i.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${i.origin} 中包含无效值(value)`;default:return"无效输入"}}};function b_e(){return{localeError:y_e()}}const w_e=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"};return i=>{switch(i.code){case"invalid_type":return`無效的輸入值:預期為 ${i.expected},但收到 ${r(i.input)}`;case"invalid_value":return i.values.length===1?`無效的輸入值:預期為 ${vn(i.values[0])}`:`無效的選項:預期為以下其中之一 ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`數值過大:預期 ${i.origin??"值"} 應為 ${a}${i.maximum.toString()} ${s.unit??"個元素"}`:`數值過大:預期 ${i.origin??"值"} 應為 ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`數值過小:預期 ${i.origin} 應為 ${a}${i.minimum.toString()} ${s.unit}`:`數值過小:預期 ${i.origin} 應為 ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`無效的字串:必須以 "${a.prefix}" 開頭`:a.format==="ends_with"?`無效的字串:必須以 "${a.suffix}" 結尾`:a.format==="includes"?`無效的字串:必須包含 "${a.includes}"`:a.format==="regex"?`無效的字串:必須符合格式 ${a.pattern}`:`無效的 ${n[a.format]??i.format}`}case"not_multiple_of":return`無效的數字:必須為 ${i.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${i.keys.length>1?"們":""}:${sr(i.keys,"、")}`;case"invalid_key":return`${i.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${i.origin} 中有無效的值`;default:return"無效的輸入值"}}};function E_e(){return{localeError:w_e()}}const C_e=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(i){return e[i]??null}const r=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"nọ́mbà";case"object":{if(Array.isArray(i))return"akopọ";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"};return i=>{switch(i.code){case"invalid_type":return`Ìbáwọlé aṣìṣe: a ní láti fi ${i.expected}, àmọ̀ a rí ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${vn(i.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${sr(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Tó pọ̀ jù: a ní láti jẹ́ pé ${i.origin??"iye"} ${s.verb} ${a}${i.maximum} ${s.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${a}${i.maximum}`}case"too_small":{const a=i.inclusive?">=":">",s=t(i.origin);return s?`Kéré ju: a ní láti jẹ́ pé ${i.origin} ${s.verb} ${a}${i.minimum} ${s.unit}`:`Kéré ju: a ní láti jẹ́ ${a}${i.minimum}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${a.prefix}"`:a.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${a.suffix}"`:a.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${a.includes}"`:a.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${a.pattern}`:`Aṣìṣe: ${n[a.format]??i.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${i.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${sr(i.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${i.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${i.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function I_e(){return{localeError:C_e()}}const bae=Object.freeze(Object.defineProperty({__proto__:null,ar:QNe,az:UNe,be:zNe,bg:GNe,ca:KNe,cs:YNe,da:JNe,de:eke,en:vae,eo:ake,es:oke,fa:cke,fi:dke,fr:hke,frCA:pke,he:Ake,hu:xke,id:bke,is:Cke,it:Ske,ja:Nke,ka:jke,kh:Tke,km:xae,ko:Oke,lt:Mke,mk:Lke,ms:$ke,nl:Hke,no:Gke,ota:Kke,pl:Jke,ps:Yke,pt:e_e,ru:r_e,sl:i_e,sv:s_e,ta:l_e,th:u_e,tr:h_e,ua:p_e,uk:yae,ur:A_e,vi:x_e,yo:I_e,zhCN:b_e,zhTW:E_e},Symbol.toStringTag,{value:"Module"}));var YL;const wae=Symbol("ZodOutput"),Eae=Symbol("ZodInput");class Cae{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function u7(){return new Cae}(YL=globalThis).__zod_globalRegistry??(YL.__zod_globalRegistry=u7());const Sd=globalThis.__zod_globalRegistry;function Iae(e,t){return new e({type:"string",...Rt(t)})}function Sae(e,t){return new e({type:"string",coerce:!0,...Rt(t)})}function d7(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Rt(t)})}function WC(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Rt(t)})}function f7(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Rt(t)})}function h7(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Rt(t)})}function m7(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Rt(t)})}function p7(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Rt(t)})}function oS(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Rt(t)})}function g7(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Rt(t)})}function A7(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Rt(t)})}function v7(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Rt(t)})}function x7(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Rt(t)})}function y7(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Rt(t)})}function b7(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Rt(t)})}function w7(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Rt(t)})}function E7(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Rt(t)})}function C7(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Rt(t)})}function Bae(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...Rt(t)})}function I7(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Rt(t)})}function S7(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Rt(t)})}function B7(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Rt(t)})}function N7(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Rt(t)})}function k7(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Rt(t)})}function _7(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Rt(t)})}const Nae={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function kae(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Rt(t)})}function _ae(e,t){return new e({type:"string",format:"date",check:"string_format",...Rt(t)})}function jae(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Rt(t)})}function Dae(e,t){return new e({type:"string",format:"duration",check:"string_format",...Rt(t)})}function Tae(e,t){return new e({type:"number",checks:[],...Rt(t)})}function Pae(e,t){return new e({type:"number",coerce:!0,checks:[],...Rt(t)})}function Oae(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Rt(t)})}function Rae(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...Rt(t)})}function Fae(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...Rt(t)})}function Mae(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...Rt(t)})}function Qae(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...Rt(t)})}function Lae(e,t){return new e({type:"boolean",...Rt(t)})}function Uae(e,t){return new e({type:"boolean",coerce:!0,...Rt(t)})}function $ae(e,t){return new e({type:"bigint",...Rt(t)})}function zae(e,t){return new e({type:"bigint",coerce:!0,...Rt(t)})}function Hae(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Rt(t)})}function Wae(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Rt(t)})}function Gae(e,t){return new e({type:"symbol",...Rt(t)})}function qae(e,t){return new e({type:"undefined",...Rt(t)})}function Kae(e,t){return new e({type:"null",...Rt(t)})}function Vae(e){return new e({type:"any"})}function Yae(e){return new e({type:"unknown"})}function Zae(e,t){return new e({type:"never",...Rt(t)})}function Jae(e,t){return new e({type:"void",...Rt(t)})}function Xae(e,t){return new e({type:"date",...Rt(t)})}function ese(e,t){return new e({type:"date",coerce:!0,...Rt(t)})}function tse(e,t){return new e({type:"nan",...Rt(t)})}function sg(e,t){return new r7({check:"less_than",...Rt(t),value:e,inclusive:!1})}function F0(e,t){return new r7({check:"less_than",...Rt(t),value:e,inclusive:!0})}function og(e,t){return new n7({check:"greater_than",...Rt(t),value:e,inclusive:!1})}function Gc(e,t){return new n7({check:"greater_than",...Rt(t),value:e,inclusive:!0})}function j7(e){return og(0,e)}function D7(e){return sg(0,e)}function T7(e){return F0(0,e)}function P7(e){return Gc(0,e)}function kx(e,t){return new Qne({check:"multiple_of",...Rt(t),value:e})}function dw(e,t){return new $ne({check:"max_size",...Rt(t),maximum:e})}function _x(e,t){return new zne({check:"min_size",...Rt(t),minimum:e})}function lS(e,t){return new Hne({check:"size_equals",...Rt(t),size:e})}function fw(e,t){return new Wne({check:"max_length",...Rt(t),maximum:e})}function d1(e,t){return new Gne({check:"min_length",...Rt(t),minimum:e})}function hw(e,t){return new qne({check:"length_equals",...Rt(t),length:e})}function cS(e,t){return new Kne({check:"string_format",format:"regex",...Rt(t),pattern:e})}function uS(e){return new Vne({check:"string_format",format:"lowercase",...Rt(e)})}function dS(e){return new Yne({check:"string_format",format:"uppercase",...Rt(e)})}function fS(e,t){return new Zne({check:"string_format",format:"includes",...Rt(t),includes:e})}function hS(e,t){return new Jne({check:"string_format",format:"starts_with",...Rt(t),prefix:e})}function mS(e,t){return new Xne({check:"string_format",format:"ends_with",...Rt(t),suffix:e})}function O7(e,t,r){return new eie({check:"property",property:e,schema:t,...Rt(r)})}function pS(e,t){return new tie({check:"mime_type",mime:e,...Rt(t)})}function _m(e){return new rie({check:"overwrite",tx:e})}function gS(e){return _m(t=>t.normalize(e))}function AS(){return _m(e=>e.trim())}function vS(){return _m(e=>e.toLowerCase())}function xS(){return _m(e=>e.toUpperCase())}function yS(){return _m(e=>Ore(e))}function rse(e,t,r){return new e({type:"array",element:t,...Rt(r)})}function S_e(e,t,r){return new e({type:"union",options:t,...Rt(r)})}function B_e(e,t,r){return new e({type:"union",options:t,inclusive:!1,...Rt(r)})}function N_e(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...Rt(n)})}function k_e(e,t,r){return new e({type:"intersection",left:t,right:r})}function __e(e,t,r,n){const i=r instanceof Sn,a=i?n:r,s=i?r:null;return new e({type:"tuple",items:t,rest:s,...Rt(a)})}function j_e(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...Rt(n)})}function D_e(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...Rt(n)})}function T_e(e,t,r){return new e({type:"set",valueType:t,...Rt(r)})}function P_e(e,t,r){const n=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new e({type:"enum",entries:n,...Rt(r)})}function O_e(e,t,r){return new e({type:"enum",entries:t,...Rt(r)})}function R_e(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...Rt(r)})}function nse(e,t){return new e({type:"file",...Rt(t)})}function F_e(e,t){return new e({type:"transform",transform:t})}function M_e(e,t){return new e({type:"optional",innerType:t})}function Q_e(e,t){return new e({type:"nullable",innerType:t})}function L_e(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():nS(r)}})}function U_e(e,t,r){return new e({type:"nonoptional",innerType:t,...Rt(r)})}function $_e(e,t){return new e({type:"success",innerType:t})}function z_e(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function H_e(e,t,r){return new e({type:"pipe",in:t,out:r})}function W_e(e,t){return new e({type:"readonly",innerType:t})}function G_e(e,t,r){return new e({type:"template_literal",parts:t,...Rt(r)})}function q_e(e,t){return new e({type:"lazy",getter:t})}function K_e(e,t){return new e({type:"promise",innerType:t})}function ise(e,t,r){const n=Rt(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function ase(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Rt(r)})}function sse(e){const t=ose(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Bx(n,r.value,t._zod.def));else{const i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),r.issues.push(Bx(i))}},e(r.value,r)));return t}function ose(e,t){const r=new is({check:"custom",...Rt(t)});return r._zod.check=e,r}function lse(e){const t=new is({check:"describe"});return t._zod.onattach=[r=>{const n=Sd.get(r)??{};Sd.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function cse(e){const t=new is({check:"meta"});return t._zod.onattach=[r=>{const n=Sd.get(r)??{};Sd.add(r,{...n,...e})}],t._zod.check=()=>{},t}function use(e,t){const r=Rt(t);let n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(g=>typeof g=="string"?g.toLowerCase():g),i=i.map(g=>typeof g=="string"?g.toLowerCase():g));const a=new Set(n),s=new Set(i),l=e.Codec??c7,c=e.Boolean??s7,u=e.String??uw,d=new u({type:"string",error:r.error}),f=new c({type:"boolean",error:r.error}),m=new l({type:"pipe",in:d,out:f,transform:((g,A)=>{let v=g;return r.case!=="sensitive"&&(v=v.toLowerCase()),a.has(v)?!0:s.has(v)?!1:(A.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...s],input:A.value,inst:m,continue:!1}),{})}),reverseTransform:((g,A)=>g===!0?n[0]||"true":i[0]||"false"),error:r.error});return m}function mw(e,t,r,n={}){const i=Rt(n),a={...Rt(n),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:l=>r.test(l),...i};return r instanceof RegExp&&(a.pattern=r),new e(a)}function jx(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Sd,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function ha(e,t,r={path:[],schemaPath:[]}){var n;const i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,r.schemaPath.includes(e)&&(a.cycle=r.path),a.schema;const s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);const l=e._zod.toJSONSchema?.();if(l)s.schema=l;else{const d={...r,schemaPath:[...r.schemaPath,e],path:r.path},f=e._zod.parent;if(f)s.ref=f,ha(f,t,d),t.seen.get(f).isParent=!0;else if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,d);else{const m=s.schema,g=t.processors[i.type];if(!g)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);g(e,t,m,d)}}const c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&pc(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function Dx(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=a=>{const s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(a[0])?.id,f=e.external.uri??(g=>g);if(d)return{ref:f(d)};const m=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=m,{defId:m,ref:`${f("__shared")}#/${s}/${m}`}}if(a[1]===r)return{ref:"#"};const c=`#/${s}/`,u=a[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:c+u}},i=a=>{if(a[1].schema.$ref)return;const s=a[1],{ref:l,defId:c}=n(a);s.def={...s.schema},c&&(s.defId=c);const u=s.schema;for(const d in u)delete u[d];u.$ref=l};if(e.cycles==="throw")for(const a of e.seen.entries()){const s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const s=a[1];if(t===a[0]){i(a);continue}if(e.external){const c=e.external.registry.get(a[0])?.id;if(t!==a[0]&&c){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function Tx(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=s=>{const l=e.seen.get(s),c=l.def??l.schema,u={...c};if(l.ref===null)return;const d=l.ref;if(l.ref=null,d){n(d);const f=e.seen.get(d).schema;f.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(f)):(Object.assign(c,f),Object.assign(c,u))}l.isParent||e.override({zodSchema:s,jsonSchema:c,path:l.path??[]})};for(const s of[...e.seen.entries()].reverse())n(s[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(s)}Object.assign(i,r.def??r.schema);const a=e.external?.defs??{};for(const s of e.seen.entries()){const l=s[1];l.def&&l.defId&&(a[l.defId]=l.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?i.$defs=a:i.definitions=a);try{const s=JSON.parse(JSON.stringify(i));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:K2(t,"input"),output:K2(t,"output")}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function pc(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return pc(n.element,r);if(n.type==="set")return pc(n.valueType,r);if(n.type==="lazy")return pc(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return pc(n.innerType,r);if(n.type==="intersection")return pc(n.left,r)||pc(n.right,r);if(n.type==="record"||n.type==="map")return pc(n.keyType,r)||pc(n.valueType,r);if(n.type==="pipe")return pc(n.in,r)||pc(n.out,r);if(n.type==="object"){for(const i in n.shape)if(pc(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(pc(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(pc(i,r))return!0;return!!(n.rest&&pc(n.rest,r))}return!1}const dse=(e,t={})=>r=>{const n=jx({...r,processors:t});return ha(e,n),Dx(n,e),Tx(n,e)},K2=(e,t)=>r=>{const{libraryOptions:n,target:i}=r??{},a=jx({...n??{},target:i,io:t,processors:{}});return ha(e,a),Dx(a,e),Tx(a,e)},V_e={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},fse=(e,t,r,n)=>{const i=r;i.type="string";const{minimum:a,maximum:s,format:l,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof a=="number"&&(i.minLength=a),typeof s=="number"&&(i.maxLength=s),l&&(i.format=V_e[l]??l,i.format===""&&delete i.format),u&&(i.contentEncoding=u),c&&c.size>0){const d=[...c];d.length===1?i.pattern=d[0].source:d.length>1&&(i.allOf=[...d.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},hse=(e,t,r,n)=>{const i=r,{minimum:a,maximum:s,format:l,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:d}=e._zod.bag;typeof l=="string"&&l.includes("int")?i.type="integer":i.type="number",typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=d,i.exclusiveMinimum=!0):i.exclusiveMinimum=d),typeof a=="number"&&(i.minimum=a,typeof d=="number"&&t.target!=="draft-04"&&(d>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u),typeof s=="number"&&(i.maximum=s,typeof u=="number"&&t.target!=="draft-04"&&(u<=s?delete i.maximum:delete i.exclusiveMaximum)),typeof c=="number"&&(i.multipleOf=c)},mse=(e,t,r,n)=>{r.type="boolean"},pse=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},gse=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Ase=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},vse=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},xse=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},yse=(e,t,r,n)=>{r.not={}},bse=(e,t,r,n)=>{},wse=(e,t,r,n)=>{},Ese=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Cse=(e,t,r,n)=>{const i=e._zod.def,a=UP(i.entries);a.every(s=>typeof s=="number")&&(r.type="number"),a.every(s=>typeof s=="string")&&(r.type="string"),r.enum=a},Ise=(e,t,r,n)=>{const i=e._zod.def,a=[];for(const s of i.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");a.push(Number(s))}else a.push(s);if(a.length!==0)if(a.length===1){const s=a[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else a.every(s=>typeof s=="number")&&(r.type="number"),a.every(s=>typeof s=="string")&&(r.type="string"),a.every(s=>typeof s=="boolean")&&(r.type="boolean"),a.every(s=>s===null)&&(r.type="null"),r.enum=a},Sse=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Bse=(e,t,r,n)=>{const i=r,a=e._zod.pattern;if(!a)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=a.source},Nse=(e,t,r,n)=>{const i=r,a={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:l,mime:c}=e._zod.bag;s!==void 0&&(a.minLength=s),l!==void 0&&(a.maxLength=l),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):i.anyOf=c.map(u=>({...a,contentMediaType:u})):Object.assign(i,a)},kse=(e,t,r,n)=>{r.type="boolean"},_se=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},jse=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Dse=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Tse=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Pse=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Ose=(e,t,r,n)=>{const i=r,a=e._zod.def,{minimum:s,maximum:l}=e._zod.bag;typeof s=="number"&&(i.minItems=s),typeof l=="number"&&(i.maxItems=l),i.type="array",i.items=ha(a.element,t,{...n,path:[...n.path,"items"]})},Rse=(e,t,r,n)=>{const i=r,a=e._zod.def;i.type="object",i.properties={};const s=a.shape;for(const u in s)i.properties[u]=ha(s[u],t,{...n,path:[...n.path,"properties",u]});const l=new Set(Object.keys(s)),c=new Set([...l].filter(u=>{const d=a.shape[u]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type==="never"?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ha(a.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},R7=(e,t,r,n)=>{const i=e._zod.def,a=i.inclusive===!1,s=i.options.map((l,c)=>ha(l,t,{...n,path:[...n.path,a?"oneOf":"anyOf",c]}));a?r.oneOf=s:r.anyOf=s},Fse=(e,t,r,n)=>{const i=e._zod.def,a=ha(i.left,t,{...n,path:[...n.path,"allOf",0]}),s=ha(i.right,t,{...n,path:[...n.path,"allOf",1]}),l=u=>"allOf"in u&&Object.keys(u).length===1,c=[...l(a)?a.allOf:[a],...l(s)?s.allOf:[s]];r.allOf=c},Mse=(e,t,r,n)=>{const i=r,a=e._zod.def;i.type="array";const s=t.target==="draft-2020-12"?"prefixItems":"items",l=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=a.items.map((m,g)=>ha(m,t,{...n,path:[...n.path,s,g]})),u=a.rest?ha(a.rest,t,{...n,path:[...n.path,l,...t.target==="openapi-3.0"?[a.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=c,u&&(i.items=u)):t.target==="openapi-3.0"?(i.items={anyOf:c},u&&i.items.anyOf.push(u),i.minItems=c.length,u||(i.maxItems=c.length)):(i.items=c,u&&(i.additionalItems=u));const{minimum:d,maximum:f}=e._zod.bag;typeof d=="number"&&(i.minItems=d),typeof f=="number"&&(i.maxItems=f)},Qse=(e,t,r,n)=>{const i=r,a=e._zod.def;i.type="object",(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=ha(a.keyType,t,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=ha(a.valueType,t,{...n,path:[...n.path,"additionalProperties"]})},Lse=(e,t,r,n)=>{const i=e._zod.def,a=ha(i.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=i.innerType,r.nullable=!0):r.anyOf=[a,{type:"null"}]},Use=(e,t,r,n)=>{const i=e._zod.def;ha(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType},$se=(e,t,r,n)=>{const i=e._zod.def;ha(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},zse=(e,t,r,n)=>{const i=e._zod.def;ha(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Hse=(e,t,r,n)=>{const i=e._zod.def;ha(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType;let s;try{s=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},Wse=(e,t,r,n)=>{const i=e._zod.def,a=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;ha(a,t,n);const s=t.seen.get(e);s.ref=a},Gse=(e,t,r,n)=>{const i=e._zod.def;ha(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType,r.readOnly=!0},qse=(e,t,r,n)=>{const i=e._zod.def;ha(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType},Kse=(e,t,r,n)=>{const i=e._zod.def;ha(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType},Vse=(e,t,r,n)=>{const i=e._zod.innerType;ha(i,t,n);const a=t.seen.get(e);a.ref=i},V8={string:fse,number:hse,boolean:mse,bigint:pse,symbol:gse,null:Ase,undefined:vse,void:xse,never:yse,any:bse,unknown:wse,date:Ese,enum:Cse,literal:Ise,nan:Sse,template_literal:Bse,file:Nse,success:kse,custom:_se,function:jse,transform:Dse,map:Tse,set:Pse,array:Ose,object:Rse,union:R7,intersection:Fse,tuple:Mse,record:Qse,nullable:Lse,nonoptional:Use,default:$se,prefault:zse,catch:Hse,pipe:Wse,readonly:Gse,promise:qse,optional:Kse,lazy:Vse};function Yse(e,t){if("_idmap"in e){const n=e,i=jx({...t,processors:V8}),a={};for(const c of n._idmap.entries()){const[u,d]=c;ha(d,i)}const s={},l={registry:n,uri:t?.uri,defs:a};i.external=l;for(const c of n._idmap.entries()){const[u,d]=c;Dx(i,d),s[u]=Tx(i,d)}if(Object.keys(a).length>0){const c=i.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:a}}return{schemas:s}}const r=jx({...t,processors:V8});return ha(e,r),Dx(r,e),Tx(r,e)}class Y_e{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=jx({processors:V8,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return ha(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),Dx(this.ctx,t);const n=Tx(this.ctx,t),{"~standard":i,...a}=n;return a}}const Z_e=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),J_e=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:Fie,$ZodArray:$ie,$ZodAsyncError:WA,$ZodBase64:Iie,$ZodBase64URL:Bie,$ZodBigInt:o7,$ZodBigIntFormat:Tie,$ZodBoolean:s7,$ZodCIDRv4:Eie,$ZodCIDRv6:Cie,$ZodCUID:die,$ZodCUID2:fie,$ZodCatch:cae,$ZodCheck:is,$ZodCheckBigIntFormat:Une,$ZodCheckEndsWith:Xne,$ZodCheckGreaterThan:n7,$ZodCheckIncludes:Zne,$ZodCheckLengthEquals:qne,$ZodCheckLessThan:r7,$ZodCheckLowerCase:Vne,$ZodCheckMaxLength:Wne,$ZodCheckMaxSize:$ne,$ZodCheckMimeType:tie,$ZodCheckMinLength:Gne,$ZodCheckMinSize:zne,$ZodCheckMultipleOf:Qne,$ZodCheckNumberFormat:Lne,$ZodCheckOverwrite:rie,$ZodCheckProperty:eie,$ZodCheckRegex:Kne,$ZodCheckSizeEquals:Hne,$ZodCheckStartsWith:Jne,$ZodCheckStringFormat:cw,$ZodCheckUpperCase:Yne,$ZodCodec:c7,$ZodCustom:Aae,$ZodCustomStringFormat:jie,$ZodDate:Uie,$ZodDefault:aae,$ZodDiscriminatedUnion:Kie,$ZodE164:Nie,$ZodEmail:oie,$ZodEmoji:cie,$ZodEncodeError:tS,$ZodEnum:Xie,$ZodError:zP,$ZodFile:tae,$ZodFunction:mae,$ZodGUID:aie,$ZodIPv4:yie,$ZodIPv6:bie,$ZodISODate:Aie,$ZodISODateTime:gie,$ZodISODuration:xie,$ZodISOTime:vie,$ZodIntersection:Vie,$ZodJWT:_ie,$ZodKSUID:pie,$ZodLazy:gae,$ZodLiteral:eae,$ZodMAC:wie,$ZodMap:Zie,$ZodNaN:uae,$ZodNanoID:uie,$ZodNever:Qie,$ZodNonOptional:oae,$ZodNull:Rie,$ZodNullable:iae,$ZodNumber:a7,$ZodNumberFormat:Die,$ZodObject:Wie,$ZodObjectJIT:Gie,$ZodOptional:nae,$ZodPipe:dae,$ZodPrefault:sae,$ZodPromise:pae,$ZodReadonly:fae,$ZodRealError:Wu,$ZodRecord:Yie,$ZodRegistry:Cae,$ZodSet:Jie,$ZodString:uw,$ZodStringFormat:ma,$ZodSuccess:lae,$ZodSymbol:Pie,$ZodTemplateLiteral:hae,$ZodTransform:rae,$ZodTuple:l7,$ZodType:Sn,$ZodULID:hie,$ZodURL:lie,$ZodUUID:sie,$ZodUndefined:Oie,$ZodUnion:sS,$ZodUnknown:Mie,$ZodVoid:Lie,$ZodXID:mie,$ZodXor:qie,$brand:Tre,$constructor:rt,$input:Eae,$output:wae,Doc:nie,JSONSchema:Z_e,JSONSchemaGenerator:Y_e,NEVER:Dre,TimePrecision:Nae,_any:Vae,_array:rse,_base64:B7,_base64url:N7,_bigint:$ae,_boolean:Lae,_catch:z_e,_check:ose,_cidrv4:I7,_cidrv6:S7,_coercedBigint:zae,_coercedBoolean:Uae,_coercedDate:ese,_coercedNumber:Pae,_coercedString:Sae,_cuid:v7,_cuid2:x7,_custom:ise,_date:Xae,_decode:qP,_decodeAsync:VP,_default:L_e,_discriminatedUnion:N_e,_e164:k7,_email:d7,_emoji:g7,_encode:GP,_encodeAsync:KP,_endsWith:mS,_enum:P_e,_file:nse,_float32:Rae,_float64:Fae,_gt:og,_gte:Gc,_guid:WC,_includes:fS,_int:Oae,_int32:Mae,_int64:Hae,_intersection:k_e,_ipv4:E7,_ipv6:C7,_isoDate:_ae,_isoDateTime:kae,_isoDuration:Dae,_isoTime:jae,_jwt:_7,_ksuid:w7,_lazy:q_e,_length:hw,_literal:R_e,_lowercase:uS,_lt:sg,_lte:F0,_mac:Bae,_map:D_e,_max:F0,_maxLength:fw,_maxSize:dw,_mime:pS,_min:Gc,_minLength:d1,_minSize:_x,_multipleOf:kx,_nan:tse,_nanoid:A7,_nativeEnum:O_e,_negative:D7,_never:Zae,_nonnegative:P7,_nonoptional:U_e,_nonpositive:T7,_normalize:gS,_null:Kae,_nullable:Q_e,_number:Tae,_optional:M_e,_overwrite:_m,_parse:nw,_parseAsync:iw,_pipe:H_e,_positive:j7,_promise:K_e,_property:O7,_readonly:W_e,_record:j_e,_refine:ase,_regex:cS,_safeDecode:ZP,_safeDecodeAsync:XP,_safeEncode:YP,_safeEncodeAsync:JP,_safeParse:aw,_safeParseAsync:sw,_set:T_e,_size:lS,_slugify:yS,_startsWith:hS,_string:Iae,_stringFormat:mw,_stringbool:use,_success:$_e,_superRefine:sse,_symbol:Gae,_templateLiteral:G_e,_toLowerCase:vS,_toUpperCase:xS,_transform:F_e,_trim:AS,_tuple:__e,_uint32:Qae,_uint64:Wae,_ulid:y7,_undefined:qae,_union:S_e,_unknown:Yae,_uppercase:dS,_url:oS,_uuid:f7,_uuidv4:h7,_uuidv6:m7,_uuidv7:p7,_void:Jae,_xid:b7,_xor:B_e,clone:q0,config:rc,createStandardJSONSchemaMethod:K2,createToJSONSchemaMethod:dse,decode:oNe,decodeAsync:cNe,describe:lse,encode:sNe,encodeAsync:lNe,extractDefs:Dx,finalize:Tx,flattenError:HP,formatError:WP,globalConfig:UC,globalRegistry:Sd,initializeContext:jx,isValidBase64:i7,isValidBase64URL:Sie,isValidJWT:kie,locales:bae,meta:cse,parse:G8,parseAsync:q8,prettifyError:ene,process:ha,regexes:t7,registry:u7,safeDecode:dNe,safeDecodeAsync:hNe,safeEncode:uNe,safeEncodeAsync:fNe,safeParse:tne,safeParseAsync:rne,toDotPath:Xre,toJSONSchema:Yse,treeifyError:Jre,util:Yre,version:iie},Symbol.toStringTag,{value:"Module"})),X_e=Object.freeze(Object.defineProperty({__proto__:null,endsWith:mS,gt:og,gte:Gc,includes:fS,length:hw,lowercase:uS,lt:sg,lte:F0,maxLength:fw,maxSize:dw,mime:pS,minLength:d1,minSize:_x,multipleOf:kx,negative:D7,nonnegative:P7,nonpositive:T7,normalize:gS,overwrite:_m,positive:j7,property:O7,regex:cS,size:lS,slugify:yS,startsWith:hS,toLowerCase:vS,toUpperCase:xS,trim:AS,uppercase:dS},Symbol.toStringTag,{value:"Module"})),F7=rt("ZodISODateTime",(e,t)=>{gie.init(e,t),pa.init(e,t)});function Zse(e){return kae(F7,e)}const M7=rt("ZodISODate",(e,t)=>{Aie.init(e,t),pa.init(e,t)});function Jse(e){return _ae(M7,e)}const Q7=rt("ZodISOTime",(e,t)=>{vie.init(e,t),pa.init(e,t)});function Xse(e){return jae(Q7,e)}const L7=rt("ZodISODuration",(e,t)=>{xie.init(e,t),pa.init(e,t)});function eoe(e){return Dae(L7,e)}const toe=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:M7,ZodISODateTime:F7,ZodISODuration:L7,ZodISOTime:Q7,date:Jse,datetime:Zse,duration:eoe,time:Xse},Symbol.toStringTag,{value:"Module"})),roe=(e,t)=>{zP.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>WP(e,r)},flatten:{value:r=>HP(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,$C,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,$C,2)}},isEmpty:{get(){return e.issues.length===0}}})},eje=rt("ZodError",roe),Gu=rt("ZodError",roe,{Parent:Error}),noe=nw(Gu),ioe=iw(Gu),aoe=aw(Gu),soe=sw(Gu),ooe=GP(Gu),loe=qP(Gu),coe=KP(Gu),uoe=VP(Gu),doe=YP(Gu),foe=ZP(Gu),hoe=JP(Gu),moe=XP(Gu),Dn=rt("ZodType",(e,t)=>(Sn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:K2(e,"input"),output:K2(e,"output")}}),e.toJSONSchema=dse(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(km(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]})),e.clone=(r,n)=>q0(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>noe(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>aoe(e,r,n),e.parseAsync=async(r,n)=>ioe(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>soe(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>ooe(e,r,n),e.decode=(r,n)=>loe(e,r,n),e.encodeAsync=async(r,n)=>coe(e,r,n),e.decodeAsync=async(r,n)=>uoe(e,r,n),e.safeEncode=(r,n)=>doe(e,r,n),e.safeDecode=(r,n)=>foe(e,r,n),e.safeEncodeAsync=async(r,n)=>hoe(e,r,n),e.safeDecodeAsync=async(r,n)=>moe(e,r,n),e.refine=(r,n)=>e.check(BO(r,n)),e.superRefine=r=>e.check(NO(r)),e.overwrite=r=>e.check(_m(r)),e.optional=()=>Z2(e),e.nullable=()=>J2(e),e.nullish=()=>Z2(J2(e)),e.nonoptional=r=>mO(e,r),e.array=()=>Cg(e),e.or=r=>py([e,r]),e.and=r=>eO(e,r),e.transform=r=>X2(e,HS(r)),e.default=r=>dO(e,r),e.prefault=r=>hO(e,r),e.catch=r=>AO(e,r),e.pipe=r=>X2(e,r),e.readonly=()=>yO(e),e.describe=r=>{const n=e.clone();return Sd.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Sd.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Sd.get(e);const n=e.clone();return Sd.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),bS=rt("_ZodString",(e,t)=>{uw.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,i,a)=>fse(e,n,i);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(cS(...n)),e.includes=(...n)=>e.check(fS(...n)),e.startsWith=(...n)=>e.check(hS(...n)),e.endsWith=(...n)=>e.check(mS(...n)),e.min=(...n)=>e.check(d1(...n)),e.max=(...n)=>e.check(fw(...n)),e.length=(...n)=>e.check(hw(...n)),e.nonempty=(...n)=>e.check(d1(1,...n)),e.lowercase=n=>e.check(uS(n)),e.uppercase=n=>e.check(dS(n)),e.trim=()=>e.check(AS()),e.normalize=(...n)=>e.check(gS(...n)),e.toLowerCase=()=>e.check(vS()),e.toUpperCase=()=>e.check(xS()),e.slugify=()=>e.check(yS())}),pw=rt("ZodString",(e,t)=>{uw.init(e,t),bS.init(e,t),e.email=r=>e.check(d7(wS,r)),e.url=r=>e.check(oS(gw,r)),e.jwt=r=>e.check(_7(FS,r)),e.emoji=r=>e.check(g7(ES,r)),e.guid=r=>e.check(WC(V2,r)),e.uuid=r=>e.check(f7(Tf,r)),e.uuidv4=r=>e.check(h7(Tf,r)),e.uuidv6=r=>e.check(m7(Tf,r)),e.uuidv7=r=>e.check(p7(Tf,r)),e.nanoid=r=>e.check(A7(CS,r)),e.guid=r=>e.check(WC(V2,r)),e.cuid=r=>e.check(v7(IS,r)),e.cuid2=r=>e.check(x7(SS,r)),e.ulid=r=>e.check(y7(BS,r)),e.base64=r=>e.check(B7(PS,r)),e.base64url=r=>e.check(N7(OS,r)),e.xid=r=>e.check(b7(NS,r)),e.ksuid=r=>e.check(w7(kS,r)),e.ipv4=r=>e.check(E7(_S,r)),e.ipv6=r=>e.check(C7(jS,r)),e.cidrv4=r=>e.check(I7(DS,r)),e.cidrv6=r=>e.check(S7(TS,r)),e.e164=r=>e.check(k7(RS,r)),e.datetime=r=>e.check(Zse(r)),e.date=r=>e.check(Jse(r)),e.time=r=>e.check(Xse(r)),e.duration=r=>e.check(eoe(r))});function yc(e){return Iae(pw,e)}const pa=rt("ZodStringFormat",(e,t)=>{ma.init(e,t),bS.init(e,t)}),wS=rt("ZodEmail",(e,t)=>{oie.init(e,t),pa.init(e,t)});function poe(e){return d7(wS,e)}const V2=rt("ZodGUID",(e,t)=>{aie.init(e,t),pa.init(e,t)});function goe(e){return WC(V2,e)}const Tf=rt("ZodUUID",(e,t)=>{sie.init(e,t),pa.init(e,t)});function Aoe(e){return f7(Tf,e)}function voe(e){return h7(Tf,e)}function xoe(e){return m7(Tf,e)}function yoe(e){return p7(Tf,e)}const gw=rt("ZodURL",(e,t)=>{lie.init(e,t),pa.init(e,t)});function boe(e){return oS(gw,e)}function woe(e){return oS(gw,{protocol:/^https?$/,hostname:bne,...Rt(e)})}const ES=rt("ZodEmoji",(e,t)=>{cie.init(e,t),pa.init(e,t)});function Eoe(e){return g7(ES,e)}const CS=rt("ZodNanoID",(e,t)=>{uie.init(e,t),pa.init(e,t)});function Coe(e){return A7(CS,e)}const IS=rt("ZodCUID",(e,t)=>{die.init(e,t),pa.init(e,t)});function Ioe(e){return v7(IS,e)}const SS=rt("ZodCUID2",(e,t)=>{fie.init(e,t),pa.init(e,t)});function Soe(e){return x7(SS,e)}const BS=rt("ZodULID",(e,t)=>{hie.init(e,t),pa.init(e,t)});function Boe(e){return y7(BS,e)}const NS=rt("ZodXID",(e,t)=>{mie.init(e,t),pa.init(e,t)});function Noe(e){return b7(NS,e)}const kS=rt("ZodKSUID",(e,t)=>{pie.init(e,t),pa.init(e,t)});function koe(e){return w7(kS,e)}const _S=rt("ZodIPv4",(e,t)=>{yie.init(e,t),pa.init(e,t)});function _oe(e){return E7(_S,e)}const U7=rt("ZodMAC",(e,t)=>{wie.init(e,t),pa.init(e,t)});function joe(e){return Bae(U7,e)}const jS=rt("ZodIPv6",(e,t)=>{bie.init(e,t),pa.init(e,t)});function Doe(e){return C7(jS,e)}const DS=rt("ZodCIDRv4",(e,t)=>{Eie.init(e,t),pa.init(e,t)});function Toe(e){return I7(DS,e)}const TS=rt("ZodCIDRv6",(e,t)=>{Cie.init(e,t),pa.init(e,t)});function Poe(e){return S7(TS,e)}const PS=rt("ZodBase64",(e,t)=>{Iie.init(e,t),pa.init(e,t)});function Ooe(e){return B7(PS,e)}const OS=rt("ZodBase64URL",(e,t)=>{Bie.init(e,t),pa.init(e,t)});function Roe(e){return N7(OS,e)}const RS=rt("ZodE164",(e,t)=>{Nie.init(e,t),pa.init(e,t)});function Foe(e){return k7(RS,e)}const FS=rt("ZodJWT",(e,t)=>{_ie.init(e,t),pa.init(e,t)});function Moe(e){return _7(FS,e)}const my=rt("ZodCustomStringFormat",(e,t)=>{jie.init(e,t),pa.init(e,t)});function Qoe(e,t,r={}){return mw(my,e,t,r)}function Loe(e){return mw(my,"hostname",yne,e)}function Uoe(e){return mw(my,"hex",Fne,e)}function $oe(e,t){const r=t?.enc??"hex",n=`${e}_${r}`,i=t7[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return mw(my,n,i,t)}const Aw=rt("ZodNumber",(e,t)=>{a7.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,i,a)=>hse(e,n,i),e.gt=(n,i)=>e.check(og(n,i)),e.gte=(n,i)=>e.check(Gc(n,i)),e.min=(n,i)=>e.check(Gc(n,i)),e.lt=(n,i)=>e.check(sg(n,i)),e.lte=(n,i)=>e.check(F0(n,i)),e.max=(n,i)=>e.check(F0(n,i)),e.int=n=>e.check(GC(n)),e.safe=n=>e.check(GC(n)),e.positive=n=>e.check(og(0,n)),e.nonnegative=n=>e.check(Gc(0,n)),e.negative=n=>e.check(sg(0,n)),e.nonpositive=n=>e.check(F0(0,n)),e.multipleOf=(n,i)=>e.check(kx(n,i)),e.step=(n,i)=>e.check(kx(n,i)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function qc(e){return Tae(Aw,e)}const P1=rt("ZodNumberFormat",(e,t)=>{Die.init(e,t),Aw.init(e,t)});function GC(e){return Oae(P1,e)}function zoe(e){return Rae(P1,e)}function Hoe(e){return Fae(P1,e)}function Woe(e){return Mae(P1,e)}function Goe(e){return Qae(P1,e)}const vw=rt("ZodBoolean",(e,t)=>{s7.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>mse(e,r,n)});function MS(e){return Lae(vw,e)}const xw=rt("ZodBigInt",(e,t)=>{o7.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,i,a)=>pse(e,n),e.gte=(n,i)=>e.check(Gc(n,i)),e.min=(n,i)=>e.check(Gc(n,i)),e.gt=(n,i)=>e.check(og(n,i)),e.gte=(n,i)=>e.check(Gc(n,i)),e.min=(n,i)=>e.check(Gc(n,i)),e.lt=(n,i)=>e.check(sg(n,i)),e.lte=(n,i)=>e.check(F0(n,i)),e.max=(n,i)=>e.check(F0(n,i)),e.positive=n=>e.check(og(BigInt(0),n)),e.negative=n=>e.check(sg(BigInt(0),n)),e.nonpositive=n=>e.check(F0(BigInt(0),n)),e.nonnegative=n=>e.check(Gc(BigInt(0),n)),e.multipleOf=(n,i)=>e.check(kx(n,i));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function qoe(e){return $ae(xw,e)}const QS=rt("ZodBigIntFormat",(e,t)=>{Tie.init(e,t),xw.init(e,t)});function Koe(e){return Hae(QS,e)}function Voe(e){return Wae(QS,e)}const $7=rt("ZodSymbol",(e,t)=>{Pie.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>gse(e,r)});function Yoe(e){return Gae($7,e)}const z7=rt("ZodUndefined",(e,t)=>{Oie.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>vse(e,r)});function Zoe(e){return qae(z7,e)}const H7=rt("ZodNull",(e,t)=>{Rie.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ase(e,r,n)});function LS(e){return Kae(H7,e)}const W7=rt("ZodAny",(e,t)=>{Fie.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>bse()});function Y2(){return Vae(W7)}const G7=rt("ZodUnknown",(e,t)=>{Mie.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>wse()});function f1(){return Yae(G7)}const q7=rt("ZodNever",(e,t)=>{Qie.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>yse(e,r,n)});function US(e){return Zae(q7,e)}const K7=rt("ZodVoid",(e,t)=>{Lie.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>xse(e,r)});function Joe(e){return Jae(K7,e)}const $S=rt("ZodDate",(e,t)=>{Uie.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,i,a)=>Ese(e,n),e.min=(n,i)=>e.check(Gc(n,i)),e.max=(n,i)=>e.check(F0(n,i));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function Xoe(e){return Xae($S,e)}const V7=rt("ZodArray",(e,t)=>{$ie.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ose(e,r,n,i),e.element=t.element,e.min=(r,n)=>e.check(d1(r,n)),e.nonempty=r=>e.check(d1(1,r)),e.max=(r,n)=>e.check(fw(r,n)),e.length=(r,n)=>e.check(hw(r,n)),e.unwrap=()=>e.element});function Cg(e,t){return rse(V7,e,t)}function ele(e){const t=e._zod.def.shape;return Sc(Object.keys(t))}const yw=rt("ZodObject",(e,t)=>{Gie.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Rse(e,r,n,i),Gn(e,"shape",()=>t.shape),e.keyof=()=>Sc(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:f1()}),e.loose=()=>e.clone({...e._zod.def,catchall:f1()}),e.strict=()=>e.clone({...e._zod.def,catchall:US()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>zre(e,r),e.safeExtend=r=>Hre(e,r),e.merge=r=>Wre(e,r),e.pick=r=>Ure(e,r),e.omit=r=>$re(e,r),e.partial=(...r)=>Gre(WS,e,r[0]),e.required=(...r)=>qre(GS,e,r[0])});function Y7(e,t){const r={type:"object",shape:e??{},...Rt(t)};return new yw(r)}function tle(e,t){return new yw({type:"object",shape:e,catchall:US(),...Rt(t)})}function rle(e,t){return new yw({type:"object",shape:e,catchall:f1(),...Rt(t)})}const bw=rt("ZodUnion",(e,t)=>{sS.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>R7(e,r,n,i),e.options=t.options});function py(e,t){return new bw({type:"union",options:e,...Rt(t)})}const Z7=rt("ZodXor",(e,t)=>{bw.init(e,t),qie.init(e,t),e._zod.processJSONSchema=(r,n,i)=>R7(e,r,n,i),e.options=t.options});function nle(e,t){return new Z7({type:"union",options:e,inclusive:!1,...Rt(t)})}const J7=rt("ZodDiscriminatedUnion",(e,t)=>{bw.init(e,t),Kie.init(e,t)});function ile(e,t,r){return new J7({type:"union",options:t,discriminator:e,...Rt(r)})}const X7=rt("ZodIntersection",(e,t)=>{Vie.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Fse(e,r,n,i)});function eO(e,t){return new X7({type:"intersection",left:e,right:t})}const tO=rt("ZodTuple",(e,t)=>{l7.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Mse(e,r,n,i),e.rest=r=>e.clone({...e._zod.def,rest:r})});function rO(e,t,r){const n=t instanceof Sn,i=n?r:t,a=n?t:null;return new tO({type:"tuple",items:e,rest:a,...Rt(i)})}const ww=rt("ZodRecord",(e,t)=>{Yie.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Qse(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType});function zS(e,t,r){return new ww({type:"record",keyType:e,valueType:t,...Rt(r)})}function ale(e,t,r){const n=q0(e);return n._zod.values=void 0,new ww({type:"record",keyType:n,valueType:t,...Rt(r)})}function sle(e,t,r){return new ww({type:"record",keyType:e,valueType:t,mode:"loose",...Rt(r)})}const nO=rt("ZodMap",(e,t)=>{Zie.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Tse(e,r),e.keyType=t.keyType,e.valueType=t.valueType});function ole(e,t,r){return new nO({type:"map",keyType:e,valueType:t,...Rt(r)})}const iO=rt("ZodSet",(e,t)=>{Jie.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Pse(e,r),e.min=(...r)=>e.check(_x(...r)),e.nonempty=r=>e.check(_x(1,r)),e.max=(...r)=>e.check(dw(...r)),e.size=(...r)=>e.check(lS(...r))});function lle(e,t){return new iO({type:"set",valueType:e,...Rt(t)})}const Px=rt("ZodEnum",(e,t)=>{Xie.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,i,a)=>Cse(e,n,i),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{const a={};for(const s of n)if(r.has(s))a[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Px({...t,checks:[],...Rt(i),entries:a})},e.exclude=(n,i)=>{const a={...t.entries};for(const s of n)if(r.has(s))delete a[s];else throw new Error(`Key ${s} not found in enum`);return new Px({...t,checks:[],...Rt(i),entries:a})}});function Sc(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Px({type:"enum",entries:r,...Rt(t)})}function cle(e,t){return new Px({type:"enum",entries:e,...Rt(t)})}const aO=rt("ZodLiteral",(e,t)=>{eae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ise(e,r,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function sO(e,t){return new aO({type:"literal",values:Array.isArray(e)?e:[e],...Rt(t)})}const oO=rt("ZodFile",(e,t)=>{tae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Nse(e,r,n),e.min=(r,n)=>e.check(_x(r,n)),e.max=(r,n)=>e.check(dw(r,n)),e.mime=(r,n)=>e.check(pS(Array.isArray(r)?r:[r],n))});function ule(e){return nse(oO,e)}const lO=rt("ZodTransform",(e,t)=>{rae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Dse(e,r),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new tS(e.constructor.name);r.addIssue=a=>{if(typeof a=="string")r.issues.push(Bx(a,r.value,t));else{const s=a;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(Bx(s))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(a=>(r.value=a,r)):(r.value=i,r)}});function HS(e){return new lO({type:"transform",transform:e})}const WS=rt("ZodOptional",(e,t)=>{nae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Kse(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Z2(e){return new WS({type:"optional",innerType:e})}const cO=rt("ZodNullable",(e,t)=>{iae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Lse(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function J2(e){return new cO({type:"nullable",innerType:e})}function dle(e){return Z2(J2(e))}const uO=rt("ZodDefault",(e,t)=>{aae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$se(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function dO(e,t){return new uO({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():nS(t)}})}const fO=rt("ZodPrefault",(e,t)=>{sae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>zse(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function hO(e,t){return new fO({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():nS(t)}})}const GS=rt("ZodNonOptional",(e,t)=>{oae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Use(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function mO(e,t){return new GS({type:"nonoptional",innerType:e,...Rt(t)})}const pO=rt("ZodSuccess",(e,t)=>{lae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kse(e,r,n),e.unwrap=()=>e._zod.def.innerType});function fle(e){return new pO({type:"success",innerType:e})}const gO=rt("ZodCatch",(e,t)=>{cae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Hse(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function AO(e,t){return new gO({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const vO=rt("ZodNaN",(e,t)=>{uae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Sse(e,r)});function hle(e){return tse(vO,e)}const qS=rt("ZodPipe",(e,t)=>{dae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Wse(e,r,n,i),e.in=t.in,e.out=t.out});function X2(e,t){return new qS({type:"pipe",in:e,out:t})}const KS=rt("ZodCodec",(e,t)=>{qS.init(e,t),c7.init(e,t)});function mle(e,t,r){return new KS({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}const xO=rt("ZodReadonly",(e,t)=>{fae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Gse(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function yO(e){return new xO({type:"readonly",innerType:e})}const bO=rt("ZodTemplateLiteral",(e,t)=>{hae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Bse(e,r,n)});function ple(e,t){return new bO({type:"template_literal",parts:e,...Rt(t)})}const wO=rt("ZodLazy",(e,t)=>{gae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Vse(e,r,n,i),e.unwrap=()=>e._zod.def.getter()});function EO(e){return new wO({type:"lazy",getter:e})}const CO=rt("ZodPromise",(e,t)=>{pae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>qse(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function gle(e){return new CO({type:"promise",innerType:e})}const IO=rt("ZodFunction",(e,t)=>{mae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>jse(e,r)});function qC(e){return new IO({type:"function",input:Array.isArray(e?.input)?rO(e?.input):e?.input??Cg(f1()),output:e?.output??f1()})}const Ew=rt("ZodCustom",(e,t)=>{Aae.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_se(e,r)});function Ale(e){const t=new is({check:"custom"});return t._zod.check=e,t}function SO(e,t){return ise(Ew,e??(()=>!0),t)}function BO(e,t={}){return ase(Ew,e,t)}function NO(e){return sse(e)}const vle=lse,xle=cse;function yle(e,t={error:`Input not instance of ${e.name}`}){const r=new Ew({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...Rt(t)});return r._zod.bag.Class=e,r}const ble=(...e)=>use({Codec:KS,Boolean:vw,String:pw},...e);function wle(e){const t=EO(()=>py([yc(e),qc(),MS(),LS(),Cg(t),zS(yc(),t)]));return t}function Ele(e,t){return X2(HS(e),t)}const tje=Object.freeze(Object.defineProperty({__proto__:null,ZodAny:W7,ZodArray:V7,ZodBase64:PS,ZodBase64URL:OS,ZodBigInt:xw,ZodBigIntFormat:QS,ZodBoolean:vw,ZodCIDRv4:DS,ZodCIDRv6:TS,ZodCUID:IS,ZodCUID2:SS,ZodCatch:gO,ZodCodec:KS,ZodCustom:Ew,ZodCustomStringFormat:my,ZodDate:$S,ZodDefault:uO,ZodDiscriminatedUnion:J7,ZodE164:RS,ZodEmail:wS,ZodEmoji:ES,ZodEnum:Px,ZodFile:oO,ZodFunction:IO,ZodGUID:V2,ZodIPv4:_S,ZodIPv6:jS,ZodIntersection:X7,ZodJWT:FS,ZodKSUID:kS,ZodLazy:wO,ZodLiteral:aO,ZodMAC:U7,ZodMap:nO,ZodNaN:vO,ZodNanoID:CS,ZodNever:q7,ZodNonOptional:GS,ZodNull:H7,ZodNullable:cO,ZodNumber:Aw,ZodNumberFormat:P1,ZodObject:yw,ZodOptional:WS,ZodPipe:qS,ZodPrefault:fO,ZodPromise:CO,ZodReadonly:xO,ZodRecord:ww,ZodSet:iO,ZodString:pw,ZodStringFormat:pa,ZodSuccess:pO,ZodSymbol:$7,ZodTemplateLiteral:bO,ZodTransform:lO,ZodTuple:tO,ZodType:Dn,ZodULID:BS,ZodURL:gw,ZodUUID:Tf,ZodUndefined:z7,ZodUnion:bw,ZodUnknown:G7,ZodVoid:K7,ZodXID:NS,ZodXor:Z7,_ZodString:bS,_default:dO,_function:qC,any:Y2,array:Cg,base64:Ooe,base64url:Roe,bigint:qoe,boolean:MS,catch:AO,check:Ale,cidrv4:Toe,cidrv6:Poe,codec:mle,cuid:Ioe,cuid2:Soe,custom:SO,date:Xoe,describe:vle,discriminatedUnion:ile,e164:Foe,email:poe,emoji:Eoe,enum:Sc,file:ule,float32:zoe,float64:Hoe,function:qC,guid:goe,hash:$oe,hex:Uoe,hostname:Loe,httpUrl:woe,instanceof:yle,int:GC,int32:Woe,int64:Koe,intersection:eO,ipv4:_oe,ipv6:Doe,json:wle,jwt:Moe,keyof:ele,ksuid:koe,lazy:EO,literal:sO,looseObject:rle,looseRecord:sle,mac:joe,map:ole,meta:xle,nan:hle,nanoid:Coe,nativeEnum:cle,never:US,nonoptional:mO,null:LS,nullable:J2,nullish:dle,number:qc,object:Y7,optional:Z2,partialRecord:ale,pipe:X2,prefault:hO,preprocess:Ele,promise:gle,readonly:yO,record:zS,refine:BO,set:lle,strictObject:tle,string:yc,stringFormat:Qoe,stringbool:ble,success:fle,superRefine:NO,symbol:Yoe,templateLiteral:ple,transform:HS,tuple:rO,uint32:Goe,uint64:Voe,ulid:Boe,undefined:Zoe,union:py,unknown:f1,url:boe,uuid:Aoe,uuidv4:voe,uuidv6:xoe,uuidv7:yoe,void:Joe,xid:Noe,xor:nle},Symbol.toStringTag,{value:"Module"})),rje={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function nje(e){rc({customError:e})}function ije(){return rc().customError}var Y8;Y8||(Y8={});const Ir={...tje,...X_e,iso:toe};function aje(e,t){const r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function sje(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;const n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){const i=r[1];if(!i||!t.defs[i])throw new Error(`Reference not found: ${e}`);return t.defs[i]}throw new Error(`Reference not found: ${e}`)}function Cle(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Ir.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const i=e.$ref;if(t.refs.has(i))return t.refs.get(i);if(t.processing.has(i))return Ir.lazy(()=>{if(!t.refs.has(i))throw new Error(`Circular reference not resolved: ${i}`);return t.refs.get(i)});t.processing.add(i);const a=sje(i,t),s=Vl(a,t);return t.refs.set(i,s),t.processing.delete(i),s}if(e.enum!==void 0){const i=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&i.length===1&&i[0]===null)return Ir.null();if(i.length===0)return Ir.never();if(i.length===1)return Ir.literal(i[0]);if(i.every(s=>typeof s=="string"))return Ir.enum(i);const a=i.map(s=>Ir.literal(s));return a.length<2?a[0]:Ir.union([a[0],a[1],...a.slice(2)])}if(e.const!==void 0)return Ir.literal(e.const);const r=e.type;if(Array.isArray(r)){const i=r.map(a=>{const s={...e,type:a};return Cle(s,t)});return i.length===0?Ir.never():i.length===1?i[0]:Ir.union(i)}if(!r)return Ir.any();let n;switch(r){case"string":{let i=Ir.string();if(e.format){const a=e.format;a==="email"?i=i.check(Ir.email()):a==="uri"||a==="uri-reference"?i=i.check(Ir.url()):a==="uuid"||a==="guid"?i=i.check(Ir.uuid()):a==="date-time"?i=i.check(Ir.iso.datetime()):a==="date"?i=i.check(Ir.iso.date()):a==="time"?i=i.check(Ir.iso.time()):a==="duration"?i=i.check(Ir.iso.duration()):a==="ipv4"?i=i.check(Ir.ipv4()):a==="ipv6"?i=i.check(Ir.ipv6()):a==="mac"?i=i.check(Ir.mac()):a==="cidr"?i=i.check(Ir.cidrv4()):a==="cidr-v6"?i=i.check(Ir.cidrv6()):a==="base64"?i=i.check(Ir.base64()):a==="base64url"?i=i.check(Ir.base64url()):a==="e164"?i=i.check(Ir.e164()):a==="jwt"?i=i.check(Ir.jwt()):a==="emoji"?i=i.check(Ir.emoji()):a==="nanoid"?i=i.check(Ir.nanoid()):a==="cuid"?i=i.check(Ir.cuid()):a==="cuid2"?i=i.check(Ir.cuid2()):a==="ulid"?i=i.check(Ir.ulid()):a==="xid"?i=i.check(Ir.xid()):a==="ksuid"&&(i=i.check(Ir.ksuid()))}typeof e.minLength=="number"&&(i=i.min(e.minLength)),typeof e.maxLength=="number"&&(i=i.max(e.maxLength)),e.pattern&&(i=i.regex(new RegExp(e.pattern))),n=i;break}case"number":case"integer":{let i=r==="integer"?Ir.number().int():Ir.number();typeof e.minimum=="number"&&(i=i.min(e.minimum)),typeof e.maximum=="number"&&(i=i.max(e.maximum)),typeof e.exclusiveMinimum=="number"?i=i.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(i=i.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?i=i.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(i=i.lt(e.maximum)),typeof e.multipleOf=="number"&&(i=i.multipleOf(e.multipleOf)),n=i;break}case"boolean":{n=Ir.boolean();break}case"null":{n=Ir.null();break}case"object":{const i={},a=e.properties||{},s=new Set(e.required||[]);for(const[c,u]of Object.entries(a)){const d=Vl(u,t);i[c]=s.has(c)?d:d.optional()}if(e.propertyNames){const c=Vl(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?Vl(e.additionalProperties,t):Ir.any();if(Object.keys(i).length===0){n=Ir.record(c,u);break}const d=Ir.object(i).passthrough(),f=Ir.looseRecord(c,u);n=Ir.intersection(d,f);break}if(e.patternProperties){const c=e.patternProperties,u=Object.keys(c),d=[];for(const m of u){const g=Vl(c[m],t),A=Ir.string().regex(new RegExp(m));d.push(Ir.looseRecord(A,g))}const f=[];if(Object.keys(i).length>0&&f.push(Ir.object(i).passthrough()),f.push(...d),f.length===0)n=Ir.object({}).passthrough();else if(f.length===1)n=f[0];else{let m=Ir.intersection(f[0],f[1]);for(let g=2;gVl(c,t)),l=a&&typeof a=="object"&&!Array.isArray(a)?Vl(a,t):void 0;l?n=Ir.tuple(s).rest(l):n=Ir.tuple(s),typeof e.minItems=="number"&&(n=n.check(Ir.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Ir.maxLength(e.maxItems)))}else if(Array.isArray(a)){const s=a.map(c=>Vl(c,t)),l=e.additionalItems&&typeof e.additionalItems=="object"?Vl(e.additionalItems,t):void 0;l?n=Ir.tuple(s).rest(l):n=Ir.tuple(s),typeof e.minItems=="number"&&(n=n.check(Ir.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Ir.maxLength(e.maxItems)))}else if(a!==void 0){const s=Vl(a,t);let l=Ir.array(s);typeof e.minItems=="number"&&(l=l.min(e.minItems)),typeof e.maxItems=="number"&&(l=l.max(e.maxItems)),n=l}else n=Ir.array(Ir.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(n=n.describe(e.description)),e.default!==void 0&&(n=n.default(e.default)),n}function Vl(e,t){if(typeof e=="boolean")return e?Ir.any():Ir.never();let r=Cle(e,t);const n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){const i=e.anyOf.map(s=>Vl(s,t)),a=Ir.union(i);r=n?Ir.intersection(r,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){const i=e.oneOf.map(s=>Vl(s,t)),a=Ir.xor(i);r=n?Ir.intersection(r,a):a}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:Ir.any();else{let i=n?r:Vl(e.allOf[0],t);const a=n?0:1;for(let s=a;s0}const pje=py([yc(),qc(),MS(),LS()]),gje=py([pje,zS(yc(),Y2()),Cg(Y2())]),Aje=SO(e=>e instanceof Buffer);function Ile(e,t){const r=hje,n={};let i;return mje(e)&&(i=e.enumValues.length?r.enum(e.enumValues):r.string()),i||(Xs(e,["PgGeometry","PgPointTuple"])?i=r.tuple([r.number(),r.number()]):Xs(e,["PgGeometryObject","PgPointObject"])?i=r.object({x:r.number(),y:r.number()}):Xs(e,["PgHalfVector","PgVector"])?(i=r.array(r.number()),i=e.dimensions?i.length(e.dimensions):i):Xs(e,["PgLine"])?i=r.tuple([r.number(),r.number(),r.number()]):Xs(e,["PgLineABC"])?i=r.object({a:r.number(),b:r.number(),c:r.number()}):Xs(e,["PgArray"])?(i=r.array(Ile(e.baseColumn)),i=e.size?i.length(e.size):i):e.dataType==="array"?i=r.array(r.any()):e.dataType==="number"?i=vje(e,r,n):e.dataType==="bigint"?i=xje(e,r,n):e.dataType==="boolean"?i=n===!0||n.boolean?r.coerce.boolean():r.boolean():e.dataType==="date"?i=n===!0||n.date?r.coerce.date():r.date():e.dataType==="string"?i=yje(e,r,n):e.dataType==="json"?i=gje:e.dataType==="custom"?i=r.any():e.dataType==="buffer"&&(i=Aje)),i||(i=r.any()),i}function vje(e,t,r){let n=e.getSQLType().includes("unsigned"),i,a,s=!1;Xs(e,["MySqlTinyInt","SingleStoreTinyInt"])?(i=n?0:As.INT8_MIN,a=n?As.INT8_UNSIGNED_MAX:As.INT8_MAX,s=!0):Xs(e,["PgSmallInt","PgSmallSerial","MySqlSmallInt","SingleStoreSmallInt"])?(i=n?0:As.INT16_MIN,a=n?As.INT16_UNSIGNED_MAX:As.INT16_MAX,s=!0):Xs(e,["PgReal","MySqlFloat","MySqlMediumInt","SingleStoreMediumInt","SingleStoreFloat"])?(i=n?0:As.INT24_MIN,a=n?As.INT24_UNSIGNED_MAX:As.INT24_MAX,s=Xs(e,["MySqlMediumInt","SingleStoreMediumInt"])):Xs(e,["PgInteger","PgSerial","MySqlInt","SingleStoreInt"])?(i=n?0:As.INT32_MIN,a=n?As.INT32_UNSIGNED_MAX:As.INT32_MAX,s=!0):Xs(e,["PgDoublePrecision","MySqlReal","MySqlDouble","SingleStoreReal","SingleStoreDouble","SQLiteReal"])?(i=n?0:As.INT48_MIN,a=n?As.INT48_UNSIGNED_MAX:As.INT48_MAX):Xs(e,["PgBigInt53","PgBigSerial53","MySqlBigInt53","MySqlSerial","SingleStoreBigInt53","SingleStoreSerial","SQLiteInteger"])?(n=n||Xs(e,["MySqlSerial","SingleStoreSerial"]),i=n?0:Number.MIN_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER,s=!0):Xs(e,["MySqlYear","SingleStoreYear"])?(i=1901,a=2155,s=!0):(i=Number.MIN_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER);let l=r===!0||r?.number?s?t.coerce.number():t.coerce.number().int():s?t.int():t.number();return l=l.gte(i).lte(a),l}function xje(e,t,r){const n=e.getSQLType().includes("unsigned"),i=n?0n:As.INT64_MIN,a=n?As.INT64_UNSIGNED_MAX:As.INT64_MAX;return(r===!0||r?.bigint?t.coerce.bigint():t.bigint()).gte(i).lte(a)}function yje(e,t,r){if(Xs(e,["PgUUID"]))return t.uuid();let n,i,a=!1;Xs(e,["PgVarchar","SQLiteText"])?n=e.length:Xs(e,["MySqlVarChar","SingleStoreVarChar"])?n=e.length??As.INT16_UNSIGNED_MAX:Xs(e,["MySqlText","SingleStoreText"])&&(e.textType==="longtext"?n=As.INT32_UNSIGNED_MAX:e.textType==="mediumtext"?n=As.INT24_UNSIGNED_MAX:e.textType==="text"?n=As.INT16_UNSIGNED_MAX:n=As.INT8_UNSIGNED_MAX),Xs(e,["PgChar","MySqlChar","SingleStoreChar"])&&(n=e.length,a=!0),Xs(e,["PgBinaryVector"])&&(i=/^[01]+$/,n=e.dimensions);let s=r===!0||r?.string?t.coerce.string():t.string();return s=i?s.regex(i):s,n&&a?s.length(n):n?s.max(n):s}function Sle(e){return Sre(e)?MSe(e):QSe(e)}function Ble(e,t,r,n){const i={};for(const[a,s]of Object.entries(e)){if(!Xo(s,G2)&&!Xo(s,Qs)&&!Xo(s,Qs.Aliased)&&typeof s=="object"){const f=Sre(s)||FSe(s)?Sle(s):s;i[a]=Ble(f,t[a]??{},r);continue}const l=t[a];if(l!==void 0&&typeof l!="function"){i[a]=l;continue}const c=Xo(s,G2)?s:void 0,u=c?Ile(c):Y2(),d=typeof l=="function"?l(u):u;r.never(c)||(i[a]=d,c&&(r.nullable(c)&&(i[a]=i[a].nullable()),r.optional(c)&&(i[a]=i[a].optional())))}return Y7(i)}const bje={never:e=>e?.generated?.type==="always"||e?.generatedIdentity?.type==="always",optional:e=>!e.notNull||e.notNull&&e.hasDefault,nullable:e=>!e.notNull},ws=(e,t)=>{const r=Sle(e);return Ble(r,t??{},bje)},Z8=["admin","gestionnaire_parc","gestionnaire_mobile","secretaire","comptable","atelier","chauffeur","apprenti"],Cw=La("users",{id:hy("id").primaryKey().default(q2`gen_random_uuid()`),username:Dt("username").notNull().unique(),password:Dt("password").notNull(),role:Dt("role").notNull().default("apprenti")});ws(Cw).pick({username:!0,password:!0,role:!0}).extend({role:Sc(Z8).optional()});const wje=["actif","maintenance","hors_service"],kO=["plateau","citerne","benne","frigorifique","autre"],_O=["chauffeur","apprenti"],Nle=["scheduled","in_transit","completed","cancelled"],Eje=["planned","in_progress","completed","cancelled"],VS=["carburant","peage","douane","reparation","consommables","main_oeuvre","autre"],jO=["vidange","filtres","pneus","liquide_frein","adblue","autre"],Cje=["pending","in_progress","resolved"],Ig=La("vehicles",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),immatriculation:Dt("immatriculation").notNull().unique(),nom:Dt("nom"),couleur:Dt("couleur"),marque:Dt("marque"),modele:Dt("modele"),annee:Qr("annee"),photoUrl:Dt("photo_url"),plaquePhotoUrl:Dt("plaque_photo_url"),photoCloudinaryPublicId:Dt("photo_cloudinary_public_id"),plaquePhotoCloudinaryPublicId:Dt("plaque_photo_cloudinary_public_id"),status:Dt("status").notNull().default("actif"),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()}),Iw=La("trailers",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),numeroChassis:Dt("numero_chassis").notNull().unique(),nom:Dt("nom"),couleur:Dt("couleur"),type:Dt("type").notNull(),capacite:Sa("capacite"),photoUrl:Dt("photo_url"),photoCloudinaryPublicId:Dt("photo_cloudinary_public_id"),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()}),kle=La("vehicle_trailer_couplings",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),vehicleId:Qr("vehicle_id").notNull().references(()=>Ig.id,{onDelete:"cascade"}),trailerId:Qr("trailer_id").references(()=>Iw.id,{onDelete:"set null"}),chauffeurId:Qr("chauffeur_id").references(()=>gy.id,{onDelete:"set null"}),startAt:Gr("start_at").notNull().defaultNow(),endAt:Gr("end_at"),active:Ix("active").notNull().default(!0),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()});La("coupling_apprentis",{couplingId:Qr("coupling_id").notNull().references(()=>kle.id,{onDelete:"cascade"}),apprentiId:Qr("apprenti_id").notNull().references(()=>gy.id,{onDelete:"cascade"}),createdAt:Gr("created_at").notNull().defaultNow()});const gy=La("crew_members",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),nom:Dt("nom").notNull(),prenom:Dt("prenom").notNull(),role:Dt("role").notNull(),telephone:Dt("telephone"),photoUrl:Dt("photo_url"),photoCloudinaryPublicId:Dt("photo_cloudinary_public_id"),documents:fy("documents"),userId:hy("user_id").references(()=>Cw.id,{onDelete:"set null"}),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()}),eb=La("locations",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),name:Dt("name").notNull(),type:Dt("type").notNull(),country:Dt("country"),latitude:Sa("latitude"),longitude:Sa("longitude"),imageUrl:Dt("image_url"),isActive:Ix("is_active").notNull().default(!0),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()}),_le=La("mission_types",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),name:Dt("name").notNull(),code:Dt("code").notNull().unique(),loadingType:Dt("loading_type").notNull(),defaultClientName:Dt("default_client_name"),defaultLoadingLocationId:Qr("default_loading_location_id").references(()=>eb.id,{onDelete:"set null"}),defaultUnloadingLocationId:Qr("default_unloading_location_id").references(()=>eb.id,{onDelete:"set null"}),expectedToursDefault:Qr("expected_tours_default"),isActive:Ix("is_active").notNull().default(!0),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()}),Sw=La("missions",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),code:Dt("code").notNull().unique(),title:Dt("title").notNull(),description:Dt("description"),missionTypeId:Qr("mission_type_id").references(()=>_le.id,{onDelete:"set null"}),vehicleId:Qr("vehicle_id").notNull().references(()=>Ig.id,{onDelete:"cascade"}),trailerId:Qr("trailer_id").references(()=>Iw.id,{onDelete:"set null"}),mainDriverId:Qr("main_driver_id").references(()=>gy.id,{onDelete:"set null"}),clientName:Dt("client_name").notNull(),clientReference:Dt("client_reference"),loadingSite:Dt("loading_site").notNull(),unloadingSite:Dt("unloading_site").notNull(),loadingLocationId:Qr("loading_location_id").references(()=>eb.id,{onDelete:"set null"}),unloadingLocationId:Qr("unloading_location_id").references(()=>eb.id,{onDelete:"set null"}),loadingType:Dt("loading_type").notNull(),loadingOrderNumber:Dt("loading_order_number").notNull(),loadingOrderDate:c1("loading_order_date").notNull(),loadingBonImageUrl:Dt("loading_bon_image_url"),loadingBonImageCloudinaryPublicId:Dt("loading_bon_image_cloudinary_public_id"),expectedTours:Qr("expected_tours").default(1),status:Dt("status").notNull().default("planned"),startAt:Gr("start_at"),endAt:Gr("end_at"),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()}),Ije=La("mission_crew",{missionId:Qr("mission_id").notNull().references(()=>Sw.id,{onDelete:"cascade"}),crewMemberId:Qr("crew_member_id").notNull().references(()=>gy.id,{onDelete:"cascade"}),createdAt:Gr("created_at").notNull().defaultNow()}),Bw=La("trips",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),missionId:Qr("mission_id").references(()=>Sw.id,{onDelete:"set null"}),vehicleId:Qr("vehicle_id").notNull().references(()=>Ig.id,{onDelete:"cascade"}),trailerId:Qr("trailer_id").references(()=>Iw.id,{onDelete:"set null"}),origine:Dt("origine").notNull(),destination:Dt("destination").notNull(),dateDepart:Gr("date_depart").notNull(),dateArrivee:Gr("date_arrivee"),status:Dt("status").notNull().default("scheduled"),typeChargement:Dt("type_chargement"),poidsChargement:Sa("poids_chargement"),distance:Sa("distance"),contratClientId:Dt("contrat_client_id"),loadingCompletedAt:Gr("loading_completed_at"),unloadingCompletedAt:Gr("unloading_completed_at"),departureOdometerKm:Qr("departure_odometer_km"),arrivalOdometerKm:Qr("arrival_odometer_km"),fuelFillAmountL:Sa("fuel_fill_amount_l"),fuelFillCostFcfa:Qr("fuel_fill_cost_fcfa"),fuelReceiptUrl:Dt("fuel_receipt_url"),fuelReceiptCloudinaryPublicId:Dt("fuel_receipt_cloudinary_public_id"),loadingWeighingTicketUrl:Dt("loading_weighing_ticket_url"),loadingWeighingTicketCloudinaryPublicId:Dt("loading_weighing_ticket_cloudinary_public_id"),unloadingWeighingTicketUrl:Dt("unloading_weighing_ticket_url"),unloadingWeighingTicketCloudinaryPublicId:Dt("unloading_weighing_ticket_cloudinary_public_id"),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()}),Sje=La("trip_crew",{tripId:Qr("trip_id").notNull().references(()=>Bw.id,{onDelete:"cascade"}),crewMemberId:Qr("crew_member_id").notNull().references(()=>gy.id,{onDelete:"cascade"})}),Bje=La("trip_expenses",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),tripId:Qr("trip_id").notNull().references(()=>Bw.id,{onDelete:"cascade"}),categorie:Dt("categorie").notNull(),montant:Sa("montant").notNull(),date:c1("date").notNull(),description:Dt("description"),justificatifUrl:Dt("justificatif_url"),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()}),Nje=La("trip_revenues",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),tripId:Qr("trip_id").notNull().references(()=>Bw.id,{onDelete:"cascade"}),montantPrevu:Sa("montant_prevu"),montantRecu:Sa("montant_recu"),origineContrat:Dt("origine_contrat"),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()}),kje=La("mission_revenues",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),missionId:Qr("mission_id").notNull().references(()=>Sw.id,{onDelete:"cascade"}),montantPrevu:Sa("montant_prevu"),montantRecu:Sa("montant_recu"),origineContrat:Dt("origine_contrat"),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()}),_je=La("mission_expenses",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),missionId:Qr("mission_id").notNull().references(()=>Sw.id,{onDelete:"cascade"}),categorie:Dt("categorie").notNull(),montant:Sa("montant").notNull(),date:c1("date").notNull(),description:Dt("description"),justificatifUrl:Dt("justificatif_url"),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()}),jje=La("maintenances",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),vehicleId:Qr("vehicle_id").references(()=>Ig.id,{onDelete:"cascade"}),trailerId:Qr("trailer_id").references(()=>Iw.id,{onDelete:"cascade"}),type:Dt("type").notNull(),datePrevue:c1("date_prevue"),kilometragePrevu:Qr("kilometrage_prevu"),dateEffectuee:c1("date_effectuee"),kilometrageEffectue:Qr("kilometrage_effectue"),cout:Sa("cout"),notes:Dt("notes"),status:Dt("status").notNull().default("planned"),photoUrl:Dt("photo_url"),photoCloudinaryPublicId:Dt("photo_cloudinary_public_id"),audioUrl:Dt("audio_url"),audioCloudinaryPublicId:Dt("audio_cloudinary_public_id"),replacedParts:fy("replaced_parts"),laborCost:Sa("labor_cost"),totalCost:Sa("total_cost"),justificatifUrl:Dt("justificatif_url"),justificatifCloudinaryPublicId:Dt("justificatif_cloudinary_public_id"),treatedBy:hy("treated_by").references(()=>Cw.id,{onDelete:"set null"}),treatedAt:Gr("treated_at"),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()}),Dje=La("breakdowns",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),vehicleId:Qr("vehicle_id").notNull().references(()=>Ig.id,{onDelete:"cascade"}),type:Dt("type").notNull(),date:c1("date").notNull(),lieu:Dt("lieu"),description:Dt("description"),audioUrl:Dt("audio_url"),audioCloudinaryPublicId:Dt("audio_cloudinary_public_id"),photoUrl:Dt("photo_url"),photoCloudinaryPublicId:Dt("photo_cloudinary_public_id"),videoUrl:Dt("video_url"),videoCloudinaryPublicId:Dt("video_cloudinary_public_id"),actionReparative:Dt("action_reparative"),cout:Sa("cout"),status:Dt("status").notNull().default("pending"),responseAudioUrl:Dt("response_audio_url"),responseCreatedAt:Gr("response_created_at"),responseAuthorId:hy("response_author_id").references(()=>Cw.id,{onDelete:"set null"}),replacedParts:fy("replaced_parts"),laborCost:Sa("labor_cost"),totalRepairCost:Sa("total_repair_cost"),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()});ws(Ig).omit({id:!0,createdAt:!0,updatedAt:!0}).extend({status:Sc(wje).optional()});ws(Iw).omit({id:!0,createdAt:!0,updatedAt:!0}).extend({type:Sc(kO),nom:yc().optional(),couleur:yc().optional()});ws(kle).omit({id:!0,createdAt:!0,updatedAt:!0,active:!0}).extend({startAt:Tl(),endAt:Tl().optional(),apprentiIds:Cg(qc()).optional()});ws(gy).omit({id:!0,createdAt:!0,updatedAt:!0}).extend({role:Sc(_O),userId:yc().nullable().optional()});ws(Bw).omit({id:!0,createdAt:!0,updatedAt:!0,status:!0}).extend({dateDepart:Tl(),dateArrivee:Tl().optional(),status:Sc(Nle).optional(),missionId:qc().min(1,"Chaque voyage doit être rattaché à une mission. Créez d'abord une mission, puis ajoutez des voyages à cette mission."),loadingCompletedAt:Tl().optional().nullable(),unloadingCompletedAt:Tl().optional().nullable(),departureOdometerKm:qc().int().positive().optional().nullable(),arrivalOdometerKm:qc().int().positive().optional().nullable(),fuelFillAmountL:qc().positive().optional().nullable(),fuelFillCostFcfa:qc().int().positive().optional().nullable(),fuelReceiptUrl:yc().url().optional().nullable()});ws(Sje);ws(Bje).omit({id:!0,createdAt:!0,updatedAt:!0}).extend({date:Tl(),categorie:Sc(VS)});ws(Nje).omit({id:!0,createdAt:!0,updatedAt:!0});ws(kje).omit({id:!0,createdAt:!0,updatedAt:!0});ws(_je).omit({id:!0,createdAt:!0,updatedAt:!0}).extend({date:Tl(),categorie:Sc(VS)});ws(jje).omit({id:!0,createdAt:!0,updatedAt:!0}).extend({datePrevue:Tl().optional(),dateEffectuee:Tl().optional(),type:Sc(jO),vehicleId:qc().int().positive().optional().nullable(),trailerId:qc().int().positive().optional().nullable()}).refine(e=>e.vehicleId!==null&&e.vehicleId!==void 0||e.trailerId!==null&&e.trailerId!==void 0,{message:"Un véhicule ou une remorque doit être sélectionné",path:["vehicleId"]});ws(Dje).omit({id:!0,createdAt:!0,updatedAt:!0}).extend({date:Tl(),status:Sc(Cje).optional(),responseAudioUrl:yc().url().optional().nullable(),responseCreatedAt:Tl().optional().nullable(),responseAuthorId:yc().optional().nullable()});ws(Sw).omit({id:!0,createdAt:!0,updatedAt:!0,code:!0}).extend({status:Sc(Eje).optional(),loadingOrderDate:Tl(),startAt:Tl().optional(),endAt:Tl().optional(),additionalCrewIds:Cg(qc()).optional(),expectedTours:qc().int().min(1).default(1).optional()});ws(eb).omit({id:!0,createdAt:!0,updatedAt:!0});ws(_le).omit({id:!0,createdAt:!0,updatedAt:!0});ws(Ije).omit({createdAt:!0});const Tje=La("organization_settings",{id:Qr("id").primaryKey().default(1),companyName:Dt("company_name").notNull(),legalName:Dt("legal_name"),addressLine:Dt("address_line"),city:Dt("city"),country:Dt("country"),phone:Dt("phone"),email:Dt("email"),website:Dt("website"),taxId:Dt("tax_id"),logoUrl:Dt("logo_url"),logoCloudinaryPublicId:Dt("logo_cloudinary_public_id"),cloudinaryCloudName:Dt("cloudinary_cloud_name"),cloudinaryApiKey:Dt("cloudinary_api_key"),cloudinaryApiSecret:Dt("cloudinary_api_secret"),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()});La("sessions",{id:Dt("id").primaryKey(),userId:hy("user_id").notNull().references(()=>Cw.id,{onDelete:"cascade"}),username:Dt("username").notNull(),role:Dt("role").notNull(),expiresAt:Gr("expires_at").notNull(),createdAt:Gr("created_at").notNull().defaultNow()});const Pje=ws(Tje,{email:yc().email("Format d'email invalide").optional().or(sO("")),companyName:yc().min(1,"La dénomination commerciale est obligatoire")}).pick({companyName:!0,legalName:!0,addressLine:!0,city:!0,country:!0,phone:!0,email:!0,website:!0,taxId:!0,logoUrl:!0,cloudinaryCloudName:!0,cloudinaryApiKey:!0,cloudinaryApiSecret:!0});Pje.partial().extend({companyName:yc().min(1,"La dénomination commerciale est obligatoire").optional()});const Oje=["uploaded","parsed","failed"],jle=La("tracksolid_imports",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),fileName:Dt("file_name").notNull(),fileHash:Dt("file_hash").notNull().unique(),periodStart:Gr("period_start"),periodEnd:Gr("period_end"),status:Dt("status").notNull().default("uploaded"),errorMessage:Dt("error_message"),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()}),Dle=La("tracksolid_trips",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),importId:Qr("import_id").notNull().references(()=>jle.id,{onDelete:"cascade"}),vehicleExternalName:Dt("vehicle_external_name").notNull(),vehiclePlateGuess:Dt("vehicle_plate_guess"),startAt:Gr("start_at"),endAt:Gr("end_at"),startLocation:Dt("start_location"),endLocation:Dt("end_location"),distanceKm:Sa("distance_km"),durationMinutes:Qr("duration_minutes"),maxSpeedKmh:Sa("max_speed_kmh"),avgSpeedKmh:Sa("avg_speed_kmh"),raw:fy("raw"),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()}),Rje=La("tracksolid_vehicle_map",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),externalName:Dt("external_name").notNull().unique(),vehicleId:Qr("vehicle_id").references(()=>Ig.id,{onDelete:"set null"}),createdAt:Gr("created_at").notNull().defaultNow(),updatedAt:Gr("updated_at").notNull().defaultNow()}),Fje=La("tracksolid_trip_links",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),tracksolidTripId:Qr("tracksolid_trip_id").notNull().references(()=>Dle.id,{onDelete:"cascade"}).unique(),tripId:Qr("trip_id").notNull().references(()=>Bw.id,{onDelete:"cascade"}).unique(),matchConfidence:Qr("match_confidence").notNull(),matchReason:Dt("match_reason"),linkedBy:Dt("linked_by").notNull().default("manual"),linkedAt:Gr("linked_at").notNull().defaultNow(),createdAt:Gr("created_at").notNull().defaultNow()});ws(jle).omit({id:!0,createdAt:!0,updatedAt:!0}).extend({status:Sc(Oje).optional()});ws(Dle).omit({id:!0,createdAt:!0,updatedAt:!0});ws(Rje).omit({id:!0,createdAt:!0,updatedAt:!0});ws(Fje).omit({id:!0,createdAt:!0});const Mje=La("track_points",{id:Qr("id").primaryKey().generatedAlwaysAsIdentity(),vehicleId:Qr("vehicle_id").notNull().references(()=>Ig.id,{onDelete:"cascade"}),ts:Gr("ts",{withTimezone:!0}).notNull(),lat:Sa("lat").notNull(),lon:Sa("lon").notNull(),speedKmh:Sa("speed_kmh"),engineOn:Ix("engine_on"),moving:Ix("moving"),mileageKm:Sa("mileage_km"),raw:fy("raw"),sourceFile:Dt("source_file").notNull(),importedAt:Gr("imported_at",{withTimezone:!0}).notNull().defaultNow()});ws(Mje).omit({id:!0,importedAt:!0}).extend({ts:Tl()});const Qje={scheduled:"Programmé",in_transit:"En cours",completed:"Terminé",cancelled:"Annulé"};function Lje({trip:e,vehicles:t=[],trailers:r=[],crewMembers:n=[],open:i,onOpenChange:a,onUpdate:s}){const[l,c]=w.useState({vehicleId:"",trailerId:"",crewMemberIds:[],origine:"",destination:"",dateDepart:"",dateArrivee:"",status:"scheduled"}),{data:u=[]}=Ar({queryKey:e?["/api/trips",e.id.toString(),"crew"]:[],queryFn:HA({on401:"throw"}),enabled:!!e&&i});w.useEffect(()=>{if(e&&i){const m=g=>{if(!g)return"";const A=new Date(g),v=A.getFullYear(),b=String(A.getMonth()+1).padStart(2,"0"),E=String(A.getDate()).padStart(2,"0"),I=String(A.getHours()).padStart(2,"0"),S=String(A.getMinutes()).padStart(2,"0");return`${v}-${b}-${E}T${I}:${S}`};c({vehicleId:e.vehicleId.toString(),trailerId:e.trailerId?.toString()||"",crewMemberIds:u.map(g=>g.id),origine:e.origine,destination:e.destination,dateDepart:m(e.dateDepart),dateArrivee:m(e.dateArrivee),status:e.status})}},[e,i,u]);const d=async m=>{if(m.preventDefault(),!e)return;const g={vehicleId:parseInt(l.vehicleId),trailerId:l.trailerId&&l.trailerId!=="none"?parseInt(l.trailerId):void 0,origine:l.origine,destination:l.destination,dateDepart:new Date(l.dateDepart),dateArrivee:l.dateArrivee?new Date(l.dateArrivee):void 0,status:l.status};s?.(e.id,{trip:g,crewMemberIds:l.crewMemberIds.length>0?l.crewMemberIds:void 0}),a(!1)},f=m=>{c(g=>({...g,crewMemberIds:g.crewMemberIds.includes(m)?g.crewMemberIds.filter(A=>A!==m):[...g.crewMemberIds,m]}))};return e?o.jsx(ci,{open:i,onOpenChange:a,children:o.jsxs(Zn,{className:"sm:max-w-[500px] max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Modifier le voyage"}),o.jsxs(Ci,{children:["Modifiez les détails du voyage ",e.origine," → ",e.destination,"."]})]}),o.jsxs("form",{onSubmit:d,children:[o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"vehicle",children:["Véhicule ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsxs(ui,{value:l.vehicleId,onValueChange:m=>c({...l,vehicleId:m}),required:!0,children:[o.jsx(ei,{id:"vehicle","data-testid":"select-vehicle",className:"h-12",children:o.jsx(di,{placeholder:"Sélectionner un véhicule"})}),o.jsx(ti,{children:t.map(m=>o.jsx(Tr,{value:m.id.toString(),children:m.immatriculation},m.id))})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"origine",children:["Départ ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"origine",placeholder:"Ouagadougou",value:l.origine,onChange:m=>c({...l,origine:m.target.value}),required:!0,className:"h-12","data-testid":"input-origin"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"destination",children:["Destination ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"destination",placeholder:"Lomé",value:l.destination,onChange:m=>c({...l,destination:m.target.value}),required:!0,className:"h-12","data-testid":"input-destination"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"trailer",children:"Remorque"}),o.jsxs(ui,{value:l.trailerId||"none",onValueChange:m=>c({...l,trailerId:m==="none"?"":m}),children:[o.jsx(ei,{id:"trailer","data-testid":"select-trailer",className:"h-12",children:o.jsx(di,{placeholder:"Aucune remorque"})}),o.jsxs(ti,{children:[o.jsx(Tr,{value:"none",children:"Aucune remorque"}),r.map(m=>o.jsxs(Tr,{value:m.id.toString(),children:[m.numeroChassis," (",m.type,")"]},m.id))]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{children:"Chauffeurs"}),o.jsx("div",{className:"border rounded-md p-3 max-h-48 overflow-y-auto space-y-2",children:n.length===0?o.jsx("p",{className:"text-sm text-muted-foreground",children:"Aucun chauffeur disponible"}):n.map(m=>o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(ew,{id:`crew-${m.id}`,checked:l.crewMemberIds.includes(m.id),onCheckedChange:()=>f(m.id),"data-testid":`checkbox-crew-${m.id}`}),o.jsxs(Je,{htmlFor:`crew-${m.id}`,className:"text-sm font-normal cursor-pointer flex-1",children:[m.prenom," ",m.nom," (",m.role==="chauffeur"?"Chauffeur":"Apprenti",")"]})]},m.id))})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"dateDepart",children:["Départ ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"dateDepart",type:"datetime-local",value:l.dateDepart,onChange:m=>c({...l,dateDepart:m.target.value}),required:!0,className:"h-12","data-testid":"input-departure"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"dateArrivee",children:"Arrivée prévue"}),o.jsx(wt,{id:"dateArrivee",type:"datetime-local",value:l.dateArrivee,onChange:m=>c({...l,dateArrivee:m.target.value}),className:"h-12","data-testid":"input-arrival"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"status",children:"Statut"}),o.jsxs(ui,{value:l.status,onValueChange:m=>c({...l,status:m}),children:[o.jsx(ei,{id:"status","data-testid":"select-status",className:"h-12",children:o.jsx(di,{placeholder:"Sélectionner un statut"})}),o.jsx(ti,{children:Nle.map(m=>o.jsx(Tr,{value:m,children:Qje[m]||m},m))})]})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>a(!1),"data-testid":"button-cancel",className:"w-full sm:w-auto h-12",children:"Annuler"}),o.jsx(Pe,{type:"submit","data-testid":"button-submit",className:"w-full sm:w-auto h-12",children:"Enregistrer"})]})]})]})}):null}function Uje(){const[e,t]=w.useState(""),[r,n]=w.useState("all"),[i,a]=w.useState(null),[s,l]=w.useState(!1),[c,u]=w.useState(null),{toast:d}=sn(),{data:f=[],isLoading:m}=Ar({queryKey:["/api/vehicles"]}),{data:g=[]}=Ar({queryKey:["/api/trailers"]}),{data:A=[]}=Ar({queryKey:["/api/crew-members"]}),{data:v=[],isLoading:b}=Ar({queryKey:["/api/trips"]}),{data:E=[],isLoading:I}=Ar({queryKey:["/api/breakdowns"],queryFn:()=>J3()}),S=w.useMemo(()=>new Set(E.map(Z=>Z.vehicleId)),[E]),_=mJ({queries:v.map(Z=>({queryKey:["/api/trips",Z.id.toString(),"crew"],queryFn:HA({on401:"throw"}),enabled:v.length>0}))}),B=w.useMemo(()=>{const Z=new Map;return _.forEach((K,q)=>{K.data&&v[q]&&Z.set(v[q].id,K.data)}),Z},[_,v]),T=qr({mutationFn:async({id:Z,data:K})=>{await fr(`/api/trips/${Z}`,{method:"PATCH",body:K.trip}),K.crewMemberIds!==void 0&&await fr(`/api/trips/${Z}/crew`,{method:"POST",body:{crewMemberIds:K.crewMemberIds||[]}})},onSuccess:()=>{br.invalidateQueries({queryKey:["/api/trips"]}),d({title:"Succès",description:"Le voyage a été modifié avec succès"}),l(!1),a(null)},onError:Z=>{d({variant:"destructive",title:"Erreur",description:Z.message||"Impossible de modifier le voyage"})}}),P=qr({mutationFn:async Z=>await fr(`/api/trips/${Z}`,{method:"DELETE"}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/trips"]}),d({title:"Succès",description:"Le voyage a été supprimé avec succès"}),u(null)},onError:Z=>{d({variant:"destructive",title:"Erreur",description:Z.message||"Impossible de supprimer le voyage"})}}),z=w.useMemo(()=>v.map(Z=>{const K=f.find(ae=>ae.id===Z.vehicleId),Y=(B.get(Z.id)||[]).find(ae=>ae.role==="chauffeur"),ne=Y,ge=K?S.has(K.id):!1;return{...Z,vehicleRegistration:K?.immatriculation||"",vehiclePhotoUrl:K?.photoUrl||null,driverPhotoUrl:ne?.photoUrl||null,driverName:Y?`${Y.prenom} ${Y.nom}`:void 0,hasBreakdown:ge}}),[v,f,B,S]).filter(Z=>{const K=Z.vehicleRegistration.toLowerCase().includes(e.toLowerCase())||Z.origine.toLowerCase().includes(e.toLowerCase())||Z.destination.toLowerCase().includes(e.toLowerCase()),q=r==="all"||Z.status===r;return K&&q}),L=Z=>{const K=v.find(q=>q.id===Z);K&&(a(K),l(!0))},W=(Z,K)=>{T.mutate({id:Z,data:K})},R=Z=>{u(Z)},$=()=>{c&&P.mutate(c)},X=m||b||I;return o.jsxs("div",{className:"space-y-4 md:space-y-6 pb-20 md:pb-0",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl md:text-2xl font-semibold","data-testid":"text-page-title",children:"Voyages"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Suivez et gérez vos voyages"})]}),o.jsx(ny,{href:"/trajets/new",children:o.jsxs(Pe,{"data-testid":"button-add-trip",className:"w-full md:w-auto",children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Ajouter un voyage"]})})]}),o.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center gap-3",children:[o.jsxs("div",{className:"relative flex-1",children:[o.jsx(U0,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(wt,{placeholder:"Rechercher...",value:e,onChange:Z=>t(Z.target.value),className:"pl-9 h-12","data-testid":"input-search"})]}),o.jsx(Pe,{size:"icon",variant:"outline",className:"h-12 w-12 flex-shrink-0 hidden md:flex","data-testid":"button-view-grid",children:o.jsx(rX,{className:"h-5 w-5"})})]}),X?o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):o.jsxs(o.Fragment,{children:[o.jsxs(vg,{value:r,onValueChange:n,className:"space-y-4",children:[o.jsxs(Bm,{className:"w-full grid grid-cols-4",children:[o.jsx(Ii,{value:"all","data-testid":"filter-all",className:"text-xs md:text-sm",children:"Tous"}),o.jsx(Ii,{value:"scheduled","data-testid":"filter-scheduled",className:"text-xs md:text-sm",children:"Programmé"}),o.jsx(Ii,{value:"in_transit","data-testid":"filter-in-transit",className:"text-xs md:text-sm",children:"En cours"}),o.jsx(Ii,{value:"completed","data-testid":"filter-completed",className:"text-xs md:text-sm",children:"Terminé"})]}),o.jsx(Ms,{value:r,className:"mt-0",children:o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:z.map(Z=>o.jsx(OP,{...Z,dateArrivee:Z.dateArrivee??void 0,vehiclePhotoUrl:Z.vehiclePhotoUrl,driverPhotoUrl:Z.driverPhotoUrl,driverName:Z.driverName,onEdit:L,onDelete:R},Z.id))})})]}),z.length===0&&o.jsx("div",{className:"text-center py-12",children:o.jsx("p",{className:"text-muted-foreground",children:"Aucun voyage trouvé"})})]}),o.jsx(wg,{onClick:()=>{window.location.href="/trajets/new"},label:"Ajouter un voyage"}),o.jsx(Lje,{trip:i,vehicles:f,trailers:g,crewMembers:A,open:s,onOpenChange:l,onUpdate:W}),o.jsx(pm,{open:c!==null,onOpenChange:()=>u(null),children:o.jsxs(qf,{children:[o.jsxs(Kf,{children:[o.jsx(Yf,{children:"Confirmer la suppression"}),o.jsx(Zf,{children:"Êtes-vous sûr de vouloir supprimer ce voyage ? Cette action est irréversible."})]}),o.jsxs(Vf,{children:[o.jsx(Xf,{children:"Annuler"}),o.jsx(Jf,{onClick:$,children:"Supprimer"})]})]})})]})}async function $je(){return await fr("/api/couplings")}async function zje(e){try{return await fr(`/api/couplings/vehicle/${e}`)}catch(t){if(t instanceof Error&&(t.message.includes("404")||t.message.includes("Not Found")))return null;throw t}}async function Hje(e){return await fr("/api/couplings",{method:"POST",body:e})}async function Wje(e,t){return await fr(`/api/couplings/${e}`,{method:"PATCH",body:t?{endAt:t.toISOString()}:{}})}function Tle(){return Ar({queryKey:["/api/couplings"],queryFn:$je})}function Ple(e){return Ar({queryKey:e?["/api/couplings/vehicle",e.toString()]:[],queryFn:()=>e?zje(e):Promise.resolve(null),enabled:!!e})}function Gje(){const{toast:e}=sn();return qr({mutationFn:t=>Hje(t),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/couplings"]}),br.invalidateQueries({queryKey:["/api/couplings/history"]}),e({title:"Succès",description:"L'attelage a été créé avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible de créer l'attelage"})}})}function qje(){const{toast:e}=sn();return qr({mutationFn:({id:t,endAt:r})=>Wje(t,r),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/couplings"]}),br.invalidateQueries({queryKey:["/api/couplings/history"]}),br.invalidateQueries({queryKey:["/api/couplings"]}),e({title:"Succès",description:"L'attelage a été détaché avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible de détacher l'attelage"})}})}async function DO(e){const t=e?`/api/missions?status=${e}`:"/api/missions";return await fr(t)}async function Ole(e){try{return await fr(`/api/missions/${e}`)}catch(t){if(t instanceof Error&&(t.message.includes("404")||t.message.includes("Not Found")))return null;throw t}}async function Kje(e){return await fr("/api/missions",{method:"POST",body:e})}async function Vje(e,t){return await fr(`/api/missions/${e}/trips/quick-create`,{method:"POST",body:{mode:t}})}async function Yje(e){try{return await fr(`/api/missions/${e}/mission-order`)}catch(t){if(t instanceof Error&&(t.message.includes("404")||t.message.includes("Not Found")))return null;throw t}}function TO(e){return Ar({queryKey:["/api/missions",e],queryFn:()=>DO(e)})}function Rle(e){return Ar({queryKey:["/api/missions",e],queryFn:()=>Ole(e),enabled:!!e})}function Zje(){const{toast:e}=sn();return qr({mutationFn:t=>Kje(t),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/missions"]}),e({title:"Succès",description:"La mission a été créée avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible de créer la mission"})}})}function Jje(){const{toast:e}=sn();return qr({mutationFn:({missionId:t,mode:r})=>Vje(t,r),onSuccess:t=>{br.invalidateQueries({queryKey:["/api/missions"]}),br.invalidateQueries({queryKey:["/api/trips"]}),e({title:"Succès",description:`${t.count} voyage(s) créé(s) avec succès`})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible de créer les voyages"})}})}function Xje(e){return Ar({queryKey:["/api/missions",e,"mission-order"],queryFn:()=>Yje(e),enabled:!!e})}const e8e={plateau:"Plateau",citerne:"Citerne",benne:"Benne",frigorifique:"Frigorifique",autre:"Autre"};function Fle({vehicle:e,trailer:t,isFromCoupling:r=!1}){const n=t?.photoUrl||(t?.type?Gf[t.type]:Gf.autre);return o.jsx(_t,{className:"p-4 bg-muted/30 border-2",children:o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsx("h3",{className:"text-sm font-semibold w-full text-center",children:"Attelage pour ce voyage"}),o.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-4 w-full",children:[o.jsx("div",{className:"flex-1 w-full md:w-auto min-w-0",children:e?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"relative w-full aspect-video overflow-hidden rounded-lg bg-muted border-2 border-border",children:[e.photoUrl?o.jsx("img",{src:hn(e.photoUrl)||void 0,alt:`Véhicule ${e.immatriculation}`,className:"w-full h-full object-cover",onError:i=>{i.target.style.display="none"}}):o.jsx("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"text-4xl mb-2",children:"🚚"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Pas de photo"})]})}),o.jsx("div",{className:"absolute top-2 left-2 z-10",children:o.jsx(ir,{variant:"secondary",className:"font-mono font-semibold text-xs px-2 py-1 bg-background/95 backdrop-blur-sm shadow-md border",children:e.immatriculation})})]}),o.jsxs("div",{className:"mt-2 text-center",children:[o.jsx("p",{className:"text-sm font-semibold truncate",children:e.immatriculation}),(e.marque||e.modele)&&o.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:[e.marque," ",e.modele]})]})]}):o.jsx("div",{className:"w-full aspect-video rounded-lg bg-muted/50 border-2 border-dashed border-muted-foreground/30 flex items-center justify-center",children:o.jsx("p",{className:"text-xs text-muted-foreground text-center px-2",children:"Sélectionnez un véhicule"})})}),o.jsx("div",{className:"flex-shrink-0 flex items-center justify-center",children:o.jsxs("div",{className:"relative flex items-center justify-center",children:[o.jsx("div",{className:"hidden md:block w-16 h-2 bg-primary/40 rounded-full"}),o.jsx("div",{className:"block md:hidden w-2 h-16 bg-primary/40 rounded-full"}),o.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 z-10",children:e&&t?o.jsx(ir,{variant:"default",className:"bg-primary text-primary-foreground px-3 py-1.5 text-xs font-semibold shadow-lg border-2 border-background",children:"🔗 Attelé"}):o.jsx(ir,{variant:"outline",className:"bg-background text-muted-foreground px-3 py-1.5 text-xs font-semibold border-2",children:"—"})})]})}),o.jsx("div",{className:"flex-1 w-full md:w-auto min-w-0",children:t?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"relative w-full aspect-video overflow-hidden rounded-lg bg-muted border-2 border-border",children:[o.jsx("img",{src:hn(n)||void 0,alt:`Remorque ${t.numeroChassis}`,className:"w-full h-full object-cover",onError:i=>{i.target.style.display="none"}}),o.jsx("div",{className:"absolute top-2 left-2 z-10",children:o.jsx(ir,{variant:"secondary",className:"font-mono font-semibold text-xs px-2 py-1 bg-background/95 backdrop-blur-sm shadow-md border",children:t.numeroChassis})})]}),o.jsxs("div",{className:"mt-2 text-center",children:[o.jsx("p",{className:"text-sm font-semibold truncate",children:t.numeroChassis}),o.jsxs("div",{className:"flex items-center justify-center gap-2 mt-1",children:[o.jsx(ir,{variant:"outline",className:"text-xs",children:e8e[t.type]||t.type}),t.capacite&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.capacite,"t"]})]})]})]}):o.jsxs("div",{className:"w-full aspect-video rounded-lg bg-muted/50 border-2 border-dashed border-muted-foreground/30 flex flex-col items-center justify-center",children:[o.jsx("p",{className:"text-3xl mb-2 opacity-50",children:"🚛"}),o.jsx("p",{className:"text-xs text-muted-foreground text-center px-2",children:e?"Aucune remorque attelée — sélectionnez-en une ci-dessous":"Aucune remorque"})]})})]}),r&&e&&t&&o.jsx(cm,{children:o.jsxs(zb,{children:[o.jsx(Hb,{asChild:!0,children:o.jsx("div",{className:"w-full mt-2",children:o.jsx(ir,{variant:"secondary",className:"text-xs w-full justify-center bg-[#8B5CF6]/20 text-[#8B5CF6] border-[#8B5CF6]/30 hover:bg-[#8B5CF6]/30 cursor-help",children:"💜 Remorque attelée automatiquement"})})}),o.jsx(uy,{children:o.jsx("p",{children:"Pour changer de remorque, modifiez l'attelage depuis la page Attelages."})})]})})]})})}const t8e={chauffeur:"Chauffeur",apprenti:"Apprenti"},r8e=e=>{const t=(e.nom||"").toLowerCase(),r=(e.modele||"").toLowerCase();return t.includes("tracteur")||t.includes("tractor")||r.includes("tracteur")||r.includes("tractor")};function n8e(){const[,e]=Ic(),{toast:t}=sn(),[r,n]=w.useState({missionId:null,vehicleId:null,trailerId:null,crewMemberIds:[],origine:"",destination:"",dateDepart:"",dateArrivee:""}),[i,a]=w.useState(!1),s=w.useRef(null),{data:l=[],isLoading:c}=TO(),{data:u,isLoading:d}=Rle(r.missionId||0),{data:f=[],isLoading:m}=Ar({queryKey:["/api/vehicles"]}),{data:g=[]}=Ar({queryKey:["/api/trips"]}),{data:A=[],isLoading:v}=Ar({queryKey:["/api/crew-members"]});Ar({queryKey:["/api/trips"],enabled:g.length>0&&r.vehicleId!==null});const{data:b,isLoading:E}=Ple(r.vehicleId),I=w.useMemo(()=>{if(!f.length||!g.length)return f;const K=new Map;return g.forEach(q=>{const Y=K.get(q.vehicleId)||{count:0,lastUsed:null};K.set(q.vehicleId,{count:Y.count+1,lastUsed:Y.lastUsed?new Date(q.dateDepart)>Y.lastUsed?new Date(q.dateDepart):Y.lastUsed:new Date(q.dateDepart)})}),[...f].sort((q,Y)=>{const ne=K.get(q.id),ge=K.get(Y.id);if(!ne&&ge)return-1;if(ne&&!ge)return 1;if(!ne&&!ge)return 0;if(ne&&ge){if(ne.lastUsed&&ge.lastUsed)return ge.lastUsed.getTime()-ne.lastUsed.getTime();if(ne.lastUsed)return-1;if(ge.lastUsed)return 1}return 0})},[f,g]),S=w.useMemo(()=>{if(!r.vehicleId||!A.length||!g.length)return A;const K=g.filter(ne=>ne.vehicleId===r.vehicleId),q=[],Y=[];return A.forEach(ne=>{K.length>0?q.push(ne):Y.push(ne)}),[...q,...Y]},[A,g,r.vehicleId]),_=w.useMemo(()=>{const K=new Set;return g.forEach(q=>{q.origine&&K.add(q.origine),q.destination&&K.add(q.destination)}),Array.from(K).sort()},[g]);w.useEffect(()=>{if(u&&r.missionId){u.vehicleId&&!r.vehicleId&&n(q=>({...q,vehicleId:u.vehicleId})),u.trailerId&&!r.trailerId&&n(q=>({...q,trailerId:u.trailerId||null}));const K=[];u.mainDriver?.id&&K.push(u.mainDriver.id),u.additionalCrew&&u.additionalCrew.length>0&&u.additionalCrew.forEach(q=>{q.id&&!K.includes(q.id)&&K.push(q.id)}),K.length>0&&JSON.stringify(r.crewMemberIds.sort())!==JSON.stringify(K.sort())&&n(q=>({...q,crewMemberIds:K})),u.loadingSite&&!r.origine&&n(q=>({...q,origine:u.loadingSite})),u.unloadingSite&&!r.destination&&n(q=>({...q,destination:u.unloadingSite}))}},[u,r.missionId]),w.useEffect(()=>{const K=r.vehicleId!==s.current,q=r.vehicleId;if(K&&(s.current=q),!r.missionId&&q&&b){b.trailer?.id&&(r.trailerId!==b.trailer.id||K)&&(n(ne=>({...ne,trailerId:b.trailer.id})),a(!0));const Y=[];b.chauffeur?.id&&Y.push(b.chauffeur.id),b.apprentis&&Array.isArray(b.apprentis)&&b.apprentis.forEach(ne=>{ne?.id&&Y.push(ne.id)}),(K||JSON.stringify(r.crewMemberIds.sort())!==JSON.stringify(Y.sort()))&&n(ne=>({...ne,crewMemberIds:Y}))}else q&&!b&&K?E===!1&&(n(Y=>({...Y,trailerId:null,crewMemberIds:[]})),a(!1)):q||(n(Y=>({...Y,trailerId:null,crewMemberIds:[]})),a(!1))},[r.vehicleId,b,E]);const B=w.useMemo(()=>{const K=[];if(r.missionId||K.push("MISSION_REQUIRED"),r.vehicleId||K.push("Véhicule requis"),r.origine?.trim()||K.push("Départ requis"),r.destination?.trim()||K.push("Destination requise"),!r.dateDepart)K.push("Date de départ requise");else{const q=new Date(r.dateDepart);isNaN(q.getTime())&&K.push("Date de départ invalide")}if(r.dateArrivee){const q=new Date(r.dateArrivee),Y=new Date(r.dateDepart);!isNaN(q.getTime())&&!isNaN(Y.getTime())&&qY.id===r.vehicleId);q&&r8e(q)&&!b?.trailer&&!r.trailerId&&K.push("TRACTEUR_SANS_REMORQUE")}return K},[r,f,b]),T=B.length===0,P=qr({mutationFn:async K=>{const Y=await fr("/api/trips",{method:"POST",body:K.trip});return K.crewMemberIds&&K.crewMemberIds.length>0&&await fr(`/api/trips/${Y.id}/crew`,{method:"POST",body:{crewMemberIds:K.crewMemberIds}}),Y},onSuccess:()=>{br.invalidateQueries({queryKey:["/api/trips"]}),t({title:"Succès",description:"Le voyage a été créé avec succès"}),e("/trajets")},onError:K=>{t({variant:"destructive",title:"Erreur",description:K.message||"Impossible de créer le voyage"})}}),O=K=>{n(q=>({...q,vehicleId:K})),a(!1)},z=K=>{n(q=>({...q,crewMemberIds:q.crewMemberIds.includes(K)?q.crewMemberIds.filter(Y=>Y!==K):[...q.crewMemberIds,K]}))},L=K=>{if(K.preventDefault(),!T){const ne=B.find(ae=>ae==="MISSION_REQUIRED"),ge=B.find(ae=>ae==="TRACTEUR_SANS_REMORQUE");t(ne?{variant:"destructive",title:"Erreur",description:"Chaque voyage doit être rattaché à une mission. Créez d'abord une mission, puis ajoutez des voyages à cette mission."}:ge?{variant:"destructive",title:"Erreur",description:"Ce véhicule nécessite une remorque. Allez dans Attelages pour en atteler une."}:{variant:"destructive",title:"Erreur",description:B[0]||"Veuillez remplir tous les champs obligatoires"});return}const q=b?.trailer?.id||r.trailerId||void 0,Y={missionId:r.missionId,vehicleId:r.vehicleId,trailerId:q,origine:r.origine,destination:r.destination,dateDepart:new Date(r.dateDepart),dateArrivee:r.dateArrivee?new Date(r.dateArrivee):void 0};P.mutate({trip:Y,crewMemberIds:r.crewMemberIds.length>0?r.crewMemberIds:void 0})},W=f.find(K=>K.id===r.vehicleId)||null,R=b?.trailer&&r.vehicleId?b.trailer:null,$=m||v||E||c||d,X=P.isPending,Z=!r.missionId;return o.jsxs("div",{className:"space-y-6 pb-20 md:pb-0 relative",children:[W&&o.jsx(_t,{className:"fixed top-20 right-4 md:right-8 z-50 p-3 shadow-lg border-2 border-primary/20 bg-background/95 backdrop-blur-sm max-w-[200px]",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-2xl",children:"🚛"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"font-mono font-semibold text-sm truncate",children:W.immatriculation}),(W.marque||W.modele||W.annee)&&o.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:[W.marque," ",W.modele,W.annee&&` – ${W.annee}`]})]})]})}),o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>e("/trajets"),className:"h-10 w-10",children:o.jsx(P0,{className:"h-5 w-5"})}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl font-semibold",children:"Créer un voyage"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Planifiez un nouveau voyage pour un de vos véhicules"})]})]}),$?o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):o.jsxs("form",{onSubmit:L,children:[o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs(Je,{className:"text-base font-semibold",children:["Mission ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsxs(Pe,{type:"button",variant:"outline",size:"sm",onClick:()=>e("/missions/new"),className:"text-xs",children:[o.jsx(Ma,{className:"h-3 w-3 mr-1"}),"Nouvelle mission"]})]}),r.missionId?o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 max-h-64 overflow-y-auto p-2 border rounded-lg",children:l.map(K=>{const q=r.missionId===K.id;return o.jsxs("button",{type:"button",onClick:()=>n(Y=>({...Y,missionId:K.id})),className:`relative p-3 rounded-lg border-2 transition-all text-left ${q?"border-primary bg-primary/5 shadow-md":"border-border hover:border-primary/50 hover:bg-accent"}`,children:[q&&o.jsx("div",{className:"absolute top-2 right-2 z-10",children:o.jsx(es,{className:"h-4 w-4 text-primary"})}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold text-sm truncate",children:K.title}),o.jsx("p",{className:"text-xs text-muted-foreground font-mono",children:K.code})]}),o.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[o.jsx(rs,{className:"h-3 w-3"}),o.jsx("span",{className:"truncate",children:K.loadingSite}),o.jsx("span",{children:"→"}),o.jsx("span",{className:"truncate",children:K.unloadingSite})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ir,{variant:"outline",className:"text-xs",children:K.clientName}),K.tripCount!==void 0&&K.tripCount>0&&o.jsxs(ir,{variant:"secondary",className:"text-xs",children:[K.tripCount," voyage",K.tripCount>1?"s":""]})]})]})]},K.id)})}):o.jsx(_t,{className:"p-6 border-dashed bg-muted/30",children:o.jsxs("div",{className:"text-center space-y-3",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:"Sélectionnez ou créez d'abord une mission pour créer un voyage."}),o.jsxs(Pe,{type:"button",variant:"default",onClick:()=>e("/missions/new"),children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Créer une nouvelle mission"]})]})})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs(Je,{className:"text-base font-semibold",children:["Véhicule ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 max-h-96 overflow-y-auto p-2 border rounded-lg",children:I.map(K=>{const q=r.vehicleId===K.id;return o.jsxs("button",{type:"button",onClick:()=>O(K.id),disabled:Z,className:`relative p-3 rounded-lg border-2 transition-all duration-150 text-left ${q?"border-[#8B5CF6] bg-primary/5 shadow-[0_0_8px_rgba(139,92,246,0.3)]":"border-border hover:border-primary/50 hover:bg-accent cursor-pointer"} ${Z?"opacity-50 cursor-not-allowed":""}`,style:q?{boxShadow:"0 0 12px rgba(139, 92, 246, 0.4)"}:{},children:[q&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"absolute top-2 right-2 z-10",children:o.jsx(es,{className:"h-5 w-5 text-[#8B5CF6]"})}),o.jsx("div",{className:"absolute top-2 left-2 z-10",children:o.jsx(ir,{variant:"secondary",className:"text-xs bg-[#8B5CF6]/20 text-[#8B5CF6] border-[#8B5CF6]/30",children:"✔️ Sélectionné"})})]}),o.jsxs("div",{className:"space-y-2",children:[K.photoUrl?o.jsx("div",{className:"relative w-full aspect-video rounded overflow-hidden bg-muted",children:o.jsx("img",{src:hn(K.photoUrl)||void 0,alt:K.immatriculation,className:"w-full h-full object-cover",onError:Y=>{Y.target.style.display="none"}})}):o.jsx("div",{className:"w-full aspect-video rounded bg-muted flex items-center justify-center",children:o.jsx("span",{className:"text-3xl",children:"🚚"})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-mono font-semibold text-sm",children:K.immatriculation}),(K.marque||K.modele)&&o.jsxs("p",{className:"text-xs text-muted-foreground",children:[K.marque," ",K.modele]})]})]})]},K.id)})})]}),o.jsx(Fle,{vehicle:W,trailer:R,isFromCoupling:i||!!b?.trailer&&!!r.vehicleId}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs(Je,{className:"text-base font-semibold",children:["Chauffeurs ",o.jsx("span",{className:"text-destructive",children:"*"})]}),A.length===0?o.jsx(_t,{className:"p-4 border-dashed",children:o.jsx("p",{className:"text-sm text-muted-foreground text-center",children:"Aucun chauffeur disponible"})}):o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 max-h-96 overflow-y-auto p-2 border rounded-lg",children:S.map(K=>{const q=r.crewMemberIds.includes(K.id),Y=MC[K.role]||MC.chauffeur;return o.jsxs("button",{type:"button",onClick:()=>z(K.id),disabled:Z,className:`relative p-3 rounded-lg border-2 transition-all duration-150 text-left ${q?"border-green-500 bg-green-50 dark:bg-green-950/20 shadow-[0_0_8px_rgba(34,197,94,0.3)]":"border-border hover:border-primary/50 hover:bg-accent cursor-pointer"} ${Z?"opacity-50 cursor-not-allowed":""}`,style:q?{boxShadow:"0 0 12px rgba(34, 197, 94, 0.4)"}:{},children:[q&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"absolute top-2 right-2 z-10",children:o.jsx(es,{className:"h-5 w-5 text-green-600"})}),o.jsx("div",{className:"absolute top-2 left-2 z-10",children:o.jsx(ir,{variant:"secondary",className:"text-xs bg-green-500/20 text-green-700 dark:text-green-400 border-green-500/30",children:"Sélectionné"})})]}),o.jsxs("div",{className:"flex flex-col items-center space-y-2",children:[o.jsx("div",{className:"relative w-16 h-16 rounded-full overflow-hidden border-2 border-border",children:K.photoUrl?o.jsx("img",{src:hn(K.photoUrl)||void 0,alt:`${K.prenom} ${K.nom}`,className:"w-full h-full object-cover",onError:ne=>{ne.target.style.display="none"}}):o.jsx("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:o.jsx("span",{className:"text-2xl",children:"👤"})})}),o.jsxs("div",{className:"text-center",children:[o.jsxs("p",{className:"text-sm font-semibold",children:[K.prenom," ",K.nom]}),o.jsx(ir,{variant:"outline",className:`text-xs mt-1 ${Y.badge}`,children:t8e[K.role]||K.role})]})]})]},K.id)})})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"origine",className:"flex items-center gap-2",children:[o.jsx(rs,{className:"h-4 w-4 text-primary"}),"Départ ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"origine",list:"origine-suggestions",placeholder:"Ouagadougou",value:r.origine,onChange:K=>n({...r,origine:K.target.value}),required:!0,disabled:Z,className:"h-12"}),o.jsx("datalist",{id:"origine-suggestions",children:_.map((K,q)=>o.jsx("option",{value:K},q))})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"destination",className:"flex items-center gap-2",children:[o.jsx(WQ,{className:"h-4 w-4 text-primary"}),"Destination ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"destination",list:"destination-suggestions",placeholder:"Lomé",value:r.destination,onChange:K=>n({...r,destination:K.target.value}),required:!0,disabled:Z,className:"h-12"}),o.jsx("datalist",{id:"destination-suggestions",children:_.map((K,q)=>o.jsx("option",{value:K},q))})]})]}),o.jsxs("div",{className:"flex items-center justify-center gap-2 text-muted-foreground",children:[o.jsx(rs,{className:"h-4 w-4"}),o.jsx("div",{className:"flex-1 h-0.5 bg-primary/40 rounded-full"}),o.jsx("span",{className:"text-lg",children:"→"}),o.jsx("div",{className:"flex-1 h-0.5 bg-primary/40 rounded-full"}),o.jsx(WQ,{className:"h-4 w-4"})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"dateDepart",children:["Date de départ ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"dateDepart",type:"datetime-local",value:r.dateDepart,onChange:K=>n({...r,dateDepart:K.target.value}),required:!0,disabled:Z,className:"h-12"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"dateArrivee",children:"Date d'arrivée prévue"}),o.jsx(wt,{id:"dateArrivee",type:"datetime-local",value:r.dateArrivee,disabled:Z,onChange:K=>n({...r,dateArrivee:K.target.value}),className:"h-12"})]})]}),B.includes("TRACTEUR_SANS_REMORQUE")&&W&&o.jsxs(_t,{className:"p-4 border-2 border-destructive/50 bg-destructive/5",children:[o.jsx("p",{className:"text-sm font-medium text-destructive mb-2",children:"⚠️ Remorque requise"}),o.jsxs("p",{className:"text-xs text-muted-foreground mb-3",children:["Ce véhicule est un tracteur et nécessite une remorque. Allez dans la page ",o.jsx("strong",{children:"Attelages"})," pour en atteler une avant de créer le voyage."]})]})]}),o.jsxs("div",{className:"flex items-center justify-end gap-4 mt-8 pt-6 border-t",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>e("/trajets"),className:"h-12",children:"Annuler"}),o.jsx(Pe,{type:"submit",disabled:X||!T||Z,className:`h-12 ${T&&!X&&!Z?"bg-[#8B5CF6] hover:bg-[#7C3AED] text-white shadow-lg hover:shadow-xl":""}`,children:X?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"En cours..."]}):"Créer le voyage"})]})]})]})}function PO({title:e,description:t,onConfirm:r,trigger:n}){return o.jsxs(pm,{children:[o.jsx(pSe,{asChild:!0,children:n}),o.jsxs(qf,{children:[o.jsxs(Kf,{children:[o.jsx(Yf,{children:e}),o.jsx(Zf,{children:t})]}),o.jsxs(Vf,{children:[o.jsx(Xf,{children:"Annuler"}),o.jsx(Jf,{onClick:r,children:"Continuer"})]})]})]})}const i8e={plateau:"Plateau",citerne:"Citerne",benne:"Benne",frigorifique:"Frigorifique",autre:"Autre"};function a8e({trailer:e,onEdit:t,onDelete:r}){const n=e.photoUrl||Gf[e.type]||Gf.autre;return o.jsxs(_t,{"data-testid":`card-trailer-${e.id}`,className:"hover-elevate overflow-hidden",children:[o.jsxs("div",{className:"relative w-full aspect-video overflow-hidden rounded-t-xl bg-muted mb-3",children:[o.jsx("img",{src:hn(n)||void 0,alt:`Remorque ${e.numeroChassis}`,className:"w-full h-full object-cover",onError:i=>{i.target.style.display="none"}}),o.jsxs("div",{className:"absolute top-3 left-3 flex items-center gap-2 z-20",children:[o.jsx(ir,{variant:"secondary",className:"font-mono font-semibold text-xs px-2.5 py-1 bg-background/95 backdrop-blur-sm shadow-md border inline-flex items-center","data-testid":`text-chassis-${e.id}`,children:e.numeroChassis}),o.jsx(H2,{type:"trailer",data:{capacite:e.capacite||null}})]})]}),o.jsx(Xr,{className:"space-y-3 pb-4 pt-4",children:o.jsx("div",{className:"flex items-start justify-between gap-2",children:o.jsxs("div",{className:"flex-1",children:[e.nom&&o.jsx("h3",{className:"text-base md:text-lg font-semibold","data-testid":`text-name-${e.id}`,children:e.nom}),!n,e.couleur&&o.jsx("div",{className:"flex items-center gap-2 mt-1",children:o.jsx("span",{className:"text-xs text-muted-foreground","data-testid":`text-color-${e.id}`,children:e.couleur})}),o.jsxs("div",{className:"mt-2",children:[o.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Type"}),o.jsx(ir,{variant:"secondary","data-testid":`badge-type-${e.id}`,className:"text-sm px-3 py-1",children:i8e[e.type]||e.type})]})]})})}),o.jsx(ar,{className:"pb-4 space-y-3",children:o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Capacité"}),o.jsx("p",{className:"text-base font-semibold","data-testid":`text-capacity-${e.id}`,children:e.capacite?`${e.capacite} tonnes`:"—"})]})}),o.jsxs(Zb,{className:"gap-2 pt-4 border-t flex-wrap",children:[o.jsxs(Pe,{size:"sm",variant:"outline",onClick:()=>t?.(e.id),"data-testid":`button-edit-${e.id}`,className:"flex-1 min-w-[100px] h-10",children:[o.jsx(Lf,{className:"h-4 w-4 mr-2"}),"Modifier"]}),r&&o.jsx(PO,{onConfirm:()=>r(e.id),title:"Supprimer la remorque",description:`Êtes-vous sûr de vouloir supprimer la remorque ${e.numeroChassis} ? Cette action est irréversible.`,trigger:o.jsxs(Pe,{size:"sm",variant:"destructive","data-testid":`button-delete-${e.id}`,className:"flex-1 min-w-[100px] h-10",children:[o.jsx(fo,{className:"h-4 w-4 mr-2"}),"Supprimer"]})})]})]})}function s8e({onAdd:e,trigger:t,open:r,onOpenChange:n}){const[i,a]=w.useState(!1),s=r!==void 0?r:i,l=n||a,{toast:c}=sn(),[u,d]=w.useState({numeroChassis:"",nom:"",couleur:"",type:"plateau",capacite:void 0,photoUrl:""}),[f,m]=w.useState(null),[g,A]=w.useState(null),[v,b]=w.useState(!1),E=B=>{const T=B.target.files?.[0];if(T){if(!T.type.startsWith("image/")){c({variant:"destructive",title:"Erreur",description:"Veuillez sélectionner un fichier image"});return}if(T.size>5*1024*1024){c({variant:"destructive",title:"Erreur",description:"Le fichier est trop volumineux (max 5MB)"});return}m(T);const P=new FileReader;P.onloadend=()=>{A(P.result)},P.readAsDataURL(T),d({...u,photoUrl:""})}},I=()=>{m(null),A(null)},S=async()=>{if(!f)return null;b(!0);try{const B=new FormData;B.append("photo",f);const T=ch("/api/upload/trailer-photo"),P=mm(),O={};P&&(O.Authorization=`Bearer ${P}`);const z=await fetch(T,{method:"POST",headers:O,body:B,credentials:"include"});if(!z.ok){const W=await z.json();throw new Error(W.message||"Erreur lors de l'upload")}const L=await z.json();return{url:L.url,publicId:L.publicId}}catch(B){return c({variant:"destructive",title:"Erreur",description:B instanceof Error?B.message:"Erreur lors de l'upload du fichier"}),null}finally{b(!1)}},_=async B=>{B.preventDefault();let T=u.photoUrl?.trim()||void 0,P;if(f){const z=await S();if(z)T=z.url,P=z.publicId;else return}const O={...u,photoUrl:T,photoCloudinaryPublicId:P,nom:u.nom?.trim()||void 0,couleur:u.couleur?.trim()||void 0,capacite:u.capacite&&!isNaN(u.capacite)?u.capacite:void 0};e?.(O),l(!1),d({numeroChassis:"",nom:"",couleur:"",type:"plateau",capacite:void 0,photoUrl:""}),m(null),A(null)};return o.jsxs(ci,{open:s,onOpenChange:l,children:[o.jsx(xg,{asChild:!0,children:t||o.jsxs(Pe,{"data-testid":"button-add-trailer",className:"w-full md:w-auto",children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Ajouter une remorque"]})}),o.jsxs(Zn,{className:"sm:max-w-[500px] max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Ajouter une remorque"}),o.jsx(Ci,{children:"Entrez les détails de la remorque à ajouter à votre parc."})]}),o.jsxs("form",{onSubmit:_,children:[o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"numeroChassis",children:["Numéro de châssis ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"numeroChassis",placeholder:"CH-123456",value:u.numeroChassis,onChange:B=>d({...u,numeroChassis:B.target.value}),className:"font-mono h-12",required:!0,"data-testid":"input-chassis"})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"nom",children:"Nom de la remorque"}),o.jsx(wt,{id:"nom",placeholder:"Ex: La Grande",value:u.nom||"",onChange:B=>d({...u,nom:B.target.value||void 0}),className:"h-12","data-testid":"input-name"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"couleur",children:"Couleur"}),o.jsx(wt,{id:"couleur",placeholder:"Ex: Rouge, Bleu, Blanc",value:u.couleur||"",onChange:B=>d({...u,couleur:B.target.value||void 0}),className:"h-12","data-testid":"input-color"})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"type",children:["Type ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsxs(ui,{value:u.type,onValueChange:B=>d({...u,type:B}),required:!0,children:[o.jsx(ei,{id:"type","data-testid":"select-type",className:"h-12",children:o.jsx(di,{placeholder:"Sélectionner un type"})}),o.jsx(ti,{children:kO.map(B=>o.jsx(Tr,{value:B,children:B.charAt(0).toUpperCase()+B.slice(1).replace("_"," ")},B))})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"capacite",children:"Capacité (tonnes)"}),o.jsx(wt,{id:"capacite",type:"number",step:"0.1",placeholder:"20",value:u.capacite||"",onChange:B=>{const T=B.target.value,P=T===""?void 0:parseFloat(T);d({...u,capacite:isNaN(P)?void 0:P})},min:"0",className:"h-12","data-testid":"input-capacity"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{children:"Photo de la remorque"}),g?o.jsxs("div",{className:"relative",children:[o.jsx("img",{src:g,alt:"Aperçu",className:"w-full h-48 object-cover rounded-lg border"}),o.jsx(Pe,{type:"button",variant:"destructive",size:"icon",className:"absolute top-2 right-2",onClick:I,children:o.jsx(G0,{className:"h-4 w-4"})})]}):o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Je,{htmlFor:"photo-upload",className:"flex-1 cursor-pointer",children:o.jsxs("div",{className:"flex items-center justify-center gap-2 h-12 border-2 border-dashed rounded-lg hover:bg-accent transition-colors",children:[o.jsx(Pd,{className:"h-4 w-4"}),o.jsx("span",{className:"text-sm",children:"Téléverser une photo"})]})}),o.jsx(wt,{id:"photo-upload",type:"file",accept:"image/*",onChange:E,className:"hidden","data-testid":"input-photo-upload"})]}),o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"absolute inset-0 flex items-center",children:o.jsx("span",{className:"w-full border-t"})}),o.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:o.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"ou"})})]}),o.jsx(wt,{id:"photoUrl",type:"url",placeholder:"https://example.com/photo.jpg",value:u.photoUrl||"",onChange:B=>{d({...u,photoUrl:B.target.value||void 0}),m(null),A(null)},className:"h-12","data-testid":"input-photo-url"})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:f?`Fichier sélectionné : ${f.name} (${(f.size/1024/1024).toFixed(2)} MB)`:"Téléversez une photo ou entrez une URL (optionnel)"})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>l(!1),"data-testid":"button-cancel",className:"w-full sm:w-auto h-12",children:"Annuler"}),o.jsx(Pe,{type:"submit","data-testid":"button-submit",className:"w-full sm:w-auto h-12",disabled:v,children:v?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Upload en cours..."]}):"Ajouter"})]})]})]})]})}function o8e({trailer:e,open:t,onOpenChange:r,onUpdate:n}){const{toast:i}=sn(),[a,s]=w.useState({numeroChassis:"",nom:"",couleur:"",type:"plateau",capacite:void 0,photoUrl:""}),[l,c]=w.useState(null),[u,d]=w.useState(null),[f,m]=w.useState(!1),[g,A]=w.useState(!1);w.useEffect(()=>{e&&t&&(s({numeroChassis:e.numeroChassis,nom:e.nom||"",couleur:e.couleur||"",type:e.type||"plateau",capacite:e.capacite||void 0,photoUrl:e.photoUrl||""}),c(null),d(e.photoUrl||null),A(!1))},[e,t]);const v=S=>{const _=S.target.files?.[0];if(_){if(!_.type.startsWith("image/")){i({variant:"destructive",title:"Erreur",description:"Veuillez sélectionner un fichier image"});return}if(_.size>5*1024*1024){i({variant:"destructive",title:"Erreur",description:"Le fichier est trop volumineux (max 5MB)"});return}c(_);const B=new FileReader;B.onloadend=()=>{d(B.result)},B.readAsDataURL(_),s({...a,photoUrl:""})}},b=()=>{c(null),d(null),s({...a,photoUrl:""}),A(!0)},E=async()=>{if(!l)return null;m(!0);try{const S=new FormData;S.append("photo",l);const _=ch("/api/upload/trailer-photo"),B=mm(),T={};B&&(T.Authorization=`Bearer ${B}`);const P=await fetch(_,{method:"POST",headers:T,body:S,credentials:"include"});if(!P.ok){const z=await P.json();throw new Error(z.message||"Erreur lors de l'upload")}const O=await P.json();return{url:O.url,publicId:O.publicId}}catch(S){return i({variant:"destructive",title:"Erreur",description:S instanceof Error?S.message:"Erreur lors de l'upload du fichier"}),null}finally{m(!1)}},I=async S=>{if(S.preventDefault(),!e)return;let _=a.photoUrl?.trim()||void 0,B;if(g)_=null,B=null;else if(l){const P=await E();if(P)_=P.url,B=P.publicId;else return}const T={...a,photoUrl:_,photoCloudinaryPublicId:B,nom:a.nom?.trim()||void 0,couleur:a.couleur?.trim()||void 0,capacite:a.capacite&&!isNaN(a.capacite)?a.capacite:void 0};n?.(e.id,T),r(!1)};return e?o.jsx(ci,{open:t,onOpenChange:r,children:o.jsxs(Zn,{className:"sm:max-w-[500px] max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Modifier la remorque"}),o.jsxs(Ci,{children:["Modifiez les détails de la remorque ",e.numeroChassis,"."]})]}),o.jsxs("form",{onSubmit:I,children:[o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"numeroChassis",children:["Numéro de châssis ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"numeroChassis",placeholder:"CH-123456",value:a.numeroChassis,onChange:S=>s({...a,numeroChassis:S.target.value}),className:"font-mono h-12",required:!0,"data-testid":"input-chassis"})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"nom",children:"Nom de la remorque"}),o.jsx(wt,{id:"nom",placeholder:"Ex: La Grande",value:a.nom||"",onChange:S=>s({...a,nom:S.target.value||void 0}),className:"h-12","data-testid":"input-name"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"couleur",children:"Couleur"}),o.jsx(wt,{id:"couleur",placeholder:"Ex: Rouge, Bleu, Blanc",value:a.couleur||"",onChange:S=>s({...a,couleur:S.target.value||void 0}),className:"h-12","data-testid":"input-color"})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"type",children:["Type ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsxs(ui,{value:a.type||"plateau",onValueChange:S=>s({...a,type:S}),required:!0,children:[o.jsx(ei,{id:"type","data-testid":"select-type",className:"h-12",children:o.jsx(di,{placeholder:"Sélectionner un type"})}),o.jsx(ti,{children:kO.map(S=>o.jsx(Tr,{value:S,children:S.charAt(0).toUpperCase()+S.slice(1).replace("_"," ")},S))})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"capacite",children:"Capacité (tonnes)"}),o.jsx(wt,{id:"capacite",type:"number",step:"0.1",placeholder:"20",value:a.capacite||"",onChange:S=>{const _=S.target.value,B=_===""?void 0:parseFloat(_);s({...a,capacite:isNaN(B)?void 0:B})},min:"0",className:"h-12","data-testid":"input-capacity"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{children:"Photo de la remorque"}),u?o.jsxs("div",{className:"relative",children:[o.jsx("img",{src:u,alt:"Aperçu",className:"w-full h-48 object-cover rounded-lg border"}),o.jsx(Pe,{type:"button",variant:"destructive",size:"icon",className:"absolute top-2 right-2",onClick:b,children:o.jsx(G0,{className:"h-4 w-4"})})]}):o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Je,{htmlFor:"photo-upload-edit",className:"flex-1 cursor-pointer",children:o.jsxs("div",{className:"flex items-center justify-center gap-2 h-12 border-2 border-dashed rounded-lg hover:bg-accent transition-colors",children:[o.jsx(Pd,{className:"h-4 w-4"}),o.jsx("span",{className:"text-sm",children:"Téléverser une photo"})]})}),o.jsx(wt,{id:"photo-upload-edit",type:"file",accept:"image/*",onChange:v,className:"hidden","data-testid":"input-photo-upload"})]}),o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"absolute inset-0 flex items-center",children:o.jsx("span",{className:"w-full border-t"})}),o.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:o.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"ou"})})]}),o.jsx(wt,{id:"photoUrl",type:"url",placeholder:"https://example.com/photo.jpg",value:a.photoUrl||"",onChange:S=>{s({...a,photoUrl:S.target.value||void 0}),c(null),d(null)},className:"h-12","data-testid":"input-photo-url"})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:l?`Fichier sélectionné : ${l.name} (${(l.size/1024/1024).toFixed(2)} MB)`:"Téléversez une photo ou entrez une URL (optionnel)"})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>r(!1),"data-testid":"button-cancel",className:"w-full sm:w-auto h-12",children:"Annuler"}),o.jsx(Pe,{type:"submit","data-testid":"button-submit",className:"w-full sm:w-auto h-12",disabled:f,children:f?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Upload en cours..."]}):"Enregistrer"})]})]})]})}):null}function l8e(){const[e,t]=w.useState(""),[r,n]=w.useState(null),[i,a]=w.useState(!1),{toast:s}=sn(),{data:l=[],isLoading:c}=Ar({queryKey:["/api/trailers"]}),u=qr({mutationFn:async I=>await fr("/api/trailers",{method:"POST",body:I}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/trailers"]}),s({title:"Succès",description:"La remorque a été ajoutée avec succès"})},onError:I=>{s({variant:"destructive",title:"Erreur",description:I.message||"Impossible d'ajouter la remorque"})}}),d=qr({mutationFn:async({id:I,data:S})=>await fr(`/api/trailers/${I}`,{method:"PATCH",body:S}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/trailers"]}),s({title:"Succès",description:"La remorque a été modifiée avec succès"}),n(null)},onError:I=>{s({variant:"destructive",title:"Erreur",description:I.message||"Impossible de modifier la remorque"})}}),f=qr({mutationFn:async I=>await fr(`/api/trailers/${I}`,{method:"DELETE"}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/trailers"]}),s({title:"Succès",description:"La remorque a été supprimée avec succès"})},onError:I=>{s({variant:"destructive",title:"Erreur",description:I.message||"Impossible de supprimer la remorque"})}}),m=l.filter(I=>I.numeroChassis.toLowerCase().includes(e.toLowerCase())||I.type.toLowerCase().includes(e.toLowerCase())||I.nom&&I.nom.toLowerCase().includes(e.toLowerCase())),g=I=>{u.mutate(I)},A=I=>{n(I)},v=(I,S)=>{d.mutate({id:I,data:S})},b=I=>{f.mutate(I)},E=l.find(I=>I.id===r)||null;return o.jsxs("div",{className:"space-y-4 md:space-y-6 pb-20 md:pb-0",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl md:text-2xl font-semibold","data-testid":"text-page-title",children:"Remorques"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Gérez votre parc de remorques"})]}),o.jsx(s8e,{onAdd:g,open:i,onOpenChange:a})]}),o.jsx("div",{className:"flex items-center gap-3",children:o.jsxs("div",{className:"relative flex-1",children:[o.jsx(U0,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(wt,{placeholder:"Rechercher...",value:e,onChange:I=>t(I.target.value),className:"pl-9 h-12","data-testid":"input-search"})]})}),c?o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:m.map(I=>o.jsx(a8e,{trailer:I,onEdit:A,onDelete:b},I.id))}),m.length===0&&o.jsx("div",{className:"text-center py-12",children:o.jsx("p",{className:"text-muted-foreground",children:"Aucune remorque trouvée"})})]}),o.jsx(wg,{onClick:()=>a(!0),label:"Ajouter une remorque"}),o.jsx(o8e,{trailer:E,open:r!==null,onOpenChange:I=>{I||n(null)},onUpdate:v})]})}const c8e={chauffeur:"Chauffeur",apprenti:"Apprenti",mecanique:"Mécanicien",superviseur:"Superviseur"};function u8e({crewMember:e,onEdit:t,onDelete:r}){const n=MC[e.role]||MC.chauffeur,i=c8e[e.role]||e.role;return o.jsxs(_t,{"data-testid":`card-crew-member-${e.id}`,className:"hover-elevate transition-all duration-200 group",children:[o.jsx(Xr,{className:"space-y-4 pb-4 pt-6",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"flex-shrink-0 transition-transform duration-200 group-hover:scale-105",children:e.photoUrl?o.jsx("img",{src:hn(e.photoUrl)||void 0,alt:`${e.prenom} ${e.nom}`,className:"w-20 h-20 md:w-24 md:h-24 rounded-full object-cover border-2 border-border shadow-md",onError:a=>{a.target.style.display="none";const s=a.target.parentElement;if(s){const l=document.createElement("div");l.className="w-20 h-20 md:w-24 md:h-24 rounded-full bg-muted flex items-center justify-center border-2 border-border text-2xl font-semibold text-muted-foreground",l.textContent=e.prenom.charAt(0).toUpperCase(),s.appendChild(l)}}}):o.jsx("div",{className:"w-20 h-20 md:w-24 md:h-24 rounded-full bg-muted flex items-center justify-center border-2 border-border text-2xl font-semibold text-muted-foreground",children:e.prenom.charAt(0).toUpperCase()})}),o.jsxs("div",{className:"flex-1 min-w-0 pt-2",children:[o.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[o.jsxs("h3",{className:"text-lg md:text-xl font-semibold truncate","data-testid":`text-name-${e.id}`,children:[e.prenom," ",e.nom]}),o.jsx(Cx,{cardData:{type:"crew",title:`${e.prenom} ${e.nom}`,details:{role:i,telephone:e.telephone||void 0}},size:"sm"})]}),o.jsx(ir,{variant:"secondary",className:`${n.badge} border font-semibold text-xs px-2.5 py-1`,"data-testid":`badge-role-${e.id}`,children:i})]})]})}),o.jsxs(ar,{className:"pb-4 space-y-3",children:[e.linkedUsername&&o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Compte utilisateur"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(sy,{className:"h-4 w-4 text-muted-foreground"}),o.jsx("p",{className:"text-sm font-medium","data-testid":`text-user-${e.id}`,children:e.linkedUsername})]})]}),e.telephone&&o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Téléphone"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Cbe,{className:"h-4 w-4 text-muted-foreground"}),o.jsx("p",{className:"text-sm font-medium","data-testid":`text-phone-${e.id}`,children:e.telephone})]})]})]}),o.jsxs(Zb,{className:"gap-2 pt-4 border-t flex-wrap",children:[o.jsxs(Pe,{size:"sm",variant:"outline",onClick:()=>t?.(e.id),"data-testid":`button-edit-${e.id}`,className:"flex-1 min-w-[100px] h-10",children:[o.jsx(Lf,{className:"h-4 w-4 mr-2"}),"Modifier"]}),o.jsxs(Pe,{size:"sm",variant:"outline",onClick:()=>r?.(e.id),"data-testid":`button-delete-${e.id}`,className:"flex-1 min-w-[100px] h-10 text-destructive hover:text-destructive",children:[o.jsx(fo,{className:"h-4 w-4 mr-2"}),"Supprimer"]})]})]})}const d8e={chauffeur:"Chauffeur",apprenti:"Apprenti"};function f8e({onAdd:e,trigger:t,open:r,onOpenChange:n}){const[i,a]=w.useState(!1),s=r!==void 0?r:i,l=n||a,{toast:c}=sn(),[u,d]=w.useState({nom:"",prenom:"",role:"chauffeur",telephone:void 0,photoUrl:void 0}),[f,m]=w.useState(null),[g,A]=w.useState(null),[v,b]=w.useState(!1),E=B=>{const T=B.target.files?.[0];if(T){if(!T.type.startsWith("image/")){c({variant:"destructive",title:"Erreur",description:"Veuillez sélectionner un fichier image"});return}if(T.size>5*1024*1024){c({variant:"destructive",title:"Erreur",description:"Le fichier est trop volumineux (max 5MB)"});return}m(T);const P=new FileReader;P.onloadend=()=>{A(P.result)},P.readAsDataURL(T),d({...u,photoUrl:void 0})}},I=()=>{m(null),A(null)},S=async()=>{if(!f)return null;b(!0);try{const B=new FormData;B.append("photo",f);const T=ch("/api/upload/crew-member-photo");if(!T.startsWith("http://")&&!T.startsWith("https://"))throw console.error("[AddCrewMemberDialog] ERREUR: apiUrl() a retourné un chemin relatif:",T),new Error(`URL invalide: ${T}. VITE_API_BASE_URL doit être défini.`);console.log("[AddCrewMemberDialog] Upload URL:",T);const P=mm(),O={};P&&(O.Authorization=`Bearer ${P}`);const z=await fetch(T,{method:"POST",headers:O,body:B,credentials:"include"});if(!z.ok){const W=await z.json().catch(()=>({message:"Erreur lors de l'upload"}));throw new Error(W.message||"Erreur lors de l'upload")}const L=await z.json();return{url:L.url,publicId:L.publicId}}catch(B){return c({variant:"destructive",title:"Erreur",description:B instanceof Error?B.message:"Erreur lors de l'upload du fichier"}),null}finally{b(!1)}},_=async B=>{B.preventDefault();let T=u.photoUrl?.trim()||void 0,P;if(f){const z=await S();if(z)T=z.url,P=z.publicId;else return}const O={...u,photoUrl:T,photoCloudinaryPublicId:P,nom:u.nom.trim(),prenom:u.prenom.trim(),telephone:u.telephone?.trim()||void 0};e?.(O),l(!1),d({nom:"",prenom:"",role:"chauffeur",telephone:void 0,photoUrl:void 0}),m(null),A(null)};return o.jsxs(ci,{open:s,onOpenChange:l,children:[o.jsx(xg,{asChild:!0,children:t||o.jsxs(Pe,{"data-testid":"button-add-crew-member",className:"w-full md:w-auto",children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Ajouter un chauffeur"]})}),o.jsxs(Zn,{className:"sm:max-w-[500px] max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Ajouter un chauffeur"}),o.jsx(Ci,{children:"Entrez les détails du chauffeur ou de l'apprenti à ajouter."})]}),o.jsxs("form",{onSubmit:_,children:[o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"prenom",children:["Prénom ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"prenom",placeholder:"Amadou",value:u.prenom,onChange:B=>d({...u,prenom:B.target.value}),className:"h-12",required:!0,"data-testid":"input-first-name"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"nom",children:["Nom ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"nom",placeholder:"Ouédraogo",value:u.nom,onChange:B=>d({...u,nom:B.target.value}),className:"h-12",required:!0,"data-testid":"input-last-name"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"role",children:["Rôle ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsxs(ui,{value:u.role,onValueChange:B=>d({...u,role:B}),required:!0,children:[o.jsx(ei,{id:"role","data-testid":"select-role",className:"h-12",children:o.jsx(di,{placeholder:"Sélectionner un rôle"})}),o.jsx(ti,{children:_O.map(B=>o.jsx(Tr,{value:B,children:d8e[B]||B},B))})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"telephone",children:"Téléphone"}),o.jsx(wt,{id:"telephone",placeholder:"+226 70 12 34 56",value:u.telephone||"",onChange:B=>d({...u,telephone:B.target.value||void 0}),className:"h-12","data-testid":"input-phone"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{children:"Photo du membre d'équipage"}),g?o.jsxs("div",{className:"relative",children:[o.jsx("img",{src:g,alt:"Aperçu",className:"w-full h-48 object-cover rounded-lg border"}),o.jsx(Pe,{type:"button",variant:"destructive",size:"icon",className:"absolute top-2 right-2",onClick:I,children:o.jsx(G0,{className:"h-4 w-4"})})]}):o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Je,{htmlFor:"photo-upload",className:"flex-1 cursor-pointer",children:o.jsxs("div",{className:"flex items-center justify-center gap-2 h-12 border-2 border-dashed rounded-lg hover:bg-accent transition-colors",children:[o.jsx(Pd,{className:"h-4 w-4"}),o.jsx("span",{className:"text-sm",children:"Téléverser une photo"})]})}),o.jsx(wt,{id:"photo-upload",type:"file",accept:"image/*",onChange:E,className:"hidden","data-testid":"input-photo-upload"})]}),o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"absolute inset-0 flex items-center",children:o.jsx("span",{className:"w-full border-t"})}),o.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:o.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"ou"})})]}),o.jsx(wt,{id:"photoUrl",type:"url",placeholder:"https://example.com/photo.jpg",value:u.photoUrl||"",onChange:B=>{d({...u,photoUrl:B.target.value||void 0}),m(null),A(null)},className:"h-12","data-testid":"input-photo-url"})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:f?`Fichier sélectionné : ${f.name} (${(f.size/1024/1024).toFixed(2)} MB)`:"Téléversez une photo ou entrez une URL (optionnel)"})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>l(!1),"data-testid":"button-cancel",className:"w-full sm:w-auto h-12",children:"Annuler"}),o.jsx(Pe,{type:"submit","data-testid":"button-submit",className:"w-full sm:w-auto h-12",disabled:v,children:v?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Upload en cours..."]}):"Ajouter"})]})]})]})]})}const h8e={chauffeur:"Chauffeur",apprenti:"Apprenti"};function m8e({crewMember:e,open:t,onOpenChange:r,onUpdate:n}){const{toast:i}=sn(),[a,s]=w.useState({nom:"",prenom:"",role:"chauffeur",telephone:void 0,photoUrl:void 0,userId:void 0}),[l,c]=w.useState(null),[u,d]=w.useState(null),[f,m]=w.useState(!1),{data:g=[]}=Ar({queryKey:["/api/users"],enabled:t}),A=g.filter(S=>S.role==="chauffeur"||S.role==="apprenti");w.useEffect(()=>{e&&t&&(s({nom:e.nom,prenom:e.prenom,role:e.role,telephone:e.telephone||void 0,photoUrl:e.photoUrl||void 0,userId:e.userId||null}),c(null),d(hn(e.photoUrl)||null))},[e,t]);const v=S=>{const _=S.target.files?.[0];if(_){if(!_.type.startsWith("image/")){i({variant:"destructive",title:"Erreur",description:"Veuillez sélectionner un fichier image"});return}if(_.size>5*1024*1024){i({variant:"destructive",title:"Erreur",description:"Le fichier est trop volumineux (max 5MB)"});return}c(_);const B=new FileReader;B.onloadend=()=>{d(B.result)},B.readAsDataURL(_),s({...a,photoUrl:void 0})}},b=()=>{c(null),d(e?.photoUrl||null)},E=async()=>{if(!l)return null;m(!0);try{const S=new FormData;S.append("photo",l);const _=ch("/api/upload/crew-member-photo");if(!_.startsWith("http://")&&!_.startsWith("https://"))throw console.error("[EditCrewMemberDialog] ERREUR: apiUrl() a retourné un chemin relatif:",_),new Error(`URL invalide: ${_}. VITE_API_BASE_URL doit être défini.`);console.log("[EditCrewMemberDialog] Upload URL:",_);const B=mm(),T={};B&&(T.Authorization=`Bearer ${B}`);const P=await fetch(_,{method:"POST",headers:T,body:S,credentials:"include"});if(!P.ok){const z=await P.json().catch(()=>({message:"Erreur lors de l'upload"}));throw new Error(z.message||"Erreur lors de l'upload")}const O=await P.json();return{url:O.url,publicId:O.publicId}}catch(S){return i({variant:"destructive",title:"Erreur",description:S instanceof Error?S.message:"Erreur lors de l'upload du fichier"}),null}finally{m(!1)}},I=async S=>{if(S.preventDefault(),!e)return;let _=a.photoUrl?.trim()||void 0,B;if(l){const P=await E();if(P)_=P.url,B=P.publicId;else return}const T={...a,photoUrl:_,photoCloudinaryPublicId:B,nom:a.nom.trim()||void 0,prenom:a.prenom.trim()||void 0,telephone:a.telephone?.trim()||void 0,userId:a.userId||null};n?.(e.id,T),r(!1)};return e?o.jsx(ci,{open:t,onOpenChange:r,children:o.jsxs(Zn,{className:"sm:max-w-[500px] max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Modifier le chauffeur"}),o.jsxs(Ci,{children:["Modifiez les détails de ",e.prenom," ",e.nom,"."]})]}),o.jsxs("form",{onSubmit:I,children:[o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"prenom",children:["Prénom ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"prenom",placeholder:"Amadou",value:a.prenom,onChange:S=>s({...a,prenom:S.target.value}),className:"h-12",required:!0,"data-testid":"input-first-name"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"nom",children:["Nom ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"nom",placeholder:"Ouédraogo",value:a.nom,onChange:S=>s({...a,nom:S.target.value}),className:"h-12",required:!0,"data-testid":"input-last-name"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"role",children:["Rôle ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsxs(ui,{value:a.role,onValueChange:S=>s({...a,role:S}),required:!0,children:[o.jsx(ei,{id:"role","data-testid":"select-role",className:"h-12",children:o.jsx(di,{placeholder:"Sélectionner un rôle"})}),o.jsx(ti,{children:_O.map(S=>o.jsx(Tr,{value:S,children:h8e[S]||S},S))})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"telephone",children:"Téléphone"}),o.jsx(wt,{id:"telephone",placeholder:"+226 70 12 34 56",value:a.telephone||"",onChange:S=>s({...a,telephone:S.target.value||void 0}),className:"h-12","data-testid":"input-phone"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"userId",children:"Compte utilisateur associé"}),o.jsxs(ui,{value:a.userId||"none",onValueChange:S=>s({...a,userId:S==="none"?null:S}),children:[o.jsx(ei,{id:"userId",className:"h-12",children:o.jsx(di,{placeholder:"Aucun compte associé"})}),o.jsxs(ti,{children:[o.jsx(Tr,{value:"none",children:"Aucun compte associé"}),A.map(S=>o.jsxs(Tr,{value:S.id,children:[S.username," (",S.role==="chauffeur"?"Chauffeur":"Apprenti",")"]},S.id))]})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Liez ce membre d'équipage à un compte utilisateur pour qu'il puisse se connecter et voir ses voyages assignés."})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{children:"Photo du membre d'équipage"}),u?o.jsxs("div",{className:"relative",children:[o.jsx("img",{src:u,alt:"Aperçu",className:"w-full h-48 object-cover rounded-lg border"}),o.jsx(Pe,{type:"button",variant:"destructive",size:"icon",className:"absolute top-2 right-2",onClick:b,children:o.jsx(G0,{className:"h-4 w-4"})})]}):o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Je,{htmlFor:"photo-upload-edit",className:"flex-1 cursor-pointer",children:o.jsxs("div",{className:"flex items-center justify-center gap-2 h-12 border-2 border-dashed rounded-lg hover:bg-accent transition-colors",children:[o.jsx(Pd,{className:"h-4 w-4"}),o.jsx("span",{className:"text-sm",children:"Téléverser une photo"})]})}),o.jsx(wt,{id:"photo-upload-edit",type:"file",accept:"image/*",onChange:v,className:"hidden","data-testid":"input-photo-upload"})]}),o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"absolute inset-0 flex items-center",children:o.jsx("span",{className:"w-full border-t"})}),o.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:o.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"ou"})})]}),o.jsx(wt,{id:"photoUrl",type:"url",placeholder:"https://example.com/photo.jpg",value:a.photoUrl||"",onChange:S=>{s({...a,photoUrl:S.target.value||void 0}),c(null),d(null)},className:"h-12","data-testid":"input-photo-url"})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:l?`Fichier sélectionné : ${l.name} (${(l.size/1024/1024).toFixed(2)} MB)`:"Téléversez une photo ou entrez une URL (optionnel)"})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>r(!1),"data-testid":"button-cancel",className:"w-full sm:w-auto h-12",children:"Annuler"}),o.jsx(Pe,{type:"submit","data-testid":"button-submit",className:"w-full sm:w-auto h-12",disabled:f,children:f?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Upload en cours..."]}):"Enregistrer"})]})]})]})}):null}function p8e(){const[e,t]=w.useState(""),[r,n]=w.useState(null),[i,a]=w.useState(!1),[s,l]=w.useState(null),[c,u]=w.useState(!1),{toast:d}=sn(),{data:f=[],isLoading:m}=Ar({queryKey:["/api/crew-members"]}),g=qr({mutationFn:async T=>await fr("/api/crew-members",{method:"POST",body:T}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/crew-members"]}),d({title:"Succès",description:"Le chauffeur a été ajouté avec succès"}),a(!1)},onError:T=>{d({variant:"destructive",title:"Erreur",description:T.message||"Impossible d'ajouter le chauffeur"})}}),A=qr({mutationFn:async({id:T,data:P})=>await fr(`/api/crew-members/${T}`,{method:"PATCH",body:P}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/crew-members"]}),d({title:"Succès",description:"Le chauffeur a été modifié avec succès"}),u(!1),l(null)},onError:T=>{d({variant:"destructive",title:"Erreur",description:T.message||"Impossible de modifier le chauffeur"})}}),v=qr({mutationFn:async T=>await fr(`/api/crew-members/${T}`,{method:"DELETE"}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/crew-members"]}),d({title:"Succès",description:"Le chauffeur a été supprimé avec succès"}),n(null)},onError:T=>{d({variant:"destructive",title:"Erreur",description:T.message||"Impossible de supprimer le chauffeur"})}}),b=f.filter(T=>T.nom.toLowerCase().includes(e.toLowerCase())||T.prenom.toLowerCase().includes(e.toLowerCase())||T.telephone?.toLowerCase().includes(e.toLowerCase())),E=T=>{g.mutate(T)},I=T=>{const P=f.find(O=>O.id===T);P&&(l(P),u(!0))},S=(T,P)=>{A.mutate({id:T,data:P})},_=T=>{n(T)},B=()=>{r&&v.mutate(r)};return o.jsxs("div",{className:"space-y-4 md:space-y-6 pb-20 md:pb-0",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl md:text-2xl font-semibold","data-testid":"text-page-title",children:"Chauffeurs"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Gérez vos chauffeurs et apprentis"})]}),o.jsx(f8e,{onAdd:E,open:i,onOpenChange:a})]}),o.jsx("div",{className:"flex items-center gap-3",children:o.jsxs("div",{className:"relative flex-1",children:[o.jsx(U0,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(wt,{placeholder:"Rechercher...",value:e,onChange:T=>t(T.target.value),className:"pl-9 h-12","data-testid":"input-search"})]})}),m?o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:b.map(T=>o.jsx(u8e,{crewMember:T,onEdit:I,onDelete:_},T.id))}),b.length===0&&o.jsx("div",{className:"text-center py-12",children:o.jsx("p",{className:"text-muted-foreground",children:"Aucun chauffeur trouvé"})})]}),o.jsx(wg,{onClick:()=>a(!0),label:"Ajouter un chauffeur"}),o.jsx(m8e,{crewMember:s,open:c,onOpenChange:u,onUpdate:S}),o.jsx(pm,{open:r!==null,onOpenChange:()=>n(null),children:o.jsxs(qf,{children:[o.jsxs(Kf,{children:[o.jsx(Yf,{children:"Confirmer la suppression"}),o.jsx(Zf,{children:"Êtes-vous sûr de vouloir supprimer ce chauffeur ? Cette action est irréversible."})]}),o.jsxs(Vf,{children:[o.jsx(Xf,{children:"Annuler"}),o.jsx(Jf,{onClick:B,children:"Supprimer"})]})]})})]})}async function Mle(e){return await fr("/api/maintenances")}async function g8e(e,t){return await fr(`/api/maintenances/${e}`,{method:"PATCH",body:t})}async function A8e(e,t){return await fr(`/api/maintenances/${e}/treat`,{method:"POST",body:t})}function v8e(){const{toast:e}=sn(),t=zu(),r=qr({mutationFn:({maintenanceId:n,data:i})=>A8e(n,i),onSuccess:()=>{t.invalidateQueries({queryKey:["/api/maintenances"]}),e({title:"Entretien traité",description:"L'entretien a été traité avec succès."})},onError:n=>{e({variant:"destructive",title:"Erreur",description:n.message||"Impossible de traiter l'entretien"})}});return{treat:r.mutate,isTreating:r.isPending}}async function OO(e){const t=new FormData;t.append("photo",e);const r=await fetch("/api/upload/loading-bon",{method:"POST",body:t,credentials:"include"});if(!r.ok){const n=await r.text();throw new Error(`${r.status}: ${n||r.statusText}`)}return await r.json()}async function x8e(e){const t=new FormData;t.append("logo",e);const r=await fetch("/api/upload/organization-logo",{method:"POST",body:t,credentials:"include"});if(!r.ok){const n=await r.text();throw new Error(`${r.status}: ${n||r.statusText}`)}return await r.json()}async function y8e(e){const t=new FormData;t.append("justificatif",e);const r=await fetch("/api/upload/expense-justificatif",{method:"POST",body:t,credentials:"include"});if(!r.ok){const n=await r.text();throw new Error(`${r.status}: ${n||r.statusText}`)}return await r.json()}async function KC(e){const t=new FormData;t.append("audio",e);const r=await fetch("/api/upload/breakdown-audio",{method:"POST",body:t,credentials:"include"});if(!r.ok){const n=await r.text();throw new Error(`${r.status}: ${n||r.statusText}`)}return await r.json()}async function AE(e){const t=new FormData;t.append("photo",e);const r=await fetch("/api/upload/breakdown-photo",{method:"POST",body:t,credentials:"include"});if(!r.ok){const n=await r.text();throw new Error(`${r.status}: ${n||r.statusText}`)}return await r.json()}async function J8(e){const t=new FormData;t.append("video",e);const r=await fetch("/api/upload/breakdown-video",{method:"POST",body:t,credentials:"include"});if(!r.ok){const n=await r.text();throw new Error(`${r.status}: ${n||r.statusText}`)}return await r.json()}async function Qle(e){const t=new FormData;t.append("photo",e);const r=await fetch("/api/upload/unloading-weighing-ticket",{method:"POST",body:t,credentials:"include"});if(!r.ok){const n=await r.text();throw new Error(`${r.status}: ${n||r.statusText}`)}return await r.json()}async function b8e(e){const t=new FormData;t.append("photo",e);const r=await fetch("/api/upload/maintenance-photo",{method:"POST",body:t,credentials:"include"});if(!r.ok){const n=await r.text();throw new Error(`${r.status}: ${n||r.statusText}`)}return await r.json()}async function w8e(e){const t=new FormData;t.append("audio",e);const r=await fetch("/api/upload/maintenance-audio",{method:"POST",body:t,credentials:"include"});if(!r.ok){const n=await r.text();throw new Error(`${r.status}: ${n||r.statusText}`)}return await r.json()}async function E8e(e){const t=new FormData;t.append("justificatif",e);const r=await fetch("/api/upload/maintenance-justificatif",{method:"POST",body:t,credentials:"include"});if(!r.ok){const n=await r.text();throw new Error(`${r.status}: ${n||r.statusText}`)}return await r.json()}const C8e={"Problème moteur":"bg-red-100 text-red-800 border-red-300","Panne moteur":"bg-red-100 text-red-800 border-red-300","Problème électrique":"bg-yellow-100 text-yellow-800 border-yellow-300","Pneu crevé":"bg-orange-100 text-orange-800 border-orange-300",Pneu:"bg-orange-100 text-orange-800 border-orange-300",Surchauffe:"bg-red-100 text-red-800 border-red-300",Carburant:"bg-yellow-100 text-yellow-800 border-yellow-300","Panne sèche":"bg-yellow-100 text-yellow-800 border-yellow-300"},I8e={vidange:"bg-blue-100 text-blue-800 border-blue-300",filtres:"bg-green-100 text-green-800 border-green-300",pneus:"bg-orange-100 text-orange-800 border-orange-300",liquide_frein:"bg-red-100 text-red-800 border-red-300",adblue:"bg-purple-100 text-purple-800 border-purple-300",autre:"bg-gray-100 text-gray-800 border-gray-300"};function X8({type:e,variant:t="maintenance",size:r="sm"}){const n=t==="maintenance"?qv:Kv,i=n[e]||n.autre||"⚙️",s=(t==="maintenance"?I8e:C8e)[e]||(t==="breakdown"?"bg-red-100 text-red-800 border-red-300":"bg-gray-100 text-gray-800 border-gray-300"),l={sm:"text-xs px-2 py-0.5",md:"text-sm px-2.5 py-1"};return o.jsxs(ir,{variant:"secondary",className:`${s} border font-semibold ${l[r]} flex items-center gap-1`,children:[o.jsx("span",{className:"text-xs",children:i}),o.jsx("span",{children:e})]})}const Nw=w.forwardRef(({className:e,...t},r)=>o.jsx("textarea",{className:qt("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...t}));Nw.displayName="Textarea";function S8e({vehicleId:e,onAdd:t,trigger:r,open:n,onOpenChange:i}){const[a,s]=w.useState(!1),l=n!==void 0?n:a,c=i||s,{data:u=[]}=Ar({queryKey:["/api/vehicles"]}),{data:d=[]}=Ar({queryKey:["/api/trailers"]}),[f,m]=w.useState("vehicle"),[g,A]=w.useState(e||null),[v,b]=w.useState(null),[E,I]=w.useState({type:"vidange",datePrevue:void 0,kilometragePrevu:void 0,dateEffectuee:void 0,kilometrageEffectue:void 0,cout:void 0,notes:void 0}),S=B=>{if(B.preventDefault(),f==="vehicle"&&(!g||g<=0)||f==="trailer"&&(!v||v<=0))return;const T={...E,vehicleId:f==="vehicle"?g:null,trailerId:f==="trailer"?v:null};t?.(T),c(!1),I({type:"vidange",datePrevue:void 0,kilometragePrevu:void 0,dateEffectuee:void 0,kilometrageEffectue:void 0,cout:void 0,notes:void 0}),m("vehicle"),A(null),b(null)},_=o.jsxs("form",{onSubmit:S,children:[o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"maintenance-target",children:["Véhicule ou Remorque ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsxs(ui,{value:f,onValueChange:B=>{m(B),A(null),b(null)},required:!0,children:[o.jsx(ei,{id:"maintenance-target",className:"h-12",children:o.jsx(di,{})}),o.jsxs(ti,{children:[o.jsx(Tr,{value:"vehicle",children:"Véhicule"}),o.jsx(Tr,{value:"trailer",children:"Remorque"})]})]})]}),f==="vehicle"&&o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"vehicle-select",children:["Véhicule ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsxs(ui,{value:g?.toString()||"",onValueChange:B=>A(parseInt(B)),required:!0,children:[o.jsx(ei,{id:"vehicle-select",className:"h-12",children:o.jsx(di,{placeholder:"Sélectionner un véhicule"})}),o.jsx(ti,{children:u.map(B=>o.jsx(Tr,{value:B.id.toString(),children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Do,{className:"h-4 w-4"}),o.jsx("span",{children:B.immatriculation})]})},B.id))})]})]}),f==="trailer"&&o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"trailer-select",children:["Remorque ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsxs(ui,{value:v?.toString()||"",onValueChange:B=>b(parseInt(B)),required:!0,children:[o.jsx(ei,{id:"trailer-select",className:"h-12",children:o.jsx(di,{placeholder:"Sélectionner une remorque"})}),o.jsx(ti,{children:d.map(B=>o.jsx(Tr,{value:B.id.toString(),children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(uo,{className:"h-4 w-4"}),o.jsxs("span",{children:[B.numeroChassis," ",B.nom?`- ${B.nom}`:""]})]})},B.id))})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"type",children:["Type ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsxs(ui,{value:E.type,onValueChange:B=>I({...E,type:B}),required:!0,children:[o.jsx(ei,{id:"type","data-testid":"select-type",className:"h-12",children:o.jsx(di,{placeholder:"Sélectionner un type"})}),o.jsx(ti,{children:jO.map(B=>o.jsx(Tr,{value:B,children:B.charAt(0).toUpperCase()+B.slice(1).replace("_"," ")},B))})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"datePrevue",children:"Date prévue"}),o.jsx(wt,{id:"datePrevue",type:"date",value:E.datePrevue?new Date(E.datePrevue).toISOString().split("T")[0]:"",onChange:B=>I({...E,datePrevue:B.target.value?new Date(B.target.value):void 0}),className:"h-12","data-testid":"input-scheduled-date"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"kilometragePrevu",children:"Kilométrage prévu"}),o.jsx(wt,{id:"kilometragePrevu",type:"number",placeholder:"50000",value:E.kilometragePrevu||"",onChange:B=>I({...E,kilometragePrevu:B.target.value?parseInt(B.target.value):void 0}),min:"0",className:"h-12","data-testid":"input-scheduled-km"})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"dateEffectuee",children:"Date effectuée"}),o.jsx(wt,{id:"dateEffectuee",type:"date",value:E.dateEffectuee?new Date(E.dateEffectuee).toISOString().split("T")[0]:"",onChange:B=>I({...E,dateEffectuee:B.target.value?new Date(B.target.value):void 0}),className:"h-12","data-testid":"input-done-date"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"kilometrageEffectue",children:"Kilométrage effectué"}),o.jsx(wt,{id:"kilometrageEffectue",type:"number",placeholder:"50000",value:E.kilometrageEffectue||"",onChange:B=>I({...E,kilometrageEffectue:B.target.value?parseInt(B.target.value):void 0}),min:"0",className:"h-12","data-testid":"input-done-km"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"cout",children:"Coût (FCFA)"}),o.jsx(wt,{id:"cout",type:"number",step:"0.01",placeholder:"50000",value:E.cout||"",onChange:B=>I({...E,cout:B.target.value?parseFloat(B.target.value):void 0}),min:"0",className:"h-12","data-testid":"input-cost"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"notes",children:"Notes"}),o.jsx(Nw,{id:"notes",placeholder:"Notes sur la maintenance...",value:E.notes||"",onChange:B=>I({...E,notes:B.target.value||void 0}),rows:3,"data-testid":"textarea-notes"})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>c(!1),"data-testid":"button-cancel",className:"w-full sm:w-auto h-12",children:"Annuler"}),o.jsx(Pe,{type:"submit","data-testid":"button-submit",className:"w-full sm:w-auto h-12",children:"Ajouter"})]})]});return n!==void 0?o.jsx(ci,{open:l,onOpenChange:c,children:o.jsxs(Zn,{className:"sm:max-w-[500px] max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Ajouter une maintenance"}),o.jsx(Ci,{children:"Planifiez ou enregistrez une maintenance pour un véhicule ou une remorque."})]}),_]})}):o.jsxs(ci,{open:l,onOpenChange:c,children:[o.jsx(xg,{asChild:!0,children:r||o.jsxs(Pe,{"data-testid":"button-add-maintenance",className:"w-full md:w-auto",size:"sm",children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Ajouter une maintenance"]})}),o.jsxs(Zn,{className:"sm:max-w-[500px] max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Ajouter une maintenance"}),o.jsx(Ci,{children:"Planifiez ou enregistrez une maintenance pour un véhicule ou une remorque."})]}),_]})]})}function B8e({maintenance:e,onUpdate:t,open:r,onOpenChange:n}){const{data:i=[]}=Ar({queryKey:["/api/vehicles"]}),{data:a=[]}=Ar({queryKey:["/api/trailers"]}),[s,l]=w.useState({type:e.type,datePrevue:e.datePrevue?new Date(e.datePrevue):void 0,kilometragePrevu:e.kilometragePrevu||void 0,dateEffectuee:e.dateEffectuee?new Date(e.dateEffectuee):void 0,kilometrageEffectue:e.kilometrageEffectue||void 0,cout:e.cout||void 0,notes:e.notes||void 0,status:e.status||"planned"});w.useEffect(()=>{l({type:e.type,datePrevue:e.datePrevue?new Date(e.datePrevue):void 0,kilometragePrevu:e.kilometragePrevu||void 0,dateEffectuee:e.dateEffectuee?new Date(e.dateEffectuee):void 0,kilometrageEffectue:e.kilometrageEffectue||void 0,cout:e.cout||void 0,notes:e.notes||void 0,status:e.status||"planned"})},[e]);const c=g=>{g.preventDefault();const A={...s,status:s.dateEffectuee&&s.status==="planned"?"completed":s.status};t?.(A),n(!1)},u=!!e.vehicleId,d=!!e.trailerId,f=u?i.find(g=>g.id===e.vehicleId):null,m=d?a.find(g=>g.id===e.trailerId):null;return o.jsx(ci,{open:r,onOpenChange:n,children:o.jsxs(Zn,{className:"sm:max-w-[500px] max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Modifier la maintenance"}),o.jsx(Ci,{children:"Mettez à jour les informations de cette maintenance."})]}),o.jsxs("form",{onSubmit:c,children:[o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{children:u?"Véhicule":"Remorque"}),o.jsx("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md",children:u?o.jsxs(o.Fragment,{children:[o.jsx(Do,{className:"h-4 w-4"}),o.jsx("span",{children:f?.immatriculation||"Véhicule inconnu"})]}):o.jsxs(o.Fragment,{children:[o.jsx(uo,{className:"h-4 w-4"}),o.jsxs("span",{children:[m?.numeroChassis," ",m?.nom?`- ${m.nom}`:""]})]})})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"type",children:["Type ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsxs(ui,{value:s.type,onValueChange:g=>l({...s,type:g}),required:!0,children:[o.jsx(ei,{id:"type",className:"h-12",children:o.jsx(di,{placeholder:"Sélectionner un type"})}),o.jsx(ti,{children:jO.map(g=>o.jsx(Tr,{value:g,children:g.charAt(0).toUpperCase()+g.slice(1).replace("_"," ")},g))})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"datePrevue",children:"Date prévue"}),o.jsx(wt,{id:"datePrevue",type:"date",value:s.datePrevue?new Date(s.datePrevue).toISOString().split("T")[0]:"",onChange:g=>l({...s,datePrevue:g.target.value?new Date(g.target.value):void 0}),className:"h-12"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"kilometragePrevu",children:"Kilométrage prévu"}),o.jsx(wt,{id:"kilometragePrevu",type:"number",placeholder:"50000",value:s.kilometragePrevu||"",onChange:g=>l({...s,kilometragePrevu:g.target.value?parseInt(g.target.value):void 0}),min:"0",className:"h-12"})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"dateEffectuee",children:"Date effectuée"}),o.jsx(wt,{id:"dateEffectuee",type:"date",value:s.dateEffectuee?new Date(s.dateEffectuee).toISOString().split("T")[0]:"",onChange:g=>l({...s,dateEffectuee:g.target.value?new Date(g.target.value):void 0}),className:"h-12"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"kilometrageEffectue",children:"Kilométrage effectué"}),o.jsx(wt,{id:"kilometrageEffectue",type:"number",placeholder:"50000",value:s.kilometrageEffectue||"",onChange:g=>l({...s,kilometrageEffectue:g.target.value?parseInt(g.target.value):void 0}),min:"0",className:"h-12"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"cout",children:"Coût (FCFA)"}),o.jsx(wt,{id:"cout",type:"number",step:"0.01",placeholder:"50000",value:s.cout||"",onChange:g=>l({...s,cout:g.target.value?parseFloat(g.target.value):void 0}),min:"0",className:"h-12"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"status",children:"Statut"}),o.jsxs(ui,{value:s.status||"planned",onValueChange:g=>l({...s,status:g}),children:[o.jsx(ei,{id:"status",className:"h-12",children:o.jsx(di,{})}),o.jsxs(ti,{children:[o.jsx(Tr,{value:"planned",children:"Planifié"}),o.jsx(Tr,{value:"in_progress",children:"En cours"}),o.jsx(Tr,{value:"completed",children:"Terminé"}),o.jsx(Tr,{value:"overdue",children:"En retard"})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"notes",children:"Notes"}),o.jsx(Nw,{id:"notes",placeholder:"Notes sur la maintenance...",value:s.notes||"",onChange:g=>l({...s,notes:g.target.value||void 0}),rows:3})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>n(!1),className:"w-full sm:w-auto h-12",children:"Annuler"}),o.jsx(Pe,{type:"submit",className:"w-full sm:w-auto h-12",children:"Enregistrer"})]})]})]})})}function N8e(){const[e,t]=w.useState(""),[r,n]=w.useState("all"),[i,a]=w.useState("all"),[s,l]=w.useState(null),[c,u]=w.useState(!1),[d,f]=w.useState(null),[m,g]=w.useState(!1),[A,v]=w.useState(null),{toast:b}=sn(),E=v8e(),[I,S]=w.useState("planned"),[_,B]=w.useState(null),[T,P]=w.useState(null),[O,z]=w.useState(null),[L,W]=w.useState(null),[R,$]=w.useState(null),[X,Z]=w.useState(null),[K,q]=w.useState(!1),[Y,ne]=w.useState(null),[ge,ae]=w.useState(0),[pe,_e]=w.useState(null),[we,xe]=w.useState([]),[Me,ye]=w.useState(""),[Ee,me]=w.useState(""),[Se,Ie]=w.useState(""),[Be,Xe]=w.useState(""),[ke,he]=w.useState(""),[Le,Ye]=w.useState(""),[Oe,it]=w.useState(""),{data:vt=[]}=Ar({queryKey:["/api/vehicles"]}),{data:mt=[]}=Ar({queryKey:["/api/trailers"]}),{data:Qt=[]}=Ar({queryKey:["/api/trips"]}),{data:Ot=[],isLoading:Wt}=Ar({queryKey:["/api/maintenances"],queryFn:()=>Mle()}),Vt=Wt,xr=qr({mutationFn:async Te=>await fr("/api/maintenances",{method:"POST",body:Te}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/maintenances"]}),b({title:"Succès",description:"La maintenance a été ajoutée avec succès"})},onError:Te=>{b({variant:"destructive",title:"Erreur",description:Te.message||"Impossible d'ajouter la maintenance"})}}),Ht=qr({mutationFn:async Te=>await fr(`/api/maintenances/${Te}`,{method:"DELETE"}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/maintenances"]}),b({title:"Succès",description:"La maintenance a été supprimée avec succès"}),l(null)},onError:Te=>{b({variant:"destructive",title:"Erreur",description:Te.message||"Impossible de supprimer la maintenance"})}}),Yt=w.useMemo(()=>{const Te=new Map;return vt.forEach(jt=>{const $r=Qt.filter(Zt=>Zt.vehicleId===jt.id&&Zt.arrivalOdometerKm),Br=$r.length>0?Math.max(...$r.map(Zt=>Zt.arrivalOdometerKm||0)):0,rr=(Ot||[]).filter(Zt=>Zt.vehicleId!==null&&Zt.vehicleId===jt.id&&Zt.kilometrageEffectue),Ne=rr.length>0?Math.max(...rr.map(Zt=>Zt.kilometrageEffectue||0)):0,St=Math.max(Br,Ne);St>0&&Te.set(jt.id,St)}),Te},[vt,Qt,Ot]),hr=w.useMemo(()=>(Ot||[]).map(Te=>{if(Te.status&&Te.status!=="planned")return Te;const jt=Te.vehicleId&&Yt.get(Te.vehicleId)||0,$r=Te.kilometragePrevu&&jt>=Te.kilometragePrevu||Te.datePrevue&&new Date(Te.datePrevue){const Te=new Map,jt=new Map;(hr||[]).forEach(rr=>{if(rr.vehicleId){const Ne=vt.find(St=>St.id===rr.vehicleId);if(!Ne)return;Te.has(Ne.id)||Te.set(Ne.id,{vehicle:Ne,currentMileage:Yt.get(Ne.id)||null,maintenances:[]}),Te.get(Ne.id).maintenances.push(rr)}else if(rr.trailerId){const Ne=mt.find(St=>St.id===rr.trailerId);if(!Ne)return;jt.has(Ne.id)||jt.set(Ne.id,{trailer:Ne,currentMileage:null,maintenances:[]}),jt.get(Ne.id).maintenances.push(rr)}});const $r=Array.from(Te.values()).sort((rr,Ne)=>(rr.vehicle?.immatriculation||"").localeCompare(Ne.vehicle?.immatriculation||"")),Br=Array.from(jt.values()).sort((rr,Ne)=>(rr.trailer?.numeroChassis||"").localeCompare(Ne.trailer?.numeroChassis||""));return[...$r,...Br]},[hr,vt,mt,Yt]),de=w.useMemo(()=>pr.map(Te=>({...Te,maintenances:Te.maintenances.filter(jt=>{const $r=i==="all"||jt.status===i,Br=!e||jt.type.toLowerCase().includes(e.toLowerCase())||Te.vehicle?.immatriculation.toLowerCase().includes(e.toLowerCase())||Te.trailer?.numeroChassis.toLowerCase().includes(e.toLowerCase())||Te.trailer?.nom?.toLowerCase().includes(e.toLowerCase())||!1||jt.notes?.toLowerCase().includes(e.toLowerCase()),rr=r==="all"||Te.vehicle&&Te.vehicle.id.toString()===r||Te.trailer&&Te.trailer.id.toString()===r;return $r&&Br&&rr})})).filter(Te=>Te.maintenances.length>0),[pr,i,e,r]),st=qr({mutationFn:({id:Te,data:jt})=>g8e(Te,jt),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/maintenances"]}),b({title:"Maintenance mise à jour",description:"La maintenance a été mise à jour avec succès."}),g(!1),f(null)},onError:Te=>{b({variant:"destructive",title:"Erreur",description:Te.message||"Impossible de mettre à jour la maintenance"})}}),gt=Te=>{d&&st.mutate({id:d.id,data:Te})},ve=Te=>{f(Te),g(!0)},ce=Te=>{const jt=Te;if(!jt.vehicleId||jt.vehicleId<=0){b({variant:"destructive",title:"Erreur",description:"Veuillez sélectionner un véhicule valide"});return}xr.mutate(jt)},Ge=Te=>{l(Te)},ie=()=>{s&&Ht.mutate(s)},at=Te=>{v(Te),S(Te.status||"planned"),P(Te.photoUrl||null),W(Te.audioUrl||null),Z(Te.justificatifUrl||null);const jt=Te.replacedParts?typeof Te.replacedParts=="string"?JSON.parse(Te.replacedParts):Te.replacedParts:[];xe(Array.isArray(jt)?jt:[]),ye(Te.laborCost?.toString()||""),he(Te.dateEffectuee?new Date(Te.dateEffectuee).toISOString().split("T")[0]:""),Ye(Te.kilometrageEffectue?.toString()||""),it(Te.notes||""),me(""),Ie(""),Xe("")},bt=()=>{v(null),B(null),P(null),z(null),L&&(URL.revokeObjectURL(L),W(null)),$(null),Z(null),xe([]),ye(""),he(""),Ye(""),it(""),me(""),Ie(""),Xe(""),Y&&K&&(Y.stop(),ne(null)),pe&&(clearInterval(pe),_e(null)),q(!1),ae(0)},U=()=>{if(!Ee.trim()||!Se||!Be){b({variant:"destructive",title:"Erreur",description:"Veuillez remplir tous les champs de la pièce"});return}const Te=parseFloat(Se),jt=parseFloat(Be);if(isNaN(Te)||Te<=0||isNaN(jt)||jt<0){b({variant:"destructive",title:"Erreur",description:"La quantité et le coût unitaire doivent être des nombres valides"});return}xe([...we,{name:Ee.trim(),quantity:Te,unitCost:jt}]),me(""),Ie(""),Xe("")},Re=Te=>{xe(we.filter((jt,$r)=>$r!==Te))},He=w.useMemo(()=>we.reduce((Te,jt)=>Te+jt.quantity*jt.unitCost,0),[we]),se=w.useMemo(()=>{const Te=parseFloat(Me)||0;return He+Te},[He,Me]),be=async()=>{if(!A)return;let Te=T,jt=L,$r=X;if(_)try{Te=(await b8e(_)).url}catch{b({variant:"destructive",title:"Erreur",description:"Impossible d'uploader la photo"});return}if(O)try{const Br=new File([O],"maintenance-audio.webm",{type:O.type});jt=(await w8e(Br)).url}catch{b({variant:"destructive",title:"Erreur",description:"Impossible d'uploader l'audio"});return}if(R)try{$r=(await E8e(R)).url}catch{b({variant:"destructive",title:"Erreur",description:"Impossible d'uploader le justificatif"});return}E.treat({maintenanceId:A.id,data:{status:I,photoUrl:Te,audioUrl:jt,replacedParts:we.length>0?we:null,laborCost:Me?parseFloat(Me):null,totalCost:se>0?se:null,justificatifUrl:$r,dateEffectuee:ke?new Date(ke):null,kilometrageEffectue:Le?parseInt(Le):null}}),bt()},We={vidange:"Vidange",filtres:"Filtres",pneus:"Pneus",liquide_frein:"Liquide de frein",adblue:"AdBlue",autre:"Autre"},er={planned:"Planifié",in_progress:"En cours",completed:"Terminé",overdue:"En retard"},zt={planned:"bg-blue-100 text-blue-800 border-blue-300",in_progress:"bg-yellow-100 text-yellow-800 border-yellow-300",completed:"bg-green-100 text-green-800 border-green-300",overdue:"bg-red-100 text-red-800 border-red-300"};return o.jsxs("div",{className:"space-y-4 md:space-y-6 pb-20 md:pb-0",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl md:text-2xl font-semibold","data-testid":"text-page-title",children:"Entretiens"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Gérez les entretiens de vos véhicules"})]}),o.jsxs(Pe,{"data-testid":"button-add-maintenance",className:"w-full md:w-auto",size:"sm",onClick:()=>u(!0),children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Ajouter une maintenance"]}),o.jsx(S8e,{onAdd:ce,open:c,onOpenChange:u})]}),o.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center gap-3",children:[o.jsxs("div",{className:"relative flex-1",children:[o.jsx(U0,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(wt,{placeholder:"Rechercher...",value:e,onChange:Te=>t(Te.target.value),className:"pl-9 h-12","data-testid":"input-search"})]}),o.jsxs(ui,{value:r,onValueChange:n,children:[o.jsx(ei,{className:"h-12 w-full md:w-[200px]",children:o.jsx(di,{placeholder:"Tous les véhicules/remorques"})}),o.jsxs(ti,{children:[o.jsx(Tr,{value:"all",children:"Tous les véhicules/remorques"}),vt.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground",children:"Véhicules"}),vt.map(Te=>o.jsx(Tr,{value:Te.id.toString(),children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Do,{className:"h-4 w-4"}),o.jsx("span",{children:Te.immatriculation})]})},`vehicle-${Te.id}`))]}),mt.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground",children:"Remorques"}),mt.map(Te=>o.jsx(Tr,{value:Te.id.toString(),children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(uo,{className:"h-4 w-4"}),o.jsxs("span",{children:[Te.numeroChassis," ",Te.nom?`- ${Te.nom}`:""]})]})},`trailer-${Te.id}`))]})]})]})]}),Vt?o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):o.jsx(o.Fragment,{children:o.jsxs(vg,{value:i,onValueChange:a,className:"space-y-4",children:[o.jsxs(Bm,{className:"w-full grid grid-cols-5",children:[o.jsx(Ii,{value:"all",className:"text-xs md:text-sm",children:"Tous"}),o.jsx(Ii,{value:"planned",className:"text-xs md:text-sm",children:"Planifiés"}),o.jsx(Ii,{value:"in_progress",className:"text-xs md:text-sm",children:"En cours"}),o.jsx(Ii,{value:"completed",className:"text-xs md:text-sm",children:"Terminés"}),o.jsx(Ii,{value:"overdue",className:"text-xs md:text-sm",children:"En retard"})]}),o.jsx(Ms,{value:i,className:"mt-0",children:o.jsxs("div",{className:"space-y-6",children:[de.map(Te=>{const jt=Te.maintenances.filter(Ne=>Ne.status==="overdue").length,$r=!!Te.vehicle;Te.trailer;const Br=$r?Te.vehicle.immatriculation:Te.trailer.numeroChassis+(Te.trailer.nom?` - ${Te.trailer.nom}`:""),rr=$r?Te.vehicle.photoUrl:Te.trailer.photoUrl;return o.jsxs(_t,{className:"overflow-hidden",children:[o.jsx(Xr,{className:"pb-4",children:o.jsxs("div",{className:"flex items-start gap-4",children:[rr&&o.jsx("img",{src:hn(rr)||void 0,alt:Br,className:"w-20 h-20 object-cover rounded-lg border flex-shrink-0",onError:Ne=>{Ne.target.style.display="none"}}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs(cn,{className:"text-lg mb-1 flex items-center gap-2",children:[$r?o.jsx(Do,{className:"h-5 w-5"}):o.jsx(uo,{className:"h-5 w-5"}),$r?"Véhicule":"Remorque",": ",Br]}),o.jsx(Qi,{className:"mb-2",children:$r&&Te.currentMileage?`Kilométrage actuel: ${Te.currentMileage.toLocaleString()} km`:$r?"Kilométrage non disponible":"Remorque (pas de kilométrage)"}),jt>0&&o.jsxs(ir,{variant:"destructive",className:"text-xs",children:["⚠️ ",jt," entretien",jt>1?"s":""," en retard"]})]})]})}),o.jsx(ar,{children:o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:Te.maintenances.map(Ne=>{const St=Ne;return o.jsxs(_t,{className:"overflow-hidden border-blue-200",children:[St.photoUrl&&o.jsxs("div",{className:"relative w-full aspect-video overflow-hidden rounded-t-xl bg-muted mb-3",children:[o.jsx("img",{src:hn(St.photoUrl)||void 0,alt:We[Ne.type]||Ne.type,className:"w-full h-full object-cover",onError:Zt=>{Zt.target.style.display="none"}}),o.jsx("div",{className:"absolute top-3 left-3 z-10",children:o.jsx(Pe,{size:"icon",variant:"secondary",className:"h-12 w-12 rounded-full bg-background/90 backdrop-blur-sm border shadow-sm hover:bg-background/95 cursor-pointer p-0",onClick:Zt=>{Zt.stopPropagation(),at(Ne)},title:"Traiter l'entretien",children:o.jsx("span",{className:"text-2xl",children:qv[Ne.type]||qv.autre})})}),o.jsx(H2,{type:"maintenance",data:{immatriculation:$r?Te.vehicle.immatriculation:Te.trailer.numeroChassis+(Te.trailer.nom?` - ${Te.trailer.nom}`:"")}})]}),o.jsx(Xr,{className:"pb-3",children:o.jsxs("div",{className:"flex items-start justify-between gap-2",children:[o.jsxs("div",{className:"flex-1",children:[!St.photoUrl&&o.jsx("div",{className:"flex items-center gap-3 mb-2",children:o.jsx(Pe,{size:"icon",variant:"secondary",className:"h-12 w-12 rounded-full bg-background/90 backdrop-blur-sm border shadow-sm hover:bg-background/95 cursor-pointer p-0",onClick:Zt=>{Zt.stopPropagation(),at(Ne)},title:"Traiter l'entretien",children:o.jsx("span",{className:"text-2xl",children:qv[Ne.type]||qv.autre})})}),o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(X8,{type:We[Ne.type]||Ne.type,variant:"maintenance",size:"sm"}),o.jsx(ir,{variant:"outline",className:`text-xs ${zt[Ne.status||"planned"]}`,children:er[Ne.status||"planned"]})]}),o.jsx(cn,{className:"text-base",children:We[Ne.type]||Ne.type})]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Cx,{cardData:{type:"maintenance",title:We[Ne.type]||Ne.type,details:{type:We[Ne.type]||Ne.type,vehicule:$r?Te.vehicle.immatriculation:Te.trailer.numeroChassis+(Te.trailer.nom?` - ${Te.trailer.nom}`:""),date:Ne.datePrevue?Kr(new Date(Ne.datePrevue),"dd/MM/yyyy",{locale:tn}):void 0,dateEffectuee:Ne.dateEffectuee?Kr(new Date(Ne.dateEffectuee),"dd/MM/yyyy",{locale:tn}):void 0,cout:Ne.cout?`${Ne.cout.toLocaleString()} FCFA`:void 0}},size:"sm"}),o.jsx(Pe,{size:"icon",variant:"ghost",onClick:()=>ve(Ne),className:"h-8 w-8 flex-shrink-0",title:"Modifier la maintenance",children:o.jsx(_1,{className:"h-4 w-4"})}),o.jsx(Pe,{size:"icon",variant:"ghost",onClick:()=>Ge(Ne.id),className:"h-8 w-8 flex-shrink-0",children:o.jsx(fo,{className:"h-4 w-4"})})]})]})}),o.jsxs(ar,{className:"space-y-2 text-sm md:space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 md:gap-3",children:[Ne.datePrevue&&o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"Date prévue: "}),o.jsx("span",{className:"font-medium",children:Kr(new Date(Ne.datePrevue),"dd/MM/yyyy",{locale:tn})})]}),Ne.kilometragePrevu&&o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"Km prévu: "}),o.jsxs("span",{className:"font-medium",children:[Ne.kilometragePrevu.toLocaleString()," km"]})]}),Ne.dateEffectuee&&o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"Date effectuée: "}),o.jsx("span",{className:"font-medium",children:Kr(new Date(Ne.dateEffectuee),"dd/MM/yyyy",{locale:tn})})]}),Ne.kilometrageEffectue&&o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"Km effectué: "}),o.jsxs("span",{className:"font-medium",children:[Ne.kilometrageEffectue.toLocaleString()," km"]})]})]}),(Ne.cout||Ne.totalCost)&&o.jsxs("div",{className:"pt-2 border-t",children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"Coût: "}),o.jsxs("span",{className:"font-semibold text-base",children:[(Ne.totalCost||Ne.cout||0).toLocaleString()," FCFA"]})]}),Ne.notes&&o.jsx("div",{className:"pt-2 border-t",children:o.jsx("p",{className:"text-muted-foreground text-xs md:text-sm",children:Ne.notes})})]})]},Ne.id)})})})]},$r?`vehicle-${Te.vehicle.id}`:`trailer-${Te.trailer.id}`)}),de.length===0&&o.jsx("div",{className:"text-center py-12",children:o.jsx("p",{className:"text-muted-foreground",children:"Aucun entretien trouvé"})})]})})]})}),o.jsx(pm,{open:s!==null,onOpenChange:()=>l(null),children:o.jsxs(qf,{children:[o.jsxs(Kf,{children:[o.jsx(Yf,{children:"Confirmer la suppression"}),o.jsx(Zf,{children:"Êtes-vous sûr de vouloir supprimer cette maintenance ? Cette action est irréversible."})]}),o.jsxs(Vf,{children:[o.jsx(Xf,{children:"Annuler"}),o.jsx(Jf,{onClick:ie,children:"Supprimer"})]})]})}),o.jsx(ci,{open:A!==null,onOpenChange:Te=>!Te&&bt(),children:o.jsxs(Zn,{className:"sm:max-w-[600px] max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Traiter l'entretien"}),o.jsx(Ci,{children:A&&`${We[A.type]||A.type} - ${vt.find(Te=>Te.id===A.vehicleId)?.immatriculation}`})]}),A&&o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"treatment-status",children:"Statut"}),o.jsxs(ui,{value:I,onValueChange:Te=>S(Te),children:[o.jsx(ei,{id:"treatment-status",children:o.jsx(di,{})}),o.jsxs(ti,{children:[o.jsx(Tr,{value:"planned",children:"Planifié"}),o.jsx(Tr,{value:"in_progress",children:"En cours"}),o.jsx(Tr,{value:"completed",children:"Terminé"}),o.jsx(Tr,{value:"overdue",children:"En retard"})]})]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"treatment-date-effectuee",children:"Date effectuée"}),o.jsx(wt,{id:"treatment-date-effectuee",type:"date",value:ke,onChange:Te=>he(Te.target.value),className:"h-12"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"treatment-km-effectue",children:"Kilométrage effectué"}),o.jsx(wt,{id:"treatment-km-effectue",type:"number",placeholder:"125000",value:Le,onChange:Te=>Ye(Te.target.value),className:"h-12"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{children:"Pièces remplacées"}),o.jsxs("div",{className:"space-y-2",children:[we.map((Te,jt)=>o.jsxs("div",{className:"flex items-center gap-2 p-2 border rounded",children:[o.jsxs("div",{className:"flex-1 text-sm",children:[o.jsx("span",{className:"font-medium",children:Te.name})," × ",Te.quantity," = ",(Te.quantity*Te.unitCost).toLocaleString()," FCFA"]}),o.jsx(Pe,{size:"icon",variant:"ghost",onClick:()=>Re(jt),className:"h-8 w-8",children:o.jsx(ay,{className:"h-4 w-4"})})]},jt)),o.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[o.jsx(wt,{placeholder:"Nom",value:Ee,onChange:Te=>me(Te.target.value),className:"h-10"}),o.jsx(wt,{placeholder:"Qté",type:"number",value:Se,onChange:Te=>Ie(Te.target.value),className:"h-10"}),o.jsx(wt,{placeholder:"Prix unit.",type:"number",value:Be,onChange:Te=>Xe(Te.target.value),className:"h-10"}),o.jsx(Pe,{onClick:U,className:"h-10",children:o.jsx(Ma,{className:"h-4 w-4"})})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"labor-cost",children:"Main d'œuvre (FCFA)"}),o.jsx(wt,{id:"labor-cost",type:"number",placeholder:"0",value:Me,onChange:Te=>ye(Te.target.value),className:"h-12"})]}),o.jsx("div",{className:"p-3 bg-muted rounded-lg",children:o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-muted-foreground",children:"Coût total:"}),o.jsxs("span",{className:"font-semibold text-base",children:[se.toLocaleString()," FCFA"]})]})}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{children:"Photo"}),T&&o.jsx("div",{className:"relative w-full aspect-video mb-2",children:o.jsx("img",{src:T,alt:"Photo entretien",className:"w-full h-full object-cover rounded-lg border"})}),o.jsx(wt,{type:"file",accept:"image/*",onChange:Te=>{const jt=Te.target.files?.[0];jt&&(B(jt),P(URL.createObjectURL(jt)))},className:"h-12"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{children:"Justificatif (facture/reçu)"}),X&&o.jsx("div",{className:"mb-2",children:o.jsx("a",{href:X,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary hover:underline",children:"Voir le justificatif"})}),o.jsx(wt,{type:"file",accept:"image/*,.pdf",onChange:Te=>{const jt=Te.target.files?.[0];jt&&$(jt)},className:"h-12"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"treatment-notes",children:"Notes"}),o.jsx(Nw,{id:"treatment-notes",placeholder:"Notes sur l'entretien...",value:Oe,onChange:Te=>it(Te.target.value),rows:3})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:bt,className:"w-full sm:w-auto h-12",children:"Annuler"}),o.jsx(Pe,{type:"button",onClick:be,disabled:E.isTreating,className:"w-full sm:w-auto h-12",children:E.isTreating?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Enregistrement..."]}):"Enregistrer"})]})]})}),o.jsx(wg,{onClick:()=>u(!0),label:"Ajouter un entretien"}),d&&o.jsx(B8e,{maintenance:d,onUpdate:gt,open:m,onOpenChange:g})]})}function ZL({type:e,variant:t="maintenance",size:r="md",showLabel:n=!1,className:i=""}){const a=t==="maintenance"?qv:Kv,s=a[e]||a.autre||"⚙️",l={sm:"text-lg",md:"text-2xl",lg:"text-3xl"},c={sm:"h-8 w-8 p-1.5",md:"h-12 w-12 p-2",lg:"h-16 w-16 p-3"};return o.jsxs("div",{className:`flex items-center gap-2 ${i}`,children:[o.jsx(ir,{variant:"secondary",className:`${c[r]} rounded-full flex items-center justify-center bg-background/90 backdrop-blur-sm border shadow-sm ${t==="breakdown"?"border-red-300 bg-red-50/90":""}`,children:o.jsx("span",{className:l[r],children:s})}),n&&o.jsx("span",{className:"text-sm font-medium",children:e})]})}const k8e=[{value:"moteur",label:"Moteur",icon:_1},{value:"frein",label:"Frein",icon:C3},{value:"pneu",label:"Pneu",icon:I3},{value:"electrique",label:"Électrique",icon:B3},{value:"autre",label:"Autre incident",icon:yx}];function Lle({vehicleId:e,onAdd:t,trigger:r,open:n,onOpenChange:i}){const{toast:a}=sn(),[s,l]=w.useState(!1),c=n!==void 0?n:s,u=i||l,[d,f]=w.useState(""),[m,g]=w.useState(null),[A,v]=w.useState(null),[b,E]=w.useState(null),[I,S]=w.useState(null),[_,B]=w.useState(!1),[T,P]=w.useState(null),[O,z]=w.useState(null),[L,W]=w.useState(0),[R,$]=w.useState(null),[X,Z]=w.useState(!1),K=()=>navigator.mediaDevices&&navigator.mediaDevices.getUserMedia&&window.MediaRecorder&&(window.location.protocol==="https:"||window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),q=xe=>{const Me=Math.floor(xe/60),ye=xe%60;return`${Me.toString().padStart(2,"0")}:${ye.toString().padStart(2,"0")}`},Y=async()=>{try{if(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia){a({variant:"destructive",title:"Erreur",description:"Votre navigateur ne supporte pas l'enregistrement audio."});return}if(!window.MediaRecorder){a({variant:"destructive",title:"Erreur",description:"Votre navigateur ne supporte pas l'enregistrement audio."});return}const xe=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),Me=["audio/webm","audio/webm;codecs=opus","audio/ogg;codecs=opus","audio/mp4","audio/mpeg"];let ye="";for(const Be of Me)if(MediaRecorder.isTypeSupported(Be)){ye=Be;break}const Ee=ye?{mimeType:ye}:{},me=new MediaRecorder(xe,Ee),Se=[];me.ondataavailable=Be=>{Be.data.size>0&&Se.push(Be.data)},me.onstop=()=>{const Be=new Blob(Se,{type:me.mimeType||"audio/webm"});v(Be);const Xe=URL.createObjectURL(Be);z(Xe),xe.getTracks().forEach(ke=>ke.stop()),R&&(clearInterval(R),$(null)),W(0)},me.onerror=Be=>{console.error("MediaRecorder error:",Be),a({variant:"destructive",title:"Erreur d'enregistrement",description:"Une erreur s'est produite pendant l'enregistrement."}),xe.getTracks().forEach(Xe=>Xe.stop()),B(!1),P(null)},me.start(),P(me),B(!0),W(0);const Ie=setInterval(()=>{W(Be=>Be+1)},1e3);$(Ie)}catch(xe){console.error("Error starting recording:",xe);let Me="Impossible d'accéder au microphone";xe.name==="NotAllowedError"||xe.name==="PermissionDeniedError"?Me="Permission refusée. Veuillez autoriser l'accès au microphone.":xe.name==="NotFoundError"||xe.name==="DevicesNotFoundError"?Me="Aucun microphone trouvé.":(xe.name==="NotReadableError"||xe.name==="TrackStartError")&&(Me="Le microphone est déjà utilisé par une autre application."),a({variant:"destructive",title:"Erreur d'accès au microphone",description:Me})}},ne=()=>{T&&_&&(T.stop(),B(!1),P(null),R&&(clearInterval(R),$(null)))},ge=()=>{O&&(URL.revokeObjectURL(O),z(null)),v(null)},ae=async xe=>{const Me=xe.target.files?.[0];if(Me){if(!Me.type.startsWith("video/")){a({variant:"destructive",title:"Erreur",description:"Veuillez sélectionner un fichier vidéo"});return}if(Me.size>20*1024*1024){a({variant:"destructive",title:"Erreur",description:"La vidéo est trop volumineuse (max 20MB)"});return}try{const ye=document.createElement("video");ye.preload="metadata",ye.src=URL.createObjectURL(Me),ye.onloadedmetadata=()=>{window.URL.revokeObjectURL(ye.src);const Ee=ye.duration;if(Ee>15){a({variant:"destructive",title:"Erreur",description:`La vidéo est trop longue (${Math.ceil(Ee)}s). Durée maximum : 15 secondes`});return}if(ye.videoWidth>1280||ye.videoHeight>720){a({variant:"destructive",title:"Erreur",description:`La résolution est trop élevée (${ye.videoWidth}x${ye.videoHeight}). Maximum : 1280x720 (720p)`});return}E(Me),S(URL.createObjectURL(Me))},ye.onerror=()=>{window.URL.revokeObjectURL(ye.src),a({variant:"destructive",title:"Erreur",description:"Impossible de lire le fichier vidéo"})}}catch{a({variant:"destructive",title:"Erreur",description:"Erreur lors de la validation de la vidéo"})}}},pe=()=>{E(null),I&&(URL.revokeObjectURL(I),S(null))},_e=xe=>{u(xe),xe||(f(""),g(null),v(null),E(null),W(0),O&&(URL.revokeObjectURL(O),z(null)),I&&(URL.revokeObjectURL(I),S(null)),_&&T&&(T.stop(),B(!1),P(null)),R&&(clearInterval(R),$(null)))},we=async xe=>{if(xe.preventDefault(),!d){a({variant:"destructive",title:"Erreur",description:"Veuillez sélectionner un type de problème"});return}Z(!0);try{let Me,ye,Ee,me,Se,Ie;if(m){const Xe=await AE(m);Me=Xe.url,me=Xe.publicId}if(A){const Xe=new File([A],"recording.webm",{type:"audio/webm"}),ke=await KC(Xe);ye=ke.url,Se=ke.publicId}if(b){const Xe=await J8(b);Ee=Xe.url,Ie=Xe.publicId}const Be={vehicleId:e,type:d,date:new Date().toISOString().split("T")[0],description:void 0,photoUrl:Me,audioUrl:ye,videoUrl:Ee,photoCloudinaryPublicId:me,audioCloudinaryPublicId:Se,videoCloudinaryPublicId:Ie,lieu:void 0};t?.(Be),_e(!1)}catch(Me){console.error("Error uploading files:",Me),a({variant:"destructive",title:"Erreur",description:"Erreur lors de l'upload des fichiers"})}finally{Z(!1)}};return o.jsxs(ci,{open:c,onOpenChange:_e,children:[o.jsx(xg,{asChild:!0,children:r||o.jsxs(Pe,{"data-testid":"button-add-breakdown",className:"w-full md:w-auto",size:"sm",children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Enregistrer une panne"]})}),o.jsxs(Zn,{className:"sm:max-w-[500px] mx-4 max-h-[90vh] overflow-y-auto",children:[o.jsx(Jn,{children:o.jsx(Xn,{className:"text-xl md:text-2xl text-center",children:"Signaler un problème"})}),o.jsxs("form",{onSubmit:we,children:[o.jsxs("div",{className:"space-y-6 py-4",children:[o.jsx("div",{children:o.jsx("div",{className:"grid grid-cols-2 gap-3 md:gap-4",children:k8e.map(xe=>{const Me=xe.icon,ye=d===xe.value;return o.jsxs(Pe,{type:"button",variant:ye?"default":"outline",className:`h-24 md:h-28 flex-col gap-2 rounded-xl transition-all ${ye?"ring-4 ring-primary/30 shadow-lg scale-105":"hover:scale-105"}`,onClick:()=>f(xe.value),children:[o.jsx(Me,{className:`h-8 w-8 md:h-10 md:w-10 ${ye?"text-primary-foreground":"text-primary"}`}),o.jsx("span",{className:`text-xs md:text-sm font-semibold ${ye?"text-primary-foreground":""}`,children:xe.label})]},xe.value)})})}),o.jsx("div",{children:m?o.jsxs("div",{className:"space-y-3",children:[o.jsx("img",{src:URL.createObjectURL(m),alt:"Aperçu",className:"w-full h-48 md:h-64 object-cover rounded-xl border-2"}),o.jsxs(Pe,{type:"button",variant:"outline",size:"lg",onClick:()=>g(null),className:"w-full",children:[o.jsx(fo,{className:"h-4 w-4 mr-2"}),"Supprimer la photo"]})]}):o.jsxs("label",{htmlFor:"breakdown-photo",className:"block w-full border-2 border-dashed border-muted-foreground/30 rounded-xl p-8 md:p-12 text-center cursor-pointer hover:border-primary/50 transition-colors",children:[o.jsx(_u,{className:"h-12 w-12 md:h-16 md:w-16 text-muted-foreground mx-auto mb-3"}),o.jsx("p",{className:"text-sm md:text-base font-medium",children:"Prendre une photo"}),o.jsx(wt,{id:"breakdown-photo",type:"file",accept:"image/*",capture:"environment",onChange:xe=>{const Me=xe.target.files?.[0];Me&&g(Me)},className:"hidden"})]})}),o.jsxs("div",{className:"space-y-4",children:[!O&&!_&&o.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[o.jsx("button",{type:"button",onClick:Y,disabled:!K(),className:"w-24 h-24 md:w-28 md:h-28 rounded-full bg-white dark:bg-background border-4 border-primary/30 flex items-center justify-center cursor-pointer hover:border-primary/50 transition-all hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed animate-pulse",children:o.jsx(bd,{className:"h-10 w-10 md:h-12 md:w-12 text-primary"})}),o.jsx("p",{className:"text-sm md:text-base font-medium",children:"Appuie pour parler"}),!K()&&o.jsx("p",{className:"text-xs text-orange-600 dark:text-orange-400 text-center",children:"⚠️ HTTPS requis pour l'enregistrement"})]}),_&&o.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[o.jsx("button",{type:"button",onClick:ne,className:"w-28 h-28 md:w-32 md:h-32 rounded-full bg-red-600 flex items-center justify-center cursor-pointer hover:bg-red-700 transition-all hover:scale-105 active:scale-95 shadow-lg ring-4 ring-red-200 dark:ring-red-900/50 animate-pulse",children:o.jsx(uP,{className:"h-12 w-12 md:h-14 md:w-14 text-white"})}),o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"text-lg md:text-xl font-bold text-red-600 mb-1",children:q(L)}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Enregistrement en cours..."})]})]}),O&&!_&&o.jsxs("div",{className:"space-y-4",children:[o.jsx("div",{className:"bg-muted/50 rounded-xl p-4",children:o.jsxs("audio",{controls:!0,className:"w-full h-12",children:[o.jsx("source",{src:O,type:"audio/webm"}),o.jsx("source",{src:O,type:"audio/mpeg"})]})}),o.jsxs("div",{className:"flex gap-3",children:[o.jsxs(Pe,{type:"button",variant:"outline",size:"lg",onClick:ge,className:"flex-1",children:[o.jsx(fo,{className:"h-4 w-4 mr-2"}),"Supprimer"]}),o.jsxs(Pe,{type:"button",variant:"outline",size:"lg",onClick:Y,className:"flex-1",disabled:!K(),children:[o.jsx(bd,{className:"h-4 w-4 mr-2"}),"Réenregistrer"]})]})]})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium mb-2 text-center",children:"Vidéo (optionnel - max 15s, 720p)"}),b?o.jsxs("div",{className:"space-y-3",children:[o.jsx("video",{src:I||void 0,controls:!0,className:"w-full h-48 md:h-64 object-cover rounded-xl border-2"}),o.jsxs(Pe,{type:"button",variant:"outline",size:"lg",onClick:pe,className:"w-full",children:[o.jsx(fo,{className:"h-4 w-4 mr-2"}),"Supprimer la vidéo"]})]}):o.jsxs("label",{htmlFor:"breakdown-video",className:"block w-full border-2 border-dashed border-muted-foreground/30 rounded-xl p-8 md:p-12 text-center cursor-pointer hover:border-primary/50 transition-colors",children:[o.jsx(Q2,{className:"h-12 w-12 md:h-16 md:w-16 text-muted-foreground mx-auto mb-3"}),o.jsx("p",{className:"text-sm md:text-base font-medium",children:"Ajouter une vidéo"}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Max 15 secondes, résolution 720p"}),o.jsx(wt,{id:"breakdown-video",type:"file",accept:"video/*",capture:"environment",onChange:ae,className:"hidden"})]})]})]}),o.jsxs(ji,{className:"gap-3 flex-col sm:flex-row pt-4 border-t",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>_e(!1),className:"w-full sm:w-auto h-12",children:"Annuler"}),o.jsx(Pe,{type:"submit",className:"bg-orange-600 hover:bg-orange-700 w-full sm:w-auto h-12 text-base font-semibold",disabled:!d||X,children:X?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Envoi..."]}):"Signaler"})]})]})]})]})}function _8e(){const{toast:e}=sn(),t=zu(),r=qr({mutationFn:({breakdownId:n,data:i})=>xSe(n,i),onSuccess:()=>{t.invalidateQueries({queryKey:["/api/breakdowns"]}),t.invalidateQueries({queryKey:["/api/driver/mission"]}),e({title:"Message vocal envoyé au chauffeur",description:"La réponse a été envoyée avec succès."})},onError:n=>{e({variant:"destructive",title:"Erreur",description:n.message||"Impossible d'envoyer la réponse"})}});return{respond:r.mutate,isResponding:r.isPending}}function j8e(){const[e,t]=w.useState(""),[r,n]=w.useState("all"),[i,a]=w.useState(null),[s,l]=w.useState(!1),{toast:c}=sn(),{data:u}=j1(),[d,f]=w.useState(null),[m,g]=w.useState("pending"),[A,v]=w.useState(null),[b,E]=w.useState(null),[I,S]=w.useState(!1),[_,B]=w.useState(null),[T,P]=w.useState(0),[O,z]=w.useState(null),[L,W]=w.useState([]),[R,$]=w.useState(""),[X,Z]=w.useState(""),[K,q]=w.useState(""),[Y,ne]=w.useState(""),ge=_8e(),{data:ae=[]}=Ar({queryKey:["/api/vehicles"]}),{data:pe=[],isLoading:_e}=Ar({queryKey:["/api/breakdowns",r!=="all"?{vehicleId:parseInt(r)}:{}],queryFn:async()=>{const ve=r!=="all"?`/api/breakdowns?vehicleId=${r}`:"/api/breakdowns";return await fr(ve)}}),{data:we=[],isLoading:xe}=Ar({queryKey:["/api/missions"],queryFn:()=>DO()}),{data:Me=[],isLoading:ye}=Ar({queryKey:["/api/trips"]}),{data:Ee=[]}=Ar({queryKey:["/api/crew-members"]}),me=_e||xe||ye,Se=qr({mutationFn:async ve=>await fr("/api/breakdowns",{method:"POST",body:ve}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/breakdowns"]}),c({title:"Succès",description:"La panne a été enregistrée avec succès"})},onError:ve=>{c({variant:"destructive",title:"Erreur",description:ve.message||"Impossible d'enregistrer la panne"})}}),Ie=qr({mutationFn:async ve=>{try{return await fr(`/api/breakdowns/${ve}`,{method:"DELETE"})}catch(ce){throw console.error("Error deleting breakdown:",ce),ce}},onSuccess:()=>{br.invalidateQueries({queryKey:["/api/breakdowns"]}),c({title:"Succès",description:"La panne a été supprimée avec succès"}),a(null)},onError:ve=>{console.error("Delete breakdown error:",ve),c({variant:"destructive",title:"Erreur",description:ve.message||"Impossible de supprimer la panne. Vérifiez vos permissions."}),a(null)}});w.useMemo(()=>{const ve=new Map;return Me.forEach(ce=>{if(ce.vehicleId){const Ge=ve.get(ce.vehicleId)||[];ve.set(ce.vehicleId,[...Ge,ce])}}),ve},[Me]);const Be=w.useMemo(()=>{const ve=new Map;return Me.forEach(ce=>{if(ce.vehicleId&&ce.missionId){const Ge=we.find(ie=>ie.id===ce.missionId);if(Ge){const ie=ve.get(ce.vehicleId)||[];ie.find(at=>at.id===Ge.id)||ve.set(ce.vehicleId,[...ie,Ge])}}}),ve},[Me,we]),Xe=w.useMemo(()=>{const ve=new Map;return pe.forEach(ce=>{const Ge=ae.find(at=>at.id===ce.vehicleId);if(!Ge)return;const ie=Be.get(ce.vehicleId)||[];if(ie.length>0){const at=ie[0],bt=at.mainDriver||null;ve.has(at.id)||ve.set(at.id,{mission:at,vehicle:Ge,driver:bt,breakdowns:[]}),ve.get(at.id).breakdowns.push(ce)}}),Array.from(ve.values())},[pe,ae,Be]),ke=w.useMemo(()=>pe.filter(ve=>(Be.get(ve.vehicleId)||[]).length===0),[pe,Be]),he=w.useMemo(()=>e?Xe.map(ve=>({...ve,breakdowns:ve.breakdowns.filter(ce=>ce.type.toLowerCase().includes(e.toLowerCase())||ve.vehicle.immatriculation.toLowerCase().includes(e.toLowerCase())||ce.description?.toLowerCase().includes(e.toLowerCase())||ce.lieu?.toLowerCase().includes(e.toLowerCase())||ve.mission.title?.toLowerCase().includes(e.toLowerCase()))})).filter(ve=>ve.breakdowns.length>0):Xe,[Xe,e]),Le=w.useMemo(()=>e?ke.filter(ve=>{const ce=ae.find(Ge=>Ge.id===ve.vehicleId);return ve.type.toLowerCase().includes(e.toLowerCase())||ce?.immatriculation.toLowerCase().includes(e.toLowerCase())||ve.description?.toLowerCase().includes(e.toLowerCase())||ve.lieu?.toLowerCase().includes(e.toLowerCase())}):ke,[ke,e,ae]),Ye=ve=>{if(!ve)return null;try{const ce=typeof ve=="string"?JSON.parse(ve):ve;if(!Array.isArray(ce)||ce.length===0)return null;const Ge=ce.reduce((ie,at)=>ie+at.quantity*at.unitCost,0);return o.jsxs("div",{className:"space-y-1",children:[ce.map((ie,at)=>o.jsxs("div",{className:"text-xs",children:[o.jsx("span",{className:"font-medium",children:ie.name})," ","× ",ie.quantity," = ",(ie.quantity*ie.unitCost).toLocaleString()," FCFA"]},at)),o.jsxs("div",{className:"text-xs font-medium",children:["Total pièces: ",Ge.toLocaleString()," FCFA"]})]})}catch{return null}},Oe=ve=>{Se.mutate(ve)},it=ve=>{a(ve)},vt=()=>{i&&Ie.mutate(i)},mt=u&&typeof u=="object"&&u!==null&&"role"in u&&(u.role==="admin"||u.role==="gestionnaire_parc"||u.role==="atelier"),Qt=ve=>{f(ve);const ce=ve.status||"pending";g(ce==="pending"?"in_progress":ce),v(null),E(ve.responseAudioUrl||null),S(!1),B(null),P(0);const ie=ve.replacedParts?typeof ve.replacedParts=="string"?JSON.parse(ve.replacedParts):ve.replacedParts:[];W(Array.isArray(ie)?ie:[]),$(ve.laborCost?.toString()||""),Z(""),q(""),ne("")},Ot=()=>{f(null),g("pending"),v(null),b&&(URL.revokeObjectURL(b),E(null)),S(!1),_&&(_.stop(),B(null)),O&&(clearInterval(O),z(null)),P(0),W([]),$(""),Z(""),q(""),ne("")},Wt=()=>{if(!X.trim()||!K||!Y){c({variant:"destructive",title:"Erreur",description:"Veuillez remplir tous les champs de la pièce"});return}const ve=parseFloat(K),ce=parseFloat(Y);if(isNaN(ve)||ve<=0||isNaN(ce)||ce<0){c({variant:"destructive",title:"Erreur",description:"La quantité et le coût unitaire doivent être des nombres valides"});return}W([...L,{name:X.trim(),quantity:ve,unitCost:ce}]),Z(""),q(""),ne("")},Vt=ve=>{W(L.filter((ce,Ge)=>Ge!==ve))},xr=w.useMemo(()=>L.reduce((ve,ce)=>ve+ce.quantity*ce.unitCost,0),[L]),Ht=w.useMemo(()=>{const ve=parseFloat(R)||0;return xr+ve},[xr,R]),Yt=ve=>{const ce=Math.floor(ve/60),Ge=ve%60;return`${ce.toString().padStart(2,"0")}:${Ge.toString().padStart(2,"0")}`},hr=w.useMemo(()=>!!(typeof navigator<"u"&&navigator.mediaDevices&&typeof navigator.mediaDevices.getUserMedia=="function"&&typeof window<"u"&&typeof window.MediaRecorder<"u"&&(window.location.protocol==="https:"||window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1")),[]),pr=async()=>{try{if(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia){c({variant:"destructive",title:"Erreur",description:"Votre navigateur ne supporte pas l'enregistrement audio."});return}if(!window.MediaRecorder){c({variant:"destructive",title:"Erreur",description:"Votre navigateur ne supporte pas l'enregistrement audio."});return}const ve=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),ce=["audio/webm","audio/webm;codecs=opus","audio/ogg;codecs=opus","audio/mp4","audio/mpeg"];let Ge="";for(const Re of ce)if(MediaRecorder.isTypeSupported(Re)){Ge=Re;break}const ie=Ge?{mimeType:Ge}:{},at=new MediaRecorder(ve,ie),bt=[];at.ondataavailable=Re=>{Re.data.size>0&&bt.push(Re.data)},at.onstop=()=>{const Re=new Blob(bt,{type:at.mimeType||"audio/webm"});v(Re);const He=URL.createObjectURL(Re);E(He),ve.getTracks().forEach(se=>se.stop()),O&&(clearInterval(O),z(null)),P(0)},at.onerror=Re=>{console.error("MediaRecorder error:",Re),c({variant:"destructive",title:"Erreur d'enregistrement",description:"Une erreur s'est produite pendant l'enregistrement."}),ve.getTracks().forEach(He=>He.stop()),S(!1),B(null)},at.start(),B(at),S(!0),P(0);const U=setInterval(()=>{P(Re=>Re+1)},1e3);z(U)}catch(ve){console.error("Error starting recording:",ve),c({variant:"destructive",title:"Erreur",description:"Impossible d'accéder au microphone. Vérifiez les permissions."})}},de=()=>{_&&I&&(_.stop(),S(!1),B(null),O&&(clearInterval(O),z(null)))},st=()=>{b&&(URL.revokeObjectURL(b),E(null)),v(null)},gt=async()=>{if(!d)return;let ve=null;if(A)try{const U=new File([A],"response-audio.webm",{type:A.type});ve=(await KC(U)).url}catch(U){console.error("Error uploading response audio:",U),c({variant:"destructive",title:"Erreur",description:"Impossible d'uploader l'enregistrement audio"});return}else d.responseAudioUrl&&(ve=d.responseAudioUrl);let ce=m;(d.status||"pending")==="pending"&&(ve||m!=="pending")&&m==="pending"?ce="in_progress":ce=m;const ie=L.length>0?L:null,at=R?parseFloat(R):null,bt=Ht>0?Ht:null;ge.respond({breakdownId:d.id,data:{status:ce,responseAudioUrl:ve,replacedParts:ie,laborCost:at,totalRepairCost:bt}}),Ot()};return o.jsxs("div",{className:"space-y-4 md:space-y-6 pb-20 md:pb-0",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl md:text-2xl font-semibold","data-testid":"text-page-title",children:"Pannes et alertes"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Consultez les problèmes signalés par les chauffeurs et répondez-leur"})]}),r!=="all"&&o.jsx(Lle,{vehicleId:parseInt(r),onAdd:Oe,open:s,onOpenChange:l})]}),o.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center gap-3",children:[o.jsxs("div",{className:"relative flex-1",children:[o.jsx(U0,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(wt,{placeholder:"Rechercher...",value:e,onChange:ve=>t(ve.target.value),className:"pl-9 h-12","data-testid":"input-search"})]}),o.jsxs(ui,{value:r,onValueChange:n,children:[o.jsx(ei,{className:"h-12 w-full md:w-[200px]",children:o.jsx(di,{placeholder:"Tous les véhicules"})}),o.jsxs(ti,{children:[o.jsx(Tr,{value:"all",children:"Tous les véhicules"}),ae.map(ve=>o.jsx(Tr,{value:ve.id.toString(),children:ve.immatriculation},ve.id))]})]})]}),me?o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):o.jsxs(o.Fragment,{children:[he.length>0&&o.jsx("div",{className:"space-y-6",children:he.map(ve=>o.jsxs(_t,{className:"overflow-hidden",children:[o.jsx(Xr,{className:"pb-3",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[o.jsx("div",{className:"relative w-16 h-16 rounded-lg overflow-hidden border-2 border-primary/20 bg-muted",children:ve.vehicle.photoUrl?o.jsx("img",{src:hn(ve.vehicle.photoUrl)||void 0,alt:ve.vehicle.immatriculation,className:"w-full h-full object-cover"}):o.jsx("div",{className:"w-full h-full flex items-center justify-center",children:o.jsx(Do,{className:"h-6 w-6 text-muted-foreground"})})}),ve.driver&&o.jsx("div",{className:"relative w-16 h-16 rounded-lg overflow-hidden border-2 border-primary/20 bg-muted",children:ve.driver.photoUrl?o.jsx("img",{src:hn(ve.driver.photoUrl)||void 0,alt:`${ve.driver.prenom} ${ve.driver.nom}`,className:"w-full h-full object-cover"}):o.jsx("div",{className:"w-full h-full flex items-center justify-center",children:o.jsx(sy,{className:"h-6 w-6 text-muted-foreground"})})})]}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx("div",{className:"flex items-start justify-between gap-2",children:o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx(ny,{href:`/missions/${ve.mission.id}`,children:o.jsx(cn,{className:"text-lg hover:text-primary cursor-pointer",children:ve.mission.title})}),o.jsxs(Qi,{className:"mt-1",children:[ve.mission.code," • ",ve.vehicle.immatriculation,ve.driver&&` • ${ve.driver.prenom} ${ve.driver.nom}`]}),o.jsx("div",{className:"mt-2",children:o.jsxs(ir,{variant:"outline",className:"text-xs",children:[ve.breakdowns.length," panne",ve.breakdowns.length>1?"s":""]})})]})})})]})}),o.jsx(ar,{children:o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:ve.breakdowns.map(ce=>{const Ge=ce;return o.jsxs(_t,{className:"overflow-hidden border-red-200",children:[Ge.photoUrl&&o.jsxs("div",{className:"relative w-full aspect-video overflow-hidden rounded-t-xl bg-muted mb-3",children:[o.jsx("img",{src:hn(Ge.photoUrl)||void 0,alt:ce.type,className:"w-full h-full object-cover",onError:ie=>{ie.target.style.display="none"}}),o.jsx("div",{className:"absolute top-3 left-3 z-10",children:o.jsx(Pe,{size:"icon",variant:"secondary",className:"h-12 w-12 rounded-full bg-background/90 backdrop-blur-sm border shadow-sm border-red-300 bg-red-50/90 hover:bg-red-100/90 cursor-pointer p-0",onClick:ie=>{ie.stopPropagation(),Qt(ce)},title:"Traiter la panne",children:o.jsx("span",{className:"text-2xl",children:Kv[ce.type]||Kv.Autre})})}),o.jsx(H2,{type:"breakdown",data:{immatriculation:ve.vehicle.immatriculation}})]}),ce.videoUrl&&o.jsxs("div",{className:"px-4 pb-3",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(Q2,{className:"h-4 w-4 text-primary"}),o.jsx("p",{className:"text-sm font-medium",children:"Vidéo du problème"})]}),o.jsxs("video",{controls:!0,className:"w-full rounded-lg",children:[o.jsx("source",{src:ce.videoUrl,type:"video/mp4"}),o.jsx("source",{src:ce.videoUrl,type:"video/webm"}),o.jsx("source",{src:ce.videoUrl,type:"video/quicktime"}),"Votre navigateur ne supporte pas l'élément vidéo."]})]}),ce.audioUrl&&o.jsxs("div",{className:"px-4 pb-3",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(bd,{className:"h-4 w-4 text-primary"}),o.jsx("p",{className:"text-sm font-medium",children:"Message audio du chauffeur"})]}),o.jsxs("audio",{controls:!0,className:"w-full h-10",children:[o.jsx("source",{src:ce.audioUrl,type:"audio/webm"}),o.jsx("source",{src:ce.audioUrl,type:"audio/mpeg"}),"Votre navigateur ne supporte pas l'élément audio."]})]}),o.jsx(Xr,{className:"pb-3",children:o.jsxs("div",{className:"flex items-start justify-between gap-2",children:[o.jsxs("div",{className:"flex-1",children:[!Ge.photoUrl&&o.jsx("div",{className:"flex items-center gap-3 mb-2",children:o.jsx(ZL,{type:ce.type,variant:"breakdown",size:"md"})}),o.jsx("div",{className:"flex items-center gap-2 mb-2",children:o.jsx(X8,{type:ce.type,variant:"breakdown",size:"sm"})}),o.jsx(cn,{className:"text-base text-red-900",children:ce.type})]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Cx,{cardData:{type:"breakdown",title:ce.type,details:{type:ce.type,vehicule:ve.vehicle.immatriculation,date:Kr(new Date(ce.date),"dd/MM/yyyy",{locale:tn}),lieu:ce.lieu||void 0,cout:ce.cout?`${ce.cout.toLocaleString()} FCFA`:void 0,description:ce.description||void 0}},size:"sm"}),mt&&o.jsxs(Pe,{size:"sm",variant:"default",onClick:()=>Qt(ce),className:"flex items-center gap-2",title:"Traiter la panne",children:[o.jsx(mN,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"Traiter"})]}),o.jsx(Pe,{size:"icon",variant:"ghost",onClick:()=>it(ce.id),className:"h-8 w-8 flex-shrink-0",children:o.jsx(fo,{className:"h-4 w-4"})})]})]})}),o.jsxs(ar,{className:"space-y-2 text-sm md:space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 md:gap-3",children:[o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"Date: "}),o.jsx("span",{className:"font-medium",children:Kr(new Date(ce.date),"dd/MM/yyyy",{locale:tn})})]}),ce.cout&&o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"Coût: "}),o.jsxs("span",{className:"font-semibold text-base",children:[ce.cout.toLocaleString()," FCFA"]})]})]}),ce.lieu&&o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"Lieu: "}),o.jsx("span",{className:"font-medium",children:ce.lieu})]}),ce.description&&o.jsx("div",{className:"pt-2 border-t",children:o.jsx("p",{className:"text-muted-foreground text-xs md:text-sm",children:ce.description})}),ce.actionReparative&&o.jsx("div",{className:"pt-2 border-t",children:o.jsxs("p",{className:"text-muted-foreground text-xs md:text-sm",children:[o.jsx("span",{className:"font-medium",children:"Action réparative: "}),ce.actionReparative]})}),o.jsxs("div",{className:"pt-2 border-t space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"Statut: "}),o.jsx(ir,{variant:"outline",className:ce.status==="resolved"?"bg-green-100 text-green-800 border-green-300":ce.status==="in_progress"?"bg-blue-100 text-blue-800 border-blue-300":"bg-orange-100 text-orange-800 border-orange-300",children:ce.status==="resolved"?"Pris en charge":ce.status==="in_progress"?"En cours":"En attente"})]}),ce.responseAudioUrl&&o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-muted-foreground text-xs font-medium",children:"Réponse du bureau:"}),o.jsxs("audio",{controls:!0,className:"w-full h-8",children:[o.jsx("source",{src:ce.responseAudioUrl,type:"audio/webm"}),o.jsx("source",{src:ce.responseAudioUrl,type:"audio/mpeg"}),"Votre navigateur ne supporte pas l'élément audio."]}),ce.responseCreatedAt&&o.jsx("p",{className:"text-xs text-muted-foreground",children:Kr(new Date(ce.responseCreatedAt),"dd/MM/yyyy HH:mm",{locale:tn})})]})]})]})]},ce.id)})})})]},ve.mission.id))}),Le.length>0&&o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h2",{className:"text-lg font-semibold",children:"Pannes non liées à une mission"}),o.jsx(ir,{variant:"outline",className:"text-xs",children:Le.length})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:Le.map(ve=>{const ce=ae.find(ie=>ie.id===ve.vehicleId),Ge=ve;return o.jsxs(_t,{className:"overflow-hidden border-red-200",children:[Ge.photoUrl&&o.jsxs("div",{className:"relative w-full aspect-video overflow-hidden rounded-t-xl bg-muted mb-3",children:[o.jsx("img",{src:hn(Ge.photoUrl)||void 0,alt:ve.type,className:"w-full h-full object-cover",onError:ie=>{ie.target.style.display="none"}}),o.jsx("div",{className:"absolute top-3 left-3 z-10",children:o.jsx(Pe,{size:"icon",variant:"secondary",className:"h-12 w-12 rounded-full bg-background/90 backdrop-blur-sm border shadow-sm border-red-300 bg-red-50/90 hover:bg-red-100/90 cursor-pointer p-0",onClick:ie=>{ie.stopPropagation(),Qt(ve)},title:"Traiter la panne",children:o.jsx("span",{className:"text-2xl",children:Kv[ve.type]||Kv.Autre})})}),o.jsx(H2,{type:"breakdown",data:{immatriculation:ce?.immatriculation}})]}),ve.videoUrl&&o.jsxs("div",{className:"px-4 pb-3",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(Q2,{className:"h-4 w-4 text-primary"}),o.jsx("p",{className:"text-sm font-medium",children:"Vidéo du problème"})]}),o.jsxs("video",{controls:!0,className:"w-full rounded-lg",children:[o.jsx("source",{src:ve.videoUrl,type:"video/mp4"}),o.jsx("source",{src:ve.videoUrl,type:"video/webm"}),o.jsx("source",{src:ve.videoUrl,type:"video/quicktime"}),"Votre navigateur ne supporte pas l'élément vidéo."]})]}),ve.audioUrl&&o.jsxs("div",{className:"px-4 pb-3",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(bd,{className:"h-4 w-4 text-primary"}),o.jsx("p",{className:"text-sm font-medium",children:"Message audio du chauffeur"})]}),o.jsxs("audio",{controls:!0,className:"w-full h-10",children:[o.jsx("source",{src:ve.audioUrl,type:"audio/webm"}),o.jsx("source",{src:ve.audioUrl,type:"audio/mpeg"}),"Votre navigateur ne supporte pas l'élément audio."]})]}),o.jsx(Xr,{children:o.jsxs("div",{className:"flex items-start justify-between gap-2",children:[o.jsxs("div",{className:"flex-1",children:[!Ge.photoUrl&&o.jsx("div",{className:"flex items-center gap-3 mb-2",children:o.jsx(ZL,{type:ve.type,variant:"breakdown",size:"md"})}),o.jsx("div",{className:"flex items-center gap-2 mb-2",children:o.jsx(X8,{type:ve.type,variant:"breakdown",size:"sm"})}),o.jsx(cn,{className:"text-base text-red-900",children:ve.type}),o.jsx(Qi,{className:"mt-1",children:ce?.immatriculation||`Véhicule #${ve.vehicleId}`})]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Cx,{cardData:{type:"breakdown",title:ve.type,details:{type:ve.type,vehicule:ce?.immatriculation||`Véhicule #${ve.vehicleId}`,date:Kr(new Date(ve.date),"dd/MM/yyyy",{locale:tn}),lieu:ve.lieu||void 0,cout:ve.cout?`${ve.cout.toLocaleString()} FCFA`:void 0,description:ve.description||void 0}},size:"sm"}),mt&&o.jsxs(Pe,{size:"sm",variant:"default",onClick:()=>Qt(ve),className:"flex items-center gap-2",title:"Traiter la panne",children:[o.jsx(mN,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"Traiter"})]}),o.jsx(Pe,{size:"icon",variant:"ghost",onClick:()=>it(ve.id),className:"h-8 w-8 flex-shrink-0",children:o.jsx(fo,{className:"h-4 w-4"})})]})]})}),o.jsxs(ar,{className:"space-y-2 text-sm md:space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 md:gap-3",children:[o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"Date: "}),o.jsx("span",{className:"font-medium",children:Kr(new Date(ve.date),"dd/MM/yyyy",{locale:tn})})]}),ve.cout&&o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"Coût: "}),o.jsxs("span",{className:"font-semibold text-base",children:[ve.cout.toLocaleString()," FCFA"]})]})]}),ve.lieu&&o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"Lieu: "}),o.jsx("span",{className:"font-medium",children:ve.lieu})]}),ve.description&&o.jsx("div",{className:"pt-2 border-t",children:o.jsx("p",{className:"text-muted-foreground text-xs md:text-sm",children:ve.description})}),ve.actionReparative&&o.jsx("div",{className:"pt-2 border-t",children:o.jsxs("p",{className:"text-muted-foreground text-xs md:text-sm",children:[o.jsx("span",{className:"font-medium",children:"Action réparative: "}),ve.actionReparative]})}),o.jsxs("div",{className:"pt-2 border-t space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"Statut: "}),o.jsx(ir,{variant:"outline",className:ve.status==="resolved"?"bg-green-100 text-green-800 border-green-300":ve.status==="in_progress"?"bg-blue-100 text-blue-800 border-blue-300":"bg-orange-100 text-orange-800 border-orange-300",children:ve.status==="resolved"?"Pris en charge":ve.status==="in_progress"?"En cours":"En attente"})]}),ve.responseAudioUrl&&o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-muted-foreground text-xs font-medium",children:"Réponse du bureau:"}),o.jsxs("audio",{controls:!0,className:"w-full h-8",children:[o.jsx("source",{src:ve.responseAudioUrl,type:"audio/webm"}),o.jsx("source",{src:ve.responseAudioUrl,type:"audio/mpeg"}),"Votre navigateur ne supporte pas l'élément audio."]}),ve.responseCreatedAt&&o.jsx("p",{className:"text-xs text-muted-foreground",children:Kr(new Date(ve.responseCreatedAt),"dd/MM/yyyy HH:mm",{locale:tn})})]}),(ve.replacedParts||ve.laborCost||ve.totalRepairCost)&&o.jsxs("div",{className:"space-y-2 pt-2 border-t",children:[o.jsx("p",{className:"text-muted-foreground text-xs font-medium",children:"Détails de la réparation:"}),Ye(ve.replacedParts),ve.laborCost&&o.jsxs("div",{className:"text-xs",children:[o.jsx("span",{className:"font-medium",children:"Main d'œuvre:"})," ",ve.laborCost.toLocaleString()," FCFA"]}),ve.totalRepairCost&&o.jsxs("div",{className:"text-xs font-semibold text-primary pt-1 border-t",children:["Coût total: ",ve.totalRepairCost.toLocaleString()," FCFA"]})]})]})]})]},ve.id)})})]}),he.length===0&&Le.length===0&&o.jsx("div",{className:"text-center py-12",children:o.jsx("p",{className:"text-muted-foreground",children:"Aucune panne trouvée"})})]}),o.jsx(pm,{open:i!==null,onOpenChange:()=>a(null),children:o.jsxs(qf,{children:[o.jsxs(Kf,{children:[o.jsx(Yf,{children:"Confirmer la suppression"}),o.jsx(Zf,{children:"Êtes-vous sûr de vouloir supprimer cette panne ? Cette action est irréversible."})]}),o.jsxs(Vf,{children:[o.jsx(Xf,{children:"Annuler"}),o.jsx(Jf,{onClick:vt,children:"Supprimer"})]})]})}),r!=="all"&&o.jsx(wg,{onClick:()=>l(!0),label:"Ajouter une panne"}),o.jsx(ci,{open:d!==null,onOpenChange:ve=>!ve&&Ot(),children:o.jsxs(Zn,{className:"sm:max-w-[500px] max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Traiter la panne"}),o.jsx(Ci,{children:"Répondez au chauffeur, mettez à jour le statut et enregistrez les détails de la réparation (pièces remplacées, main d'œuvre)."})]}),o.jsxs("div",{className:"space-y-6 py-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"response-status",children:"Statut"}),o.jsxs(ui,{value:m,onValueChange:ve=>g(ve),children:[o.jsx(ei,{id:"response-status",children:o.jsx(di,{})}),o.jsxs(ti,{children:[o.jsx(Tr,{value:"pending",children:"En attente"}),o.jsx(Tr,{value:"in_progress",children:"En cours"}),o.jsx(Tr,{value:"resolved",children:"Pris en charge"})]})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsx(Je,{children:"Message vocal (optionnel)"}),!b&&!I&&o.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3 p-6 border-2 border-dashed border-muted-foreground/30 rounded-xl",children:[o.jsx("button",{type:"button",onClick:pr,disabled:!hr,className:"relative w-24 h-24 rounded-full bg-white dark:bg-background border-4 border-primary text-primary flex items-center justify-center shadow-md hover:scale-105 transition-all duration-300 ease-in-out animate-pulse",children:o.jsx(bd,{className:"h-12 w-12"})}),o.jsx("p",{className:"text-sm font-semibold text-primary",children:"Appuie pour parler"}),!hr&&o.jsx("p",{className:"text-xs text-orange-600 dark:text-orange-400 text-center",children:"⚠️ L'enregistrement audio nécessite HTTPS ou localhost."})]}),I&&o.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3 p-6 border-2 border-red-500 rounded-xl bg-red-50 dark:bg-red-950/20",children:[o.jsx("button",{type:"button",onClick:de,className:"relative w-28 h-28 rounded-full bg-red-600 text-white flex items-center justify-center shadow-lg ring-4 ring-red-300 dark:ring-red-700 animate-pulse",children:o.jsx(uP,{className:"h-12 w-12"})}),o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"text-lg font-bold text-red-600 mb-1",children:Yt(T)}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Enregistrement en cours..."})]})]}),b&&!I&&o.jsxs("div",{className:"space-y-3 p-4 border rounded-xl bg-muted/50",children:[o.jsxs("audio",{controls:!0,className:"w-full h-12",children:[o.jsx("source",{src:b,type:"audio/webm"}),o.jsx("source",{src:b,type:"audio/mpeg"}),"Votre navigateur ne supporte pas l'élément audio."]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsxs(Pe,{type:"button",variant:"outline",onClick:st,className:"flex-1",children:[o.jsx(ay,{className:"h-4 w-4 mr-2"}),"Supprimer"]}),o.jsxs(Pe,{type:"button",variant:"outline",onClick:pr,className:"flex-1",disabled:!hr,children:[o.jsx(Bbe,{className:"h-4 w-4 mr-2"}),"Réenregistrer"]})]})]})]}),(m==="in_progress"||m==="resolved")&&o.jsxs("div",{className:"space-y-4 pt-4 border-t",children:[o.jsx(Je,{className:"text-base font-semibold",children:"Traitement de la panne"}),o.jsxs("div",{className:"space-y-3",children:[o.jsx(Je,{className:"text-sm",children:"Pièces remplacées"}),L.length>0&&o.jsx("div",{className:"space-y-2",children:L.map((ve,ce)=>o.jsxs("div",{className:"flex items-center gap-2 p-2 border rounded-lg bg-muted/50",children:[o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"font-medium text-sm",children:ve.name}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:[ve.quantity," × ",ve.unitCost.toLocaleString()," FCFA = ",(ve.quantity*ve.unitCost).toLocaleString()," FCFA"]})]}),o.jsx(Pe,{type:"button",variant:"ghost",size:"icon",onClick:()=>Vt(ce),className:"h-8 w-8",children:o.jsx(fo,{className:"h-4 w-4"})})]},ce))}),o.jsxs("div",{className:"grid grid-cols-12 gap-2",children:[o.jsx(wt,{placeholder:"Nom de la pièce",value:X,onChange:ve=>Z(ve.target.value),className:"col-span-5"}),o.jsx(wt,{type:"number",placeholder:"Qté",value:K,onChange:ve=>q(ve.target.value),className:"col-span-2",min:"1",step:"1"}),o.jsx(wt,{type:"number",placeholder:"Coût unitaire (FCFA)",value:Y,onChange:ve=>ne(ve.target.value),className:"col-span-4",min:"0",step:"0.01"}),o.jsx(Pe,{type:"button",variant:"outline",size:"icon",onClick:Wt,className:"col-span-1",children:o.jsx(Ma,{className:"h-4 w-4"})})]}),L.length>0&&o.jsxs("div",{className:"text-sm font-medium text-right",children:["Total pièces: ",xr.toLocaleString()," FCFA"]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"labor-cost",children:"Coût de la main d'œuvre (FCFA)"}),o.jsx(wt,{id:"labor-cost",type:"number",placeholder:"0",value:R,onChange:ve=>$(ve.target.value),min:"0",step:"0.01"})]}),Ht>0&&o.jsxs("div",{className:"p-3 bg-primary/10 rounded-lg border border-primary/20",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"font-semibold",children:"Coût total de la réparation:"}),o.jsxs("span",{className:"text-lg font-bold text-primary",children:[Ht.toLocaleString()," FCFA"]})]}),o.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[xr>0&&o.jsxs("span",{children:["Pièces: ",xr.toLocaleString()," FCFA"]}),xr>0&&parseFloat(R)>0&&o.jsx("span",{children:" + "}),parseFloat(R)>0&&o.jsxs("span",{children:["Main d'œuvre: ",parseFloat(R).toLocaleString()," FCFA"]})]})]})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{variant:"outline",onClick:Ot,className:"w-full sm:w-auto",children:"Annuler"}),o.jsx(Pe,{onClick:gt,disabled:ge.isResponding,className:"w-full sm:w-auto",children:ge.isResponding?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Envoi..."]}):o.jsxs(o.Fragment,{children:[o.jsx(mN,{className:"h-4 w-4 mr-2"}),"Envoyer la réponse"]})})]})]})})]})}const D8e={plateau:"Plateau",citerne:"Citerne",benne:"Benne",frigorifique:"Frigorifique",autre:"Autre"};function T8e({coupling:e,onDetach:t}){const r=e.vehicle,n=e.trailer,i=n?.photoUrl||(n?.type?Gf[n.type]:Gf.autre),a=e.startAt?new Date(e.startAt):null,s=a?Kr(a,"dd MMM yyyy",{locale:tn}):null;return o.jsx(_t,{"data-testid":`card-coupling-${e.id}`,className:"hover-elevate transition-all duration-200 overflow-hidden",children:o.jsx(ar,{className:"p-4 md:p-6",children:o.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-4 md:gap-6",children:[o.jsxs("div",{className:"flex-1 w-full md:w-auto min-w-0",children:[o.jsxs("div",{className:"relative w-full aspect-video overflow-hidden rounded-lg bg-muted border-2 border-border",children:[r?.photoUrl?o.jsx("img",{src:hn(r.photoUrl)||void 0,alt:`Véhicule ${r.immatriculation}`,className:"w-full h-full object-cover",onError:l=>{l.target.style.display="none"}}):o.jsx("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"text-4xl mb-2",children:"🚚"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Pas de photo"})]})}),o.jsx("div",{className:"absolute top-2 left-2 z-10",children:o.jsx(ir,{variant:"secondary",className:"font-mono font-semibold text-xs px-2 py-1 bg-background/95 backdrop-blur-sm shadow-md border",children:r?.immatriculation||"N/A"})}),(e.chauffeur||e.apprentis&&e.apprentis.length>0)&&o.jsxs("div",{className:"absolute top-2 right-2 z-10 flex flex-col gap-1.5 items-end",children:[e.chauffeur&&o.jsxs("div",{className:"flex items-center gap-1.5 bg-background/95 backdrop-blur-sm rounded-full px-1.5 py-0.5 border border-primary/30 shadow-md",children:[o.jsx("div",{className:"relative w-6 h-6 rounded-full overflow-hidden border border-primary/40 flex-shrink-0",children:e.chauffeur.photoUrl?o.jsx("img",{src:hn(e.chauffeur.photoUrl)||void 0,alt:`${e.chauffeur.prenom} ${e.chauffeur.nom}`,className:"w-full h-full object-cover",onError:l=>{l.target.style.display="none"}}):o.jsxs("div",{className:"w-full h-full bg-primary/20 flex items-center justify-center text-[10px] font-semibold text-primary",children:[e.chauffeur.prenom.charAt(0),e.chauffeur.nom.charAt(0)]})}),o.jsx("span",{className:"text-[10px] font-semibold text-primary pr-0.5 hidden sm:inline",children:e.chauffeur.prenom.split(" ")[0]})]}),e.apprentis&&e.apprentis.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1.5 justify-end max-w-[120px]",children:e.apprentis.map(l=>o.jsxs("div",{className:"flex items-center gap-1.5 bg-background/95 backdrop-blur-sm rounded-full px-1.5 py-0.5 border border-border shadow-md",title:`${l.prenom} ${l.nom}`,children:[o.jsx("div",{className:"relative w-6 h-6 rounded-full overflow-hidden border border-border flex-shrink-0",children:l.photoUrl?o.jsx("img",{src:hn(l.photoUrl)||void 0,alt:`${l.prenom} ${l.nom}`,className:"w-full h-full object-cover",onError:c=>{c.target.style.display="none"}}):o.jsxs("div",{className:"w-full h-full bg-muted flex items-center justify-center text-[10px] font-semibold text-muted-foreground",children:[l.prenom.charAt(0),l.nom.charAt(0)]})}),o.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground pr-0.5 hidden sm:inline",children:l.prenom.split(" ")[0]})]},l.id))})]})]}),o.jsxs("div",{className:"mt-2 text-center md:text-left",children:[o.jsx("p",{className:"text-sm font-semibold truncate","data-testid":`text-vehicle-${e.id}`,children:r?.immatriculation}),(r?.marque||r?.modele)&&o.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:[r?.marque," ",r?.modele]})]})]}),o.jsx("div",{className:"flex-shrink-0 flex items-center justify-center w-full md:w-auto",children:o.jsxs("div",{className:"relative w-full md:w-32 flex items-center justify-center",children:[o.jsx("div",{className:"hidden md:block w-full h-2 bg-primary/40 rounded-full"}),o.jsx("div",{className:"block md:hidden w-2 h-24 bg-primary/40 rounded-full"}),o.jsxs("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 z-10 flex flex-col items-center gap-2",children:[t?o.jsx("button",{onClick:()=>t(e.id),className:"focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 rounded-md transition-all hover:scale-105 active:scale-95","data-testid":`button-detach-${e.id}`,title:"Cliquer pour détacher l'attelage",children:o.jsx(ir,{variant:"default",className:"bg-primary text-primary-foreground px-3 py-1.5 text-xs font-semibold shadow-lg border-2 border-background whitespace-nowrap cursor-pointer hover:bg-primary/90 transition-colors",children:"🔗 Attelé"})}):o.jsx(ir,{variant:"default",className:"bg-primary text-primary-foreground px-3 py-1.5 text-xs font-semibold shadow-lg border-2 border-background whitespace-nowrap","data-testid":`badge-coupled-${e.id}`,children:"🔗 Attelé"}),s&&o.jsxs(ir,{variant:"outline",className:"bg-background/95 backdrop-blur-sm text-xs px-2 py-1 shadow-md border border-border flex items-center gap-1 whitespace-nowrap","data-testid":`badge-start-date-${e.id}`,children:[o.jsx(tc,{className:"h-3 w-3"}),s]})]})]})}),o.jsx("div",{className:"flex-1 w-full md:w-auto min-w-0",children:n?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"relative w-full aspect-video overflow-hidden rounded-lg bg-muted border-2 border-border",children:[o.jsx("img",{src:hn(i)||void 0,alt:`Remorque ${n.numeroChassis}`,className:"w-full h-full object-cover",onError:l=>{l.target.style.display="none"}}),o.jsx("div",{className:"absolute top-2 left-2 z-10",children:o.jsx(ir,{variant:"secondary",className:"font-mono font-semibold text-xs px-2 py-1 bg-background/95 backdrop-blur-sm shadow-md border",children:n.numeroChassis})})]}),o.jsxs("div",{className:"mt-2 text-center md:text-left",children:[o.jsx("p",{className:"text-sm font-semibold truncate","data-testid":`text-trailer-${e.id}`,children:n.numeroChassis}),o.jsxs("div",{className:"flex items-center justify-center md:justify-start gap-2 mt-1",children:[o.jsx(ir,{variant:"outline",className:"text-xs",children:D8e[n.type]||n.type}),n.capacite&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:[n.capacite,"t"]})]})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"relative w-full aspect-video overflow-hidden rounded-lg bg-muted/50 border-2 border-dashed border-muted-foreground/30",children:o.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center",children:[o.jsx("p",{className:"text-4xl mb-2 opacity-50",children:"🚛"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Aucune remorque"})]})}),o.jsx("div",{className:"mt-2 text-center md:text-left",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"Aucune remorque"})})]})})]})})})}const P8e={plateau:"Plateau",citerne:"Citerne",benne:"Benne",frigorifique:"Frigorifique",autre:"Autre"};function O8e({open:e,onOpenChange:t,onCreate:r,preselectedVehicleId:n}){const[i,a]=w.useState(n||null),[s,l]=w.useState(null),[c,u]=w.useState(null),[d,f]=w.useState([]),[m,g]=w.useState(""),[A,v]=w.useState(""),{data:b=[],isLoading:E}=Ar({queryKey:["/api/vehicles"]}),{data:I=[],isLoading:S}=Ar({queryKey:["/api/trailers"]}),{data:_=[],isLoading:B}=Ar({queryKey:["/api/crew-members"]}),{data:T=[]}=Tle(),P=_.filter(Z=>Z.role==="chauffeur"),O=_.filter(Z=>Z.role==="apprenti");w.useEffect(()=>{if(e){a(n||null),l(null),u(null),f([]);const Z=new Date,K=Z.getFullYear(),q=String(Z.getMonth()+1).padStart(2,"0"),Y=String(Z.getDate()).padStart(2,"0"),ne=String(Z.getHours()).padStart(2,"0"),ge=String(Z.getMinutes()).padStart(2,"0");g(`${K}-${q}-${Y}`),v(`${ne}:${ge}`)}},[e,n]);const z=new Set(T.map(Z=>Z.vehicleId)),L=new Set(T.map(Z=>Z.trailerId).filter(Z=>Z!=null)),W=new Set(T.map(Z=>Z.chauffeurId).filter(Z=>Z!=null)),R=new Set(T.flatMap(Z=>Z.apprentis||[]).map(Z=>Z.id).filter(Z=>Z!=null)),$=Z=>{if(Z.preventDefault(),!i)return;const K=A?`${m}T${A}`:`${m}T00:00`,q=new Date(K),Y={vehicleId:i,trailerId:s||void 0,chauffeurId:c||void 0,apprentiIds:d.length>0?d:void 0,startAt:q};r?.(Y),t(!1)},X=E||S||B;return o.jsx(ci,{open:e,onOpenChange:t,children:o.jsxs(Zn,{className:"sm:max-w-[700px] max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Créer un attelage"}),o.jsx(Ci,{children:"Sélectionnez un véhicule et une remorque à atteler ensemble."})]}),o.jsxs("form",{onSubmit:$,children:[o.jsxs("div",{className:"space-y-6 py-4",children:[o.jsxs("div",{className:"space-y-3",children:[o.jsxs("h3",{className:"text-sm font-semibold",children:["Véhicule ",o.jsx("span",{className:"text-destructive",children:"*"})]}),E?o.jsx("div",{className:"flex justify-center py-8",children:o.jsx(wr,{className:"h-6 w-6 animate-spin text-primary"})}):o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-64 overflow-y-auto p-2 border rounded-lg",children:b.map(Z=>{const K=z.has(Z.id),q=i===Z.id,Y=K;return o.jsxs("button",{type:"button",onClick:()=>!Y&&a(Z.id),disabled:Y,className:`relative p-3 rounded-lg border-2 transition-all text-left ${q?"border-primary bg-primary/5":Y?"border-muted bg-muted/50 opacity-60 cursor-not-allowed":"border-border hover:border-primary/50 hover:bg-accent cursor-pointer"}`,"data-testid":`vehicle-option-${Z.id}`,children:[q&&o.jsx("div",{className:"absolute top-2 right-2",children:o.jsx(es,{className:"h-5 w-5 text-primary"})}),K&&o.jsx("div",{className:"absolute top-2 left-2",children:o.jsx(ir,{variant:"secondary",className:"text-xs bg-orange-100 text-orange-800 border-orange-300",children:"Déjà attelé"})}),o.jsxs("div",{className:"space-y-2",children:[Z.photoUrl?o.jsx("div",{className:"relative w-full aspect-video rounded overflow-hidden bg-muted",children:o.jsx("img",{src:hn(Z.photoUrl),alt:Z.immatriculation,className:"w-full h-full object-cover",onError:ne=>{ne.target.style.display="none"}})}):o.jsx("div",{className:"w-full aspect-video rounded bg-muted flex items-center justify-center",children:o.jsx("span",{className:"text-3xl",children:"🚚"})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-mono font-semibold text-sm",children:Z.immatriculation}),(Z.marque||Z.modele)&&o.jsxs("p",{className:"text-xs text-muted-foreground",children:[Z.marque," ",Z.modele]})]})]})]},Z.id)})})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("h3",{className:"text-sm font-semibold",children:"Remorque (optionnel)"}),S?o.jsx("div",{className:"flex justify-center py-8",children:o.jsx(wr,{className:"h-6 w-6 animate-spin text-primary"})}):o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-64 overflow-y-auto p-2 border rounded-lg",children:[o.jsxs("button",{type:"button",onClick:()=>l(null),className:`relative p-3 rounded-lg border-2 transition-all text-left ${s===null?"border-primary bg-primary/5":"border-border hover:border-primary/50 hover:bg-accent cursor-pointer"}`,"data-testid":"trailer-option-none",children:[s===null&&o.jsx("div",{className:"absolute top-2 right-2",children:o.jsx(es,{className:"h-5 w-5 text-primary"})}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{className:"w-full aspect-video rounded bg-muted/50 border-2 border-dashed border-muted-foreground/30 flex items-center justify-center",children:o.jsx("span",{className:"text-3xl opacity-50",children:"🚛"})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold text-sm",children:"Aucune remorque"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Véhicule seul"})]})]})]}),I.map(Z=>{const K=L.has(Z.id),q=s===Z.id,Y=K,ne=Z.photoUrl||Gf[Z.type]||Gf.autre;return o.jsxs("button",{type:"button",onClick:()=>!Y&&l(Z.id),disabled:Y,className:`relative p-3 rounded-lg border-2 transition-all text-left ${q?"border-primary bg-primary/5":Y?"border-muted bg-muted/50 opacity-60 cursor-not-allowed":"border-border hover:border-primary/50 hover:bg-accent cursor-pointer"}`,"data-testid":`trailer-option-${Z.id}`,children:[q&&o.jsx("div",{className:"absolute top-2 right-2",children:o.jsx(es,{className:"h-5 w-5 text-primary"})}),K&&o.jsx("div",{className:"absolute top-2 left-2",children:o.jsx(ir,{variant:"secondary",className:"text-xs bg-orange-100 text-orange-800 border-orange-300",children:"Déjà attelée"})}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{className:"relative w-full aspect-video rounded overflow-hidden bg-muted",children:o.jsx("img",{src:hn(ne),alt:Z.numeroChassis,className:"w-full h-full object-cover",onError:ge=>{ge.target.style.display="none"}})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-mono font-semibold text-sm",children:Z.numeroChassis}),o.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[o.jsx(ir,{variant:"outline",className:"text-xs",children:P8e[Z.type]||Z.type}),Z.capacite&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:[Z.capacite,"t"]})]})]})]})]},Z.id)})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("h3",{className:"text-sm font-semibold",children:["Chauffeur ",o.jsx("span",{className:"text-destructive",children:"*"})]}),B?o.jsx("div",{className:"flex justify-center py-8",children:o.jsx(wr,{className:"h-6 w-6 animate-spin text-primary"})}):P.length===0?o.jsx(_t,{className:"p-4 border-dashed",children:o.jsx("p",{className:"text-sm text-muted-foreground text-center",children:"Aucun chauffeur disponible"})}):o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-48 overflow-y-auto p-2 border rounded-lg",children:P.map(Z=>{const K=c===Z.id,q=W.has(Z.id),Y=q;return o.jsxs("button",{type:"button",onClick:()=>!Y&&u(Z.id),disabled:Y,className:`relative p-3 rounded-lg border-2 transition-all text-left ${K?"border-primary bg-primary/5":Y?"border-muted bg-muted/50 opacity-60 cursor-not-allowed":"border-border hover:border-primary/50 hover:bg-accent cursor-pointer"}`,children:[K&&o.jsx("div",{className:"absolute top-2 right-2",children:o.jsx(es,{className:"h-5 w-5 text-primary"})}),q&&o.jsx("div",{className:"absolute top-2 left-2",children:o.jsx(ir,{variant:"secondary",className:"text-xs bg-orange-100 text-orange-800 border-orange-300",children:"Déjà assigné"})}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"w-12 h-12 rounded-full overflow-hidden border-2 border-border flex-shrink-0",children:Z.photoUrl?o.jsx("img",{src:hn(Z.photoUrl),alt:`${Z.prenom} ${Z.nom}`,className:"w-full h-full object-cover",onError:ne=>{ne.target.style.display="none"}}):o.jsx("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:o.jsx("span",{className:"text-xl",children:"👤"})})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("p",{className:"font-semibold text-sm truncate",children:[Z.prenom," ",Z.nom]}),Z.telephone&&o.jsx("p",{className:"text-xs text-muted-foreground truncate",children:Z.telephone})]})]})]},Z.id)})})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("h3",{className:"text-sm font-semibold",children:["Apprentis ",o.jsx("span",{className:"text-destructive",children:"*"}),o.jsx("span",{className:"text-xs text-muted-foreground font-normal ml-2",children:"(Au moins un requis)"})]}),B?o.jsx("div",{className:"flex justify-center py-8",children:o.jsx(wr,{className:"h-6 w-6 animate-spin text-primary"})}):O.length===0?o.jsx(_t,{className:"p-4 border-dashed",children:o.jsx("p",{className:"text-sm text-muted-foreground text-center",children:"Aucun apprenti disponible"})}):o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-48 overflow-y-auto p-2 border rounded-lg",children:O.map(Z=>{const K=d.includes(Z.id),q=R.has(Z.id),Y=q;return o.jsxs("button",{type:"button",onClick:()=>{Y||f(K?d.filter(ne=>ne!==Z.id):[...d,Z.id])},disabled:Y,className:`relative p-3 rounded-lg border-2 transition-all text-left ${K?"border-primary bg-primary/5":Y?"border-muted bg-muted/50 opacity-60 cursor-not-allowed":"border-border hover:border-primary/50 hover:bg-accent cursor-pointer"}`,children:[K&&o.jsx("div",{className:"absolute top-2 right-2",children:o.jsx(es,{className:"h-5 w-5 text-primary"})}),q&&o.jsx("div",{className:"absolute top-2 left-2",children:o.jsx(ir,{variant:"secondary",className:"text-xs bg-orange-100 text-orange-800 border-orange-300",children:"Déjà assigné"})}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"w-12 h-12 rounded-full overflow-hidden border-2 border-border flex-shrink-0",children:Z.photoUrl?o.jsx("img",{src:hn(Z.photoUrl),alt:`${Z.prenom} ${Z.nom}`,className:"w-full h-full object-cover",onError:ne=>{ne.target.style.display="none"}}):o.jsx("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:o.jsx("span",{className:"text-xl",children:"👤"})})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("p",{className:"font-semibold text-sm truncate",children:[Z.prenom," ",Z.nom]}),Z.telephone&&o.jsx("p",{className:"text-xs text-muted-foreground truncate",children:Z.telephone})]})]})]},Z.id)})})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[o.jsx(tc,{className:"h-4 w-4 text-primary"}),"Date de début de l'attelage"]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"startDate",className:"text-sm",children:["Date ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"startDate",type:"date",value:m,onChange:Z=>g(Z.target.value),required:!0,className:"h-12","data-testid":"input-start-date"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"startTime",className:"text-sm",children:["Heure ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"startTime",type:"time",value:A,onChange:Z=>v(Z.target.value),required:!0,className:"h-12","data-testid":"input-start-time"})]})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Par défaut, la date et l'heure actuelles sont sélectionnées. Vous pouvez les modifier si l'attelage a été créé dans le passé."})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>t(!1),"data-testid":"button-cancel",className:"w-full sm:w-auto h-12",children:"Annuler"}),o.jsx(Pe,{type:"submit","data-testid":"button-submit",className:"w-full sm:w-auto h-12",disabled:!i||!c||d.length===0||X,children:X?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Chargement..."]}):"Créer l'attelage"})]})]})]})})}const R8e={plateau:"Plateau",citerne:"Citerne",benne:"Benne",frigorifique:"Frigorifique",autre:"Autre"};function F8e({open:e,onOpenChange:t,coupling:r}){const[n,i]=w.useState(""),[a,s]=w.useState(""),[l,c]=w.useState(!1),u=qje(),d=w.useMemo(()=>{if(!r)return{formattedStartDate:null,formattedEndDate:null,durationDays:0};const b=r.startAt?new Date(r.startAt):null,E=r.endAt?new Date(r.endAt):null,I=new Date,S=b?Kr(b,"dd MMM yyyy à HH:mm",{locale:tn}):null,_=E?Kr(E,"dd MMM yyyy à HH:mm",{locale:tn}):null,B=b?hCe(I,b):0;return{formattedStartDate:S,formattedEndDate:_,durationDays:B}},[r?.startAt,r?.endAt]);w.useEffect(()=>{e&&r&&(i(""),s(""),c(!1))},[e,r]);const f=()=>{if(!r)return;let b;if(l&&n){const E=a?`${n}T${a}`:`${n}T00:00`;b=new Date(E),b>new Date&&(b=void 0)}u.mutate({id:r.id,endAt:b},{onSuccess:()=>{t(!1)}})};if(!r)return null;const m=r.vehicle,g=r.trailer,A=g?.photoUrl||(g?.type?Gf[g.type]:Gf.autre),v=u.isPending;return o.jsx(ci,{open:e,onOpenChange:t,children:o.jsxs(Zn,{className:"sm:max-w-[500px]",children:[o.jsxs(Jn,{children:[o.jsxs(Xn,{className:"flex items-center gap-2",children:[o.jsx(N8,{className:"h-5 w-5 text-destructive"}),"Détacher l'attelage"]}),o.jsx(Ci,{children:"Confirmez le détachement de cet attelage. Vous pouvez optionnellement spécifier une date de fin."})]}),o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"p-4 bg-muted/50 rounded-lg border",children:[o.jsx("p",{className:"text-sm font-semibold mb-3",children:"Attelage à détacher :"}),o.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-4",children:[o.jsxs("div",{className:"flex-1 w-full md:w-auto min-w-0",children:[o.jsxs("div",{className:"relative w-full aspect-video overflow-hidden rounded-lg bg-background border-2 border-border",children:[m?.photoUrl?o.jsx("img",{src:hn(m.photoUrl),alt:`Véhicule ${m.immatriculation}`,className:"w-full h-full object-cover",onError:b=>{b.target.style.display="none"}}):o.jsx("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"text-3xl mb-1",children:"🚚"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Pas de photo"})]})}),o.jsx("div",{className:"absolute top-2 left-2 z-10",children:o.jsx(ir,{variant:"secondary",className:"font-mono font-semibold text-xs px-2 py-0.5 bg-background/95 backdrop-blur-sm shadow-md border",children:m?.immatriculation||"N/A"})})]}),o.jsxs("div",{className:"mt-2 text-center md:text-left",children:[o.jsx("p",{className:"text-xs font-semibold truncate",children:m?.immatriculation}),(m?.marque||m?.modele)&&o.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:[m?.marque," ",m?.modele]})]})]}),o.jsx("div",{className:"flex-shrink-0 text-2xl text-muted-foreground",children:"→"}),o.jsx("div",{className:"flex-1 w-full md:w-auto min-w-0",children:g?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"relative w-full aspect-video overflow-hidden rounded-lg bg-background border-2 border-border",children:[o.jsx("img",{src:hn(A),alt:`Remorque ${g.numeroChassis}`,className:"w-full h-full object-cover",onError:b=>{b.target.style.display="none"}}),o.jsx("div",{className:"absolute top-2 left-2 z-10",children:o.jsx(ir,{variant:"secondary",className:"font-mono font-semibold text-xs px-2 py-0.5 bg-background/95 backdrop-blur-sm shadow-md border",children:g.numeroChassis})})]}),o.jsxs("div",{className:"mt-2 text-center md:text-left",children:[o.jsx("p",{className:"text-xs font-semibold truncate",children:g.numeroChassis}),o.jsxs("div",{className:"flex items-center justify-center md:justify-start gap-1 mt-1",children:[o.jsx(ir,{variant:"outline",className:"text-xs",children:R8e[g.type]||g.type}),g.capacite&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:[g.capacite,"t"]})]})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"relative w-full aspect-video overflow-hidden rounded-lg bg-muted/50 border-2 border-dashed border-muted-foreground/30",children:o.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center",children:[o.jsx("p",{className:"text-3xl mb-1 opacity-50",children:"🚛"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Aucune remorque"})]})}),o.jsx("div",{className:"mt-2 text-center md:text-left",children:o.jsx("p",{className:"text-xs text-muted-foreground",children:"Aucune remorque"})})]})})]})]}),(r.chauffeur||r.apprentis?.length>0||r.chauffeurId)&&o.jsxs("div",{className:"p-4 bg-muted/30 rounded-lg border space-y-3",children:[o.jsxs("p",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[o.jsx(Uf,{className:"h-4 w-4 text-primary"}),"Équipage affecté"]}),o.jsxs("div",{className:"space-y-3",children:[(r.chauffeur||r.chauffeurId)&&o.jsxs("div",{className:"flex items-center gap-3 p-3 bg-background rounded-lg border",children:[o.jsx("div",{className:"w-12 h-12 rounded-full overflow-hidden border-2 border-border flex-shrink-0",children:r.chauffeur?.photoUrl?o.jsx("img",{src:hn(r.chauffeur.photoUrl),alt:`${r.chauffeur.prenom} ${r.chauffeur.nom}`,className:"w-full h-full object-cover",onError:b=>{b.target.style.display="none"}}):o.jsx("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:o.jsx("span",{className:"text-xl",children:"👤"})})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Chauffeur"}),r.chauffeur?o.jsxs(o.Fragment,{children:[o.jsxs("p",{className:"font-semibold text-sm truncate",children:[r.chauffeur.prenom," ",r.chauffeur.nom]}),r.chauffeur.telephone&&o.jsx("p",{className:"text-xs text-muted-foreground truncate",children:r.chauffeur.telephone})]}):o.jsxs("p",{className:"text-xs text-muted-foreground",children:["ID: ",r.chauffeurId]})]})]}),r.apprentis&&r.apprentis.length>0&&o.jsxs("div",{className:"space-y-2",children:[o.jsxs("p",{className:"text-xs text-muted-foreground font-medium",children:["Apprentis (",r.apprentis.length,")"]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:r.apprentis.map(b=>o.jsxs("div",{className:"flex items-center gap-3 p-3 bg-background rounded-lg border",children:[o.jsx("div",{className:"w-10 h-10 rounded-full overflow-hidden border-2 border-border flex-shrink-0",children:b.photoUrl?o.jsx("img",{src:hn(b.photoUrl),alt:`${b.prenom} ${b.nom}`,className:"w-full h-full object-cover",onError:E=>{E.target.style.display="none"}}):o.jsx("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:o.jsx("span",{className:"text-lg",children:"👤"})})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("p",{className:"font-semibold text-sm truncate",children:[b.prenom," ",b.nom]}),b.telephone&&o.jsx("p",{className:"text-xs text-muted-foreground truncate",children:b.telephone})]})]},b.id))})]})]})]}),o.jsxs("div",{className:"p-4 bg-muted/30 rounded-lg border space-y-3",children:[o.jsxs("p",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[o.jsx(kC,{className:"h-4 w-4 text-primary"}),"Informations sur la liaison"]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 text-sm",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsxs("p",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[o.jsx(tc,{className:"h-3 w-3"}),"Date de création"]}),o.jsx("p",{className:"font-medium",children:d.formattedStartDate||"Non disponible"})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:"Durée totale"}),o.jsx("p",{className:"font-medium",children:d.durationDays===0?"Moins d'un jour":d.durationDays===1?"1 jour":`${d.durationDays} jours`})]}),d.formattedEndDate&&o.jsxs("div",{className:"space-y-1 md:col-span-2",children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:"Date prévisionnelle de fin"}),o.jsx("p",{className:"font-medium",children:d.formattedEndDate})]})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("input",{type:"checkbox",id:"useCustomDate",checked:l,onChange:b=>c(b.target.checked),className:"h-4 w-4 rounded border-gray-300"}),o.jsx(Je,{htmlFor:"useCustomDate",className:"text-sm font-medium cursor-pointer",children:"Spécifier une date de fin (optionnel)"})]}),l&&o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 pl-6",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"endDate",className:"text-sm",children:"Date de fin"}),o.jsx(wt,{id:"endDate",type:"date",value:n,onChange:b=>i(b.target.value),max:new Date().toISOString().split("T")[0],className:"h-10","data-testid":"input-end-date"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"endTime",className:"text-sm",children:"Heure de fin"}),o.jsx(wt,{id:"endTime",type:"time",value:a,onChange:b=>s(b.target.value),className:"h-10","data-testid":"input-end-time"})]})]}),!l&&o.jsx("p",{className:"text-xs text-muted-foreground pl-6",children:"Le détachement sera enregistré avec la date et l'heure actuelles."})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{variant:"outline",onClick:()=>t(!1),disabled:v,className:"w-full sm:w-auto",children:"Annuler"}),o.jsx(Pe,{variant:"destructive",onClick:f,disabled:v,className:"w-full sm:w-auto","data-testid":"button-confirm-detach",children:v?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Détachement..."]}):o.jsxs(o.Fragment,{children:[o.jsx(N8,{className:"h-4 w-4 mr-2"}),"Confirmer le détachement"]})})]})]})})}function M8e(){const[e,t]=w.useState(""),[r,n]=w.useState(!1),[i,a]=w.useState(null),[s,l]=w.useState(!1),{data:c=[],isLoading:u}=Tle(),d=Gje(),f=c.filter(A=>{if(!e)return!0;const v=A.vehicle?.immatriculation.toLowerCase().includes(e.toLowerCase())||A.vehicle?.marque?.toLowerCase().includes(e.toLowerCase())||A.vehicle?.modele?.toLowerCase().includes(e.toLowerCase()),b=A.trailer?.numeroChassis.toLowerCase().includes(e.toLowerCase())||A.trailer?.type.toLowerCase().includes(e.toLowerCase());return v||b}),m=A=>{d.mutate(A)},g=A=>{const v=c.find(b=>b.id===A);v&&(a(v),l(!0))};return o.jsxs("div",{className:"space-y-4 md:space-y-6 pb-20 md:pb-0",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl md:text-2xl font-semibold","data-testid":"text-page-title",children:"Attelages"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Gérez les attelages entre vos véhicules et vos remorques"})]}),o.jsx(O8e,{open:r,onOpenChange:n,onCreate:m}),o.jsxs(Pe,{"data-testid":"button-add-coupling",className:"w-full md:w-auto",onClick:()=>n(!0),children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Créer un attelage"]})]}),o.jsx("div",{className:"flex items-center gap-3",children:o.jsxs("div",{className:"relative flex-1",children:[o.jsx(U0,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(wt,{placeholder:"Rechercher...",value:e,onChange:A=>t(A.target.value),className:"pl-9 h-12","data-testid":"input-search"})]})}),u?o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"space-y-4",children:f.map(A=>o.jsx(T8e,{coupling:A,onDetach:g},A.id))}),f.length===0&&o.jsx("div",{className:"text-center py-12",children:o.jsx("p",{className:"text-muted-foreground",children:"Aucun attelage trouvé"})})]}),o.jsx(wg,{onClick:()=>n(!0),label:"Créer un attelage"}),o.jsx(F8e,{open:s,onOpenChange:l,coupling:i})]})}async function Q8e(){return await fr("/api/mission-revenues")}async function L8e(e){return await fr(`/api/missions/${e}/revenues`)}async function U8e(e){return await fr("/api/mission-revenues",{method:"POST",body:e})}async function $8e(e,t){return await fr(`/api/mission-revenues/${e}`,{method:"PATCH",body:t})}async function z8e(e){await fr(`/api/mission-revenues/${e}`,{method:"DELETE"})}async function H8e(){return await fr("/api/mission-expenses")}async function W8e(e){return await fr(`/api/missions/${e}/expenses`)}async function G8e(e){return await fr("/api/mission-expenses",{method:"POST",body:e})}async function q8e(e){await fr(`/api/mission-expenses/${e}`,{method:"DELETE"})}async function K8e(e){return await fr(`/api/trips/${e}/expenses`)}async function V8e(){return await fr("/api/trip-expenses")}async function Y8e(e){return await fr("/api/trip-expenses",{method:"POST",body:e})}async function Z8e(e){await fr(`/api/trip-expenses/${e}`,{method:"DELETE"})}function J8e(e){return Ar({queryKey:["/api/trips",e,"expenses"],queryFn:()=>K8e(e),enabled:!!e})}function X8e(){return Ar({queryKey:["/api/trip-expenses"],queryFn:()=>V8e()})}function eDe(){const{toast:e}=sn();return qr({mutationFn:t=>Y8e(t),onSuccess:(t,r)=>{br.invalidateQueries({queryKey:["/api/trips",r.tripId,"expenses"]}),br.invalidateQueries({queryKey:["/api/trip-expenses"]}),br.invalidateQueries({queryKey:["/api/trips",r.tripId]}),e({title:"Succès",description:"La dépense a été ajoutée avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible d'ajouter la dépense"})}})}function tDe(){const{toast:e}=sn();return qr({mutationFn:t=>Z8e(t),onSuccess:(t,r)=>{br.invalidateQueries({queryKey:["/api/trip-expenses"]}),br.invalidateQueries({queryKey:["/api/trip-expenses",r]}),br.invalidateQueries({queryKey:["/api/trips"]}),e({title:"Succès",description:"La dépense a été supprimée avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible de supprimer la dépense"})}})}async function rDe(){return await fr("/api/trip-revenues")}function nDe(){return Ar({queryKey:["/api/trip-revenues"],queryFn:()=>rDe()})}const O1=w.forwardRef(({className:e,...t},r)=>o.jsx("div",{className:"relative w-full overflow-auto",children:o.jsx("table",{ref:r,className:qt("w-full caption-bottom text-sm",e),...t})}));O1.displayName="Table";const R1=w.forwardRef(({className:e,...t},r)=>o.jsx("thead",{ref:r,className:qt("[&_tr]:border-b",e),...t}));R1.displayName="TableHeader";const F1=w.forwardRef(({className:e,...t},r)=>o.jsx("tbody",{ref:r,className:qt("[&_tr:last-child]:border-0",e),...t}));F1.displayName="TableBody";const iDe=w.forwardRef(({className:e,...t},r)=>o.jsx("tfoot",{ref:r,className:qt("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));iDe.displayName="TableFooter";const xc=w.forwardRef(({className:e,...t},r)=>o.jsx("tr",{ref:r,className:qt("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));xc.displayName="TableRow";const Pn=w.forwardRef(({className:e,...t},r)=>o.jsx("th",{ref:r,className:qt("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Pn.displayName="TableHead";const kn=w.forwardRef(({className:e,...t},r)=>o.jsx("td",{ref:r,className:qt("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));kn.displayName="TableCell";const aDe=w.forwardRef(({className:e,...t},r)=>o.jsx("caption",{ref:r,className:qt("mt-4 text-sm text-muted-foreground",e),...t}));aDe.displayName="TableCaption";function sDe(e){const t=oDe(e),r=w.forwardRef((n,i)=>{const{children:a,...s}=n,l=w.Children.toArray(a),c=l.find(cDe);if(c){const u=c.props.children,d=l.map(f=>f===c?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:f);return o.jsx(t,{...s,ref:i,children:w.isValidElement(u)?w.cloneElement(u,void 0,d):null})}return o.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function oDe(e){const t=w.forwardRef((r,n)=>{const{children:i,...a}=r;if(w.isValidElement(i)){const s=dDe(i),l=uDe(a,i.props);return i.type!==w.Fragment&&(l.ref=n?uh(n,s):s),w.cloneElement(i,l)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lDe=Symbol("radix.slottable");function cDe(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lDe}function uDe(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function dDe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var YS="Popover",[Ule]=Hu(YS,[Ag]),kw=Ag(),[fDe,Sg]=Ule(YS),$le=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,l=kw(t),c=w.useRef(null),[u,d]=w.useState(!1),[f,m]=Hf({prop:n,defaultProp:i??!1,onChange:a,caller:YS});return o.jsx(D3,{...l,children:o.jsx(fDe,{scope:t,contentId:R0(),triggerRef:c,open:f,onOpenChange:m,onOpenToggle:w.useCallback(()=>m(g=>!g),[m]),hasCustomAnchor:u,onCustomAnchorAdd:w.useCallback(()=>d(!0),[]),onCustomAnchorRemove:w.useCallback(()=>d(!1),[]),modal:s,children:r})})};$le.displayName=YS;var zle="PopoverAnchor",hDe=w.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,i=Sg(zle,r),a=kw(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=i;return w.useEffect(()=>(s(),()=>l()),[s,l]),o.jsx($b,{...a,...n,ref:t})});hDe.displayName=zle;var Hle="PopoverTrigger",Wle=w.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,i=Sg(Hle,r),a=kw(r),s=qn(t,i.triggerRef),l=o.jsx(mn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Yle(i.open),...n,ref:s,onClick:dr(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:o.jsx($b,{asChild:!0,...a,children:l})});Wle.displayName=Hle;var RO="PopoverPortal",[mDe,pDe]=Ule(RO,{forceMount:void 0}),Gle=e=>{const{__scopePopover:t,forceMount:r,children:n,container:i}=e,a=Sg(RO,t);return o.jsx(mDe,{scope:t,forceMount:r,children:o.jsx(Jc,{present:r||a.open,children:o.jsx(iy,{asChild:!0,container:i,children:n})})})};Gle.displayName=RO;var Ox="PopoverContent",qle=w.forwardRef((e,t)=>{const r=pDe(Ox,e.__scopePopover),{forceMount:n=r.forceMount,...i}=e,a=Sg(Ox,e.__scopePopover);return o.jsx(Jc,{present:n||a.open,children:a.modal?o.jsx(ADe,{...i,ref:t}):o.jsx(vDe,{...i,ref:t})})});qle.displayName=Ox;var gDe=sDe("PopoverContent.RemoveScroll"),ADe=w.forwardRef((e,t)=>{const r=Sg(Ox,e.__scopePopover),n=w.useRef(null),i=qn(t,n),a=w.useRef(!1);return w.useEffect(()=>{const s=n.current;if(s)return U3(s)},[]),o.jsx(Gb,{as:gDe,allowPinchZoom:!0,children:o.jsx(Kle,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:dr(e.onCloseAutoFocus,s=>{s.preventDefault(),a.current||r.triggerRef.current?.focus()}),onPointerDownOutside:dr(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:dr(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),vDe=w.forwardRef((e,t)=>{const r=Sg(Ox,e.__scopePopover),n=w.useRef(!1),i=w.useRef(!1);return o.jsx(Kle,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(n.current||r.triggerRef.current?.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;r.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),Kle=w.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...f}=e,m=Sg(Ox,r),g=kw(r);return Q3(),o.jsx(Wb,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:o.jsx(N1,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>m.onOpenChange(!1),children:o.jsx(T3,{"data-state":Yle(m.open),role:"dialog",id:m.contentId,...g,...f,ref:t,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)"}})})})}),Vle="PopoverClose",xDe=w.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,i=Sg(Vle,r);return o.jsx(mn.button,{type:"button",...n,ref:t,onClick:dr(e.onClick,()=>i.onOpenChange(!1))})});xDe.displayName=Vle;var yDe="PopoverArrow",bDe=w.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,i=kw(r);return o.jsx(P3,{...i,...n,ref:t})});bDe.displayName=yDe;function Yle(e){return e?"open":"closed"}var wDe=$le,EDe=Wle,CDe=Gle,Zle=qle;const IDe=wDe,SDe=EDe,Jle=w.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},i)=>o.jsx(CDe,{children:o.jsx(Zle,{ref:i,align:t,sideOffset:r,className:qt("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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 origin-[--radix-popover-content-transform-origin]",e),...n})}));Jle.displayName=Zle.displayName;function BDe(e,t,r="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:r}).format(t).split(/\s/g).slice(2).join(" ")}const NDe={},m2={};function BA(e,t){try{const n=(NDe[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return n in m2?m2[n]:JL(n,n.split(":"))}catch{if(e in m2)return m2[e];const r=e?.match(kDe);return r?JL(e,r.slice(1)):NaN}}const kDe=/([+-]\d\d):?(\d\d)?/;function JL(e,t){const r=+(t[0]||0),n=+(t[1]||0),i=+(t[2]||0)/60;return m2[e]=r*60+n>0?r*60+n+i:r*60-n-i}class Pf extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(BA(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Xle(this),eD(this)):this.setTime(Date.now())}static tz(t,...r){return r.length?new Pf(...r,t):new Pf(Date.now(),t)}withTimeZone(t){return new Pf(+this,t)}getTimezoneOffset(){const t=-BA(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),eD(this),+this}[Symbol.for("constructDateFrom")](t){return new Pf(+new Date(t),this.timeZone)}}const XL=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!XL.test(e))return;const t=e.replace(XL,"$1UTC");Pf.prototype[t]&&(e.startsWith("get")?Pf.prototype[e]=function(){return this.internal[t]()}:(Pf.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),_De(this),+this},Pf.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),eD(this),+this}))});function eD(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-BA(e.timeZone,e)*60))}function _De(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Xle(e)}function Xle(e){const t=BA(e.timeZone,e),r=t>0?Math.floor(t):Math.ceil(t),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const i=-new Date(+e).getTimezoneOffset(),a=-new Date(+n).getTimezoneOffset(),s=i-a,l=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();s&&l&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+s);const c=i-r;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);const u=new Date(+e);u.setUTCSeconds(0);const d=i>0?u.getSeconds():(u.getSeconds()-60)%60,f=Math.round(-(BA(e.timeZone,e)*60))%60;(f||d)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+f),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+f+d));const m=BA(e.timeZone,e),g=m>0?Math.floor(m):Math.ceil(m),v=-new Date(+e).getTimezoneOffset()-g,b=g!==r,E=v-c;if(b&&E){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+E);const I=BA(e.timeZone,e),S=I>0?Math.floor(I):Math.ceil(I),_=g-S;_&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+_),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+_))}}class Jl extends Pf{static tz(t,...r){return r.length?new Jl(...r,t):new Jl(Date.now(),t)}toISOString(){const[t,r,n]=this.tzComponents(),i=`${t}${r}:${n}`;return this.internal.toISOString().slice(0,-1)+i}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,r,n,i]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${n} ${r} ${i}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[r,n,i]=this.tzComponents();return`${t} GMT${r}${n}${i} (${BDe(this.timeZone,this)})`}toLocaleString(t,r){return Date.prototype.toLocaleString.call(this,t,{...r,timeZone:r?.timeZone||this.timeZone})}toLocaleDateString(t,r){return Date.prototype.toLocaleDateString.call(this,t,{...r,timeZone:r?.timeZone||this.timeZone})}toLocaleTimeString(t,r){return Date.prototype.toLocaleTimeString.call(this,t,{...r,timeZone:r?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),r=t>0?"-":"+",n=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),i=String(Math.abs(t)%60).padStart(2,"0");return[r,n,i]}withTimeZone(t){return new Jl(+this,t)}[Symbol.for("constructDateFrom")](t){return new Jl(+new Date(t),this.timeZone)}}const eU=5,jDe=4;function DDe(e,t){const r=t.startOfMonth(e),n=r.getDay()>0?r.getDay():7,i=t.addDays(e,-n+1),a=t.addDays(i,eU*7-1);return t.getMonth(e)===t.getMonth(a)?eU:jDe}function ece(e,t){const r=t.startOfMonth(e),n=r.getDay();return n===1?r:n===0?t.addDays(r,-6):t.addDays(r,-1*(n-1))}function TDe(e,t){const r=ece(e,t),n=DDe(e,t);return t.addDays(r,n*7-1)}const tce={...$v,labels:{labelDayButton:(e,t,r,n)=>{let i;n&&typeof n.format=="function"?i=n.format.bind(n):i=(s,l)=>Kr(s,l,{locale:$v,...r});let a=i(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,r)=>{let n;return r&&typeof r.format=="function"?n=r.format.bind(r):n=(i,a)=>Kr(i,a,{locale:$v,...t}),n(e,"LLLL yyyy")},labelGridcell:(e,t,r,n)=>{let i;n&&typeof n.format=="function"?i=n.format.bind(n):i=(s,l)=>Kr(s,l,{locale:$v,...r});let a=i(e,"PPPP");return t?.today&&(a=`Today, ${a}`),a},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,r)=>{let n;return r&&typeof r.format=="function"?n=r.format.bind(r):n=(i,a)=>Kr(i,a,{locale:$v,...t}),n(e,"cccc")}}};class Qu{constructor(t,r){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?Jl.tz(this.options.timeZone):new this.Date,this.newDate=(n,i,a)=>this.overrides?.newDate?this.overrides.newDate(n,i,a):this.options.timeZone?new Jl(n,i,a,this.options.timeZone):new Date(n,i,a),this.addDays=(n,i)=>this.overrides?.addDays?this.overrides.addDays(n,i):_ee(n,i),this.addMonths=(n,i)=>this.overrides?.addMonths?this.overrides.addMonths(n,i):jee(n,i),this.addWeeks=(n,i)=>this.overrides?.addWeeks?this.overrides.addWeeks(n,i):oCe(n,i),this.addYears=(n,i)=>this.overrides?.addYears?this.overrides.addYears(n,i):lCe(n,i),this.differenceInCalendarDays=(n,i)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(n,i):W3(n,i),this.differenceInCalendarMonths=(n,i)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(n,i):Pee(n,i),this.eachMonthOfInterval=n=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(n):mCe(n),this.eachYearOfInterval=n=>{const i=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(n):gCe(n),a=new Set(i.map(l=>this.getYear(l)));if(a.size===i.length)return i;const s=[];return a.forEach(l=>{s.push(new Date(l,0,1))}),s},this.endOfBroadcastWeek=n=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(n):TDe(n,this),this.endOfISOWeek=n=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(n):ACe(n),this.endOfMonth=n=>this.overrides?.endOfMonth?this.overrides.endOfMonth(n):Oee(n),this.endOfWeek=(n,i)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(n,i):DP(n,this.options),this.endOfYear=n=>this.overrides?.endOfYear?this.overrides.endOfYear(n):Mee(n),this.format=(n,i,a)=>{const s=this.overrides?.format?this.overrides.format(n,i,this.options):Kr(n,i,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=n=>this.overrides?.getISOWeek?this.overrides.getISOWeek(n):TP(n),this.getMonth=(n,i)=>this.overrides?.getMonth?this.overrides.getMonth(n,this.options):mIe(n,this.options),this.getYear=(n,i)=>this.overrides?.getYear?this.overrides.getYear(n,this.options):pIe(n,this.options),this.getWeek=(n,i)=>this.overrides?.getWeek?this.overrides.getWeek(n,this.options):PP(n,this.options),this.isAfter=(n,i)=>this.overrides?.isAfter?this.overrides.isAfter(n,i):gIe(n,i),this.isBefore=(n,i)=>this.overrides?.isBefore?this.overrides.isBefore(n,i):AIe(n,i),this.isDate=n=>this.overrides?.isDate?this.overrides.isDate(n):Tee(n),this.isSameDay=(n,i)=>this.overrides?.isSameDay?this.overrides.isSameDay(n,i):dCe(n,i),this.isSameMonth=(n,i)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(n,i):vIe(n,i),this.isSameYear=(n,i)=>this.overrides?.isSameYear?this.overrides.isSameYear(n,i):xIe(n,i),this.max=n=>this.overrides?.max?this.overrides.max(n):cCe(n),this.min=n=>this.overrides?.min?this.overrides.min(n):uCe(n),this.setMonth=(n,i)=>this.overrides?.setMonth?this.overrides.setMonth(n,i):yIe(n,i),this.setYear=(n,i)=>this.overrides?.setYear?this.overrides.setYear(n,i):bIe(n,i),this.startOfBroadcastWeek=(n,i)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(n,this):ece(n,this),this.startOfDay=n=>this.overrides?.startOfDay?this.overrides.startOfDay(n):s1(n),this.startOfISOWeek=n=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(n):W2(n),this.startOfMonth=n=>this.overrides?.startOfMonth?this.overrides.startOfMonth(n):Fee(n),this.startOfWeek=(n,i)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(n,this.options):a1(n,this.options),this.startOfYear=n=>this.overrides?.startOfYear?this.overrides.startOfYear(n):jP(n),this.options={locale:tce,...t},this.overrides=r}getDigitMap(){const{numerals:t="latn"}=this.options,r=new Intl.NumberFormat("en-US",{numberingSystem:t}),n={};for(let i=0;i<10;i++)n[i.toString()]=r.format(i);return n}replaceDigits(t){const r=this.getDigitMap();return t.replace(/\d/g,n=>r[n]||n)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&Qu.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:r,timeZone:n,numerals:i}=this.options,a=r?.code;if(a&&Qu.yearFirstLocales.has(a))try{return new Intl.DateTimeFormat(a,{month:"long",year:"numeric",timeZone:n,numberingSystem:i}).format(t)}catch{}const s=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,s)}}Qu.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const fh=new Qu;class rce{constructor(t,r,n=fh){this.date=t,this.displayMonth=r,this.outside=!!(r&&!n.isSameMonth(t,r)),this.dateLib=n,this.isoDate=n.format(t,"yyyy-MM-dd"),this.displayMonthId=n.format(r,"yyyy-MM"),this.dateMonthId=n.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class PDe{constructor(t,r){this.date=t,this.weeks=r}}class ODe{constructor(t,r){this.days=r,this.weekNumber=t}}function RDe(e){return gr.createElement("button",{...e})}function FDe(e){return gr.createElement("span",{...e})}function MDe(e){const{size:t=24,orientation:r="left",className:n}=e;return gr.createElement("svg",{className:n,width:t,height:t,viewBox:"0 0 24 24"},r==="up"&&gr.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),r==="down"&&gr.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),r==="left"&&gr.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),r==="right"&&gr.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function QDe(e){const{day:t,modifiers:r,...n}=e;return gr.createElement("td",{...n})}function LDe(e){const{day:t,modifiers:r,...n}=e,i=gr.useRef(null);return gr.useEffect(()=>{r.focused&&i.current?.focus()},[r.focused]),gr.createElement("button",{ref:i,...n})}var Zr;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(Zr||(Zr={}));var vs;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(vs||(vs={}));var Bd;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Bd||(Bd={}));var ku;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(ku||(ku={}));function UDe(e){const{options:t,className:r,components:n,classNames:i,...a}=e,s=[i[Zr.Dropdown],r].join(" "),l=t?.find(({value:c})=>c===a.value);return gr.createElement("span",{"data-disabled":a.disabled,className:i[Zr.DropdownRoot]},gr.createElement(n.Select,{className:s,...a},t?.map(({value:c,label:u,disabled:d})=>gr.createElement(n.Option,{key:c,value:c,disabled:d},u))),gr.createElement("span",{className:i[Zr.CaptionLabel],"aria-hidden":!0},l?.label,gr.createElement(n.Chevron,{orientation:"down",size:18,className:i[Zr.Chevron]})))}function $De(e){return gr.createElement("div",{...e})}function zDe(e){return gr.createElement("div",{...e})}function HDe(e){const{calendarMonth:t,displayIndex:r,...n}=e;return gr.createElement("div",{...n},e.children)}function WDe(e){const{calendarMonth:t,displayIndex:r,...n}=e;return gr.createElement("div",{...n})}function GDe(e){return gr.createElement("table",{...e})}function qDe(e){return gr.createElement("div",{...e})}const nce=w.createContext(void 0);function _w(){const e=w.useContext(nce);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function KDe(e){const{components:t}=_w();return gr.createElement(t.Dropdown,{...e})}function VDe(e){const{onPreviousClick:t,onNextClick:r,previousMonth:n,nextMonth:i,...a}=e,{components:s,classNames:l,labels:{labelPrevious:c,labelNext:u}}=_w(),d=w.useCallback(m=>{i&&r?.(m)},[i,r]),f=w.useCallback(m=>{n&&t?.(m)},[n,t]);return gr.createElement("nav",{...a},gr.createElement(s.PreviousMonthButton,{type:"button",className:l[Zr.PreviousMonthButton],tabIndex:n?void 0:-1,"aria-disabled":n?void 0:!0,"aria-label":c(n),onClick:f},gr.createElement(s.Chevron,{disabled:n?void 0:!0,className:l[Zr.Chevron],orientation:"left"})),gr.createElement(s.NextMonthButton,{type:"button",className:l[Zr.NextMonthButton],tabIndex:i?void 0:-1,"aria-disabled":i?void 0:!0,"aria-label":u(i),onClick:d},gr.createElement(s.Chevron,{disabled:i?void 0:!0,orientation:"right",className:l[Zr.Chevron]})))}function YDe(e){const{components:t}=_w();return gr.createElement(t.Button,{...e})}function ZDe(e){return gr.createElement("option",{...e})}function JDe(e){const{components:t}=_w();return gr.createElement(t.Button,{...e})}function XDe(e){const{rootRef:t,...r}=e;return gr.createElement("div",{...r,ref:t})}function eTe(e){return gr.createElement("select",{...e})}function tTe(e){const{week:t,...r}=e;return gr.createElement("tr",{...r})}function rTe(e){return gr.createElement("th",{...e})}function nTe(e){return gr.createElement("thead",{"aria-hidden":!0},gr.createElement("tr",{...e}))}function iTe(e){const{week:t,...r}=e;return gr.createElement("th",{...r})}function aTe(e){return gr.createElement("th",{...e})}function sTe(e){return gr.createElement("tbody",{...e})}function oTe(e){const{components:t}=_w();return gr.createElement(t.Dropdown,{...e})}const lTe=Object.freeze(Object.defineProperty({__proto__:null,Button:RDe,CaptionLabel:FDe,Chevron:MDe,Day:QDe,DayButton:LDe,Dropdown:UDe,DropdownNav:$De,Footer:zDe,Month:HDe,MonthCaption:WDe,MonthGrid:GDe,Months:qDe,MonthsDropdown:KDe,Nav:VDe,NextMonthButton:YDe,Option:ZDe,PreviousMonthButton:JDe,Root:XDe,Select:eTe,Week:tTe,WeekNumber:iTe,WeekNumberHeader:aTe,Weekday:rTe,Weekdays:nTe,Weeks:sTe,YearsDropdown:oTe},Symbol.toStringTag,{value:"Module"}));function Xh(e,t,r=!1,n=fh){let{from:i,to:a}=e;const{differenceInCalendarDays:s,isSameDay:l}=n;return i&&a?(s(a,i)<0&&([i,a]=[a,i]),s(t,i)>=(r?1:0)&&s(a,t)>=(r?1:0)):!r&&a?l(a,t):!r&&i?l(i,t):!1}function FO(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function ZS(e){return!!(e&&typeof e=="object"&&"from"in e)}function MO(e){return!!(e&&typeof e=="object"&&"after"in e)}function QO(e){return!!(e&&typeof e=="object"&&"before"in e)}function ice(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function ace(e,t){return Array.isArray(e)&&e.every(t.isDate)}function em(e,t,r=fh){const n=Array.isArray(t)?t:[t],{isSameDay:i,differenceInCalendarDays:a,isAfter:s}=r;return n.some(l=>{if(typeof l=="boolean")return l;if(r.isDate(l))return i(e,l);if(ace(l,r))return l.some(c=>i(e,c));if(ZS(l))return Xh(l,e,!1,r);if(ice(l))return Array.isArray(l.dayOfWeek)?l.dayOfWeek.includes(e.getDay()):l.dayOfWeek===e.getDay();if(FO(l)){const c=a(l.before,e),u=a(l.after,e),d=c>0,f=u<0;return s(l.before,l.after)?f&&d:d||f}return MO(l)?a(e,l.after)>0:QO(l)?a(l.before,e)>0:typeof l=="function"?l(e):!1})}function cTe(e,t,r,n,i){const{disabled:a,hidden:s,modifiers:l,showOutsideDays:c,broadcastCalendar:u,today:d=i.today()}=t,{isSameDay:f,isSameMonth:m,startOfMonth:g,isBefore:A,endOfMonth:v,isAfter:b}=i,E=r&&g(r),I=n&&v(n),S={[vs.focused]:[],[vs.outside]:[],[vs.disabled]:[],[vs.hidden]:[],[vs.today]:[]},_={};for(const B of e){const{date:T,displayMonth:P}=B,O=!!(P&&!m(T,P)),z=!!(E&&A(T,E)),L=!!(I&&b(T,I)),W=!!(a&&em(T,a,i)),R=!!(s&&em(T,s,i))||z||L||!u&&!c&&O||u&&c===!1&&O,$=f(T,d);O&&S.outside.push(B),W&&S.disabled.push(B),R&&S.hidden.push(B),$&&S.today.push(B),l&&Object.keys(l).forEach(X=>{const Z=l?.[X];Z&&em(T,Z,i)&&(_[X]?_[X].push(B):_[X]=[B])})}return B=>{const T={[vs.focused]:!1,[vs.disabled]:!1,[vs.hidden]:!1,[vs.outside]:!1,[vs.today]:!1},P={};for(const O in S){const z=S[O];T[O]=z.some(L=>L===B)}for(const O in _)P[O]=_[O].some(z=>z===B);return{...T,...P}}}function uTe(e,t,r={}){return Object.entries(e).filter(([,i])=>i===!0).reduce((i,[a])=>(r[a]?i.push(r[a]):t[vs[a]]?i.push(t[vs[a]]):t[Bd[a]]&&i.push(t[Bd[a]]),i),[t[Zr.Day]])}function dTe(e){return{...lTe,...e}}function fTe(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([r,n])=>{r.startsWith("data-")&&(t[r]=n)}),t}function hTe(){const e={};for(const t in Zr)e[Zr[t]]=`rdp-${Zr[t]}`;for(const t in vs)e[vs[t]]=`rdp-${vs[t]}`;for(const t in Bd)e[Bd[t]]=`rdp-${Bd[t]}`;for(const t in ku)e[ku[t]]=`rdp-${ku[t]}`;return e}function sce(e,t,r){return(r??new Qu(t)).formatMonthYear(e)}const mTe=sce;function pTe(e,t,r){return(r??new Qu(t)).format(e,"d")}function gTe(e,t=fh){return t.format(e,"LLLL")}function ATe(e,t,r){return(r??new Qu(t)).format(e,"cccccc")}function vTe(e,t=fh){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function xTe(){return""}function oce(e,t=fh){return t.format(e,"yyyy")}const yTe=oce,bTe=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:sce,formatDay:pTe,formatMonthCaption:mTe,formatMonthDropdown:gTe,formatWeekNumber:vTe,formatWeekNumberHeader:xTe,formatWeekdayName:ATe,formatYearCaption:yTe,formatYearDropdown:oce},Symbol.toStringTag,{value:"Module"}));function wTe(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...bTe,...e}}function LO(e,t,r,n){let i=(n??new Qu(r)).format(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i}const ETe=LO;function UO(e,t,r){return(r??new Qu(t)).formatMonthYear(e)}const CTe=UO;function lce(e,t,r,n){let i=(n??new Qu(r)).format(e,"PPPP");return t?.today&&(i=`Today, ${i}`),i}function cce(e){return"Choose the Month"}function uce(){return""}const ITe="Go to the Next Month";function dce(e,t){return ITe}function fce(e){return"Go to the Previous Month"}function hce(e,t,r){return(r??new Qu(t)).format(e,"cccc")}function mce(e,t){return`Week ${e}`}function pce(e){return"Week Number"}function gce(e){return"Choose the Year"}const STe=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:CTe,labelDay:ETe,labelDayButton:LO,labelGrid:UO,labelGridcell:lce,labelMonthDropdown:cce,labelNav:uce,labelNext:dce,labelPrevious:fce,labelWeekNumber:mce,labelWeekNumberHeader:pce,labelWeekday:hce,labelYearDropdown:gce},Symbol.toStringTag,{value:"Module"})),pd=(e,t,r)=>t||(r?typeof r=="function"?r:(...n)=>r:e);function BTe(e,t){const r=t.locale?.labels??{};return{...STe,...e??{},labelDayButton:pd(LO,e?.labelDayButton,r.labelDayButton),labelMonthDropdown:pd(cce,e?.labelMonthDropdown,r.labelMonthDropdown),labelNext:pd(dce,e?.labelNext,r.labelNext),labelPrevious:pd(fce,e?.labelPrevious,r.labelPrevious),labelWeekNumber:pd(mce,e?.labelWeekNumber,r.labelWeekNumber),labelYearDropdown:pd(gce,e?.labelYearDropdown,r.labelYearDropdown),labelGrid:pd(UO,e?.labelGrid,r.labelGrid),labelGridcell:pd(lce,e?.labelGridcell,r.labelGridcell),labelNav:pd(uce,e?.labelNav,r.labelNav),labelWeekNumberHeader:pd(pce,e?.labelWeekNumberHeader,r.labelWeekNumberHeader),labelWeekday:pd(hce,e?.labelWeekday,r.labelWeekday)}}function NTe(e,t,r,n,i){const{startOfMonth:a,startOfYear:s,endOfYear:l,eachMonthOfInterval:c,getMonth:u}=i;return c({start:s(e),end:l(e)}).map(m=>{const g=n.formatMonthDropdown(m,i),A=u(m),v=t&&ma(r)||!1;return{value:A,label:g,disabled:v}})}function kTe(e,t={},r={}){let n={...t?.[Zr.Day]};return Object.entries(e).filter(([,i])=>i===!0).forEach(([i])=>{n={...n,...r?.[i]}}),n}function _Te(e,t,r,n){const i=n??e.today(),a=r?e.startOfBroadcastWeek(i,e):t?e.startOfISOWeek(i):e.startOfWeek(i),s=[];for(let l=0;l<7;l++){const c=e.addDays(a,l);s.push(c)}return s}function jTe(e,t,r,n,i=!1){if(!e||!t)return;const{startOfYear:a,endOfYear:s,eachYearOfInterval:l,getYear:c}=n,u=a(e),d=s(t),f=l({start:u,end:d});return i&&f.reverse(),f.map(m=>{const g=r.formatYearDropdown(m,n);return{value:c(m),label:g,disabled:!1}})}function DTe(e,t={}){const{weekStartsOn:r,locale:n}=t,i=r??n?.options?.weekStartsOn??0,a=l=>{const c=typeof l=="number"||typeof l=="string"?new Date(l):l;return new Jl(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,e)},s=l=>{const c=a(l);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>a(Jl.tz(e)),newDate:(l,c,u)=>new Jl(l,c,u,12,0,0,e),startOfDay:l=>a(l),startOfWeek:(l,c)=>{const u=a(l),d=c?.weekStartsOn??i,f=(u.getDay()-d+7)%7;return u.setDate(u.getDate()-f),u},startOfISOWeek:l=>{const c=a(l),u=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-u),c},startOfMonth:l=>{const c=a(l);return c.setDate(1),c},startOfYear:l=>{const c=a(l);return c.setMonth(0,1),c},endOfWeek:(l,c)=>{const u=a(l),m=(((c?.weekStartsOn??i)+6)%7-u.getDay()+7)%7;return u.setDate(u.getDate()+m),u},endOfISOWeek:l=>{const c=a(l),u=(7-c.getDay())%7;return c.setDate(c.getDate()+u),c},endOfMonth:l=>{const c=a(l);return c.setMonth(c.getMonth()+1,0),c},endOfYear:l=>{const c=a(l);return c.setMonth(11,31),c},eachMonthOfInterval:l=>{const c=a(l.start),u=a(l.end),d=[],f=new Jl(c.getFullYear(),c.getMonth(),1,12,0,0,e),m=u.getFullYear()*12+u.getMonth();for(;f.getFullYear()*12+f.getMonth()<=m;)d.push(new Jl(f,e)),f.setMonth(f.getMonth()+1,1);return d},addDays:(l,c)=>{const u=a(l);return u.setDate(u.getDate()+c),u},addWeeks:(l,c)=>{const u=a(l);return u.setDate(u.getDate()+c*7),u},addMonths:(l,c)=>{const u=a(l);return u.setMonth(u.getMonth()+c),u},addYears:(l,c)=>{const u=a(l);return u.setFullYear(u.getFullYear()+c),u},eachYearOfInterval:l=>{const c=a(l.start),u=a(l.end),d=[],f=new Jl(c.getFullYear(),0,1,12,0,0,e);for(;f.getFullYear()<=u.getFullYear();)d.push(new Jl(f,e)),f.setFullYear(f.getFullYear()+1,0,1);return d},getWeek:(l,c)=>{const u=s(l);return PP(u,{weekStartsOn:c?.weekStartsOn??i,firstWeekContainsDate:c?.firstWeekContainsDate??n?.options?.firstWeekContainsDate??1})},getISOWeek:l=>{const c=s(l);return TP(c)},differenceInCalendarDays:(l,c)=>{const u=s(l),d=s(c);return W3(u,d)},differenceInCalendarMonths:(l,c)=>{const u=s(l),d=s(c);return Pee(u,d)}}}const jw=e=>e instanceof HTMLElement?e:null,jN=e=>[...e.querySelectorAll("[data-animated-month]")??[]],TTe=e=>jw(e.querySelector("[data-animated-month]")),DN=e=>jw(e.querySelector("[data-animated-caption]")),TN=e=>jw(e.querySelector("[data-animated-weeks]")),PTe=e=>jw(e.querySelector("[data-animated-nav]")),OTe=e=>jw(e.querySelector("[data-animated-weekdays]"));function RTe(e,t,{classNames:r,months:n,focused:i,dateLib:a}){const s=w.useRef(null),l=w.useRef(n),c=w.useRef(!1);w.useLayoutEffect(()=>{const u=l.current;if(l.current=n,!t||!e.current||!(e.current instanceof HTMLElement)||n.length===0||u.length===0||n.length!==u.length)return;const d=a.isSameMonth(n[0].date,u[0].date),f=a.isAfter(n[0].date,u[0].date),m=f?r[ku.caption_after_enter]:r[ku.caption_before_enter],g=f?r[ku.weeks_after_enter]:r[ku.weeks_before_enter],A=s.current,v=e.current.cloneNode(!0);if(v instanceof HTMLElement?(jN(v).forEach(S=>{if(!(S instanceof HTMLElement))return;const _=TTe(S);_&&S.contains(_)&&S.removeChild(_);const B=DN(S);B&&B.classList.remove(m);const T=TN(S);T&&T.classList.remove(g)}),s.current=v):s.current=null,c.current||d||i)return;const b=A instanceof HTMLElement?jN(A):[],E=jN(e.current);if(E?.every(I=>I instanceof HTMLElement)&&b&&b.every(I=>I instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const I=PTe(e.current);I&&(I.style.zIndex="1"),E.forEach((S,_)=>{const B=b[_];if(!B)return;S.style.position="relative",S.style.overflow="hidden";const T=DN(S);T&&T.classList.add(m);const P=TN(S);P&&P.classList.add(g);const O=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),I&&(I.style.zIndex=""),T&&T.classList.remove(m),P&&P.classList.remove(g),S.style.position="",S.style.overflow="",S.contains(B)&&S.removeChild(B)};B.style.pointerEvents="none",B.style.position="absolute",B.style.overflow="hidden",B.setAttribute("aria-hidden","true");const z=OTe(B);z&&(z.style.opacity="0");const L=DN(B);L&&(L.classList.add(f?r[ku.caption_before_exit]:r[ku.caption_after_exit]),L.addEventListener("animationend",O));const W=TN(B);W&&W.classList.add(f?r[ku.weeks_before_exit]:r[ku.weeks_after_exit]),S.insertBefore(B,S.firstChild)})}})}function FTe(e,t,r,n){const i=e[0],a=e[e.length-1],{ISOWeek:s,fixedWeeks:l,broadcastCalendar:c}=r??{},{addDays:u,differenceInCalendarDays:d,differenceInCalendarMonths:f,endOfBroadcastWeek:m,endOfISOWeek:g,endOfMonth:A,endOfWeek:v,isAfter:b,startOfBroadcastWeek:E,startOfISOWeek:I,startOfWeek:S}=n,_=c?E(i,n):s?I(i):S(i),B=c?m(a):s?g(A(a)):v(A(a)),T=t&&(c?m(t):s?g(t):v(t)),P=T&&b(B,T)?T:B,O=d(P,_),z=f(a,i)+1,L=[];for(let $=0;$<=O;$++){const X=u(_,$);L.push(X)}const R=(c?35:42)*z;if(l&&L.length{const i=n.weeks.reduce((a,s)=>a.concat(s.days.slice()),t.slice());return r.concat(i.slice())},t.slice())}function QTe(e,t,r,n){const{numberOfMonths:i=1}=r,a=[];for(let s=0;st)break;a.push(l)}return a}function tU(e,t,r,n){const{month:i,defaultMonth:a,today:s=n.today(),numberOfMonths:l=1}=e;let c=i||a||s;const{differenceInCalendarMonths:u,addMonths:d,startOfMonth:f}=n;if(r&&u(r,c){const E=r.broadcastCalendar?f(b,n):r.ISOWeek?m(b):g(b),I=r.broadcastCalendar?a(b):r.ISOWeek?s(l(b)):c(l(b)),S=t.filter(P=>P>=E&&P<=I),_=r.broadcastCalendar?35:42;if(r.fixedWeeks&&S.length<_){const P=t.filter(O=>{const z=_-S.length;return O>I&&O<=i(I,z)});S.push(...P)}const B=S.reduce((P,O)=>{const z=r.ISOWeek?u(O):d(O),L=P.find(R=>R.weekNumber===z),W=new rce(O,b,n);return L?L.days.push(W):P.push(new ODe(z,[W])),P},[]),T=new PDe(b,B);return v.push(T),v},[]);return r.reverseMonths?A.reverse():A}function UTe(e,t){let{startMonth:r,endMonth:n}=e;const{startOfYear:i,startOfDay:a,startOfMonth:s,endOfMonth:l,addYears:c,endOfYear:u,newDate:d,today:f}=t,{fromYear:m,toYear:g,fromMonth:A,toMonth:v}=e;!r&&A&&(r=A),!r&&m&&(r=t.newDate(m,0,1)),!n&&v&&(n=v),!n&&g&&(n=d(g,11,31));const b=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return r?r=s(r):m?r=d(m,0,1):!r&&b&&(r=i(c(e.today??f(),-100))),n?n=l(n):g?n=d(g,11,31):!n&&b&&(n=u(e.today??f())),[r&&a(r),n&&a(n)]}function $Te(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:i,numberOfMonths:a=1}=r,{startOfMonth:s,addMonths:l,differenceInCalendarMonths:c}=n,u=i?a:1,d=s(e);if(!t)return l(d,u);if(!(c(t,e)r.concat(n.weeks.slice()),t.slice())}function JS(e,t){const[r,n]=w.useState(e);return[t===void 0?r:t,n]}function WTe(e,t){const[r,n]=UTe(e,t),{startOfMonth:i,endOfMonth:a}=t,s=tU(e,r,n,t),[l,c]=JS(s,e.month?s:void 0);w.useEffect(()=>{const _=tU(e,r,n,t);c(_)},[e.timeZone]);const{months:u,weeks:d,days:f,previousMonth:m,nextMonth:g}=w.useMemo(()=>{const _=QTe(l,n,{numberOfMonths:e.numberOfMonths},t),B=FTe(_,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),T=LTe(_,B,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),P=HTe(T),O=MTe(T),z=zTe(l,r,e,t),L=$Te(l,n,e,t);return{months:T,weeks:P,days:O,previousMonth:z,nextMonth:L}},[t,l.getTime(),n?.getTime(),r?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:A,onMonthChange:v}=e,b=_=>d.some(B=>B.days.some(T=>T.isEqualTo(_))),E=_=>{if(A)return;let B=i(_);r&&Bi(n)&&(B=i(n)),c(B),v?.(B)};return{months:u,weeks:d,days:f,navStart:r,navEnd:n,previousMonth:m,nextMonth:g,goToMonth:E,goToDay:_=>{b(_)||E(_.date)}}}var xf;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(xf||(xf={}));function rU(e){return!e[vs.disabled]&&!e[vs.hidden]&&!e[vs.outside]}function GTe(e,t,r,n){let i,a=-1;for(const s of e){const l=t(s);rU(l)&&(l[vs.focused]&&arU(t(s)))),i}function qTe(e,t,r,n,i,a,s){const{ISOWeek:l,broadcastCalendar:c}=a,{addDays:u,addMonths:d,addWeeks:f,addYears:m,endOfBroadcastWeek:g,endOfISOWeek:A,endOfWeek:v,max:b,min:E,startOfBroadcastWeek:I,startOfISOWeek:S,startOfWeek:_}=s;let T={day:u,week:f,month:d,year:m,startOfWeek:P=>c?I(P,s):l?S(P):_(P),endOfWeek:P=>c?g(P):l?A(P):v(P)}[e](r,t==="after"?1:-1);return t==="before"&&n?T=b([n,T]):t==="after"&&i&&(T=E([i,T])),T}function Ace(e,t,r,n,i,a,s,l=0){if(l>365)return;const c=qTe(e,t,r.date,n,i,a,s),u=!!(a.disabled&&em(c,a.disabled,s)),d=!!(a.hidden&&em(c,a.hidden,s)),f=c,m=new rce(c,f,s);return!u&&!d?m:Ace(e,t,m,n,i,a,s,l+1)}function KTe(e,t,r,n,i){const{autoFocus:a}=e,[s,l]=w.useState(),c=GTe(t.days,r,n||(()=>!1),s),[u,d]=w.useState(a?c:void 0);return{isFocusTarget:v=>!!c?.isEqualTo(v),setFocused:d,focused:u,blur:()=>{l(u),d(void 0)},moveFocus:(v,b)=>{if(!u)return;const E=Ace(v,b,u,t.navStart,t.navEnd,e,i);E&&(e.disableNavigation&&!t.days.some(S=>S.isEqualTo(E))||(t.goToDay(E),d(E)))}}}function VTe(e,t){const{selected:r,required:n,onSelect:i}=e,[a,s]=JS(r,i?r:void 0),l=i?r:a,{isSameDay:c}=t,u=g=>l?.some(A=>c(A,g))??!1,{min:d,max:f}=e;return{selected:l,select:(g,A,v)=>{let b=[...l??[]];if(u(g)){if(l?.length===d||n&&l?.length===1)return;b=l?.filter(E=>!c(E,g))}else l?.length===f?b=[g]:b=[...b,g];return i||s(b),i?.(b,g,A,v),b},isSelected:u}}function YTe(e,t,r=0,n=0,i=!1,a=fh){const{from:s,to:l}=t||{},{isSameDay:c,isAfter:u,isBefore:d}=a;let f;if(!s&&!l)f={from:e,to:r>0?void 0:e};else if(s&&!l)c(s,e)?r===0?f={from:s,to:e}:i?f={from:s,to:void 0}:f=void 0:d(e,s)?f={from:e,to:s}:f={from:s,to:e};else if(s&&l)if(c(s,e)&&c(l,e))i?f={from:s,to:l}:f=void 0;else if(c(s,e))f={from:s,to:r>0?void 0:e};else if(c(l,e))f={from:e,to:r>0?void 0:e};else if(d(e,s))f={from:e,to:l};else if(u(e,s))f={from:s,to:e};else if(u(e,l))f={from:s,to:e};else throw new Error("Invalid range");if(f?.from&&f?.to){const m=a.differenceInCalendarDays(f.to,f.from);n>0&&m>n?f={from:e,to:void 0}:r>1&&mtypeof l!="function").some(l=>typeof l=="boolean"?l:r.isDate(l)?Xh(e,l,!1,r):ace(l,r)?l.some(c=>Xh(e,c,!1,r)):ZS(l)?l.from&&l.to?nU(e,{from:l.from,to:l.to},r):!1:ice(l)?ZTe(e,l.dayOfWeek,r):FO(l)?r.isAfter(l.before,l.after)?nU(e,{from:r.addDays(l.after,1),to:r.addDays(l.before,-1)},r):em(e.from,l,r)||em(e.to,l,r):MO(l)||QO(l)?em(e.from,l,r)||em(e.to,l,r):!1))return!0;const s=n.filter(l=>typeof l=="function");if(s.length){let l=e.from;const c=r.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(s.some(d=>d(l)))return!0;l=r.addDays(l,1)}}return!1}function XTe(e,t){const{disabled:r,excludeDisabled:n,selected:i,required:a,onSelect:s}=e,[l,c]=JS(i,s?i:void 0),u=s?i:l;return{selected:u,select:(m,g,A)=>{const{min:v,max:b}=e,E=m?YTe(m,u,v,b,a,t):void 0;return n&&r&&E?.from&&E.to&&JTe({from:E.from,to:E.to},r,t)&&(E.from=m,E.to=void 0),s||c(E),s?.(E,m,g,A),E},isSelected:m=>u&&Xh(u,m,!1,t)}}function ePe(e,t){const{selected:r,required:n,onSelect:i}=e,[a,s]=JS(r,i?r:void 0),l=i?r:a,{isSameDay:c}=t;return{selected:l,select:(f,m,g)=>{let A=f;return!n&&l&&l&&c(f,l)&&(A=void 0),i||s(A),i?.(A,f,m,g),A},isSelected:f=>l?c(l,f):!1}}function tPe(e,t){const r=ePe(e,t),n=VTe(e,t),i=XTe(e,t);switch(e.mode){case"single":return r;case"multiple":return n;case"range":return i;default:return}}function B0(e,t){return e instanceof Jl&&e.timeZone===t?e:new Jl(e,t)}function jv(e,t,r){return B0(e,t)}function iU(e,t,r){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?jv(e,t):Array.isArray(e)?e.map(n=>n instanceof Date?jv(n,t):n):ZS(e)?{...e,from:e.from?B0(e.from,t):e.from,to:e.to?B0(e.to,t):e.to}:FO(e)?{before:jv(e.before,t),after:jv(e.after,t)}:MO(e)?{after:jv(e.after,t)}:QO(e)?{before:jv(e.before,t)}:e}function PN(e,t,r){return e&&(Array.isArray(e)?e.map(n=>iU(n,t)):iU(e,t))}function rPe(e){let t=e;const r=t.timeZone;if(r&&(t={...e,timeZone:r},t.today&&(t.today=B0(t.today,r)),t.month&&(t.month=B0(t.month,r)),t.defaultMonth&&(t.defaultMonth=B0(t.defaultMonth,r)),t.startMonth&&(t.startMonth=B0(t.startMonth,r)),t.endMonth&&(t.endMonth=B0(t.endMonth,r)),t.mode==="single"&&t.selected?t.selected=B0(t.selected,r):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(bt=>B0(bt,r)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?B0(t.selected.from,r):t.selected.from,to:t.selected.to?B0(t.selected.to,r):t.selected.to}),t.disabled!==void 0&&(t.disabled=PN(t.disabled,r)),t.hidden!==void 0&&(t.hidden=PN(t.hidden,r)),t.modifiers)){const bt={};Object.keys(t.modifiers).forEach(U=>{bt[U]=PN(t.modifiers?.[U],r)}),t.modifiers=bt}const{components:n,formatters:i,labels:a,dateLib:s,locale:l,classNames:c}=w.useMemo(()=>{const bt={...tce,...t.locale},U=t.broadcastCalendar?1:t.weekStartsOn,Re=t.noonSafe&&t.timeZone?DTe(t.timeZone,{weekStartsOn:U,locale:bt}):void 0,He=t.dateLib&&Re?{...Re,...t.dateLib}:t.dateLib??Re,se=new Qu({locale:bt,weekStartsOn:U,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},He);return{dateLib:se,components:dTe(t.components),formatters:wTe(t.formatters),labels:BTe(t.labels,se.options),locale:bt,classNames:{...hTe(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:s.today()});const{captionLayout:u,mode:d,navLayout:f,numberOfMonths:m=1,onDayBlur:g,onDayClick:A,onDayFocus:v,onDayKeyDown:b,onDayMouseEnter:E,onDayMouseLeave:I,onNextClick:S,onPrevClick:_,showWeekNumber:B,styles:T}=t,{formatCaption:P,formatDay:O,formatMonthDropdown:z,formatWeekNumber:L,formatWeekNumberHeader:W,formatWeekdayName:R,formatYearDropdown:$}=i,X=WTe(t,s),{days:Z,months:K,navStart:q,navEnd:Y,previousMonth:ne,nextMonth:ge,goToMonth:ae}=X,pe=cTe(Z,t,q,Y,s),{isSelected:_e,select:we,selected:xe}=tPe(t,s)??{},{blur:Me,focused:ye,isFocusTarget:Ee,moveFocus:me,setFocused:Se}=KTe(t,X,pe,_e??(()=>!1),s),{labelDayButton:Ie,labelGridcell:Be,labelGrid:Xe,labelMonthDropdown:ke,labelNav:he,labelPrevious:Le,labelNext:Ye,labelWeekday:Oe,labelWeekNumber:it,labelWeekNumberHeader:vt,labelYearDropdown:mt}=a,Qt=w.useMemo(()=>_Te(s,t.ISOWeek,t.broadcastCalendar,t.today),[s,t.ISOWeek,t.broadcastCalendar,t.today]),Ot=d!==void 0||A!==void 0,Wt=w.useCallback(()=>{ne&&(ae(ne),_?.(ne))},[ne,ae,_]),Vt=w.useCallback(()=>{ge&&(ae(ge),S?.(ge))},[ae,ge,S]),xr=w.useCallback((bt,U)=>Re=>{Re.preventDefault(),Re.stopPropagation(),Se(bt),!U.disabled&&(we?.(bt.date,U,Re),A?.(bt.date,U,Re))},[we,A,Se]),Ht=w.useCallback((bt,U)=>Re=>{Se(bt),v?.(bt.date,U,Re)},[v,Se]),Yt=w.useCallback((bt,U)=>Re=>{Me(),g?.(bt.date,U,Re)},[Me,g]),hr=w.useCallback((bt,U)=>Re=>{const He={ArrowLeft:[Re.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[Re.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[Re.shiftKey?"year":"week","after"],ArrowUp:[Re.shiftKey?"year":"week","before"],PageUp:[Re.shiftKey?"year":"month","before"],PageDown:[Re.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(He[Re.key]){Re.preventDefault(),Re.stopPropagation();const[se,be]=He[Re.key];me(se,be)}b?.(bt.date,U,Re)},[me,b,t.dir]),pr=w.useCallback((bt,U)=>Re=>{E?.(bt.date,U,Re)},[E]),de=w.useCallback((bt,U)=>Re=>{I?.(bt.date,U,Re)},[I]),st=w.useCallback(bt=>U=>{const Re=Number(U.target.value),He=s.setMonth(s.startOfMonth(bt),Re);ae(He)},[s,ae]),gt=w.useCallback(bt=>U=>{const Re=Number(U.target.value),He=s.setYear(s.startOfMonth(bt),Re);ae(He)},[s,ae]),{className:ve,style:ce}=w.useMemo(()=>({className:[c[Zr.Root],t.className].filter(Boolean).join(" "),style:{...T?.[Zr.Root],...t.style}}),[c,t.className,t.style,T]),Ge=fTe(t),ie=w.useRef(null);RTe(ie,!!t.animate,{classNames:c,months:K,focused:ye,dateLib:s});const at={dayPickerProps:t,selected:xe,select:we,isSelected:_e,months:K,nextMonth:ge,previousMonth:ne,goToMonth:ae,getModifiers:pe,components:n,classNames:c,styles:T,labels:a,formatters:i};return gr.createElement(nce.Provider,{value:at},gr.createElement(n.Root,{rootRef:t.animate?ie:void 0,className:ve,style:ce,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Ge},gr.createElement(n.Months,{className:c[Zr.Months],style:T?.[Zr.Months]},!t.hideNavigation&&!f&&gr.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[Zr.Nav],style:T?.[Zr.Nav],"aria-label":he(),onPreviousClick:Wt,onNextClick:Vt,previousMonth:ne,nextMonth:ge}),K.map((bt,U)=>gr.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:c[Zr.Month],style:T?.[Zr.Month],key:U,displayIndex:U,calendarMonth:bt},f==="around"&&!t.hideNavigation&&U===0&&gr.createElement(n.PreviousMonthButton,{type:"button",className:c[Zr.PreviousMonthButton],tabIndex:ne?void 0:-1,"aria-disabled":ne?void 0:!0,"aria-label":Le(ne),onClick:Wt,"data-animated-button":t.animate?"true":void 0},gr.createElement(n.Chevron,{disabled:ne?void 0:!0,className:c[Zr.Chevron],orientation:t.dir==="rtl"?"right":"left"})),gr.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:c[Zr.MonthCaption],style:T?.[Zr.MonthCaption],calendarMonth:bt,displayIndex:U},u?.startsWith("dropdown")?gr.createElement(n.DropdownNav,{className:c[Zr.Dropdowns],style:T?.[Zr.Dropdowns]},(()=>{const Re=u==="dropdown"||u==="dropdown-months"?gr.createElement(n.MonthsDropdown,{key:"month",className:c[Zr.MonthsDropdown],"aria-label":ke(),classNames:c,components:n,disabled:!!t.disableNavigation,onChange:st(bt.date),options:NTe(bt.date,q,Y,i,s),style:T?.[Zr.Dropdown],value:s.getMonth(bt.date)}):gr.createElement("span",{key:"month"},z(bt.date,s)),He=u==="dropdown"||u==="dropdown-years"?gr.createElement(n.YearsDropdown,{key:"year",className:c[Zr.YearsDropdown],"aria-label":mt(s.options),classNames:c,components:n,disabled:!!t.disableNavigation,onChange:gt(bt.date),options:jTe(q,Y,i,s,!!t.reverseYears),style:T?.[Zr.Dropdown],value:s.getYear(bt.date)}):gr.createElement("span",{key:"year"},$(bt.date,s));return s.getMonthYearOrder()==="year-first"?[He,Re]:[Re,He]})(),gr.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},P(bt.date,s.options,s))):gr.createElement(n.CaptionLabel,{className:c[Zr.CaptionLabel],role:"status","aria-live":"polite"},P(bt.date,s.options,s))),f==="around"&&!t.hideNavigation&&U===m-1&&gr.createElement(n.NextMonthButton,{type:"button",className:c[Zr.NextMonthButton],tabIndex:ge?void 0:-1,"aria-disabled":ge?void 0:!0,"aria-label":Ye(ge),onClick:Vt,"data-animated-button":t.animate?"true":void 0},gr.createElement(n.Chevron,{disabled:ge?void 0:!0,className:c[Zr.Chevron],orientation:t.dir==="rtl"?"left":"right"})),U===m-1&&f==="after"&&!t.hideNavigation&&gr.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[Zr.Nav],style:T?.[Zr.Nav],"aria-label":he(),onPreviousClick:Wt,onNextClick:Vt,previousMonth:ne,nextMonth:ge}),gr.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":d==="multiple"||d==="range","aria-label":Xe(bt.date,s.options,s)||void 0,className:c[Zr.MonthGrid],style:T?.[Zr.MonthGrid]},!t.hideWeekdays&&gr.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:c[Zr.Weekdays],style:T?.[Zr.Weekdays]},B&&gr.createElement(n.WeekNumberHeader,{"aria-label":vt(s.options),className:c[Zr.WeekNumberHeader],style:T?.[Zr.WeekNumberHeader],scope:"col"},W()),Qt.map(Re=>gr.createElement(n.Weekday,{"aria-label":Oe(Re,s.options,s),className:c[Zr.Weekday],key:String(Re),style:T?.[Zr.Weekday],scope:"col"},R(Re,s.options,s)))),gr.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:c[Zr.Weeks],style:T?.[Zr.Weeks]},bt.weeks.map(Re=>gr.createElement(n.Week,{className:c[Zr.Week],key:Re.weekNumber,style:T?.[Zr.Week],week:Re},B&&gr.createElement(n.WeekNumber,{week:Re,style:T?.[Zr.WeekNumber],"aria-label":it(Re.weekNumber,{locale:l}),className:c[Zr.WeekNumber],scope:"row",role:"rowheader"},L(Re.weekNumber,s)),Re.days.map(He=>{const{date:se}=He,be=pe(He);if(be[vs.focused]=!be.hidden&&!!ye?.isEqualTo(He),be[Bd.selected]=_e?.(se)||be.selected,ZS(xe)){const{from:Te,to:jt}=xe;be[Bd.range_start]=!!(Te&&jt&&s.isSameDay(se,Te)),be[Bd.range_end]=!!(Te&&jt&&s.isSameDay(se,jt)),be[Bd.range_middle]=Xh(xe,se,!0,s)}const We=kTe(be,T,t.modifiersStyles),er=uTe(be,c,t.modifiersClassNames),zt=!Ot&&!be.hidden?Be(se,be,s.options,s):void 0;return gr.createElement(n.Day,{key:`${He.isoDate}_${He.displayMonthId}`,day:He,modifiers:be,className:er.join(" "),style:We,role:"gridcell","aria-selected":be.selected||void 0,"aria-label":zt,"data-day":He.isoDate,"data-month":He.outside?He.dateMonthId:void 0,"data-selected":be.selected||void 0,"data-disabled":be.disabled||void 0,"data-hidden":be.hidden||void 0,"data-outside":He.outside||void 0,"data-focused":be.focused||void 0,"data-today":be.today||void 0},!be.hidden&&Ot?gr.createElement(n.DayButton,{className:c[Zr.DayButton],style:T?.[Zr.DayButton],type:"button",day:He,modifiers:be,disabled:!be.focused&&be.disabled||void 0,"aria-disabled":be.focused&&be.disabled||void 0,tabIndex:Ee(He)?0:-1,"aria-label":Ie(se,be,s.options,s),onClick:xr(He,be),onBlur:Yt(He,be),onFocus:Ht(He,be),onKeyDown:hr(He,be),onMouseEnter:pr(He,be),onMouseLeave:de(He,be)},O(se,s.options,s)):!be.hidden&&O(He.date,s.options,s))})))))))),t.footer&&gr.createElement(n.Footer,{className:c[Zr.Footer],style:T?.[Zr.Footer],role:"status","aria-live":"polite"},t.footer)))}function tD({className:e,classNames:t,showOutsideDays:r=!0,...n}){return o.jsx(rPe,{showOutsideDays:r,className:qt("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:qt(z2({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:qt(z2({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:({className:i,...a})=>o.jsx(mbe,{className:qt("h-4 w-4",i),...a}),IconRight:({className:i,...a})=>o.jsx(JJ,{className:qt("h-4 w-4",i),...a})},...n})}tD.displayName="Calendar";var nPe=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function $O(e){if(typeof e!="string")return!1;var t=nPe;return t.includes(e)}var iPe=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],aPe=new Set(iPe);function vce(e){return typeof e!="string"?!1:aPe.has(e)}function xce(e){return typeof e=="string"&&e.startsWith("data-")}function Lu(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(vce(r)||xce(r))&&(t[r]=e[r]);return t}function h1(e){if(e==null)return null;if(w.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Lu(t)}return typeof e=="object"&&!Array.isArray(e)?Lu(e):null}function bc(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(vce(r)||xce(r)||$O(r))&&(t[r]=e[r]);return t}function sPe(e){return e==null?null:w.isValidElement(e)?bc(e.props):typeof e=="object"&&!Array.isArray(e)?bc(e):null}var oPe=["children","width","height","viewBox","className","style","title","desc"];function rD(){return rD=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{children:r,width:n,height:i,viewBox:a,className:s,style:l,title:c,desc:u}=e,d=lPe(e,oPe),f=a||{width:n,height:i,x:0,y:0},m=vi("recharts-surface",s);return w.createElement("svg",rD({},bc(d),{className:m,width:n,height:i,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),w.createElement("title",null,c),w.createElement("desc",null,u),r)}),uPe=["children","className"];function nD(){return nD=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{children:r,className:n}=e,i=dPe(e,uPe),a=vi("recharts-layer",n);return w.createElement("g",nD({className:a},bc(i),{ref:t}),r)}),yce=w.createContext(null),hPe=()=>w.useContext(yce);function Ca(e){return function(){return e}}const bce=Math.cos,VC=Math.sin,Hd=Math.sqrt,YC=Math.PI,XS=2*YC,iD=Math.PI,aD=2*iD,xA=1e-6,mPe=aD-xA;function wce(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return wce;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;ixA)if(!(Math.abs(f*c-u*d)>xA)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let g=n-s,A=i-l,v=c*c+u*u,b=g*g+A*A,E=Math.sqrt(v),I=Math.sqrt(m),S=a*Math.tan((iD-Math.acos((v+m-b)/(2*E*I)))/2),_=S/I,B=S/E;Math.abs(_-1)>xA&&this._append`L${t+_*d},${r+_*f}`,this._append`A${a},${a},0,0,${+(f*g>d*A)},${this._x1=t+B*c},${this._y1=r+B*u}`}}arc(t,r,n,i,a,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),c=n*Math.sin(i),u=t+l,d=r+c,f=1^s,m=s?i-a:a-i;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>xA||Math.abs(this._y1-d)>xA)&&this._append`L${u},${d}`,n&&(m<0&&(m=m%aD+aD),m>mPe?this._append`A${n},${n},0,1,${f},${t-l},${r-c}A${n},${n},0,1,${f},${this._x1=u},${this._y1=d}`:m>xA&&this._append`A${n},${n},0,${+(m>=iD)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};function HO(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new gPe(t)}function WO(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ece(e){this._context=e}Ece.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function e6(e){return new Ece(e)}function Cce(e){return e[0]}function Ice(e){return e[1]}function Sce(e,t){var r=Ca(!0),n=null,i=e6,a=null,s=HO(l);e=typeof e=="function"?e:e===void 0?Cce:Ca(e),t=typeof t=="function"?t:t===void 0?Ice:Ca(t);function l(c){var u,d=(c=WO(c)).length,f,m=!1,g;for(n==null&&(a=i(g=s())),u=0;u<=d;++u)!(u=g;--A)l.point(S[A],_[A]);l.lineEnd(),l.areaEnd()}E&&(S[m]=+e(b,m,f),_[m]=+t(b,m,f),l.point(n?+n(b,m,f):S[m],r?+r(b,m,f):_[m]))}if(I)return l=null,I+""||null}function d(){return Sce().defined(i).curve(s).context(a)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ca(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ca(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ca(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ca(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ca(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ca(+f),u):r},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(r)},u.lineX1=function(){return d().x(n).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Ca(!!f),u):i},u.curve=function(f){return arguments.length?(s=f,a!=null&&(l=s(a)),u):s},u.context=function(f){return arguments.length?(f==null?a=l=null:l=s(a=f),u):a},u}class Bce{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function APe(e){return new Bce(e,!0)}function vPe(e){return new Bce(e,!1)}const GO={draw(e,t){const r=Hd(t/YC);e.moveTo(r,0),e.arc(0,0,r,0,XS)}},xPe={draw(e,t){const r=Hd(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},Nce=Hd(1/3),yPe=Nce*2,bPe={draw(e,t){const r=Hd(t/yPe),n=r*Nce;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},wPe={draw(e,t){const r=Hd(t),n=-r/2;e.rect(n,n,r,r)}},EPe=.8908130915292852,kce=VC(YC/10)/VC(7*YC/10),CPe=VC(XS/10)*kce,IPe=-bce(XS/10)*kce,SPe={draw(e,t){const r=Hd(t*EPe),n=CPe*r,i=IPe*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const s=XS*a/5,l=bce(s),c=VC(s);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*i,c*n+l*i)}e.closePath()}},ON=Hd(3),BPe={draw(e,t){const r=-Hd(t/(ON*3));e.moveTo(0,r*2),e.lineTo(-ON*r,-r),e.lineTo(ON*r,-r),e.closePath()}},w0=-.5,E0=Hd(3)/2,sD=1/Hd(12),NPe=(sD/2+1)*3,kPe={draw(e,t){const r=Hd(t/NPe),n=r/2,i=r*sD,a=n,s=r*sD+r,l=-a,c=s;e.moveTo(n,i),e.lineTo(a,s),e.lineTo(l,c),e.lineTo(w0*n-E0*i,E0*n+w0*i),e.lineTo(w0*a-E0*s,E0*a+w0*s),e.lineTo(w0*l-E0*c,E0*l+w0*c),e.lineTo(w0*n+E0*i,w0*i-E0*n),e.lineTo(w0*a+E0*s,w0*s-E0*a),e.lineTo(w0*l+E0*c,w0*c-E0*l),e.closePath()}};function _Pe(e,t){let r=null,n=HO(i);e=typeof e=="function"?e:Ca(e||GO),t=typeof t=="function"?t:Ca(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Ca(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ca(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function ZC(){}function JC(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function _ce(e){this._context=e}_ce.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:JC(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:JC(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jPe(e){return new _ce(e)}function jce(e){this._context=e}jce.prototype={areaStart:ZC,areaEnd:ZC,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:JC(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function DPe(e){return new jce(e)}function Dce(e){this._context=e}Dce.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:JC(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function TPe(e){return new Dce(e)}function Tce(e){this._context=e}Tce.prototype={areaStart:ZC,areaEnd:ZC,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function PPe(e){return new Tce(e)}function aU(e){return e<0?-1:1}function sU(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),s=(r-e._y1)/(i||n<0&&-0),l=(a*i+s*n)/(n+i);return(aU(a)+aU(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(l))||0}function oU(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function RN(e,t,r){var n=e._x0,i=e._y0,a=e._x1,s=e._y1,l=(a-n)/3;e._context.bezierCurveTo(n+l,i+l*t,a-l,s-l*r,a,s)}function XC(e){this._context=e}XC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:RN(this,this._t0,oU(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,RN(this,oU(this,r=sU(this,e,t)),r);break;default:RN(this,this._t0,r=sU(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Pce(e){this._context=new Oce(e)}(Pce.prototype=Object.create(XC.prototype)).point=function(e,t){XC.prototype.point.call(this,t,e)};function Oce(e){this._context=e}Oce.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function OPe(e){return new XC(e)}function RPe(e){return new Pce(e)}function Rce(e){this._context=e}Rce.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=lU(e),i=lU(t),a=0,s=1;s=0;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function MPe(e){return new t6(e,.5)}function QPe(e){return new t6(e,0)}function LPe(e){return new t6(e,1)}function m1(e,t){if((s=e.length)>1)for(var r=1,n,i,a=e[t[0]],s,l=a.length;r=0;)r[t]=t;return r}function UPe(e,t){return e[t]}function $Pe(e){const t=[];return t.key=e,t}function zPe(){var e=Ca([]),t=oD,r=m1,n=UPe;function i(a){var s=Array.from(e.apply(this,arguments),$Pe),l,c=s.length,u=-1,d;for(const f of a)for(l=0,++u;l0){for(var r,n,i=0,a=e[0].length,s;i0){for(var r=0,n=e[t[0]],i,a=n.length;r0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,s;n1&&arguments[1]!==void 0?arguments[1]:ZPe,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Os(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{var l=r[s-1];return typeof l=="string"?i+l+a:l!==void 0?i+zp(l)+a:i+a},"")}var rl=e=>e===0?0:e>0?1:-1,Fd=e=>typeof e=="number"&&e!=+e,Am=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Rr=e=>(typeof e=="number"||e instanceof Number)&&!Fd(e),eh=e=>Rr(e)||typeof e=="string",JPe=0,tb=e=>{var t=++JPe;return"".concat(e||"").concat(t)},ec=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Rr(t)&&typeof t!="string")return n;var a;if(Am(t)){if(r==null)return n;var s=t.indexOf("%");a=r*parseFloat(t.slice(0,s))/100}else a=+t;return Fd(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},Mce=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;nn&&(typeof t=="function"?t(n):p1(n,t))===r)}var ns=e=>e===null||typeof e>"u",Dw=e=>ns(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function XPe(e){return e!=null}function Tw(){}var e7e=["type","size","sizeType"];function lD(){return lD=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t="symbol".concat(Dw(e));return Lce[t]||GO},l7e=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*s7e;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},c7e=(e,t)=>{Lce["symbol".concat(Dw(e))]=t},YO=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=i7e(e,e7e),a=AU(AU({},i),{},{type:t,size:r,sizeType:n}),s="circle";typeof t=="string"&&(s=t);var l=()=>{var m=o7e(s),g=_Pe().type(m).size(l7e(r,n,s)),A=g();if(A!==null)return A},{className:c,cx:u,cy:d}=a,f=bc(a);return Rr(u)&&Rr(d)&&Rr(r)?w.createElement("path",lD({},f,{className:vi("recharts-symbols",c),transform:"translate(".concat(u,", ").concat(d,")"),d:l()})):null};YO.registerSymbol=c7e;var Uce=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,ZO=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(w.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{$O(i)&&(n[i]=(a=>r[i](r,a)))}),n},u7e=(e,t,r)=>n=>(e(t,r,n),null),Pw=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];$O(i)&&typeof a=="function"&&(n||(n={}),n[i]=u7e(a,t,r))}),n};function vU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function d7e(e){for(var t=1;t(s[l]===void 0&&n[l]!==void 0&&(s[l]=n[l]),s),r);return a}function eI(){return eI=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var m=d.formatter||i,g=vi({"recharts-legend-item":!0,["legend-item-".concat(f)]:!0,inactive:d.inactive});if(d.type==="none")return null;var A=d.inactive?a:d.color,v=m?m(d.value,d,f):d.value;return w.createElement("li",eI({className:g,style:c,key:"legend-item-".concat(f)},Pw(e,d,f)),w.createElement(zO,{width:r,height:r,viewBox:l,style:u,"aria-label":"".concat(v," legend icon")},w.createElement(y7e,{data:d,iconType:s,inactiveColor:a})),w.createElement("span",{className:"recharts-legend-item-text",style:{color:A}},v))})}var w7e=e=>{var t=Ao(e,x7e),{payload:r,layout:n,align:i}=t;if(!r||!r.length)return null;var a={padding:0,margin:0,textAlign:n==="horizontal"?i:"left"};return w.createElement("ul",{className:"recharts-default-legend",style:a},w.createElement(b7e,eI({},t,{payload:r})))},HN={},WN={},yU;function E7e(){return yU||(yU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const i=new Map;for(let a=0;a=0}e.isLength=t})(VN)),VN}var EU;function JO(){return EU||(EU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=C7e();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(KN)),KN}var YN={},CU;function I7e(){return CU||(CU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(YN)),YN}var IU;function S7e(){return IU||(IU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=JO(),r=I7e();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(qN)),qN}var ZN={},JN={},SU;function B7e(){return SU||(SU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=VO();function r(n){return function(i){return t.get(i,n)}}e.property=r})(JN)),JN}var XN={},ek={},tk={},rk={},BU;function zce(){return BU||(BU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(rk)),rk}var nk={},NU;function Hce(){return NU||(NU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(nk)),nk}var ik={},kU;function Wce(){return kU||(kU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.eq=t})(ik)),ik}var _U;function N7e(){return _U||(_U=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zce(),r=Hce(),n=Wce();function i(d,f,m){return typeof m!="function"?i(d,f,()=>{}):a(d,f,function g(A,v,b,E,I,S){const _=m(A,v,b,E,I,S);return _!==void 0?!!_:a(A,v,g,S)},new Map)}function a(d,f,m,g){if(f===d)return!0;switch(typeof f){case"object":return s(d,f,m,g);case"function":return Object.keys(f).length>0?a(d,{...f},m,g):n.eq(d,f);default:return t.isObject(d)?typeof f=="string"?f==="":!0:n.eq(d,f)}}function s(d,f,m,g){if(f==null)return!0;if(Array.isArray(f))return c(d,f,m,g);if(f instanceof Map)return l(d,f,m,g);if(f instanceof Set)return u(d,f,m,g);const A=Object.keys(f);if(d==null||r.isPrimitive(d))return A.length===0;if(A.length===0)return!0;if(g?.has(f))return g.get(f)===d;g?.set(f,d);try{for(let v=0;v{})}e.isMatch=r})(ek)),ek}var ak={},sk={},ok={},DU;function k7e(){return DU||(DU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(ok)),ok}var lk={},TU;function qce(){return TU||(TU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(lk)),lk}var ck={},PU;function Kce(){return PU||(PU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",a="[object Arguments]",s="[object Symbol]",l="[object Date]",c="[object Map]",u="[object Set]",d="[object Array]",f="[object Function]",m="[object ArrayBuffer]",g="[object Object]",A="[object Error]",v="[object DataView]",b="[object Uint8Array]",E="[object Uint8ClampedArray]",I="[object Uint16Array]",S="[object Uint32Array]",_="[object BigUint64Array]",B="[object Int8Array]",T="[object Int16Array]",P="[object Int32Array]",O="[object BigInt64Array]",z="[object Float32Array]",L="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=m,e.arrayTag=d,e.bigInt64ArrayTag=O,e.bigUint64ArrayTag=_,e.booleanTag=i,e.dataViewTag=v,e.dateTag=l,e.errorTag=A,e.float32ArrayTag=z,e.float64ArrayTag=L,e.functionTag=f,e.int16ArrayTag=T,e.int32ArrayTag=P,e.int8ArrayTag=B,e.mapTag=c,e.numberTag=n,e.objectTag=g,e.regexpTag=t,e.setTag=u,e.stringTag=r,e.symbolTag=s,e.uint16ArrayTag=I,e.uint32ArrayTag=S,e.uint8ArrayTag=b,e.uint8ClampedArrayTag=E})(ck)),ck}var uk={},OU;function _7e(){return OU||(OU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(uk)),uk}var RU;function Vce(){return RU||(RU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=k7e(),r=qce(),n=Kce(),i=Hce(),a=_7e();function s(d,f){return l(d,void 0,d,new Map,f)}function l(d,f,m,g=new Map,A=void 0){const v=A?.(d,f,m,g);if(v!==void 0)return v;if(i.isPrimitive(d))return d;if(g.has(d))return g.get(d);if(Array.isArray(d)){const b=new Array(d.length);g.set(d,b);for(let E=0;Et.isMatch(a,i)}e.matches=n})(XN)),XN}var dk={},fk={},hk={},QU;function T7e(){return QU||(QU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Vce(),r=Kce();function n(i,a){return t.cloneDeepWith(i,(s,l,c,u)=>{const d=a?.(s,l,c,u);if(d!==void 0)return d;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case r.numberTag:case r.stringTag:case r.booleanTag:{const f=new i.constructor(i?.valueOf());return t.copyProperties(f,i),f}case r.argumentsTag:{const f={};return t.copyProperties(f,i),f.length=i.length,f[Symbol.iterator]=i[Symbol.iterator],f}default:return}})}e.cloneDeepWith=n})(hk)),hk}var LU;function P7e(){return LU||(LU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=T7e();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(fk)),fk}var mk={},pk={},UU;function Yce(){return UU||(UU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&ne,Ba=()=>{var e=w.useContext(XO);return e?e.store.dispatch:W7e},vE=()=>{},G7e=()=>vE,q7e=(e,t)=>e===t;function Mr(e){var t=w.useContext(XO);return H7e.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:G7e,t?t.store.getState:vE,t?t.store.getState:vE,t?e:vE,q7e)}function K7e(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function V7e(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Y7e(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var ZU=e=>Array.isArray(e)?e:[e];function Z7e(e){const t=Array.isArray(e[0])?e[0]:e;return Y7e(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function J7e(e,t){const r=[],{length:n}=e;for(let i=0;i{r=p4(),s.resetResultsCount()},s.resultsCount=()=>a,s.resetResultsCount=()=>{a=0},s}function rOe(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let a=0,s=0,l,c={},u=i.pop();typeof u=="object"&&(c=u,u=i.pop()),K7e(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...r,...c},{memoize:f,memoizeOptions:m=[],argsMemoize:g=Jce,argsMemoizeOptions:A=[]}=d,v=ZU(m),b=ZU(A),E=Z7e(i),I=f(function(){return a++,u.apply(null,arguments)},...v),S=g(function(){s++;const B=J7e(E,arguments);return l=I.apply(null,B),l},...b);return Object.assign(S,{resultFunc:u,memoizedResultFunc:I,dependencies:E,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>l,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:g})};return Object.assign(n,{withTypes:()=>n}),n}var dt=rOe(Jce),nOe=Object.assign((e,t=dt)=>{V7e(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(a=>e[a]);return t(n,(...a)=>a.reduce((s,l,c)=>(s[r[c]]=l,s),{}))},{withTypes:()=>nOe}),yk={},bk={},wk={},XU;function iOe(){return XU||(XU=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,a)=>{if(n!==i){const s=t(n),l=t(i);if(s===l&&s===0){if(ni)return a==="desc"?-1:1}return a==="desc"?l-s:s-l}return 0};e.compareValues=r})(wk)),wk}var Ek={},Ck={},e$;function Xce(){return e$||(e$=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(Ck)),Ck}var t$;function aOe(){return t$||(t$=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Xce(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,s){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(n.test(a)||!r.test(a))||s!=null&&Object.hasOwn(s,a)}e.isKey=i})(Ek)),Ek}var r$;function sOe(){return r$||(r$=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iOe(),r=aOe(),n=KO();function i(a,s,l,c){if(a==null)return[];l=c?void 0:l,Array.isArray(a)||(a=Object.values(a)),Array.isArray(s)||(s=s==null?[null]:[s]),s.length===0&&(s=[null]),Array.isArray(l)||(l=l==null?[]:[l]),l=l.map(g=>String(g));const u=(g,A)=>{let v=g;for(let b=0;bA==null||g==null?A:typeof g=="object"&&"key"in g?Object.hasOwn(A,g.key)?A[g.key]:u(A,g.path):typeof g=="function"?g(A):Array.isArray(g)?u(A,g):typeof A=="object"?A[g]:A,f=s.map(g=>(Array.isArray(g)&&g.length===1&&(g=g[0]),g==null||typeof g=="function"||Array.isArray(g)||r.isKey(g)?g:{key:g,path:n.toPath(g)}));return a.map(g=>({original:g,criteria:f.map(A=>d(A,g))})).slice().sort((g,A)=>{for(let v=0;vg.original)}e.orderBy=i})(bk)),bk}var Ik={},n$;function oOe(){return n$||(n$=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],a=Math.floor(n),s=(l,c)=>{for(let u=0;u1&&n.isIterateeCall(a,s[0],s[1])?s=[]:l>2&&n.isIterateeCall(s[0],s[1],s[2])&&(s=[s[0]]),t.orderBy(a,r.flatten(s),["asc"])}e.sortBy=i})(yk)),yk}var Bk,s$;function cOe(){return s$||(s$=1,Bk=lOe().sortBy),Bk}var uOe=cOe();const r6=hi(uOe);var tue=e=>e.legend.settings,dOe=e=>e.legend.size,fOe=e=>e.legend.payload,hOe=dt([fOe,tue],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?r6(n,r):n});function mOe(){return Mr(hOe)}var g4=1;function rue(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=w.useState({height:0,left:0,top:0,width:0}),n=w.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),s={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(s.height-t.height)>g4||Math.abs(s.left-t.left)>g4||Math.abs(s.top-t.top)>g4||Math.abs(s.width-t.width)>g4)&&r({height:s.height,left:s.left,top:s.top,width:s.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function _l(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var pOe=typeof Symbol=="function"&&Symbol.observable||"@@observable",o$=pOe,Nk=()=>Math.random().toString(36).substring(7).split("").join("."),gOe={INIT:`@@redux/INIT${Nk()}`,REPLACE:`@@redux/REPLACE${Nk()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Nk()}`},tI=gOe;function e9(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function nue(e,t,r){if(typeof e!="function")throw new Error(_l(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(_l(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(_l(1));return r(nue)(e,t)}let n=e,i=t,a=new Map,s=a,l=0,c=!1;function u(){s===a&&(s=new Map,a.forEach((b,E)=>{s.set(E,b)}))}function d(){if(c)throw new Error(_l(3));return i}function f(b){if(typeof b!="function")throw new Error(_l(4));if(c)throw new Error(_l(5));let E=!0;u();const I=l++;return s.set(I,b),function(){if(E){if(c)throw new Error(_l(6));E=!1,u(),s.delete(I),a=null}}}function m(b){if(!e9(b))throw new Error(_l(7));if(typeof b.type>"u")throw new Error(_l(8));if(typeof b.type!="string")throw new Error(_l(17));if(c)throw new Error(_l(9));try{c=!0,i=n(i,b)}finally{c=!1}return(a=s).forEach(I=>{I()}),b}function g(b){if(typeof b!="function")throw new Error(_l(10));n=b,m({type:tI.REPLACE})}function A(){const b=f;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(_l(11));function I(){const _=E;_.next&&_.next(d())}return I(),{unsubscribe:b(I)}},[o$](){return this}}}return m({type:tI.INIT}),{dispatch:m,subscribe:f,getState:d,replaceReducer:g,[o$]:A}}function AOe(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:tI.INIT})>"u")throw new Error(_l(12));if(typeof r(void 0,{type:tI.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(_l(13))})}function iue(e){const t=Object.keys(e),r={};for(let a=0;a"u")throw l&&l.type,new Error(_l(14));u[f]=A,c=c||A!==g}return c=c||n.length!==Object.keys(s).length,c?u:s}}function rI(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function vOe(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error(_l(15))};const s={getState:i.getState,dispatch:(c,...u)=>a(c,...u)},l=e.map(c=>c(s));return a=rI(...l)(i.dispatch),{...i,dispatch:a}}}function aue(e){return e9(e)&&"type"in e&&typeof e.type=="string"}var sue=Symbol.for("immer-nothing"),l$=Symbol.for("immer-draftable"),wc=Symbol.for("immer-state");function wd(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Pu=Object,Rx=Pu.getPrototypeOf,nI="constructor",n6="prototype",cD="configurable",iI="enumerable",xE="writable",rb="value",vm=e=>!!e&&!!e[wc];function Md(e){return e?oue(e)||i6(e)||!!e[l$]||!!e[nI]?.[l$]||a6(e)||s6(e):!1}var xOe=Pu[n6][nI].toString(),c$=new WeakMap;function oue(e){if(!e||!t9(e))return!1;const t=Rx(e);if(t===null||t===Pu[n6])return!0;const r=Pu.hasOwnProperty.call(t,nI)&&t[nI];if(r===Object)return!0;if(!zv(r))return!1;let n=c$.get(r);return n===void 0&&(n=Function.toString.call(r),c$.set(r,n)),n===xOe}function Ow(e,t,r=!0){Rw(e)===0?(r?Reflect.ownKeys(e):Pu.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Rw(e){const t=e[wc];return t?t.type_:i6(e)?1:a6(e)?2:s6(e)?3:0}var u$=(e,t,r=Rw(e))=>r===2?e.has(t):Pu[n6].hasOwnProperty.call(e,t),uD=(e,t,r=Rw(e))=>r===2?e.get(t):e[t],aI=(e,t,r,n=Rw(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function yOe(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var i6=Array.isArray,a6=e=>e instanceof Map,s6=e=>e instanceof Set,t9=e=>typeof e=="object",zv=e=>typeof e=="function",kk=e=>typeof e=="boolean";function bOe(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var qh=e=>e.copy_||e.base_,r9=e=>e.modified_?e.copy_:e.base_;function dD(e,t){if(a6(e))return new Map(e);if(s6(e))return new Set(e);if(i6(e))return Array[n6].slice.call(e);const r=oue(e);if(t===!0||t==="class_only"&&!r){const n=Pu.getOwnPropertyDescriptors(e);delete n[wc];let i=Reflect.ownKeys(n);for(let a=0;a1&&Pu.defineProperties(e,{set:A4,add:A4,clear:A4,delete:A4}),Pu.freeze(e),t&&Ow(e,(r,n)=>{n9(n,!0)},!1)),e}function wOe(){wd(2)}var A4={[rb]:wOe};function o6(e){return e===null||!t9(e)?!0:Pu.isFrozen(e)}var sI="MapSet",fD="Patches",d$="ArrayMethods",lue={};function g1(e){const t=lue[e];return t||wd(0,e),t}var f$=e=>!!lue[e],nb,cue=()=>nb,EOe=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:f$(sI)?g1(sI):void 0,arrayMethodsPlugin_:f$(d$)?g1(d$):void 0});function h$(e,t){t&&(e.patchPlugin_=g1(fD),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function hD(e){mD(e),e.drafts_.forEach(COe),e.drafts_=null}function mD(e){e===nb&&(nb=e.parent_)}var m$=e=>nb=EOe(nb,e);function COe(e){const t=e[wc];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function p$(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[wc].modified_&&(hD(t),wd(4)),Md(e)&&(e=g$(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[wc].base_,e,t)}else e=g$(t,r);return IOe(t,e,!0),hD(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sue?e:void 0}function g$(e,t){if(o6(t))return t;const r=t[wc];if(!r)return i9(t,e.handledSet_,e);if(!l6(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);fue(r,e)}return r.copy_}function IOe(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&n9(t,r)}function uue(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var l6=(e,t)=>e.scope_===t,SOe=[];function due(e,t,r,n){const i=qh(e),a=e.type_;if(n!==void 0&&uD(i,n,a)===t){aI(i,n,r,a);return}if(!e.draftLocations_){const l=e.draftLocations_=new Map;Ow(i,(c,u)=>{if(vm(u)){const d=l.get(u)||[];d.push(c),l.set(u,d)}})}const s=e.draftLocations_.get(t)??SOe;for(const l of s)aI(i,l,r,a)}function BOe(e,t,r){e.callbacks_.push(function(i){const a=t;if(!a||!l6(a,i))return;i.mapSetPlugin_?.fixSetContents(a);const s=r9(a);due(e,a.draft_??a,s,r),fue(a,i)})}function fue(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const i=n.getPath(e);i&&n.generatePatches_(e,i,t)}uue(e)}}function NOe(e,t,r){const{scope_:n}=e;if(vm(r)){const i=r[wc];l6(i,n)&&i.callbacks_.push(function(){yE(e);const s=r9(i);due(e,r,s,t)})}else Md(r)&&e.callbacks_.push(function(){const a=qh(e);uD(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&i9(uD(e.copy_,t,e.type_),n.handledSet_,n)})}function i9(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||vm(e)||t.has(e)||!Md(e)||o6(e)||(t.add(e),Ow(e,(n,i)=>{if(vm(i)){const a=i[wc];if(l6(a,r)){const s=r9(a);aI(e,n,s,e.type_),uue(a)}}else Md(i)&&i9(i,t,r)})),e}function kOe(e,t){const r=i6(e),n={type_:r?1:0,scope_:t?t.scope_:cue(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,a=a9;r&&(i=[n],a=ib);const{revoke:s,proxy:l}=Proxy.revocable(i,a);return n.draft_=l,n.revoke_=s,[l,n]}var a9={get(e,t){if(t===wc)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=qh(e);if(!u$(i,t,e.type_))return _Oe(e,i,t);const a=i[t];if(e.finalized_||!Md(a)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&bOe(t))return a;if(a===_k(e.base_,t)){yE(e);const s=e.type_===1?+t:t,l=gD(e.scope_,a,e,s);return e.copy_[s]=l}return a},has(e,t){return t in qh(e)},ownKeys(e){return Reflect.ownKeys(qh(e))},set(e,t,r){const n=hue(qh(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=_k(qh(e),t),a=i?.[wc];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(yOe(r,i)&&(r!==void 0||u$(e.base_,t,e.type_)))return!0;yE(e),pD(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),NOe(e,t,r)),!0},deleteProperty(e,t){return yE(e),_k(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),pD(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=qh(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[xE]:!0,[cD]:e.type_!==1||t!=="length",[iI]:n[iI],[rb]:r[t]}},defineProperty(){wd(11)},getPrototypeOf(e){return Rx(e.base_)},setPrototypeOf(){wd(12)}},ib={};Ow(a9,(e,t)=>{ib[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}});ib.deleteProperty=function(e,t){return ib.set.call(this,e,t,void 0)};ib.set=function(e,t,r){return a9.set.call(this,e[0],t,r,e[0])};function _k(e,t){const r=e[wc];return(r?qh(r):e)[t]}function _Oe(e,t,r){const n=hue(t,r);return n?rb in n?n[rb]:n.get?.call(e.draft_):void 0}function hue(e,t){if(!(t in e))return;let r=Rx(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Rx(r)}}function pD(e){e.modified_||(e.modified_=!0,e.parent_&&pD(e.parent_))}function yE(e){e.copy_||(e.assigned_=new Map,e.copy_=dD(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var jOe=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(zv(r)&&!zv(n)){const s=n;n=r;const l=this;return function(u=s,...d){return l.produce(u,f=>n.call(this,f,...d))}}zv(n)||wd(6),i!==void 0&&!zv(i)&&wd(7);let a;if(Md(r)){const s=m$(this),l=gD(s,r,void 0);let c=!0;try{a=n(l),c=!1}finally{c?hD(s):mD(s)}return h$(s,i),p$(a,s)}else if(!r||!t9(r)){if(a=n(r),a===void 0&&(a=r),a===sue&&(a=void 0),this.autoFreeze_&&n9(a,!0),i){const s=[],l=[];g1(fD).generateReplacementPatches_(r,a,{patches_:s,inversePatches_:l}),i(s,l)}return a}else wd(1,r)},this.produceWithPatches=(r,n)=>{if(zv(r))return(l,...c)=>this.produceWithPatches(l,u=>r(u,...c));let i,a;return[this.produce(r,n,(l,c)=>{i=l,a=c}),i,a]},kk(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),kk(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),kk(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Md(t)||wd(8),vm(t)&&(t=_d(t));const r=m$(this),n=gD(r,t,void 0);return n[wc].isManual_=!0,mD(r),n}finishDraft(t,r){const n=t&&t[wc];(!n||!n.isManual_)&&wd(9);const{scope_:i}=n;return h$(i,r),p$(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const a=r[n];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}n>-1&&(r=r.slice(n+1));const i=g1(fD).applyPatches_;return vm(t)?i(t,r):this.produce(t,a=>i(a,r))}};function gD(e,t,r,n){const[i,a]=a6(t)?g1(sI).proxyMap_(t,r):s6(t)?g1(sI).proxySet_(t,r):kOe(t,r);return(r?.scope_??cue()).drafts_.push(i),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?BOe(r,a,n):a.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(a);const{patchPlugin_:u}=c;a.modified_&&u&&u.generatePatches_(a,[],c)}),i}function _d(e){return vm(e)||wd(10,e),mue(e)}function mue(e){if(!Md(e)||o6(e))return e;const t=e[wc];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=dD(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=dD(e,!0);return Ow(r,(i,a)=>{aI(r,i,mue(a))},n),t&&(t.finalized_=!1),r}var DOe=new jOe,pue=DOe.produce;function gue(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var TOe=gue(),POe=gue,OOe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?rI:rI.apply(null,arguments)};function z0(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Fu(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>aue(n)&&n.type===e,r}var Aue=class p2 extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,p2.prototype)}static get[Symbol.species](){return p2}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new p2(...t[0].concat(this)):new p2(...t.concat(this))}};function A$(e){return Md(e)?pue(e,()=>{}):e}function v4(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function ROe(e){return typeof e=="boolean"}var FOe=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let s=new Aue;return r&&(ROe(r)?s.push(TOe):s.push(POe(r.extraArgument))),s},vue="RTK_autoBatch",Za=()=>e=>({payload:e,meta:{[vue]:!0}}),v$=e=>t=>{setTimeout(t,e)},xue=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,a=!1,s=!1;const l=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:v$(10):e.type==="callback"?e.queueNotification:v$(e.timeout),u=()=>{s=!1,a&&(a=!1,l.forEach(d=>d()))};return Object.assign({},n,{subscribe(d){const f=()=>i&&d(),m=n.subscribe(f);return l.add(d),()=>{m(),l.delete(d)}},dispatch(d){try{return i=!d?.meta?.[vue],a=!i,a&&(s||(s=!0,c(u))),n.dispatch(d)}finally{i=!0}}})},MOe=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new Aue(e);return n&&i.push(xue(typeof n=="object"?n:void 0)),i};function QOe(e){const t=FOe(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:a=void 0,enhancers:s=void 0}=e||{};let l;if(typeof r=="function")l=r;else if(e9(r))l=iue(r);else throw new Error(Fu(1));let c;typeof n=="function"?c=n(t):c=t();let u=rI;i&&(u=OOe({trace:!1,...typeof i=="object"&&i}));const d=vOe(...c),f=MOe(d);let m=typeof s=="function"?s(f):f();const g=u(...m);return nue(l,a,g)}function yue(e){const t={},r=[];let n;const i={addCase(a,s){const l=typeof a=="string"?a:a.type;if(!l)throw new Error(Fu(28));if(l in t)throw new Error(Fu(29));return t[l]=s,i},addAsyncThunk(a,s){return s.pending&&(t[a.pending.type]=s.pending),s.rejected&&(t[a.rejected.type]=s.rejected),s.fulfilled&&(t[a.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:a.settled,reducer:s.settled}),i},addMatcher(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase(a){return n=a,i}};return e(i),[t,r,n]}function LOe(e){return typeof e=="function"}function UOe(e,t){let[r,n,i]=yue(t),a;if(LOe(e))a=()=>A$(e());else{const l=A$(e);a=()=>l}function s(l=a(),c){let u=[r[c.type],...n.filter(({matcher:d})=>d(c)).map(({reducer:d})=>d)];return u.filter(d=>!!d).length===0&&(u=[i]),u.reduce((d,f)=>{if(f)if(vm(d)){const g=f(d,c);return g===void 0?d:g}else{if(Md(d))return pue(d,m=>f(m,c));{const m=f(d,c);if(m===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return d},l)}return s.getInitialState=a,s}var $Oe="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",zOe=(e=21)=>{let t="",r=e;for(;r--;)t+=$Oe[Math.random()*64|0];return t},HOe=Symbol.for("rtk-slice-createasyncthunk");function WOe(e,t){return`${e}/${t}`}function GOe({creators:e}={}){const t=e?.asyncThunk?.[HOe];return function(n){const{name:i,reducerPath:a=i}=n;if(!i)throw new Error(Fu(11));const s=(typeof n.reducers=="function"?n.reducers(KOe()):n.reducers)||{},l=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(S,_){const B=typeof S=="string"?S:S.type;if(!B)throw new Error(Fu(12));if(B in c.sliceCaseReducersByType)throw new Error(Fu(13));return c.sliceCaseReducersByType[B]=_,u},addMatcher(S,_){return c.sliceMatchers.push({matcher:S,reducer:_}),u},exposeAction(S,_){return c.actionCreators[S]=_,u},exposeCaseReducer(S,_){return c.sliceCaseReducersByName[S]=_,u}};l.forEach(S=>{const _=s[S],B={reducerName:S,type:WOe(i,S),createNotation:typeof n.reducers=="function"};YOe(_)?JOe(B,_,u,t):VOe(B,_,u)});function d(){const[S={},_=[],B=void 0]=typeof n.extraReducers=="function"?yue(n.extraReducers):[n.extraReducers],T={...S,...c.sliceCaseReducersByType};return UOe(n.initialState,P=>{for(let O in T)P.addCase(O,T[O]);for(let O of c.sliceMatchers)P.addMatcher(O.matcher,O.reducer);for(let O of _)P.addMatcher(O.matcher,O.reducer);B&&P.addDefaultCase(B)})}const f=S=>S,m=new Map,g=new WeakMap;let A;function v(S,_){return A||(A=d()),A(S,_)}function b(){return A||(A=d()),A.getInitialState()}function E(S,_=!1){function B(P){let O=P[S];return typeof O>"u"&&_&&(O=v4(g,B,b)),O}function T(P=f){const O=v4(m,_,()=>new WeakMap);return v4(O,P,()=>{const z={};for(const[L,W]of Object.entries(n.selectors??{}))z[L]=qOe(W,P,()=>v4(g,P,b),_);return z})}return{reducerPath:S,getSelectors:T,get selectors(){return T(B)},selectSlice:B}}const I={name:i,reducer:v,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:b,...E(a),injectInto(S,{reducerPath:_,...B}={}){const T=_??a;return S.inject({reducerPath:T,reducer:v},B),{...I,...E(T,!0)}}};return I}}function qOe(e,t,r,n){function i(a,...s){let l=t(a);return typeof l>"u"&&n&&(l=r()),e(l,...s)}return i.unwrapped=e,i}var Xc=GOe();function KOe(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function VOe({type:e,reducerName:t,createNotation:r},n,i){let a,s;if("reducer"in n){if(r&&!ZOe(n))throw new Error(Fu(17));a=n.reducer,s=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,s?z0(e,s):z0(e))}function YOe(e){return e._reducerDefinitionType==="asyncThunk"}function ZOe(e){return e._reducerDefinitionType==="reducerWithPrepare"}function JOe({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Fu(18));const{payloadCreator:a,fulfilled:s,pending:l,rejected:c,settled:u,options:d}=r,f=i(e,a,d);n.exposeAction(t,f),s&&n.addCase(f.fulfilled,s),l&&n.addCase(f.pending,l),c&&n.addCase(f.rejected,c),u&&n.addMatcher(f.settled,u),n.exposeCaseReducer(t,{fulfilled:s||x4,pending:l||x4,rejected:c||x4,settled:u||x4})}function x4(){}var XOe="task",bue="listener",wue="completed",s9="cancelled",e9e=`task-${s9}`,t9e=`task-${wue}`,AD=`${bue}-${s9}`,r9e=`${bue}-${wue}`,c6=class{constructor(e){this.code=e,this.message=`${XOe} ${s9} (reason: ${e})`}name="TaskAbortError";message},o9=(e,t)=>{if(typeof e!="function")throw new TypeError(Fu(32))},oI=()=>{},Eue=(e,t=oI)=>(e.catch(t),e),Cue=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),GA=e=>{if(e.aborted)throw new c6(e.reason)};function Iue(e,t){let r=oI;return new Promise((n,i)=>{const a=()=>i(new c6(e.reason));if(e.aborted){a();return}r=Cue(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=oI})}var n9e=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof c6?"cancelled":"rejected",error:r}}finally{t?.()}},lI=e=>t=>Eue(Iue(e,t).then(r=>(GA(e),r))),Sue=e=>{const t=lI(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:lx}=Object,x$={},u6="listenerMiddleware",i9e=(e,t)=>{const r=n=>Cue(e,()=>n.abort(e.reason));return(n,i)=>{o9(n);const a=new AbortController;r(a);const s=n9e(async()=>{GA(e),GA(a.signal);const l=await n({pause:lI(a.signal),delay:Sue(a.signal),signal:a.signal});return GA(a.signal),l},()=>a.abort(t9e));return i?.autoJoin&&t.push(s.catch(oI)),{result:lI(e)(s),cancel(){a.abort(e9e)}}}},a9e=(e,t)=>{const r=async(n,i)=>{GA(t);let a=()=>{};const l=[new Promise((c,u)=>{let d=e({predicate:n,effect:(f,m)=>{m.unsubscribe(),c([f,m.getState(),m.getOriginalState()])}});a=()=>{d(),u()}})];i!=null&&l.push(new Promise(c=>setTimeout(c,i,null)));try{const c=await Iue(t,Promise.race(l));return GA(t),c}finally{a()}};return(n,i)=>Eue(r(n,i))},Bue=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=z0(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(Fu(21));return o9(a),{predicate:i,type:t,effect:a}},Nue=lx(e=>{const{type:t,predicate:r,effect:n}=Bue(e);return{id:zOe(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Fu(22))}}},{withTypes:()=>Nue}),y$=(e,t)=>{const{type:r,effect:n,predicate:i}=Bue(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},vD=e=>{e.pending.forEach(t=>{t.abort(AD)})},s9e=(e,t)=>()=>{for(const r of t.keys())vD(r);e.clear()},b$=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},kue=lx(z0(`${u6}/add`),{withTypes:()=>kue}),o9e=z0(`${u6}/removeAll`),_ue=lx(z0(`${u6}/remove`),{withTypes:()=>_ue}),l9e=(...e)=>{console.error(`${u6}/error`,...e)},Fw=(e={})=>{const t=new Map,r=new Map,n=g=>{const A=r.get(g)??0;r.set(g,A+1)},i=g=>{const A=r.get(g)??1;A===1?r.delete(g):r.set(g,A-1)},{extra:a,onError:s=l9e}=e;o9(s);const l=g=>(g.unsubscribe=()=>t.delete(g.id),t.set(g.id,g),A=>{g.unsubscribe(),A?.cancelActive&&vD(g)}),c=g=>{const A=y$(t,g)??Nue(g);return l(A)};lx(c,{withTypes:()=>c});const u=g=>{const A=y$(t,g);return A&&(A.unsubscribe(),g.cancelActive&&vD(A)),!!A};lx(u,{withTypes:()=>u});const d=async(g,A,v,b)=>{const E=new AbortController,I=a9e(c,E.signal),S=[];try{g.pending.add(E),n(g),await Promise.resolve(g.effect(A,lx({},v,{getOriginalState:b,condition:(_,B)=>I(_,B).then(Boolean),take:I,delay:Sue(E.signal),pause:lI(E.signal),extra:a,signal:E.signal,fork:i9e(E.signal,S),unsubscribe:g.unsubscribe,subscribe:()=>{t.set(g.id,g)},cancelActiveListeners:()=>{g.pending.forEach((_,B,T)=>{_!==E&&(_.abort(AD),T.delete(_))})},cancel:()=>{E.abort(AD),g.pending.delete(E)},throwIfCancelled:()=>{GA(E.signal)}})))}catch(_){_ instanceof c6||b$(s,_,{raisedBy:"effect"})}finally{await Promise.all(S),E.abort(r9e),i(g),g.pending.delete(E)}},f=s9e(t,r);return{middleware:g=>A=>v=>{if(!aue(v))return A(v);if(kue.match(v))return c(v.payload);if(o9e.match(v)){f();return}if(_ue.match(v))return u(v.payload);let b=g.getState();const E=()=>{if(b===x$)throw new Error(Fu(23));return b};let I;try{if(I=A(v),t.size>0){const S=g.getState(),_=Array.from(t.values());for(const B of _){let T=!1;try{T=B.predicate(v,S,b)}catch(P){T=!1,b$(s,P,{raisedBy:"predicate"})}T&&d(B,v,g,E)}}}finally{b=x$}return I},startListening:c,stopListening:u,clearListeners:f}};function Fu(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var c9e={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},jue=Xc({name:"chartLayout",initialState:c9e,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,a;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:u9e,setLayout:d9e,setChartSize:f9e,setScale:h9e}=jue.actions,m9e=jue.reducer;function Due(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function ys(e){return Number.isFinite(e)}function th(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function w$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Vv(e){for(var t=1;t{if(t&&r){var{width:n,height:i}=r,{align:a,verticalAlign:s,layout:l}=t;if((l==="vertical"||l==="horizontal"&&s==="middle")&&a!=="center"&&Rr(e[a]))return Vv(Vv({},e),{},{[a]:e[a]+(n||0)});if((l==="horizontal"||l==="vertical"&&a==="center")&&s!=="middle"&&Rr(e[s]))return Vv(Vv({},e),{},{[s]:e[s]+(i||0)})}return e},Bg=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",Tue=(e,t,r,n)=>{if(n)return e.map(l=>l.coordinate);var i,a,s=e.map(l=>(l.coordinate===t&&(i=!0),l.coordinate===r&&(a=!0),l.coordinate));return i||s.push(t),a||s.push(r),s},Pue=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:a,scale:s,realScaleType:l,isCategorical:c,categoricalDomain:u,tickCount:d,ticks:f,niceTicks:m,axisType:g}=e;if(!s)return null;var A=l==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,v=i==="category"&&s.bandwidth?s.bandwidth()/A:0;if(v=g==="angleAxis"&&a&&a.length>=2?rl(a[0]-a[1])*2*v:v,f||m){var b=(f||m||[]).map((E,I)=>{var S=n?n.indexOf(E):E;return{coordinate:s(S)+v,value:E,offset:v,index:I}});return b.filter(E=>!Fd(E.coordinate))}return c&&u?u.map((E,I)=>({coordinate:s(E)+v,value:E,index:I,offset:v})):s.ticks&&d!=null?s.ticks(d).map((E,I)=>({coordinate:s(E)+v,value:E,offset:v,index:I})):s.domain().map((E,I)=>({coordinate:s(E)+v,value:n?n[E]:E,index:I,offset:v}))},E$=1e-4,x9e=e=>{var t=e.domain();if(!(!t||t.length<=2)){var r=t.length,n=e.range(),i=Math.min(n[0],n[1])-E$,a=Math.max(n[0],n[1])+E$,s=e(t[0]),l=e(t[r-1]);(sa||la)&&e.domain([t[0],t[r-1]])}},y9e=(e,t)=>{if(!t||t.length!==2||!Rr(t[0])||!Rr(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!Rr(e[0])||e[0]n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i=0?(u[0]=a,u[1]=a+m,a=d):(u[0]=s,u[1]=s+m,s=d)}}}},w9e=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i=0?(c[0]=a,c[1]=a+u,a=c[1]):(c[0]=0,c[1]=0)}}}},E9e={sign:b9e,expand:HPe,none:m1,silhouette:WPe,wiggle:GPe,positive:w9e},C9e=(e,t,r)=>{var n,i=(n=E9e[r])!==null&&n!==void 0?n:m1,a=zPe().keys(t).value((l,c)=>Number(na(l,c,0))).order(oD).offset(i),s=a(e);return s.forEach((l,c)=>{l.forEach((u,d)=>{var f=na(e[d],t[c],0);Array.isArray(f)&&f.length===2&&Rr(f[0])&&Rr(f[1])&&(u[0]=f[0],u[1]=f[1])})}),s};function I9e(e){return e==null?void 0:String(e)}function C$(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:a,dataKey:s}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ns(i[t.dataKey])){var l=Qce(r,"value",i[t.dataKey]);if(l)return l.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var c=na(i,ns(s)?t.dataKey:s);return ns(c)?null:t.scale(c)}var I$=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:a,index:s}=e;if(t.type==="category")return r[s]?r[s].coordinate+n:null;var l=na(a,t.dataKey,t.scale.domain()[s]);return ns(l)?null:t.scale(l)-i/2+n},S9e=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},B9e=e=>{var t=e.flat(2).filter(Rr);return[Math.min(...t),Math.max(...t)]},N9e=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],k9e=(e,t,r)=>{if(e!=null)return N9e(Object.keys(e).reduce((n,i)=>{var a=e[i];if(!a)return n;var{stackedData:s}=a,l=s.reduce((c,u)=>{var d=Due(u,t,r),f=B9e(d);return!ys(f[0])||!ys(f[1])?c:[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],n[0]),Math.max(l[1],n[1])]},[1/0,-1/0]))},S$=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,B$=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Fx=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=r6(t,d=>d.coordinate),a=1/0,s=1,l=i.length;s{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},j9e=(e,t)=>t==="centric"?e.angle:e.radius,jm=e=>e.layout.width,Dm=e=>e.layout.height,D9e=e=>e.layout.scale,Oue=e=>e.layout.margin,d6=dt(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),f6=dt(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Rue="data-recharts-item-index",Fue="data-recharts-item-id",Mw=60;function k$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function y4(e){for(var t=1;te.brush.height;function F9e(e){var t=f6(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Mw;return r+i}return r},0)}function M9e(e){var t=f6(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Mw;return r+i}return r},0)}function Q9e(e){var t=d6(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function L9e(e){var t=d6(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var To=dt([jm,Dm,Oue,R9e,F9e,M9e,Q9e,L9e,tue,dOe],(e,t,r,n,i,a,s,l,c,u)=>{var d={left:(r.left||0)+i,right:(r.right||0)+a},f={top:(r.top||0)+s,bottom:(r.bottom||0)+l},m=y4(y4({},f),d),g=m.bottom;m.bottom+=n,m=v9e(m,c,u);var A=e-m.left-m.right,v=t-m.top-m.bottom;return y4(y4({brushBottom:g},m),{},{width:Math.max(A,0),height:Math.max(v,0)})}),U9e=dt(To,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),l9=dt(jm,Dm,(e,t)=>({x:0,y:0,width:e,height:t})),$9e=w.createContext(null),ic=()=>w.useContext($9e)!=null,h6=e=>e.brush,m6=dt([h6,To,Oue],(e,t,r)=>({height:e.height,x:Rr(e.x)?e.x:t.left,y:Rr(e.y)?e.y:t.top+t.height+t.brushBottom-(r?.bottom||0),width:Rr(e.width)?e.width:t.width})),jk={},Dk={},Tk={},_$;function z9e(){return _$||(_$=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:i,edges:a}={}){let s,l=null;const c=a!=null&&a.includes("leading"),u=a==null||a.includes("trailing"),d=()=>{l!==null&&(r.apply(s,l),s=void 0,l=null)},f=()=>{u&&d(),v()};let m=null;const g=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,f()},n)},A=()=>{m!==null&&(clearTimeout(m),m=null)},v=()=>{A(),s=void 0,l=null},b=()=>{d()},E=function(...I){if(i?.aborted)return;s=this,l=I;const S=m==null;g(),c&&S&&d()};return E.schedule=g,E.cancel=v,E.flush=b,i?.addEventListener("abort",v,{once:!0}),E}e.debounce=t})(Tk)),Tk}var j$;function H9e(){return j$||(j$=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=z9e();function r(n,i=0,a={}){typeof a!="object"&&(a={});const{leading:s=!1,trailing:l=!0,maxWait:c}=a,u=Array(2);s&&(u[0]="leading"),l&&(u[1]="trailing");let d,f=null;const m=t.debounce(function(...v){d=n.apply(this,v),f=null},i,{edges:u}),g=function(...v){return c!=null&&(f===null&&(f=Date.now()),Date.now()-f>=c)?(d=n.apply(this,v),f=Date.now(),m.cancel(),m.schedule(),d):(m.apply(this,v),d)},A=()=>(m.flush(),d);return g.cancel=m.cancel,g.flush=A,g}e.debounce=r})(Dk)),Dk}var D$;function W9e(){return D$||(D$=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=H9e();function r(n,i=0,a={}){const{leading:s=!0,trailing:l=!0}=a;return t.debounce(n,i,{leading:s,maxWait:i,trailing:l})}e.throttle=r})(jk)),jk}var Pk,T$;function G9e(){return T$||(T$=1,Pk=W9e().throttle),Pk}var q9e=G9e();const K9e=hi(q9e);var cI=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;ai[s++]))}},Mue=(e,t,r)=>{var{width:n="100%",height:i="100%",aspect:a,maxHeight:s}=r,l=Am(n)?e:Number(n),c=Am(i)?t:Number(i);return a&&a>0&&(l?c=l/a:c&&(l=c*a),s&&c!=null&&c>s&&(c=s)),{calculatedWidth:l,calculatedHeight:c}},V9e={width:0,height:0,overflow:"visible"},Y9e={width:0,overflowX:"visible"},Z9e={height:0,overflowY:"visible"},J9e={},X9e=e=>{var{width:t,height:r}=e,n=Am(t),i=Am(r);return n&&i?V9e:n?Y9e:i?Z9e:J9e};function eRe(e){var{width:t,height:r,aspect:n}=e,i=t,a=r;return i===void 0&&a===void 0?(i="100%",a="100%"):i===void 0?i=n&&n>0?void 0:"100%":a===void 0&&(a=n&&n>0?void 0:"100%"),{width:i,height:a}}function xD(){return xD=Object.assign?Object.assign.bind():function(e){for(var t=1;t({width:r,height:n}),[r,n]);return iRe(i)?w.createElement(Que.Provider,{value:i},t):null}var c9=()=>w.useContext(Que),aRe=w.forwardRef((e,t)=>{var{aspect:r,initialDimension:n={width:-1,height:-1},width:i,height:a,minWidth:s=0,minHeight:l,maxHeight:c,children:u,debounce:d=0,id:f,className:m,onResize:g,style:A={}}=e,v=w.useRef(null),b=w.useRef();b.current=g,w.useImperativeHandle(t,()=>v.current);var[E,I]=w.useState({containerWidth:n.width,containerHeight:n.height}),S=w.useCallback((O,z)=>{I(L=>{var W=Math.round(O),R=Math.round(z);return L.containerWidth===W&&L.containerHeight===R?L:{containerWidth:W,containerHeight:R}})},[]);w.useEffect(()=>{if(v.current==null||typeof ResizeObserver>"u")return Tw;var O=R=>{var $,{width:X,height:Z}=R[0].contentRect;S(X,Z),($=b.current)===null||$===void 0||$.call(b,X,Z)};d>0&&(O=K9e(O,d,{trailing:!0,leading:!1}));var z=new ResizeObserver(O),{width:L,height:W}=v.current.getBoundingClientRect();return S(L,W),z.observe(v.current),()=>{z.disconnect()}},[S,d]);var{containerWidth:_,containerHeight:B}=E;cI(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:T,calculatedHeight:P}=Mue(_,B,{width:i,height:a,aspect:r,maxHeight:c});return cI(T!=null&&T>0||P!=null&&P>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the height and width.`,T,P,i,a,s,l,r),w.createElement("div",{id:f?"".concat(f):void 0,className:vi("recharts-responsive-container",m),style:O$(O$({},A),{},{width:i,height:a,minWidth:s,minHeight:l,maxHeight:c}),ref:v},w.createElement("div",{style:X9e({width:i,height:a})},w.createElement(Lue,{width:T,height:P},u)))}),sRe=w.forwardRef((e,t)=>{var r=c9();if(th(r.width)&&th(r.height))return e.children;var{width:n,height:i}=eRe({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:s}=Mue(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Rr(a)&&Rr(s)?w.createElement(Lue,{width:a,height:s},e.children):w.createElement(aRe,xD({},e,{width:n,height:i,ref:t}))});function Uue(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var p6=()=>{var e,t=ic(),r=Mr(U9e),n=Mr(m6),i=(e=Mr(h6))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},oRe={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},$ue=()=>{var e;return(e=Mr(To))!==null&&e!==void 0?e:oRe},u9=()=>Mr(jm),d9=()=>Mr(Dm),lRe=()=>Mr(e=>e.layout.margin),xi=e=>e.layout.layoutType,vy=()=>Mr(xi),cRe=()=>{var e=vy();return e!==void 0},g6=e=>{var t=Ba(),r=ic(),{width:n,height:i}=e,a=c9(),s=n,l=i;return a&&(s=a.width>0?a.width:n,l=a.height>0?a.height:i),w.useEffect(()=>{!r&&th(s)&&th(l)&&t(f9e({width:s,height:l}))},[t,r,s,l]),null},zue=Symbol.for("immer-nothing"),R$=Symbol.for("immer-draftable"),Uu=Symbol.for("immer-state");function Ed(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ab=Object.getPrototypeOf;function Mx(e){return!!e&&!!e[Uu]}function A1(e){return e?Hue(e)||Array.isArray(e)||!!e[R$]||!!e.constructor?.[R$]||Qw(e)||v6(e):!1}var uRe=Object.prototype.constructor.toString(),F$=new WeakMap;function Hue(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=F$.get(r);return n===void 0&&(n=Function.toString.call(r),F$.set(r,n)),n===uRe}function uI(e,t,r=!0){A6(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function A6(e){const t=e[Uu];return t?t.type_:Array.isArray(e)?1:Qw(e)?2:v6(e)?3:0}function yD(e,t){return A6(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Wue(e,t,r){const n=A6(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function dRe(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Qw(e){return e instanceof Map}function v6(e){return e instanceof Set}function yA(e){return e.copy_||e.base_}function bD(e,t){if(Qw(e))return new Map(e);if(v6(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=Hue(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Uu];let i=Reflect.ownKeys(n);for(let a=0;a1&&Object.defineProperties(e,{set:b4,add:b4,clear:b4,delete:b4}),Object.freeze(e),t&&Object.values(e).forEach(r=>f9(r,!0))),e}function fRe(){Ed(2)}var b4={value:fRe};function x6(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var hRe={};function v1(e){const t=hRe[e];return t||Ed(0,e),t}var sb;function Gue(){return sb}function mRe(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function M$(e,t){t&&(v1("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function wD(e){ED(e),e.drafts_.forEach(pRe),e.drafts_=null}function ED(e){e===sb&&(sb=e.parent_)}function Q$(e){return sb=mRe(sb,e)}function pRe(e){const t=e[Uu];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function L$(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Uu].modified_&&(wD(t),Ed(4)),A1(e)&&(e=dI(t,e),t.parent_||fI(t,e)),t.patches_&&v1("Patches").generateReplacementPatches_(r[Uu].base_,e,t.patches_,t.inversePatches_)):e=dI(t,r,[]),wD(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==zue?e:void 0}function dI(e,t,r){if(x6(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[Uu];if(!i)return uI(t,(a,s)=>U$(e,i,t,a,s,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return fI(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const a=i.copy_;let s=a,l=!1;i.type_===3&&(s=new Set(a),a.clear(),l=!0),uI(s,(c,u)=>U$(e,i,a,c,u,r,l),n),fI(e,a,!1),r&&e.patches_&&v1("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function U$(e,t,r,n,i,a,s){if(i==null||typeof i!="object"&&!s)return;const l=x6(i);if(!(l&&!s)){if(Mx(i)){const c=a&&t&&t.type_!==3&&!yD(t.assigned_,n)?a.concat(n):void 0,u=dI(e,i,c);if(Wue(r,n,u),Mx(u))e.canAutoFreeze_=!1;else return}else s&&r.add(i);if(A1(i)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&l)return;dI(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Qw(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&fI(e,i)}}}function fI(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&f9(t,r)}function gRe(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Gue(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,a=h9;r&&(i=[n],a=ob);const{revoke:s,proxy:l}=Proxy.revocable(i,a);return n.draft_=l,n.revoke_=s,l}var h9={get(e,t){if(t===Uu)return e;const r=yA(e);if(!yD(r,t))return ARe(e,r,t);const n=r[t];return e.finalized_||!A1(n)?n:n===Ok(e.base_,t)?(Rk(e),e.copy_[t]=ID(n,e)):n},has(e,t){return t in yA(e)},ownKeys(e){return Reflect.ownKeys(yA(e))},set(e,t,r){const n=que(yA(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Ok(yA(e),t),a=i?.[Uu];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(dRe(r,i)&&(r!==void 0||yD(e.base_,t)))return!0;Rk(e),CD(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Ok(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Rk(e),CD(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=yA(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Ed(11)},getPrototypeOf(e){return ab(e.base_)},setPrototypeOf(){Ed(12)}},ob={};uI(h9,(e,t)=>{ob[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ob.deleteProperty=function(e,t){return ob.set.call(this,e,t,void 0)};ob.set=function(e,t,r){return h9.set.call(this,e[0],t,r,e[0])};function Ok(e,t){const r=e[Uu];return(r?yA(r):e)[t]}function ARe(e,t,r){const n=que(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function que(e,t){if(!(t in e))return;let r=ab(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ab(r)}}function CD(e){e.modified_||(e.modified_=!0,e.parent_&&CD(e.parent_))}function Rk(e){e.copy_||(e.copy_=bD(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var vRe=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const s=this;return function(c=a,...u){return s.produce(c,d=>r.call(this,d,...u))}}typeof r!="function"&&Ed(6),n!==void 0&&typeof n!="function"&&Ed(7);let i;if(A1(t)){const a=Q$(this),s=ID(t,void 0);let l=!0;try{i=r(s),l=!1}finally{l?wD(a):ED(a)}return M$(a,n),L$(i,a)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===zue&&(i=void 0),this.autoFreeze_&&f9(i,!0),n){const a=[],s=[];v1("Patches").generateReplacementPatches_(t,i,a,s),n(a,s)}return i}else Ed(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...l)=>this.produceWithPatches(s,c=>t(c,...l));let n,i;return[this.produce(t,r,(s,l)=>{n=s,i=l}),n,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){A1(e)||Ed(8),Mx(e)&&(e=xRe(e));const t=Q$(this),r=ID(e,void 0);return r[Uu].isManual_=!0,ED(t),r}finishDraft(e,t){const r=e&&e[Uu];(!r||!r.isManual_)&&Ed(9);const{scope_:n}=r;return M$(n,t),L$(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=v1("Patches").applyPatches_;return Mx(e)?n(e,t):this.produce(e,i=>n(i,t))}};function ID(e,t){const r=Qw(e)?v1("MapSet").proxyMap_(e,t):v6(e)?v1("MapSet").proxySet_(e,t):gRe(e,t);return(t?t.scope_:Gue()).drafts_.push(r),r}function xRe(e){return Mx(e)||Ed(10,e),Kue(e)}function Kue(e){if(!A1(e)||x6(e))return e;const t=e[Uu];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=bD(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=bD(e,!0);return uI(r,(i,a)=>{Wue(r,i,Kue(a))},n),t&&(t.finalized_=!1),r}var yRe=new vRe;yRe.produce;var bRe={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},Vue=Xc({name:"legend",initialState:bRe,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:Za()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,i=_d(e).payload.indexOf(r);i>-1&&(e.payload[i]=n)},prepare:Za()},removeLegendPayload:{reducer(e,t){var r=_d(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:Za()}}}),{setLegendSize:$$,setLegendSettings:wRe,addLegendPayload:Yue,replaceLegendPayload:Zue,removeLegendPayload:Jue}=Vue.actions,ERe=Vue.reducer,CRe=["contextPayload"];function SD(){return SD=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t(wRe(e))},[t,e]),null}function PRe(e){var t=Ba();return w.useEffect(()=>(t($$(e)),()=>{t($$({width:0,height:0}))}),[t,e]),null}function ORe(e,t,r,n){return e==="vertical"&&Rr(t)?{height:t}:e==="horizontal"?{width:r||n}:null}var RRe={align:"center",iconSize:14,itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function Xue(e){var t=Ao(e,RRe),r=mOe(),n=hPe(),i=lRe(),{width:a,height:s,wrapperStyle:l,portal:c}=t,[u,d]=rue([r]),f=u9(),m=d9();if(f==null||m==null)return null;var g=f-(i?.left||0)-(i?.right||0),A=ORe(t.layout,s,a,g),v=c?l:Qx(Qx({position:"absolute",width:A?.width||a||"auto",height:A?.height||s||"auto"},DRe(l,t,i,f,m,u)),l),b=c??n;if(b==null||r==null)return null;var E=w.createElement("div",{className:"recharts-legend-wrapper",style:v,ref:d},w.createElement(TRe,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!c&&w.createElement(PRe,{width:u.width,height:u.height}),w.createElement(jRe,SD({},t,A,{margin:i,chartWidth:f,chartHeight:m,contextPayload:r})));return Sm.createPortal(E,b)}Xue.displayName="Legend";function BD(){return BD=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{separator:t=" : ",contentStyle:r={},itemStyle:n={},labelStyle:i={},payload:a,formatter:s,itemSorter:l,wrapperClassName:c,labelClassName:u,label:d,labelFormatter:f,accessibilityLayer:m=!1}=e,g=()=>{if(a&&a.length){var B={padding:0,margin:0},T=(l?r6(a,l):a).map((P,O)=>{if(P.type==="none")return null;var z=P.formatter||s||LRe,{value:L,name:W}=P,R=L,$=W;if(z){var X=z(L,W,P,O,a);if(Array.isArray(X))[R,$]=X;else if(X!=null)R=X;else return null}var Z=Fk({display:"block",paddingTop:4,paddingBottom:4,color:P.color||"#000"},n);return w.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(O),style:Z},eh($)?w.createElement("span",{className:"recharts-tooltip-item-name"},$):null,eh($)?w.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,w.createElement("span",{className:"recharts-tooltip-item-value"},R),w.createElement("span",{className:"recharts-tooltip-item-unit"},P.unit||""))});return w.createElement("ul",{className:"recharts-tooltip-item-list",style:B},T)}return null},A=Fk({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},r),v=Fk({margin:0},i),b=!ns(d),E=b?d:"",I=vi("recharts-default-tooltip",c),S=vi("recharts-tooltip-label",u);b&&f&&a!==void 0&&a!==null&&(E=f(d,a));var _=m?{role:"status","aria-live":"assertive"}:{};return w.createElement("div",BD({className:I,style:A},_),w.createElement("p",{className:S,style:v},w.isValidElement(E)?E:"".concat(E)),g())},Zy="recharts-tooltip-wrapper",$Re={visibility:"hidden"};function zRe(e){var{coordinate:t,translateX:r,translateY:n}=e;return vi(Zy,{["".concat(Zy,"-right")]:Rr(r)&&t&&Rr(t.x)&&r>=t.x,["".concat(Zy,"-left")]:Rr(r)&&t&&Rr(t.x)&&r=t.y,["".concat(Zy,"-top")]:Rr(n)&&t&&Rr(t.y)&&n0?i:0),f=r[n]+i;if(t[n])return s[n]?d:f;var m=c[n];if(m==null)return 0;if(s[n]){var g=d,A=m;return gb?Math.max(d,m):Math.max(f,m)}function HRe(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function WRe(e){var{allowEscapeViewBox:t,coordinate:r,offsetTopLeft:n,position:i,reverseDirection:a,tooltipBox:s,useTranslate3d:l,viewBox:c}=e,u,d,f;return s.height>0&&s.width>0&&r?(d=W$({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),f=W$({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),u=HRe({translateX:d,translateY:f,useTranslate3d:l})):u=$Re,{cssProperties:u,cssClasses:zRe({translateX:d,translateY:f,coordinate:r})}}function G$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function w4(e){for(var t=1;t{if(t.key==="Escape"){var r,n,i,a;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(r=(n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0,y:(i=(a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,r;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:r,animationDuration:n,animationEasing:i,children:a,coordinate:s,hasPayload:l,isAnimationActive:c,offset:u,position:d,reverseDirection:f,useTranslate3d:m,viewBox:g,wrapperStyle:A,lastBoundingBox:v,innerRef:b,hasPortalFromProps:E}=this.props,{cssClasses:I,cssProperties:S}=WRe({allowEscapeViewBox:r,coordinate:s,offsetTopLeft:u,position:d,reverseDirection:f,tooltipBox:{height:v.height,width:v.width},useTranslate3d:m,viewBox:g}),_=E?{}:w4(w4({transition:c&&t?"transform ".concat(n,"ms ").concat(i):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&l?"visible":"hidden",position:"absolute",top:0,left:0}),B=w4(w4({},_),{},{visibility:!this.state.dismissed&&t&&l?"visible":"hidden"},A);return w.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:I,style:B,ref:b},a)}}var e0e=()=>{var e;return(e=Mr(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function kD(){return kD=Object.assign?Object.assign.bind():function(e){for(var t=1;tys(e.x)&&ys(e.y),Y$=e=>e.base!=null&&hI(e.base)&&hI(e),Jy=e=>e.x,Xy=e=>e.y,JRe=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Dw(e));return(r==="curveMonotone"||r==="curveBump")&&t?V$["".concat(r).concat(t==="vertical"?"Y":"X")]:V$[r]||e6},XRe=e=>{var{type:t="linear",points:r=[],baseLine:n,layout:i,connectNulls:a=!1}=e,s=JRe(t,i),l=a?r.filter(hI):r,c;if(Array.isArray(n)){var u=r.map((g,A)=>K$(K$({},g),{},{base:n[A]}));i==="vertical"?c=m4().y(Xy).x1(Jy).x0(g=>g.base.x):c=m4().x(Jy).y1(Xy).y0(g=>g.base.y);var d=c.defined(Y$).curve(s),f=a?u.filter(Y$):u;return d(f)}i==="vertical"&&Rr(n)?c=m4().y(Xy).x1(Jy).x0(n):Rr(n)?c=m4().x(Jy).y1(Xy).y0(n):c=Sce().x(Jy).y(Xy);var m=c.defined(hI).curve(s);return m(l)},m9=e=>{var{className:t,points:r,path:n,pathRef:i}=e,a=vy();if((!r||!r.length)&&!n)return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},l=r&&r.length?XRe(s):n;return w.createElement("path",kD({},Lu(e),ZO(e),{className:vi("recharts-curve",t),d:l===null?void 0:l,ref:i}))},eFe=["x","y","top","left","width","height","className"];function _D(){return _D=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(i,"v").concat(n,"M").concat(a,",").concat(t,"h").concat(r),lFe=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:a=0,height:s=0,className:l}=e,c=aFe(e,eFe),u=tFe({x:t,y:r,top:n,left:i,width:a,height:s},c);return!Rr(t)||!Rr(r)||!Rr(a)||!Rr(s)||!Rr(n)||!Rr(i)?null:w.createElement("path",_D({},bc(u),{className:vi("recharts-cross",l),d:oFe(t,r,a,s,n,i)}))};function cFe(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function J$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function X$(e){for(var t=1;te.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),t0e=(e,t,r)=>e.map(n=>"".concat(hFe(n)," ").concat(t,"ms ").concat(r)).join(","),mFe=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),lb=(e,t)=>Object.keys(t).reduce((r,n)=>X$(X$({},r),{},{[n]:e(n,t[n])}),{});function ez(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ko(e){for(var t=1;te+(t-e)*r,jD=e=>{var{from:t,to:r}=e;return t!==r},r0e=(e,t,r)=>{var n=lb((i,a)=>{if(jD(a)){var[s,l]=e(a.from,a.to,a.velocity);return ko(ko({},a),{},{from:s,velocity:l})}return a},t);return r<1?lb((i,a)=>jD(a)&&n[i]!=null?ko(ko({},a),{},{velocity:mI(a.velocity,n[i].velocity,r),from:mI(a.from,n[i].from,r)}):a,t):r0e(e,n,r-1)};function vFe(e,t,r,n,i,a){var s,l=n.reduce((m,g)=>ko(ko({},m),{},{[g]:{from:e[g],velocity:0,to:t[g]}}),{}),c=()=>lb((m,g)=>g.from,l),u=()=>!Object.values(l).filter(jD).length,d=null,f=m=>{s||(s=m);var g=m-s,A=g/r.dt;l=r0e(r,l,A),i(ko(ko(ko({},e),t),c())),s=m,u()||(d=a.setTimeout(f))};return()=>(d=a.setTimeout(f),()=>{var m;(m=d)===null||m===void 0||m()})}function xFe(e,t,r,n,i,a,s){var l=null,c=i.reduce((f,m)=>{var g=e[m],A=t[m];return g==null||A==null?f:ko(ko({},f),{},{[m]:[g,A]})},{}),u,d=f=>{u||(u=f);var m=(f-u)/n,g=lb((v,b)=>mI(...b,r(m)),c);if(a(ko(ko(ko({},e),t),g)),m<1)l=s.setTimeout(d);else{var A=lb((v,b)=>mI(...b,r(1)),c);a(ko(ko(ko({},e),t),A))}};return()=>(l=s.setTimeout(d),()=>{var f;(f=l)===null||f===void 0||f()})}const yFe=(e,t,r,n,i,a)=>{var s=mFe(e,t);return r==null?()=>(i(ko(ko({},e),t)),()=>{}):r.isStepper===!0?vFe(e,t,r,s,i,a):xFe(e,t,r,n,s,i,a)};var pI=1e-4,n0e=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],i0e=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),tz=(e,t)=>r=>{var n=n0e(e,t);return i0e(n,r)},bFe=(e,t)=>r=>{var n=n0e(e,t),i=[...n.map((a,s)=>a*s).slice(1),0];return i0e(i,r)},wFe=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var i=n.map(a=>parseFloat(a));return[i[0],i[1],i[2],i[3]]},EFe=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var i=tz(e,r),a=tz(t,n),s=bFe(e,r),l=u=>u>1?1:u<0?0:u,c=u=>{for(var d=u>1?1:u,f=d,m=0;m<8;++m){var g=i(f)-d,A=s(f);if(Math.abs(g-d)0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=t,a=(s,l,c)=>{var u=-(s-l)*r,d=c*n,f=c+(u-d)*i/1e3,m=c*i/1e3+s;return Math.abs(m-l){if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return rz(e);case"spring":return IFe();default:if(e.split("(")[0]==="cubic-bezier")return rz(e)}return typeof e=="function"?e:null};function BFe(e){var t,r=()=>null,n=!1,i=null,a=s=>{if(!n){if(Array.isArray(s)){if(!s.length)return;var l=s,[c,...u]=l;if(typeof c=="number"){i=e.setTimeout(a.bind(null,u),c);return}a(c),i=e.setTimeout(a.bind(null,u));return}typeof s=="string"&&(t=s,r(t)),typeof s=="object"&&(t=s,r(t)),typeof s=="function"&&s()}};return{stop:()=>{n=!0},start:s=>{n=!1,i&&(i(),i=null),a(s)},subscribe:s=>(r=s,()=>{r=()=>null}),getTimeoutController:()=>e}}class NFe{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,a=s=>{s-n>=r?t(s):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(a))};return i=requestAnimationFrame(a),()=>{i!=null&&cancelAnimationFrame(i)}}}function kFe(){return BFe(new NFe)}var _Fe=w.createContext(kFe);function jFe(e,t){var r=w.useContext(_Fe);return w.useMemo(()=>t??r(e),[e,t,r])}var DFe=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),y6={isSsr:DFe()},TFe={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},nz={t:0},Mk={t:1};function Lw(e){var t=Ao(e,TFe),{isActive:r,canBegin:n,duration:i,easing:a,begin:s,onAnimationEnd:l,onAnimationStart:c,children:u}=t,d=r==="auto"?!y6.isSsr:r,f=jFe(t.animationId,t.animationManager),[m,g]=w.useState(d?nz:Mk),A=w.useRef(null);return w.useEffect(()=>{d||g(Mk)},[d]),w.useEffect(()=>{if(!d||!n)return Tw;var v=yFe(nz,Mk,SFe(a),i,g,f.getTimeoutController()),b=()=>{A.current=v()};return f.start([c,s,b,i,l]),()=>{f.stop(),A.current&&A.current(),l()}},[d,n,i,a,s,c,l,f]),u(m.t)}function Uw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=w.useRef(tb(t)),n=w.useRef(e);return n.current!==e&&(r.current=tb(t),n.current=e),r.current}var PFe=["radius"],OFe=["radius"],iz,az,sz,oz,lz,cz,uz,dz,fz,hz;function mz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pz(e){for(var t=1;t{var a=zp(r),s=zp(n),l=Math.min(Math.abs(a)/2,Math.abs(s)/2),c=s>=0?1:-1,u=a>=0?1:-1,d=s>=0&&a>=0||s<0&&a<0?1:0,f;if(l>0&&i instanceof Array){for(var m=[0,0,0,0],g=0,A=4;gl?l:i[g];f=Os(iz||(iz=pf(["M",",",""])),e,t+c*m[0]),m[0]>0&&(f+=Os(az||(az=pf(["A ",",",",0,0,",",",",",""])),m[0],m[0],d,e+u*m[0],t)),f+=Os(sz||(sz=pf(["L ",",",""])),e+r-u*m[1],t),m[1]>0&&(f+=Os(oz||(oz=pf(["A ",",",",0,0,",`, `,",",""])),m[1],m[1],d,e+r,t+c*m[1])),f+=Os(lz||(lz=pf(["L ",",",""])),e+r,t+n-c*m[2]),m[2]>0&&(f+=Os(cz||(cz=pf(["A ",",",",0,0,",`, `,",",""])),m[2],m[2],d,e+r-u*m[2],t+n)),f+=Os(uz||(uz=pf(["L ",",",""])),e+u*m[3],t+n),m[3]>0&&(f+=Os(dz||(dz=pf(["A ",",",",0,0,",`, `,",",""])),m[3],m[3],d,e,t+n-c*m[3])),f+="Z"}else if(l>0&&i===+i&&i>0){var v=Math.min(l,i);f=Os(fz||(fz=pf(["M ",",",` A `,",",",0,0,",",",",",` L `,",",` A `,",",",0,0,",",",",",` L `,",",` A `,",",",0,0,",",",",",` L `,",",` A `,",",",0,0,",",",","," Z"])),e,t+c*v,v,v,d,e+u*v,t,e+r-u*v,t,v,v,d,e+r,t+c*v,e+r,t+n-c*v,v,v,d,e+r-u*v,t+n,e+u*v,t+n,v,v,d,e,t+n-c*v)}else f=Os(hz||(hz=pf(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return f},vz={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},a0e=e=>{var t=Ao(e,vz),r=w.useRef(null),[n,i]=w.useState(-1);w.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var q=r.current.getTotalLength();q&&i(q)}catch{}},[]);var{x:a,y:s,width:l,height:c,radius:u,className:d}=t,{animationEasing:f,animationDuration:m,animationBegin:g,isAnimationActive:A,isUpdateAnimationActive:v}=t,b=w.useRef(l),E=w.useRef(c),I=w.useRef(a),S=w.useRef(s),_=w.useMemo(()=>({x:a,y:s,width:l,height:c,radius:u}),[a,s,l,c,u]),B=Uw(_,"rectangle-");if(a!==+a||s!==+s||l!==+l||c!==+c||l===0||c===0)return null;var T=vi("recharts-rectangle",d);if(!v){var P=bc(t),{radius:O}=P,z=gz(P,PFe);return w.createElement("path",gI({},z,{x:zp(a),y:zp(s),width:zp(l),height:zp(c),radius:typeof u=="number"?u:void 0,className:T,d:Az(a,s,l,c,u)}))}var L=b.current,W=E.current,R=I.current,$=S.current,X="0px ".concat(n===-1?1:n,"px"),Z="".concat(n,"px 0px"),K=t0e(["strokeDasharray"],m,typeof f=="string"?f:vz.animationEasing);return w.createElement(Lw,{animationId:B,key:B,canBegin:n>0,duration:m,easing:f,isActive:v,begin:g},q=>{var Y=Ja(L,l,q),ne=Ja(W,c,q),ge=Ja(R,a,q),ae=Ja($,s,q);r.current&&(b.current=Y,E.current=ne,I.current=ge,S.current=ae);var pe;A?q>0?pe={transition:K,strokeDasharray:Z}:pe={strokeDasharray:X}:pe={strokeDasharray:Z};var _e=bc(t),{radius:we}=_e,xe=gz(_e,OFe);return w.createElement("path",gI({},xe,{radius:typeof u=="number"?u:void 0,className:T,d:Az(ge,ae,Y,ne,u),ref:r,style:pz(pz({},pe),t.style)}))})};function xz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yz(e){for(var t=1;te*180/Math.PI,ho=(e,t,r,n)=>({x:e+Math.cos(-AI*n)*r,y:t+Math.sin(-AI*n)*r}),s0e=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},HFe=(e,t)=>{var{x:r,y:n}=e,{x:i,y:a}=t;return Math.sqrt((r-i)**2+(n-a)**2)},WFe=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:a}=t,s=HFe({x:r,y:n},{x:i,y:a});if(s<=0)return{radius:s,angle:0};var l=(r-i)/s,c=Math.acos(l);return n>a&&(c=2*Math.PI-c),{radius:s,angle:zFe(c),angleInRadian:c}},GFe=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),i=Math.floor(r/360),a=Math.min(n,i);return{startAngle:t-a*360,endAngle:r-a*360}},qFe=(e,t)=>{var{startAngle:r,endAngle:n}=t,i=Math.floor(r/360),a=Math.floor(n/360),s=Math.min(i,a);return e+s*360},KFe=(e,t)=>{var{chartX:r,chartY:n}=e,{radius:i,angle:a}=WFe({x:r,y:n},t),{innerRadius:s,outerRadius:l}=t;if(il||i===0)return null;var{startAngle:c,endAngle:u}=GFe(t),d=a,f;if(c<=u){for(;d>u;)d-=360;for(;d=c&&d<=u}else{for(;d>c;)d-=360;for(;d=u&&d<=c}return f?yz(yz({},t),{},{radius:i,angle:qFe(d,t)}):null};function o0e(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:a}=e,s=ho(t,r,n,i),l=ho(t,r,n,a);return{points:[s,l],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}var bz,wz,Ez,Cz,Iz,Sz,Bz;function DD(){return DD=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=rl(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},E4=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:a,isExternal:s,cornerRadius:l,cornerIsExternal:c}=e,u=l*(s?1:-1)+n,d=Math.asin(l/u)/AI,f=c?i:i+a*d,m=ho(t,r,u,f),g=ho(t,r,n,f),A=c?i-a*d:i,v=ho(t,r,u*Math.cos(d*AI),A);return{center:m,circleTangency:g,lineTangency:v,theta:d}},l0e=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:a,endAngle:s}=e,l=VFe(a,s),c=a+l,u=ho(t,r,i,a),d=ho(t,r,i,c),f=Os(bz||(bz=NA(["M ",",",` A `,",",`,0, `,",",`, `,",",` `])),u.x,u.y,i,i,+(Math.abs(l)>180),+(a>c),d.x,d.y);if(n>0){var m=ho(t,r,n,a),g=ho(t,r,n,c);f+=Os(wz||(wz=NA(["L ",",",` A `,",",`,0, `,",",`, `,","," Z"])),g.x,g.y,n,n,+(Math.abs(l)>180),+(a<=c),m.x,m.y)}else f+=Os(Ez||(Ez=NA(["L ",","," Z"])),t,r);return f},YFe=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}=e,d=rl(u-c),{circleTangency:f,lineTangency:m,theta:g}=E4({cx:t,cy:r,radius:i,angle:c,sign:d,cornerRadius:a,cornerIsExternal:l}),{circleTangency:A,lineTangency:v,theta:b}=E4({cx:t,cy:r,radius:i,angle:u,sign:-d,cornerRadius:a,cornerIsExternal:l}),E=l?Math.abs(c-u):Math.abs(c-u)-g-b;if(E<0)return s?Os(Cz||(Cz=NA(["M ",",",` a`,",",",0,0,1,",`,0 a`,",",",0,0,1,",`,0 `])),m.x,m.y,a,a,a*2,a,a,-a*2):l0e({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:c,endAngle:u});var I=Os(Iz||(Iz=NA(["M ",",",` A`,",",",0,0,",",",",",` A`,",",",0,",",",",",",",` A`,",",",0,0,",",",",",` `])),m.x,m.y,a,a,+(d<0),f.x,f.y,i,i,+(E>180),+(d<0),A.x,A.y,a,a,+(d<0),v.x,v.y);if(n>0){var{circleTangency:S,lineTangency:_,theta:B}=E4({cx:t,cy:r,radius:n,angle:c,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),{circleTangency:T,lineTangency:P,theta:O}=E4({cx:t,cy:r,radius:n,angle:u,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),z=l?Math.abs(c-u):Math.abs(c-u)-B-O;if(z<0&&a===0)return"".concat(I,"L").concat(t,",").concat(r,"Z");I+=Os(Sz||(Sz=NA(["L",",",` A`,",",",0,0,",",",",",` A`,",",",0,",",",",",",",` A`,",",",0,0,",",",",","Z"])),P.x,P.y,a,a,+(d<0),T.x,T.y,n,n,+(z>180),+(d>0),S.x,S.y,a,a,+(d<0),_.x,_.y)}else I+=Os(Bz||(Bz=NA(["L",",","Z"])),t,r);return I},ZFe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},c0e=e=>{var t=Ao(e,ZFe),{cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:s,forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d,className:f}=t;if(a0&&Math.abs(u-d)<360?v=YFe({cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:Math.min(A,g/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):v=l0e({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d}),w.createElement("path",DD({},bc(t),{className:m,d:v}))};function JFe(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(Uce(t)){if(e==="centric"){var{cx:n,cy:i,innerRadius:a,outerRadius:s,angle:l}=t,c=ho(n,i,a,l),u=ho(n,i,s,l);return[{x:c.x,y:c.y},{x:u.x,y:u.y}]}return o0e(t)}}var Qk={},Lk={},Uk={},Nz;function XFe(){return Nz||(Nz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Xce();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(Uk)),Uk}var kz;function eMe(){return kz||(kz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=XFe();function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(Lk)),Lk}var _z;function tMe(){return _z||(_z=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eue(),r=eMe();function n(i,a,s){s&&typeof s!="number"&&t.isIterateeCall(i,a,s)&&(a=s=void 0),i=r.toFinite(i),a===void 0?(a=i,i=0):a=r.toFinite(a),s=s===void 0?it?1:e>=t?0:NaN}function iMe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function p9(e){let t,r,n;e.length!==2?(t=Zp,r=(l,c)=>Zp(e(l),c),n=(l,c)=>e(l)-c):(t=e===Zp||e===iMe?e:aMe,r=e,n=e);function i(l,c,u=0,d=l.length){if(u>>1;r(l[f],c)<0?u=f+1:d=f}while(u>>1;r(l[f],c)<=0?u=f+1:d=f}while(uu&&n(l[f-1],c)>-n(l[f],c)?f-1:f}return{left:i,center:s,right:a}}function aMe(){return 0}function d0e(e){return e===null?NaN:+e}function*sMe(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const oMe=p9(Zp),$w=oMe.right;p9(d0e).center;class Dz extends Map{constructor(t,r=uMe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Tz(this,t))}has(t){return super.has(Tz(this,t))}set(t,r){return super.set(lMe(this,t),r)}delete(t){return super.delete(cMe(this,t))}}function Tz({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function lMe({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function cMe({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function uMe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function dMe(e=Zp){if(e===Zp)return f0e;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function f0e(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const fMe=Math.sqrt(50),hMe=Math.sqrt(10),mMe=Math.sqrt(2);function vI(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=fMe?10:a>=hMe?5:a>=mMe?2:1;let l,c,u;return i<0?(u=Math.pow(10,-i)/s,l=Math.round(e*u),c=Math.round(t*u),l/ut&&--c,u=-u):(u=Math.pow(10,i)*s,l=Math.round(e/u),c=Math.round(t/u),l*ut&&--c),c0))return[];if(e===t)return[e];const n=t=i))return[];const l=a-i+1,c=new Array(l);if(n)if(s<0)for(let u=0;u=n)&&(r=n);return r}function Oz(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function h0e(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?f0e:dMe(i);n>r;){if(n-r>600){const c=n-r+1,u=t-r+1,d=Math.log(c),f=.5*Math.exp(2*d/3),m=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),g=Math.max(r,Math.floor(t-u*f/c+m)),A=Math.min(n,Math.floor(t+(c-u)*f/c+m));h0e(e,t,g,A,i)}const a=e[t];let s=r,l=n;for(e2(e,r,t),i(e[n],a)>0&&e2(e,r,n);s0;)--l}i(e[r],a)===0?e2(e,r,l):(++l,e2(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function e2(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function pMe(e,t,r){if(e=Float64Array.from(sMe(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Oz(e);if(t>=1)return Pz(e);var n,i=(n-1)*t,a=Math.floor(i),s=Pz(h0e(e,a).subarray(0,a+1)),l=Oz(e.subarray(a+1));return s+(l-s)*(i-a)}}function gMe(e,t,r=d0e){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),s=+r(e[a],a,e),l=+r(e[a+1],a+1,e);return s+(l-s)*(i-a)}}function AMe(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?C4(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?C4(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=yMe.exec(e))?new Kc(t[1],t[2],t[3],1):(t=bMe.exec(e))?new Kc(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=wMe.exec(e))?C4(t[1],t[2],t[3],t[4]):(t=EMe.exec(e))?C4(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=CMe.exec(e))?$z(t[1],t[2]/100,t[3]/100,1):(t=IMe.exec(e))?$z(t[1],t[2]/100,t[3]/100,t[4]):Rz.hasOwnProperty(e)?Qz(Rz[e]):e==="transparent"?new Kc(NaN,NaN,NaN,0):null}function Qz(e){return new Kc(e>>16&255,e>>8&255,e&255,1)}function C4(e,t,r,n){return n<=0&&(e=t=r=NaN),new Kc(e,t,r,n)}function NMe(e){return e instanceof zw||(e=db(e)),e?(e=e.rgb(),new Kc(e.r,e.g,e.b,e.opacity)):new Kc}function FD(e,t,r,n){return arguments.length===1?NMe(e):new Kc(e,t,r,n??1)}function Kc(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}v9(Kc,FD,p0e(zw,{brighter(e){return e=e==null?xI:Math.pow(xI,e),new Kc(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?cb:Math.pow(cb,e),new Kc(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Kc(qA(this.r),qA(this.g),qA(this.b),yI(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Lz,formatHex:Lz,formatHex8:kMe,formatRgb:Uz,toString:Uz}));function Lz(){return`#${kA(this.r)}${kA(this.g)}${kA(this.b)}`}function kMe(){return`#${kA(this.r)}${kA(this.g)}${kA(this.b)}${kA((isNaN(this.opacity)?1:this.opacity)*255)}`}function Uz(){const e=yI(this.opacity);return`${e===1?"rgb(":"rgba("}${qA(this.r)}, ${qA(this.g)}, ${qA(this.b)}${e===1?")":`, ${e})`}`}function yI(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function qA(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function kA(e){return e=qA(e),(e<16?"0":"")+e.toString(16)}function $z(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Cd(e,t,r,n)}function g0e(e){if(e instanceof Cd)return new Cd(e.h,e.s,e.l,e.opacity);if(e instanceof zw||(e=db(e)),!e)return new Cd;if(e instanceof Cd)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),s=NaN,l=a-i,c=(a+i)/2;return l?(t===a?s=(r-n)/l+(r0&&c<1?0:s,new Cd(s,l,c,e.opacity)}function _Me(e,t,r,n){return arguments.length===1?g0e(e):new Cd(e,t,r,n??1)}function Cd(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}v9(Cd,_Me,p0e(zw,{brighter(e){return e=e==null?xI:Math.pow(xI,e),new Cd(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?cb:Math.pow(cb,e),new Cd(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Kc(zk(e>=240?e-240:e+120,i,n),zk(e,i,n),zk(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Cd(zz(this.h),I4(this.s),I4(this.l),yI(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=yI(this.opacity);return`${e===1?"hsl(":"hsla("}${zz(this.h)}, ${I4(this.s)*100}%, ${I4(this.l)*100}%${e===1?")":`, ${e})`}`}}));function zz(e){return e=(e||0)%360,e<0?e+360:e}function I4(e){return Math.max(0,Math.min(1,e||0))}function zk(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const x9=e=>()=>e;function jMe(e,t){return function(r){return e+r*t}}function DMe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function TMe(e){return(e=+e)==1?A0e:function(t,r){return r-t?DMe(t,r,e):x9(isNaN(t)?r:t)}}function A0e(e,t){var r=t-e;return r?jMe(e,r):x9(isNaN(e)?t:e)}const Hz=(function e(t){var r=TMe(t);function n(i,a){var s=r((i=FD(i)).r,(a=FD(a)).r),l=r(i.g,a.g),c=r(i.b,a.b),u=A0e(i.opacity,a.opacity);return function(d){return i.r=s(d),i.g=l(d),i.b=c(d),i.opacity=u(d),i+""}}return n.gamma=e,n})(1);function PMe(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;ir&&(a=t.slice(r,a),l[s]?l[s]+=a:l[++s]=a),(n=n[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,c.push({i:s,x:bI(n,i)})),r=Hk.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function WMe(e,t,r){var n=e[0],i=e[1],a=t[0],s=t[1];return i2?GMe:WMe,c=u=null,f}function f(m){return m==null||isNaN(m=+m)?a:(c||(c=l(e.map(n),t,r)))(n(s(m)))}return f.invert=function(m){return s(i((u||(u=l(t,e.map(n),bI)))(m)))},f.domain=function(m){return arguments.length?(e=Array.from(m,wI),d()):e.slice()},f.range=function(m){return arguments.length?(t=Array.from(m),d()):t.slice()},f.rangeRound=function(m){return t=Array.from(m),r=y9,d()},f.clamp=function(m){return arguments.length?(s=m?!0:vc,d()):s!==vc},f.interpolate=function(m){return arguments.length?(r=m,d()):r},f.unknown=function(m){return arguments.length?(a=m,f):a},function(m,g){return n=m,i=g,d()}}function b9(){return b6()(vc,vc)}function qMe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function EI(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Lx(e){return e=EI(Math.abs(e)),e?e[1]:NaN}function KMe(e,t){return function(r,n){for(var i=r.length,a=[],s=0,l=e[0],c=0;i>0&&l>0&&(c+l+1>n&&(l=Math.max(1,n-c)),a.push(r.substring(i-=l,i+l)),!((c+=l+1)>n));)l=e[s=(s+1)%e.length];return a.reverse().join(t)}}function VMe(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var YMe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function fb(e){if(!(t=YMe.exec(e)))throw new Error("invalid format: "+e);var t;return new w9({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}fb.prototype=w9.prototype;function w9(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}w9.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function ZMe(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var v0e;function JMe(e,t){var r=EI(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(v0e=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+EI(e,Math.max(0,t+a-1))[0]}function Gz(e,t){var r=EI(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const qz={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:qMe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Gz(e*100,t),r:Gz,s:JMe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Kz(e){return e}var Vz=Array.prototype.map,Yz=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function XMe(e){var t=e.grouping===void 0||e.thousands===void 0?Kz:KMe(Vz.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?Kz:VMe(Vz.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(f){f=fb(f);var m=f.fill,g=f.align,A=f.sign,v=f.symbol,b=f.zero,E=f.width,I=f.comma,S=f.precision,_=f.trim,B=f.type;B==="n"?(I=!0,B="g"):qz[B]||(S===void 0&&(S=12),_=!0,B="g"),(b||m==="0"&&g==="=")&&(b=!0,m="0",g="=");var T=v==="$"?r:v==="#"&&/[boxX]/.test(B)?"0"+B.toLowerCase():"",P=v==="$"?n:/[%p]/.test(B)?s:"",O=qz[B],z=/[defgprs%]/.test(B);S=S===void 0?6:/[gprs]/.test(B)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function L(W){var R=T,$=P,X,Z,K;if(B==="c")$=O(W)+$,W="";else{W=+W;var q=W<0||1/W<0;if(W=isNaN(W)?c:O(Math.abs(W),S),_&&(W=ZMe(W)),q&&+W==0&&A!=="+"&&(q=!1),R=(q?A==="("?A:l:A==="-"||A==="("?"":A)+R,$=(B==="s"?Yz[8+v0e/3]:"")+$+(q&&A==="("?")":""),z){for(X=-1,Z=W.length;++XK||K>57){$=(K===46?i+W.slice(X+1):W.slice(X))+$,W=W.slice(0,X);break}}}I&&!b&&(W=t(W,1/0));var Y=R.length+W.length+$.length,ne=Y>1)+R+W+$+ne.slice(Y);break;default:W=ne+R+W+$;break}return a(W)}return L.toString=function(){return f+""},L}function d(f,m){var g=u((f=fb(f),f.type="f",f)),A=Math.max(-8,Math.min(8,Math.floor(Lx(m)/3)))*3,v=Math.pow(10,-A),b=Yz[8+A/3];return function(E){return g(v*E)+b}}return{format:u,formatPrefix:d}}var S4,E9,x0e;eQe({thousands:",",grouping:[3],currency:["$",""]});function eQe(e){return S4=XMe(e),E9=S4.format,x0e=S4.formatPrefix,S4}function tQe(e){return Math.max(0,-Lx(Math.abs(e)))}function rQe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Lx(t)/3)))*3-Lx(Math.abs(e)))}function nQe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Lx(t)-Lx(e))+1}function y0e(e,t,r,n){var i=OD(e,t,r),a;switch(n=fb(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=rQe(i,s))&&(n.precision=a),x0e(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=nQe(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=tQe(i))&&(n.precision=a-(n.type==="%")*2);break}}return E9(n)}function Ng(e){var t=e.domain;return e.ticks=function(r){var n=t();return TD(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return y0e(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,s=n[i],l=n[a],c,u,d=10;for(l0;){if(u=PD(s,l,r),u===c)return n[i]=s,n[a]=l,t(n);if(u>0)s=Math.floor(s/u)*u,l=Math.ceil(l/u)*u;else if(u<0)s=Math.ceil(s*u)/u,l=Math.floor(l*u)/u;else break;c=u}return e},e}function b0e(){var e=b9();return e.copy=function(){return Hw(e,b0e())},K0.apply(e,arguments),Ng(e)}function w0e(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,wI),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return w0e(e).unknown(t)},e=arguments.length?Array.from(e,wI):[0,1],Ng(r)}function E0e(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],s;return aMath.pow(e,t)}function lQe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Xz(e){return(t,r)=>-e(-t,r)}function C9(e){const t=e(Zz,Jz),r=t.domain;let n=10,i,a;function s(){return i=lQe(n),a=oQe(n),r()[0]<0?(i=Xz(i),a=Xz(a),e(iQe,aQe)):e(Zz,Jz),t}return t.base=function(l){return arguments.length?(n=+l,s()):n},t.domain=function(l){return arguments.length?(r(l),s()):r()},t.ticks=l=>{const c=r();let u=c[0],d=c[c.length-1];const f=d0){for(;m<=g;++m)for(A=1;Ad)break;E.push(v)}}else for(;m<=g;++m)for(A=n-1;A>=1;--A)if(v=m>0?A/a(-m):A*a(m),!(vd)break;E.push(v)}E.length*2{if(l==null&&(l=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=fb(c)).precision==null&&(c.trim=!0),c=E9(c)),l===1/0)return c;const u=Math.max(1,n*l/t.ticks().length);return d=>{let f=d/a(Math.round(i(d)));return f*nr(E0e(r(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function C0e(){const e=C9(b6()).domain([1,10]);return e.copy=()=>Hw(e,C0e()).base(e.base()),K0.apply(e,arguments),e}function eH(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function tH(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function I9(e){var t=1,r=e(eH(t),tH(t));return r.constant=function(n){return arguments.length?e(eH(t=+n),tH(t)):t},Ng(r)}function I0e(){var e=I9(b6());return e.copy=function(){return Hw(e,I0e()).constant(e.constant())},K0.apply(e,arguments)}function rH(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function cQe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function uQe(e){return e<0?-e*e:e*e}function S9(e){var t=e(vc,vc),r=1;function n(){return r===1?e(vc,vc):r===.5?e(cQe,uQe):e(rH(r),rH(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Ng(t)}function B9(){var e=S9(b6());return e.copy=function(){return Hw(e,B9()).exponent(e.exponent())},K0.apply(e,arguments),e}function dQe(){return B9.apply(null,arguments).exponent(.5)}function nH(e){return Math.sign(e)*e*e}function fQe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function S0e(){var e=b9(),t=[0,1],r=!1,n;function i(a){var s=fQe(e(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return e.invert(nH(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,wI)).map(nH)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return S0e(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},K0.apply(i,arguments),Ng(i)}function B0e(){var e=[],t=[],r=[],n;function i(){var s=0,l=Math.max(1,t.length);for(r=new Array(l-1);++s0?r[l-1]:e[0],l=r?[n[r-1],t]:[n[u-1],n[u]]},s.unknown=function(c){return arguments.length&&(a=c),s},s.thresholds=function(){return n.slice()},s.copy=function(){return N0e().domain([e,t]).range(i).unknown(a)},K0.apply(Ng(s),arguments)}function k0e(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[$w(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var s=t.indexOf(a);return[e[s-1],e[s]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return k0e().domain(e).range(t).unknown(r)},K0.apply(i,arguments)}const Wk=new Date,Gk=new Date;function Po(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),l=i.ceil(a);return a-s(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,l)=>{const c=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a0))return c;let u;do c.push(u=new Date(+a)),t(a,l),e(a);while(uPo(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;t(s,-1),!a(s););else for(;--l>=0;)for(;t(s,1),!a(s););}),r&&(i.count=(a,s)=>(Wk.setTime(+a),Gk.setTime(+s),e(Wk),e(Gk),Math.floor(r(Wk,Gk))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const CI=Po(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);CI.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Po(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):CI);CI.range;const tm=1e3,O0=tm*60,rm=O0*60,xm=rm*24,N9=xm*7,iH=xm*30,qk=xm*365,_A=Po(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*tm)},(e,t)=>(t-e)/tm,e=>e.getUTCSeconds());_A.range;const k9=Po(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tm)},(e,t)=>{e.setTime(+e+t*O0)},(e,t)=>(t-e)/O0,e=>e.getMinutes());k9.range;const _9=Po(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*O0)},(e,t)=>(t-e)/O0,e=>e.getUTCMinutes());_9.range;const j9=Po(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tm-e.getMinutes()*O0)},(e,t)=>{e.setTime(+e+t*rm)},(e,t)=>(t-e)/rm,e=>e.getHours());j9.range;const D9=Po(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*rm)},(e,t)=>(t-e)/rm,e=>e.getUTCHours());D9.range;const Ww=Po(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*O0)/xm,e=>e.getDate()-1);Ww.range;const w6=Po(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/xm,e=>e.getUTCDate()-1);w6.range;const _0e=Po(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/xm,e=>Math.floor(e/xm));_0e.range;function M1(e){return Po(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*O0)/N9)}const E6=M1(0),II=M1(1),hQe=M1(2),mQe=M1(3),Ux=M1(4),pQe=M1(5),gQe=M1(6);E6.range;II.range;hQe.range;mQe.range;Ux.range;pQe.range;gQe.range;function Q1(e){return Po(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/N9)}const C6=Q1(0),SI=Q1(1),AQe=Q1(2),vQe=Q1(3),$x=Q1(4),xQe=Q1(5),yQe=Q1(6);C6.range;SI.range;AQe.range;vQe.range;$x.range;xQe.range;yQe.range;const T9=Po(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());T9.range;const P9=Po(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());P9.range;const ym=Po(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ym.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Po(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});ym.range;const bm=Po(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());bm.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Po(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});bm.range;function j0e(e,t,r,n,i,a){const s=[[_A,1,tm],[_A,5,5*tm],[_A,15,15*tm],[_A,30,30*tm],[a,1,O0],[a,5,5*O0],[a,15,15*O0],[a,30,30*O0],[i,1,rm],[i,3,3*rm],[i,6,6*rm],[i,12,12*rm],[n,1,xm],[n,2,2*xm],[r,1,N9],[t,1,iH],[t,3,3*iH],[e,1,qk]];function l(u,d,f){const m=db).right(s,m);if(g===s.length)return e.every(OD(u/qk,d/qk,f));if(g===0)return CI.every(Math.max(OD(u,d,f),1));const[A,v]=s[m/s[g-1][2]53)return null;"w"in Be||(Be.w=1),"Z"in Be?(ke=Vk(t2(Be.y,0,1)),he=ke.getUTCDay(),ke=he>4||he===0?SI.ceil(ke):SI(ke),ke=w6.offset(ke,(Be.V-1)*7),Be.y=ke.getUTCFullYear(),Be.m=ke.getUTCMonth(),Be.d=ke.getUTCDate()+(Be.w+6)%7):(ke=Kk(t2(Be.y,0,1)),he=ke.getDay(),ke=he>4||he===0?II.ceil(ke):II(ke),ke=Ww.offset(ke,(Be.V-1)*7),Be.y=ke.getFullYear(),Be.m=ke.getMonth(),Be.d=ke.getDate()+(Be.w+6)%7)}else("W"in Be||"U"in Be)&&("w"in Be||(Be.w="u"in Be?Be.u%7:"W"in Be?1:0),he="Z"in Be?Vk(t2(Be.y,0,1)).getUTCDay():Kk(t2(Be.y,0,1)).getDay(),Be.m=0,Be.d="W"in Be?(Be.w+6)%7+Be.W*7-(he+5)%7:Be.w+Be.U*7-(he+6)%7);return"Z"in Be?(Be.H+=Be.Z/100|0,Be.M+=Be.Z%100,Vk(Be)):Kk(Be)}}function O(me,Se,Ie,Be){for(var Xe=0,ke=Se.length,he=Ie.length,Le,Ye;Xe=he)return-1;if(Le=Se.charCodeAt(Xe++),Le===37){if(Le=Se.charAt(Xe++),Ye=B[Le in aH?Se.charAt(Xe++):Le],!Ye||(Be=Ye(me,Ie,Be))<0)return-1}else if(Le!=Ie.charCodeAt(Be++))return-1}return Be}function z(me,Se,Ie){var Be=u.exec(Se.slice(Ie));return Be?(me.p=d.get(Be[0].toLowerCase()),Ie+Be[0].length):-1}function L(me,Se,Ie){var Be=g.exec(Se.slice(Ie));return Be?(me.w=A.get(Be[0].toLowerCase()),Ie+Be[0].length):-1}function W(me,Se,Ie){var Be=f.exec(Se.slice(Ie));return Be?(me.w=m.get(Be[0].toLowerCase()),Ie+Be[0].length):-1}function R(me,Se,Ie){var Be=E.exec(Se.slice(Ie));return Be?(me.m=I.get(Be[0].toLowerCase()),Ie+Be[0].length):-1}function $(me,Se,Ie){var Be=v.exec(Se.slice(Ie));return Be?(me.m=b.get(Be[0].toLowerCase()),Ie+Be[0].length):-1}function X(me,Se,Ie){return O(me,t,Se,Ie)}function Z(me,Se,Ie){return O(me,r,Se,Ie)}function K(me,Se,Ie){return O(me,n,Se,Ie)}function q(me){return s[me.getDay()]}function Y(me){return a[me.getDay()]}function ne(me){return c[me.getMonth()]}function ge(me){return l[me.getMonth()]}function ae(me){return i[+(me.getHours()>=12)]}function pe(me){return 1+~~(me.getMonth()/3)}function _e(me){return s[me.getUTCDay()]}function we(me){return a[me.getUTCDay()]}function xe(me){return c[me.getUTCMonth()]}function Me(me){return l[me.getUTCMonth()]}function ye(me){return i[+(me.getUTCHours()>=12)]}function Ee(me){return 1+~~(me.getUTCMonth()/3)}return{format:function(me){var Se=T(me+="",S);return Se.toString=function(){return me},Se},parse:function(me){var Se=P(me+="",!1);return Se.toString=function(){return me},Se},utcFormat:function(me){var Se=T(me+="",_);return Se.toString=function(){return me},Se},utcParse:function(me){var Se=P(me+="",!0);return Se.toString=function(){return me},Se}}}var aH={"-":"",_:" ",0:"0"},ll=/^\s*\d+/,SQe=/^%/,BQe=/[\\^$*+?|[\]().{}]/g;function Pi(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function kQe(e,t,r){var n=ll.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function _Qe(e,t,r){var n=ll.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function jQe(e,t,r){var n=ll.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function DQe(e,t,r){var n=ll.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function TQe(e,t,r){var n=ll.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function sH(e,t,r){var n=ll.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function oH(e,t,r){var n=ll.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function PQe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function OQe(e,t,r){var n=ll.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function RQe(e,t,r){var n=ll.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function lH(e,t,r){var n=ll.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function FQe(e,t,r){var n=ll.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function cH(e,t,r){var n=ll.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function MQe(e,t,r){var n=ll.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function QQe(e,t,r){var n=ll.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function LQe(e,t,r){var n=ll.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function UQe(e,t,r){var n=ll.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function $Qe(e,t,r){var n=SQe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function zQe(e,t,r){var n=ll.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function HQe(e,t,r){var n=ll.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function uH(e,t){return Pi(e.getDate(),t,2)}function WQe(e,t){return Pi(e.getHours(),t,2)}function GQe(e,t){return Pi(e.getHours()%12||12,t,2)}function qQe(e,t){return Pi(1+Ww.count(ym(e),e),t,3)}function D0e(e,t){return Pi(e.getMilliseconds(),t,3)}function KQe(e,t){return D0e(e,t)+"000"}function VQe(e,t){return Pi(e.getMonth()+1,t,2)}function YQe(e,t){return Pi(e.getMinutes(),t,2)}function ZQe(e,t){return Pi(e.getSeconds(),t,2)}function JQe(e){var t=e.getDay();return t===0?7:t}function XQe(e,t){return Pi(E6.count(ym(e)-1,e),t,2)}function T0e(e){var t=e.getDay();return t>=4||t===0?Ux(e):Ux.ceil(e)}function eLe(e,t){return e=T0e(e),Pi(Ux.count(ym(e),e)+(ym(e).getDay()===4),t,2)}function tLe(e){return e.getDay()}function rLe(e,t){return Pi(II.count(ym(e)-1,e),t,2)}function nLe(e,t){return Pi(e.getFullYear()%100,t,2)}function iLe(e,t){return e=T0e(e),Pi(e.getFullYear()%100,t,2)}function aLe(e,t){return Pi(e.getFullYear()%1e4,t,4)}function sLe(e,t){var r=e.getDay();return e=r>=4||r===0?Ux(e):Ux.ceil(e),Pi(e.getFullYear()%1e4,t,4)}function oLe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Pi(t/60|0,"0",2)+Pi(t%60,"0",2)}function dH(e,t){return Pi(e.getUTCDate(),t,2)}function lLe(e,t){return Pi(e.getUTCHours(),t,2)}function cLe(e,t){return Pi(e.getUTCHours()%12||12,t,2)}function uLe(e,t){return Pi(1+w6.count(bm(e),e),t,3)}function P0e(e,t){return Pi(e.getUTCMilliseconds(),t,3)}function dLe(e,t){return P0e(e,t)+"000"}function fLe(e,t){return Pi(e.getUTCMonth()+1,t,2)}function hLe(e,t){return Pi(e.getUTCMinutes(),t,2)}function mLe(e,t){return Pi(e.getUTCSeconds(),t,2)}function pLe(e){var t=e.getUTCDay();return t===0?7:t}function gLe(e,t){return Pi(C6.count(bm(e)-1,e),t,2)}function O0e(e){var t=e.getUTCDay();return t>=4||t===0?$x(e):$x.ceil(e)}function ALe(e,t){return e=O0e(e),Pi($x.count(bm(e),e)+(bm(e).getUTCDay()===4),t,2)}function vLe(e){return e.getUTCDay()}function xLe(e,t){return Pi(SI.count(bm(e)-1,e),t,2)}function yLe(e,t){return Pi(e.getUTCFullYear()%100,t,2)}function bLe(e,t){return e=O0e(e),Pi(e.getUTCFullYear()%100,t,2)}function wLe(e,t){return Pi(e.getUTCFullYear()%1e4,t,4)}function ELe(e,t){var r=e.getUTCDay();return e=r>=4||r===0?$x(e):$x.ceil(e),Pi(e.getUTCFullYear()%1e4,t,4)}function CLe(){return"+0000"}function fH(){return"%"}function hH(e){return+e}function mH(e){return Math.floor(+e/1e3)}var Dv,R0e,F0e;ILe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function ILe(e){return Dv=IQe(e),R0e=Dv.format,Dv.parse,F0e=Dv.utcFormat,Dv.utcParse,Dv}function SLe(e){return new Date(e)}function BLe(e){return e instanceof Date?+e:+new Date(+e)}function O9(e,t,r,n,i,a,s,l,c,u){var d=b9(),f=d.invert,m=d.domain,g=u(".%L"),A=u(":%S"),v=u("%I:%M"),b=u("%I %p"),E=u("%a %d"),I=u("%b %d"),S=u("%B"),_=u("%Y");function B(T){return(c(T)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>pMe(e,a/n))},r.copy=function(){return U0e(t).domain(e)},Tm.apply(r,arguments)}function S6(){var e=0,t=.5,r=1,n=1,i,a,s,l,c,u=vc,d,f=!1,m;function g(v){return isNaN(v=+v)?m:(v=.5+((v=+d(v))-a)*(n*ve.chartData,B6=dt([Pm],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),M9=(e,t,r,n)=>n?B6(e):Pm(e),DLe=(e,t,r)=>r?B6(e):Pm(e);function lg(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(ys(t)&&ys(r))return!0}return!1}function pH(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function W0e(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,a;if(ys(r))i=r;else if(typeof r=="function")return;if(ys(n))a=n;else if(typeof n=="function")return;var s=[i,a];if(lg(s))return s}}function TLe(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(lg(n))return pH(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,a]=e,s,l;if(i==="auto")t!=null&&(s=Math.min(...t));else if(Rr(i))s=i;else if(typeof i=="function")try{t!=null&&(s=i(t?.[0]))}catch{}else if(typeof i=="string"&&S$.test(i)){var c=S$.exec(i);if(c==null||c[1]==null||t==null)s=void 0;else{var u=+c[1];s=t[0]-u}}else s=t?.[0];if(a==="auto")t!=null&&(l=Math.max(...t));else if(Rr(a))l=a;else if(typeof a=="function")try{t!=null&&(l=a(t?.[1]))}catch{}else if(typeof a=="string"&&B$.test(a)){var d=B$.exec(a);if(d==null||d[1]==null||t==null)l=void 0;else{var f=+d[1];l=t[1]+f}}else l=t?.[1];var m=[s,l];if(lg(m))return t==null?m:pH(m,t,r)}}}var yy=1e9,PLe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},L9,ts=!0,H0="[DecimalError] ",KA=H0+"Invalid argument: ",Q9=H0+"Exponent out of range: ",by=Math.floor,bA=Math.pow,OLe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Tu,tl=1e7,Fa=7,G0e=9007199254740991,BI=by(G0e/Fa),Pr={};Pr.absoluteValue=Pr.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Pr.comparedTo=Pr.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=ne.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};Pr.decimalPlaces=Pr.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Fa;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Pr.dividedBy=Pr.div=function(e){return um(this,new this.constructor(e))};Pr.dividedToIntegerBy=Pr.idiv=function(e){var t=this,r=t.constructor;return fa(um(t,new r(e),0,1),r.precision)};Pr.equals=Pr.eq=function(e){return!this.cmp(e)};Pr.exponent=function(){return po(this)};Pr.greaterThan=Pr.gt=function(e){return this.cmp(e)>0};Pr.greaterThanOrEqualTo=Pr.gte=function(e){return this.cmp(e)>=0};Pr.isInteger=Pr.isint=function(){return this.e>this.d.length-2};Pr.isNegative=Pr.isneg=function(){return this.s<0};Pr.isPositive=Pr.ispos=function(){return this.s>0};Pr.isZero=function(){return this.s===0};Pr.lessThan=Pr.lt=function(e){return this.cmp(e)<0};Pr.lessThanOrEqualTo=Pr.lte=function(e){return this.cmp(e)<1};Pr.logarithm=Pr.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Tu))throw Error(H0+"NaN");if(r.s<1)throw Error(H0+(r.s?"NaN":"-Infinity"));return r.eq(Tu)?new n(0):(ts=!1,t=um(hb(r,a),hb(e,a),a),ts=!0,fa(t,i))};Pr.minus=Pr.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?V0e(t,e):q0e(t,(e.s=-e.s,e))};Pr.modulo=Pr.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(H0+"NaN");return r.s?(ts=!1,t=um(r,e,0,1).times(e),ts=!0,r.minus(t)):fa(new n(r),i)};Pr.naturalExponential=Pr.exp=function(){return K0e(this)};Pr.naturalLogarithm=Pr.ln=function(){return hb(this)};Pr.negated=Pr.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Pr.plus=Pr.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?q0e(t,e):V0e(t,(e.s=-e.s,e))};Pr.precision=Pr.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(KA+e);if(t=po(i)+1,n=i.d.length-1,r=n*Fa+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};Pr.squareRoot=Pr.sqrt=function(){var e,t,r,n,i,a,s,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(H0+"NaN")}for(e=po(l),ts=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=Of(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=by((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new c(t)):n=new c(i.toString()),r=c.precision,i=s=r+3;;)if(a=n,n=a.plus(um(l,a,s+2)).times(.5),Of(a.d).slice(0,s)===(t=Of(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(fa(a,r+1,0),a.times(a).eq(l)){n=a;break}}else if(t!="9999")break;s+=4}return ts=!0,fa(n,r)};Pr.times=Pr.mul=function(e){var t,r,n,i,a,s,l,c,u,d=this,f=d.constructor,m=d.d,g=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,r=d.e+e.e,c=m.length,u=g.length,c=0;){for(t=0,i=c+n;i>n;)l=a[i]+g[n]*m[i-n-1]+t,a[i--]=l%tl|0,t=l/tl|0;a[i]=(a[i]+t)%tl|0}for(;!a[--s];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,ts?fa(e,f.precision):e};Pr.toDecimalPlaces=Pr.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(rh(e,0,yy),t===void 0?t=n.rounding:rh(t,0,8),fa(r,e+po(r)+1,t))};Pr.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=x1(n,!0):(rh(e,0,yy),t===void 0?t=i.rounding:rh(t,0,8),n=fa(new i(n),e+1,t),r=x1(n,!0,e+1)),r};Pr.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?x1(i):(rh(e,0,yy),t===void 0?t=a.rounding:rh(t,0,8),n=fa(new a(i),e+po(i)+1,t),r=x1(n.abs(),!1,e+po(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Pr.toInteger=Pr.toint=function(){var e=this,t=e.constructor;return fa(new t(e),po(e)+1,t.rounding)};Pr.toNumber=function(){return+this};Pr.toPower=Pr.pow=function(e){var t,r,n,i,a,s,l=this,c=l.constructor,u=12,d=+(e=new c(e));if(!e.s)return new c(Tu);if(l=new c(l),!l.s){if(e.s<1)throw Error(H0+"Infinity");return l}if(l.eq(Tu))return l;if(n=c.precision,e.eq(Tu))return fa(l,n);if(t=e.e,r=e.d.length-1,s=t>=r,a=l.s,s){if((r=d<0?-d:d)<=G0e){for(i=new c(Tu),t=Math.ceil(n/Fa+4),ts=!1;r%2&&(i=i.times(l),AH(i.d,t)),r=by(r/2),r!==0;)l=l.times(l),AH(l.d,t);return ts=!0,e.s<0?new c(Tu).div(i):fa(i,n)}}else if(a<0)throw Error(H0+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,ts=!1,i=e.times(hb(l,n+u)),ts=!0,i=K0e(i),i.s=a,i};Pr.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=po(i),n=x1(i,r<=a.toExpNeg||r>=a.toExpPos)):(rh(e,1,yy),t===void 0?t=a.rounding:rh(t,0,8),i=fa(new a(i),e,t),r=po(i),n=x1(i,e<=r||r<=a.toExpNeg,e)),n};Pr.toSignificantDigits=Pr.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(rh(e,1,yy),t===void 0?t=n.rounding:rh(t,0,8)),fa(new n(r),e,t)};Pr.toString=Pr.valueOf=Pr.val=Pr.toJSON=Pr[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=po(e),r=e.constructor;return x1(e,t<=r.toExpNeg||t>=r.toExpPos)};function q0e(e,t){var r,n,i,a,s,l,c,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),ts?fa(t,f):t;if(c=e.d,u=t.d,s=e.e,i=t.e,c=c.slice(),a=s-i,a){for(a<0?(n=c,a=-a,l=u.length):(n=u,i=s,l=c.length),s=Math.ceil(f/Fa),l=s>l?s+1:l+1,a>l&&(a=l,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(l=c.length,a=u.length,l-a<0&&(a=l,n=u,u=c,c=n),r=0;a;)r=(c[--a]=c[a]+u[a]+r)/tl|0,c[a]%=tl;for(r&&(c.unshift(r),++i),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=i,ts?fa(t,f):t}function rh(e,t,r){if(e!==~~e||er)throw Error(KA+e)}function Of(e){var t,r,n,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,t=1;ts?1:-1;else for(l=c=0;li[l]?1:-1;break}return c}function r(n,i,a){for(var s=0;a--;)n[a]-=s,s=n[a]1;)n.shift()}return function(n,i,a,s){var l,c,u,d,f,m,g,A,v,b,E,I,S,_,B,T,P,O,z=n.constructor,L=n.s==i.s?1:-1,W=n.d,R=i.d;if(!n.s)return new z(n);if(!i.s)throw Error(H0+"Division by zero");for(c=n.e-i.e,P=R.length,B=W.length,g=new z(L),A=g.d=[],u=0;R[u]==(W[u]||0);)++u;if(R[u]>(W[u]||0)&&--c,a==null?I=a=z.precision:s?I=a+(po(n)-po(i))+1:I=a,I<0)return new z(0);if(I=I/Fa+2|0,u=0,P==1)for(d=0,R=R[0],I++;(u1&&(R=e(R,d),W=e(W,d),P=R.length,B=W.length),_=P,v=W.slice(0,P),b=v.length;b=tl/2&&++T;do d=0,l=t(R,v,P,b),l<0?(E=v[0],P!=b&&(E=E*tl+(v[1]||0)),d=E/T|0,d>1?(d>=tl&&(d=tl-1),f=e(R,d),m=f.length,b=v.length,l=t(f,v,m,b),l==1&&(d--,r(f,P16)throw Error(Q9+po(e));if(!e.s)return new d(Tu);for(ts=!1,l=f,s=new d(.03125);e.abs().gte(.1);)e=e.times(s),u+=5;for(n=Math.log(bA(2,u))/Math.LN10*2+5|0,l+=n,r=i=a=new d(Tu),d.precision=l;;){if(i=fa(i.times(e),l),r=r.times(++c),s=a.plus(um(i,r,l)),Of(s.d).slice(0,l)===Of(a.d).slice(0,l)){for(;u--;)a=fa(a.times(a),l);return d.precision=f,t==null?(ts=!0,fa(a,f)):a}a=s}}function po(e){for(var t=e.e*Fa,r=e.d[0];r>=10;r/=10)t++;return t}function Yk(e,t,r){if(t>e.LN10.sd())throw ts=!0,r&&(e.precision=r),Error(H0+"LN10 precision limit exceeded");return fa(new e(e.LN10),t)}function Fp(e){for(var t="";e--;)t+="0";return t}function hb(e,t){var r,n,i,a,s,l,c,u,d,f=1,m=10,g=e,A=g.d,v=g.constructor,b=v.precision;if(g.s<1)throw Error(H0+(g.s?"NaN":"-Infinity"));if(g.eq(Tu))return new v(0);if(t==null?(ts=!1,u=b):u=t,g.eq(10))return t==null&&(ts=!0),Yk(v,u);if(u+=m,v.precision=u,r=Of(A),n=r.charAt(0),a=po(g),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)g=g.times(e),r=Of(g.d),n=r.charAt(0),f++;a=po(g),n>1?(g=new v("0."+r),a++):g=new v(n+"."+r.slice(1))}else return c=Yk(v,u+2,b).times(a+""),g=hb(new v(n+"."+r.slice(1)),u-m).plus(c),v.precision=b,t==null?(ts=!0,fa(g,b)):g;for(l=s=g=um(g.minus(Tu),g.plus(Tu),u),d=fa(g.times(g),u),i=3;;){if(s=fa(s.times(d),u),c=l.plus(um(s,new v(i),u)),Of(c.d).slice(0,u)===Of(l.d).slice(0,u))return l=l.times(2),a!==0&&(l=l.plus(Yk(v,u+2,b).times(a+""))),l=um(l,new v(f),u),v.precision=b,t==null?(ts=!0,fa(l,b)):l;l=c,i+=2}}function gH(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=by(r/Fa),e.d=[],n=(r+1)%Fa,r<0&&(n+=Fa),nBI||e.e<-BI))throw Error(Q9+r)}else e.s=0,e.e=0,e.d=[0];return e}function fa(e,t,r){var n,i,a,s,l,c,u,d,f=e.d;for(s=1,a=f[0];a>=10;a/=10)s++;if(n=t-s,n<0)n+=Fa,i=t,u=f[d=0];else{if(d=Math.ceil((n+1)/Fa),a=f.length,d>=a)return e;for(u=a=f[d],s=1;a>=10;a/=10)s++;n%=Fa,i=n-Fa+s}if(r!==void 0&&(a=bA(10,s-i-1),l=u/a%10|0,c=t<0||f[d+1]!==void 0||u%a,c=r<4?(l||c)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||c||r==6&&(n>0?i>0?u/bA(10,s-i):0:f[d-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return c?(a=po(e),f.length=1,t=t-a-1,f[0]=bA(10,(Fa-t%Fa)%Fa),e.e=by(-t/Fa)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=d,a=1,d--):(f.length=d+1,a=bA(10,Fa-n),f[d]=i>0?(u/bA(10,s-i)%bA(10,i)|0)*a:0),c)for(;;)if(d==0){(f[0]+=a)==tl&&(f[0]=1,++e.e);break}else{if(f[d]+=a,f[d]!=tl)break;f[d--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(ts&&(e.e>BI||e.e<-BI))throw Error(Q9+po(e));return e}function V0e(e,t){var r,n,i,a,s,l,c,u,d,f,m=e.constructor,g=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),ts?fa(t,g):t;if(c=e.d,f=t.d,n=t.e,u=e.e,c=c.slice(),s=u-n,s){for(d=s<0,d?(r=c,s=-s,l=f.length):(r=f,n=u,l=c.length),i=Math.max(Math.ceil(g/Fa),l)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=c.length,l=f.length,d=i0;--i)c[l++]=0;for(i=f.length;i>s;){if(c[--i]0?a=a.charAt(0)+"."+a.slice(1)+Fp(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Fp(-i-1)+a,r&&(n=r-s)>0&&(a+=Fp(n))):i>=s?(a+=Fp(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+Fp(n))):((n=i+1)0&&(i+1===s&&(a+="."),a+=Fp(n))),e.s<0?"-"+a:a}function AH(e,t){if(e.length>t)return e.length=t,!0}function Y0e(e){var t,r,n;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(KA+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return gH(s,a.toString())}else if(typeof a!="string")throw Error(KA+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,OLe.test(a))gH(s,a);else throw Error(KA+a)}if(i.prototype=Pr,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Y0e,i.config=i.set=RLe,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(KA+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(KA+r+": "+n);return this}var L9=Y0e(PLe);Tu=new L9(1);const Ji=L9;var FLe=e=>e,Z0e={},J0e=e=>e===Z0e,vH=e=>function t(){return arguments.length===0||arguments.length===1&&J0e(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},X0e=(e,t)=>e===1?t:vH(function(){for(var r=arguments.length,n=new Array(r),i=0;is!==Z0e).length;return a>=e?t(...n):X0e(e-a,vH(function(){for(var s=arguments.length,l=new Array(s),c=0;cJ0e(d)?l.shift():d);return t(...u,...l)}))}),MLe=e=>X0e(e.length,e),LD=(e,t)=>{for(var r=[],n=e;nArray.isArray(t)?t.map(e):Object.keys(t).map(r=>t[r]).map(e)),LLe=function(){for(var t=arguments.length,r=new Array(t),n=0;nc(l),a(...arguments))}};function ede(e){var t;return e===0?t=1:t=Math.floor(new Ji(e).abs().log(10).toNumber())+1,t}function tde(e,t,r){for(var n=new Ji(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var rde=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},nde=(e,t,r)=>{if(e.lte(0))return new Ji(0);var n=ede(e.toNumber()),i=new Ji(10).pow(n),a=e.div(i),s=n!==1?.05:.1,l=new Ji(Math.ceil(a.div(s).toNumber())).add(r).mul(s),c=l.mul(i);return t?new Ji(c.toNumber()):new Ji(Math.ceil(c.toNumber()))},ULe=(e,t,r)=>{var n=new Ji(1),i=new Ji(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Ji(10).pow(ede(e)-1),i=new Ji(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Ji(Math.floor(e)))}else e===0?i=new Ji(Math.floor((t-1)/2)):r||(i=new Ji(Math.floor(e)));var s=Math.floor((t-1)/2),l=LLe(QLe(c=>i.add(new Ji(c-s).mul(n)).toNumber()),LD);return l(0,t)},ide=function(t,r,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-t)/(n-1)))return{step:new Ji(0),tickMin:new Ji(0),tickMax:new Ji(0)};var s=nde(new Ji(r).sub(t).div(n-1),i,a),l;t<=0&&r>=0?l=new Ji(0):(l=new Ji(t).add(r).div(2),l=l.sub(new Ji(l).mod(s)));var c=Math.ceil(l.sub(t).div(s).toNumber()),u=Math.ceil(new Ji(r).sub(l).div(s).toNumber()),d=c+u+1;return d>n?ide(t,r,n,i,a+1):(d0?u+(n-d):u,c=r>0?c:c+(n-d)),{step:s,tickMin:l.sub(new Ji(c).mul(s)),tickMax:l.add(new Ji(u).mul(s))})},$Le=function(t){var[r,n]=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),[l,c]=rde([r,n]);if(l===-1/0||c===1/0){var u=c===1/0?[l,...LD(0,i-1).map(()=>1/0)]:[...LD(0,i-1).map(()=>-1/0),c];return r>n?u.reverse():u}if(l===c)return ULe(l,i,a);var{step:d,tickMin:f,tickMax:m}=ide(l,c,s,a,0),g=tde(f,m.add(new Ji(.1).mul(d)),d);return r>n?g.reverse():g},zLe=function(t,r){var[n,i]=t,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[s,l]=rde([n,i]);if(s===-1/0||l===1/0)return[n,i];if(s===l)return[s];var c=Math.max(r,2),u=nde(new Ji(l).sub(s).div(c-1),a,0),d=[...tde(new Ji(s),new Ji(l),u),l];return a===!1&&(d=d.map(f=>Math.round(f))),n>i?d.reverse():d},ade=e=>e.rootProps.maxBarSize,HLe=e=>e.rootProps.barGap,sde=e=>e.rootProps.barCategoryGap,WLe=e=>e.rootProps.barSize,Gw=e=>e.rootProps.stackOffset,ode=e=>e.rootProps.reverseStackOrder,U9=e=>e.options.chartName,$9=e=>e.rootProps.syncId,lde=e=>e.rootProps.syncMethod,z9=e=>e.options.eventEmitter,mo={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Zh={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},ju={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},N6=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},GLe={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Zh.angleAxisId,includeHidden:!1,name:void 0,reversed:Zh.reversed,scale:Zh.scale,tick:Zh.tick,tickCount:void 0,ticks:void 0,type:Zh.type,unit:void 0},qLe={allowDataOverflow:ju.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:ju.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:ju.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:ju.scale,tick:ju.tick,tickCount:ju.tickCount,ticks:void 0,type:ju.type,unit:void 0},KLe={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:Zh.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Zh.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Zh.scale,tick:Zh.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},VLe={allowDataOverflow:ju.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:ju.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:ju.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:ju.scale,tick:ju.tick,tickCount:ju.tickCount,ticks:void 0,type:"category",unit:void 0},H9=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?KLe:GLe,W9=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?VLe:qLe,k6=e=>e.polarOptions,G9=dt([jm,Dm,To],s0e),cde=dt([k6,G9],(e,t)=>{if(e!=null)return ec(e.innerRadius,t,0)}),ude=dt([k6,G9],(e,t)=>{if(e!=null)return ec(e.outerRadius,t,t*.8)}),YLe=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},dde=dt([k6],YLe);dt([H9,dde],N6);var fde=dt([G9,cde,ude],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});dt([W9,fde],N6);var hde=dt([xi,k6,cde,ude,jm,Dm],(e,t,r,n,i,a)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:s,cy:l,startAngle:c,endAngle:u}=t;return{cx:ec(s,i,i/2),cy:ec(l,a,a/2),innerRadius:r,outerRadius:n,startAngle:c,endAngle:u,clockWise:!1}}}),as=(e,t)=>t,qw=(e,t,r)=>r;function q9(e){return e?.id}function mde(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=r,s=new Map;return e.forEach(l=>{var c,u=(c=l.data)!==null&&c!==void 0?c:n;if(!(u==null||u.length===0)){var d=q9(l);u.forEach((f,m)=>{var g=a==null||i?m:String(na(f,a,null)),A=na(f,l.dataKey,0),v;s.has(g)?v=s.get(g):v={},Object.assign(v,{[d]:A}),s.set(g,v)})}}),Array.from(s.values())}function _6(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var j6=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function D6(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function ZLe(e,t){if(e.length===t.length){for(var r=0;r{var t=xi(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},wy=e=>e.tooltip.settings.axisId;function xH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function NI(e){for(var t=1;te.cartesianAxis.xAxis[t],Om=(e,t)=>{var r=pde(e,t);return r??Zo},Jo={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:UD,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:Mw},gde=(e,t)=>e.cartesianAxis.yAxis[t],Rm=(e,t)=>{var r=gde(e,t);return r??Jo},tUe={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},K9=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??tUe},Es=(e,t,r)=>{switch(t){case"xAxis":return Om(e,r);case"yAxis":return Rm(e,r);case"zAxis":return K9(e,r);case"angleAxis":return H9(e,r);case"radiusAxis":return W9(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},rUe=(e,t,r)=>{switch(t){case"xAxis":return Om(e,r);case"yAxis":return Rm(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Kw=(e,t,r)=>{switch(t){case"xAxis":return Om(e,r);case"yAxis":return Rm(e,r);case"angleAxis":return H9(e,r);case"radiusAxis":return W9(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Ade=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function V9(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var T6=e=>e.graphicalItems.cartesianItems,nUe=dt([as,qw],V9),Y9=(e,t,r)=>e.filter(r).filter(n=>t?.includeHidden===!0?!0:!n.hide),Vw=dt([T6,Es,nUe],Y9,{memoizeOptions:{resultEqualityCheck:D6}}),vde=dt([Vw],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(_6)),xde=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),iUe=dt([Vw],xde),Z9=e=>e.map(t=>t.data).filter(Boolean).flat(1),aUe=dt([Vw],Z9,{memoizeOptions:{resultEqualityCheck:D6}}),J9=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},X9=dt([aUe,M9],J9),eR=(e,t,r)=>t?.dataKey!=null?e.map(n=>({value:na(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:na(i,n)}))):e.map(n=>({value:n})),P6=dt([X9,Es,Vw],eR);function yde(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function bE(e){if(eh(e)||e instanceof Date){var t=Number(e);if(ys(t))return t}}function yH(e){if(Array.isArray(e)){var t=[bE(e[0]),bE(e[1])];return lg(t)?t:void 0}var r=bE(e);if(r!=null)return[r,r]}function wm(e){return e.map(bE).filter(XPe)}function sUe(e,t,r){return!r||typeof t!="number"||Fd(t)?[]:r.length?wm(r.flatMap(n=>{var i=na(e,n.dataKey),a,s;if(Array.isArray(i)?[a,s]=i:a=s=i,!(!ys(a)||!ys(s)))return[t-a,t+s]})):[]}var Ro=e=>{var t=Oo(e),r=wy(e);return Kw(e,t,r)},Yw=dt([Ro],e=>e?.dataKey),oUe=dt([vde,M9,Ro],mde),bde=(e,t,r,n)=>{var i={},a=t.reduce((s,l)=>{if(l.stackId==null)return s;var c=s[l.stackId];return c==null&&(c=[]),c.push(l),s[l.stackId]=c,s},i);return Object.fromEntries(Object.entries(a).map(s=>{var[l,c]=s,u=n?[...c].reverse():c,d=u.map(q9);return[l,{stackedData:C9e(e,d,r),graphicalItems:u}]}))},$D=dt([oUe,vde,Gw,ode],bde),wde=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:a}=t;if(n==null&&r!=="zAxis"){var s=k9e(e,i,a);if(!(s!=null&&s[0]===0&&s[1]===0))return s}},lUe=dt([Es],e=>e.allowDataOverflow),tR=e=>{var t;if(e==null||!("domain"in e))return UD;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=wm(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:UD},rR=dt([Es],tR),nR=dt([rR,lUe],W0e),cUe=dt([$D,Pm,as,nR],wde,{memoizeOptions:{resultEqualityCheck:j6}}),O6=e=>e.errorBars,uUe=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>yde(r,n)),kI=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var a,s;if(r.length>0&&e.forEach(l=>{r.forEach(c=>{var u,d,f=(u=n[c.id])===null||u===void 0?void 0:u.filter(E=>yde(i,E)),m=na(l,(d=t.dataKey)!==null&&d!==void 0?d:c.dataKey),g=sUe(l,m,f);if(g.length>=2){var A=Math.min(...g),v=Math.max(...g);(a==null||As)&&(s=v)}var b=yH(m);b!=null&&(a=a==null?b[0]:Math.min(a,b[0]),s=s==null?b[1]:Math.max(s,b[1]))})}),t?.dataKey!=null&&e.forEach(l=>{var c=yH(na(l,t.dataKey));c!=null&&(a=a==null?c[0]:Math.min(a,c[0]),s=s==null?c[1]:Math.max(s,c[1]))}),ys(a)&&ys(s))return[a,s]},dUe=dt([X9,Es,iUe,O6,as],iR,{memoizeOptions:{resultEqualityCheck:j6}});function fUe(e){var{value:t}=e;if(eh(t)||t instanceof Date)return t}var hUe=(e,t,r)=>{var n=e.map(fUe).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&Mce(n))?u0e(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},Ede=e=>e.referenceElements.dots,Ey=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),mUe=dt([Ede,as,qw],Ey),Cde=e=>e.referenceElements.areas,pUe=dt([Cde,as,qw],Ey),Ide=e=>e.referenceElements.lines,gUe=dt([Ide,as,qw],Ey),Sde=(e,t)=>{if(e!=null){var r=wm(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},AUe=dt(mUe,as,Sde),Bde=(e,t)=>{if(e!=null){var r=wm(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},vUe=dt([pUe,as],Bde);function xUe(e){var t;if(e.x!=null)return wm([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:wm(r)}function yUe(e){var t;if(e.y!=null)return wm([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:wm(r)}var Nde=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?xUe(n):yUe(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},bUe=dt([gUe,as],Nde),wUe=dt(AUe,bUe,vUe,(e,t,r)=>kI(e,r,t)),aR=(e,t,r,n,i,a,s,l)=>{if(r!=null)return r;var c=s==="vertical"&&l==="xAxis"||s==="horizontal"&&l==="yAxis",u=c?kI(n,a,i):kI(a,i);return TLe(t,u,e.allowDataOverflow)},EUe=dt([Es,rR,nR,cUe,dUe,wUe,xi,as],aR,{memoizeOptions:{resultEqualityCheck:j6}}),CUe=[0,1],sR=(e,t,r,n,i,a,s)=>{if(!((e==null||r==null||r.length===0)&&s===void 0)){var{dataKey:l,type:c}=e,u=Bg(t,a);if(u&&l==null){var d;return u0e(0,(d=r?.length)!==null&&d!==void 0?d:0)}return c==="category"?hUe(n,e,u):i==="expand"?CUe:s}},oR=dt([Es,xi,X9,P6,Gw,as,EUe],sR),kde=(e,t,r,n,i)=>{if(e!=null){var{scale:a,type:s}=e;if(a==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":s==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?"point":s==="category"?"band":"linear";if(typeof a=="string"){var l="scale".concat(Dw(a));return l in g2?l:"point"}}},Cy=dt([Es,xi,Ade,U9,as],kde);function IUe(e){if(e!=null){if(e in g2)return g2[e]();var t="scale".concat(Dw(e));if(t in g2)return g2[t]()}}function lR(e,t,r,n){if(!(r==null||n==null)){if(typeof e.scale=="function")return e.scale.copy().domain(r).range(n);var i=IUe(t);if(i!=null){var a=i.domain(r).range(n);return x9e(a),a}}}var cR=(e,t,r)=>{var n=tR(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&lg(e))return $Le(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&lg(e))return zLe(e,t.tickCount,t.allowDecimals)}},uR=dt([oR,Kw,Cy],cR),dR=(e,t,r,n)=>{if(n!=="angleAxis"&&e?.type==="number"&&lg(t)&&Array.isArray(r)&&r.length>0){var i=t[0],a=r[0],s=t[1],l=r[r.length-1];return[Math.min(i,a),Math.max(s,l)]}return t},SUe=dt([Es,oR,uR,as],dR),BUe=dt(P6,Es,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(wm(e.map(f=>f.value))).sort((f,m)=>f-m),i=n[0],a=n[n.length-1];if(i==null||a==null)return 1/0;var s=a-i;if(s===0)return 1/0;for(var l=0;li,(e,t,r,n,i)=>{if(!ys(e))return 0;var a=t==="vertical"?n.height:n.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var s=ec(r,e*a),l=e*a/2;return l-s-(l-s)/a*s}return 0}),NUe=(e,t,r)=>{var n=Om(e,t);return n==null||typeof n.padding!="string"?0:_de(e,"xAxis",t,r,n.padding)},kUe=(e,t,r)=>{var n=Rm(e,t);return n==null||typeof n.padding!="string"?0:_de(e,"yAxis",t,r,n.padding)},_Ue=dt(Om,NUe,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),jUe=dt(Rm,kUe,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),DUe=dt([To,_Ue,m6,h6,(e,t,r)=>r],(e,t,r,n,i)=>{var{padding:a}=n;return i?[a.left,r.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),TUe=dt([To,xi,jUe,m6,h6,(e,t,r)=>r],(e,t,r,n,i,a)=>{var{padding:s}=i;return a?[n.height-s.bottom,s.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),Zw=(e,t,r,n)=>{var i;switch(t){case"xAxis":return DUe(e,r,n);case"yAxis":return TUe(e,r,n);case"zAxis":return(i=K9(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return dde(e);case"radiusAxis":return fde(e,r);default:return}},jde=dt([Es,Zw],N6),R6=dt([Es,Cy,SUe,jde],lR);dt([Vw,O6,as],uUe);function Dde(e,t){return e.idt.id?1:0}var F6=(e,t)=>t,M6=(e,t,r)=>r,PUe=dt(d6,F6,M6,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(Dde)),OUe=dt(f6,F6,M6,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(Dde)),Tde=(e,t)=>({width:e.width,height:t.height}),RUe=(e,t)=>{var r=typeof t.width=="number"?t.width:Mw;return{width:r,height:e.height}},Pde=dt(To,Om,Tde),FUe=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},MUe=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},QUe=dt(Dm,To,PUe,F6,M6,(e,t,r,n,i)=>{var a={},s;return r.forEach(l=>{var c=Tde(t,l);s==null&&(s=FUe(t,n,e));var u=n==="top"&&!i||n==="bottom"&&i;a[l.id]=s-Number(u)*c.height,s+=(u?-1:1)*c.height}),a}),LUe=dt(jm,To,OUe,F6,M6,(e,t,r,n,i)=>{var a={},s;return r.forEach(l=>{var c=RUe(t,l);s==null&&(s=MUe(t,n,e));var u=n==="left"&&!i||n==="right"&&i;a[l.id]=s-Number(u)*c.width,s+=(u?-1:1)*c.width}),a}),UUe=(e,t)=>{var r=Om(e,t);if(r!=null)return QUe(e,r.orientation,r.mirror)},$Ue=dt([To,Om,UUe,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r?.[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),zUe=(e,t)=>{var r=Rm(e,t);if(r!=null)return LUe(e,r.orientation,r.mirror)},HUe=dt([To,Rm,zUe,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r?.[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),Ode=dt(To,Rm,(e,t)=>{var r=typeof t.width=="number"?t.width:Mw;return{width:r,height:e.height}}),bH=(e,t,r)=>{switch(t){case"xAxis":return Pde(e,r).width;case"yAxis":return Ode(e,r).height;default:return}},Rde=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:a,dataKey:s}=r,l=Bg(e,n),c=t.map(u=>u.value);if(s&&l&&a==="category"&&i&&Mce(c))return c}},fR=dt([xi,P6,Es,as],Rde),Fde=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:a}=r,s=Bg(e,n);if(s&&(i==="number"||a!=="auto"))return t.map(l=>l.value)}},hR=dt([xi,P6,Kw,as],Fde),wH=dt([xi,rUe,Cy,R6,fR,hR,Zw,uR,as],(e,t,r,n,i,a,s,l,c)=>{if(t!=null){var u=Bg(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:a,duplicateDomain:i,isCategorical:u,niceTicks:l,range:s,realScaleType:r,scale:n}}}),WUe=(e,t,r,n,i,a,s,l,c)=>{if(!(t==null||n==null)){var u=Bg(e,c),{type:d,ticks:f,tickCount:m}=t,g=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,A=d==="category"&&n.bandwidth?n.bandwidth()/g:0;A=c==="angleAxis"&&a!=null&&a.length>=2?rl(a[0]-a[1])*2*A:A;var v=f||i;if(v){var b=v.map((E,I)=>{var S=s?s.indexOf(E):E;return{index:I,coordinate:n(S)+A,value:E,offset:A}});return b.filter(E=>ys(E.coordinate))}return u&&l?l.map((E,I)=>({coordinate:n(E)+A,value:E,index:I,offset:A})).filter(E=>ys(E.coordinate)):n.ticks?n.ticks(m).map(E=>({coordinate:n(E)+A,value:E,offset:A})):n.domain().map((E,I)=>({coordinate:n(E)+A,value:s?s[E]:E,index:I,offset:A}))}},Mde=dt([xi,Kw,Cy,R6,uR,Zw,fR,hR,as],WUe),GUe=(e,t,r,n,i,a,s)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var l=Bg(e,s),{tickCount:c}=t,u=0;return u=s==="angleAxis"&&n?.length>=2?rl(n[0]-n[1])*2*u:u,l&&a?a.map((d,f)=>({coordinate:r(d)+u,value:d,index:f,offset:u})):r.ticks?r.ticks(c).map(d=>({coordinate:r(d)+u,value:d,offset:u})):r.domain().map((d,f)=>({coordinate:r(d)+u,value:i?i[d]:d,index:f,offset:u}))}},cg=dt([xi,Kw,R6,Zw,fR,hR,as],GUe),ug=dt(Es,R6,(e,t)=>{if(!(e==null||t==null))return NI(NI({},e),{},{scale:t})}),qUe=dt([Es,Cy,oR,jde],lR);dt((e,t,r)=>K9(e,r),qUe,(e,t)=>{if(!(e==null||t==null))return NI(NI({},e),{},{scale:t})});var KUe=dt([xi,d6,f6],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),Qde=e=>e.options.defaultTooltipEventType,Lde=e=>e.options.validateTooltipEventTypes;function Ude(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function mR(e,t){var r=Qde(e),n=Lde(e);return Ude(t,r,n)}function VUe(e){return Mr(t=>mR(t,e))}var $de=(e,t)=>{var r,n=Number(t);if(!(Fd(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},YUe=e=>e.tooltip.settings,Lp={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},ZUe={itemInteraction:{click:Lp,hover:Lp},axisInteraction:{click:Lp,hover:Lp},keyboardInteraction:Lp,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},zde=Xc({name:"tooltip",initialState:ZUe,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Za()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,i=_d(e).tooltipItemPayloads.indexOf(r);i>-1&&(e.tooltipItemPayloads[i]=n)},prepare:Za()},removeTooltipEntrySettings:{reducer(e,t){var r=_d(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:Za()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:JUe,replaceTooltipEntrySettings:XUe,removeTooltipEntrySettings:e$e,setTooltipSettingsState:t$e,setActiveMouseOverItemIndex:Hde,mouseLeaveItem:r$e,mouseLeaveChart:Wde,setActiveClickItemIndex:n$e,setMouseOverAxisIndex:Gde,setMouseClickAxisIndex:i$e,setSyncInteraction:zD,setKeyboardInteraction:HD}=zde.actions,a$e=zde.reducer;function EH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function B4(e){for(var t=1;t{if(t==null)return Lp;var i=c$e(e,t,r);if(i==null)return Lp;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(u$e(i)){if(a)return B4(B4({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return B4(B4({},Lp),{},{coordinate:i.coordinate})};function d$e(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function f$e(e,t){var r=d$e(e),n=t[0],i=t[1];if(r===void 0)return!1;var a=Math.min(n,i),s=Math.max(n,i);return r>=a&&r<=s}function h$e(e,t,r){if(r==null||t==null)return!0;var n=na(e,t);return n==null||!lg(r)?!0:f$e(n,r)}var pR=(e,t,r,n)=>{var i=e?.index;if(i==null)return null;var a=Number(i);if(!ys(a))return i;var s=0,l=1/0;t.length>0&&(l=t.length-1);var c=Math.max(s,Math.min(a,l)),u=t[c];return u==null||h$e(u,r,n)?String(c):null},Kde=(e,t,r,n,i,a,s,l)=>{if(!(a==null||l==null)){var c=s[0],u=c==null?void 0:l(c.positions,a);if(u!=null)return u;var d=i?.[Number(a)];if(d)return r==="horizontal"?{x:d.coordinate,y:(n.top+t)/2}:{x:(n.left+e)/2,y:d.coordinate}}},Vde=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(r==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,i==null&&n!=null){var a=e.tooltipItemPayloads[0];return a!=null?[a]:[]}return e.tooltipItemPayloads.filter(s=>{var l;return((l=s.settings)===null||l===void 0?void 0:l.graphicalItemId)===i})},Jw=e=>e.options.tooltipPayloadSearcher,Iy=e=>e.tooltip;function CH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function IH(e){for(var t=1;t{if(!(t==null||a==null)){var{chartData:l,computedData:c,dataStartIndex:u,dataEndIndex:d}=r,f=[];return e.reduce((m,g)=>{var A,{dataDefinedOnItem:v,settings:b}=g,E=A$e(v,l),I=Array.isArray(E)?Due(E,u,d):E,S=(A=b?.dataKey)!==null&&A!==void 0?A:n,_=b?.nameKey,B;if(n&&Array.isArray(I)&&!Array.isArray(I[0])&&s==="axis"?B=Qce(I,n,i):B=a(I,t,c,_),Array.isArray(B))B.forEach(P=>{var O=IH(IH({},b),{},{name:P.name,unit:P.unit,color:void 0,fill:void 0});m.push(N$({tooltipEntrySettings:O,dataKey:P.dataKey,payload:P.payload,value:na(P.payload,P.dataKey),name:P.name}))});else{var T;m.push(N$({tooltipEntrySettings:b,dataKey:S,payload:B,value:na(B,S),name:(T=na(B,_))!==null&&T!==void 0?T:b?.name}))}return m},f)}},gR=dt([Ro,xi,Ade,U9,Oo],kde),v$e=dt([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),x$e=dt([Oo,wy],V9),Sy=dt([v$e,Ro,x$e],Y9,{memoizeOptions:{resultEqualityCheck:D6}}),y$e=dt([Sy],e=>e.filter(_6)),b$e=dt([Sy],Z9,{memoizeOptions:{resultEqualityCheck:D6}}),By=dt([b$e,Pm],J9),w$e=dt([y$e,Pm,Ro],mde),AR=dt([By,Ro,Sy],eR),Zde=dt([Ro],tR),E$e=dt([Ro],e=>e.allowDataOverflow),Jde=dt([Zde,E$e],W0e),C$e=dt([Sy],e=>e.filter(_6)),I$e=dt([w$e,C$e,Gw,ode],bde),S$e=dt([I$e,Pm,Oo,Jde],wde),B$e=dt([Sy],xde),N$e=dt([By,Ro,B$e,O6,Oo],iR,{memoizeOptions:{resultEqualityCheck:j6}}),k$e=dt([Ede,Oo,wy],Ey),_$e=dt([k$e,Oo],Sde),j$e=dt([Cde,Oo,wy],Ey),D$e=dt([j$e,Oo],Bde),T$e=dt([Ide,Oo,wy],Ey),P$e=dt([T$e,Oo],Nde),O$e=dt([_$e,P$e,D$e],kI),R$e=dt([Ro,Zde,Jde,S$e,N$e,O$e,xi,Oo],aR),Xw=dt([Ro,xi,By,AR,Gw,Oo,R$e],sR),F$e=dt([Xw,Ro,gR],cR),M$e=dt([Ro,Xw,F$e,Oo],dR),Xde=e=>{var t=Oo(e),r=wy(e),n=!1;return Zw(e,t,r,n)},efe=dt([Ro,Xde],N6),tfe=dt([Ro,gR,M$e,efe],lR),Q$e=dt([xi,AR,Ro,Oo],Rde),L$e=dt([xi,AR,Ro,Oo],Fde),U$e=(e,t,r,n,i,a,s,l)=>{if(t){var{type:c}=t,u=Bg(e,l);if(n){var d=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,f=c==="category"&&n.bandwidth?n.bandwidth()/d:0;return f=l==="angleAxis"&&i!=null&&i?.length>=2?rl(i[0]-i[1])*2*f:f,u&&s?s.map((m,g)=>({coordinate:n(m)+f,value:m,index:g,offset:f})):n.domain().map((m,g)=>({coordinate:n(m)+f,value:a?a[m]:m,index:g,offset:f}))}}},Fm=dt([xi,Ro,gR,tfe,Xde,Q$e,L$e,Oo],U$e),vR=dt([Qde,Lde,YUe],(e,t,r)=>Ude(r.shared,e,t)),rfe=e=>e.tooltip.settings.trigger,xR=e=>e.tooltip.settings.defaultIndex,e5=dt([Iy,vR,rfe,xR],qde),dg=dt([e5,By,Yw,Xw],pR),nfe=dt([Fm,dg],$de),yR=dt([e5],e=>{if(e)return e.dataKey}),$$e=dt([e5],e=>{if(e)return e.graphicalItemId}),ife=dt([Iy,vR,rfe,xR],Vde),z$e=dt([jm,Dm,xi,To,Fm,xR,ife,Jw],Kde),H$e=dt([e5,z$e],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),W$e=dt([e5],e=>{var t;return(t=e?.active)!==null&&t!==void 0?t:!1}),G$e=dt([ife,dg,Pm,Yw,nfe,Jw,vR],Yde),q$e=dt([G$e],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function SH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function BH(e){for(var t=1;tMr(Ro),J$e=()=>{var e=Z$e(),t=Mr(Fm),r=Mr(tfe);return Fx(!e||!r?void 0:BH(BH({},e),{},{scale:r}),t)};function NH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Tv(e){for(var t=1;t{var i=t.find(a=>a&&a.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.chartY};if(e==="vertical")return{x:n.chartX,y:i.coordinate}}return{x:0,y:0}},nze=(e,t,r,n)=>{var i=t.find(u=>u&&u.index===r);if(i){if(e==="centric"){var a=i.coordinate,{radius:s}=n;return Tv(Tv(Tv({},n),ho(n.cx,n.cy,s,a)),{},{angle:a,radius:s})}var l=i.coordinate,{angle:c}=n;return Tv(Tv(Tv({},n),ho(n.cx,n.cy,l,c)),{},{angle:c,radius:l})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function ize(e,t){var{chartX:r,chartY:n}=e;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var afe=(e,t,r,n,i)=>{var a,s=(a=t?.length)!==null&&a!==void 0?a:0;if(s<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var l=0;l0?(c=r[l-1])===null||c===void 0?void 0:c.coordinate:(u=r[s-1])===null||u===void 0?void 0:u.coordinate,A=(d=r[l])===null||d===void 0?void 0:d.coordinate,v=l>=s-1?(f=r[0])===null||f===void 0?void 0:f.coordinate:(m=r[l+1])===null||m===void 0?void 0:m.coordinate,b=void 0;if(!(g==null||A==null||v==null))if(rl(A-g)!==rl(v-A)){var E=[];if(rl(v-A)===rl(i[1]-i[0])){b=v;var I=A+i[1]-i[0];E[0]=Math.min(I,(I+g)/2),E[1]=Math.max(I,(I+g)/2)}else{b=g;var S=v+i[1]-i[0];E[0]=Math.min(A,(S+A)/2),E[1]=Math.max(A,(S+A)/2)}var _=[Math.min(A,(b+A)/2),Math.max(A,(b+A)/2)];if(e>_[0]&&e<=_[1]||e>=E[0]&&e<=E[1]){var B;return(B=r[l])===null||B===void 0?void 0:B.index}}else{var T=Math.min(g,v),P=Math.max(g,v);if(e>(T+A)/2&&e<=(P+A)/2){var O;return(O=r[l])===null||O===void 0?void 0:O.index}}}else if(t)for(var z=0;z(L.coordinate+R.coordinate)/2||z>0&&z(L.coordinate+R.coordinate)/2&&e<=(L.coordinate+W.coordinate)/2)return L.index}}return-1},aze=()=>Mr(U9),bR=(e,t)=>t,sfe=(e,t,r)=>r,wR=(e,t,r,n)=>n,sze=dt(Fm,e=>r6(e,t=>t.coordinate)),ER=dt([Iy,bR,sfe,wR],qde),CR=dt([ER,By,Yw,Xw],pR),oze=(e,t,r)=>{if(t!=null){var n=Iy(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},ofe=dt([Iy,bR,sfe,wR],Vde),_I=dt([jm,Dm,xi,To,Fm,wR,ofe,Jw],Kde),lze=dt([ER,_I],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),lfe=dt([Fm,CR],$de),cze=dt([ofe,CR,Pm,Yw,lfe,Jw,bR],Yde),uze=dt([ER,CR],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),dze=(e,t,r,n,i,a,s)=>{if(!(!e||!r||!n||!i)&&ize(e,s)){var l=_9e(e,t),c=afe(l,a,i,r,n),u=rze(t,i,c,e);return{activeIndex:String(c),activeCoordinate:u}}},fze=(e,t,r,n,i,a,s)=>{if(!(!e||!n||!i||!a||!r)){var l=KFe(e,r);if(l){var c=j9e(l,t),u=afe(c,s,a,n,i),d=nze(t,a,u,l);return{activeIndex:String(u),activeCoordinate:d}}}},hze=(e,t,r,n,i,a,s,l)=>{if(!(!e||!t||!n||!i||!a))return t==="horizontal"||t==="vertical"?dze(e,t,n,i,a,s,l):fze(e,t,r,n,i,a,s)},mze=dt(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),pze=dt(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(mo)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:ZLe}});function kH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _H(e){for(var t=1;t_H(_H({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),xze)},bze=new Set(Object.values(mo));function wze(e){return bze.has(e)}var cfe=Xc({name:"zIndex",initialState:yze,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:Za()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!wze(r)&&delete e.zIndexMap[r])},prepare:Za()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:n,isPanorama:i}=t.payload;e.zIndexMap[r]?i?e.zIndexMap[r].panoramaElement=n:e.zIndexMap[r].element=n:e.zIndexMap[r]={consumers:0,element:i?void 0:n,panoramaElement:i?n:void 0}},prepare:Za()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:Za()}}}),{registerZIndexPortal:Eze,unregisterZIndexPortal:Cze,registerZIndexPortalElement:Ize,unregisterZIndexPortalElement:Sze}=cfe.actions,Bze=cfe.reducer;function eu(e){var{zIndex:t,children:r}=e,n=cRe(),i=n&&t!==void 0&&t!==0,a=ic(),s=Ba();w.useLayoutEffect(()=>i?(s(Eze({zIndex:t})),()=>{s(Cze({zIndex:t}))}):Tw,[s,t,i]);var l=Mr(c=>mze(c,t,a));return i?l?Sm.createPortal(r,l):null:r}function WD(){return WD=Object.assign?Object.assign.bind():function(e){for(var t=1;tw.useContext(ufe),Zk={exports:{}},DH;function Oze(){return DH||(DH=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,u,d){this.fn=c,this.context=u,this.once=d||!1}function a(c,u,d,f,m){if(typeof d!="function")throw new TypeError("The listener must be a function");var g=new i(d,f||c,m),A=r?r+u:u;return c._events[A]?c._events[A].fn?c._events[A]=[c._events[A],g]:c._events[A].push(g):(c._events[A]=g,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],d,f;if(this._eventsCount===0)return u;for(f in d=this._events)t.call(d,f)&&u.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},l.prototype.listeners=function(u){var d=r?r+u:u,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var m=0,g=f.length,A=new Array(g);m{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Qze=dfe.reducer,{createEventEmitter:Lze}=dfe.actions;function Uze(e){return e.tooltip.syncInteraction}var $ze={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},ffe=Xc({name:"chartData",initialState:$ze,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:PH,setDataStartEndIndexes:zze,setComputedData:XCt}=ffe.actions,Hze=ffe.reducer,Wze=["x","y"];function OH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pv(e){for(var t=1;tc.rootProps.className);w.useEffect(()=>{if(e==null)return Tw;var c=(u,d,f)=>{if(t!==f&&e===u){if(n==="index"){var m;if(s&&d!==null&&d!==void 0&&(m=d.payload)!==null&&m!==void 0&&m.coordinate&&d.payload.sourceViewBox){var g=d.payload.coordinate,{x:A,y:v}=g,b=Vze(g,Wze),{x:E,y:I,width:S,height:_}=d.payload.sourceViewBox,B=Pv(Pv({},b),{},{x:s.x+(S?(A-E)/S:0)*s.width,y:s.y+(_?(v-I)/_:0)*s.height});r(Pv(Pv({},d),{},{payload:Pv(Pv({},d.payload),{},{coordinate:B})}))}else r(d);return}if(i!=null){var T;if(typeof n=="function"){var P={activeTooltipIndex:d.payload.index==null?void 0:Number(d.payload.index),isTooltipActive:d.payload.active,activeIndex:d.payload.index==null?void 0:Number(d.payload.index),activeLabel:d.payload.label,activeDataKey:d.payload.dataKey,activeCoordinate:d.payload.coordinate},O=n(i,P);T=i[O]}else n==="value"&&(T=i.find(K=>String(K.value)===d.payload.label));var{coordinate:z}=d.payload;if(T==null||d.payload.active===!1||z==null||s==null){r(zD({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:L,y:W}=z,R=Math.min(L,s.x+s.width),$=Math.min(W,s.y+s.height),X={x:a==="horizontal"?T.coordinate:R,y:a==="horizontal"?$:T.coordinate},Z=zD({active:d.payload.active,coordinate:X,dataKey:d.payload.dataKey,index:String(T.index),label:d.payload.label,sourceViewBox:d.payload.sourceViewBox,graphicalItemId:d.payload.graphicalItemId});r(Z)}}};return mb.on(GD,c),()=>{mb.off(GD,c)}},[l,r,t,e,n,i,a,s])}function Jze(){var e=Mr($9),t=Mr(z9),r=Ba();w.useEffect(()=>{if(e==null)return Tw;var n=(i,a,s)=>{t!==s&&e===i&&r(zze(a))};return mb.on(TH,n),()=>{mb.off(TH,n)}},[r,t,e])}function Xze(){var e=Ba();w.useEffect(()=>{e(Lze())},[e]),Zze(),Jze()}function eHe(e,t,r,n,i,a){var s=Mr(g=>oze(g,e,t)),l=Mr(z9),c=Mr($9),u=Mr(lde),d=Mr(Uze),f=d?.active,m=p6();w.useEffect(()=>{if(!f&&c!=null&&l!=null){var g=zD({active:a,coordinate:r,dataKey:s,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:m,graphicalItemId:void 0});mb.emit(GD,c,g,l)}},[f,r,s,i,n,l,c,u,a,m])}function RH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function FH(e){for(var t=1;t{P(t$e({shared:I,trigger:S,axisId:T,active:i,defaultIndex:O}))},[P,I,S,T,i,O]);var z=p6(),L=e0e(),W=VUe(I),{activeIndex:R,isActive:$}=(t=Mr(ye=>uze(ye,W,S,O)))!==null&&t!==void 0?t:{},X=Mr(ye=>cze(ye,W,S,O)),Z=Mr(ye=>lfe(ye,W,S,O)),K=Mr(ye=>lze(ye,W,S,O)),q=X,Y=Pze(),ne=(r=i??$)!==null&&r!==void 0?r:!1,[ge,ae]=rue([q,ne]),pe=W==="axis"?Z:void 0;eHe(W,S,K,pe,R,ne);var _e=B??Y;if(_e==null||z==null||W==null)return null;var we=q??MH;ne||(we=MH),u&&we.length&&(we=Zce(we.filter(ye=>ye.value!=null&&(ye.hide!==!0||n.includeHidden)),m,iHe));var xe=we.length>0,Me=w.createElement(KRe,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:d,active:ne,coordinate:K,hasPayload:xe,offset:f,position:g,reverseDirection:A,useTranslate3d:v,viewBox:z,wrapperStyle:b,lastBoundingBox:ge,innerRef:ae,hasPortalFromProps:!!B},aHe(c,FH(FH({},n),{},{payload:we,label:pe,active:ne,activeIndex:R,coordinate:K,accessibilityLayer:L})));return w.createElement(w.Fragment,null,Sm.createPortal(Me,_e),ne&&w.createElement(Tze,{cursor:E,tooltipEventType:W,coordinate:K,payload:we,index:R}))}var t5=e=>null;t5.displayName="Cell";function lHe(e,t,r){return(t=cHe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cHe(e){var t=uHe(e,"string");return typeof t=="symbol"?t:t+""}function uHe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class dHe{constructor(t){lHe(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function QH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fHe(e){for(var t=1;t{try{var r=document.getElementById(UH);r||(r=document.createElement("span"),r.setAttribute("id",UH),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,AHe,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},I2=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||y6.isSsr)return{width:0,height:0};if(!hfe.enableCache)return $H(t,r);var n=vHe(t,r),i=LH.get(n);if(i)return i;var a=$H(t,r);return LH.set(n,a),a},mfe;function xHe(e,t,r){return(t=yHe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yHe(e){var t=bHe(e,"string");return typeof t=="symbol"?t:t+""}function bHe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zH=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,HH=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,wHe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,EHe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,CHe={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},IHe=["cm","mm","pt","pc","in","Q","px"];function SHe(e){return IHe.includes(e)}var Yv="NaN";function BHe(e,t){return e*CHe[t]}class jl{static parse(t){var r,[,n,i]=(r=EHe.exec(t))!==null&&r!==void 0?r:[];return n==null?jl.NaN:new jl(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Fd(t)&&(this.unit=""),r!==""&&!wHe.test(r)&&(this.num=NaN,this.unit=""),SHe(r)&&(this.num=BHe(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new jl(NaN,""):new jl(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new jl(NaN,""):new jl(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new jl(NaN,""):new jl(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new jl(NaN,""):new jl(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Fd(this.num)}}mfe=jl;xHe(jl,"NaN",new mfe(NaN,""));function pfe(e){if(e==null||e.includes(Yv))return Yv;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,a]=(r=zH.exec(t))!==null&&r!==void 0?r:[],s=jl.parse(n??""),l=jl.parse(a??""),c=i==="*"?s.multiply(l):s.divide(l);if(c.isNaN())return Yv;t=t.replace(zH,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,[,d,f,m]=(u=HH.exec(t))!==null&&u!==void 0?u:[],g=jl.parse(d??""),A=jl.parse(m??""),v=f==="+"?g.add(A):g.subtract(A);if(v.isNaN())return Yv;t=t.replace(HH,v.toString())}return t}var WH=/\(([^()]*)\)/;function NHe(e){for(var t=e,r;(r=WH.exec(t))!=null;){var[,n]=r;t=t.replace(WH,pfe(n))}return t}function kHe(e){var t=e.replace(/\s+/g,"");return t=NHe(t),t=pfe(t),t}function _He(e){try{return kHe(e)}catch{return Yv}}function Jk(e){var t=_He(e.slice(5,-1));return t===Yv?"":t}var jHe=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],DHe=["dx","dy","angle","className","breakAll"];function qD(){return qD=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{children:t,breakAll:r,style:n}=e;try{var i=[];ns(t)||(r?i=t.toString().split(""):i=t.toString().split(gfe));var a=i.map(l=>({word:l,width:I2(l,n).width})),s=r?0:I2(" ",n).width;return{wordsWithComputedWidth:a,spaceWidth:s}}catch{return null}};function PHe(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}var vfe=(e,t,r,n)=>e.reduce((i,a)=>{var{word:s,width:l}=a,c=i[i.length-1];if(c&&l!=null&&(t==null||n||c.width+l+re.reduce((t,r)=>t.width>r.width?t:r),OHe="…",qH=(e,t,r,n,i,a,s,l)=>{var c=e.slice(0,t),u=Afe({breakAll:r,style:n,children:c+OHe});if(!u)return[!1,[]];var d=vfe(u.wordsWithComputedWidth,a,s,l),f=d.length>i||xfe(d).width>Number(a);return[f,d]},RHe=(e,t,r,n,i)=>{var{maxLines:a,children:s,style:l,breakAll:c}=e,u=Rr(a),d=String(s),f=vfe(t,n,r,i);if(!u||i)return f;var m=f.length>a||xfe(f).width>Number(n);if(!m)return f;for(var g=0,A=d.length-1,v=0,b;g<=A&&v<=d.length-1;){var E=Math.floor((g+A)/2),I=E-1,[S,_]=qH(d,I,c,l,a,n,r,i),[B]=qH(d,E,c,l,a,n,r,i);if(!S&&!B&&(g=E+1),S&&B&&(A=E-1),!S&&B){b=_;break}v++}return b||f},KH=e=>{var t=ns(e)?[]:e.toString().split(gfe);return[{words:t,width:void 0}]},FHe=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:a,maxLines:s}=e;if((t||r)&&!y6.isSsr){var l,c,u=Afe({breakAll:a,children:n,style:i});if(u){var{wordsWithComputedWidth:d,spaceWidth:f}=u;l=d,c=f}else return KH(n);return RHe({breakAll:a,children:n,maxLines:s,style:i},l,c,t,!!r)}return KH(n)},yfe="#808080",MHe={angle:0,breakAll:!1,capHeight:"0.71em",fill:yfe,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Q6=w.forwardRef((e,t)=>{var r=Ao(e,MHe),{x:n,y:i,lineHeight:a,capHeight:s,fill:l,scaleToFit:c,textAnchor:u,verticalAnchor:d}=r,f=GH(r,jHe),m=w.useMemo(()=>FHe({breakAll:f.breakAll,children:f.children,maxLines:f.maxLines,scaleToFit:c,style:f.style,width:f.width}),[f.breakAll,f.children,f.maxLines,c,f.style,f.width]),{dx:g,dy:A,angle:v,className:b,breakAll:E}=f,I=GH(f,DHe);if(!eh(n)||!eh(i)||m.length===0)return null;var S=Number(n)+(Rr(g)?g:0),_=Number(i)+(Rr(A)?A:0);if(!ys(S)||!ys(_))return null;var B;switch(d){case"start":B=Jk("calc(".concat(s,")"));break;case"middle":B=Jk("calc(".concat((m.length-1)/2," * -").concat(a," + (").concat(s," / 2))"));break;default:B=Jk("calc(".concat(m.length-1," * -").concat(a,")"));break}var T=[];if(c){var P=m[0].width,{width:O}=f;T.push("scale(".concat(Rr(O)&&Rr(P)?O/P:1,")"))}return v&&T.push("rotate(".concat(v,", ").concat(S,", ").concat(_,")")),T.length&&(I.transform=T.join(" ")),w.createElement("text",qD({},bc(I),{ref:t,x:S,y:_,className:vi("recharts-text",b),textAnchor:u,fill:l.includes("url")?yfe:l}),m.map((z,L)=>{var W=z.words.join(E?"":" ");return w.createElement("tspan",{x:S,dy:L===0?B:a,key:"".concat(W,"-").concat(L)},W)}))});Q6.displayName="Text";var QHe=["labelRef"],LHe=["content"];function VH(e,t){if(e==null)return{};var r,n,i=UHe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n{var{x:t,y:r,upperWidth:n,lowerWidth:i,width:a,height:s,children:l}=e,c=w.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:a,height:s}),[t,r,n,i,a,s]);return w.createElement(bfe.Provider,{value:c},l)},wfe=()=>{var e=w.useContext(bfe),t=p6();return e||Uue(t)},GHe=w.createContext(null),qHe=()=>{var e=w.useContext(GHe),t=Mr(hde);return e||t},KHe=e=>{var{value:t,formatter:r}=e,n=ns(e.children)?t:e.children;return typeof r=="function"?r(n):n},SR=e=>e!=null&&typeof e=="function",VHe=(e,t)=>{var r=rl(t-e),n=Math.min(Math.abs(t-e),360);return r*n},YHe=(e,t,r,n,i)=>{var{offset:a,className:s}=e,{cx:l,cy:c,innerRadius:u,outerRadius:d,startAngle:f,endAngle:m,clockWise:g}=i,A=(u+d)/2,v=VHe(f,m),b=v>=0?1:-1,E,I;switch(t){case"insideStart":E=f+b*a,I=g;break;case"insideEnd":E=m-b*a,I=!g;break;case"end":E=m+b*a,I=g;break;default:throw new Error("Unsupported position ".concat(t))}I=v<=0?I:!I;var S=ho(l,c,A,E),_=ho(l,c,A,E+(I?1:-1)*359),B="M".concat(S.x,",").concat(S.y,` A`).concat(A,",").concat(A,",0,1,").concat(I?0:1,`, `).concat(_.x,",").concat(_.y),T=ns(e.id)?tb("recharts-radial-line-"):e.id;return w.createElement("text",Jh({},n,{dominantBaseline:"central",className:vi("recharts-radial-bar-label",s)}),w.createElement("defs",null,w.createElement("path",{id:T,d:B})),w.createElement("textPath",{xlinkHref:"#".concat(T)},r))},ZHe=(e,t,r)=>{var{cx:n,cy:i,innerRadius:a,outerRadius:s,startAngle:l,endAngle:c}=e,u=(l+c)/2;if(r==="outside"){var{x:d,y:f}=ho(n,i,s+t,u);return{x:d,y:f,textAnchor:d>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var m=(a+s)/2,{x:g,y:A}=ho(n,i,m,u);return{x:g,y:A,textAnchor:"middle",verticalAnchor:"middle"}},KD=e=>"cx"in e&&Rr(e.cx),JHe=(e,t)=>{var{parentViewBox:r,offset:n,position:i}=e,a;r!=null&&!KD(r)&&(a=r);var{x:s,y:l,upperWidth:c,lowerWidth:u,height:d}=t,f=s,m=s+(c-u)/2,g=(f+m)/2,A=(c+u)/2,v=f+c/2,b=d>=0?1:-1,E=b*n,I=b>0?"end":"start",S=b>0?"start":"end",_=c>=0?1:-1,B=_*n,T=_>0?"end":"start",P=_>0?"start":"end";if(i==="top"){var O={x:f+c/2,y:l-E,textAnchor:"middle",verticalAnchor:I};return Js(Js({},O),a?{height:Math.max(l-a.y,0),width:c}:{})}if(i==="bottom"){var z={x:m+u/2,y:l+d+E,textAnchor:"middle",verticalAnchor:S};return Js(Js({},z),a?{height:Math.max(a.y+a.height-(l+d),0),width:u}:{})}if(i==="left"){var L={x:g-B,y:l+d/2,textAnchor:T,verticalAnchor:"middle"};return Js(Js({},L),a?{width:Math.max(L.x-a.x,0),height:d}:{})}if(i==="right"){var W={x:g+A+B,y:l+d/2,textAnchor:P,verticalAnchor:"middle"};return Js(Js({},W),a?{width:Math.max(a.x+a.width-W.x,0),height:d}:{})}var R=a?{width:A,height:d}:{};return i==="insideLeft"?Js({x:g+B,y:l+d/2,textAnchor:P,verticalAnchor:"middle"},R):i==="insideRight"?Js({x:g+A-B,y:l+d/2,textAnchor:T,verticalAnchor:"middle"},R):i==="insideTop"?Js({x:f+c/2,y:l+E,textAnchor:"middle",verticalAnchor:S},R):i==="insideBottom"?Js({x:m+u/2,y:l+d-E,textAnchor:"middle",verticalAnchor:I},R):i==="insideTopLeft"?Js({x:f+B,y:l+E,textAnchor:P,verticalAnchor:S},R):i==="insideTopRight"?Js({x:f+c-B,y:l+E,textAnchor:T,verticalAnchor:S},R):i==="insideBottomLeft"?Js({x:m+B,y:l+d-E,textAnchor:P,verticalAnchor:I},R):i==="insideBottomRight"?Js({x:m+u-B,y:l+d-E,textAnchor:T,verticalAnchor:I},R):i&&typeof i=="object"&&(Rr(i.x)||Am(i.x))&&(Rr(i.y)||Am(i.y))?Js({x:s+ec(i.x,A),y:l+ec(i.y,d),textAnchor:"end",verticalAnchor:"end"},R):Js({x:v,y:l+d/2,textAnchor:"middle",verticalAnchor:"middle"},R)},XHe={angle:0,offset:5,zIndex:mo.label,position:"middle",textBreakAll:!1};function Mp(e){var t=Ao(e,XHe),{viewBox:r,position:n,value:i,children:a,content:s,className:l="",textBreakAll:c,labelRef:u}=t,d=qHe(),f=wfe(),m=n==="center"?f:d??f,g,A,v;if(r==null?g=m:KD(r)?g=r:g=Uue(r),!g||ns(i)&&ns(a)&&!w.isValidElement(s)&&typeof s!="function")return null;var b=Js(Js({},t),{},{viewBox:g});if(w.isValidElement(s)){var{labelRef:E}=b,I=VH(b,QHe);return w.cloneElement(s,I)}if(typeof s=="function"){var{content:S}=b,_=VH(b,LHe);if(A=w.createElement(s,_),w.isValidElement(A))return A}else A=KHe(t);var B=bc(t);if(KD(g)){if(n==="insideStart"||n==="insideEnd"||n==="end")return YHe(t,n,A,B,g);v=ZHe(g,t.offset,t.position)}else v=JHe(t,g);return w.createElement(eu,{zIndex:t.zIndex},w.createElement(Q6,Jh({ref:u,className:vi("recharts-label",l)},B,v,{textAnchor:PHe(B.textAnchor)?B.textAnchor:v.textAnchor,breakAll:c}),A))}Mp.displayName="Label";var eWe=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?w.createElement(Mp,Jh({key:"label-implicit"},n)):eh(e)?w.createElement(Mp,Jh({key:"label-implicit",value:e},n)):w.isValidElement(e)?e.type===Mp?w.cloneElement(e,Js({key:"label-implicit"},n)):w.createElement(Mp,Jh({key:"label-implicit",content:e},n)):SR(e)?w.createElement(Mp,Jh({key:"label-implicit",content:e},n)):e&&typeof e=="object"?w.createElement(Mp,Jh({},e,{key:"label-implicit"},n)):null};function tWe(e){var{label:t,labelRef:r}=e,n=wfe();return eWe(t,n,r)||null}var Xk={},e_={},ZH;function rWe(){return ZH||(ZH=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(e_)),e_}var t_={},JH;function nWe(){return JH||(JH=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(t_)),t_}var XH;function iWe(){return XH||(XH=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rWe(),r=nWe(),n=JO();function i(a){if(n.isArrayLike(a))return t.last(r.toArray(a))}e.last=i})(Xk)),Xk}var r_,eW;function aWe(){return eW||(eW=1,r_=iWe().last),r_}var sWe=aWe();const oWe=hi(sWe);var lWe=["valueAccessor"],cWe=["dataKey","clockWise","id","textBreakAll","zIndex"];function jI(){return jI=Object.assign?Object.assign.bind():function(e){for(var t=1;tArray.isArray(e.value)?oWe(e.value):e.value,Efe=w.createContext(void 0),Cfe=Efe.Provider,Ife=w.createContext(void 0),fWe=Ife.Provider;function hWe(){return w.useContext(Efe)}function mWe(){return w.useContext(Ife)}function wE(e){var{valueAccessor:t=dWe}=e,r=tW(e,lWe),{dataKey:n,clockWise:i,id:a,textBreakAll:s,zIndex:l}=r,c=tW(r,cWe),u=hWe(),d=mWe(),f=u||d;return!f||!f.length?null:w.createElement(eu,{zIndex:l??mo.label},w.createElement(al,{className:"recharts-label-list"},f.map((m,g)=>{var A,v=ns(n)?t(m,g):na(m&&m.payload,n),b=ns(a)?{}:{id:"".concat(a,"-").concat(g)};return w.createElement(Mp,jI({key:"label-".concat(g)},bc(m),c,b,{fill:(A=r.fill)!==null&&A!==void 0?A:m.fill,parentViewBox:m.parentViewBox,value:v,textBreakAll:s,viewBox:m.viewBox,index:g,zIndex:0}))})))}wE.displayName="LabelList";function BR(e){var{label:t}=e;return t?t===!0?w.createElement(wE,{key:"labelList-implicit"}):w.isValidElement(t)||SR(t)?w.createElement(wE,{key:"labelList-implicit",content:t}):typeof t=="object"?w.createElement(wE,jI({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function VD(){return VD=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{cx:t,cy:r,r:n,className:i}=e,a=vi("recharts-dot",i);return Rr(t)&&Rr(r)&&Rr(n)?w.createElement("circle",VD({},Lu(e),ZO(e),{className:a,cx:t,cy:r,r:n})):null},Bfe=e=>e.graphicalItems.polarItems,pWe=dt([as,qw],V9),L6=dt([Bfe,Es,pWe],Y9),gWe=dt([L6],Z9),U6=dt([gWe,B6],J9),AWe=dt([U6,Es,L6],eR);dt([U6,Es,L6],(e,t,r)=>r.length>0?e.flatMap(n=>r.flatMap(i=>{var a,s=na(n,(a=t.dataKey)!==null&&a!==void 0?a:i.dataKey);return{value:s,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(n=>({value:na(n,t.dataKey),errorDomain:[]})):e.map(n=>({value:n,errorDomain:[]})));var rW=()=>{},vWe=dt([U6,Es,L6,O6,as],iR),xWe=dt([Es,rR,nR,rW,vWe,rW,xi,as],aR),Nfe=dt([Es,xi,U6,AWe,Gw,as,xWe],sR),yWe=dt([Nfe,Es,Cy],cR);dt([Es,Nfe,yWe,as],dR);var bWe={radiusAxis:{},angleAxis:{}},kfe=Xc({name:"polarAxis",initialState:bWe,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:eIt,removeRadiusAxis:tIt,addAngleAxis:rIt,removeAngleAxis:nIt}=kfe.actions,wWe=kfe.reducer;function nW(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function iW(e){for(var t=1;tt,NR=dt([Bfe,SWe],(e,t)=>e.filter(r=>r.type==="pie").find(r=>r.id===t)),BWe=[],kR=(e,t,r)=>r?.length===0?BWe:r,_fe=dt([B6,NR,kR],(e,t,r)=>{var{chartData:n}=e;if(t!=null){var i;if(t?.data!=null&&t.data.length>0?i=t.data:i=n,(!i||!i.length)&&r!=null&&(i=r.map(a=>iW(iW({},t.presentationProps),a.props))),i!=null)return i}}),NWe=dt([_fe,NR,kR],(e,t,r)=>{if(!(e==null||t==null))return e.map((n,i)=>{var a,s=na(n,t.nameKey,t.name),l;return r!=null&&(a=r[i])!==null&&a!==void 0&&(a=a.props)!==null&&a!==void 0&&a.fill?l=r[i].props.fill:typeof n=="object"&&n!=null&&"fill"in n?l=n.fill:l=t.fill,{value:Ay(s,t.dataKey),color:l,payload:n,type:t.legendType}})}),kWe=dt([_fe,NR,kR,To],(e,t,r,n)=>{if(!(t==null||e==null))return jGe({offset:n,pieSettings:t,displayedData:e,cells:r})}),n_={exports:{}},ra={};var aW;function _We(){if(aW)return ra;aW=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function A(v){if(typeof v=="object"&&v!==null){var b=v.$$typeof;switch(b){case e:switch(v=v.type,v){case r:case i:case n:case c:case u:case m:return v;default:switch(v=v&&v.$$typeof,v){case s:case l:case f:case d:return v;case a:return v;default:return b}}case t:return b}}}return ra.ContextConsumer=a,ra.ContextProvider=s,ra.Element=e,ra.ForwardRef=l,ra.Fragment=r,ra.Lazy=f,ra.Memo=d,ra.Portal=t,ra.Profiler=i,ra.StrictMode=n,ra.Suspense=c,ra.SuspenseList=u,ra.isContextConsumer=function(v){return A(v)===a},ra.isContextProvider=function(v){return A(v)===s},ra.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},ra.isForwardRef=function(v){return A(v)===l},ra.isFragment=function(v){return A(v)===r},ra.isLazy=function(v){return A(v)===f},ra.isMemo=function(v){return A(v)===d},ra.isPortal=function(v){return A(v)===t},ra.isProfiler=function(v){return A(v)===i},ra.isStrictMode=function(v){return A(v)===n},ra.isSuspense=function(v){return A(v)===c},ra.isSuspenseList=function(v){return A(v)===u},ra.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===i||v===n||v===c||v===u||typeof v=="object"&&v!==null&&(v.$$typeof===f||v.$$typeof===d||v.$$typeof===s||v.$$typeof===a||v.$$typeof===l||v.$$typeof===g||v.getModuleId!==void 0)},ra.typeOf=A,ra}var sW;function jWe(){return sW||(sW=1,n_.exports=_We()),n_.exports}var DWe=jWe(),oW=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",lW=null,i_=null,jfe=e=>{if(e===lW&&Array.isArray(i_))return i_;var t=[];return w.Children.forEach(e,r=>{ns(r)||(DWe.isFragment(r)?t=t.concat(jfe(r.props.children)):t.push(r))}),i_=t,lW=e,t};function _R(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>oW(i)):n=[oW(t)],jfe(e).forEach(i=>{var a=p1(i,"type.displayName")||p1(i,"type.name");a&&n.indexOf(a)!==-1&&r.push(i)}),r}var Dfe=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,a_={},cW;function TWe(){return cW||(cW=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const i=r[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable?!1:r.toString()===`[object ${i}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})(a_)),a_}var s_,uW;function PWe(){return uW||(uW=1,s_=TWe().isPlainObject),s_}var OWe=PWe();const RWe=hi(OWe);var dW,fW,hW,mW,pW;function gW(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function AW(e){for(var t=1;t{var a=r-n,s;return s=Os(dW||(dW=i2(["M ",",",""])),e,t),s+=Os(fW||(fW=i2(["L ",",",""])),e+r,t),s+=Os(hW||(hW=i2(["L ",",",""])),e+r-a/2,t+i),s+=Os(mW||(mW=i2(["L ",",",""])),e+r-a/2-n,t+i),s+=Os(pW||(pW=i2(["L ",","," Z"])),e,t),s},LWe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},UWe=e=>{var t=Ao(e,LWe),{x:r,y:n,upperWidth:i,lowerWidth:a,height:s,className:l}=t,{animationEasing:c,animationDuration:u,animationBegin:d,isUpdateAnimationActive:f}=t,m=w.useRef(null),[g,A]=w.useState(-1),v=w.useRef(i),b=w.useRef(a),E=w.useRef(s),I=w.useRef(r),S=w.useRef(n),_=Uw(e,"trapezoid-");if(w.useEffect(()=>{if(m.current&&m.current.getTotalLength)try{var X=m.current.getTotalLength();X&&A(X)}catch{}},[]),r!==+r||n!==+n||i!==+i||a!==+a||s!==+s||i===0&&a===0||s===0)return null;var B=vi("recharts-trapezoid",l);if(!f)return w.createElement("g",null,w.createElement("path",DI({},bc(t),{className:B,d:vW(r,n,i,a,s)})));var T=v.current,P=b.current,O=E.current,z=I.current,L=S.current,W="0px ".concat(g===-1?1:g,"px"),R="".concat(g,"px 0px"),$=t0e(["strokeDasharray"],u,c);return w.createElement(Lw,{animationId:_,key:_,canBegin:g>0,duration:u,easing:c,isActive:f,begin:d},X=>{var Z=Ja(T,i,X),K=Ja(P,a,X),q=Ja(O,s,X),Y=Ja(z,r,X),ne=Ja(L,n,X);m.current&&(v.current=Z,b.current=K,E.current=q,I.current=Y,S.current=ne);var ge=X>0?{transition:$,strokeDasharray:R}:{strokeDasharray:W};return w.createElement("path",DI({},bc(t),{className:B,d:vW(Y,ne,Z,K,q),ref:m,style:AW(AW({},ge),t.style)}))})},$We=["option","shapeType","activeClassName"];function zWe(e,t){if(e==null)return{};var r,n,i=HWe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n{var n=Ba();return(i,a)=>s=>{e?.(i,a,s),n(Hde({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},TR=e=>{var t=Ba();return(r,n)=>i=>{e?.(r,n,i),t(r$e())}},PR=(e,t,r)=>{var n=Ba();return(i,a)=>s=>{e?.(i,a,s),n(n$e({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}};function OR(e){var{tooltipEntrySettings:t}=e,r=Ba(),n=ic(),i=w.useRef(null);return w.useLayoutEffect(()=>{n||(i.current===null?r(JUe(t)):i.current!==t&&r(XUe({prev:i.current,next:t})),i.current=t)},[t,r,n]),w.useLayoutEffect(()=>()=>{i.current&&(r(e$e(i.current)),i.current=null)},[r]),null}function Tfe(e){var{legendPayload:t}=e,r=Ba(),n=ic(),i=w.useRef(null);return w.useLayoutEffect(()=>{n||(i.current===null?r(Yue(t)):i.current!==t&&r(Zue({prev:i.current,next:t})),i.current=t)},[r,n,t]),w.useLayoutEffect(()=>()=>{i.current&&(r(Jue(i.current)),i.current=null)},[r]),null}function ZWe(e){var{legendPayload:t}=e,r=Ba(),n=Mr(xi),i=w.useRef(null);return w.useLayoutEffect(()=>{n!=="centric"&&n!=="radial"||(i.current===null?r(Yue(t)):i.current!==t&&r(Zue({prev:i.current,next:t})),i.current=t)},[r,n,t]),w.useLayoutEffect(()=>()=>{i.current&&(r(Jue(i.current)),i.current=null)},[r]),null}var o_,JWe=()=>{var[e]=w.useState(()=>tb("uid-"));return e},XWe=(o_=Fb.useId)!==null&&o_!==void 0?o_:JWe;function eGe(e,t){var r=XWe();return t||(e?"".concat(e,"-").concat(r):r)}var tGe=w.createContext(void 0),RR=e=>{var{id:t,type:r,children:n}=e,i=eGe("recharts-".concat(r),t);return w.createElement(tGe.Provider,{value:i},n(i))},rGe={cartesianItems:[],polarItems:[]},Pfe=Xc({name:"graphicalItems",initialState:rGe,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Za()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=_d(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:Za()},removeCartesianGraphicalItem:{reducer(e,t){var r=_d(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:Za()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Za()},removePolarGraphicalItem:{reducer(e,t){var r=_d(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:Za()}}}),{addCartesianGraphicalItem:nGe,replaceCartesianGraphicalItem:iGe,removeCartesianGraphicalItem:aGe,addPolarGraphicalItem:sGe,removePolarGraphicalItem:oGe}=Pfe.actions,lGe=Pfe.reducer,cGe=e=>{var t=Ba(),r=w.useRef(null);return w.useLayoutEffect(()=>{r.current===null?t(nGe(e)):r.current!==e&&t(iGe({prev:r.current,next:e})),r.current=e},[t,e]),w.useLayoutEffect(()=>()=>{r.current&&(t(aGe(r.current)),r.current=null)},[t]),null},Ofe=w.memo(cGe);function uGe(e){var t=Ba();return w.useLayoutEffect(()=>(t(sGe(e)),()=>{t(oGe(e))}),[t,e]),null}var dGe=["key"],fGe=["onMouseEnter","onClick","onMouseLeave"],hGe=["id"],mGe=["id"];function bW(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rs(e){for(var t=1;t_R(e.children,t5),[e.children]),r=Mr(n=>NWe(n,e.id,t));return r==null?null:w.createElement(ZWe,{legendPayload:r})}var yGe=w.memo(e=>{var{dataKey:t,nameKey:r,sectors:n,stroke:i,strokeWidth:a,fill:s,name:l,hide:c,tooltipType:u,id:d}=e,f={dataDefinedOnItem:n.map(m=>m.tooltipPayload),positions:n.map(m=>m.tooltipPosition),settings:{stroke:i,strokeWidth:a,fill:s,dataKey:t,nameKey:r,name:Ay(l,t),hide:c,type:u,color:s,unit:"",graphicalItemId:d}};return w.createElement(OR,{tooltipEntrySettings:f})}),bGe=(e,t)=>e>t?"start":eec(typeof t=="function"?t(e):t,r,r*.8),EGe=(e,t,r)=>{var{top:n,left:i,width:a,height:s}=t,l=s0e(a,s),c=i+ec(e.cx,a,a/2),u=n+ec(e.cy,s,s/2),d=ec(e.innerRadius,l,0),f=wGe(r,e.outerRadius,l),m=e.maxRadius||Math.sqrt(a*a+s*s)/2;return{cx:c,cy:u,innerRadius:d,outerRadius:f,maxRadius:m}},CGe=(e,t)=>{var r=rl(t-e),n=Math.min(Math.abs(t-e),360);return r*n};function IGe(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var SGe=(e,t)=>{if(w.isValidElement(e))return w.cloneElement(e,t);if(typeof e=="function")return e(t);var r=vi("recharts-pie-label-line",typeof e!="boolean"?e.className:""),{key:n}=t,i=$6(t,dGe);return w.createElement(m9,fg({},i,{type:"linear",className:r}))},BGe=(e,t,r)=>{if(w.isValidElement(e))return w.cloneElement(e,t);var n=r;if(typeof e=="function"&&(n=e(t),w.isValidElement(n)))return n;var i=vi("recharts-pie-label-text",IGe(e));return w.createElement(Q6,fg({},t,{alignmentBaseline:"middle",className:i}),n)};function NGe(e){var{sectors:t,props:r,showLabels:n}=e,{label:i,labelLine:a,dataKey:s}=r;if(!n||!i||!t)return null;var l=Lu(r),c=h1(i),u=h1(a),d=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,f=t.map((m,g)=>{var A=(m.startAngle+m.endAngle)/2,v=ho(m.cx,m.cy,m.outerRadius+d,A),b=Rs(Rs(Rs(Rs({},l),m),{},{stroke:"none"},c),{},{index:g,textAnchor:bGe(v.x,m.cx)},v),E=Rs(Rs(Rs(Rs({},l),m),{},{fill:"none",stroke:m.fill},u),{},{index:g,points:[ho(m.cx,m.cy,m.outerRadius,A),v],key:"line"});return w.createElement(eu,{zIndex:mo.label,key:"label-".concat(m.startAngle,"-").concat(m.endAngle,"-").concat(m.midAngle,"-").concat(g)},w.createElement(al,null,a&&SGe(a,E),BGe(i,b,na(m,s))))});return w.createElement(al,{className:"recharts-pie-labels"},f)}function kGe(e){var{sectors:t,props:r,showLabels:n}=e,{label:i}=r;return typeof i=="object"&&i!=null&&"position"in i?w.createElement(BR,{label:i}):w.createElement(NGe,{sectors:t,props:r,showLabels:n})}function _Ge(e){var{sectors:t,activeShape:r,inactiveShape:n,allOtherPieProps:i,shape:a,id:s}=e,l=Mr(dg),c=Mr(yR),u=Mr($$e),{onMouseEnter:d,onClick:f,onMouseLeave:m}=i,g=$6(i,fGe),A=DR(d,i.dataKey,s),v=TR(m),b=PR(f,i.dataKey,s);return t==null||t.length===0?null:w.createElement(w.Fragment,null,t.map((E,I)=>{if(E?.startAngle===0&&E?.endAngle===0&&t.length!==1)return null;var S=u==null||u===s,_=String(I)===l&&(c==null||i.dataKey===c)&&S,B=l?n:null,T=r&&_?r:B,P=Rs(Rs({},E),{},{stroke:E.stroke,tabIndex:-1,[Rue]:I,[Fue]:s});return w.createElement(al,fg({key:"sector-".concat(E?.startAngle,"-").concat(E?.endAngle,"-").concat(E.midAngle,"-").concat(I),tabIndex:-1,className:"recharts-pie-sector"},Pw(g,E,I),{onMouseEnter:A(E,I),onMouseLeave:v(E,I),onClick:b(E,I)}),w.createElement(jR,fg({option:a??T,index:I,shapeType:"sector",isActive:_},P)))}))}function jGe(e){var t,{pieSettings:r,displayedData:n,cells:i,offset:a}=e,{cornerRadius:s,startAngle:l,endAngle:c,dataKey:u,nameKey:d,tooltipType:f}=r,m=Math.abs(r.minAngle),g=CGe(l,c),A=Math.abs(g),v=n.length<=1?0:(t=r.paddingAngle)!==null&&t!==void 0?t:0,b=n.filter(T=>na(T,u,0)!==0).length,E=(A>=360?b:b-1)*v,I=A-b*m-E,S=n.reduce((T,P)=>{var O=na(P,u,0);return T+(Rr(O)?O:0)},0),_;if(S>0){var B;_=n.map((T,P)=>{var O=na(T,u,0),z=na(T,d,P),L=EGe(r,a,T),W=(Rr(O)?O:0)/S,R,$=Rs(Rs({},T),i&&i[P]&&i[P].props);P?R=B.endAngle+rl(g)*v*(O!==0?1:0):R=l;var X=R+rl(g)*((O!==0?m:0)+W*I),Z=(R+X)/2,K=(L.innerRadius+L.outerRadius)/2,q=[{name:z,value:O,payload:$,dataKey:u,type:f,graphicalItemId:r.id}],Y=ho(L.cx,L.cy,K,Z);return B=Rs(Rs(Rs(Rs({},r.presentationProps),{},{percent:W,cornerRadius:typeof s=="string"?parseFloat(s):s,name:z,tooltipPayload:q,midAngle:Z,middleRadius:K,tooltipPosition:Y},$),L),{},{value:O,dataKey:u,startAngle:R,endAngle:X,payload:$,paddingAngle:rl(g)*v}),B})}return _}function DGe(e){var{showLabels:t,sectors:r,children:n}=e,i=w.useMemo(()=>!t||!r?[]:r.map(a=>({value:a.value,payload:a.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:a.cx,cy:a.cy,innerRadius:a.innerRadius,outerRadius:a.outerRadius,startAngle:a.startAngle,endAngle:a.endAngle,clockWise:!1},fill:a.fill})),[r,t]);return w.createElement(fWe,{value:t?i:void 0},n)}function TGe(e){var{props:t,previousSectorsRef:r,id:n}=e,{sectors:i,isAnimationActive:a,animationBegin:s,animationDuration:l,animationEasing:c,activeShape:u,inactiveShape:d,onAnimationStart:f,onAnimationEnd:m}=t,g=Uw(t,"recharts-pie-"),A=r.current,[v,b]=w.useState(!1),E=w.useCallback(()=>{typeof m=="function"&&m(),b(!1)},[m]),I=w.useCallback(()=>{typeof f=="function"&&f(),b(!0)},[f]);return w.createElement(DGe,{showLabels:!v,sectors:i},w.createElement(Lw,{animationId:g,begin:s,duration:l,isActive:a,easing:c,onAnimationStart:I,onAnimationEnd:E,key:g},S=>{var _=[],B=i&&i[0],T=B?.startAngle;return i?.forEach((P,O)=>{var z=A&&A[O],L=O>0?p1(P,"paddingAngle",0):0;if(z){var W=Ja(z.endAngle-z.startAngle,P.endAngle-P.startAngle,S),R=Rs(Rs({},P),{},{startAngle:T+L,endAngle:T+W+L});_.push(R),T=R.endAngle}else{var{endAngle:$,startAngle:X}=P,Z=Ja(0,$-X,S),K=Rs(Rs({},P),{},{startAngle:T+L,endAngle:T+Z+L});_.push(K),T=K.endAngle}}),r.current=_,w.createElement(al,null,w.createElement(_Ge,{sectors:_,activeShape:u,inactiveShape:d,allOtherPieProps:t,shape:t.shape,id:n}))}),w.createElement(kGe,{showLabels:!v,sectors:i,props:t}),t.children)}var PGe={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:mo.area};function OGe(e){var{id:t}=e,r=$6(e,hGe),{hide:n,className:i,rootTabIndex:a}=e,s=w.useMemo(()=>_R(e.children,t5),[e.children]),l=Mr(d=>kWe(d,t,s)),c=w.useRef(null),u=vi("recharts-pie",i);return n||l==null?(c.current=null,w.createElement(al,{tabIndex:a,className:u})):w.createElement(eu,{zIndex:e.zIndex},w.createElement(yGe,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:l,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:t}),w.createElement(al,{tabIndex:a,className:u},w.createElement(TGe,{props:Rs(Rs({},r),{},{sectors:l}),previousSectorsRef:c,id:t})))}function Rfe(e){var t=Ao(e,PGe),{id:r}=t,n=$6(t,mGe),i=Lu(n);return w.createElement(RR,{id:r,type:"pie"},a=>w.createElement(w.Fragment,null,w.createElement(uGe,{type:"pie",id:a,data:n.data,dataKey:n.dataKey,hide:n.hide,angleAxisId:0,radiusAxisId:0,name:n.name,nameKey:n.nameKey,tooltipType:n.tooltipType,legendType:n.legendType,fill:n.fill,cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,paddingAngle:n.paddingAngle,minAngle:n.minAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius,cornerRadius:n.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),w.createElement(xGe,fg({},n,{id:a})),w.createElement(OGe,fg({},n,{id:a}))))}Rfe.displayName="Pie";var RGe=["points"];function wW(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function l_(e){for(var t=1;t{var b,E,I=l_(l_(l_({r:3},s),f),{},{index:v,cx:(b=A.x)!==null&&b!==void 0?b:void 0,cy:(E=A.y)!==null&&E!==void 0?E:void 0,dataKey:a,value:A.value,payload:A.payload,points:t});return w.createElement($Ge,{key:"dot-".concat(v),option:r,dotProps:I,className:i})}),g={};return l&&c!=null&&(g.clipPath="url(#clipPath-".concat(d?"":"dots-").concat(c,")")),w.createElement(eu,{zIndex:u},w.createElement(al,PI({className:n},g),m))}function EW(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function CW(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),iqe=dt([nqe,jm,Dm],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),FR=()=>Mr(iqe),aqe=()=>Mr(q$e);function IW(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function c_(e){for(var t=1;t{var{point:t,childIndex:r,mainColor:n,activeDot:i,dataKey:a,clipPath:s}=e;if(i===!1||t.x==null||t.y==null)return null;var l={index:r,dataKey:a,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},c=c_(c_(c_({},l),h1(i)),ZO(i)),u;return w.isValidElement(i)?u=w.cloneElement(i,c):typeof i=="function"?u=i(c):u=w.createElement(Sfe,c),w.createElement(al,{className:"recharts-active-dot",clipPath:s},u)};function uqe(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i,clipPath:a,zIndex:s=mo.activeDot}=e,l=Mr(dg),c=aqe();if(t==null||c==null)return null;var u=t.find(d=>c.includes(d.payload));return ns(u)?null:w.createElement(eu,{zIndex:s},w.createElement(cqe,{point:u,childIndex:Number(l),mainColor:r,dataKey:i,activeDot:n,clipPath:a}))}var SW=(e,t,r)=>{var n=r??e;if(!ns(n))return ec(n,t,0)},dqe=(e,t,r)=>{var n={},i=e.filter(_6),a=e.filter(u=>u.stackId==null),s=i.reduce((u,d)=>(u[d.stackId]||(u[d.stackId]=[]),u[d.stackId].push(d),u),n),l=Object.entries(s).map(u=>{var[d,f]=u,m=f.map(A=>A.dataKey),g=SW(t,r,f[0].barSize);return{stackId:d,dataKeys:m,barSize:g}}),c=a.map(u=>{var d=[u.dataKey].filter(m=>m!=null),f=SW(t,r,u.barSize);return{stackId:void 0,dataKeys:d,barSize:f}});return[...l,...c]};function BW(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function k4(e){for(var t=1;tE+(I.barSize||0),0);f+=(a-1)*s,f>=r&&(f-=(a-1)*s,s=0),f>=r&&d>0&&(u=!0,d*=.9,f=a*d);var m=(r-f)/2>>0,g={offset:m-s,size:0};l=n.reduce((E,I)=>{var S,_={stackId:I.stackId,dataKeys:I.dataKeys,position:{offset:g.offset+g.size+s,size:u?d:(S=I.barSize)!==null&&S!==void 0?S:0}},B=[...E,_];return g=B[B.length-1].position,B},c)}else{var A=ec(t,r,0,!0);r-2*A-(a-1)*s<=0&&(s=0);var v=(r-2*A-(a-1)*s)/a;v>1&&(v>>=0);var b=ys(i)?Math.min(v,i):v;l=n.reduce((E,I,S)=>[...E,{stackId:I.stackId,dataKeys:I.dataKeys,position:{offset:A+(v+s)*S+(v-b)/2,size:b}}],c)}return l}}var gqe=(e,t,r,n,i,a,s)=>{var l=ns(s)?t:s,c=pqe(r,n,i!==a?i:a,e,l);return i!==a&&c!=null&&(c=c.map(u=>k4(k4({},u),{},{position:k4(k4({},u.position),{},{offset:u.position.offset-i/2})}))),c},Aqe=(e,t)=>{var r=q9(t);if(!(!e||r==null||t==null)){var{stackId:n}=t;if(n!=null){var i=e[n];if(i){var{stackedData:a}=i;if(a)return a.find(s=>s.key===r)}}}};function vqe(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&ys(e.zIndex)?e.zIndex:t}var Qfe=e=>{var{chartData:t}=e,r=Ba(),n=ic();return w.useEffect(()=>n?()=>{}:(r(PH(t)),()=>{r(PH(void 0))}),[t,r,n]),null},NW={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},Lfe=Xc({name:"brush",initialState:NW,reducers:{setBrushSettings(e,t){return t.payload==null?NW:t.payload}}}),{setBrushSettings:oIt}=Lfe.actions,xqe=Lfe.reducer;function yqe(e,t,r){return(t=bqe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bqe(e){var t=wqe(e,"string");return typeof t=="symbol"?t:t+""}function wqe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class MR{static create(t){return new MR(t)}constructor(t){this.scale=t}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(t){var{bandAware:r,position:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(n)switch(n){case"start":return this.scale(t);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}case"end":{var a=this.bandwidth?this.bandwidth():0;return this.scale(t)+a}default:return this.scale(t)}if(r){var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+s}return this.scale(t)}}isInRange(t){var r=this.range(),n=r[0],i=r[r.length-1];return n<=i?t>=n&&t<=i:t>=i&&t<=n}}yqe(MR,"EPS",1e-4);function Eqe(e){return(e%180+180)%180}var Cqe=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Eqe(i),s=a*Math.PI/180,l=Math.atan(n/r),c=s>l&&s{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=_d(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=_d(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=_d(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:lIt,removeDot:cIt,addArea:uIt,removeArea:dIt,addLine:fIt,removeLine:hIt}=Ufe.actions,Sqe=Ufe.reducer,Bqe=w.createContext(void 0),Nqe=e=>{var{children:t}=e,[r]=w.useState("".concat(tb("recharts"),"-clip")),n=FR();if(n==null)return null;var{x:i,y:a,width:s,height:l}=n;return w.createElement(Bqe.Provider,{value:r},w.createElement("defs",null,w.createElement("clipPath",{id:r},w.createElement("rect",{x:i,y:a,height:l,width:s}))),t)};function $fe(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;ne*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function jqe(e,t){return $fe(e,t+1)}function Dqe(e,t,r,n,i){for(var a=(n||[]).slice(),{start:s,end:l}=t,c=0,u=1,d=s,f=function(){var A=n?.[c];if(A===void 0)return{v:$fe(n,u)};var v=c,b,E=()=>(b===void 0&&(b=r(A,v)),b),I=A.coordinate,S=c===0||pb(e,I,E,d,l);S||(c=0,d=s,u+=1),S&&(d=I+e*(E()/2+i),c+=u)},m;u<=a.length;)if(m=f(),m)return m.v;return[]}function Tqe(e,t,r,n,i){var a=(n||[]).slice(),s=a.length;if(s===0)return[];for(var{start:l,end:c}=t,u=1;u<=s;u++){for(var d=(s-1)%u,f=l,m=!0,g=function(){var I=n[A],S=A,_,B=()=>(_===void 0&&(_=r(I,S)),_),T=I.coordinate,P=A===d||pb(e,T,B,f,c);if(!P)return m=!1,1;P&&(f=T+e*(B()/2+i))},A=d;A(A===void 0&&(A=r(g,m)),A);if(m===s-1){var b=e*(g.coordinate+e*v()/2-c);a[m]=g=Yl(Yl({},g),{},{tickCoord:b>0?g.coordinate-b*e:g.coordinate})}else a[m]=g=Yl(Yl({},g),{},{tickCoord:g.coordinate});if(g.tickCoord!=null){var E=pb(e,g.tickCoord,v,l,c);E&&(c=g.tickCoord-e*(v()/2+i),a[m]=Yl(Yl({},g),{},{isShow:!0}))}},d=s-1;d>=0;d--)u(d);return a}function Mqe(e,t,r,n,i,a){var s=(n||[]).slice(),l=s.length,{start:c,end:u}=t;if(a){var d=n[l-1],f=r(d,l-1),m=e*(d.coordinate+e*f/2-u);if(s[l-1]=d=Yl(Yl({},d),{},{tickCoord:m>0?d.coordinate-m*e:d.coordinate}),d.tickCoord!=null){var g=pb(e,d.tickCoord,()=>f,c,u);g&&(u=d.tickCoord-e*(f/2+i),s[l-1]=Yl(Yl({},d),{},{isShow:!0}))}}for(var A=a?l-1:l,v=function(I){var S=s[I],_,B=()=>(_===void 0&&(_=r(S,I)),_);if(I===0){var T=e*(S.coordinate-e*B()/2-c);s[I]=S=Yl(Yl({},S),{},{tickCoord:T<0?S.coordinate-T*e:S.coordinate})}else s[I]=S=Yl(Yl({},S),{},{tickCoord:S.coordinate});if(S.tickCoord!=null){var P=pb(e,S.tickCoord,B,c,u);P&&(c=S.tickCoord+e*(B()/2+i),s[I]=Yl(Yl({},S),{},{isShow:!0}))}},b=0;b{var B=typeof u=="function"?u(S.value,_):S.value;return A==="width"?kqe(I2(B,{fontSize:t,letterSpacing:r}),v,f):I2(B,{fontSize:t,letterSpacing:r})[A]},E=i.length>=2?rl(i[1].coordinate-i[0].coordinate):1,I=_qe(a,E,A);return c==="equidistantPreserveStart"?Dqe(E,I,b,i,s):c==="equidistantPreserveEnd"?Tqe(E,I,b,i,s):(c==="preserveStart"||c==="preserveStartEnd"?g=Mqe(E,I,b,i,s,c==="preserveStartEnd"):g=Fqe(E,I,b,i,s),g.filter(S=>S.isShow))}var Qqe=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:a=0}=e,s=0;if(t){Array.from(t).forEach(d=>{if(d){var f=d.getBoundingClientRect();f.width>s&&(s=f.width)}});var l=r?r.getBoundingClientRect().width:0,c=i+a,u=s+c+l+(r?n:0);return Math.round(u)}return 0},Lqe=["axisLine","width","height","className","hide","ticks","axisType"];function Uqe(e,t){if(e==null)return{};var r,n,i=$qe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n{var{ticks:r=[],tick:n,tickLine:i,stroke:a,tickFormatter:s,unit:l,padding:c,tickTextProps:u,orientation:d,mirror:f,x:m,y:g,width:A,height:v,tickSize:b,tickMargin:E,fontSize:I,letterSpacing:S,getTicksConfig:_,events:B,axisType:T}=e,P=QR(co(co({},_),{},{ticks:r}),I,S),O=Kqe(d,f),z=Vqe(d,f),L=Lu(_),W=h1(n),R={};typeof i=="object"&&(R=i);var $=co(co({},L),{},{fill:"none"},R),X=P.map(q=>co({entry:q},qqe(q,m,g,A,v,d,b,f,E))),Z=X.map(q=>{var{entry:Y,line:ne}=q;return w.createElement(al,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(Y.value,"-").concat(Y.coordinate,"-").concat(Y.tickCoord)},i&&w.createElement("line",y1({},$,ne,{className:vi("recharts-cartesian-axis-tick-line",p1(i,"className"))})))}),K=X.map((q,Y)=>{var{entry:ne,tick:ge}=q,ae=co(co(co(co({textAnchor:O,verticalAnchor:z},L),{},{stroke:"none",fill:a},W),ge),{},{index:Y,payload:ne,visibleTicksCount:P.length,tickFormatter:s,padding:c},u);return w.createElement(al,y1({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(ne.value,"-").concat(ne.coordinate,"-").concat(ne.tickCoord)},Pw(B,ne,Y)),n&&w.createElement(Yqe,{option:n,tickProps:ae,value:"".concat(typeof s=="function"?s(ne.value,Y):ne.value).concat(l||"")}))});return w.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(T,"-ticks")},K.length>0&&w.createElement(eu,{zIndex:mo.label},w.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(T,"-tick-labels"),ref:t},K)),Z.length>0&&w.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(T,"-tick-lines")},Z))}),Jqe=w.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:a,hide:s,ticks:l,axisType:c}=e,u=Uqe(e,Lqe),[d,f]=w.useState(""),[m,g]=w.useState(""),A=w.useRef(null);w.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var b;return Qqe({ticks:A.current,label:(b=e.labelRef)===null||b===void 0?void 0:b.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var v=w.useCallback(b=>{if(b){var E=b.getElementsByClassName("recharts-cartesian-axis-tick-value");A.current=E;var I=E[0];if(I){var S=window.getComputedStyle(I),_=S.fontSize,B=S.letterSpacing;(_!==d||B!==m)&&(f(_),g(B))}}},[d,m]);return s||n!=null&&n<=0||i!=null&&i<=0?null:w.createElement(eu,{zIndex:e.zIndex},w.createElement(al,{className:vi("recharts-cartesian-axis",a)},w.createElement(Gqe,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Lu(e)}),w.createElement(Zqe,{ref:v,axisType:c,events:u,fontSize:d,getTicksConfig:e,height:e.height,letterSpacing:m,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:l,unit:e.unit,width:e.width,x:e.x,y:e.y}),w.createElement(WHe,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},w.createElement(tWe,{label:e.label,labelRef:e.labelRef}),e.children)))}),LR=w.forwardRef((e,t)=>{var r=Ao(e,dm);return w.createElement(Jqe,y1({},r,{ref:t}))});LR.displayName="CartesianAxis";var Xqe=["x1","y1","x2","y2","key"],eKe=["offset"],tKe=["xAxisId","yAxisId"],rKe=["xAxisId","yAxisId"];function jW(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xl(e){for(var t=1;t{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:i,width:a,height:s,ry:l}=e;return w.createElement("rect",{x:n,y:i,ry:l,width:a,height:s,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function zfe(e){var{option:t,lineItemProps:r}=e,n;if(w.isValidElement(t))n=w.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,{x1:a,y1:s,x2:l,y2:c,key:u}=r,d=OI(r,Xqe),f=(i=Lu(d))!==null&&i!==void 0?i:{},{offset:m}=f,g=OI(f,eKe);n=w.createElement("line",jA({},g,{x1:a,y1:s,x2:l,y2:c,fill:"none",key:u}))}return n}function lKe(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:s}=e,l=OI(e,tKe),c=i.map((u,d)=>{var f=Xl(Xl({},l),{},{x1:t,y1:u,x2:t+r,y2:u,key:"line-".concat(d),index:d});return w.createElement(zfe,{key:"line-".concat(d),option:n,lineItemProps:f})});return w.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function cKe(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:s}=e,l=OI(e,rKe),c=i.map((u,d)=>{var f=Xl(Xl({},l),{},{x1:u,y1:t,x2:u,y2:t+r,key:"line-".concat(d),index:d});return w.createElement(zfe,{option:n,lineItemProps:f,key:"line-".concat(d)})});return w.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function uKe(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:a,height:s,horizontalPoints:l,horizontal:c=!0}=e;if(!c||!t||!t.length||l==null)return null;var u=l.map(f=>Math.round(f+i-i)).sort((f,m)=>f-m);i!==u[0]&&u.unshift(0);var d=u.map((f,m)=>{var g=!u[m+1],A=g?i+s-f:u[m+1]-f;if(A<=0)return null;var v=m%t.length;return w.createElement("rect",{key:"react-".concat(m),y:f,x:n,height:A,width:a,stroke:"none",fill:t[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return w.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function dKe(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:a,width:s,height:l,verticalPoints:c}=e;if(!t||!r||!r.length)return null;var u=c.map(f=>Math.round(f+i-i)).sort((f,m)=>f-m);i!==u[0]&&u.unshift(0);var d=u.map((f,m)=>{var g=!u[m+1],A=g?i+s-f:u[m+1]-f;if(A<=0)return null;var v=m%r.length;return w.createElement("rect",{key:"react-".concat(m),x:f,y:a,width:A,height:l,stroke:"none",fill:r[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return w.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var fKe=(e,t)=>{var{xAxis:r,width:n,height:i,offset:a}=e;return Tue(QR(Xl(Xl(Xl({},dm),r),{},{ticks:Pue(r),viewBox:{x:0,y:0,width:n,height:i}})),a.left,a.left+a.width,t)},hKe=(e,t)=>{var{yAxis:r,width:n,height:i,offset:a}=e;return Tue(QR(Xl(Xl(Xl({},dm),r),{},{ticks:Pue(r),viewBox:{x:0,y:0,width:n,height:i}})),a.top,a.top+a.height,t)},mKe={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:mo.grid};function YD(e){var t=u9(),r=d9(),n=$ue(),i=Xl(Xl({},Ao(e,mKe)),{},{x:Rr(e.x)?e.x:n.left,y:Rr(e.y)?e.y:n.top,width:Rr(e.width)?e.width:n.width,height:Rr(e.height)?e.height:n.height}),{xAxisId:a,yAxisId:s,x:l,y:c,width:u,height:d,syncWithTicks:f,horizontalValues:m,verticalValues:g}=i,A=ic(),v=Mr(z=>wH(z,"xAxis",a,A)),b=Mr(z=>wH(z,"yAxis",s,A));if(!th(u)||!th(d)||!Rr(l)||!Rr(c))return null;var E=i.verticalCoordinatesGenerator||fKe,I=i.horizontalCoordinatesGenerator||hKe,{horizontalPoints:S,verticalPoints:_}=i;if((!S||!S.length)&&typeof I=="function"){var B=m&&m.length,T=I({yAxis:b?Xl(Xl({},b),{},{ticks:B?m:b.ticks}):void 0,width:t??u,height:r??d,offset:n},B?!0:f);cI(Array.isArray(T),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof T,"]")),Array.isArray(T)&&(S=T)}if((!_||!_.length)&&typeof E=="function"){var P=g&&g.length,O=E({xAxis:v?Xl(Xl({},v),{},{ticks:P?g:v.ticks}):void 0,width:t??u,height:r??d,offset:n},P?!0:f);cI(Array.isArray(O),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(_=O)}return w.createElement(eu,{zIndex:i.zIndex},w.createElement("g",{className:"recharts-cartesian-grid"},w.createElement(oKe,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),w.createElement(uKe,jA({},i,{horizontalPoints:S})),w.createElement(dKe,jA({},i,{verticalPoints:_})),w.createElement(lKe,jA({},i,{offset:n,horizontalPoints:S,xAxis:v,yAxis:b})),w.createElement(cKe,jA({},i,{offset:n,verticalPoints:_,xAxis:v,yAxis:b}))))}YD.displayName="CartesianGrid";var pKe={},Hfe=Xc({name:"errorBars",initialState:pKe,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:i}=t.payload;e[r]&&(e[r]=e[r].map(a=>a.dataKey===n.dataKey&&a.direction===n.direction?i:a))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(i=>i.dataKey!==n.dataKey||i.direction!==n.direction))}}}),{addErrorBar:mIt,replaceErrorBar:pIt,removeErrorBar:gIt}=Hfe.actions,gKe=Hfe.reducer,AKe=["children"];function vKe(e,t){if(e==null)return{};var r,n,i=xKe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n({x:0,y:0,value:0}),errorBarOffset:0},bKe=w.createContext(yKe);function Wfe(e){var{children:t}=e,r=vKe(e,AKe);return w.createElement(bKe.Provider,{value:r},t)}function UR(e,t){var r,n,i=Mr(u=>Om(u,e)),a=Mr(u=>Rm(u,t)),s=(r=i?.allowDataOverflow)!==null&&r!==void 0?r:Zo.allowDataOverflow,l=(n=a?.allowDataOverflow)!==null&&n!==void 0?n:Jo.allowDataOverflow,c=s||l;return{needClip:c,needClipX:s,needClipY:l}}function Gfe(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=FR(),{needClipX:a,needClipY:s,needClip:l}=UR(t,r);if(!l||!i)return null;var{x:c,y:u,width:d,height:f}=i;return w.createElement("clipPath",{id:"clipPath-".concat(n)},w.createElement("rect",{x:a?c:c-d/2,y:s?u:u-f/2,width:a?d:d*2,height:s?f:f*2}))}var qfe=(e,t,r,n)=>ug(e,"xAxis",t,n),Kfe=(e,t,r,n)=>cg(e,"xAxis",t,n),Vfe=(e,t,r,n)=>ug(e,"yAxis",r,n),Yfe=(e,t,r,n)=>cg(e,"yAxis",r,n),wKe=dt([xi,qfe,Vfe,Kfe,Yfe],(e,t,r,n,i)=>Bg(e,"xAxis")?Fx(t,n,!1):Fx(r,i,!1)),EKe=(e,t,r,n,i)=>i;function CKe(e){return e.type==="line"}var IKe=dt([T6,EKe],(e,t)=>e.filter(CKe).find(r=>r.id===t)),SKe=dt([xi,qfe,Vfe,Kfe,Yfe,IKe,wKe,M9],(e,t,r,n,i,a,s,l)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:d}=l;if(!(a==null||t==null||r==null||n==null||i==null||n.length===0||i.length===0||s==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:f,data:m}=a,g;if(m!=null&&m.length>0?g=m:g=c?.slice(u,d+1),g!=null)return hVe({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:f,bandSize:s,displayedData:g})}});function BKe(e){var t=h1(e),r=3,n=2;if(t!=null){var{r:i,strokeWidth:a}=t,s=Number(i),l=Number(a);return(Number.isNaN(s)||s<0)&&(s=r),(Number.isNaN(l)||l<0)&&(l=n),{r:s,strokeWidth:l}}return{r,strokeWidth:n}}var u_={exports:{}},d_={};var DW;function NKe(){if(DW)return d_;DW=1;var e=ty();function t(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return d_.useSyncExternalStoreWithSelector=function(c,u,d,f,m){var g=i(null);if(g.current===null){var A={hasValue:!1,value:null};g.current=A}else A=g.current;g=s(function(){function b(B){if(!E){if(E=!0,I=B,B=f(B),m!==void 0&&A.hasValue){var T=A.value;if(m(T,B))return S=T}return S=B}if(T=S,r(I,B))return T;var P=f(B);return m!==void 0&&m(T,P)?(I=B,T):(I=B,S=P)}var E=!1,I,S,_=d===void 0?null:d;return[function(){return b(u())},_===null?void 0:function(){return b(_())}]},[u,d,f,m]);var v=n(c,g[0],g[1]);return a(function(){A.hasValue=!0,A.value=v},[v]),l(v),v},d_}var TW;function kKe(){return TW||(TW=1,u_.exports=NKe()),u_.exports}kKe();function _Ke(e){e()}function jKe(){let e=null,t=null;return{clear(){e=null,t=null},notify(){_Ke(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var PW={notify(){},get:()=>[]};function DKe(e,t){let r,n=PW,i=0,a=!1;function s(v){d();const b=n.subscribe(v);let E=!1;return()=>{E||(E=!0,b(),f())}}function l(){n.notify()}function c(){A.onStateChange&&A.onStateChange()}function u(){return a}function d(){i++,r||(r=e.subscribe(c),n=jKe())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=PW)}function m(){a||(a=!0,d())}function g(){a&&(a=!1,f())}const A={addNestedSub:s,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:u,trySubscribe:m,tryUnsubscribe:g,getListeners:()=>n};return A}var TKe=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",PKe=TKe(),OKe=()=>typeof navigator<"u"&&navigator.product==="ReactNative",RKe=OKe(),FKe=()=>PKe||RKe?w.useLayoutEffect:w.useEffect,MKe=FKe();function OW(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function QKe(e,t){if(OW(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i{const c=DKe(i);return{store:i,subscription:c,getServerState:n?()=>n:void 0}},[i,n]),s=w.useMemo(()=>i.getState(),[i]);MKe(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),s!==i.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,s]);const l=r||zKe;return w.createElement(l.Provider,{value:a},t)}var WKe=HKe,GKe=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius"]);function qKe(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function z6(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(GKe.has(n)){if(e[n]==null&&t[n]==null)continue;if(!QKe(e[n],t[n]))return!1}else if(!qKe(e[n],t[n]))return!1;return!0}var KKe=["id"],VKe=["type","layout","connectNulls","needClip","shape"],YKe=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function gb(){return gb=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{dataKey:t,name:r,stroke:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:Ay(r,t),payload:e}]},rVe=w.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:a,name:s,hide:l,unit:c,tooltipType:u,id:d}=e,f={dataDefinedOnItem:r,positions:void 0,settings:{stroke:n,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:Ay(s,t),hide:l,type:u,color:n,unit:c,graphicalItemId:d}};return w.createElement(OR,{tooltipEntrySettings:f})}),Zfe=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function nVe(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i{var n=r.reduce((f,m)=>f+m);if(!n)return Zfe(t,e);for(var i=Math.floor(e/n),a=e%n,s=t-e,l=[],c=0,u=0;ca){l=[...r.slice(0,c),a-u];break}var d=l.length%2===0?[0,s]:[s];return[...nVe(r,i),...l,...d].map(f=>"".concat(f,"px")).join(", ")};function aVe(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:a,needClip:s}=n,{id:l}=n,c=$R(n,KKe),u=Lu(c);return w.createElement(HGe,{points:r,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:a,baseProps:u,needClip:s,clipPathId:t})}function sVe(e){var{showLabels:t,children:r,points:n}=e,i=w.useMemo(()=>n?.map(a=>{var s,l,c={x:(s=a.x)!==null&&s!==void 0?s:0,y:(l=a.y)!==null&&l!==void 0?l:0,width:0,lowerWidth:0,upperWidth:0,height:0};return yf(yf({},c),{},{value:a.value,payload:a.payload,viewBox:c,parentViewBox:void 0,fill:void 0})}),[n]);return w.createElement(Cfe,{value:t?i:void 0},r)}function FW(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:a}=e,{type:s,layout:l,connectNulls:c,needClip:u,shape:d}=a,f=$R(a,VKe),m=yf(yf({},bc(f)),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(t,")"):void 0,points:n,type:s,layout:l,connectNulls:c,strokeDasharray:i??a.strokeDasharray});return w.createElement(w.Fragment,null,n?.length>1&&w.createElement(jR,gb({shapeType:"curve",option:d},m,{pathRef:r})),w.createElement(aVe,{points:n,clipPathId:t,props:a}))}function oVe(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function lVe(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:a}=e,{points:s,strokeDasharray:l,isAnimationActive:c,animationBegin:u,animationDuration:d,animationEasing:f,animateNewValues:m,width:g,height:A,onAnimationEnd:v,onAnimationStart:b}=r,E=i.current,I=Uw(s,"recharts-line-"),S=w.useRef(I),[_,B]=w.useState(!1),T=!_,P=w.useCallback(()=>{typeof v=="function"&&v(),B(!1)},[v]),O=w.useCallback(()=>{typeof b=="function"&&b(),B(!0)},[b]),z=oVe(n.current),L=w.useRef(0);S.current!==I&&(L.current=a.current,S.current=I);var W=L.current;return w.createElement(sVe,{points:s,showLabels:T},r.children,w.createElement(Lw,{animationId:I,begin:u,duration:d,isActive:c,easing:f,onAnimationEnd:P,onAnimationStart:O,key:I},R=>{var $=Ja(W,z+W,R),X=Math.min($,z),Z;if(c)if(l){var K="".concat(l).split(/[,\s]+/gim).map(ne=>parseFloat(ne));Z=iVe(X,z,K)}else Z=Zfe(z,X);else Z=l==null?void 0:String(l);if(R>0&&z>0&&(i.current=s,a.current=Math.max(a.current,X)),E){var q=E.length/s.length,Y=R===1?s:s.map((ne,ge)=>{var ae=Math.floor(ge*q);if(E[ae]){var pe=E[ae];return yf(yf({},ne),{},{x:Ja(pe.x,ne.x,R),y:Ja(pe.y,ne.y,R)})}return m?yf(yf({},ne),{},{x:Ja(g*2,ne.x,R),y:Ja(A/2,ne.y,R)}):yf(yf({},ne),{},{x:ne.x,y:ne.y})});return i.current=Y,w.createElement(FW,{props:r,points:Y,clipPathId:t,pathRef:n,strokeDasharray:Z})}return w.createElement(FW,{props:r,points:s,clipPathId:t,pathRef:n,strokeDasharray:Z})}),w.createElement(BR,{label:r.label}))}function cVe(e){var{clipPathId:t,props:r}=e,n=w.useRef(null),i=w.useRef(0),a=w.useRef(null);return w.createElement(lVe,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:a})}var uVe=(e,t)=>{var r,n;return{x:(r=e.x)!==null&&r!==void 0?r:void 0,y:(n=e.y)!==null&&n!==void 0?n:void 0,value:e.value,errorVal:na(e.payload,t)}};class dVe extends w.Component{render(){var{hide:t,dot:r,points:n,className:i,xAxisId:a,yAxisId:s,top:l,left:c,width:u,height:d,id:f,needClip:m,zIndex:g}=this.props;if(t)return null;var A=vi("recharts-line",i),v=f,{r:b,strokeWidth:E}=BKe(r),I=Dfe(r),S=b*2+E,_=m?"url(#clipPath-".concat(I?"":"dots-").concat(v,")"):void 0;return w.createElement(eu,{zIndex:g},w.createElement(al,{className:A},m&&w.createElement("defs",null,w.createElement(Gfe,{clipPathId:v,xAxisId:a,yAxisId:s}),!I&&w.createElement("clipPath",{id:"clipPath-dots-".concat(v)},w.createElement("rect",{x:c-S/2,y:l-S/2,width:u+S,height:d+S}))),w.createElement(Wfe,{xAxisId:a,yAxisId:s,data:n,dataPointFormatter:uVe,errorBarOffset:0},w.createElement(cVe,{props:this.props,clipPathId:v}))),w.createElement(uqe,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:_}))}}var Jfe={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:mo.line,type:"linear"};function fVe(e){var t=Ao(e,Jfe),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:s,connectNulls:l,dot:c,hide:u,isAnimationActive:d,label:f,legendType:m,xAxisId:g,yAxisId:A,id:v}=t,b=$R(t,YKe),{needClip:E}=UR(g,A),I=FR(),S=vy(),_=ic(),B=Mr(L=>SKe(L,g,A,_,v));if(S!=="horizontal"&&S!=="vertical"||B==null||I==null)return null;var{height:T,width:P,x:O,y:z}=I;return w.createElement(dVe,gb({},b,{id:v,connectNulls:l,dot:c,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:s,isAnimationActive:d,hide:u,label:f,legendType:m,xAxisId:g,yAxisId:A,points:B,layout:S,height:T,width:P,left:O,top:z,needClip:E}))}function hVe(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,dataKey:s,bandSize:l,displayedData:c}=e;return c.map((u,d)=>{var f=na(u,s);if(t==="horizontal"){var m=C$({axis:r,ticks:i,bandSize:l,entry:u,index:d}),g=ns(f)?null:n.scale(f);return{x:m,y:g,value:f,payload:u}}var A=ns(f)?null:r.scale(f),v=C$({axis:n,ticks:a,bandSize:l,entry:u,index:d});return A==null||v==null?null:{x:A,y:v,value:f,payload:u}}).filter(Boolean)}function mVe(e){var t=Ao(e,Jfe),r=ic();return w.createElement(RR,{id:t.id,type:"line"},n=>w.createElement(w.Fragment,null,w.createElement(Tfe,{legendPayload:tVe(t)}),w.createElement(rVe,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),w.createElement(Ofe,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),w.createElement(fVe,gb({},t,{id:n}))))}var EE=w.memo(mVe,z6);EE.displayName="Line";function L1(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:Ffe}function U1(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:Ffe}var pVe="Invariant failed";function gVe(e,t){throw new Error(pVe)}function ZD(){return ZD=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(Rr(t))return t;var a=Rr(n)||ns(n);return a?t(n,i):(a||gVe(),r)}},vVe=(e,t,r)=>r,xVe=(e,t)=>t,r5=dt([T6,xVe],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),yVe=dt([r5],e=>e?.maxBarSize),bVe=(e,t,r,n)=>n,wVe=dt([xi,T6,L1,U1,vVe],(e,t,r,n,i)=>t.filter(a=>e==="horizontal"?a.xAxisId===r:a.yAxisId===n).filter(a=>a.isPanorama===i).filter(a=>a.hide===!1).filter(a=>a.type==="bar")),EVe=(e,t,r)=>{var n=xi(e),i=L1(e,t),a=U1(e,t);if(!(i==null||a==null))return n==="horizontal"?$D(e,"yAxis",a,r):$D(e,"xAxis",i,r)},CVe=(e,t)=>{var r=xi(e),n=L1(e,t),i=U1(e,t);if(!(n==null||i==null))return r==="horizontal"?bH(e,"xAxis",n):bH(e,"yAxis",i)},IVe=dt([wVe,WLe,CVe],dqe),SVe=(e,t,r)=>{var n,i,a=r5(e,t);if(a!=null){var s=L1(e,t),l=U1(e,t);if(!(s==null||l==null)){var c=xi(e),u=ade(e),{maxBarSize:d}=a,f=ns(d)?u:d,m,g;return c==="horizontal"?(m=ug(e,"xAxis",s,r),g=cg(e,"xAxis",s,r)):(m=ug(e,"yAxis",l,r),g=cg(e,"yAxis",l,r)),(n=(i=Fx(m,g,!0))!==null&&i!==void 0?i:f)!==null&&n!==void 0?n:0}}},Xfe=(e,t,r)=>{var n=xi(e),i=L1(e,t),a=U1(e,t);if(!(i==null||a==null)){var s,l;return n==="horizontal"?(s=ug(e,"xAxis",i,r),l=cg(e,"xAxis",i,r)):(s=ug(e,"yAxis",a,r),l=cg(e,"yAxis",a,r)),Fx(s,l)}},BVe=dt([IVe,ade,HLe,sde,SVe,Xfe,yVe],gqe),NVe=(e,t,r)=>{var n=L1(e,t);if(n!=null)return ug(e,"xAxis",n,r)},kVe=(e,t,r)=>{var n=U1(e,t);if(n!=null)return ug(e,"yAxis",n,r)},_Ve=(e,t,r)=>{var n=L1(e,t);if(n!=null)return cg(e,"xAxis",n,r)},jVe=(e,t,r)=>{var n=U1(e,t);if(n!=null)return cg(e,"yAxis",n,r)},DVe=dt([BVe,r5],(e,t)=>{if(!(e==null||t==null)){var r=e.find(n=>n.stackId===t.stackId&&t.dataKey!=null&&n.dataKeys.includes(t.dataKey));if(r!=null)return r.position}}),TVe=dt([EVe,r5],Aqe),PVe=dt([To,l9,NVe,kVe,_Ve,jVe,DVe,xi,DLe,Xfe,TVe,r5,bVe],(e,t,r,n,i,a,s,l,c,u,d,f,m)=>{var{chartData:g,dataStartIndex:A,dataEndIndex:v}=c;if(!(f==null||s==null||t==null||l!=="horizontal"&&l!=="vertical"||r==null||n==null||i==null||a==null||u==null)){var{data:b}=f,E;if(b!=null&&b.length>0?E=b:E=g?.slice(A,v+1),E!=null)return cYe({layout:l,barSettings:f,pos:s,parentViewBox:t,bandSize:u,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,stackedData:d,displayedData:E,offset:e,cells:m,dataStartIndex:A})}}),OVe=["index"];function JD(){return JD=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=w.useContext(ehe);if(t!=null)return t.stackId;if(e!=null)return I9e(e)},QVe=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),LVe=e=>{var t=w.useContext(ehe);if(t!=null){var{stackId:r}=t;return"url(#".concat(QVe(r,e),")")}},UVe=e=>{var{index:t}=e,r=RVe(e,OVe),n=LVe(t);return w.createElement(al,JD({className:"recharts-bar-stack-layer",clipPath:n},r))},$Ve=["onMouseEnter","onMouseLeave","onClick"],zVe=["value","background","tooltipPosition"],HVe=["id"],WVe=["onMouseEnter","onClick","onMouseLeave"];function Em(){return Em=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{dataKey:t,name:r,fill:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:Ay(r,t),payload:e}]},ZVe=w.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:a,hide:s,unit:l,tooltipType:c,id:u}=e,d={dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:Ay(a,t),hide:s,type:c,color:i,unit:l,graphicalItemId:u}};return w.createElement(OR,{tooltipEntrySettings:d})});function JVe(e){var t=Mr(dg),{data:r,dataKey:n,background:i,allOtherBarProps:a}=e,{onMouseEnter:s,onMouseLeave:l,onClick:c}=a,u=FI(a,$Ve),d=DR(s,n,a.id),f=TR(l),m=PR(c,n,a.id);if(!i||r==null)return null;var g=h1(i);return w.createElement(eu,{zIndex:vqe(i,mo.barBackground)},r.map((A,v)=>{var{value:b,background:E,tooltipPosition:I}=A,S=FI(A,zVe);if(!E)return null;var _=d(A,v),B=f(A,v),T=m(A,v),P=gc(gc(gc(gc(gc({option:i,isActive:String(v)===t},S),{},{fill:"#eee"},E),g),Pw(u,A,v)),{},{onMouseEnter:_,onMouseLeave:B,onClick:T,dataKey:n,index:v,className:"recharts-bar-background-rectangle"});return w.createElement(RI,Em({key:"background-bar-".concat(v)},P))}))}function XVe(e){var{showLabels:t,children:r,rects:n}=e,i=n?.map(a=>{var s={x:a.x,y:a.y,width:a.width,lowerWidth:a.width,upperWidth:a.width,height:a.height};return gc(gc({},s),{},{value:a.value,payload:a.payload,parentViewBox:a.parentViewBox,viewBox:s,fill:a.fill})});return w.createElement(Cfe,{value:t?i:void 0},r)}function eYe(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:a,dataKey:s}=e,l=Mr(dg),c=Mr(yR),u=r&&String(a)===l&&(c==null||s===c),d=u?r:t;return u?w.createElement(eu,{zIndex:mo.activeBar},w.createElement(RI,Em({},n,{name:String(n.name)},i,{isActive:u,option:d,index:a,dataKey:s}))):w.createElement(RI,Em({},n,{name:String(n.name)},i,{isActive:u,option:d,index:a,dataKey:s}))}function tYe(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:a}=e;return w.createElement(RI,Em({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:a}))}function rYe(e){var t,{data:r,props:n}=e,i=(t=Lu(n))!==null&&t!==void 0?t:{},{id:a}=i,s=FI(i,HVe),{shape:l,dataKey:c,activeBar:u}=n,{onMouseEnter:d,onClick:f,onMouseLeave:m}=n,g=FI(n,WVe),A=DR(d,c,a),v=TR(m),b=PR(f,c,a);return r?w.createElement(w.Fragment,null,r.map((E,I)=>w.createElement(UVe,Em({index:I,key:"rectangle-".concat(E?.x,"-").concat(E?.y,"-").concat(E?.value,"-").concat(I),className:"recharts-bar-rectangle"},Pw(g,E,I),{onMouseEnter:A(E,I),onMouseLeave:v(E,I),onClick:b(E,I)}),u?w.createElement(eYe,{shape:l,activeBar:u,baseProps:s,entry:E,index:I,dataKey:c}):w.createElement(tYe,{shape:l,baseProps:s,entry:E,index:I,dataKey:c})))):null}function nYe(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:a,animationBegin:s,animationDuration:l,animationEasing:c,onAnimationEnd:u,onAnimationStart:d}=t,f=r.current,m=Uw(t,"recharts-bar-"),[g,A]=w.useState(!1),v=!g,b=w.useCallback(()=>{typeof u=="function"&&u(),A(!1)},[u]),E=w.useCallback(()=>{typeof d=="function"&&d(),A(!0)},[d]);return w.createElement(XVe,{showLabels:v,rects:n},w.createElement(Lw,{animationId:m,begin:s,duration:l,isActive:a,easing:c,onAnimationEnd:b,onAnimationStart:E,key:m},I=>{var S=I===1?n:n?.map((_,B)=>{var T=f&&f[B];if(T)return gc(gc({},_),{},{x:Ja(T.x,_.x,I),y:Ja(T.y,_.y,I),width:Ja(T.width,_.width,I),height:Ja(T.height,_.height,I)});if(i==="horizontal"){var P=Ja(0,_.height,I),O=Ja(_.stackedBarStart,_.y,I);return gc(gc({},_),{},{y:O,height:P})}var z=Ja(0,_.width,I),L=Ja(_.stackedBarStart,_.x,I);return gc(gc({},_),{},{width:z,x:L})});return I>0&&(r.current=S??null),S==null?null:w.createElement(al,null,w.createElement(rYe,{props:t,data:S}))}),w.createElement(BR,{label:t.label}),t.children)}function iYe(e){var t=w.useRef(null);return w.createElement(nYe,{previousRectanglesRef:t,props:e})}var the=0,aYe=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:na(e,t)}};class sYe extends w.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:i,xAxisId:a,yAxisId:s,needClip:l,background:c,id:u}=this.props;if(t||r==null)return null;var d=vi("recharts-bar",i),f=u;return w.createElement(al,{className:d,id:u},l&&w.createElement("defs",null,w.createElement(Gfe,{clipPathId:f,xAxisId:a,yAxisId:s})),w.createElement(al,{className:"recharts-bar-rectangles",clipPath:l?"url(#clipPath-".concat(f,")"):void 0},w.createElement(JVe,{data:r,dataKey:n,background:c,allOtherBarProps:this.props}),w.createElement(iYe,this.props)))}}var oYe={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:the,xAxisId:0,yAxisId:0,zIndex:mo.bar};function lYe(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:s,animationBegin:l,animationDuration:c,animationEasing:u,isAnimationActive:d}=e,{needClip:f}=UR(t,r),m=vy(),g=ic(),A=_R(e.children,t5),v=Mr(I=>PVe(I,e.id,g,A));if(m!=="vertical"&&m!=="horizontal")return null;var b,E=v?.[0];return E==null||E.height==null||E.width==null?b=0:b=m==="vertical"?E.height/2:E.width/2,w.createElement(Wfe,{xAxisId:t,yAxisId:r,data:v,dataPointFormatter:aYe,errorBarOffset:b},w.createElement(sYe,Em({},e,{layout:m,needClip:f,data:v,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:s,animationBegin:l,animationDuration:c,animationEasing:u,isAnimationActive:d})))}function cYe(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n},pos:i,bandSize:a,xAxis:s,yAxis:l,xAxisTicks:c,yAxisTicks:u,stackedData:d,displayedData:f,offset:m,cells:g,parentViewBox:A,dataStartIndex:v}=e,b=t==="horizontal"?l:s,E=d?b.scale.domain():null,I=S9e({numericAxis:b}),S=b.scale(I);return f.map((_,B)=>{var T,P,O,z,L,W;if(d){var R=d[B+v];if(R==null)return null;T=y9e(R,E)}else T=na(_,r),Array.isArray(T)||(T=[I,T]);var $=AVe(n,the)(T[1],B);if(t==="horizontal"){var X,[Z,K]=[l.scale(T[0]),l.scale(T[1])];P=I$({axis:s,ticks:c,bandSize:a,offset:i.offset,entry:_,index:B}),O=(X=K??Z)!==null&&X!==void 0?X:void 0,z=i.size;var q=Z-K;if(L=Fd(q)?0:q,W={x:P,y:m.top,width:z,height:m.height},Math.abs($)>0&&Math.abs(L)0&&Math.abs(z)w.createElement(w.Fragment,null,w.createElement(Tfe,{legendPayload:YVe(t)}),w.createElement(ZVe,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:i}),w.createElement(Ofe,{type:"bar",id:i,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:r,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),w.createElement(eu,{zIndex:t.zIndex},w.createElement(lYe,Em({},t,{id:i})))))}var rhe=w.memo(uYe,z6);rhe.displayName="Bar";var dYe=["domain","range"],fYe=["domain","range"];function QW(e,t){if(e==null)return{};var r,n,i=hYe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n{r.current===null?t(VGe(e)):r.current!==e&&t(YGe({prev:r.current,next:e})),r.current=e},[e,t]),w.useLayoutEffect(()=>()=>{r.current&&(t(ZGe(r.current)),r.current=null)},[t]),null}var vYe=e=>{var{xAxisId:t,className:r}=e,n=Mr(l9),i=ic(),a="xAxis",s=Mr(E=>Mde(E,a,t,i)),l=Mr(E=>Pde(E,t)),c=Mr(E=>$Ue(E,t)),u=Mr(E=>pde(E,t));if(l==null||c==null||u==null)return null;var{dangerouslySetInnerHTML:d,ticks:f,scale:m}=e,g=UW(e,mYe),{id:A,scale:v}=u,b=UW(u,pYe);return w.createElement(LR,XD({},g,b,{x:c.x,y:c.y,width:l.width,height:l.height,className:vi("recharts-".concat(a," ").concat(a),r),viewBox:n,ticks:s,axisType:a}))},xYe={allowDataOverflow:Zo.allowDataOverflow,allowDecimals:Zo.allowDecimals,allowDuplicatedCategory:Zo.allowDuplicatedCategory,angle:Zo.angle,axisLine:dm.axisLine,height:Zo.height,hide:!1,includeHidden:Zo.includeHidden,interval:Zo.interval,minTickGap:Zo.minTickGap,mirror:Zo.mirror,orientation:Zo.orientation,padding:Zo.padding,reversed:Zo.reversed,scale:Zo.scale,tick:Zo.tick,tickCount:Zo.tickCount,tickLine:dm.tickLine,tickSize:dm.tickSize,type:Zo.type,xAxisId:0},yYe=e=>{var t=Ao(e,xYe);return w.createElement(w.Fragment,null,w.createElement(AYe,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit}),w.createElement(vYe,t))},eT=w.memo(yYe,nhe);eT.displayName="XAxis";var bYe=["dangerouslySetInnerHTML","ticks","scale"],wYe=["id","scale"];function tT(){return tT=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r.current===null?t(JGe(e)):r.current!==e&&t(XGe({prev:r.current,next:e})),r.current=e},[e,t]),w.useLayoutEffect(()=>()=>{r.current&&(t(eqe(r.current)),r.current=null)},[t]),null}var IYe=e=>{var{yAxisId:t,className:r,width:n,label:i}=e,a=w.useRef(null),s=w.useRef(null),l=Mr(l9),c=ic(),u=Ba(),d="yAxis",f=Mr(T=>Ode(T,t)),m=Mr(T=>HUe(T,t)),g=Mr(T=>Mde(T,d,t,c)),A=Mr(T=>gde(T,t));if(w.useLayoutEffect(()=>{if(!(n!=="auto"||!f||SR(i)||w.isValidElement(i)||A==null)){var T=a.current;if(T){var P=T.getCalculatedWidth();Math.round(f.width)!==Math.round(P)&&u(tqe({id:t,width:P}))}}},[g,f,u,i,t,n,A]),f==null||m==null||A==null)return null;var{dangerouslySetInnerHTML:v,ticks:b,scale:E}=e,I=$W(e,bYe),{id:S,scale:_}=A,B=$W(A,wYe);return w.createElement(LR,tT({},I,B,{ref:a,labelRef:s,x:m.x,y:m.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:f.width,height:f.height,className:vi("recharts-".concat(d," ").concat(d),r),viewBox:l,ticks:g,axisType:d}))},SYe={allowDataOverflow:Jo.allowDataOverflow,allowDecimals:Jo.allowDecimals,allowDuplicatedCategory:Jo.allowDuplicatedCategory,angle:Jo.angle,axisLine:dm.axisLine,hide:!1,includeHidden:Jo.includeHidden,interval:Jo.interval,minTickGap:Jo.minTickGap,mirror:Jo.mirror,orientation:Jo.orientation,padding:Jo.padding,reversed:Jo.reversed,scale:Jo.scale,tick:Jo.tick,tickCount:Jo.tickCount,tickLine:dm.tickLine,tickSize:dm.tickSize,type:Jo.type,width:Jo.width,yAxisId:0},BYe=e=>{var t=Ao(e,SYe);return w.createElement(w.Fragment,null,w.createElement(CYe,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter}),w.createElement(IYe,t))},rT=w.memo(BYe,nhe);rT.displayName="YAxis";var NYe=(e,t)=>t,zR=dt([NYe,xi,hde,Oo,efe,Fm,sze,To],hze),HR=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},ihe=z0("mouseClick"),ahe=Fw();ahe.startListening({actionCreator:ihe,effect:(e,t)=>{var r=e.payload,n=zR(t.getState(),HR(r));n?.activeIndex!=null&&t.dispatch(i$e({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var nT=z0("mouseMove"),she=Fw(),_4=null;she.startListening({actionCreator:nT,effect:(e,t)=>{var r=e.payload;_4!==null&&cancelAnimationFrame(_4);var n=HR(r);_4=requestAnimationFrame(()=>{var i=t.getState(),a=mR(i,i.tooltip.settings.shared);if(a==="axis"){var s=zR(i,n);s?.activeIndex!=null?t.dispatch(Gde({activeIndex:s.activeIndex,activeDataKey:void 0,activeCoordinate:s.activeCoordinate})):t.dispatch(Wde())}_4=null})}});function kYe(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<>":t}var zW={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},ohe=Xc({name:"rootProps",initialState:zW,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:zW.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),_Ye=ohe.reducer,{updateOptions:jYe}=ohe.actions,lhe=Xc({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:DYe}=lhe.actions,TYe=lhe.reducer,che=z0("keyDown"),uhe=z0("focus"),WR=Fw();WR.startListening({actionCreator:che,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var s=pR(i,By(r),Yw(r),Xw(r)),l=s==null?-1:Number(s);if(!(!Number.isFinite(l)||l<0)){var c=Fm(r);if(a==="Enter"){var u=_I(r,"axis","hover",String(i.index));t.dispatch(HD({active:!i.active,activeIndex:i.index,activeCoordinate:u}));return}var d=KUe(r),f=d==="left-to-right"?1:-1,m=a==="ArrowRight"?1:-1,g=l+m*f;if(!(c==null||g>=c.length||g<0)){var A=_I(r,"axis","hover",String(g));t.dispatch(HD({active:!0,activeIndex:g.toString(),activeCoordinate:A}))}}}}}});WR.startListening({actionCreator:uhe,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var a="0",s=_I(r,"axis","hover",String(a));t.dispatch(HD({active:!0,activeIndex:a,activeCoordinate:s}))}}}});var I0=z0("externalEvent"),dhe=Fw(),f_=new Map;dhe.startListening({actionCreator:I0,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){n.persist();var i=n.type,a=f_.get(i);a!==void 0&&cancelAnimationFrame(a);var s=requestAnimationFrame(()=>{try{var l=t.getState(),c={activeCoordinate:H$e(l),activeDataKey:yR(l),activeIndex:dg(l),activeLabel:nfe(l),activeTooltipIndex:dg(l),isTooltipActive:W$e(l)};r(c,n)}finally{f_.delete(i)}});f_.set(i,s)}}});var PYe=dt([Iy],e=>e.tooltipItemPayloads),OYe=dt([PYe,Jw,(e,t)=>t,(e,t,r)=>r],(e,t,r,n)=>{var i=e.find(l=>l.settings.graphicalItemId===n);if(i!=null){var{positions:a}=i;if(a!=null){var s=t(a,r);return s}}}),fhe=z0("touchMove"),hhe=Fw();hhe.startListening({actionCreator:fhe,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){var n=t.getState(),i=mR(n,n.tooltip.settings.shared);if(i==="axis"){var a=r.touches[0];if(a==null)return;var s=zR(n,HR({clientX:a.clientX,clientY:a.clientY,currentTarget:r.currentTarget}));s?.activeIndex!=null&&t.dispatch(Gde({activeIndex:s.activeIndex,activeDataKey:void 0,activeCoordinate:s.activeCoordinate}))}else if(i==="item"){var l,c=r.touches[0];if(document.elementFromPoint==null||c==null)return;var u=document.elementFromPoint(c.clientX,c.clientY);if(!u||!u.getAttribute)return;var d=u.getAttribute(Rue),f=(l=u.getAttribute(Fue))!==null&&l!==void 0?l:void 0,m=Sy(n).find(v=>v.id===f);if(d==null||m==null||f==null)return;var{dataKey:g}=m,A=OYe(n,d,f);t.dispatch(Hde({activeDataKey:g,activeIndex:d,activeCoordinate:A,activeGraphicalItemId:f}))}}}});var RYe=iue({brush:xqe,cartesianAxis:rqe,chartData:Hze,errorBars:gKe,graphicalItems:lGe,layout:m9e,legend:ERe,options:Qze,polarAxis:wWe,polarOptions:TYe,referenceElements:Sqe,rootProps:_Ye,tooltip:a$e,zIndex:Bze}),FYe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return QOe({reducer:RYe,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([ahe.middleware,she.middleware,WR.middleware,dhe.middleware,hhe.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(xue({type:"raf"}))},devTools:{serialize:{replacer:kYe},name:"recharts-".concat(r)}})};function mhe(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=ic(),a=w.useRef(null);if(i)return r;a.current==null&&(a.current=FYe(t,n));var s=XO;return w.createElement(WKe,{context:s,store:a.current},r)}function MYe(e){var{layout:t,margin:r}=e,n=Ba(),i=ic();return w.useEffect(()=>{i||(n(d9e(t)),n(u9e(r)))},[n,i,t,r]),null}var phe=w.memo(MYe,z6);function ghe(e){var t=Ba();return w.useEffect(()=>{t(jYe(e))},[t,e]),null}function HW(e){var{zIndex:t,isPanorama:r}=e,n=w.useRef(null),i=Ba();return w.useLayoutEffect(()=>(n.current&&i(Ize({zIndex:t,element:n.current,isPanorama:r})),()=>{i(Sze({zIndex:t,isPanorama:r}))}),[i,t,r]),w.createElement("g",{tabIndex:-1,ref:n})}function WW(e){var{children:t,isPanorama:r}=e,n=Mr(pze);if(!n||n.length===0)return t;var i=n.filter(s=>s<0),a=n.filter(s=>s>0);return w.createElement(w.Fragment,null,i.map(s=>w.createElement(HW,{key:s,zIndex:s,isPanorama:r})),t,a.map(s=>w.createElement(HW,{key:s,zIndex:s,isPanorama:r})))}var QYe=["children"];function LYe(e,t){if(e==null)return{};var r,n,i=UYe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n{var r=u9(),n=d9(),i=e0e();if(!th(r)||!th(n))return null;var{children:a,otherAttributes:s,title:l,desc:c}=e,u,d;return s!=null&&(typeof s.tabIndex=="number"?u=s.tabIndex:u=i?0:void 0,typeof s.role=="string"?d=s.role:d=i?"application":void 0),w.createElement(zO,MI({},s,{title:l,desc:c,role:d,tabIndex:u,width:r,height:n,style:$Ye,ref:t}),a)}),HYe=e=>{var{children:t}=e,r=Mr(m6);if(!r)return null;var{width:n,height:i,y:a,x:s}=r;return w.createElement(zO,{width:n,height:i,x:s,y:a},t)},GW=w.forwardRef((e,t)=>{var{children:r}=e,n=LYe(e,QYe),i=ic();return i?w.createElement(HYe,null,w.createElement(WW,{isPanorama:!0},r)):w.createElement(zYe,MI({ref:t},n),w.createElement(WW,{isPanorama:!1},r))});function WYe(){var e=Ba(),[t,r]=w.useState(null),n=Mr(D9e);return w.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;ys(a)&&a!==n&&e(h9e(a))}},[t,e,n]),r}function qW(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function GYe(e){for(var t=1;t(Xze(),null);function QI(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var ZYe=w.forwardRef((e,t)=>{var r,n,i=w.useRef(null),[a,s]=w.useState({containerWidth:QI((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:QI((n=e.style)===null||n===void 0?void 0:n.height)}),l=w.useCallback((u,d)=>{s(f=>{var m=Math.round(u),g=Math.round(d);return f.containerWidth===m&&f.containerHeight===g?f:{containerWidth:m,containerHeight:g}})},[]),c=w.useCallback(u=>{if(typeof t=="function"&&t(u),u!=null&&typeof ResizeObserver<"u"){var{width:d,height:f}=u.getBoundingClientRect();l(d,f);var m=A=>{var{width:v,height:b}=A[0].contentRect;l(v,b)},g=new ResizeObserver(m);g.observe(u),i.current=g}},[t,l]);return w.useEffect(()=>()=>{var u=i.current;u?.disconnect()},[l]),w.createElement(w.Fragment,null,w.createElement(g6,{width:a.containerWidth,height:a.containerHeight}),w.createElement("div",b1({ref:c},e)))}),JYe=w.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,a]=w.useState({containerWidth:QI(r),containerHeight:QI(n)}),s=w.useCallback((c,u)=>{a(d=>{var f=Math.round(c),m=Math.round(u);return d.containerWidth===f&&d.containerHeight===m?d:{containerWidth:f,containerHeight:m}})},[]),l=w.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null){var{width:u,height:d}=c.getBoundingClientRect();s(u,d)}},[t,s]);return w.createElement(w.Fragment,null,w.createElement(g6,{width:i.containerWidth,height:i.containerHeight}),w.createElement("div",b1({ref:l},e)))}),XYe=w.forwardRef((e,t)=>{var{width:r,height:n}=e;return w.createElement(w.Fragment,null,w.createElement(g6,{width:r,height:n}),w.createElement("div",b1({ref:t},e)))}),eZe=w.forwardRef((e,t)=>{var{width:r,height:n}=e;return Am(r)||Am(n)?w.createElement(JYe,b1({},e,{ref:t})):w.createElement(XYe,b1({},e,{ref:t}))});function tZe(e){return e===!0?ZYe:eZe}var rZe=w.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:a,onContextMenu:s,onDoubleClick:l,onMouseDown:c,onMouseEnter:u,onMouseLeave:d,onMouseMove:f,onMouseUp:m,onTouchEnd:g,onTouchMove:A,onTouchStart:v,style:b,width:E,responsive:I,dispatchTouchEvents:S=!0}=e,_=w.useRef(null),B=Ba(),[T,P]=w.useState(null),[O,z]=w.useState(null),L=WYe(),W=c9(),R=W?.width>0?W.width:E,$=W?.height>0?W.height:i,X=w.useCallback(me=>{L(me),typeof t=="function"&&t(me),P(me),z(me),me!=null&&(_.current=me)},[L,t,P,z]),Z=w.useCallback(me=>{B(ihe(me)),B(I0({handler:a,reactEvent:me}))},[B,a]),K=w.useCallback(me=>{B(nT(me)),B(I0({handler:u,reactEvent:me}))},[B,u]),q=w.useCallback(me=>{B(Wde()),B(I0({handler:d,reactEvent:me}))},[B,d]),Y=w.useCallback(me=>{B(nT(me)),B(I0({handler:f,reactEvent:me}))},[B,f]),ne=w.useCallback(()=>{B(uhe())},[B]),ge=w.useCallback(me=>{B(che(me.key))},[B]),ae=w.useCallback(me=>{B(I0({handler:s,reactEvent:me}))},[B,s]),pe=w.useCallback(me=>{B(I0({handler:l,reactEvent:me}))},[B,l]),_e=w.useCallback(me=>{B(I0({handler:c,reactEvent:me}))},[B,c]),we=w.useCallback(me=>{B(I0({handler:m,reactEvent:me}))},[B,m]),xe=w.useCallback(me=>{B(I0({handler:v,reactEvent:me}))},[B,v]),Me=w.useCallback(me=>{S&&B(fhe(me)),B(I0({handler:A,reactEvent:me}))},[B,S,A]),ye=w.useCallback(me=>{B(I0({handler:g,reactEvent:me}))},[B,g]),Ee=tZe(I);return w.createElement(ufe.Provider,{value:T},w.createElement(yce.Provider,{value:O},w.createElement(Ee,{width:R??b?.width,height:$??b?.height,className:vi("recharts-wrapper",n),style:GYe({position:"relative",cursor:"default",width:R,height:$},b),onClick:Z,onContextMenu:ae,onDoubleClick:pe,onFocus:ne,onKeyDown:ge,onMouseDown:_e,onMouseEnter:K,onMouseLeave:q,onMouseMove:Y,onMouseUp:we,onTouchEnd:ye,onTouchMove:Me,onTouchStart:xe,ref:X},w.createElement(YYe,null),r)))}),nZe=["width","height","responsive","children","className","style","compact","title","desc"];function iZe(e,t){if(e==null)return{};var r,n,i=aZe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n{var{width:r,height:n,responsive:i,children:a,className:s,style:l,compact:c,title:u,desc:d}=e,f=iZe(e,nZe),m=Lu(f);return c?w.createElement(w.Fragment,null,w.createElement(g6,{width:r,height:n}),w.createElement(GW,{otherAttributes:m,title:u,desc:d},a)):w.createElement(rZe,{className:s,style:l,width:r,height:n,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},w.createElement(GW,{otherAttributes:m,title:u,desc:d,ref:t},w.createElement(Nqe,null,a)))});function iT(){return iT=Object.assign?Object.assign.bind():function(e){for(var t=1;tw.createElement(vhe,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:lZe,tooltipPayloadSearcher:IR,categoricalChartProps:e,ref:t})),uZe=["axis","item"],dZe=w.forwardRef((e,t)=>w.createElement(vhe,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:uZe,tooltipPayloadSearcher:IR,categoricalChartProps:e,ref:t}));function fZe(e){var t=Ba();return w.useEffect(()=>{t(DYe(e))},[t,e]),null}var hZe=["layout"];function aT(){return aT=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=Ao(e,wZe);return w.createElement(AZe,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:bZe,tooltipPayloadSearcher:IR,categoricalChartProps:r,ref:t})});const CZe={light:"",dark:".dark"},yhe=w.createContext(null);function bhe(){const e=w.useContext(yhe);if(!e)throw new Error("useChart must be used within a ");return e}const CE=w.forwardRef(({id:e,className:t,children:r,config:n,...i},a)=>{const s=w.useId(),l=`chart-${e||s.replace(/:/g,"")}`;return o.jsx(yhe.Provider,{value:{config:n},children:o.jsxs("div",{"data-chart":l,ref:a,className:qt("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...i,children:[o.jsx(IZe,{id:l,config:n}),o.jsx(sRe,{children:r})]})})});CE.displayName="Chart";const IZe=({id:e,config:t})=>{const r=Object.entries(t).filter(([,n])=>n.theme||n.color);return r.length?o.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(CZe).map(([n,i])=>` ${i} [data-chart=${e}] { ${r.map(([a,s])=>{const l=s.theme?.[n]||s.color;return l?` --color-${a}: ${l};`:null}).join(` `)} } `).join(` `)}}):null},h_=oHe,IE=w.forwardRef(({active:e,payload:t,className:r,indicator:n="dot",hideLabel:i=!1,hideIndicator:a=!1,label:s,labelFormatter:l,labelClassName:c,formatter:u,color:d,nameKey:f,labelKey:m},g)=>{const{config:A}=bhe(),v=w.useMemo(()=>{if(i||!t?.length)return null;const[E]=t,I=`${m||E?.dataKey||E?.name||"value"}`,S=sT(A,E,I),_=!m&&typeof s=="string"?A[s]?.label||s:S?.label;return l?o.jsx("div",{className:qt("font-medium",c),children:l(_,t)}):_?o.jsx("div",{className:qt("font-medium",c),children:_}):null},[s,l,t,i,c,A,m]);if(!e||!t?.length)return null;const b=t.length===1&&n!=="dot";return o.jsxs("div",{ref:g,className:qt("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",r),children:[b?null:v,o.jsx("div",{className:"grid gap-1.5",children:t.map((E,I)=>{const S=`${f||E.name||E.dataKey||"value"}`,_=sT(A,E,S),B=d||E.payload.fill||E.color;return o.jsx("div",{className:qt("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",n==="dot"&&"items-center"),children:u&&E?.value!==void 0&&E.name?u(E.value,E.name,E,I,E.payload):o.jsxs(o.Fragment,{children:[_?.icon?o.jsx(_.icon,{}):!a&&o.jsx("div",{className:qt("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":n==="dot","w-1":n==="line","w-0 border-[1.5px] border-dashed bg-transparent":n==="dashed","my-0.5":b&&n==="dashed"}),style:{"--color-bg":B,"--color-border":B}}),o.jsxs("div",{className:qt("flex flex-1 justify-between leading-none",b?"items-end":"items-center"),children:[o.jsxs("div",{className:"grid gap-1.5",children:[b?v:null,o.jsx("span",{className:"text-muted-foreground",children:_?.label||E.name})]}),E.value&&o.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:E.value.toLocaleString()})]})]})},E.dataKey)})})]})});IE.displayName="ChartTooltip";const SZe=w.forwardRef(({className:e,hideIcon:t=!1,payload:r,verticalAlign:n="bottom",nameKey:i},a)=>{const{config:s}=bhe();return r?.length?o.jsx("div",{ref:a,className:qt("flex items-center justify-center gap-4",n==="top"?"pb-3":"pt-3",e),children:r.map(l=>{const c=`${i||l.dataKey||"value"}`,u=sT(s,l,c);return o.jsxs("div",{className:qt("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[u?.icon&&!t?o.jsx(u.icon,{}):o.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:l.color}}),u?.label]},l.value)})}):null});SZe.displayName="ChartLegend";function sT(e,t,r){if(typeof t!="object"||t===null)return;const n="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let i=r;return r in t&&typeof t[r]=="string"?i=t[r]:n&&r in n&&typeof n[r]=="string"&&(i=n[r]),i in e?e[i]:e[r]}function BZe(){const[e,t]=w.useState(""),[r,n]=w.useState("all"),[i,a]=w.useState("all"),[s,l]=w.useState("all"),[c,u]=w.useState(null),[d,f]=w.useState(!1),[m,g]=w.useState(void 0),[A,v]=w.useState(void 0),[b,E]=w.useState(!1),{data:I=[],isLoading:S}=TO(),{data:_=[],isLoading:B}=Ar({queryKey:["/api/mission-revenues"],queryFn:()=>Q8e()}),{data:T=[],isLoading:P}=Ar({queryKey:["/api/mission-expenses"],queryFn:()=>H8e()}),{data:O=[],isLoading:z}=X8e(),{data:L=[],isLoading:W}=nDe(),{data:R=[],isLoading:$}=Ar({queryKey:["/api/trips"]}),{data:X=[],isLoading:Z}=Ar({queryKey:["/api/maintenances"],queryFn:()=>Mle()}),{data:K=[],isLoading:q}=Ar({queryKey:["/api/breakdowns"],queryFn:()=>J3()}),Y=S||B||P||z||W||$||Z||q,ne=ke=>_.filter(he=>he.missionId===ke).reduce((he,Le)=>he+(Le.montantRecu||Le.montantPrevu||0),0),ge=ke=>{let he=0;const Le=T.filter(vt=>vt.missionId===ke.id).reduce((vt,mt)=>vt+mt.montant,0),Ye=R.filter(vt=>vt.missionId===ke.id),Oe=O.filter(vt=>Ye.some(mt=>mt.id===vt.tripId)).reduce((vt,mt)=>vt+mt.montant,0),it=Ye.reduce((vt,mt)=>vt+(mt.fuelFillCostFcfa||0),0);return he=Le+Oe+it,he},ae=w.useMemo(()=>I.map(ke=>{const he=ne(ke.id),Le=ge(ke),Ye=he-Le,Oe=he>0?Ye/he*100:0;let it="profitable";return Ye<0?it="loss":Oe<10&&(it="low_margin"),{mission:ke,revenues:he,costs:Le,benefit:Ye,margin:Oe,status:it}}),[I,_,T,O,R]),pe=ke=>{if(ke==="custom")return{start:m?s1(m):null,end:A?yL(A):null};const he=new Date;switch(ke){case"today":return{start:s1(he),end:yL(he)};case"week":return{start:a1(he,{locale:tn}),end:DP(he,{locale:tn})};case"month":return{start:Fee(he),end:Oee(he)};case"quarter":return{start:pCe(he),end:vCe(he)};case"year":return{start:jP(he),end:Mee(he)};default:return{start:null,end:null}}},_e=ke=>{n(ke),ke!=="custom"?(g(void 0),v(void 0),E(!1)):E(!0)},we=()=>{if(m&&A){if(m>A){const ke=m;g(A),v(ke)}E(!1)}},xe=w.useMemo(()=>{const{start:ke,end:he}=pe(r);return ae.filter(Le=>{if(ke&&he&&Le.mission.startAt){const vt=new Date(Le.mission.startAt);if(vthe)return!1}const Ye=!e||Le.mission.code.toLowerCase().includes(e.toLowerCase())||Le.mission.clientName.toLowerCase().includes(e.toLowerCase()),Oe=i==="all"||Le.mission.id.toString()===i,it=s==="all"||s==="profitable"&&Le.status==="profitable"||s==="low_margin"&&Le.status==="low_margin"||s==="loss"&&Le.status==="loss";return Ye&&Oe&&it})},[ae,e,i,s,r]),Me=w.useMemo(()=>{const ke=xe.reduce((Oe,it)=>Oe+it.revenues,0),he=xe.reduce((Oe,it)=>Oe+it.costs,0),Le=ke-he,Ye=ke>0?Le/ke*100:0;return{revenues:ke,costs:he,benefit:Le,margin:Ye}},[xe]),ye=w.useMemo(()=>{if(r==="all"||!xe.length)return[];const{start:ke,end:he}=pe(r);if(!ke||!he)return[];const Le=new Map;return xe.forEach(Ye=>{if(!Ye.mission.startAt)return;const Oe=new Date(Ye.mission.startAt),it=Kr(Oe,"yyyy-MM-dd"),vt=Le.get(it)||{date:it,revenues:0,costs:0,benefit:0};vt.revenues+=Ye.revenues,vt.costs+=Ye.costs,vt.benefit+=Ye.benefit,Le.set(it,vt)}),Array.from(Le.values()).sort((Ye,Oe)=>Ye.date.localeCompare(Oe.date)).map(Ye=>({...Ye,date:Kr(new Date(Ye.date),r==="year"||r==="quarter"?"MMM":"dd/MM",{locale:tn})}))},[xe,r]),Ee=w.useMemo(()=>{const ke={Carburant:0,Péages:0,Douanes:0,Réparations:0,Consommables:0,"Main d'œuvre":0,"Dépenses mission":0,Autres:0};return xe.forEach(he=>{T.filter(it=>it.missionId===he.mission.id).forEach(it=>{ke["Dépenses mission"]+=it.montant});const Ye=R.filter(it=>it.missionId===he.mission.id);O.filter(it=>Ye.some(vt=>vt.id===it.tripId)).forEach(it=>{const vt=it.categorie;vt==="carburant"?ke.Carburant+=it.montant:vt==="peage"?ke.Péages+=it.montant:vt==="douane"?ke.Douanes+=it.montant:vt==="reparation"?ke.Réparations+=it.montant:vt==="consommables"?ke.Consommables+=it.montant:vt==="main_oeuvre"?ke["Main d'œuvre"]+=it.montant:ke.Autres+=it.montant}),Ye.forEach(it=>{it.fuelFillCostFcfa&&(ke.Carburant+=it.fuelFillCostFcfa)})}),Object.entries(ke).filter(([he,Le])=>Le>0).map(([he,Le])=>({name:he,value:Le})).sort((he,Le)=>Le.value-he.value)},[xe,T,O,R]),me=w.useMemo(()=>xe.sort((ke,he)=>he.benefit-ke.benefit).slice(0,10).map(ke=>({name:ke.mission.code,benefit:ke.benefit,revenues:ke.revenues,costs:ke.costs})),[xe]),Se=ke=>{const he=ke.mission,Le=R.filter(Oe=>Oe.missionId===he.id);return{missionExpenses:T.filter(Oe=>Oe.missionId===he.id),tripExpenses:O.filter(Oe=>Le.some(it=>it.id===Oe.tripId)),fuelCosts:Le.reduce((Oe,it)=>Oe+(it.fuelFillCostFcfa||0),0),trips:Le}},Ie=()=>{const ke=["Mission","Client","Revenus (FCFA)","Coûts (FCFA)","Bénéfice (FCFA)","Marge (%)","Statut"],he=xe.map(vt=>[vt.mission.code,vt.mission.clientName,vt.revenues.toString(),vt.costs.toString(),vt.benefit.toString(),vt.margin.toFixed(2),vt.status==="profitable"?"Rentable":vt.status==="low_margin"?"Faible marge":"Perte"]),Le=[ke.join(","),...he.map(vt=>vt.map(mt=>`"${mt}"`).join(","))].join(` `),Ye=new Blob(["\uFEFF"+Le],{type:"text/csv;charset=utf-8;"}),Oe=document.createElement("a"),it=URL.createObjectURL(Ye);Oe.setAttribute("href",it),Oe.setAttribute("download",`finance-${Kr(new Date,"yyyy-MM-dd")}.csv`),Oe.style.visibility="hidden",document.body.appendChild(Oe),Oe.click(),document.body.removeChild(Oe)},Be=ke=>{u(ke),f(!0)},Xe=ke=>new Intl.NumberFormat("fr-FR",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(ke)+" FCFA";return Y?o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl md:text-2xl font-semibold",children:"Finance"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Statistiques et analyse financière"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs(ui,{value:r,onValueChange:_e,children:[o.jsx(ei,{className:"h-10 w-[180px]",children:o.jsx(di,{placeholder:"Période"})}),o.jsxs(ti,{children:[o.jsx(Tr,{value:"all",children:"Toutes les périodes"}),o.jsx(Tr,{value:"today",children:"Aujourd'hui"}),o.jsx(Tr,{value:"week",children:"Cette semaine"}),o.jsx(Tr,{value:"month",children:"Ce mois"}),o.jsx(Tr,{value:"quarter",children:"Ce trimestre"}),o.jsx(Tr,{value:"year",children:"Cette année"}),o.jsx(Tr,{value:"custom",children:"Période personnalisée"})]})]}),r==="custom"&&o.jsxs(IDe,{open:b,onOpenChange:E,children:[o.jsx(SDe,{asChild:!0,children:o.jsxs(Pe,{variant:"outline",className:qt("h-10 w-[280px] justify-start text-left font-normal",!m&&!A&&"text-muted-foreground"),children:[o.jsx(tc,{className:"mr-2 h-4 w-4"}),m&&A?o.jsxs(o.Fragment,{children:[Kr(m,"dd/MM/yyyy",{locale:tn})," -"," ",Kr(A,"dd/MM/yyyy",{locale:tn})]}):m?Kr(m,"dd/MM/yyyy",{locale:tn}):o.jsx("span",{children:"Sélectionner une période"})]})}),o.jsx(Jle,{className:"w-auto p-0",align:"start",children:o.jsxs("div",{className:"p-4 space-y-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Date de début"}),o.jsx(tD,{mode:"single",selected:m,onSelect:g,locale:tn})]}),o.jsx(vd,{}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Date de fin"}),o.jsx(tD,{mode:"single",selected:A,onSelect:v,locale:tn,disabled:ke=>m?ke{g(void 0),v(void 0)},children:"Réinitialiser"}),o.jsx(Pe,{size:"sm",onClick:we,disabled:!m||!A,children:"Appliquer"})]})]})})]})]})]}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[o.jsxs(_t,{children:[o.jsxs(Xr,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[o.jsx(cn,{className:"text-sm font-medium",children:"Revenus Totaux"}),o.jsx(eX,{className:"h-4 w-4 text-muted-foreground"})]}),o.jsxs(ar,{children:[o.jsx("div",{className:"text-2xl font-bold text-green-600",children:Xe(Me.revenues)}),o.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[o.jsx(B8,{className:"inline h-3 w-3 mr-1"}),"Toutes les missions"]})]})]}),o.jsxs(_t,{children:[o.jsxs(Xr,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[o.jsx(cn,{className:"text-sm font-medium",children:"Coûts Totaux"}),o.jsx(bx,{className:"h-4 w-4 text-muted-foreground"})]}),o.jsxs(ar,{children:[o.jsx("div",{className:"text-2xl font-bold text-red-600",children:Xe(Me.costs)}),o.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[o.jsx(_be,{className:"inline h-3 w-3 mr-1"}),"Toutes les missions"]})]})]}),o.jsxs(_t,{children:[o.jsxs(Xr,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[o.jsx(cn,{className:"text-sm font-medium",children:"Bénéfice Net"}),o.jsx(B8,{className:"h-4 w-4 text-muted-foreground"})]}),o.jsxs(ar,{children:[o.jsx("div",{className:`text-2xl font-bold ${Me.benefit>=0?"text-blue-600":"text-red-600"}`,children:Xe(Me.benefit)}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:Me.benefit>=0?"Bénéfice":"Perte"})]})]}),o.jsxs(_t,{children:[o.jsxs(Xr,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[o.jsx(cn,{className:"text-sm font-medium",children:"Marge (%)"}),o.jsx(ng,{className:"h-4 w-4 text-muted-foreground"})]}),o.jsxs(ar,{children:[o.jsxs("div",{className:`text-2xl font-bold ${Me.margin>=30?"text-green-600":Me.margin>=10?"text-yellow-600":"text-red-600"}`,children:[Me.margin.toFixed(1),"%"]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Taux de marge globale"})]})]})]}),o.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center gap-3",children:[o.jsxs("div",{className:"relative flex-1",children:[o.jsx(U0,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(wt,{placeholder:"Rechercher une mission...",value:e,onChange:ke=>t(ke.target.value),className:"pl-9 h-10"})]}),o.jsxs(ui,{value:i,onValueChange:a,children:[o.jsx(ei,{className:"h-10 w-full md:w-[200px]",children:o.jsx(di,{placeholder:"Toutes les missions"})}),o.jsxs(ti,{children:[o.jsx(Tr,{value:"all",children:"Toutes les missions"}),I.map(ke=>o.jsx(Tr,{value:ke.id.toString(),children:ke.code},ke.id))]})]}),o.jsxs(ui,{value:s,onValueChange:l,children:[o.jsx(ei,{className:"h-10 w-full md:w-[200px]",children:o.jsx(di,{placeholder:"Tous les statuts"})}),o.jsxs(ti,{children:[o.jsx(Tr,{value:"all",children:"Tous les statuts"}),o.jsx(Tr,{value:"profitable",children:"Rentables"}),o.jsx(Tr,{value:"low_margin",children:"Faible marge"}),o.jsx(Tr,{value:"loss",children:"En perte"})]})]}),o.jsxs(Pe,{variant:"outline",size:"sm",className:"h-10",onClick:Ie,children:[o.jsx(gbe,{className:"h-4 w-4 mr-2"}),"Exporter CSV"]})]}),o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Missions Financières"}),o.jsx(Qi,{children:"Détail des revenus, coûts et bénéfices par mission"})]}),o.jsx(ar,{children:o.jsx("div",{className:"overflow-x-auto",children:o.jsxs(O1,{children:[o.jsx(R1,{children:o.jsxs(xc,{children:[o.jsx(Pn,{children:"Mission"}),o.jsx(Pn,{children:"Client"}),o.jsx(Pn,{className:"text-right",children:"Revenus"}),o.jsx(Pn,{className:"text-right",children:"Coûts"}),o.jsx(Pn,{className:"text-right",children:"Bénéfice"}),o.jsx(Pn,{className:"text-right",children:"Marge"}),o.jsx(Pn,{children:"Statut"})]})}),o.jsx(F1,{children:xe.length===0?o.jsx(xc,{children:o.jsx(kn,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"Aucune mission trouvée"})}):xe.map(ke=>o.jsxs(xc,{className:"hover:bg-muted/50",children:[o.jsx(kn,{children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ny,{href:`/missions/${ke.mission.id}`,className:"font-medium text-primary hover:underline",children:ke.mission.code}),o.jsx(Pe,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>Be(ke),title:"Voir les détails",children:o.jsx(oP,{className:"h-3 w-3"})})]})}),o.jsx(kn,{children:ke.mission.clientName}),o.jsx(kn,{className:"text-right font-medium text-green-600",children:Xe(ke.revenues)}),o.jsx(kn,{className:"text-right font-medium text-red-600",children:Xe(ke.costs)}),o.jsx(kn,{className:`text-right font-bold ${ke.benefit>=0?"text-blue-600":"text-red-600"}`,children:Xe(ke.benefit)}),o.jsxs(kn,{className:`text-right ${ke.margin>=30?"text-green-600":ke.margin>=10?"text-yellow-600":"text-red-600"}`,children:[ke.margin.toFixed(1),"%"]}),o.jsx(kn,{children:o.jsx(ir,{variant:"outline",className:ke.status==="profitable"?"bg-green-100 text-green-800 border-green-300":ke.status==="low_margin"?"bg-yellow-100 text-yellow-800 border-yellow-300":"bg-red-100 text-red-800 border-red-300",children:ke.status==="profitable"?"✓ Rentable":ke.status==="low_margin"?"⚠️ Faible marge":"❌ Perte"})})]},ke.mission.id))})]})})})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[ye.length>0&&o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Évolution Temporelle"}),o.jsx(Qi,{children:"Revenus, coûts et bénéfice dans le temps"})]}),o.jsx(ar,{children:o.jsx(CE,{config:{revenues:{label:"Revenus",color:"hsl(var(--chart-1))"},costs:{label:"Coûts",color:"hsl(var(--chart-2))"},benefit:{label:"Bénéfice",color:"hsl(var(--chart-3))"}},children:o.jsxs(cZe,{data:ye,children:[o.jsx(YD,{strokeDasharray:"3 3"}),o.jsx(eT,{dataKey:"date"}),o.jsx(rT,{}),o.jsx(h_,{content:o.jsx(IE,{})}),o.jsx(Xue,{}),o.jsx(EE,{type:"monotone",dataKey:"revenues",stroke:"#10b981",strokeWidth:2,name:"Revenus"}),o.jsx(EE,{type:"monotone",dataKey:"costs",stroke:"#ef4444",strokeWidth:2,name:"Coûts"}),o.jsx(EE,{type:"monotone",dataKey:"benefit",stroke:"#3b82f6",strokeWidth:2,name:"Bénéfice"})]})})})]}),Ee.length>0&&o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Répartition des Coûts"}),o.jsx(Qi,{children:"Par catégorie de dépense"})]}),o.jsx(ar,{children:o.jsx(CE,{config:Ee.reduce((ke,he)=>(ke[he.name]={label:he.name},ke),{}),children:o.jsxs(EZe,{children:[o.jsx(Rfe,{data:Ee,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:100,label:({name:ke,percent:he})=>`${ke} ${(he*100).toFixed(0)}%`,children:Ee.map((ke,he)=>o.jsx(t5,{fill:`hsl(${he*360/Ee.length}, 70%, 50%)`},`cell-${he}`))}),o.jsx(h_,{content:o.jsx(IE,{})})]})})})]}),me.length>0&&o.jsxs(_t,{className:"lg:col-span-2",children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Top 10 Missions par Bénéfice"}),o.jsx(Qi,{children:"Les missions les plus rentables"})]}),o.jsx(ar,{children:o.jsx(CE,{config:{benefit:{label:"Bénéfice",color:"hsl(var(--chart-1))"}},children:o.jsxs(dZe,{data:me,layout:"vertical",children:[o.jsx(YD,{strokeDasharray:"3 3"}),o.jsx(eT,{type:"number"}),o.jsx(rT,{dataKey:"name",type:"category",width:100}),o.jsx(h_,{content:o.jsx(IE,{})}),o.jsx(rhe,{dataKey:"benefit",fill:"#3b82f6",name:"Bénéfice (FCFA)"})]})})})]})]}),c&&o.jsx(ci,{open:d,onOpenChange:f,children:o.jsxs(Zn,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsxs(Xn,{children:["Détail Financier - ",c.mission.code]}),o.jsxs(Ci,{children:["Client: ",c.mission.clientName," | Statut: ",c.mission.status]})]}),o.jsxs("div",{className:"space-y-6 py-4",children:[o.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[o.jsxs(_t,{children:[o.jsx(Xr,{className:"pb-2",children:o.jsx(cn,{className:"text-sm",children:"Revenus"})}),o.jsx(ar,{children:o.jsx("div",{className:"text-2xl font-bold text-green-600",children:Xe(c.revenues)})})]}),o.jsxs(_t,{children:[o.jsx(Xr,{className:"pb-2",children:o.jsx(cn,{className:"text-sm",children:"Coûts"})}),o.jsx(ar,{children:o.jsx("div",{className:"text-2xl font-bold text-red-600",children:Xe(c.costs)})})]}),o.jsxs(_t,{children:[o.jsx(Xr,{className:"pb-2",children:o.jsx(cn,{className:"text-sm",children:"Bénéfice"})}),o.jsxs(ar,{children:[o.jsx("div",{className:`text-2xl font-bold ${c.benefit>=0?"text-blue-600":"text-red-600"}`,children:Xe(c.benefit)}),o.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Marge: ",c.margin.toFixed(1),"%"]})]})]})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"font-semibold mb-3",children:"💰 Revenus"}),o.jsxs("div",{className:"space-y-2",children:[_.filter(ke=>ke.missionId===c.mission.id).map(ke=>o.jsxs("div",{className:"flex items-center justify-between p-3 bg-muted rounded-lg",children:[o.jsxs("div",{children:[o.jsx("div",{className:"font-medium",children:Xe(ke.montantRecu||ke.montantPrevu||0)}),o.jsxs("div",{className:"text-sm text-muted-foreground",children:[ke.montantRecu?"Reçu":"Prévu"," | ",ke.origineContrat||"N/A"]})]}),ke.montantPrevu&&ke.montantRecu&&ke.montantPrevu!==ke.montantRecu&&o.jsxs(ir,{variant:"outline",className:"text-xs",children:["Différence: ",Xe(ke.montantPrevu-ke.montantRecu)]})]},ke.id)),_.filter(ke=>ke.missionId===c.mission.id).length===0&&o.jsx("p",{className:"text-sm text-muted-foreground",children:"Aucun revenu enregistré"})]})]}),o.jsx(vd,{}),o.jsxs("div",{children:[o.jsx("h3",{className:"font-semibold mb-3",children:"💸 Coûts Détaillés"}),(()=>{const ke=Se(c);return o.jsxs(o.Fragment,{children:[ke.missionExpenses.length>0&&o.jsxs("div",{className:"mb-4",children:[o.jsx("h4",{className:"text-sm font-medium mb-2",children:"📦 Dépenses Mission"}),o.jsx("div",{className:"space-y-2",children:ke.missionExpenses.map(he=>o.jsxs("div",{className:"flex items-center justify-between p-2 bg-muted rounded",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"font-medium text-sm",children:[he.categorie,": ",Xe(he.montant)]}),he.description&&o.jsx("div",{className:"text-xs text-muted-foreground",children:he.description}),he.date&&o.jsx("div",{className:"text-xs text-muted-foreground",children:Kr(new Date(he.date),"dd/MM/yyyy",{locale:tn})})]}),he.justificatifUrl&&o.jsx("a",{href:he.justificatifUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline",children:"📎 Justificatif"})]},he.id))})]}),ke.tripExpenses.length>0&&o.jsxs("div",{className:"mb-4",children:[o.jsxs("h4",{className:"text-sm font-medium mb-2",children:["🚛 Dépenses Voyages (",ke.trips.length," voyage",ke.trips.length>1?"s":"",")"]}),o.jsx("div",{className:"space-y-2",children:ke.tripExpenses.map(he=>{const Le=ke.trips.find(Ye=>Ye.id===he.tripId);return o.jsxs("div",{className:"flex items-center justify-between p-2 bg-muted rounded",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"font-medium text-sm",children:[he.categorie,": ",Xe(he.montant)]}),Le&&o.jsxs("div",{className:"text-xs text-muted-foreground",children:[Le.origine," → ",Le.destination]}),he.description&&o.jsx("div",{className:"text-xs text-muted-foreground",children:he.description})]}),he.justificatifUrl&&o.jsx("a",{href:he.justificatifUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline",children:"📎"})]},he.id)})})]}),ke.fuelCosts>0&&o.jsxs("div",{className:"mb-4",children:[o.jsx("h4",{className:"text-sm font-medium mb-2",children:"⛽ Coûts Carburant"}),o.jsxs("div",{className:"p-2 bg-muted rounded",children:[o.jsxs("div",{className:"font-medium text-sm",children:["Total: ",Xe(ke.fuelCosts)]}),o.jsxs("div",{className:"text-xs text-muted-foreground",children:["Réparti sur ",ke.trips.length," voyage",ke.trips.length>1?"s":""]})]})]})]})})()]})]})]})})]})}const NZe={planned:"Planifiée",in_progress:"En cours",completed:"Terminée",cancelled:"Annulée"},YW={planned:"bg-blue-100 text-blue-800 border-blue-300",in_progress:"bg-yellow-100 text-yellow-800 border-yellow-300",completed:"bg-green-100 text-green-800 border-green-300",cancelled:"bg-red-100 text-red-800 border-red-300"};function kZe({mission:e,onClick:t,hasBreakdown:r=!1}){const n=e.vehicle,i=e.trailer,a=e.mainDriver,s=e.tripCount||0,l=e.startAt?new Date(e.startAt):null,c=e.endAt?new Date(e.endAt):null,u=l?Kr(l,"dd MMM yyyy",{locale:tn}):null,d=c?Kr(c,"dd MMM yyyy",{locale:tn}):null;return o.jsx(_t,{"data-testid":`card-mission-${e.id}`,className:"hover-elevate transition-all duration-200 overflow-hidden cursor-pointer",onClick:()=>t?.(e.id),children:o.jsxs(ar,{className:"p-0",children:[o.jsxs("div",{className:"relative w-full aspect-video overflow-hidden bg-muted border-b",children:[n?.photoUrl?o.jsx("img",{src:hn(n.photoUrl)||void 0,alt:`Véhicule ${n.immatriculation}`,className:"w-full h-full object-cover",onError:f=>{f.target.style.display="none"}}):o.jsx("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"text-4xl mb-2",children:"🚚"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Pas de photo"})]})}),n&&o.jsx("div",{className:"absolute top-2 left-2 z-10",children:o.jsx(ir,{variant:"secondary",className:"font-mono font-semibold text-xs px-2 py-1 bg-background/95 backdrop-blur-sm shadow-md border",children:n.immatriculation})}),o.jsxs("div",{className:"absolute top-2 right-2 z-10 flex flex-col gap-1.5 items-end",children:[o.jsx(ir,{className:`text-xs px-2 py-1 border shadow-md ${YW[e.status]||YW.planned}`,children:NZe[e.status]||e.status}),r&&o.jsxs(ir,{variant:"destructive",className:"text-xs px-2 py-1 border shadow-md flex items-center gap-1",children:[o.jsx(Vp,{className:"h-3 w-3"}),"Panne"]})]}),i&&o.jsx("div",{className:"absolute bottom-2 left-2 z-10",children:o.jsxs(ir,{variant:"secondary",className:"text-xs px-2 py-1 bg-background/95 backdrop-blur-sm shadow-md border flex items-center gap-1",children:[o.jsx(uo,{className:"h-3 w-3"}),"Remorque attelée"]})})]}),o.jsxs("div",{className:"p-4 space-y-3",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"font-semibold text-base mb-1 line-clamp-1","data-testid":`text-title-${e.id}`,children:e.title}),o.jsx("p",{className:"text-xs text-muted-foreground font-mono","data-testid":`text-code-${e.id}`,children:e.code})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Client"}),o.jsx("p",{className:"text-sm font-medium","data-testid":`text-client-${e.id}`,children:e.clientName}),e.clientReference&&o.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["Ref: ",e.clientReference]})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Itinéraire"}),o.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[o.jsxs("div",{className:"flex items-center gap-1.5 flex-1 min-w-0",children:[o.jsx(rs,{className:"h-4 w-4 text-primary flex-shrink-0"}),o.jsx("span",{className:"truncate","data-testid":`text-loading-${e.id}`,children:e.loadingSite})]}),o.jsx(BC,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),o.jsxs("div",{className:"flex items-center gap-1.5 flex-1 min-w-0",children:[o.jsx(rs,{className:"h-4 w-4 text-primary flex-shrink-0"}),o.jsx("span",{className:"truncate","data-testid":`text-unloading-${e.id}`,children:e.unloadingSite})]})]})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Chargement"}),o.jsxs(ir,{variant:"outline",className:"text-xs",children:[o.jsx(uo,{className:"h-3 w-3 mr-1"}),e.loadingType]})]}),o.jsxs("div",{className:"flex items-center justify-between pt-2 border-t text-xs text-muted-foreground",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[a&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(sy,{className:"h-3 w-3"}),o.jsxs("span",{className:"truncate max-w-[100px]",children:[a.prenom," ",a.nom]})]}),s>0&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(Do,{className:"h-3 w-3"}),o.jsxs("span",{children:[s," voyage",s>1?"s":""]})]})]}),(u||d)&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(tc,{className:"h-3 w-3"}),u&&o.jsx("span",{children:u}),u&&d&&o.jsx("span",{children:"-"}),d&&o.jsx("span",{children:d})]})]})]})]})})}function _Ze(){const[,e]=Ic(),[t,r]=w.useState(""),[n,i]=w.useState("all"),a=n==="all"?void 0:n,{data:s=[],isLoading:l}=TO(a),{data:c=[],isLoading:u}=Ar({queryKey:["/api/breakdowns"],queryFn:()=>J3()}),d=w.useMemo(()=>new Set(c.map(v=>v.vehicleId)),[c]),f=w.useMemo(()=>new Set(s.filter(v=>v.vehicle&&d.has(v.vehicle.id)).map(v=>v.id)),[s,d]),m=l||u,g=s.filter(v=>{if(!t)return!0;const b=t.toLowerCase(),E=v.title?.toLowerCase().includes(b),I=v.code?.toLowerCase().includes(b),S=v.clientName?.toLowerCase().includes(b),_=v.clientReference?.toLowerCase().includes(b),B=v.vehicle?.immatriculation.toLowerCase().includes(b),T=v.loadingType?.toLowerCase().includes(b),P=v.loadingSite?.toLowerCase().includes(b),O=v.unloadingSite?.toLowerCase().includes(b);return E||I||S||_||B||T||P||O}),A=v=>{e(`/missions/${v}`)};return o.jsxs("div",{className:"space-y-4 md:space-y-6 pb-20 md:pb-0",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl md:text-2xl font-semibold","data-testid":"text-page-title",children:"Missions"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Gérez vos ordres de mission et leurs voyages associés"})]}),o.jsxs(Pe,{"data-testid":"button-add-mission",className:"w-full md:w-auto",onClick:()=>e("/missions/new"),children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Créer une mission"]})]}),o.jsx("div",{className:"flex flex-col md:flex-row items-stretch md:items-center gap-3",children:o.jsxs("div",{className:"relative flex-1",children:[o.jsx(U0,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(wt,{placeholder:"Rechercher par titre, code, client, véhicule...",value:t,onChange:v=>r(v.target.value),className:"pl-9 h-12","data-testid":"input-search"})]})}),m?o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):o.jsxs(o.Fragment,{children:[o.jsxs(vg,{value:n,onValueChange:i,className:"space-y-4",children:[o.jsxs(Bm,{className:"w-full grid grid-cols-5",children:[o.jsx(Ii,{value:"all",className:"text-xs md:text-sm",children:"Toutes"}),o.jsx(Ii,{value:"planned",className:"text-xs md:text-sm",children:"Planifiées"}),o.jsx(Ii,{value:"in_progress",className:"text-xs md:text-sm",children:"En cours"}),o.jsx(Ii,{value:"completed",className:"text-xs md:text-sm",children:"Terminées"}),o.jsx(Ii,{value:"cancelled",className:"text-xs md:text-sm",children:"Annulées"})]}),o.jsx(Ms,{value:n,className:"mt-0",children:o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:g.map(v=>o.jsx(kZe,{mission:v,onClick:A,hasBreakdown:f.has(v.id)},v.id))})})]}),g.length===0&&o.jsx("div",{className:"text-center py-12",children:o.jsx("p",{className:"text-muted-foreground",children:t?"Aucune mission ne correspond à votre recherche":"Aucune mission trouvée"})})]}),o.jsx(wg,{onClick:()=>e("/missions/new"),label:"Créer une mission"})]})}async function jZe(e=!1){return await fr(`/api/mission-types${e?"?active=true":""}`)}async function DZe(e){return await fr("/api/mission-types",{method:"POST",body:e})}async function TZe(e,t){return await fr(`/api/mission-types/${e}`,{method:"PATCH",body:t})}async function PZe(e){await fr(`/api/mission-types/${e}`,{method:"DELETE"})}function whe(e=!1){return Ar({queryKey:["/api/mission-types",e],queryFn:()=>jZe(e)})}function OZe(){const{toast:e}=sn();return qr({mutationFn:t=>DZe(t),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/mission-types"]}),e({title:"Succès",description:"Le type de mission a été créé avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible de créer le type de mission"})}})}function RZe(){const{toast:e}=sn();return qr({mutationFn:({id:t,data:r})=>TZe(t,r),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/mission-types"]}),e({title:"Succès",description:"Le type de mission a été mis à jour avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible de mettre à jour le type de mission"})}})}function FZe(){const{toast:e}=sn();return qr({mutationFn:t=>PZe(t),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/mission-types"]}),e({title:"Succès",description:"Le type de mission a été supprimé avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible de supprimer le type de mission"})}})}async function MZe(e=!1){return await fr(`/api/locations${e?"?active=true":""}`)}async function QZe(e){return await fr("/api/locations",{method:"POST",body:e})}async function LZe(e,t){return await fr(`/api/locations/${e}`,{method:"PATCH",body:t})}async function UZe(e){await fr(`/api/locations/${e}`,{method:"DELETE"})}function GR(e=!1){return Ar({queryKey:["/api/locations",e],queryFn:()=>MZe(e)})}function $Ze(){const{toast:e}=sn();return qr({mutationFn:t=>QZe(t),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/locations"]}),e({title:"Succès",description:"Le lieu a été créé avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible de créer le lieu"})}})}function zZe(){const{toast:e}=sn();return qr({mutationFn:({id:t,data:r})=>LZe(t,r),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/locations"]}),e({title:"Succès",description:"Le lieu a été mis à jour avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible de mettre à jour le lieu"})}})}function HZe(){const{toast:e}=sn();return qr({mutationFn:t=>UZe(t),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/locations"]}),e({title:"Succès",description:"Le lieu a été supprimé avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible de supprimer le lieu"})}})}function WZe({missionTypes:e,selectedId:t,onSelect:r,isLoading:n=!1}){return n?o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:[1,2,3].map(i=>o.jsx(_t,{className:"p-4 animate-pulse",children:o.jsx("div",{className:"h-20 bg-muted rounded"})},i))}):o.jsxs("div",{className:"space-y-3",children:[o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:e.map(i=>{const a=t===i.id;return o.jsx(_t,{className:`p-4 cursor-pointer transition-all hover:shadow-md ${a?"border-2 border-primary bg-primary/5 shadow-md":"border hover:border-primary/50"}`,onClick:()=>r(a?null:i),children:o.jsxs("div",{className:"flex items-start justify-between gap-2",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h3",{className:"font-semibold text-base truncate",children:i.name}),o.jsxs("div",{className:"flex flex-wrap gap-1 mt-2",children:[o.jsx(ir,{variant:"secondary",className:"text-xs",children:i.loadingType}),i.defaultClientName&&o.jsx(ir,{variant:"outline",className:"text-xs",children:i.defaultClientName})]})]}),a&&o.jsx("div",{className:"flex-shrink-0 text-primary text-xl",children:"✓"})]})},i.id)})}),o.jsx(_t,{className:`p-4 cursor-pointer transition-all hover:shadow-md ${t===null?"border-2 border-primary bg-primary/5 shadow-md":"border hover:border-primary/50"}`,onClick:()=>r(null),children:o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsxs("div",{className:"flex-1",children:[o.jsx("h3",{className:"font-semibold text-base",children:"Mission personnalisée"}),o.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Créer une mission avec des paramètres personnalisés"})]}),t===null&&o.jsx("div",{className:"flex-shrink-0 text-primary text-xl",children:"✓"})]})})]})}const ZW={factory:"🏭",port:"⚓",border:"🚧",warehouse:"🏢",city:"🏙️"},JW={factory:"Usine",port:"Port",border:"Frontière",warehouse:"Entrepôt",city:"Ville"};function XW({locations:e,selectedId:t,onSelect:r,isLoading:n=!1,label:i="Sélectionner un lieu",placeholder:a="Rechercher un lieu..."}){const[s,l]=w.useState(""),[c,u]=w.useState(null),d=w.useMemo(()=>e.filter(m=>{const g=s===""||m.name.toLowerCase().includes(s.toLowerCase())||m.country?.toLowerCase().includes(s.toLowerCase()),A=!c||m.type===c;return g&&A}),[e,s,c]),f=w.useMemo(()=>{const m=new Set(e.map(g=>g.type));return Array.from(m)},[e]);return n?o.jsxs("div",{className:"space-y-3",children:[o.jsx("div",{className:"h-10 bg-muted rounded animate-pulse"}),o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[1,2,3,4].map(m=>o.jsx(_t,{className:"p-4 animate-pulse",children:o.jsx("div",{className:"h-20 bg-muted rounded"})},m))})]}):o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(wt,{placeholder:a,value:s,onChange:m=>l(m.target.value),className:"w-full"}),f.length>0&&o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsx("button",{type:"button",onClick:()=>u(null),className:`px-3 py-1 text-sm rounded-full border transition-colors ${c===null?"bg-primary text-primary-foreground border-primary":"bg-background hover:bg-accent"}`,children:"Tous"}),f.map(m=>o.jsxs("button",{type:"button",onClick:()=>u(m),className:`px-3 py-1 text-sm rounded-full border transition-colors flex items-center gap-1 ${c===m?"bg-primary text-primary-foreground border-primary":"bg-background hover:bg-accent"}`,children:[o.jsx("span",{children:ZW[m]||"📍"}),o.jsx("span",{children:JW[m]||m})]},m))]})]}),d.length===0?o.jsx(_t,{className:"p-4 border-dashed",children:o.jsx("p",{className:"text-sm text-muted-foreground text-center",children:"Aucun lieu trouvé"})}):o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-64 overflow-y-auto",children:d.map(m=>{const g=t===m.id;return o.jsx(_t,{className:`p-3 cursor-pointer transition-all hover:shadow-md ${g?"border-2 border-primary bg-primary/5 shadow-md":"border hover:border-primary/50"}`,onClick:()=>r(g?null:m),children:o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"text-2xl flex-shrink-0",children:ZW[m.type]||"📍"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h4",{className:"font-semibold text-sm truncate",children:m.name}),o.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[o.jsx(ir,{variant:"secondary",className:"text-xs",children:JW[m.type]||m.type}),m.country&&o.jsx("span",{className:"text-xs text-muted-foreground",children:m.country})]})]}),g&&o.jsx("div",{className:"flex-shrink-0 text-primary text-lg",children:"✓"})]})},m.id)})})]})}function GZe({value:e,onChange:t,label:r="Nombre de tours"}){const[n,i]=w.useState(""),[a,s]=w.useState(!1);w.useEffect(()=>{e&&![1,2,3,4].includes(e)&&(s(!0),i(e.toString()))},[e]);const l=u=>{s(!1),i(""),t(u)},c=u=>{const d=u.target.value;i(d);const f=parseInt(d,10);!isNaN(f)&&f>0?t(f):d===""&&t(1)};return o.jsxs("div",{className:"space-y-3",children:[o.jsx(Je,{className:"text-base font-semibold",children:r}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"1 tour = un aller + un retour"}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[[1,2,3,4].map(u=>o.jsx(Pe,{type:"button",variant:e===u?"default":"outline",size:"lg",className:`min-w-[60px] ${e===u?"bg-primary text-primary-foreground":""}`,onClick:()=>l(u),children:u},u)),o.jsx(Pe,{type:"button",variant:a?"default":"outline",size:"lg",className:`min-w-[80px] ${a?"bg-primary text-primary-foreground":""}`,onClick:()=>{s(!0),n||i(e.toString())},children:"Autre"})]}),a&&o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"custom-tours",className:"text-sm",children:"Nombre de tours personnalisé"}),o.jsx(wt,{id:"custom-tours",type:"number",min:"1",value:n,onChange:c,placeholder:"Entrez le nombre de tours",className:"w-full max-w-xs"})]})]})}function qZe({imageUrl:e,onImageChange:t,isLoading:r=!1}){const[n,i]=w.useState(!1),a=w.useRef(null),s=w.useRef(null),l=async f=>{if(f){if(!f.type.startsWith("image/")){alert("Veuillez sélectionner une image");return}if(f.size>5*1024*1024){alert("L'image est trop grande (maximum 5MB)");return}i(!0);try{const m=await OO(f);t(m.url)}catch(m){console.error("Error uploading photo:",m),alert(m instanceof Error?m.message:"Erreur lors de l'upload de la photo")}finally{i(!1)}}},c=()=>{s.current?.click()},u=()=>{a.current?.click()},d=()=>{t(null),a.current&&(a.current.value=""),s.current&&(s.current.value="")};return o.jsxs("div",{className:"space-y-3",children:[o.jsx(Je,{className:"text-base font-semibold",children:"Photo du bon de chargement"}),e?o.jsxs(_t,{className:"p-4",children:[o.jsxs("div",{className:"relative",children:[o.jsx("img",{src:e,alt:"Bon de chargement",className:"w-full h-auto max-h-64 object-contain rounded-lg border"}),o.jsx(Pe,{type:"button",variant:"destructive",size:"icon",className:"absolute top-2 right-2",onClick:d,disabled:n||r,children:o.jsx(G0,{className:"h-4 w-4"})})]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-2 text-center",children:"Cliquez sur la croix pour supprimer la photo"})]}):o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[o.jsxs(Pe,{type:"button",variant:"outline",onClick:c,disabled:n||r,className:"flex-1",children:[n?o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}):o.jsx(_u,{className:"h-4 w-4 mr-2"}),"Prendre une photo"]}),o.jsxs(Pe,{type:"button",variant:"outline",onClick:u,disabled:n||r,className:"flex-1",children:[n?o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}):o.jsx(lP,{className:"h-4 w-4 mr-2"}),"Importer depuis la galerie"]})]}),o.jsx("input",{ref:s,type:"file",accept:"image/*",capture:"environment",className:"hidden",onChange:f=>l(f.target.files?.[0]||null)}),o.jsx("input",{ref:a,type:"file",accept:"image/*",className:"hidden",onChange:f=>l(f.target.files?.[0]||null)})]})]})}const eG={chauffeur:"Chauffeur",apprenti:"Apprenti"};function KZe(){const[,e]=Ic(),{toast:t}=sn(),r=Zje(),n=Jje(),[i,a]=w.useState({missionTypeId:null,vehicleId:null,trailerId:null,mainDriverId:null,additionalCrewIds:[],title:"",description:"",clientName:"",clientReference:"",loadingSite:"",unloadingSite:"",loadingLocationId:null,unloadingLocationId:null,loadingType:"",loadingOrderNumber:"",loadingOrderDate:"",loadingBonImageUrl:null,expectedTours:1,status:"planned",createTripsNow:!0,tripMode:"round_trip"}),{data:s=[],isLoading:l}=Ar({queryKey:["/api/vehicles"]}),{data:c=[],isLoading:u}=Ar({queryKey:["/api/trailers"]}),{data:d=[],isLoading:f}=Ar({queryKey:["/api/crew-members"]}),{data:m=[],isLoading:g}=whe(!0),{data:A=[],isLoading:v}=GR(!0),{data:b,isLoading:E}=Ple(i.vehicleId),I=m.find(q=>q.id===i.missionTypeId)||null,S=w.useRef(null),_=s.find(q=>q.id===i.vehicleId)||null,T=c.find(q=>q.id===i.trailerId)||null||b?.trailer||null,P=w.useMemo(()=>[...s].sort((q,Y)=>0),[s]),O=w.useMemo(()=>d.filter(q=>q.role==="chauffeur"),[d]),z=w.useMemo(()=>d.filter(q=>q.role==="apprenti"),[d]);w.useEffect(()=>{b?.trailer?.id&&!i.trailerId&&a(q=>({...q,trailerId:b.trailer.id}))},[b,i.trailerId]),w.useEffect(()=>{!b||!i.vehicleId||E||a(q=>{let Y={...q},ne=!1;b.chauffeur?.id&&!q.mainDriverId&&(Y.mainDriverId=b.chauffeur.id,ne=!0);const ge=b.apprentis;if(ge&&Array.isArray(ge)&&ge.length>0){const ae=ge.map(pe=>pe?.id).filter(pe=>pe!=null);if(ae.length>0){const pe=q.additionalCrewIds,_e=ae.filter(we=>!pe.includes(we));_e.length>0&&(Y.additionalCrewIds=[...pe,..._e],ne=!0)}}return ne?Y:q})},[b,i.vehicleId,E]),w.useEffect(()=>{I&&i.missionTypeId&&i.missionTypeId!==S.current&&!v&&A.length>=0&&(S.current=i.missionTypeId,a(q=>{const Y={};if(Y.title=I.name,Y.loadingType=I.loadingType,I.defaultClientName&&(Y.clientName=I.defaultClientName),I.defaultLoadingLocationId){Y.loadingLocationId=I.defaultLoadingLocationId;const ne=A.find(ge=>ge.id===I.defaultLoadingLocationId);ne&&(Y.loadingSite=ne.name)}if(I.defaultUnloadingLocationId){Y.unloadingLocationId=I.defaultUnloadingLocationId;const ne=A.find(ge=>ge.id===I.defaultUnloadingLocationId);ne&&(Y.unloadingSite=ne.name)}return I.expectedToursDefault&&(Y.expectedTours=I.expectedToursDefault),{...q,...Y}})),i.missionTypeId||(S.current=null)},[i.missionTypeId,I,A,v]);const L=q=>{a(Y=>({...Y,vehicleId:q,trailerId:null}))},W=q=>{a(Y=>({...Y,trailerId:q}))},R=q=>{a(Y=>({...Y,mainDriverId:q}))},$=q=>{a(Y=>{const ne=Y.additionalCrewIds.includes(q);return{...Y,additionalCrewIds:ne?Y.additionalCrewIds.filter(ge=>ge!==q):[...Y.additionalCrewIds,q]}})},X=async q=>{if(q.preventDefault(),!i.vehicleId){t({variant:"destructive",title:"Erreur",description:"Veuillez sélectionner un véhicule"});return}if(!i.title.trim()){t({variant:"destructive",title:"Erreur",description:"Le titre de la mission est obligatoire"});return}if(!i.clientName.trim()){t({variant:"destructive",title:"Erreur",description:"Le nom du client est obligatoire"});return}if(!i.loadingLocationId&&!i.loadingSite.trim()){t({variant:"destructive",title:"Erreur",description:"Le lieu de chargement est obligatoire"});return}if(!i.unloadingLocationId&&!i.unloadingSite.trim()){t({variant:"destructive",title:"Erreur",description:"Le lieu de déchargement est obligatoire"});return}if(!i.loadingType.trim()){t({variant:"destructive",title:"Erreur",description:"Le type de chargement est obligatoire"});return}if(!i.loadingOrderNumber.trim()){t({variant:"destructive",title:"Erreur",description:"Le numéro de bon de chargement est obligatoire"});return}if(!i.loadingOrderDate){t({variant:"destructive",title:"Erreur",description:"La date du bon de chargement est obligatoire"});return}if(!i.mainDriverId){t({variant:"destructive",title:"Erreur",description:"Veuillez sélectionner un chauffeur principal"});return}try{const Y={vehicleId:i.vehicleId,trailerId:i.trailerId||void 0,mainDriverId:i.mainDriverId,additionalCrewIds:i.additionalCrewIds.length>0?i.additionalCrewIds:void 0,title:i.title.trim(),description:i.description.trim()||void 0,clientName:i.clientName.trim(),clientReference:i.clientReference.trim()||void 0,loadingSite:i.loadingLocationId&&A.find(ge=>ge.id===i.loadingLocationId)?.name||i.loadingSite.trim(),unloadingSite:i.unloadingLocationId&&A.find(ge=>ge.id===i.unloadingLocationId)?.name||i.unloadingSite.trim(),loadingType:i.loadingType.trim(),loadingOrderNumber:i.loadingOrderNumber.trim(),loadingOrderDate:new Date(i.loadingOrderDate),expectedTours:i.expectedTours||1,missionTypeId:i.missionTypeId||void 0,loadingLocationId:i.loadingLocationId||void 0,unloadingLocationId:i.unloadingLocationId||void 0,loadingBonImageUrl:i.loadingBonImageUrl||void 0,status:i.status},ne=await r.mutateAsync(Y);i.createTripsNow&&await n.mutateAsync({missionId:ne.id,mode:i.tripMode}),e("/missions")}catch(Y){console.error("Error creating mission:",Y)}},Z=l||u||f||E||g||v,K=r.isPending||n.isPending;return o.jsxs("div",{className:"space-y-6 pb-8",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>e("/missions"),className:"flex-shrink-0",children:o.jsx(P0,{className:"h-5 w-5"})}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl font-semibold",children:"Créer une mission"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Remplissez les informations pour créer un nouvel ordre de mission"})]})]}),Z?o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):o.jsxs("form",{onSubmit:X,className:"space-y-8",children:[o.jsxs(_t,{className:"p-6",children:[o.jsx(Je,{className:"text-lg font-semibold mb-4 block",children:"Type de mission"}),o.jsx(WZe,{missionTypes:m,selectedId:i.missionTypeId,onSelect:q=>{a(Y=>({...Y,missionTypeId:q?.id||null}))},isLoading:g})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"space-y-3",children:[o.jsxs(Je,{className:"text-base font-semibold",children:["Véhicule ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3 max-h-96 overflow-y-auto p-2 border rounded-lg",children:P.map(q=>{const Y=i.vehicleId===q.id;return o.jsxs("button",{type:"button",onClick:()=>L(q.id),className:`relative p-3 rounded-lg border-2 transition-all text-left ${Y?"border-[#8B5CF6] bg-[#8B5CF6]/5 shadow-[0_0_8px_rgba(139,92,246,0.3)]":"border-border hover:border-primary/50 hover:bg-accent"}`,children:[Y&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"absolute top-2 right-2 z-10",children:o.jsx(es,{className:"h-5 w-5 text-[#8B5CF6]"})}),o.jsx("div",{className:"absolute top-2 left-2 z-10",children:o.jsx(ir,{variant:"secondary",className:"text-xs bg-[#8B5CF6]/20 text-[#8B5CF6] border-[#8B5CF6]/30",children:"✔️ Sélectionné"})})]}),o.jsxs("div",{className:"space-y-2",children:[q.photoUrl?o.jsx("div",{className:"relative w-full aspect-video rounded overflow-hidden bg-muted",children:o.jsx("img",{src:hn(q.photoUrl)||void 0,alt:q.immatriculation,className:"w-full h-full object-cover",onError:ne=>{ne.target.style.display="none"}})}):o.jsx("div",{className:"w-full aspect-video rounded bg-muted flex items-center justify-center",children:o.jsx("span",{className:"text-3xl",children:"🚚"})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-mono font-semibold text-sm",children:q.immatriculation}),(q.marque||q.modele)&&o.jsxs("p",{className:"text-xs text-muted-foreground",children:[q.marque," ",q.modele]})]})]})]},q.id)})})]}),_&&o.jsxs("div",{className:"space-y-3",children:[o.jsx(Je,{className:"text-base font-semibold",children:"Remorque"}),o.jsx(Fle,{vehicle:_,trailer:T,isFromCoupling:!!b?.trailer&&!i.trailerId}),!b?.trailer&&o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{className:"text-sm text-muted-foreground",children:"Sélectionner une remorque (optionnel)"}),o.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3 max-h-48 overflow-y-auto p-2 border rounded-lg",children:[o.jsx("button",{type:"button",onClick:()=>W(null),className:`p-3 rounded-lg border-2 transition-all text-center ${i.trailerId?"border-border hover:border-primary/50":"border-primary bg-primary/5"}`,children:o.jsx("p",{className:"text-sm font-medium",children:"Sans remorque"})}),c.map(q=>{const Y=i.trailerId===q.id;return o.jsxs("button",{type:"button",onClick:()=>W(q.id),className:`relative p-3 rounded-lg border-2 transition-all text-left ${Y?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,children:[Y&&o.jsx("div",{className:"absolute top-2 right-2 z-10",children:o.jsx(es,{className:"h-4 w-4 text-primary"})}),o.jsxs("div",{className:"space-y-2",children:[q.photoUrl?o.jsx("div",{className:"relative w-full aspect-video rounded overflow-hidden bg-muted",children:o.jsx("img",{src:hn(q.photoUrl)||void 0,alt:q.numeroChassis,className:"w-full h-full object-cover"})}):o.jsx("div",{className:"w-full aspect-video rounded bg-muted flex items-center justify-center",children:o.jsx(uo,{className:"h-6 w-6 text-muted-foreground"})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-mono font-semibold text-xs",children:q.numeroChassis}),o.jsx("p",{className:"text-xs text-muted-foreground",children:q.type})]})]})]},q.id)})]})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs(Je,{className:"text-base font-semibold",children:["Chauffeur principal ",o.jsx("span",{className:"text-destructive",children:"*"})]}),O.length===0?o.jsx(_t,{className:"p-4 border-dashed",children:o.jsx("p",{className:"text-sm text-muted-foreground text-center",children:"Aucun chauffeur disponible"})}):o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-64 overflow-y-auto p-2 border rounded-lg",children:O.map(q=>{const Y=i.mainDriverId===q.id;return o.jsxs("button",{type:"button",onClick:()=>R(q.id),className:`relative p-3 rounded-lg border-2 transition-all text-left ${Y?"border-green-500 bg-green-500/5 shadow-[0_0_8px_rgba(34,197,94,0.3)]":"border-border hover:border-primary/50 hover:bg-accent"}`,children:[Y&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"absolute top-2 right-2 z-10",children:o.jsx(es,{className:"h-5 w-5 text-green-500"})}),o.jsx("div",{className:"absolute top-2 left-2 z-10",children:o.jsx(ir,{variant:"secondary",className:"text-xs bg-green-500/20 text-green-700 border-green-500/30",children:"✔️ Sélectionné"})})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"w-12 h-12 rounded-full overflow-hidden border-2 border-border flex-shrink-0",children:q.photoUrl?o.jsx("img",{src:hn(q.photoUrl)||void 0,alt:`${q.prenom} ${q.nom}`,className:"w-full h-full object-cover",onError:ne=>{ne.target.style.display="none"}}):o.jsxs("div",{className:"w-full h-full bg-muted flex items-center justify-center text-xs font-semibold",children:[q.prenom.charAt(0),q.nom.charAt(0)]})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("p",{className:"font-semibold text-sm truncate",children:[q.prenom," ",q.nom]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:eG[q.role]||q.role})]})]})]},q.id)})})]}),z.length>0&&o.jsxs("div",{className:"space-y-3",children:[o.jsx(Je,{className:"text-base font-semibold",children:"Autres membres d'équipage (optionnel)"}),o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-64 overflow-y-auto p-2 border rounded-lg",children:z.map(q=>{const Y=i.additionalCrewIds.includes(q.id);return o.jsxs("button",{type:"button",onClick:()=>$(q.id),className:`relative p-3 rounded-lg border-2 transition-all text-left ${Y?"border-primary bg-primary/5":"border-border hover:border-primary/50 hover:bg-accent"}`,children:[Y&&o.jsx("div",{className:"absolute top-2 right-2 z-10",children:o.jsx(es,{className:"h-4 w-4 text-primary"})}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"w-10 h-10 rounded-full overflow-hidden border-2 border-border flex-shrink-0",children:q.photoUrl?o.jsx("img",{src:hn(q.photoUrl)||void 0,alt:`${q.prenom} ${q.nom}`,className:"w-full h-full object-cover",onError:ne=>{ne.target.style.display="none"}}):o.jsxs("div",{className:"w-full h-full bg-muted flex items-center justify-center text-xs font-semibold",children:[q.prenom.charAt(0),q.nom.charAt(0)]})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("p",{className:"font-semibold text-sm truncate",children:[q.prenom," ",q.nom]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:eG[q.role]||q.role})]})]})]},q.id)})})]})]}),o.jsx("div",{className:"space-y-6",children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsxs(Je,{htmlFor:"title",className:"text-base font-semibold",children:["Titre de la mission ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"title",value:i.title,onChange:q=>a(Y=>({...Y,title:q.target.value})),placeholder:"Ex: Ouaga – Lomé – Clinker",className:"mt-1",required:!0})]}),o.jsxs("div",{children:[o.jsx(Je,{htmlFor:"description",className:"text-base font-semibold",children:"Description (optionnel)"}),o.jsx("textarea",{id:"description",value:i.description,onChange:q=>a(Y=>({...Y,description:q.target.value})),placeholder:"Détails supplémentaires sur la mission...",className:"mt-1 w-full min-h-[100px] px-3 py-2 rounded-md border border-input bg-background text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsxs(Je,{htmlFor:"clientName",className:"text-base font-semibold",children:["Client ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"clientName",value:i.clientName,onChange:q=>a(Y=>({...Y,clientName:q.target.value})),placeholder:"Nom du client",className:"mt-1",required:!0})]}),o.jsxs("div",{children:[o.jsx(Je,{htmlFor:"clientReference",className:"text-base font-semibold",children:"Référence client (optionnel)"}),o.jsx(wt,{id:"clientReference",value:i.clientReference,onChange:q=>a(Y=>({...Y,clientReference:q.target.value})),placeholder:"Ref. client",className:"mt-1"})]})]}),o.jsx("div",{children:o.jsx(XW,{locations:A,selectedId:i.loadingLocationId,onSelect:q=>{a(Y=>({...Y,loadingLocationId:q?.id||null,loadingSite:q?.name||""}))},isLoading:v,label:"Lieu de chargement",placeholder:"Rechercher un lieu de chargement..."})}),o.jsx("div",{children:o.jsx(XW,{locations:A,selectedId:i.unloadingLocationId,onSelect:q=>{a(Y=>({...Y,unloadingLocationId:q?.id||null,unloadingSite:q?.name||""}))},isLoading:v,label:"Lieu de déchargement",placeholder:"Rechercher un lieu de déchargement..."})}),o.jsxs("div",{children:[o.jsxs(Je,{htmlFor:"loadingType",className:"text-base font-semibold",children:["Type de chargement ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"loadingType",value:i.loadingType,onChange:q=>a(Y=>({...Y,loadingType:q.target.value})),placeholder:"Ex: Clinker, Ciment ensaché",className:"mt-1",required:!0})]}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsxs(Je,{htmlFor:"loadingOrderNumber",className:"text-base font-semibold",children:["N° bon de chargement ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"loadingOrderNumber",value:i.loadingOrderNumber,onChange:q=>a(Y=>({...Y,loadingOrderNumber:q.target.value})),placeholder:"N° bon",className:"mt-1",required:!0})]}),o.jsxs("div",{children:[o.jsxs(Je,{htmlFor:"loadingOrderDate",className:"text-base font-semibold",children:["Date bon de chargement ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"loadingOrderDate",type:"date",value:i.loadingOrderDate,onChange:q=>a(Y=>({...Y,loadingOrderDate:q.target.value})),className:"mt-1",required:!0})]})]}),o.jsx("div",{children:o.jsx(qZe,{imageUrl:i.loadingBonImageUrl,onImageChange:q=>a(Y=>({...Y,loadingBonImageUrl:q})),isLoading:K})}),o.jsx("div",{children:o.jsx(GZe,{value:i.expectedTours,onChange:q=>a(Y=>({...Y,expectedTours:q}))})})]})})]}),o.jsx(_t,{className:"p-4 bg-muted/30",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx(ew,{id:"createTripsNow",checked:i.createTripsNow,onCheckedChange:q=>a(Y=>({...Y,createTripsNow:q}))}),o.jsxs("div",{className:"flex-1 space-y-2",children:[o.jsx(Je,{htmlFor:"createTripsNow",className:"text-base font-semibold cursor-pointer",children:"Créer tout de suite les voyages"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Si coché, les voyages seront créés automatiquement à partir de cette mission."}),o.jsxs("div",{className:"flex items-center gap-4 mt-2",children:[o.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[o.jsx("input",{type:"radio",name:"tripMode",value:"one_way",checked:i.tripMode==="one_way",onChange:()=>a(q=>({...q,tripMode:"one_way"})),className:"cursor-pointer"}),o.jsx("span",{className:"text-sm",children:"Aller simple"})]}),o.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[o.jsx("input",{type:"radio",name:"tripMode",value:"round_trip",checked:i.tripMode==="round_trip",onChange:()=>a(q=>({...q,tripMode:"round_trip"})),className:"cursor-pointer"}),o.jsx("span",{className:"text-sm",children:"Aller-retour"})]})]})]})]})}),o.jsxs("div",{className:"flex items-center justify-end gap-4 pt-4 border-t",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>e("/missions"),disabled:K,children:"Annuler"}),o.jsx(Pe,{type:"submit",disabled:K,className:"bg-[#8B5CF6] hover:bg-[#7C3AED]",children:K?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Création en cours..."]}):"Créer la mission"})]})]})]})}function VZe(e,t=[]){let r=[];function n(a,s){const l=w.createContext(s);l.displayName=a+"Context";const c=r.length;r=[...r,s];const u=f=>{const{scope:m,children:g,...A}=f,v=m?.[e]?.[c]||l,b=w.useMemo(()=>A,Object.values(A));return o.jsx(v.Provider,{value:b,children:g})};u.displayName=a+"Provider";function d(f,m){const g=m?.[e]?.[c]||l,A=w.useContext(g);if(A)return A;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[u,d]}const i=()=>{const a=r.map(s=>w.createContext(s));return function(l){const c=l?.[e]||a;return w.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[n,YZe(i,...t)]}function YZe(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=n.reduce((l,{useScope:c,scopeName:u})=>{const f=c(a)[`__scope${u}`];return{...l,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var ZZe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ehe=ZZe.reduce((e,t)=>{const r=M3(`Primitive.${t}`),n=w.forwardRef((i,a)=>{const{asChild:s,...l}=i,c=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(c,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),qR="Progress",KR=100,[JZe]=VZe(qR),[XZe,eJe]=JZe(qR),Che=w.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:i,getValueLabel:a=tJe,...s}=e;(i||i===0)&&!tG(i)&&console.error(rJe(`${i}`,"Progress"));const l=tG(i)?i:KR;n!==null&&!rG(n,l)&&console.error(nJe(`${n}`,"Progress"));const c=rG(n,l)?n:null,u=LI(c)?a(c,l):void 0;return o.jsx(XZe,{scope:r,value:c,max:l,children:o.jsx(Ehe.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":LI(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":Bhe(c,l),"data-value":c??void 0,"data-max":l,...s,ref:t})})});Che.displayName=qR;var Ihe="ProgressIndicator",She=w.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,i=eJe(Ihe,r);return o.jsx(Ehe.div,{"data-state":Bhe(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...n,ref:t})});She.displayName=Ihe;function tJe(e,t){return`${Math.round(e/t*100)}%`}function Bhe(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function LI(e){return typeof e=="number"}function tG(e){return LI(e)&&!isNaN(e)&&e>0}function rG(e,t){return LI(e)&&!isNaN(e)&&e<=t&&e>=0}function rJe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${KR}\`.`}function nJe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: - a positive number - less than the value passed to \`max\` (or ${KR} if no \`max\` prop is set) - \`null\` or \`undefined\` if the progress is indeterminate. Defaulting to \`null\`.`}var Nhe=Che,iJe=She;const khe=w.forwardRef(({className:e,value:t,...r},n)=>o.jsx(Nhe,{ref:n,className:qt("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:o.jsx(iJe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));khe.displayName=Nhe.displayName;async function aJe(e){return await fr(`/api/trips/${e}/tracksolid`)}async function sJe(e,t=10){return await fr(`/api/trips/${e}/tracksolid/candidates?limit=${t}`)}async function oJe(e,t){return await fr("/api/tracksolid/trip-links",{method:"POST",body:JSON.stringify({tripId:e,tracksolidTripId:t})})}async function lJe(e){await fr(`/api/tracksolid/trip-links/${e}`,{method:"DELETE"})}async function cJe(e){return await fr(`/api/tracksolid/auto-link/${e}`,{method:"POST"})}async function uJe(e,t=5e3){return await fr(`/api/trips/${e}/track-points?limit=${t}`)}function dJe(e){return Ar({queryKey:["/api/trips",e,"tracksolid"],queryFn:()=>aJe(e),enabled:e!==null})}function fJe(e,t=10){return Ar({queryKey:["/api/trips",e,"tracksolid","candidates",t],queryFn:()=>sJe(e,t),enabled:e!==null})}function hJe(){const e=zu(),{toast:t}=sn();return qr({mutationFn:({tripId:r,tracksolidTripId:n})=>oJe(r,n),onSuccess:(r,n)=>{e.invalidateQueries({queryKey:["/api/trips",n.tripId,"tracksolid"]}),t({title:"Lien créé",description:"Le voyage a été lié au trajet TrackSolid",variant:"default"})},onError:r=>{t({title:"Erreur",description:r.message||"Erreur lors de la création du lien",variant:"destructive"})}})}function mJe(){const e=zu(),{toast:t}=sn();return qr({mutationFn:r=>lJe(r),onSuccess:(r,n)=>{e.invalidateQueries({queryKey:["/api/trips",n,"tracksolid"]}),t({title:"Lien supprimé",description:"Le lien TrackSolid a été supprimé",variant:"default"})},onError:r=>{t({title:"Erreur",description:r.message||"Erreur lors de la suppression du lien",variant:"destructive"})}})}function pJe(){const e=zu(),{toast:t}=sn();return qr({mutationFn:r=>cJe(r),onSuccess:(r,n)=>{e.invalidateQueries({queryKey:["/api/trips",n,"tracksolid"]}),r.ok?t({title:"Lien automatique créé",description:`Le voyage a été lié automatiquement (score: ${Math.round((r.candidate?.score||0)*100)}%)`,variant:"default"}):t({title:"Aucun match fiable",description:`Aucun trajet TrackSolid fiable trouvé (meilleur score: ${Math.round((r.bestScore||0)*100)}%)`,variant:"default"})},onError:r=>{t({title:"Erreur",description:r.message||"Erreur lors de l'auto-liaison",variant:"destructive"})}})}function gJe(e,t=5e3){return Ar({queryKey:["/api/trips",e,"track-points",t],queryFn:()=>uJe(e,t),enabled:e!==null})}function AJe({tripId:e}){const[,t]=Ic(),[r,n]=w.useState(!1),{data:i,isLoading:a}=dJe(e),{data:s=[],isLoading:l}=fJe(r?e:null,10),c=hJe(),u=mJe(),d=pJe();if(a)return o.jsx(_t,{children:o.jsx(ar,{className:"py-4",children:o.jsx("div",{className:"flex justify-center items-center",children:o.jsx(wr,{className:"h-5 w-5 animate-spin text-primary"})})})});if(!i)return null;const{mappingOk:f,linkedTracksolidTrip:m,linkMeta:g}=i;return o.jsxs(o.Fragment,{children:[o.jsxs(_t,{className:"bg-muted/30",children:[o.jsx(Xr,{className:"pb-3",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs(cn,{className:"text-base flex items-center gap-2",children:[o.jsx(rs,{className:"h-4 w-4"}),"Tracking GPS TrackSolid"]}),m&&o.jsxs(ir,{variant:"default",className:"flex items-center gap-1",children:[o.jsx(es,{className:"h-3 w-3"}),"Lié"]})]})}),o.jsx(ar,{className:"space-y-4",children:f?o.jsx(o.Fragment,{children:m&&g?o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 text-sm",children:[m.distanceKm!==null&&o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Distance:"}),o.jsxs("p",{className:"font-semibold",children:[m.distanceKm.toFixed(1)," km"]})]}),m.durationMinutes!==null&&o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Durée:"}),o.jsxs("p",{className:"font-semibold",children:[Math.floor(m.durationMinutes/60),"h"," ",m.durationMinutes%60,"min"]})]}),m.avgSpeedKmh!==null&&o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Vitesse moy:"}),o.jsxs("p",{className:"font-semibold flex items-center gap-1",children:[o.jsx(Qb,{className:"h-3 w-3"}),m.avgSpeedKmh.toFixed(1)," km/h"]})]}),m.maxSpeedKmh!==null&&o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Vitesse max:"}),o.jsxs("p",{className:"font-semibold",children:[m.maxSpeedKmh.toFixed(1)," km/h"]})]})]}),m.startLocation&&m.endLocation&&o.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[o.jsx(rs,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-medium",children:m.startLocation}),o.jsx("span",{className:"text-muted-foreground",children:"→"}),o.jsx("span",{className:"font-medium",children:m.endLocation})]}),m.startAt&&m.endAt&&o.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(tc,{className:"h-3 w-3"}),Kr(new Date(m.startAt),"dd/MM/yyyy HH:mm",{locale:tn})]}),o.jsx("span",{children:"→"}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(tc,{className:"h-3 w-3"}),Kr(new Date(m.endAt),"dd/MM/yyyy HH:mm",{locale:tn})]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs text-muted-foreground",children:"Score de confiance:"}),o.jsxs(ir,{variant:g.matchConfidence>=70?"default":g.matchConfidence>=50?"secondary":"outline",children:[g.matchConfidence,"%"]}),o.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",g.linkedBy==="auto"?"Auto":"Manuel",")"]})]}),o.jsxs("div",{className:"flex gap-2 pt-2 border-t",children:[o.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>n(!0),children:[o.jsx(U0,{className:"h-4 w-4 mr-2"}),"Voir candidats"]}),o.jsxs(Pe,{variant:"destructive",size:"sm",onClick:()=>{confirm("Êtes-vous sûr de vouloir supprimer ce lien ?")&&u.mutate(e)},disabled:u.isPending,children:[o.jsx(xbe,{className:"h-4 w-4 mr-2"}),"Délier"]})]})]}):o.jsxs("div",{className:"space-y-3",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:"Aucun trajet TrackSolid lié à ce voyage"}),o.jsxs("div",{className:"flex gap-2",children:[o.jsxs(Pe,{variant:"default",size:"sm",onClick:()=>n(!0),children:[o.jsx(U0,{className:"h-4 w-4 mr-2"}),"Voir candidats"]}),o.jsxs(Pe,{variant:"secondary",size:"sm",onClick:()=>d.mutate(e),disabled:d.isPending,children:[d.isPending?o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}):o.jsx(B3,{className:"h-4 w-4 mr-2"}),"Auto-lier"]})]})]})}):o.jsxs("div",{className:"flex items-center gap-2 p-3 bg-destructive/10 border border-destructive/20 rounded-lg",children:[o.jsx(r1,{className:"h-4 w-4 text-destructive"}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"text-sm font-medium text-destructive",children:"Véhicule non mappé TrackSolid"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Le véhicule doit être mappé avant de pouvoir lier des trajets TrackSolid"})]}),o.jsx(Pe,{variant:"outline",size:"sm",onClick:()=>t("/settings?tab=tracking&subtab=mapping"),children:"Mapper"})]})})]}),o.jsx(ci,{open:r,onOpenChange:n,children:o.jsxs(Zn,{className:"max-w-4xl max-h-[80vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Candidats TrackSolid"}),o.jsx(Ci,{children:"Liste des trajets TrackSolid correspondant à ce voyage, triés par score de confiance"})]}),l?o.jsx("div",{className:"flex justify-center py-8",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):s.length===0?o.jsx("div",{className:"text-center py-8 text-muted-foreground",children:o.jsx("p",{children:"Aucun candidat trouvé"})}):o.jsxs("div",{className:"space-y-4",children:[o.jsxs(O1,{children:[o.jsx(R1,{children:o.jsxs(xc,{children:[o.jsx(Pn,{children:"Score"}),o.jsx(Pn,{children:"Période"}),o.jsx(Pn,{children:"Distance"}),o.jsx(Pn,{children:"Durée"}),o.jsx(Pn,{children:"Vitesse moy"}),o.jsx(Pn,{children:"Actions"})]})}),o.jsx(F1,{children:s.map(A=>o.jsxs(xc,{children:[o.jsx(kn,{children:o.jsxs(ir,{variant:A.score>=.7?"default":A.score>=.5?"secondary":"outline",children:[Math.round(A.score*100),"%"]})}),o.jsx(kn,{children:A.tracksolidTrip.startAt&&A.tracksolidTrip.endAt?o.jsxs("div",{className:"text-xs",children:[o.jsx("div",{children:Kr(new Date(A.tracksolidTrip.startAt),"dd/MM HH:mm",{locale:tn})}),o.jsx("div",{className:"text-muted-foreground",children:Kr(new Date(A.tracksolidTrip.endAt),"dd/MM HH:mm",{locale:tn})})]}):o.jsx("span",{className:"text-muted-foreground",children:"-"})}),o.jsx(kn,{children:A.tracksolidTrip.distanceKm!==null?o.jsxs("span",{className:"font-medium",children:[A.tracksolidTrip.distanceKm.toFixed(1)," km"]}):o.jsx("span",{className:"text-muted-foreground",children:"-"})}),o.jsx(kn,{children:A.tracksolidTrip.durationMinutes!==null?o.jsxs("span",{children:[Math.floor(A.tracksolidTrip.durationMinutes/60),"h"," ",A.tracksolidTrip.durationMinutes%60,"min"]}):o.jsx("span",{className:"text-muted-foreground",children:"-"})}),o.jsx(kn,{children:A.tracksolidTrip.avgSpeedKmh!==null?o.jsxs("span",{children:[A.tracksolidTrip.avgSpeedKmh.toFixed(1)," km/h"]}):o.jsx("span",{className:"text-muted-foreground",children:"-"})}),o.jsx(kn,{children:o.jsxs(Pe,{size:"sm",variant:"outline",onClick:()=>{c.mutate({tripId:e,tracksolidTripId:A.tracksolidTrip.id}),n(!1)},disabled:c.isPending,children:[o.jsx(Lb,{className:"h-3 w-3 mr-1"}),"Lier"]})})]},A.tracksolidTrip.id))})]}),s.length>0&&o.jsxs("div",{className:"text-xs text-muted-foreground space-y-1",children:[o.jsx("p",{className:"font-medium",children:"Raisons du score (premier candidat):"}),o.jsx("ul",{className:"list-disc list-inside space-y-0.5",children:s[0].reasons.map((A,v)=>o.jsx("li",{children:A},v))})]})]})]})})]})}function vJe(e){return Ar({queryKey:["/api/missions",e,"revenues"],queryFn:()=>L8e(e),enabled:!!e})}function xJe(){const{toast:e}=sn();return qr({mutationFn:t=>U8e(t),onSuccess:(t,r)=>{br.invalidateQueries({queryKey:["/api/missions",r.missionId,"revenues"]}),br.invalidateQueries({queryKey:["/api/missions",r.missionId]}),br.invalidateQueries({queryKey:["/api/missions"]}),e({title:"Succès",description:"Le revenu a été ajouté avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible d'ajouter le revenu"})}})}function yJe(){const{toast:e}=sn();return qr({mutationFn:({id:t,data:r})=>$8e(t,r),onSuccess:t=>{br.invalidateQueries({queryKey:["/api/mission-revenues",t.id]}),br.invalidateQueries({queryKey:["/api/missions",t.missionId,"revenues"]}),br.invalidateQueries({queryKey:["/api/missions",t.missionId]}),br.invalidateQueries({queryKey:["/api/missions"]}),e({title:"Succès",description:"Le revenu a été modifié avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible de modifier le revenu"})}})}function bJe(){const{toast:e}=sn();return qr({mutationFn:t=>z8e(t),onSuccess:(t,r)=>{br.invalidateQueries({queryKey:["/api/mission-revenues",r]}),br.invalidateQueries({queryKey:["/api/missions"]}),e({title:"Succès",description:"Le revenu a été supprimé avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible de supprimer le revenu"})}})}function wJe(e){return Ar({queryKey:["/api/missions",e,"expenses"],queryFn:()=>W8e(e),enabled:!!e,staleTime:0})}function EJe(){const{toast:e}=sn();return qr({mutationFn:t=>G8e(t),onSuccess:async(t,r)=>{br.setQueryData(["/api/missions",r.missionId,"expenses"],(n=[])=>n.some(i=>i.id===t.id)?n:[...n,t]),await br.invalidateQueries({queryKey:["/api/missions",r.missionId,"expenses"],refetchType:"active"}),await br.invalidateQueries({queryKey:["/api/missions",r.missionId]}),br.invalidateQueries({queryKey:["/api/missions"]}),e({title:"Succès",description:"La dépense a été ajoutée avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible d'ajouter la dépense"})}})}function CJe(){const{toast:e}=sn();return qr({mutationFn:t=>q8e(t),onSuccess:async(t,r)=>{const n=await br.getQueryData(["/api/mission-expenses",r]);n&&(br.invalidateQueries({queryKey:["/api/missions",n.missionId,"expenses"]}),br.invalidateQueries({queryKey:["/api/missions",n.missionId]})),br.invalidateQueries({queryKey:["/api/mission-expenses",r]}),br.invalidateQueries({queryKey:["/api/missions"]}),e({title:"Succès",description:"La dépense a été supprimée avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible de supprimer la dépense"})}})}function IJe({revenue:e,onEdit:t,onDelete:r}){const n=i=>i?new Intl.NumberFormat("fr-FR",{style:"currency",currency:"XOF",minimumFractionDigits:0,maximumFractionDigits:0}).format(i):"—";return e.montantPrevu&&e.montantRecu&&(e.montantPrevu,e.montantRecu),o.jsx(_t,{className:"hover:shadow-md transition-shadow",children:o.jsx(ar,{className:"p-4",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"p-3 rounded-lg border bg-green-100 text-green-800 border-green-300 dark:bg-green-900/20 dark:text-green-400 flex-shrink-0",children:o.jsx(B8,{className:"h-6 w-6"})}),o.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[o.jsx("div",{className:"flex items-start justify-between gap-2",children:o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx(ir,{variant:"secondary",className:"bg-green-100 text-green-800 border-green-300 dark:bg-green-900/20 dark:text-green-400 mb-2",children:"Revenu de mission"}),o.jsxs("div",{className:"space-y-1",children:[e.montantRecu?o.jsx("p",{className:"text-2xl font-bold text-green-600 dark:text-green-400",children:n(e.montantRecu)}):e.montantPrevu?o.jsx("p",{className:"text-2xl font-bold text-muted-foreground",children:n(e.montantPrevu)}):o.jsx("p",{className:"text-lg text-muted-foreground",children:"—"}),e.montantPrevu&&e.montantRecu&&e.montantPrevu!==e.montantRecu&&o.jsx("div",{className:"flex items-center gap-1 text-xs",children:e.montantRecut(e),className:"h-8 w-8",children:o.jsx(Lf,{className:"h-4 w-4"})}),r&&o.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>r(e.id),className:"h-8 w-8 text-destructive hover:text-destructive",children:o.jsx(fo,{className:"h-4 w-4"})})]})]})})})}function m_({missionId:e,onAdd:t,trigger:r,revenue:n,mode:i="create",open:a,onOpenChange:s}){const[l,c]=w.useState(!1),u=a!==void 0,d=u?a:l,f=u?s||(()=>{}):c,[m,g]=w.useState({montantPrevu:n?.montantPrevu,montantRecu:n?.montantRecu,origineContrat:n?.origineContrat});w.useEffect(()=>{n&&g({montantPrevu:n.montantPrevu,montantRecu:n.montantRecu,origineContrat:n.origineContrat})},[n]);const A=v=>{v.preventDefault(),t?.({...m,missionId:e}),f(!1),i==="create"&&g({montantPrevu:void 0,montantRecu:void 0,origineContrat:void 0})};return o.jsxs(ci,{open:d,onOpenChange:f,children:[!u&&o.jsx(xg,{asChild:!0,children:r||o.jsxs(Pe,{"data-testid":"button-add-revenue",className:"w-full md:w-auto",size:"sm",children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),i==="edit"?"Modifier le revenu":"Ajouter un revenu"]})}),o.jsxs(Zn,{className:"sm:max-w-[500px] max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:i==="edit"?"Modifier le revenu":"Ajouter un revenu"}),o.jsx(Ci,{children:i==="edit"?"Modifiez les informations du revenu de cette mission.":"Enregistrez un revenu pour cette mission (tour)."})]}),o.jsxs("form",{onSubmit:A,children:[o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"montantPrevu",children:"Montant prévu (FCFA)"}),o.jsx(wt,{id:"montantPrevu",type:"number",step:"0.01",placeholder:"100000",value:m.montantPrevu||"",onChange:v=>g({...m,montantPrevu:v.target.value?parseFloat(v.target.value):void 0}),min:"0",className:"h-12","data-testid":"input-expected-amount"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"montantRecu",children:"Montant reçu (FCFA)"}),o.jsx(wt,{id:"montantRecu",type:"number",step:"0.01",placeholder:"100000",value:m.montantRecu||"",onChange:v=>g({...m,montantRecu:v.target.value?parseFloat(v.target.value):void 0}),min:"0",className:"h-12","data-testid":"input-received-amount"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"origineContrat",children:"Origine du contrat"}),o.jsx(wt,{id:"origineContrat",placeholder:"Client, entreprise, etc.",value:m.origineContrat||"",onChange:v=>g({...m,origineContrat:v.target.value||void 0}),className:"h-12","data-testid":"input-contract-origin"})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>f(!1),"data-testid":"button-cancel",className:"w-full sm:w-auto h-12",children:"Annuler"}),o.jsx(Pe,{type:"submit","data-testid":"button-submit",className:"w-full sm:w-auto h-12",children:i==="edit"?"Modifier":"Ajouter"})]})]})]})]})}function nG({missionId:e,onAdd:t,trigger:r,expense:n,mode:i="create"}){const[a,s]=w.useState(!1),[l,c]=w.useState({categorie:n?.categorie||"autre",montant:n?.montant||0,date:n?.date?n.date instanceof Date?n.date.toISOString().split("T")[0]:Kr(new Date(n.date),"yyyy-MM-dd"):new Date().toISOString().split("T")[0],description:n?.description||"",justificatifUrl:n?.justificatifUrl||""}),u=d=>{d.preventDefault(),t?.({...l,missionId:e}),s(!1),i==="create"&&c({categorie:"autre",montant:0,date:new Date().toISOString().split("T")[0],description:"",justificatifUrl:""})};return o.jsxs(ci,{open:a,onOpenChange:s,children:[o.jsx(xg,{asChild:!0,children:r||o.jsxs(Pe,{"data-testid":"button-add-expense",className:"w-full md:w-auto",size:"sm",children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),i==="edit"?"Modifier la dépense":"Ajouter une dépense"]})}),o.jsxs(Zn,{className:"sm:max-w-[500px] max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:i==="edit"?"Modifier la dépense":"Ajouter une dépense"}),o.jsx(Ci,{children:i==="edit"?"Modifiez les informations de la dépense de cette mission.":"Enregistrez une dépense pour cette mission (frais administratifs, documentation, etc.)."})]}),o.jsxs("form",{onSubmit:u,children:[o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"categorie",children:"Catégorie"}),o.jsxs(ui,{value:l.categorie,onValueChange:d=>c({...l,categorie:d}),children:[o.jsx(ei,{id:"categorie",className:"h-12",children:o.jsx(di,{placeholder:"Sélectionner une catégorie"})}),o.jsx(ti,{children:VS.map(d=>o.jsxs(Tr,{value:d,children:[d==="carburant"&&"Carburant",d==="peage"&&"Péage",d==="douane"&&"Douane",d==="reparation"&&"Réparation",d==="consommables"&&"Consommables",d==="main_oeuvre"&&"Main d'œuvre",d==="autre"&&"Autre"]},d))})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"montant",children:"Montant (FCFA)"}),o.jsx(wt,{id:"montant",type:"number",step:"0.01",placeholder:"10000",value:l.montant||"",onChange:d=>c({...l,montant:d.target.value?parseFloat(d.target.value):0}),min:"0",required:!0,className:"h-12","data-testid":"input-amount"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"date",children:"Date"}),o.jsx(wt,{id:"date",type:"date",value:l.date,onChange:d=>c({...l,date:d.target.value}),required:!0,className:"h-12","data-testid":"input-date"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"description",children:"Description"}),o.jsx(wt,{id:"description",placeholder:"Description de la dépense",value:l.description||"",onChange:d=>c({...l,description:d.target.value||void 0}),className:"h-12","data-testid":"input-description"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"justificatifUrl",children:"URL du justificatif (optionnel)"}),o.jsx(wt,{id:"justificatifUrl",placeholder:"URL de la photo du ticket",value:l.justificatifUrl||"",onChange:d=>c({...l,justificatifUrl:d.target.value||void 0}),className:"h-12","data-testid":"input-justificatif"})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>s(!1),"data-testid":"button-cancel",className:"w-full sm:w-auto h-12",children:"Annuler"}),o.jsx(Pe,{type:"submit","data-testid":"button-submit",className:"w-full sm:w-auto h-12",children:i==="edit"?"Modifier":"Ajouter"})]})]})]})]})}const UI={carburant:_C,peage:rs,douane:NC,reparation:dP,consommables:uo,main_oeuvre:Uf,autre:yx},$I={carburant:"bg-yellow-100 text-yellow-800 border-yellow-300 dark:bg-yellow-900/20 dark:text-yellow-400",peage:"bg-blue-100 text-blue-800 border-blue-300 dark:bg-blue-900/20 dark:text-blue-400",douane:"bg-purple-100 text-purple-800 border-purple-300 dark:bg-purple-900/20 dark:text-purple-400",reparation:"bg-red-100 text-red-800 border-red-300 dark:bg-red-900/20 dark:text-red-400",consommables:"bg-green-100 text-green-800 border-green-300 dark:bg-green-900/20 dark:text-green-400",main_oeuvre:"bg-orange-100 text-orange-800 border-orange-300 dark:bg-orange-900/20 dark:text-orange-400",autre:"bg-gray-100 text-gray-800 border-gray-300 dark:bg-gray-900/20 dark:text-gray-400"},_he={carburant:"Carburant",peage:"Péage",douane:"Douane",reparation:"Réparation",consommables:"Consommables",main_oeuvre:"Main d'œuvre",autre:"Autre"};function oT({expense:e,onEdit:t,onDelete:r,onViewJustificatif:n}){const i=UI[e.categorie]||UI.autre,a=$I[e.categorie]||$I.autre,s=_he[e.categorie]||e.categorie,l=new Intl.NumberFormat("fr-FR",{style:"currency",currency:"XOF",minimumFractionDigits:0,maximumFractionDigits:0}).format(e.montant);return o.jsx(_t,{className:"hover:shadow-md transition-shadow",children:o.jsx(ar,{className:"p-4",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:`p-3 rounded-lg border ${a} flex-shrink-0`,children:o.jsx(i,{className:"h-6 w-6"})}),o.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[o.jsxs("div",{className:"flex items-start justify-between gap-2",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx(ir,{variant:"secondary",className:`${a} mb-2`,children:s}),o.jsx("p",{className:"text-2xl font-bold text-foreground",children:l})]}),e.justificatifUrl&&o.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>n?.(e.justificatifUrl),className:"flex-shrink-0",children:o.jsx(bx,{className:"h-5 w-5"})})]}),e.description&&o.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:e.description}),o.jsx("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(tc,{className:"h-3 w-3"}),o.jsx("span",{children:Kr(new Date(e.date),"d MMM yyyy",{locale:tn})})]})})]}),o.jsxs("div",{className:"flex flex-col gap-2 flex-shrink-0",children:[t&&o.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>t(e),className:"h-8 w-8",children:o.jsx(Lf,{className:"h-4 w-4"})}),r&&o.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>r(e.id),className:"h-8 w-8 text-destructive hover:text-destructive",children:o.jsx(fo,{className:"h-4 w-4"})})]})]})})})}const SJe={planned:"En préparation",in_progress:"En cours",completed:"Terminée",cancelled:"Annulée"},BJe={planned:r1,in_progress:kC,completed:es,cancelled:ay},iG={planned:"bg-purple-500/10 text-purple-700 dark:text-purple-400 border-purple-300",in_progress:"bg-green-500/10 text-green-700 dark:text-green-400 border-green-300",completed:"bg-green-500/10 text-green-700 dark:text-green-400 border-green-300",cancelled:"bg-gray-500/10 text-gray-700 dark:text-gray-400 border-gray-300"};function NJe(){const[,e]=tP("/missions/:id"),[,t]=Ic(),r=e?.id?parseInt(e.id):null,{data:n,isLoading:i,error:a}=Rle(r||0),{toast:s}=sn(),{data:l}=j1(),[c,u]=w.useState(null),[d,f]=w.useState(null),[m,g]=w.useState(null),[A,v]=w.useState(null),[b,E]=w.useState(null),I=l&&(l.role==="admin"||l.role==="gestionnaire_parc"||l.role==="gestionnaire_mobile"||l.role==="secretaire"),S=qr({mutationFn:async({tripId:he,data:Le})=>await fr(`/api/trips/${he}`,{method:"PATCH",body:Le}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/trips"]}),br.invalidateQueries({queryKey:["/api/missions"]}),s({title:"Succès",description:"Informations mises à jour avec succès"}),g(null),f(null),v(null),E(null)},onError:he=>{s({variant:"destructive",title:"Erreur",description:he.message||"Impossible de mettre à jour les informations"})}}),_=async()=>{if(!m)return;let he=m.loadingWeighingTicketUrl||void 0,Le=m.unloadingWeighingTicketUrl||void 0,Ye=m.loadingWeighingTicketCloudinaryPublicId||void 0,Oe=m.unloadingWeighingTicketCloudinaryPublicId||void 0;if(A)try{const it=await OO(A);he=it.url,Ye=it.publicId}catch{s({variant:"destructive",title:"Erreur",description:"Impossible d'uploader le ticket de pesée de chargement"});return}if(b)try{const it=await Qle(b);Le=it.url,Oe=it.publicId}catch{s({variant:"destructive",title:"Erreur",description:"Impossible d'uploader le ticket de pesée de déchargement"});return}S.mutate({tripId:m.id,data:{loadingWeighingTicketUrl:he||null,unloadingWeighingTicketUrl:Le||null,loadingWeighingTicketCloudinaryPublicId:Ye||null,unloadingWeighingTicketCloudinaryPublicId:Oe||null}})},{data:B=[]}=Ar({queryKey:["/api/vehicles"]}),{data:T=[],isLoading:P}=Ar({queryKey:["/api/trips",r],queryFn:async()=>{if(!r)return[];try{const he=await fetch(`/api/trips?missionId=${r}`);if(!he.ok)return console.error("Erreur lors de la récupération des voyages:",he.status,he.statusText),[];const Le=await he.json();return Array.isArray(Le)?Le:(console.error("La réponse de l'API n'est pas un tableau:",Le),[])}catch(he){return console.error("Erreur lors du fetch des voyages:",he),[]}},enabled:!!r}),O=w.useMemo(()=>(Array.isArray(T)?T:[]).map(Le=>{const Ye=B.find(Oe=>Oe.id===Le.vehicleId);return{...Le,vehicleRegistration:Ye?.immatriculation||"",vehiclePhotoUrl:Ye?.photoUrl||null}}),[T,B]),z=[{value:"moteur",label:"Moteur",icon:_1},{value:"frein",label:"Frein",icon:C3},{value:"pneu",label:"Pneu",icon:I3},{value:"electrique",label:"Électrique",icon:B3},{value:"autre",label:"Autre incident",icon:yx}],L=w.useMemo(()=>Array.from(new Set(O.map(he=>he.vehicleId).filter(Boolean))),[O]),{data:W=[]}=Ar({queryKey:["/api/breakdowns",L],queryFn:async()=>{const he=L.map(Ye=>J3(Ye));return(await Promise.all(he)).flat()},enabled:L.length>0}),R=w.useMemo(()=>{const he=new Map;return L.forEach(Le=>{const Ye=W.filter(Oe=>Oe.vehicleId===Le);Ye.length>0&&he.set(Le,Ye)}),he},[W,L]),{data:$=[],isLoading:X}=vJe(r||0),{data:Z=[],isLoading:K}=wJe(r||0),{data:q=[],isLoading:Y}=Ar({queryKey:["/api/missions",r,"trip-expenses"],queryFn:async()=>{if(!r||!Array.isArray(T)||T.length===0)return[];const Le=(Array.isArray(T)?T:[]).map(async Oe=>{const it=await fetch(`/api/trips/${Oe.id}/expenses`);return it.ok?it.json():[]});return(await Promise.all(Le)).flat()},enabled:!!r&&Array.isArray(T)&&T.length>0}),ne=xJe(),ge=yJe(),ae=bJe(),pe=EJe(),_e=CJe(),we=w.useMemo(()=>{const he=$.reduce((vt,mt)=>vt+(mt.montantRecu||mt.montantPrevu||0),0),Le=q.reduce((vt,mt)=>vt+mt.montant,0),Ye=Z.reduce((vt,mt)=>vt+mt.montant,0),Oe=Le+Ye,it=he-Oe;return{totalRevenues:he,totalExpenses:Oe,profit:it}},[$,q,Z]),xe=he=>{ne.mutate(he)},Me=he=>{u(he)},ye=he=>{c?.id&&(ge.mutate({id:c.id,data:he}),u(null))},Ee=he=>{confirm("Êtes-vous sûr de vouloir supprimer ce revenu ?")&&ae.mutate(he)},me=he=>{pe.mutate(he)},Se=he=>{confirm("Êtes-vous sûr de vouloir supprimer cette dépense ?")&&_e.mutate(he)},Ie=he=>new Intl.NumberFormat("fr-FR",{style:"currency",currency:"XOF",minimumFractionDigits:0,maximumFractionDigits:0}).format(he),Be=w.useMemo(()=>{if(!n?.expectedTours||n.expectedTours===0)return{completed:0,total:1,percentage:0};const Le=(Array.isArray(T)?T:[]).filter(it=>it.status==="completed").length,Ye=n.expectedTours,Oe=Ye>0?Math.min(Le/(Ye*2)*100,100):0;return{completed:Le,total:Ye*2,percentage:Oe}},[T,n?.expectedTours]),Xe=w.useMemo(()=>{const he={};return Z.forEach(Le=>{he[Le.categorie]||(he[Le.categorie]=[]),he[Le.categorie].push(Le)}),he},[Z]);if(!r)return o.jsxs("div",{className:"space-y-6 pb-8",children:[o.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>t("/missions"),children:o.jsx(P0,{className:"h-5 w-5"})}),o.jsx(_t,{className:"p-8",children:o.jsx("p",{className:"text-center text-muted-foreground",children:"ID de mission invalide"})})]});if(i)return o.jsxs("div",{className:"space-y-6 pb-8",children:[o.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>t("/missions"),children:o.jsx(P0,{className:"h-5 w-5"})}),o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})})]});if(a||!n)return o.jsxs("div",{className:"space-y-6 pb-8",children:[o.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>t("/missions"),children:o.jsx(P0,{className:"h-5 w-5"})}),o.jsx(_t,{className:"p-8",children:o.jsx("p",{className:"text-center text-destructive",children:"Mission non trouvée"})})]});const ke=BJe[n.status]||es;return o.jsxs("div",{className:"space-y-6 pb-8",children:[o.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>t("/missions"),children:o.jsx(P0,{className:"h-5 w-5"})}),o.jsx(_t,{className:"border-2",children:o.jsxs(ar,{className:"p-6",children:[o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-bold mb-2",children:n.title}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Code mission : ",n.code]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ke,{className:`h-6 w-6 ${iG[n.status]?.split(" ")[1]||"text-gray-500"}`}),o.jsx(ir,{className:`${iG[n.status]} text-base px-4 py-2`,children:SJe[n.status]||n.status})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(NC,{className:"h-5 w-5 text-muted-foreground"}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:"Client"}),o.jsx("p",{className:"font-semibold",children:n.clientName})]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(rs,{className:"h-5 w-5 text-primary"}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:"Itinéraire"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"font-semibold",children:n.loadingSite}),o.jsx(BC,{className:"h-4 w-4 text-muted-foreground"}),o.jsx("span",{className:"font-semibold",children:n.unloadingSite})]})]})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[n.vehicle?.photoUrl?o.jsx("img",{src:hn(n.vehicle.photoUrl)||void 0,alt:n.vehicle.immatriculation,className:"w-16 h-16 object-cover rounded-lg border"}):o.jsx("div",{className:"w-16 h-16 bg-muted rounded-lg flex items-center justify-center border",children:o.jsx(Do,{className:"h-8 w-8 text-muted-foreground"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:"Véhicule"}),o.jsx("p",{className:"font-semibold text-sm",children:n.vehicle?.immatriculation||"—"})]})]}),n.trailer&&o.jsxs("div",{className:"flex items-center gap-3 pl-2",children:[n.trailer.photoUrl?o.jsx("img",{src:hn(n.trailer.photoUrl)||void 0,alt:n.trailer.numeroChassis,className:"w-12 h-12 object-cover rounded-lg border"}):o.jsx("div",{className:"w-12 h-12 bg-muted rounded-lg flex items-center justify-center border",children:o.jsx(uo,{className:"h-6 w-6 text-muted-foreground"})}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:"Remorque"}),o.jsx(ir,{variant:"outline",className:"text-xs",children:"Remorque"})]}),o.jsx("p",{className:"font-semibold text-sm",children:n.trailer.numeroChassis})]})]}),n.mainDriver&&o.jsxs("div",{className:"flex items-center gap-3 pt-2 border-t",children:[n.mainDriver.photoUrl?o.jsx("img",{src:hn(n.mainDriver.photoUrl)||void 0,alt:`${n.mainDriver.prenom} ${n.mainDriver.nom}`,className:"w-12 h-12 rounded-full object-cover border-2"}):o.jsx("div",{className:"w-12 h-12 rounded-full bg-muted flex items-center justify-center border-2",children:o.jsx(Uf,{className:"h-6 w-6 text-muted-foreground"})}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:"Chauffeur"}),o.jsx(ir,{variant:"outline",className:"text-xs",children:"Chauffeur"})]}),o.jsxs("p",{className:"font-semibold text-sm",children:[n.mainDriver.prenom," ",n.mainDriver.nom]})]})]})]})]}),o.jsxs("div",{className:"flex flex-wrap gap-2 mt-6 pt-6 border-t",children:[o.jsxs(Pe,{variant:"outline",onClick:()=>t(`/missions/${n.id}/ordre-de-mission`),children:[o.jsx(Ibe,{className:"h-4 w-4 mr-2"}),"Ordre de mission"]}),o.jsxs(Pe,{variant:"outline",onClick:()=>t(`/missions/${n.id}/edit`),children:[o.jsx(S3,{className:"h-4 w-4 mr-2"}),"Modifier"]}),o.jsxs(Pe,{onClick:()=>t(`/trajets/new?missionId=${n.id}`),children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Ajouter un voyage"]})]})]})}),o.jsxs(vg,{defaultValue:"resume",className:"space-y-6",children:[o.jsxs(Bm,{className:"grid w-full grid-cols-2",children:[o.jsxs(Ii,{value:"resume",className:"flex items-center gap-2",children:[o.jsx(ng,{className:"h-4 w-4"}),"Résumé"]}),o.jsxs(Ii,{value:"argent",className:"flex items-center gap-2",children:[o.jsx(Dbe,{className:"h-4 w-4"}),"Argent"]})]}),o.jsx(Ms,{value:"resume",className:"space-y-6",children:o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[o.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Informations générales"}),o.jsx(Qi,{children:"Détails de la mission et du chargement"})]}),o.jsxs(ar,{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsxs("p",{className:"text-sm font-medium mb-2 flex items-center gap-2",children:[o.jsx(uo,{className:"h-4 w-4"}),"Type de chargement"]}),o.jsx(ir,{variant:"secondary",className:"text-base px-3 py-1",children:n.loadingType})]}),o.jsx(vd,{}),o.jsxs("div",{children:[o.jsxs("p",{className:"text-sm font-medium mb-2 flex items-center gap-2",children:[o.jsx(NC,{className:"h-4 w-4"}),"Client"]}),o.jsx("p",{className:"text-base",children:n.clientName}),n.clientReference&&o.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Ref: ",n.clientReference]})]}),o.jsx(vd,{}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium mb-2",children:"Itinéraire"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(rs,{className:"h-5 w-5 text-primary"}),o.jsx("span",{className:"font-semibold",children:n.loadingSite}),o.jsx(BC,{className:"h-4 w-4 text-muted-foreground"}),o.jsx(rs,{className:"h-5 w-5 text-primary"}),o.jsx("span",{className:"font-semibold",children:n.unloadingSite})]})]}),o.jsx(vd,{}),o.jsxs("div",{children:[o.jsxs("p",{className:"text-sm font-medium mb-2 flex items-center gap-2",children:[o.jsx(bx,{className:"h-4 w-4"}),"Bon de chargement"]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("p",{className:"text-base",children:["N° ",n.loadingOrderNumber]}),o.jsx("p",{className:"text-sm text-muted-foreground",children:n.loadingOrderDate&&Kr(new Date(n.loadingOrderDate),"PPP",{locale:tn})}),n.loadingBonImageUrl?o.jsxs("div",{className:"mt-3 relative group",children:[o.jsx("img",{src:n.loadingBonImageUrl,alt:"Bon de chargement",className:"w-full max-w-md h-auto rounded-lg border cursor-pointer hover:opacity-90 transition-opacity",onClick:()=>window.open(n.loadingBonImageUrl,"_blank")}),o.jsx(Pe,{variant:"ghost",size:"icon",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity bg-background/80",onClick:()=>window.open(n.loadingBonImageUrl,"_blank"),children:o.jsx(D0,{className:"h-4 w-4"})})]}):o.jsxs("div",{className:"mt-3 p-8 border-2 border-dashed rounded-lg text-center",children:[o.jsx(ng,{className:"h-12 w-12 mx-auto text-muted-foreground mb-2"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Photo du bon non ajoutée"})]})]})]})]})]}),o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Nombre de tours prévus"}),o.jsx(Qi,{children:"Suivi de la progression des tours"})]}),o.jsxs(ar,{className:"space-y-4",children:[o.jsx("p",{className:"text-base",children:"1 tour = aller + retour complet"}),n.expectedTours&&n.expectedTours>0&&o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between text-sm",children:[o.jsx("span",{className:"text-muted-foreground",children:"Tours réalisés"}),o.jsxs("span",{className:"font-semibold",children:[Be.completed," / ",Be.total," voyages"]})]}),o.jsx(khe,{value:Be.percentage,className:"h-3"})]})]})]}),o.jsxs(_t,{children:[o.jsx(Xr,{children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx(cn,{children:"Voyages associés"}),o.jsx(Qi,{children:"Voyages associés à cette mission"})]}),o.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>t(`/trajets/new?missionId=${n.id}`),children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Ajouter un voyage"]})]})}),o.jsx(ar,{children:O.length===0?o.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[o.jsx("p",{children:"Aucun voyage associé à cette mission"}),o.jsxs(Pe,{variant:"outline",className:"mt-4",onClick:()=>t(`/trajets/new?missionId=${n.id}`),children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Créer le premier voyage"]})]}):o.jsx("div",{className:"space-y-4",children:Array.isArray(O)&&O.map(he=>o.jsxs("div",{className:"space-y-3",children:[o.jsx(OP,{...he,vehiclePhotoUrl:he.vehiclePhotoUrl}),o.jsx(AJe,{tripId:he.id}),(he.loadingCompletedAt||he.unloadingCompletedAt||he.departureOdometerKm||he.arrivalOdometerKm||he.fuelFillCostFcfa||he.loadingWeighingTicketUrl||he.unloadingWeighingTicketUrl)&&o.jsxs(_t,{className:"bg-muted/50",children:[o.jsx(Xr,{className:"pb-3",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(cn,{className:"text-base",children:"Informations du chauffeur"}),I&&o.jsxs(Pe,{variant:"ghost",size:"sm",onClick:()=>{g(he),f(he.id),v(null),E(null)},children:[o.jsx(Lf,{className:"h-4 w-4 mr-2"}),"Modifier"]})]})}),o.jsxs(ar,{className:"space-y-4",children:[he.loadingCompletedAt&&o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(uo,{className:"h-4 w-4 text-primary"}),o.jsx("span",{className:"text-sm font-medium",children:"Chargement"})]}),o.jsx(ir,{variant:"outline",className:"text-xs",children:Kr(new Date(he.loadingCompletedAt),"dd/MM/yyyy HH:mm",{locale:tn})})]}),he.loadingWeighingTicketUrl&&o.jsxs("div",{className:"relative group",children:[o.jsx("img",{src:he.loadingWeighingTicketUrl,alt:"Ticket de pesée de chargement",className:"w-full h-32 object-cover rounded-lg border cursor-pointer hover:opacity-90 transition-opacity",onClick:()=>window.open(he.loadingWeighingTicketUrl,"_blank")}),o.jsx(Pe,{variant:"ghost",size:"icon",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity bg-background/80",onClick:()=>window.open(he.loadingWeighingTicketUrl,"_blank"),children:o.jsx(D0,{className:"h-4 w-4"})})]})]}),he.unloadingCompletedAt&&o.jsxs("div",{className:"space-y-2",children:[he.loadingCompletedAt&&o.jsx(vd,{}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(uo,{className:"h-4 w-4 text-primary"}),o.jsx("span",{className:"text-sm font-medium",children:"Déchargement"})]}),o.jsx(ir,{variant:"outline",className:"text-xs",children:Kr(new Date(he.unloadingCompletedAt),"dd/MM/yyyy HH:mm",{locale:tn})})]}),he.unloadingWeighingTicketUrl&&o.jsxs("div",{className:"relative group",children:[o.jsx("img",{src:he.unloadingWeighingTicketUrl,alt:"Ticket de pesée de déchargement",className:"w-full h-32 object-cover rounded-lg border cursor-pointer hover:opacity-90 transition-opacity",onClick:()=>window.open(he.unloadingWeighingTicketUrl,"_blank")}),o.jsx(Pe,{variant:"ghost",size:"icon",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity bg-background/80",onClick:()=>window.open(he.unloadingWeighingTicketUrl,"_blank"),children:o.jsx(D0,{className:"h-4 w-4"})})]})]}),(he.departureOdometerKm||he.arrivalOdometerKm)&&o.jsxs(o.Fragment,{children:[(he.loadingCompletedAt||he.unloadingCompletedAt)&&o.jsx(vd,{}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Qb,{className:"h-4 w-4 text-primary"}),o.jsx("span",{className:"text-sm font-medium",children:"Kilométrages"})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[he.departureOdometerKm&&o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Départ:"})," ",o.jsxs("span",{className:"font-semibold",children:[he.departureOdometerKm," km"]})]}),he.arrivalOdometerKm&&o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Arrivée:"})," ",o.jsxs("span",{className:"font-semibold",children:[he.arrivalOdometerKm," km"]})]})]})]})]}),(he.fuelFillCostFcfa||he.fuelFillAmountL||he.fuelReceiptUrl)&&o.jsxs(o.Fragment,{children:[(he.loadingCompletedAt||he.unloadingCompletedAt||he.departureOdometerKm||he.arrivalOdometerKm)&&o.jsx(vd,{}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(_C,{className:"h-4 w-4 text-primary"}),o.jsx("span",{className:"text-sm font-medium",children:"Carburant"})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[he.fuelFillCostFcfa&&o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Coût:"})," ",o.jsxs("span",{className:"font-semibold",children:[he.fuelFillCostFcfa.toLocaleString()," FCFA"]})]}),he.fuelFillAmountL&&o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Litres:"})," ",o.jsxs("span",{className:"font-semibold",children:[he.fuelFillAmountL," L"]})]})]}),he.fuelReceiptUrl&&o.jsxs("div",{className:"relative group mt-2",children:[o.jsx("img",{src:he.fuelReceiptUrl,alt:"Reçu carburant",className:"w-full h-24 object-cover rounded-lg border cursor-pointer hover:opacity-90 transition-opacity",onClick:()=>window.open(he.fuelReceiptUrl,"_blank")}),o.jsx(Pe,{variant:"ghost",size:"icon",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity bg-background/80",onClick:()=>window.open(he.fuelReceiptUrl,"_blank"),children:o.jsx(D0,{className:"h-4 w-4"})})]})]})]}),(R.get(he.vehicleId)&&R.get(he.vehicleId).length>0||I)&&o.jsxs(o.Fragment,{children:[(he.loadingCompletedAt||he.unloadingCompletedAt||he.departureOdometerKm||he.arrivalOdometerKm||he.fuelFillCostFcfa||he.fuelFillAmountL||he.fuelReceiptUrl)&&o.jsx(vd,{}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Vp,{className:"h-4 w-4 text-orange-600"}),o.jsx("span",{className:"text-sm font-medium",children:"Pannes et incidents signalés"}),R.get(he.vehicleId)&&R.get(he.vehicleId).length>0&&o.jsx(ir,{variant:"outline",className:"text-xs",children:R.get(he.vehicleId).length})]}),I&&o.jsx(Lle,{vehicleId:he.vehicleId,onAdd:async Le=>{try{await vSe(Le),br.invalidateQueries({queryKey:["/api/breakdowns"],exact:!1}),s({title:"Succès",description:"Panne créée avec succès"})}catch(Ye){s({variant:"destructive",title:"Erreur",description:Ye instanceof Error?Ye.message:"Impossible de créer la panne"})}}})]}),o.jsx("div",{className:"space-y-2",children:R.get(he.vehicleId)&&R.get(he.vehicleId).length>0?R.get(he.vehicleId).map(Le=>{const Ye=z.find(it=>it.value===Le.type),Oe=Ye?.icon||yx;return o.jsx(_t,{className:"border-orange-200 dark:border-orange-800",children:o.jsx(ar,{className:"p-3",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"flex-shrink-0",children:o.jsx("div",{className:"w-10 h-10 rounded-full bg-orange-100 dark:bg-orange-900/30 flex items-center justify-center",children:o.jsx(Oe,{className:"h-5 w-5 text-orange-600 dark:text-orange-400"})})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center justify-between mb-1",children:[o.jsx("p",{className:"font-semibold text-sm",children:Ye?.label||Le.type}),Le.status&&o.jsx(ir,{variant:"outline",className:`text-xs ${Le.status==="pending"?"border-orange-500 text-orange-600 bg-orange-50 dark:bg-orange-950":Le.status==="in_progress"?"border-blue-500 text-blue-600 bg-blue-50 dark:bg-blue-950":"border-green-500 text-green-600 bg-green-50 dark:bg-green-950"}`,children:Le.status==="pending"?"En attente":Le.status==="in_progress"?"En cours":"Pris en charge"})]}),Le.date&&o.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:Kr(new Date(Le.date),"dd/MM/yyyy",{locale:tn})}),Le.photoUrl&&o.jsxs("div",{className:"mt-2 relative group",children:[o.jsx("img",{src:hn(Le.photoUrl)||void 0,alt:"Photo du problème",className:"w-full h-24 object-cover rounded-lg border cursor-pointer hover:opacity-90 transition-opacity",onClick:()=>window.open(hn(Le.photoUrl)||"","_blank")}),o.jsx(Pe,{variant:"ghost",size:"icon",className:"absolute top-1 right-1 opacity-0 group-hover:opacity-100 transition-opacity bg-background/80 h-6 w-6",onClick:()=>window.open(Le.photoUrl,"_blank"),children:o.jsx(D0,{className:"h-3 w-3"})})]}),Le.videoUrl&&o.jsx("div",{className:"mt-2",children:o.jsxs("video",{controls:!0,className:"w-full h-24 object-cover rounded-lg border",children:[o.jsx("source",{src:Le.videoUrl,type:"video/mp4"}),o.jsx("source",{src:Le.videoUrl,type:"video/webm"}),o.jsx("source",{src:Le.videoUrl,type:"video/quicktime"}),"Votre navigateur ne supporte pas l'élément vidéo."]})}),Le.audioUrl&&o.jsx("div",{className:"mt-2",children:o.jsxs("audio",{controls:!0,className:"w-full h-8",children:[o.jsx("source",{src:Le.audioUrl,type:"audio/webm"}),o.jsx("source",{src:Le.audioUrl,type:"audio/mpeg"}),"Votre navigateur ne supporte pas l'élément audio."]})}),Le.responseAudioUrl&&o.jsxs("div",{className:"mt-2 p-2 bg-blue-50 dark:bg-blue-950/30 rounded-lg border border-blue-200 dark:border-blue-800",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[o.jsx(bd,{className:"h-3 w-3 text-blue-600 dark:text-blue-400"}),o.jsx("p",{className:"text-xs font-semibold text-blue-900 dark:text-blue-100",children:"Message du bureau"}),Le.responseCreatedAt&&o.jsx("span",{className:"text-xs text-blue-600 dark:text-blue-400",children:Kr(new Date(Le.responseCreatedAt),"dd/MM/yyyy HH:mm",{locale:tn})})]}),o.jsxs("audio",{controls:!0,className:"w-full h-8",children:[o.jsx("source",{src:Le.responseAudioUrl,type:"audio/webm"}),o.jsx("source",{src:Le.responseAudioUrl,type:"audio/mpeg"}),"Votre navigateur ne supporte pas l'élément audio."]})]})]})]})})},Le.id)}):o.jsx("div",{className:"text-center py-4 text-sm text-muted-foreground",children:"Aucune panne signalée pour ce véhicule"})})]})]})]})]})]},he.id))})})]})]}),o.jsx("div",{className:"space-y-6",children:o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Équipage"}),o.jsx(Qi,{children:"Chauffeur et membres d'équipage"})]}),o.jsxs(ar,{className:"space-y-4",children:[n.mainDriver&&o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium mb-2",children:"Chauffeur principal"}),o.jsxs("div",{className:"flex items-center gap-3",children:[n.mainDriver.photoUrl?o.jsx("img",{src:hn(n.mainDriver.photoUrl)||void 0,alt:`${n.mainDriver.prenom} ${n.mainDriver.nom}`,className:"w-12 h-12 rounded-full object-cover border-2"}):o.jsx("div",{className:"w-12 h-12 rounded-full bg-muted flex items-center justify-center border-2",children:o.jsx(Uf,{className:"h-6 w-6 text-muted-foreground"})}),o.jsxs("div",{children:[o.jsxs("p",{className:"font-semibold text-sm",children:[n.mainDriver.prenom," ",n.mainDriver.nom]}),o.jsx(ir,{variant:"outline",className:"text-xs mt-1",children:"Chauffeur"})]})]})]}),n.additionalCrew&&n.additionalCrew.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(vd,{}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium mb-2",children:"Autres membres d'équipage"}),o.jsx("div",{className:"space-y-3",children:n.additionalCrew.map(he=>o.jsxs("div",{className:"flex items-center gap-3",children:[he.photoUrl?o.jsx("img",{src:hn(he.photoUrl)||void 0,alt:`${he.prenom} ${he.nom}`,className:"w-10 h-10 rounded-full object-cover border"}):o.jsx("div",{className:"w-10 h-10 rounded-full bg-muted flex items-center justify-center border",children:o.jsx(Uf,{className:"h-5 w-5 text-muted-foreground"})}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("p",{className:"font-semibold text-sm",children:[he.prenom," ",he.nom]}),o.jsx(ir,{variant:"outline",className:"text-xs mt-1",children:"Apprenti"})]})]},he.id))})]})]})]})]})})]})}),o.jsxs(Ms,{value:"argent",className:"space-y-6",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[o.jsxs(_t,{className:"border-green-200 dark:border-green-900",children:[o.jsx(Xr,{className:"pb-3",children:o.jsxs(cn,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[o.jsx(hN,{className:"h-5 w-5 text-green-500"}),"Ce que le client paye"]})}),o.jsxs(ar,{className:"space-y-2",children:[o.jsx("p",{className:"text-3xl font-bold text-green-600 dark:text-green-400",children:Ie(we.totalRevenues)}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Total payé par le client"})]})]}),o.jsxs(_t,{className:"border-red-200 dark:border-red-900",children:[o.jsx(Xr,{className:"pb-3",children:o.jsxs(cn,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[o.jsx(hN,{className:"h-5 w-5 text-red-500"}),"Ce que la mission coûte"]})}),o.jsxs(ar,{className:"space-y-2",children:[o.jsx("p",{className:"text-3xl font-bold text-red-600 dark:text-red-400",children:Ie(we.totalExpenses)}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Total des dépenses"})]})]}),o.jsxs(_t,{className:`${we.profit>=0?"border-violet-200 dark:border-violet-900":"border-red-200 dark:border-red-900"}`,children:[o.jsx(Xr,{className:"pb-3",children:o.jsxs(cn,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[o.jsx(hN,{className:`h-5 w-5 ${we.profit>=0?"text-violet-500":"text-red-500"}`}),we.profit>=0?"Bénéfice":"Perte estimée"]})}),o.jsxs(ar,{className:"space-y-2",children:[o.jsx("p",{className:`text-3xl font-bold ${we.profit>=0?"text-violet-600 dark:text-violet-400":"text-red-600 dark:text-red-400"}`,children:Ie(Math.abs(we.profit))}),o.jsx("p",{className:"text-xs text-muted-foreground",children:we.profit>=0?"Bénéfice pour cette mission":"Perte estimée pour cette mission"})]})]})]}),we.totalRevenues>0&&o.jsxs(_t,{children:[o.jsx(Xr,{children:o.jsx(cn,{className:"text-sm",children:"Répartition des montants"})}),o.jsxs(ar,{className:"space-y-3",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between text-xs",children:[o.jsx("span",{className:"text-green-600 dark:text-green-400",children:"Revenus"}),o.jsx("span",{className:"font-semibold",children:Ie(we.totalRevenues)})]}),o.jsx("div",{className:"h-4 bg-green-200 dark:bg-green-900 rounded-full overflow-hidden",children:o.jsx("div",{className:"h-full bg-green-500",style:{width:"100%"}})})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between text-xs",children:[o.jsx("span",{className:"text-red-600 dark:text-red-400",children:"Dépenses"}),o.jsx("span",{className:"font-semibold",children:Ie(we.totalExpenses)})]}),o.jsx("div",{className:"h-4 bg-red-200 dark:bg-red-900 rounded-full overflow-hidden",children:o.jsx("div",{className:"h-full bg-red-500",style:{width:`${we.totalRevenues>0?we.totalExpenses/we.totalRevenues*100:0}%`}})})]})]})]}),o.jsxs(_t,{children:[o.jsx(Xr,{children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx(cn,{children:"Revenus de la mission"}),o.jsx(Qi,{children:"Ce que le client paye"})]}),$.length===0&&o.jsx(m_,{missionId:r,onAdd:xe})]})}),o.jsx(ar,{children:X?o.jsx("div",{className:"flex justify-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):$.length===0?o.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[o.jsx("p",{className:"mb-4",children:"Aucun revenu enregistré pour cette mission"}),o.jsx(m_,{missionId:r,onAdd:xe})]}):o.jsx("div",{className:"space-y-4",children:$.map(he=>o.jsx(IJe,{revenue:he,onEdit:Me,onDelete:Ee},he.id))})})]}),c&&o.jsx(m_,{missionId:r||0,revenue:c,mode:"edit",onAdd:ye,open:!!c,onOpenChange:he=>{he||u(null)}}),o.jsxs(_t,{children:[o.jsx(Xr,{children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx(cn,{children:"Dépenses de la mission"}),o.jsx(Qi,{children:"Ce que la mission coûte (hors détails par voyage)"})]}),o.jsx(nG,{missionId:r,onAdd:me})]})}),o.jsx(ar,{children:K?o.jsx("div",{className:"flex justify-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):Z.length===0?o.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[o.jsx("p",{className:"mb-4",children:"Aucune dépense de mission enregistrée"}),o.jsx(nG,{missionId:r,onAdd:me})]}):o.jsx("div",{className:"space-y-6",children:Object.entries(Xe).map(([he,Le])=>{const Ye=UI[he]||UI.autre,Oe=$I[he]||$I.autre,it=_he[he]||he,vt=Le.reduce((mt,Qt)=>mt+Qt.montant,0);return o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:`p-2 rounded-lg ${Oe}`,children:o.jsx(Ye,{className:"h-4 w-4"})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold",children:it}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:[Le.length," dépense",Le.length>1?"s":""]})]})]}),o.jsx("p",{className:"text-lg font-bold",children:Ie(vt)})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 pl-4 border-l-2 border-muted",children:Le.map(mt=>o.jsx(oT,{expense:mt,onDelete:Se,onViewJustificatif:Qt=>window.open(Qt,"_blank")},mt.id))})]},he)})})})]}),o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Dépenses par tour"}),o.jsx(Qi,{children:"Dépenses regroupées par tour (aller / retour)"})]}),o.jsx(ar,{children:O.length===0?o.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o.jsx("p",{children:"Aucun voyage associé à cette mission"})}):o.jsx("div",{className:"space-y-6",children:Array.isArray(O)&&O.map(he=>{const Le=q.filter(it=>it.tripId===he.id),Ye=Le.reduce((it,vt)=>it+vt.montant,0),Oe=he.origine&&he.destination?`${he.origine} → ${he.destination}`:`Voyage #${he.id}`;return o.jsx(_t,{className:"border-l-4 border-l-primary",children:o.jsxs(ar,{className:"p-4",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"font-semibold text-lg",children:Oe}),o.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[o.jsx(ir,{variant:"outline",className:"text-xs",children:he.status==="scheduled"?"Programmé":he.status==="in_transit"?"En cours":he.status==="completed"?"Terminé":"Annulé"}),o.jsxs("span",{className:"text-sm text-muted-foreground",children:[Le.length," dépense",Le.length>1?"s":""]})]})]}),o.jsxs("div",{className:"text-right",children:[o.jsx("p",{className:"text-2xl font-bold",children:Ie(Ye)}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Total du voyage"})]})]}),Le.length>0?o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:Le.map(it=>o.jsx(oT,{expense:it,onViewJustificatif:vt=>window.open(vt,"_blank")},it.id))}):o.jsx("p",{className:"text-sm text-muted-foreground",children:"Aucune dépense pour ce voyage"}),o.jsx(Pe,{variant:"outline",size:"sm",className:"mt-4 w-full",onClick:()=>t(`/trajets/${he.id}`),children:"Voir le détail du voyage"})]})},he.id)})})})]})]})]}),o.jsx(ci,{open:d!==null,onOpenChange:he=>{he||(g(null),f(null),v(null),E(null))},children:o.jsxs(Zn,{className:"sm:max-w-[500px] mx-4 max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Modifier les informations du chauffeur"}),o.jsx(Ci,{children:"Modifiez les tickets de pesée et autres informations renseignées par le chauffeur"})]}),m&&o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium mb-2 block",children:"Ticket de pesée de chargement"}),m.loadingWeighingTicketUrl&&!A&&o.jsxs("div",{className:"mb-2 relative group",children:[o.jsx("img",{src:m.loadingWeighingTicketUrl,alt:"Ticket actuel",className:"w-full h-32 object-cover rounded-lg border cursor-pointer hover:opacity-90 transition-opacity",onClick:()=>window.open(m.loadingWeighingTicketUrl,"_blank")}),o.jsx(Pe,{variant:"ghost",size:"icon",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity bg-background/80",onClick:()=>window.open(m.loadingWeighingTicketUrl,"_blank"),children:o.jsx(D0,{className:"h-4 w-4"})}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1 text-center",children:"Ticket actuel"})]}),o.jsx("input",{type:"file",accept:"image/*",id:"edit-loading-ticket",onChange:he=>{const Le=he.target.files?.[0];Le&&v(Le)},className:"hidden"}),A?o.jsxs("div",{className:"space-y-2",children:[o.jsx("img",{src:URL.createObjectURL(A),alt:"Nouveau ticket",className:"w-full h-32 object-cover rounded-lg border"}),o.jsx(Pe,{variant:"ghost",size:"sm",onClick:()=>v(null),className:"w-full",children:"Supprimer"})]}):o.jsxs(Pe,{variant:"outline",onClick:()=>document.getElementById("edit-loading-ticket")?.click(),className:"w-full",children:[o.jsx(_u,{className:"h-4 w-4 mr-2"}),m.loadingWeighingTicketUrl?"Remplacer le ticket":"Ajouter un ticket"]})]}),o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm font-medium mb-2 block",children:"Ticket de pesée de déchargement"}),m.unloadingWeighingTicketUrl&&!b&&o.jsxs("div",{className:"mb-2 relative group",children:[o.jsx("img",{src:m.unloadingWeighingTicketUrl,alt:"Ticket actuel",className:"w-full h-32 object-cover rounded-lg border cursor-pointer hover:opacity-90 transition-opacity",onClick:()=>window.open(m.unloadingWeighingTicketUrl,"_blank")}),o.jsx(Pe,{variant:"ghost",size:"icon",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity bg-background/80",onClick:()=>window.open(m.unloadingWeighingTicketUrl,"_blank"),children:o.jsx(D0,{className:"h-4 w-4"})}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1 text-center",children:"Ticket actuel"})]}),o.jsx("input",{type:"file",accept:"image/*",id:"edit-unloading-ticket",onChange:he=>{const Le=he.target.files?.[0];Le&&E(Le)},className:"hidden"}),b?o.jsxs("div",{className:"space-y-2",children:[o.jsx("img",{src:URL.createObjectURL(b),alt:"Nouveau ticket",className:"w-full h-32 object-cover rounded-lg border"}),o.jsx(Pe,{variant:"ghost",size:"sm",onClick:()=>E(null),className:"w-full",children:"Supprimer"})]}):o.jsxs(Pe,{variant:"outline",onClick:()=>document.getElementById("edit-unloading-ticket")?.click(),className:"w-full",children:[o.jsx(_u,{className:"h-4 w-4 mr-2"}),m.unloadingWeighingTicketUrl?"Remplacer le ticket":"Ajouter un ticket"]})]})]}),o.jsxs(ji,{children:[o.jsx(Pe,{variant:"outline",onClick:()=>{g(null),f(null),v(null),E(null)},children:"Annuler"}),o.jsx(Pe,{onClick:_,disabled:S.isPending,children:S.isPending?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Enregistrement..."]}):"Enregistrer"})]})]})})]})}const kJe="G",_g="SVG",ua="VIEW",yr="TEXT",VR="LINK",YR="PAGE",ZR="NOTE",jhe="PATH",Dhe="RECT",The="LINE",Phe="FIELD_SET",_Je="TEXT_INPUT",jJe="SELECT",DJe="CHECKBOX",TJe="LIST",Ohe="DEFS",$1="IMAGE",JR="TSPAN",XR="CANVAS",Rhe="CIRCLE",Fhe="ELLIPSE",Mhe="POLYGON",Qhe="DOCUMENT",Lhe="POLYLINE",z1="TEXT_INSTANCE",PJe="LINEAR_GRADIENT",OJe="RADIAL_GRADIENT";var j4={exports:{}},D4={exports:{}},aG;function RJe(){return aG||(aG=1,typeof Object.create=="function"?D4.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:D4.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}),D4.exports}var T4={exports:{}},sG;function FJe(){if(sG)return T4.exports;sG=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(B,T,P){return Function.prototype.apply.call(B,T,P)},r;e&&typeof e.ownKeys=="function"?r=e.ownKeys:Object.getOwnPropertySymbols?r=function(B){return Object.getOwnPropertyNames(B).concat(Object.getOwnPropertySymbols(B))}:r=function(B){return Object.getOwnPropertyNames(B)};function n(_){console&&console.warn&&console.warn(_)}var i=Number.isNaN||function(B){return B!==B};function a(){a.init.call(this)}T4.exports=a,T4.exports.once=E,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function l(_){if(typeof _!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof _)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(_){if(typeof _!="number"||_<0||i(_))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+_+".");s=_}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(B){if(typeof B!="number"||B<0||i(B))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+B+".");return this._maxListeners=B,this};function c(_){return _._maxListeners===void 0?a.defaultMaxListeners:_._maxListeners}a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(B){for(var T=[],P=1;P0&&(L=T[0]),L instanceof Error)throw L;var W=new Error("Unhandled error."+(L?" ("+L.message+")":""));throw W.context=L,W}var R=z[B];if(R===void 0)return!1;if(typeof R=="function")t(R,this,T);else for(var $=R.length,X=A(R,$),P=0;P<$;++P)t(X[P],this,T);return!0};function u(_,B,T,P){var O,z,L;if(l(T),z=_._events,z===void 0?(z=_._events=Object.create(null),_._eventsCount=0):(z.newListener!==void 0&&(_.emit("newListener",B,T.listener?T.listener:T),z=_._events),L=z[B]),L===void 0)L=z[B]=T,++_._eventsCount;else if(typeof L=="function"?L=z[B]=P?[T,L]:[L,T]:P?L.unshift(T):L.push(T),O=c(_),O>0&&L.length>O&&!L.warned){L.warned=!0;var W=new Error("Possible EventEmitter memory leak detected. "+L.length+" "+String(B)+" listeners added. Use emitter.setMaxListeners() to increase limit");W.name="MaxListenersExceededWarning",W.emitter=_,W.type=B,W.count=L.length,n(W)}return _}a.prototype.addListener=function(B,T){return u(this,B,T,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(B,T){return u(this,B,T,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(_,B,T){var P={fired:!1,wrapFn:void 0,target:_,type:B,listener:T},O=d.bind(P);return O.listener=T,P.wrapFn=O,O}a.prototype.once=function(B,T){return l(T),this.on(B,f(this,B,T)),this},a.prototype.prependOnceListener=function(B,T){return l(T),this.prependListener(B,f(this,B,T)),this},a.prototype.removeListener=function(B,T){var P,O,z,L,W;if(l(T),O=this._events,O===void 0)return this;if(P=O[B],P===void 0)return this;if(P===T||P.listener===T)--this._eventsCount===0?this._events=Object.create(null):(delete O[B],O.removeListener&&this.emit("removeListener",B,P.listener||T));else if(typeof P!="function"){for(z=-1,L=P.length-1;L>=0;L--)if(P[L]===T||P[L].listener===T){W=P[L].listener,z=L;break}if(z<0)return this;z===0?P.shift():v(P,z),P.length===1&&(O[B]=P[0]),O.removeListener!==void 0&&this.emit("removeListener",B,W||T)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(B){var T,P,O;if(P=this._events,P===void 0)return this;if(P.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):P[B]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete P[B]),this;if(arguments.length===0){var z=Object.keys(P),L;for(O=0;O=0;O--)this.removeListener(B,T[O]);return this};function m(_,B,T){var P=_._events;if(P===void 0)return[];var O=P[B];return O===void 0?[]:typeof O=="function"?T?[O.listener||O]:[O]:T?b(O):A(O,O.length)}a.prototype.listeners=function(B){return m(this,B,!0)},a.prototype.rawListeners=function(B){return m(this,B,!1)},a.listenerCount=function(_,B){return typeof _.listenerCount=="function"?_.listenerCount(B):g.call(_,B)},a.prototype.listenerCount=g;function g(_){var B=this._events;if(B!==void 0){var T=B[_];if(typeof T=="function")return 1;if(T!==void 0)return T.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function A(_,B){for(var T=new Array(B),P=0;P=this.concurrency)return;if(this.jobs.length===0){this.pending===0&&l.call(this);return}var u=this,d=this.jobs.shift(),f=!0,m=this.session,g=null,A=!1,v=null,b=d.hasOwnProperty("timeout")?d.timeout:this.timeout;function E(S,_){f&&u.session===m&&(f=!1,u.pending--,g!==null&&(delete u.timers[g],clearTimeout(g)),S?u.emit("error",S,d):A===!1&&(v!==null&&(u.results[v]=Array.prototype.slice.call(arguments,1)),u.emit("success",_,d)),u.session===m&&(u.pending===0&&u.jobs.length===0?l.call(u):u.running&&u.start()))}b&&(g=setTimeout(function(){A=!0,u.listeners("timeout").length>0?u.emit("timeout",E,d):E()},b),this.timers[g]=g),this.results&&(v=this.results.length,this.results[v]=null),this.pending++,u.emit("start",d);var I=d(E);I&&I.then&&typeof I.then=="function"&&I.then(function(S){return E(null,S)}).catch(function(S){return E(S||!0)}),this.running&&this.jobs.length>0&&this.start()},r.prototype.stop=function(){this.running=!1},r.prototype.end=function(c){a.call(this),this.jobs.length=0,this.pending=0,l.call(this,c)};function a(){for(var c in this.timers){var u=this.timers[c];delete this.timers[c],clearTimeout(u)}}function s(c){var u=this;this.on("error",d),this.on("end",f);function d(m){u.end(m)}function f(m){u.removeListener("error",d),u.removeListener("end",f),c(m,this.results)}}function l(c){this.session++,this.running=!1,this.emit("end",c)}return j4.exports}MJe();const QJe={utf16le:"utf-16le",ucs2:"utf-16le",utf16be:"utf-16be"};class Ol{constructor(t){this.buffer=t,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.pos=0,this.length=this.buffer.length}readString(t,r="ascii"){r=QJe[r]||r;let n=this.readBuffer(t);try{return new TextDecoder(r).decode(n)}catch{return n}}readBuffer(t){return this.buffer.slice(this.pos,this.pos+=t)}readUInt24BE(){return(this.readUInt16BE()<<8)+this.readUInt8()}readUInt24LE(){return this.readUInt16LE()+(this.readUInt8()<<16)}readInt24BE(){return(this.readInt16BE()<<8)+this.readUInt8()}readInt24LE(){return this.readUInt16LE()+(this.readInt8()<<16)}}Ol.TYPES={UInt8:1,UInt16:2,UInt24:3,UInt32:4,Int8:1,Int16:2,Int24:3,Int32:4,Float:4,Double:8};for(let e of Object.getOwnPropertyNames(DataView.prototype))if(e.slice(0,3)==="get"){let t=e.slice(3).replace("Ui","UI");t==="Float32"?t="Float":t==="Float64"&&(t="Double");let r=Ol.TYPES[t];Ol.prototype["read"+t+(r===1?"":"BE")]=function(){const n=this.view[e](this.pos,!1);return this.pos+=r,n},r!==1&&(Ol.prototype["read"+t+"LE"]=function(){const n=this.view[e](this.pos,!0);return this.pos+=r,n})}const LJe=new TextEncoder,lG=new Uint8Array(new Uint16Array([4660]).buffer)[0]==18;class zI{constructor(t){this.buffer=t,this.view=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),this.pos=0}writeBuffer(t){this.buffer.set(t,this.pos),this.pos+=t.length}writeString(t,r="ascii"){let n;switch(r){case"utf16le":case"utf16-le":case"ucs2":n=cG(t,lG);break;case"utf16be":case"utf16-be":n=cG(t,!lG);break;case"utf8":n=LJe.encode(t);break;case"ascii":n=UJe(t);break;default:throw new Error(`Unsupported encoding: ${r}`)}this.writeBuffer(n)}writeUInt24BE(t){this.buffer[this.pos++]=t>>>16&255,this.buffer[this.pos++]=t>>>8&255,this.buffer[this.pos++]=t&255}writeUInt24LE(t){this.buffer[this.pos++]=t&255,this.buffer[this.pos++]=t>>>8&255,this.buffer[this.pos++]=t>>>16&255}writeInt24BE(t){t>=0?this.writeUInt24BE(t):this.writeUInt24BE(t+16777215+1)}writeInt24LE(t){t>=0?this.writeUInt24LE(t):this.writeUInt24LE(t+16777215+1)}fill(t,r){if(r>8|(i&255)<<8),r[n]=i}return new Uint8Array(r.buffer)}function UJe(e){let t=new Uint8Array(e.length);for(let r=0;r>1){super(`Int${t}`,r),this._point=1<=this.length)){if(this.items[t]==null){const{pos:r}=this.stream;this.stream.pos=this.base+this.type.size(null,this.ctx)*t,this.items[t]=this.type.decode(this.stream,this.ctx),this.stream.pos=r}return this.items[t]}}toArray(){const t=[];for(let r=0,n=this.length;r=55296&&i<=56319&&nt.reduce((r,n)=>r&&r[n],e);class On extends ct{constructor(t,r={}){super(),this.type=t,this.versions=r,typeof t=="string"&&(this.versionPath=t.split("."))}decode(t,r,n=0){const i=this._setup(t,r,n);typeof this.type=="string"?i.version=YJe(r,this.versionPath):i.version=this.type.decode(t),this.versions.header&&this._parseFields(t,i,this.versions.header);const a=this.versions[i.version];if(a==null)throw new Error(`Unknown version ${i.version}`);return a instanceof On?a.decode(t,r):(this._parseFields(t,i,a),this.process!=null&&this.process.call(i,t),i)}size(t,r,n=!0){let i,a;if(!t)throw new Error("Not a fixed size");this.preEncode!=null&&this.preEncode.call(t);const s={parent:r,val:t,pointerSize:0};let l=0;if(typeof this.type!="string"&&(l+=this.type.size(t.version,s)),this.versions.header)for(i in this.versions.header)a=this.versions.header[i],a.size!=null&&(l+=a.size(t[i],s));const c=this.versions[t.version];if(c==null)throw new Error(`Unknown version ${t.version}`);for(i in c)a=c[i],a.size!=null&&(l+=a.size(t[i],s));return n&&(l+=s.pointerSize),l}encode(t,r,n){let i,a;this.preEncode!=null&&this.preEncode.call(r,t);const s={pointers:[],startOffset:t.pos,parent:n,val:r,pointerSize:0};if(s.pointerOffset=t.pos+this.size(r,s,!1),typeof this.type!="string"&&this.type.encode(t,r.version),this.versions.header)for(i in this.versions.header)a=this.versions.header[i],a.encode!=null&&a.encode(t,r[i],s);const l=this.versions[r.version];for(i in l)a=l[i],a.encode!=null&&a.encode(t,r[i],s);let c=0;for(;c{if(l!=null)return l;const{pos:u}=t;return t.pos=s,l=this.type.decode(t,r),t.pos=u,l};return this.options.lazy?new eF({get:c}):c()}else return s}size(t,r){const n=r;switch(this.options.type){case"local":case"immediate":break;case"parent":r=r.parent;break;default:for(;r.parent;)r=r.parent}let{type:i}=this;if(i==null){if(!(t instanceof lT))throw new Error("Must be a VoidPointer");({type:i}=t),t=t.value}if(t&&r){let a=i.size(t,n);r.pointerSize+=a}return this.offsetType.size()}encode(t,r,n){let i;const a=n;if(r==null){this.offsetType.encode(t,this.options.nullValue);return}switch(this.options.type){case"local":i=n.startOffset;break;case"immediate":i=t.pos+this.offsetType.size(r,a);break;case"parent":n=n.parent,i=n.startOffset;break;default:for(i=0;n.parent;)n=n.parent}this.options.relativeTo&&(i+=this.relativeToGetter(a.val)),this.offsetType.encode(t,n.pointerOffset-i);let{type:s}=this;if(s==null){if(!(r instanceof lT))throw new Error("Must be a VoidPointer");({type:s}=r),r=r.value}return n.pointers.push({type:s,val:r,parent:a}),n.pointerOffset+=s.size(r,a)}}class lT{constructor(t,r){this.type=t,this.value=r}}function tu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var A_,dG;function ZJe(){return dG||(dG=1,A_=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(a=Object.keys(t),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){var s=a[i];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}),A_}var JJe=ZJe();const fG=hi(JJe);var a2={},hG;function $he(){if(hG)return a2;hG=1,a2.byteLength=l,a2.toByteArray=u,a2.fromByteArray=m;for(var e=[],t=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,a=n.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var v=g.indexOf("=");v===-1&&(v=A);var b=v===A?0:4-v%4;return[v,b]}function l(g){var A=s(g),v=A[0],b=A[1];return(v+b)*3/4-b}function c(g,A,v){return(A+v)*3/4-v}function u(g){var A,v=s(g),b=v[0],E=v[1],I=new r(c(g,b,E)),S=0,_=E>0?b-4:b,B;for(B=0;B<_;B+=4)A=t[g.charCodeAt(B)]<<18|t[g.charCodeAt(B+1)]<<12|t[g.charCodeAt(B+2)]<<6|t[g.charCodeAt(B+3)],I[S++]=A>>16&255,I[S++]=A>>8&255,I[S++]=A&255;return E===2&&(A=t[g.charCodeAt(B)]<<2|t[g.charCodeAt(B+1)]>>4,I[S++]=A&255),E===1&&(A=t[g.charCodeAt(B)]<<10|t[g.charCodeAt(B+1)]<<4|t[g.charCodeAt(B+2)]>>2,I[S++]=A>>8&255,I[S++]=A&255),I}function d(g){return e[g>>18&63]+e[g>>12&63]+e[g>>6&63]+e[g&63]}function f(g,A,v){for(var b,E=[],I=A;I_?_:S+I));return b===1?(A=g[v-1],E.push(e[A>>2]+e[A<<4&63]+"==")):b===2&&(A=(g[v-2]<<8)+g[v-1],E.push(e[A>>10]+e[A>>4&63]+e[A<<2&63]+"=")),E.join("")}return a2}var XJe=$he();const eXe=hi(XJe);var v_,mG;function zhe(){if(mG)return v_;mG=1;var e=0,t=-3;function r(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function n(O,z){this.source=O,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=z,this.destLen=0,this.ltree=new r,this.dtree=new r}var i=new r,a=new r,s=new Uint8Array(30),l=new Uint16Array(30),c=new Uint8Array(30),u=new Uint16Array(30),d=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f=new r,m=new Uint8Array(320);function g(O,z,L,W){var R,$;for(R=0;R>>=1,z}function I(O,z,L){if(!z)return L;for(;O.bitcount<24;)O.tag|=O.source[O.sourceIndex++]<>>16-z;return O.tag>>>=z,O.bitcount-=z,W+L}function S(O,z){for(;O.bitcount<24;)O.tag|=O.source[O.sourceIndex++]<>>=1,++R,L+=z.table[R],W-=z.table[R];while(W>=0);return O.tag=$,O.bitcount-=R,z.trans[L+W]}function _(O,z,L){var W,R,$,X,Z,K;for(W=I(O,5,257),R=I(O,5,1),$=I(O,4,4),X=0;X<19;++X)m[X]=0;for(X=0;X<$;++X){var q=I(O,3,0);m[d[X]]=q}for(b(f,m,0,19),Z=0;Z8;)O.sourceIndex--,O.bitcount-=8;if(z=O.source[O.sourceIndex+1],z=256*z+O.source[O.sourceIndex],L=O.source[O.sourceIndex+3],L=256*L+O.source[O.sourceIndex+2],z!==(~L&65535))return t;for(O.sourceIndex+=4,W=z;W;--W)O.dest[O.destLen++]=O.source[O.sourceIndex++];return O.bitcount=0,e}function P(O,z){var L=new n(O,z),W,R,$;do{switch(W=E(L),R=I(L,2,0),R){case 0:$=T(L);break;case 1:$=B(L,i,a);break;case 2:_(L,L.ltree,L.dtree),$=B(L,L.ltree,L.dtree);break;default:$=t}if($!==e)throw new Error("Data error")}while(!W);return L.destLen{let l=i[a];i[a]=i[s],i[s]=l},r=i=>{const a=i.length;for(let s=0;s{e&&r(i)}},x_}var y_,gG;function rXe(){if(gG)return y_;gG=1;const e=zhe(),{swap32LE:t}=tXe(),r=11,n=5,i=r-n,a=65536>>r,l=(1<>n,m=1024>>n,b=f+m+32,E=1<1114111?this.errorValue:_<55296||_>56319&&_<=65535?(B=(this.data[_>>n]<>n)]<>r)],B=this.data[B+(_>>n&l)],B=(B<Math.log(e)/Math.LN2),H6=e=>iXe(e)+1|0,aXe=H6(jg(Qm).categories.length-1),Hhe=H6(jg(Qm).combiningClasses.length-1),tF=H6(jg(Qm).scripts.length-1),W6=H6(jg(Qm).eaw.length-1),a5=10,sXe=Hhe+tF+W6+a5,oXe=tF+W6+a5,lXe=W6+a5,cXe=a5,uXe=(1<>sXe&uXe]}function Whe(e){const t=i5.get(e);return jg(Qm).combiningClasses[t>>oXe&dXe]}function rF(e){const t=i5.get(e);return jg(Qm).scripts[t>>lXe&fXe]}function pXe(e){const t=i5.get(e);return jg(Qm).eaw[t>>cXe&hXe]}function gXe(e){let t=i5.get(e),r=t&mXe;if(r===0)return null;if(r<=50)return r-1;if(r<480){const n=(r>>4)-12,i=(r&15)+1;return n/i}else if(r<768){t=(r>>5)-14;let n=(r&31)+2;for(;n>0;)t*=10,n--;return t}else{t=(r>>2)-191;let n=(r&3)+1;for(;n>0;)t*=60,n--;return t}}function AXe(e){const t=V0(e);return t==="Lu"||t==="Ll"||t==="Lt"||t==="Lm"||t==="Lo"||t==="Nl"}function cT(e){return V0(e)==="Nd"}function vXe(e){const t=V0(e);return t==="Pc"||t==="Pd"||t==="Pe"||t==="Pf"||t==="Pi"||t==="Po"||t==="Ps"}function xXe(e){return V0(e)==="Ll"}function yXe(e){return V0(e)==="Lu"}function bXe(e){return V0(e)==="Lt"}function wXe(e){const t=V0(e);return t==="Zs"||t==="Zl"||t==="Zp"}function EXe(e){const t=V0(e);return t==="Nd"||t==="No"||t==="Nl"||t==="Lu"||t==="Ll"||t==="Lt"||t==="Lm"||t==="Lo"||t==="Me"||t==="Mc"}function nF(e){const t=V0(e);return t==="Mn"||t==="Me"||t==="Mc"}var CXe={getCategory:V0,getCombiningClass:Whe,getScript:rF,getEastAsianWidth:pXe,getNumericValue:gXe,isAlphabetic:AXe,isDigit:cT,isPunctuation:vXe,isLowerCase:xXe,isUpperCase:yXe,isTitleCase:bXe,isWhiteSpace:wXe,isBaseForm:EXe,isMark:nF},b_,AG;function IXe(){if(AG)return b_;AG=1;var e=1,t=0;class r{constructor(i){this.stateTable=i.stateTable,this.accepting=i.accepting,this.tags=i.tags}match(i){var a=this;return{*[Symbol.iterator](){for(var s=e,l=null,c=null,u=null,d=0;d=l&&(yield[l,c,a.tags[u]]),s=a.stateTable[e][f],l=null),s!==t&&l==null&&(l=d),a.accepting[s]&&(c=d),s===t&&(s=e)}l!=null&&c!=null&&c>=l&&(yield[l,c,a.tags[s]])}}}apply(i,a){for(var[s,l,c]of this.match(i))for(var u of c)typeof a[u]=="function"&&a[u](s,l,i.slice(s,l+1))}}return b_=r,b_}var SXe=IXe();const Ghe=hi(SXe);var w_={exports:{}},vG;function BXe(){return vG||(vG=1,(function(e){var t=(function(){function r(m,g){return g!=null&&m instanceof g}var n;try{n=Map}catch{n=function(){}}var i;try{i=Set}catch{i=function(){}}var a;try{a=Promise}catch{a=function(){}}function s(m,g,A,v,b){typeof g=="object"&&(A=g.depth,v=g.prototype,b=g.includeNonEnumerable,g=g.circular);var E=[],I=[],S=typeof Buffer<"u";typeof g>"u"&&(g=!0),typeof A>"u"&&(A=1/0);function _(B,T){if(B===null)return null;if(T===0)return B;var P,O;if(typeof B!="object")return B;if(r(B,n))P=new n;else if(r(B,i))P=new i;else if(r(B,a))P=new a(function(q,Y){B.then(function(ne){q(_(ne,T-1))},function(ne){Y(_(ne,T-1))})});else if(s.__isArray(B))P=[];else if(s.__isRegExp(B))P=new RegExp(B.source,f(B)),B.lastIndex&&(P.lastIndex=B.lastIndex);else if(s.__isDate(B))P=new Date(B.getTime());else{if(S&&Buffer.isBuffer(B))return Buffer.allocUnsafe?P=Buffer.allocUnsafe(B.length):P=new Buffer(B.length),B.copy(P),P;r(B,Error)?P=Object.create(B):typeof v>"u"?(O=Object.getPrototypeOf(B),P=Object.create(O)):(P=Object.create(v),O=v)}if(g){var z=E.indexOf(B);if(z!=-1)return I[z];E.push(B),I.push(P)}r(B,n)&&B.forEach(function(q,Y){var ne=_(Y,T-1),ge=_(q,T-1);P.set(ne,ge)}),r(B,i)&&B.forEach(function(q){var Y=_(q,T-1);P.add(Y)});for(var L in B){var W;O&&(W=Object.getOwnPropertyDescriptor(O,L)),!(W&&W.set==null)&&(P[L]=_(B[L],T-1))}if(Object.getOwnPropertySymbols)for(var R=Object.getOwnPropertySymbols(B),L=0;Lthis.buffer.length&&(i=this.buffer.length-this.pos);for(var a=0;athis.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(r.subarray(0,n),this.pos),this.pos+=n,n},P4.BrotliOutput=t,P4}var C_,bG;function jXe(){if(bG)return C_;bG=1;var e=4096,t=2*e+32,r=2*e-1,n=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);function i(a){this.buf_=new Uint8Array(t),this.input_=a,this.reset()}return i.READ_SIZE=e,i.IBUF_MASK=r,i.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var a=0;a<4;a++)this.val_|=this.buf_[this.pos_]<<8*a,++this.pos_;return this.bit_end_pos_>0},i.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var a=this.buf_ptr_,s=this.input_.read(this.buf_,a,e);if(s<0)throw new Error("Unexpected end of input");if(s=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&r]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},i.prototype.readBits=function(a){32-this.bit_pos_>>this.bit_pos_&n[a];return this.bit_pos_+=a,s},C_=i,C_}var Cp={},I_={},S_,wG;function DXe(){return wG||(wG=1,S_="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4EQ3bf8xBc7L0BsyfFPK43dGSXpL6clYC/I328h54/VYrQ5i0648FgbGtl837svJ35L3Mot/+nPlNpWgKx1gGXQYqX6n+bbZ7wuyCHKcUok12Xjqub7NXZGzqBx0SD+uziNf87t7ve42jxSKQoW3nyxVrWIGlFShhCKxjpZZ5MeGna0+lBkk+kaN8F9qFBAFgEogyMBdcX/T1W/WnMOi/7ycWUQloEBKGeC48MkiwqJkJO+12eQiOFHMmck6q/IjWW3RZlany23TBm+cNr/84/oi5GGmGBZWrZ6j+zykVozz5fT/QH/Da6WTbZYYPynVNO7kxzuNN2kxKKWche5WveitPKAecB8YcAHz/+zXLjcLzkdDSktNIDwZE9J9X+tto43oJy65wApM3mDzYtCwX9lM+N5VR3kXYo0Z3t0TtXfgBFg7gU8oN0Dgl7fZlUbhNll+0uuohRVKjrEd8egrSndy5/Tgd2gqjA4CAVuC7ESUmL3DZoGnfhQV8uwnpi8EGvAVVsowNRxPudck7+oqAUDkwZopWqFnW1riss0t1z6iCISVKreYGNvQcXv+1L9+jbP8cd/dPUiqBso2q+7ZyFBvENCkkVr44iyPbtOoOoCecWsiuqMSML5lv+vN5MzUr+Dnh73G7Q1YnRYJVYX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X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="),S_}var EG;function TXe(){if(EG)return I_;EG=1;var e=$he();return I_.init=function(){var t=Khe().BrotliDecompressBuffer,r=e.toByteArray(DXe());return t(r)},I_}var CG;function qhe(){if(CG)return Cp;CG=1;var e=TXe();return Cp.init=function(){Cp.dictionary=e.init()},Cp.offsetsByLength=new Uint32Array([0,0,0,0,0,4096,9216,21504,35840,44032,53248,63488,74752,87040,93696,100864,104704,106752,108928,113536,115968,118528,119872,121280,122016]),Cp.sizeBitsByLength=new Uint8Array([0,0,0,0,10,10,11,11,10,10,10,10,10,9,9,8,7,7,8,7,7,6,6,5,5]),Cp.minDictionaryWordLength=4,Cp.maxDictionaryWordLength=24,Cp}var O4={},IG;function SG(){if(IG)return O4;IG=1;function e(a,s){this.bits=a,this.value=s}O4.HuffmanCode=e;var t=15;function r(a,s){for(var l=1<>=1;return(a&l-1)+l}function n(a,s,l,c,u){do c-=l,a[s+c]=new e(u.bits,u.value);while(c>0)}function i(a,s,l){for(var c=1<0;--T[m])f=new e(m&255,B[g++]&65535),n(a,s+A,v,S,f),A=r(A,m);for(E=_-1,b=-1,m=l+1,v=2;m<=t;++m,v<<=1)for(;T[m]>0;--T[m])(A&E)!==b&&(s+=S,I=i(T,m,l),S=1<>l),v,S,f),A=r(A,m);return _},O4}var R4={},BG;function PXe(){return BG||(BG=1,R4.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,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3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,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,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,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,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,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,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,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,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),R4.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])),R4}var mA={},NG;function OXe(){if(NG)return mA;NG=1;function e(t,r){this.offset=t,this.nbits=r}return mA.kBlockLengthPrefixCode=[new e(1,2),new e(5,2),new e(9,2),new e(13,2),new e(17,3),new e(25,3),new e(33,3),new e(41,3),new e(49,4),new e(65,4),new e(81,4),new e(97,4),new e(113,5),new e(145,5),new e(177,5),new e(209,5),new e(241,6),new e(305,6),new e(369,7),new e(497,8),new e(753,9),new e(1265,10),new e(2289,11),new e(4337,12),new e(8433,13),new e(16625,24)],mA.kInsertLengthPrefixCode=[new e(0,0),new e(1,0),new e(2,0),new e(3,0),new e(4,0),new e(5,0),new e(6,1),new e(8,1),new e(10,2),new e(14,2),new e(18,3),new e(26,3),new e(34,4),new e(50,4),new e(66,5),new e(98,5),new e(130,6),new e(194,7),new e(322,8),new e(578,9),new e(1090,10),new e(2114,12),new e(6210,14),new e(22594,24)],mA.kCopyLengthPrefixCode=[new e(2,0),new e(3,0),new e(4,0),new e(5,0),new e(6,0),new e(7,0),new e(8,0),new e(9,0),new e(10,1),new e(12,1),new e(14,2),new e(18,2),new e(22,3),new e(30,3),new e(38,4),new e(54,4),new e(70,5),new e(102,5),new e(134,6),new e(198,7),new e(326,8),new e(582,9),new e(1094,10),new e(2118,24)],mA.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],mA.kCopyRangeLut=[0,8,0,8,16,0,16,8,16],mA}var o2={},kG;function RXe(){if(kG)return o2;kG=1;var e=qhe(),t=0,r=1,n=2,i=3,a=4,s=5,l=6,c=7,u=8,d=9,f=10,m=11,g=12,A=13,v=14,b=15,E=16,I=17,S=18,_=20;function B(O,z,L){this.prefix=new Uint8Array(O.length),this.transform=z,this.suffix=new Uint8Array(L.length);for(var W=0;W'),new B("",t,` `),new B("",i,""),new B("",t,"]"),new B("",t," for "),new B("",v,""),new B("",n,""),new B("",t," a "),new B("",t," that "),new B(" ",f,""),new B("",t,". "),new B(".",t,""),new B(" ",t,", "),new B("",b,""),new B("",t," with "),new B("",t,"'"),new B("",t," from "),new B("",t," by "),new B("",E,""),new B("",I,""),new B(" the ",t,""),new B("",a,""),new B("",t,". The "),new B("",m,""),new B("",t," on "),new B("",t," as "),new B("",t," is "),new B("",c,""),new B("",r,"ing "),new B("",t,` `),new B("",t,":"),new B(" ",t,". "),new B("",t,"ed "),new B("",_,""),new B("",S,""),new B("",l,""),new B("",t,"("),new B("",f,", "),new B("",u,""),new B("",t," at "),new B("",t,"ly "),new B(" the ",t," of "),new B("",s,""),new B("",d,""),new B(" ",f,", "),new B("",f,'"'),new B(".",t,"("),new B("",m," "),new B("",f,'">'),new B("",t,'="'),new B(" ",t,"."),new B(".com/",t,""),new B(" the ",t," of the "),new B("",f,"'"),new B("",t,". This "),new B("",t,","),new B(".",t," "),new B("",f,"("),new B("",f,"."),new B("",t," not "),new B(" ",t,'="'),new B("",t,"er "),new B(" ",m," "),new B("",t,"al "),new B(" ",m,""),new B("",t,"='"),new B("",m,'"'),new B("",f,". "),new B(" ",t,"("),new B("",t,"ful "),new B(" ",f,". "),new B("",t,"ive "),new B("",t,"less "),new B("",m,"'"),new B("",t,"est "),new B(" ",f,"."),new B("",m,'">'),new B(" ",t,"='"),new B("",f,","),new B("",t,"ize "),new B("",m,"."),new B(" ",t,""),new B(" ",t,","),new B("",f,'="'),new B("",m,'="'),new B("",t,"ous "),new B("",m,", "),new B("",f,"='"),new B(" ",f,","),new B(" ",m,'="'),new B(" ",m,", "),new B("",m,","),new B("",m,"("),new B("",m,". "),new B(" ",m,"."),new B("",m,"='"),new B(" ",m,". "),new B(" ",f,'="'),new B(" ",m,"='"),new B(" ",f,"='")];o2.kTransforms=T,o2.kNumTransforms=T.length;function P(O,z){return O[z]<192?(O[z]>=97&&O[z]<=122&&(O[z]^=32),1):O[z]<224?(O[z+1]^=32,2):(O[z+2]^=5,3)}return o2.transformDictionaryWord=function(O,z,L,W,R){var $=T[R].prefix,X=T[R].suffix,Z=T[R].transform,K=ZW&&(K=W);for(var ge=0;ge<$.length;)O[z++]=$[ge++];for(L+=K,W-=K,Z<=d&&(W-=Z),q=0;q0;){var ae=P(O,ne);ne+=ae,W-=ae}for(var pe=0;pe0?17+me:(me=Ee.readBits(3),me>0?8+me:17))}function L(Ee){if(Ee.readBits(1)){var me=Ee.readBits(3);return me===0?1:Ee.readBits(me)+(1<1&&Xe===0)throw new Error("Invalid size byte");me.meta_block_length|=Xe<4&&ke===0)throw new Error("Invalid size nibble");me.meta_block_length|=ke<>>Se.bit_pos_&E,Ie=Ee[me].bits-b,Ie>0&&(Se.bit_pos_+=b,me+=Ee[me].value,me+=Se.val_>>>Se.bit_pos_&(1<0;){var it=0,vt;if(Ie.readMoreInput(),Ie.fillBitWindow(),it+=Ie.val_>>>Ie.bit_pos_&31,Ie.bit_pos_+=Ye[it].bits,vt=Ye[it].value&255,vt>vt);else{var mt=vt-14,Qt,Ot,Wt=0;if(vt===d&&(Wt=Xe),he!==Wt&&(ke=0,he=Wt),Qt=ke,ke>0&&(ke-=2,ke<<=mt),ke+=Ie.readBits(mt)+3,Ot=ke-Qt,Be+Ot>me)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var Vt=0;Vt0;++he){var Wt=_[he],Vt=0,xr;Ie.fillBitWindow(),Vt+=Ie.val_>>>Ie.bit_pos_&15,Ie.bit_pos_+=Ot[Vt].bits,xr=Ot[Vt].value,vt[Wt]=xr,xr!==0&&(mt-=32>>xr,++Qt)}if(!(Qt===1||mt===0))throw new Error("[ReadHuffmanCode] invalid num_codes or space");X(vt,Ee,ke,Ie)}if(Be=a(me,Se,b,ke,Ee),Be===0)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return Be}function K(Ee,me,Se){var Ie,Be;return Ie=$(Ee,me,Se),Be=l.kBlockLengthPrefixCode[Ie].nbits,l.kBlockLengthPrefixCode[Ie].offset+Se.readBits(Be)}function q(Ee,me,Se){var Ie;return Ee>>5]),this.htrees=new Uint32Array(me)}ge.prototype.decode=function(Ee){var me,Se,Ie=0;for(me=0;me=Ee)throw new Error("[DecodeContextMap] i >= context_map_size");Le[ke]=0,++ke}else Le[ke]=Ye-Be,++ke}return me.readBits(1)&&ne(Le,Ee),Se}function pe(Ee,me,Se,Ie,Be,Xe,ke){var he=Se*2,Le=Se,Ye=$(me,Se*I,ke),Oe;Ye===0?Oe=Be[he+(Xe[Le]&1)]:Ye===1?Oe=Be[he+(Xe[Le]-1&1)]+1:Oe=Ye-2,Oe>=Ee&&(Oe-=Ee),Ie[Se]=Oe,Be[he+(Xe[Le]&1)]=Oe,++Xe[Le]}function _e(Ee,me,Se,Ie,Be,Xe){var ke=Be+1,he=Se&Be,Le=Xe.pos_&r.IBUF_MASK,Ye;if(me<8||Xe.bit_pos_+(me<<3)0;)Xe.readMoreInput(),Ie[he++]=Xe.readBits(8),he===ke&&(Ee.write(Ie,ke),he=0);return}if(Xe.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;Xe.bit_pos_<32;)Ie[he]=Xe.val_>>>Xe.bit_pos_,Xe.bit_pos_+=8,++he,--me;if(Ye=Xe.bit_end_pos_-Xe.bit_pos_>>3,Le+Ye>r.IBUF_MASK){for(var Oe=r.IBUF_MASK+1-Le,it=0;it=ke){Ee.write(Ie,ke),he-=ke;for(var it=0;it=ke;){if(Ye=ke-he,Xe.input_.read(Ie,he,Ye)me.buffer.length){var Bn=new Uint8Array(Ie+pr);Bn.set(me.buffer),me.buffer=Bn}if(Be=un.input_end,de=un.is_uncompressed,un.is_metadata){for(we(Ht);pr>0;--pr)Ht.readMoreInput(),Ht.readBits(8);continue}if(pr!==0){if(de){Ht.bit_pos_=Ht.bit_pos_+7&-8,_e(me,pr,Ie,Oe,Ye,Ht),Ie+=pr;continue}for(Se=0;Se<3;++Se)ve[Se]=L(Ht)+1,ve[Se]>=2&&(Z(ve[Se]+2,Vt,Se*I,Ht),Z(g,xr,Se*I,Ht),st[Se]=K(xr,Se*I,Ht),Ge[Se]=1);for(Ht.readMoreInput(),ie=Ht.readBits(2),at=B+(Ht.readBits(4)<0;){var Sr,wn,qi,ia,Fo,$i,Kn,Ua,ss,os,$a;for(Ht.readMoreInput(),st[1]===0&&(pe(ve[1],Vt,1,gt,ce,Ge,Ht),st[1]=K(xr,I,Ht),Zt=Wt[1].htrees[gt[1]]),--st[1],Sr=$(Wt[1].codes,Zt,Ht),wn=Sr>>6,wn>=2?(wn-=2,Kn=-1):Kn=0,qi=l.kInsertRangeLut[wn]+(Sr>>3&7),ia=l.kCopyRangeLut[wn]+(Sr&7),Fo=l.kInsertLengthPrefixCode[qi].offset+Ht.readBits(l.kInsertLengthPrefixCode[qi].nbits),$i=l.kCopyLengthPrefixCode[ia].offset+Ht.readBits(l.kCopyLengthPrefixCode[ia].nbits),Qt=Oe[Ie-1&Ye],Ot=Oe[Ie-2&Ye],os=0;os4?3:$i-2)&255,Br=be[$r+ss],Kn=$(Wt[2].codes,Wt[2].htrees[Br],Ht),Kn>=at){var lr,eo,yi;Kn-=at,eo=Kn&bt,Kn>>=ie,lr=(Kn>>1)+1,yi=(2+(Kn&1)<he)if($i>=n.minDictionaryWordLength&&$i<=n.maxDictionaryWordLength){var yi=n.offsetsByLength[$i],za=Ua-he-1,Ha=n.sizeBitsByLength[$i],to=(1<>Ha;if(yi+=vo*$i,Wa=it){me.write(Oe,Le);for(var Us=0;Us<$a-it;Us++)Oe[Us]=Oe[it+Us]}}else throw new Error("Invalid backward reference. pos: "+Ie+" distance: "+Ua+" len: "+$i+" bytes left: "+pr)}else throw new Error("Invalid backward reference. pos: "+Ie+" distance: "+Ua+" len: "+$i+" bytes left: "+pr);else{if(Kn>0&&(vt[mt&3]=Ua,++mt),$i>pr)throw new Error("Invalid backward reference. pos: "+Ie+" distance: "+Ua+" len: "+$i+" bytes left: "+pr);for(os=0;os<$i;++os)Oe[Ie&Ye]=Oe[Ie-Ua&Ye],(Ie&Ye)===Ye&&me.write(Oe,Le),++Ie,--pr}Qt=Oe[Ie-1&Ye],Ot=Oe[Ie-2&Ye]}Ie&=1073741823}}me.write(Oe,Ie&Ye)}return s2.BrotliDecompress=ye,n.init(),s2}var B_,jG;function FXe(){return jG||(jG=1,B_=Khe().BrotliDecompressBuffer),B_}var MXe=FXe();const QXe=hi(MXe);function s5(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function G6(e){return e&&e.__esModule?e.default:e}var o5={};s5(o5,"logErrors",()=>LXe);s5(o5,"registerFormat",()=>Ny);s5(o5,"create",()=>Ab);s5(o5,"defaultLanguage",()=>WI);s5(o5,"setDefaultLanguage",()=>UXe);let LXe=!1,uT=[];function Ny(e){uT.push(e)}function Ab(e,t){for(let r=0;r0?s[0]:"value";if(i.has(l))return i.get(l);let c=n.apply(this,s);return i.set(l,c),c}return Object.defineProperty(this,t,{value:a}),a}}}}let $Xe=new ct({firstCode:G,entryCount:G,idDelta:Ft,idRangeOffset:G}),N_=new ct({startCharCode:et,endCharCode:et,glyphID:et}),zXe=new ct({startUnicodeValue:Jp,additionalCount:tr}),HXe=new ct({unicodeValue:Jp,glyphID:G}),WXe=new Ve(zXe,et),GXe=new Ve(HXe,et),qXe=new ct({varSelector:Jp,defaultUVS:new Ze(et,WXe,{type:"parent"}),nonDefaultUVS:new Ze(et,GXe,{type:"parent"})}),KXe=new On(G,{0:{length:G,language:G,codeMap:new Zi(tr,256)},2:{length:G,language:G,subHeaderKeys:new Ve(G,256),subHeaderCount:e=>Math.max.apply(Math,e.subHeaderKeys),subHeaders:new Zi($Xe,"subHeaderCount"),glyphIndexArray:new Zi(G,"subHeaderCount")},4:{length:G,language:G,segCountX2:G,segCount:e=>e.segCountX2>>1,searchRange:G,entrySelector:G,rangeShift:G,endCode:new Zi(G,"segCount"),reservedPad:new Ia(G),startCode:new Zi(G,"segCount"),idDelta:new Zi(Ft,"segCount"),idRangeOffset:new Zi(G,"segCount"),glyphIndexArray:new Zi(G,e=>(e.length-e._currentOffset)/2)},6:{length:G,language:G,firstCode:G,entryCount:G,glyphIndices:new Zi(G,"entryCount")},8:{reserved:new Ia(G),length:et,language:G,is32:new Zi(tr,8192),nGroups:et,groups:new Zi(N_,"nGroups")},10:{reserved:new Ia(G),length:et,language:et,firstCode:et,entryCount:et,glyphIndices:new Zi(G,"numChars")},12:{reserved:new Ia(G),length:et,language:et,nGroups:et,groups:new Zi(N_,"nGroups")},13:{reserved:new Ia(G),length:et,language:et,nGroups:et,groups:new Zi(N_,"nGroups")},14:{length:et,numRecords:et,varSelectors:new Zi(qXe,"numRecords")}}),VXe=new ct({platformID:G,encodingID:G,table:new Ze(et,KXe,{type:"parent",lazy:!0})});var YXe=new ct({version:G,numSubtables:G,tables:new Ve(VXe,"numSubtables")}),ZXe=new ct({version:DA,revision:DA,checkSumAdjustment:et,magicNumber:et,flags:G,unitsPerEm:G,created:new Ve(DA,2),modified:new Ve(DA,2),xMin:Ft,yMin:Ft,xMax:Ft,yMax:Ft,macStyle:new Qd(G,["bold","italic","underline","outline","shadow","condensed","extended"]),lowestRecPPEM:G,fontDirectionHint:Ft,indexToLocFormat:Ft,glyphDataFormat:Ft}),JXe=new ct({version:DA,ascent:Ft,descent:Ft,lineGap:Ft,advanceWidthMax:G,minLeftSideBearing:Ft,minRightSideBearing:Ft,xMaxExtent:Ft,caretSlopeRise:Ft,caretSlopeRun:Ft,caretOffset:Ft,reserved:new Ia(Ft,4),metricDataFormat:Ft,numberOfMetrics:G});let XXe=new ct({advance:G,bearing:Ft});var eet=new ct({metrics:new Zi(XXe,e=>e.parent.hhea.numberOfMetrics),bearings:new Zi(Ft,e=>e.parent.maxp.numGlyphs-e.parent.hhea.numberOfMetrics)}),tet=new ct({version:DA,numGlyphs:G,maxPoints:G,maxContours:G,maxComponentPoints:G,maxComponentContours:G,maxZones:G,maxTwilightPoints:G,maxStorage:G,maxFunctionDefs:G,maxInstructionDefs:G,maxStackElements:G,maxSizeOfInstructions:G,maxComponentElements:G,maxComponentDepth:G});function Vhe(e,t,r=0){return e===1&&DG[r]?DG[r]:aet[e][t]}const ret=new Set(["x-mac-roman","x-mac-cyrillic","iso-8859-6","iso-8859-8"]),net={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ­","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"},k_=new Map;function iet(e){let t=k_.get(e);if(t)return t;let r=net[e];if(r){let n=new Map;for(let i=0;iVhe(e.platformID,e.encodingID,e.languageID)),{type:"parent",relativeTo:e=>e.parent.stringOffset,allowNull:!1})}),oet=new ct({length:G,tag:new Ze(G,new Ti("length","utf16be"),{type:"parent",relativeTo:e=>e.stringOffset})});var GI=new On(G,{0:{count:G,stringOffset:G,records:new Ve(TG,"count")},1:{count:G,stringOffset:G,records:new Ve(TG,"count"),langTagCount:G,langTags:new Ve(oet,"langTagCount")}}),cet=GI;const dT=["copyright","fontFamily","fontSubfamily","uniqueSubfamily","fullName","version","postscriptName","trademark","manufacturer","designer","description","vendorURL","designerURL","license","licenseURL",null,"preferredFamily","preferredSubfamily","compatibleFull","sampleText","postscriptCIDFontName","wwsFamilyName","wwsSubfamilyName"];GI.process=function(e){var t={};for(let r of this.records){let n=set[r.platformID][r.languageID];n==null&&this.langTags!=null&&r.languageID>=32768&&(n=this.langTags[r.languageID-32768].tag),n==null&&(n=r.platformID+"-"+r.languageID);let i=r.nameID>=256?"fontFeatures":dT[r.nameID]||r.nameID;t[i]==null&&(t[i]={});let a=t[i];r.nameID>=256&&(a=a[r.nameID]||(a[r.nameID]={})),(typeof r.string=="string"||typeof a[n]!="string")&&(a[n]=r.string)}this.records=t};GI.preEncode=function(){if(Array.isArray(this.records))return;this.version=0;let e=[];for(let t in this.records){let r=this.records[t];t!=="fontFeatures"&&(e.push({platformID:3,encodingID:1,languageID:1033,nameID:dT.indexOf(t),length:r.en.length*2,string:r.en}),t==="postscriptName"&&e.push({platformID:1,encodingID:0,languageID:0,nameID:dT.indexOf(t),length:r.en.length,string:r.en}))}this.records=e,this.count=e.length,this.stringOffset=GI.size(this,null,!1)};var Yhe=new On(G,{header:{xAvgCharWidth:Ft,usWeightClass:G,usWidthClass:G,fsType:new Qd(G,[null,"noEmbedding","viewOnly","editable",null,null,null,null,"noSubsetting","bitmapOnly"]),ySubscriptXSize:Ft,ySubscriptYSize:Ft,ySubscriptXOffset:Ft,ySubscriptYOffset:Ft,ySuperscriptXSize:Ft,ySuperscriptYSize:Ft,ySuperscriptXOffset:Ft,ySuperscriptYOffset:Ft,yStrikeoutSize:Ft,yStrikeoutPosition:Ft,sFamilyClass:Ft,panose:new Ve(tr,10),ulCharRange:new Ve(et,4),vendorID:new Ti(4),fsSelection:new Qd(G,["italic","underscore","negative","outlined","strikeout","bold","regular","useTypoMetrics","wws","oblique"]),usFirstCharIndex:G,usLastCharIndex:G},0:{},1:{typoAscender:Ft,typoDescender:Ft,typoLineGap:Ft,winAscent:G,winDescent:G,codePageRange:new Ve(et,2)},2:{typoAscender:Ft,typoDescender:Ft,typoLineGap:Ft,winAscent:G,winDescent:G,codePageRange:new Ve(et,2),xHeight:Ft,capHeight:Ft,defaultChar:G,breakChar:G,maxContent:G},5:{typoAscender:Ft,typoDescender:Ft,typoLineGap:Ft,winAscent:G,winDescent:G,codePageRange:new Ve(et,2),xHeight:Ft,capHeight:Ft,defaultChar:G,breakChar:G,maxContent:G,usLowerOpticalPointSize:G,usUpperOpticalPointSize:G}});let __=Yhe.versions;__[3]=__[4]=__[2];var uet=Yhe,det=new On(Fs,{header:{italicAngle:Fs,underlinePosition:Ft,underlineThickness:Ft,isFixedPitch:et,minMemType42:et,maxMemType42:et,minMemType1:et,maxMemType1:et},1:{},2:{numberOfGlyphs:G,glyphNameIndex:new Ve(G,"numberOfGlyphs"),names:new Ve(new Ti(tr))},2.5:{numberOfGlyphs:G,offsets:new Ve(tr,"numberOfGlyphs")},3:{},4:{map:new Ve(et,e=>e.parent.maxp.numGlyphs)}}),fet=new ct({controlValues:new Ve(Ft)}),het=new ct({instructions:new Ve(tr)});let iF=new On("head.indexToLocFormat",{0:{offsets:new Ve(G)},1:{offsets:new Ve(et)}});iF.process=function(){if(this.version===0&&!this._processed){for(let e=0;e>>=1;this._processed=!1}};var met=iF,pet=new ct({controlValueProgram:new Ve(tr)}),get=new Ve(new Rl);class Sf{getCFFVersion(t){for(;t&&!t.hdrSize;)t=t.parent;return t?t.version:-1}decode(t,r){let i=this.getCFFVersion(r)>=2?t.readUInt32BE():t.readUInt16BE();if(i===0)return[];let a=t.readUInt8(),s;if(a===1)s=tr;else if(a===2)s=G;else if(a===3)s=Jp;else if(a===4)s=et;else throw new Error(`Bad offset size in CFFIndex: ${a} ${t.pos}`);let l=[],c=t.pos+(i+1)*a-1,u=s.decode(t);for(let d=0;d>4;if(a===l2)break;n+=PG[a];let s=i&15;if(s===l2)break;n+=PG[s]}return parseFloat(n)}return null}static size(t){if(t.forceLarge&&(t=32768),(t|0)!==t){let r=""+t;return 1+Math.ceil((r.length+1)/2)}else return-107<=t&&t<=107?1:108<=t&&t<=1131||-1131<=t&&t<=-108?2:-32768<=t&&t<=32767?3:5}static encode(t,r){let n=Number(r);if(r.forceLarge)return t.writeUInt8(29),t.writeInt32BE(n);if((n|0)!==n){t.writeUInt8(30);let a=""+n;for(let s=0;s>8)+247),t.writeUInt8(n&255)):-1131<=n&&n<=-108?(n=-n-108,t.writeUInt8((n>>8)+251),t.writeUInt8(n&255)):-32768<=n&&n<=32767?(t.writeUInt8(28),t.writeInt16BE(n)):(t.writeUInt8(29),t.writeInt32BE(n))}}class q6{decodeOperands(t,r,n,i){if(Array.isArray(t))return i.map((a,s)=>this.decodeOperands(t[s],r,n,[a]));if(t.decode!=null)return t.decode(r,n,i);switch(t){case"number":case"offset":case"sid":return i[0];case"boolean":return!!i[0];default:return i}}encodeOperands(t,r,n,i){return Array.isArray(t)?i.map((a,s)=>this.encodeOperands(t[s],r,n,a)[0]):t.encode!=null?t.encode(r,i,n):typeof i=="number"?[i]:typeof i=="boolean"?[+i]:Array.isArray(i)?i:[i]}decode(t,r){let n=t.pos+r.length,i={},a=[];Object.defineProperties(i,{parent:{value:r},_startOffset:{value:t.pos}});for(let s in this.fields){let l=this.fields[s];i[l[1]]=l[3]}for(;t.posn[0]},super.decode(t,r,n)}encode(t,r,n){if(!t)return this.offsetType={size:()=>0},this.size(r,n),[new RG(0)];let i=null;return this.offsetType={encode:(a,s)=>i=s},super.encode(t,r,n),[new RG(i)]}constructor(t,r={}){r.type==null&&(r.type="global"),super(null,t,r)}}class RG{valueOf(){return this.val}constructor(t){this.val=t,this.forceLarge=!0}}class Aet{static decode(t,r,n){let i=n.pop();for(;n.length>i;)n.pop()}}var fT=new q6([[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","number",.039625],[[12,10],"BlueShift","number",7],[[12,11],"BlueFuzz","number",1],[10,"StdHW","number",null],[11,"StdVW","number",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","boolean",!1],[[12,17],"LanguageGroup","number",0],[[12,18],"ExpansionFactor","number",.06],[[12,19],"initialRandomSeed","number",0],[20,"defaultWidthX","number",0],[21,"nominalWidthX","number",0],[22,"vsindex","number",0],[23,"blend",Aet,null],[19,"Subrs",new Nd(new Sf,{type:"local"}),null]]),SE=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"];let Zhe=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],vet=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],Jhe=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],xet=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],yet=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"],Xhe=new ct({reserved:new Ia(G),reqFeatureIndex:G,featureCount:G,featureIndexes:new Ve(G,"featureCount")}),bet=new ct({tag:new Ti(4),langSys:new Ze(G,Xhe,{type:"parent"})}),wet=new ct({defaultLangSys:new Ze(G,Xhe),count:G,langSysRecords:new Ve(bet,"count")}),Eet=new ct({tag:new Ti(4),script:new Ze(G,wet,{type:"parent"})}),eme=new Ve(Eet,G),Cet=new ct({version:G,nameID:G}),tme=new ct({featureParams:new Ze(G,Cet),lookupCount:G,lookupListIndexes:new Ve(G,"lookupCount")}),Iet=new ct({tag:new Ti(4),feature:new Ze(G,tme,{type:"parent"})}),rme=new Ve(Iet,G),Bet=new ct({markAttachmentType:tr,flags:new Qd(tr,["rightToLeft","ignoreBaseGlyphs","ignoreLigatures","ignoreMarks","useMarkFilteringSet"])});function qI(e){let t=new ct({lookupType:G,flags:Bet,subTableCount:G,subTables:new Ve(new Ze(G,e),"subTableCount"),markFilteringSet:new HI(G,r=>r.flags.flags.useMarkFilteringSet)});return new Zi(new Ze(G,t),G)}let Net=new ct({start:G,end:G,startCoverageIndex:G}),Wi=new On(G,{1:{glyphCount:G,glyphs:new Ve(G,"glyphCount")},2:{rangeCount:G,rangeRecords:new Ve(Net,"rangeCount")}}),ket=new ct({start:G,end:G,class:G}),Xp=new On(G,{1:{startGlyph:G,glyphCount:G,classValueArray:new Ve(G,"glyphCount")},2:{classRangeCount:G,classRangeRecord:new Ve(ket,"classRangeCount")}}),Hp=new ct({a:G,b:G,deltaFormat:G}),l5=new ct({sequenceIndex:G,lookupListIndex:G}),_et=new ct({glyphCount:G,lookupCount:G,input:new Ve(G,e=>e.glyphCount-1),lookupRecords:new Ve(l5,"lookupCount")}),jet=new Ve(new Ze(G,_et),G),Det=new ct({glyphCount:G,lookupCount:G,classes:new Ve(G,e=>e.glyphCount-1),lookupRecords:new Ve(l5,"lookupCount")}),Tet=new Ve(new Ze(G,Det),G),nme=new On(G,{1:{coverage:new Ze(G,Wi),ruleSetCount:G,ruleSets:new Ve(new Ze(G,jet),"ruleSetCount")},2:{coverage:new Ze(G,Wi),classDef:new Ze(G,Xp),classSetCnt:G,classSet:new Ve(new Ze(G,Tet),"classSetCnt")},3:{glyphCount:G,lookupCount:G,coverages:new Ve(new Ze(G,Wi),"glyphCount"),lookupRecords:new Ve(l5,"lookupCount")}}),Pet=new ct({backtrackGlyphCount:G,backtrack:new Ve(G,"backtrackGlyphCount"),inputGlyphCount:G,input:new Ve(G,e=>e.inputGlyphCount-1),lookaheadGlyphCount:G,lookahead:new Ve(G,"lookaheadGlyphCount"),lookupCount:G,lookupRecords:new Ve(l5,"lookupCount")}),FG=new Ve(new Ze(G,Pet),G),ime=new On(G,{1:{coverage:new Ze(G,Wi),chainCount:G,chainRuleSets:new Ve(new Ze(G,FG),"chainCount")},2:{coverage:new Ze(G,Wi),backtrackClassDef:new Ze(G,Xp),inputClassDef:new Ze(G,Xp),lookaheadClassDef:new Ze(G,Xp),chainCount:G,chainClassSet:new Ve(new Ze(G,FG),"chainCount")},3:{backtrackGlyphCount:G,backtrackCoverage:new Ve(new Ze(G,Wi),"backtrackGlyphCount"),inputGlyphCount:G,inputCoverage:new Ve(new Ze(G,Wi),"inputGlyphCount"),lookaheadGlyphCount:G,lookaheadCoverage:new Ve(new Ze(G,Wi),"lookaheadGlyphCount"),lookupCount:G,lookupRecords:new Ve(l5,"lookupCount")}}),S2=new H1(16,"BE",14),Oet=new ct({startCoord:S2,peakCoord:S2,endCoord:S2}),Ret=new ct({axisCount:G,regionCount:G,variationRegions:new Ve(new Ve(Oet,"axisCount"),"regionCount")}),Fet=new ct({shortDeltas:new Ve(Ft,e=>e.parent.shortDeltaCount),regionDeltas:new Ve(Bo,e=>e.parent.regionIndexCount-e.parent.shortDeltaCount),deltas:e=>e.shortDeltas.concat(e.regionDeltas)}),Met=new ct({itemCount:G,shortDeltaCount:G,regionIndexCount:G,regionIndexes:new Ve(G,"regionIndexCount"),deltaSets:new Ve(Fet,"itemCount")}),K6=new ct({format:G,variationRegionList:new Ze(et,Ret),variationDataCount:G,itemVariationData:new Ve(new Ze(et,Met),"variationDataCount")}),Qet=new On(G,{1:{axisIndex:G,axisIndex:G,filterRangeMinValue:S2,filterRangeMaxValue:S2}}),Let=new ct({conditionCount:G,conditionTable:new Ve(new Ze(et,Qet),"conditionCount")}),Uet=new ct({featureIndex:G,alternateFeatureTable:new Ze(et,tme,{type:"parent"})}),$et=new ct({version:Fs,substitutionCount:G,substitutions:new Ve(Uet,"substitutionCount")}),zet=new ct({conditionSet:new Ze(et,Let,{type:"parent"}),featureTableSubstitution:new Ze(et,$et,{type:"parent"})}),ame=new ct({majorVersion:G,minorVersion:G,featureVariationRecordCount:et,featureVariationRecords:new Ve(zet,"featureVariationRecordCount")});class sme{decode(t,r,n){return this.predefinedOps[n[0]]?this.predefinedOps[n[0]]:this.type.decode(t,r,n)}size(t,r){return this.type.size(t,r)}encode(t,r,n){let i=this.predefinedOps.indexOf(r);return i!==-1?i:this.type.encode(t,r,n)}constructor(t,r){this.predefinedOps=t,this.type=r}}class Het extends Li{decode(t){return tr.decode(t)&127}constructor(){super("UInt8")}}let ome=new ct({first:G,nLeft:tr}),Wet=new ct({first:G,nLeft:G}),Get=new On(new Het,{0:{nCodes:tr,codes:new Ve(tr,"nCodes")},1:{nRanges:tr,ranges:new Ve(ome,"nRanges")}}),qet=new sme([Zhe,vet],new Nd(Get,{lazy:!0}));class MG extends Ve{decode(t,r){let n=nh(this.length,t,r),i=0,a=[];for(;ie.parent.CharStrings.length-1)},1:{ranges:new MG(ome,e=>e.parent.CharStrings.length-1)},2:{ranges:new MG(Wet,e=>e.parent.CharStrings.length-1)}}),Vet=new sme([Jhe,xet,yet],new Nd(Ket,{lazy:!0})),Yet=new ct({first:G,fd:tr}),Zet=new ct({first:et,fd:G}),lme=new On(tr,{0:{fds:new Ve(tr,e=>e.parent.CharStrings.length)},3:{nRanges:G,ranges:new Ve(Yet,"nRanges"),sentinel:G},4:{nRanges:et,ranges:new Ve(Zet,"nRanges"),sentinel:et}}),D_=new Nd(fT);class cme{decode(t,r,n){return r.length=n[0],D_.decode(t,r,[n[1]])}size(t,r){return[fT.size(t,r,!1),D_.size(t,r)[0]]}encode(t,r,n){return[fT.size(r,n,!1),D_.encode(t,r,n)[0]]}}let ume=new q6([[18,"Private",new cme,null],[[12,38],"FontName","sid",null],[[12,7],"FontMatrix","array",[.001,0,0,.001,0,0]],[[12,5],"PaintType","number",0]]),Jet=new q6([[[12,30],"ROS",["sid","sid","number"],null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","boolean",!1],[[12,2],"ItalicAngle","number",0],[[12,3],"UnderlinePosition","number",-100],[[12,4],"UnderlineThickness","number",50],[[12,5],"PaintType","number",0],[[12,6],"CharstringType","number",2],[[12,7],"FontMatrix","array",[.001,0,0,.001,0,0]],[13,"UniqueID","number",null],[5,"FontBBox","array",[0,0,0,0]],[[12,8],"StrokeWidth","number",0],[14,"XUID","array",null],[15,"charset",Vet,Jhe],[16,"Encoding",qet,Zhe],[17,"CharStrings",new Nd(new Sf),null],[18,"Private",new cme,null],[[12,20],"SyntheticBase","number",null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","number",0],[[12,32],"CIDFontRevision","number",0],[[12,33],"CIDFontType","number",0],[[12,34],"CIDCount","number",8720],[[12,35],"UIDBase","number",null],[[12,37],"FDSelect",new Nd(lme),null],[[12,36],"FDArray",new Nd(new Sf(ume)),null],[[12,38],"FontName","sid",null]]),Xet=new ct({length:G,itemVariationStore:K6}),ett=new q6([[[12,7],"FontMatrix","array",[.001,0,0,.001,0,0]],[17,"CharStrings",new Nd(new Sf),null],[[12,37],"FDSelect",new Nd(lme),null],[[12,36],"FDArray",new Nd(new Sf(ume)),null],[24,"vstore",new Nd(Xet),null],[25,"maxstack","number",193]]),ttt=new On(KJe,{1:{hdrSize:tr,offSize:tr,nameIndex:new Sf(new Ti("length")),topDictIndex:new Sf(Jet),stringIndex:new Sf(new Ti("length")),globalSubrIndex:new Sf},2:{hdrSize:tr,length:G,topDict:ett,globalSubrIndex:new Sf}});var dme=ttt;class aF{static decode(t){return new aF(t)}decode(){this.stream.pos;let t=dme.decode(this.stream);for(let r in t){let n=t[r];this[r]=n}if(this.version<2){if(this.topDictIndex.length!==1)throw new Error("Only a single font is allowed in CFF");this.topDict=this.topDictIndex[0]}return this.isCIDFont=this.topDict.ROS!=null,this}string(t){return this.version>=2?null:t=2||this.isCIDFont)return null;let{charset:r}=this.topDict;if(Array.isArray(r))return r[t];if(t===0)return".notdef";switch(t-=1,r.version){case 0:return this.string(r.glyphs[t]);case 1:case 2:for(let n=0;n>1;if(t=r[a+1].first)n=a+1;else return r[a].fd}default:throw new Error(`Unknown FDSelect version: ${this.topDict.FDSelect.version}`)}}privateDictForGlyph(t){if(this.topDict.FDSelect){let r=this.fdForGlyph(t);return this.topDict.FDArray[r]?this.topDict.FDArray[r].Private:null}return this.version<2?this.topDict.Private:this.topDict.FDArray[0].Private}constructor(t){this.stream=t,this.decode()}}var fme=aF;let rtt=new ct({glyphIndex:G,vertOriginY:Ft});var ntt=new ct({majorVersion:G,minorVersion:G,defaultVertOriginY:Ft,numVertOriginYMetrics:G,metrics:new Ve(rtt,"numVertOriginYMetrics")});let Zv=new ct({height:tr,width:tr,horiBearingX:Bo,horiBearingY:Bo,horiAdvance:tr,vertBearingX:Bo,vertBearingY:Bo,vertAdvance:tr}),F4=new ct({height:tr,width:tr,bearingX:Bo,bearingY:Bo,advance:tr}),QG=new ct({glyph:G,xOffset:Bo,yOffset:Bo});class LG{}class T_{}new On("version",{1:{metrics:F4,data:LG},2:{metrics:F4,data:T_},5:{data:T_},6:{metrics:Zv,data:LG},7:{metrics:Zv,data:T_},8:{metrics:F4,pad:new Ia(tr),numComponents:G,components:new Ve(QG,"numComponents")},9:{metrics:Zv,pad:new Ia(tr),numComponents:G,components:new Ve(QG,"numComponents")},17:{metrics:F4,dataLen:et,data:new Rl("dataLen")},18:{metrics:Zv,dataLen:et,data:new Rl("dataLen")},19:{dataLen:et,data:new Rl("dataLen")}});let UG=new ct({ascender:Bo,descender:Bo,widthMax:tr,caretSlopeNumerator:Bo,caretSlopeDenominator:Bo,caretOffset:Bo,minOriginSB:Bo,minAdvanceSB:Bo,maxBeforeBL:Bo,minAfterBL:Bo,pad:new Ia(Bo,2)}),itt=new ct({glyphCode:G,offset:G}),att=new On(G,{header:{imageFormat:G,imageDataOffset:et},1:{offsetArray:new Ve(et,e=>e.parent.lastGlyphIndex-e.parent.firstGlyphIndex+1)},2:{imageSize:et,bigMetrics:Zv},3:{offsetArray:new Ve(G,e=>e.parent.lastGlyphIndex-e.parent.firstGlyphIndex+1)},4:{numGlyphs:et,glyphArray:new Ve(itt,e=>e.numGlyphs+1)},5:{imageSize:et,bigMetrics:Zv,numGlyphs:et,glyphCodeArray:new Ve(G,"numGlyphs")}}),stt=new ct({firstGlyphIndex:G,lastGlyphIndex:G,subtable:new Ze(et,att)}),ott=new ct({indexSubTableArray:new Ze(et,new Ve(stt,1),{type:"parent"}),indexTablesSize:et,numberOfIndexSubTables:et,colorRef:et,hori:UG,vert:UG,startGlyphIndex:G,endGlyphIndex:G,ppemX:tr,ppemY:tr,bitDepth:tr,flags:new Qd(tr,["horizontal","vertical"])});var ltt=new ct({version:et,numSizes:et,sizes:new Ve(ott,"numSizes")});let ctt=new ct({ppem:G,resolution:G,imageOffsets:new Ve(new Ze(et,"void"),e=>e.parent.parent.maxp.numGlyphs+1)});var utt=new ct({version:G,flags:new Qd(G,["renderOutlines"]),numImgTables:et,imageTables:new Ve(new Ze(et,ctt),"numImgTables")});let dtt=new ct({gid:G,paletteIndex:G}),ftt=new ct({gid:G,firstLayerIndex:G,numLayers:G});var htt=new ct({version:G,numBaseGlyphRecords:G,baseGlyphRecord:new Ze(et,new Ve(ftt,"numBaseGlyphRecords")),layerRecords:new Ze(et,new Ve(dtt,"numLayerRecords"),{lazy:!0}),numLayerRecords:G});let mtt=new ct({blue:tr,green:tr,red:tr,alpha:tr});var ptt=new On(G,{header:{numPaletteEntries:G,numPalettes:G,numColorRecords:G,colorRecords:new Ze(et,new Ve(mtt,"numColorRecords")),colorRecordIndices:new Ve(G,"numPalettes")},0:{},1:{offsetPaletteTypeArray:new Ze(et,new Ve(et,"numPalettes")),offsetPaletteLabelArray:new Ze(et,new Ve(G,"numPalettes")),offsetPaletteEntryLabelArray:new Ze(et,new Ve(G,"numPaletteEntries"))}});let vb=new On(G,{1:{coordinate:Ft},2:{coordinate:Ft,referenceGlyph:G,baseCoordPoint:G},3:{coordinate:Ft,deviceTable:new Ze(G,Hp)}}),gtt=new ct({defaultIndex:G,baseCoordCount:G,baseCoords:new Ve(new Ze(G,vb),"baseCoordCount")}),Att=new ct({tag:new Ti(4),minCoord:new Ze(G,vb,{type:"parent"}),maxCoord:new Ze(G,vb,{type:"parent"})}),hme=new ct({minCoord:new Ze(G,vb),maxCoord:new Ze(G,vb),featMinMaxCount:G,featMinMaxRecords:new Ve(Att,"featMinMaxCount")}),vtt=new ct({tag:new Ti(4),minMax:new Ze(G,hme,{type:"parent"})}),xtt=new ct({baseValues:new Ze(G,gtt),defaultMinMax:new Ze(G,hme),baseLangSysCount:G,baseLangSysRecords:new Ve(vtt,"baseLangSysCount")}),ytt=new ct({tag:new Ti(4),script:new Ze(G,xtt,{type:"parent"})}),btt=new Ve(ytt,G),wtt=new Ve(new Ti(4),G),$G=new ct({baseTagList:new Ze(G,wtt),baseScriptList:new Ze(G,btt)});var Ett=new On(et,{header:{horizAxis:new Ze(G,$G),vertAxis:new Ze(G,$G)},65536:{},65537:{itemVariationStore:new Ze(et,K6)}});let Ctt=new Ve(G,G),Itt=new ct({coverage:new Ze(G,Wi),glyphCount:G,attachPoints:new Ve(new Ze(G,Ctt),"glyphCount")}),Stt=new On(G,{1:{coordinate:Ft},2:{caretValuePoint:G},3:{coordinate:Ft,deviceTable:new Ze(G,Hp)}}),Btt=new Ve(new Ze(G,Stt),G),Ntt=new ct({coverage:new Ze(G,Wi),ligGlyphCount:G,ligGlyphs:new Ve(new Ze(G,Btt),"ligGlyphCount")}),zG=new ct({markSetTableFormat:G,markSetCount:G,coverage:new Ve(new Ze(et,Wi),"markSetCount")});var ktt=new On(et,{header:{glyphClassDef:new Ze(G,Xp),attachList:new Ze(G,Itt),ligCaretList:new Ze(G,Ntt),markAttachClassDef:new Ze(G,Xp)},65536:{},65538:{markGlyphSetsDef:new Ze(G,zG)},65539:{markGlyphSetsDef:new Ze(G,zG),itemVariationStore:new Ze(et,K6)}});let Ov=new Qd(G,["xPlacement","yPlacement","xAdvance","yAdvance","xPlaDevice","yPlaDevice","xAdvDevice","yAdvDevice"]),_tt={xPlacement:Ft,yPlacement:Ft,xAdvance:Ft,yAdvance:Ft,xPlaDevice:new Ze(G,Hp,{type:"global",relativeTo:e=>e.rel}),yPlaDevice:new Ze(G,Hp,{type:"global",relativeTo:e=>e.rel}),xAdvDevice:new Ze(G,Hp,{type:"global",relativeTo:e=>e.rel}),yAdvDevice:new Ze(G,Hp,{type:"global",relativeTo:e=>e.rel})};class zx{buildStruct(t){let r=t;for(;!r[this.key]&&r.parent;)r=r.parent;if(!r[this.key])return;let n={};n.rel=()=>r._startOffset;let i=r[this.key];for(let a in i)i[a]&&(n[a]=_tt[a]);return new ct(n)}size(t,r){return this.buildStruct(r).size(t,r)}decode(t,r){let n=this.buildStruct(r).decode(t,r);return delete n.rel,n}constructor(t="valueFormat"){this.key=t}}let jtt=new ct({secondGlyph:G,value1:new zx("valueFormat1"),value2:new zx("valueFormat2")}),Dtt=new Ve(jtt,G),Ttt=new ct({value1:new zx("valueFormat1"),value2:new zx("valueFormat2")}),xb=new On(G,{1:{xCoordinate:Ft,yCoordinate:Ft},2:{xCoordinate:Ft,yCoordinate:Ft,anchorPoint:G},3:{xCoordinate:Ft,yCoordinate:Ft,xDeviceTable:new Ze(G,Hp),yDeviceTable:new Ze(G,Hp)}}),Ptt=new ct({entryAnchor:new Ze(G,xb,{type:"parent"}),exitAnchor:new Ze(G,xb,{type:"parent"})}),Ott=new ct({class:G,markAnchor:new Ze(G,xb,{type:"parent"})}),P_=new Ve(Ott,G),Rtt=new Ve(new Ze(G,xb),e=>e.parent.classCount),HG=new Ve(Rtt,G),Ftt=new Ve(new Ze(G,xb),e=>e.parent.parent.classCount),Mtt=new Ve(Ftt,G),Qtt=new Ve(new Ze(G,Mtt),G),yb=new On("lookupType",{1:new On(G,{1:{coverage:new Ze(G,Wi),valueFormat:Ov,value:new zx},2:{coverage:new Ze(G,Wi),valueFormat:Ov,valueCount:G,values:new Zi(new zx,"valueCount")}}),2:new On(G,{1:{coverage:new Ze(G,Wi),valueFormat1:Ov,valueFormat2:Ov,pairSetCount:G,pairSets:new Zi(new Ze(G,Dtt),"pairSetCount")},2:{coverage:new Ze(G,Wi),valueFormat1:Ov,valueFormat2:Ov,classDef1:new Ze(G,Xp),classDef2:new Ze(G,Xp),class1Count:G,class2Count:G,classRecords:new Zi(new Zi(Ttt,"class2Count"),"class1Count")}}),3:{format:G,coverage:new Ze(G,Wi),entryExitCount:G,entryExitRecords:new Ve(Ptt,"entryExitCount")},4:{format:G,markCoverage:new Ze(G,Wi),baseCoverage:new Ze(G,Wi),classCount:G,markArray:new Ze(G,P_),baseArray:new Ze(G,HG)},5:{format:G,markCoverage:new Ze(G,Wi),ligatureCoverage:new Ze(G,Wi),classCount:G,markArray:new Ze(G,P_),ligatureArray:new Ze(G,Qtt)},6:{format:G,mark1Coverage:new Ze(G,Wi),mark2Coverage:new Ze(G,Wi),classCount:G,mark1Array:new Ze(G,P_),mark2Array:new Ze(G,HG)},7:nme,8:ime,9:{posFormat:G,lookupType:G,extension:new Ze(et,null)}});yb.versions[9].extension.type=yb;var Ltt=new On(et,{header:{scriptList:new Ze(G,eme),featureList:new Ze(G,rme),lookupList:new Ze(G,new qI(yb))},65536:{},65537:{featureVariations:new Ze(et,ame)}});let mme=new Ve(G,G),Utt=mme,$tt=new ct({glyph:G,compCount:G,components:new Ve(G,e=>e.compCount-1)}),ztt=new Ve(new Ze(G,$tt),G),hT=new On("lookupType",{1:new On(G,{1:{coverage:new Ze(G,Wi),deltaGlyphID:Ft},2:{coverage:new Ze(G,Wi),glyphCount:G,substitute:new Zi(G,"glyphCount")}}),2:{substFormat:G,coverage:new Ze(G,Wi),count:G,sequences:new Zi(new Ze(G,mme),"count")},3:{substFormat:G,coverage:new Ze(G,Wi),count:G,alternateSet:new Zi(new Ze(G,Utt),"count")},4:{substFormat:G,coverage:new Ze(G,Wi),count:G,ligatureSets:new Zi(new Ze(G,ztt),"count")},5:nme,6:ime,7:{substFormat:G,lookupType:G,extension:new Ze(et,null)},8:{substFormat:G,coverage:new Ze(G,Wi),backtrackCoverage:new Ve(new Ze(G,Wi),"backtrackGlyphCount"),lookaheadGlyphCount:G,lookaheadCoverage:new Ve(new Ze(G,Wi),"lookaheadGlyphCount"),glyphCount:G,substitutes:new Ve(G,"glyphCount")}});hT.versions[7].extension.type=hT;var Htt=new On(et,{header:{scriptList:new Ze(G,eme),featureList:new Ze(G,rme),lookupList:new Ze(G,new qI(hT))},65536:{},65537:{featureVariations:new Ze(et,ame)}});let Ip=new Ve(G,G),Wtt=new ct({shrinkageEnableGSUB:new Ze(G,Ip),shrinkageDisableGSUB:new Ze(G,Ip),shrinkageEnableGPOS:new Ze(G,Ip),shrinkageDisableGPOS:new Ze(G,Ip),shrinkageJstfMax:new Ze(G,new qI(yb)),extensionEnableGSUB:new Ze(G,Ip),extensionDisableGSUB:new Ze(G,Ip),extensionEnableGPOS:new Ze(G,Ip),extensionDisableGPOS:new Ze(G,Ip),extensionJstfMax:new Ze(G,new qI(yb))}),pme=new Ve(new Ze(G,Wtt),G),Gtt=new ct({tag:new Ti(4),jstfLangSys:new Ze(G,pme)}),qtt=new ct({extenderGlyphs:new Ze(G,new Ve(G,G)),defaultLangSys:new Ze(G,pme),langSysCount:G,langSysRecords:new Ve(Gtt,"langSysCount")}),Ktt=new ct({tag:new Ti(4),script:new Ze(G,qtt,{type:"parent"})});var Vtt=new ct({version:et,scriptCount:G,scriptList:new Ve(Ktt,"scriptCount")});class Ytt{decode(t,r){switch(this.size(0,r)){case 1:return t.readUInt8();case 2:return t.readUInt16BE();case 3:return t.readUInt24BE();case 4:return t.readUInt32BE()}}size(t,r){return nh(this._size,null,r)}constructor(t){this._size=t}}let Ztt=new ct({entry:new Ytt(e=>((e.parent.entryFormat&48)>>4)+1),outerIndex:e=>e.entry>>(e.parent.entryFormat&15)+1,innerIndex:e=>e.entry&(1<<(e.parent.entryFormat&15)+1)-1}),O_=new ct({entryFormat:G,mapCount:G,mapData:new Ve(Ztt,"mapCount")});var Jtt=new ct({majorVersion:G,minorVersion:G,itemVariationStore:new Ze(et,K6),advanceWidthMapping:new Ze(et,O_),LSBMapping:new Ze(et,O_),RSBMapping:new Ze(et,O_)});let Xtt=new ct({format:et,length:et,offset:et}),ert=new ct({reserved:new Ia(G,2),cbSignature:et,signature:new Rl("cbSignature")});var trt=new ct({ulVersion:et,usNumSigs:G,usFlag:G,signatures:new Ve(Xtt,"usNumSigs"),signatureBlocks:new Ve(ert,"usNumSigs")});let rrt=new ct({rangeMaxPPEM:G,rangeGaspBehavior:new Qd(G,["grayscale","gridfit","symmetricSmoothing","symmetricGridfit"])});var nrt=new ct({version:G,numRanges:G,gaspRanges:new Ve(rrt,"numRanges")});let irt=new ct({pixelSize:tr,maximumWidth:tr,widths:new Ve(tr,e=>e.parent.parent.maxp.numGlyphs)});var art=new ct({version:G,numRecords:Ft,sizeDeviceRecord:DA,records:new Ve(irt,"numRecords")});let srt=new ct({left:G,right:G,value:Ft}),WG=new ct({firstGlyph:G,nGlyphs:G,offsets:new Ve(G,"nGlyphs"),max:e=>e.offsets.length&&Math.max.apply(Math,e.offsets)}),ort=new ct({off:e=>e._startOffset-e.parent.parent._startOffset,len:e=>((e.parent.leftTable.max-e.off)/e.parent.rowWidth+1)*(e.parent.rowWidth/2),values:new Zi(Ft,"len")}),GG=new On("format",{0:{nPairs:G,searchRange:G,entrySelector:G,rangeShift:G,pairs:new Ve(srt,"nPairs")},2:{rowWidth:G,leftTable:new Ze(G,WG,{type:"parent"}),rightTable:new Ze(G,WG,{type:"parent"}),array:new Ze(G,ort,{type:"parent"})},3:{glyphCount:G,kernValueCount:tr,leftClassCount:tr,rightClassCount:tr,flags:tr,kernValue:new Ve(Ft,"kernValueCount"),leftClass:new Ve(tr,"glyphCount"),rightClass:new Ve(tr,"glyphCount"),kernIndex:new Ve(tr,e=>e.leftClassCount*e.rightClassCount)}}),qG=new On("version",{0:{subVersion:G,length:G,format:tr,coverage:new Qd(tr,["horizontal","minimum","crossStream","override"]),subtable:GG,padding:new Ia(tr,e=>e.length-e._currentOffset)},1:{length:et,coverage:new Qd(tr,[null,null,null,null,null,"variation","crossStream","vertical"]),format:tr,tupleIndex:G,subtable:GG,padding:new Ia(tr,e=>e.length-e._currentOffset)}});var lrt=new On(G,{0:{nTables:G,tables:new Ve(qG,"nTables")},1:{reserved:new Ia(G),nTables:et,tables:new Ve(qG,"nTables")}}),crt=new ct({version:G,numGlyphs:G,yPels:new Ve(tr,"numGlyphs")}),urt=new ct({version:G,fontNumber:et,pitch:G,xHeight:G,style:G,typeFamily:G,capHeight:G,symbolSet:G,typeface:new Ti(16),characterComplement:new Ti(8),fileName:new Ti(6),strokeWeight:new Ti(1),widthType:new Ti(1),serifStyle:tr,reserved:new Ia(tr)});let drt=new ct({bCharSet:tr,xRatio:tr,yStartRatio:tr,yEndRatio:tr}),frt=new ct({yPelHeight:G,yMax:Ft,yMin:Ft}),hrt=new ct({recs:G,startsz:tr,endsz:tr,entries:new Ve(frt,"recs")});var mrt=new ct({version:G,numRecs:G,numRatios:G,ratioRanges:new Ve(drt,"numRatios"),offsets:new Ve(G,"numRatios"),groups:new Ve(hrt,"numRecs")}),prt=new ct({version:G,ascent:Ft,descent:Ft,lineGap:Ft,advanceHeightMax:Ft,minTopSideBearing:Ft,minBottomSideBearing:Ft,yMaxExtent:Ft,caretSlopeRise:Ft,caretSlopeRun:Ft,caretOffset:Ft,reserved:new Ia(Ft,4),metricDataFormat:Ft,numberOfMetrics:G});let grt=new ct({advance:G,bearing:Ft});var Art=new ct({metrics:new Zi(grt,e=>e.parent.vhea.numberOfMetrics),bearings:new Zi(Ft,e=>e.parent.maxp.numGlyphs-e.parent.vhea.numberOfMetrics)});let KG=new H1(16,"BE",14),vrt=new ct({fromCoord:KG,toCoord:KG}),xrt=new ct({pairCount:G,correspondence:new Ve(vrt,"pairCount")});var yrt=new ct({version:Fs,axisCount:et,segment:new Ve(xrt,"axisCount")});class brt{getItem(t){if(this._items[t]==null){let r=this.stream.pos;this.stream.pos=this.base+this.type.size(null,this.parent)*t,this._items[t]=this.type.decode(this.stream,this.parent),this.stream.pos=r}return this._items[t]}inspect(){return`[UnboundedArray ${this.type.constructor.name}]`}constructor(t,r,n){this.type=t,this.stream=r,this.parent=n,this.base=this.stream.pos,this._items=[]}}class Rf extends Ve{decode(t,r){return new brt(this.type,t,r)}constructor(t){super(t,0)}}let hg=function(e=G){class t{decode(l,c){return c=c.parent.parent,this.type.decode(l,c)}size(l,c){return c=c.parent.parent,this.type.size(l,c)}encode(l,c,u){return u=u.parent.parent,this.type.encode(l,c,u)}constructor(l){this.type=l}}e=new t(e);let r=new ct({unitSize:G,nUnits:G,searchRange:G,entrySelector:G,rangeShift:G}),n=new ct({lastGlyph:G,firstGlyph:G,value:e}),i=new ct({lastGlyph:G,firstGlyph:G,values:new Ze(G,new Ve(e,s=>s.lastGlyph-s.firstGlyph+1),{type:"parent"})}),a=new ct({glyph:G,value:e});return new On(G,{0:{values:new Rf(e)},2:{binarySearchHeader:r,segments:new Ve(n,s=>s.binarySearchHeader.nUnits)},4:{binarySearchHeader:r,segments:new Ve(i,s=>s.binarySearchHeader.nUnits)},6:{binarySearchHeader:r,segments:new Ve(a,s=>s.binarySearchHeader.nUnits)},8:{firstGlyph:G,count:G,values:new Ve(e,"count")}})};function M4(e={},t=G){let r=Object.assign({newState:G,flags:G},e),n=new ct(r),i=new Rf(new Ve(G,s=>s.nClasses));return new ct({nClasses:et,classTable:new Ze(et,new hg(t)),stateArray:new Ze(et,i),entryTable:new Ze(et,new Rf(n))})}function wrt(e={},t=G){let r=new ct({version(){return 8},firstGlyph:G,values:new Ve(tr,G)}),n=Object.assign({newStateOffset:G,newState:l=>(l.newStateOffset-(l.parent.stateArray.base-l.parent._startOffset))/l.parent.nClasses,flags:G},e),i=new ct(n),a=new Rf(new Ve(tr,l=>l.nClasses));return new ct({nClasses:G,classTable:new Ze(G,r),stateArray:new Ze(G,a),entryTable:new Ze(G,new Rf(i))})}let Ert=new On("format",{0:{deltas:new Ve(Ft,32)},1:{deltas:new Ve(Ft,32),mappingData:new hg(G)},2:{standardGlyph:G,controlPoints:new Ve(G,32)},3:{standardGlyph:G,controlPoints:new Ve(G,32),mappingData:new hg(G)}});var Crt=new ct({version:Fs,format:G,defaultBaseline:G,subtable:Ert});let Irt=new ct({setting:G,nameIndex:Ft,name:e=>e.parent.parent.parent.name.records.fontFeatures[e.nameIndex]}),Srt=new ct({feature:G,nSettings:G,settingTable:new Ze(et,new Ve(Irt,"nSettings"),{type:"parent"}),featureFlags:new Qd(tr,[null,null,null,null,null,null,"hasDefault","exclusive"]),defaultSetting:tr,nameIndex:Ft,name:e=>e.parent.parent.name.records.fontFeatures[e.nameIndex]});var Brt=new ct({version:Fs,featureNameCount:G,reserved1:new Ia(G),reserved2:new Ia(et),featureNames:new Ve(Srt,"featureNameCount")});let Nrt=new ct({axisTag:new Ti(4),minValue:Fs,defaultValue:Fs,maxValue:Fs,flags:G,nameID:G,name:e=>e.parent.parent.name.records.fontFeatures[e.nameID]}),krt=new ct({nameID:G,name:e=>e.parent.parent.name.records.fontFeatures[e.nameID],flags:G,coord:new Ve(Fs,e=>e.parent.axisCount),postscriptNameID:new HI(G,e=>e.parent.instanceSize-e._currentOffset>0)});var _rt=new ct({version:Fs,offsetToData:G,countSizePairs:G,axisCount:G,axisSize:G,instanceCount:G,instanceSize:G,axis:new Ve(Nrt,"axisCount"),instance:new Ve(krt,"instanceCount")});let jrt=new H1(16,"BE",14);class Drt{static decode(t,r){return r.flags?t.readUInt32BE():t.readUInt16BE()*2}}let Trt=new ct({version:G,reserved:new Ia(G),axisCount:G,globalCoordCount:G,globalCoords:new Ze(et,new Ve(new Ve(jrt,"axisCount"),"globalCoordCount")),glyphCount:G,flags:G,offsetToData:et,offsets:new Ve(new Ze(Drt,"void",{relativeTo:e=>e.offsetToData,allowNull:!1}),e=>e.glyphCount+1)});var Prt=Trt;let Ort=new ct({length:G,coverage:G,subFeatureFlags:et,stateTable:new wrt}),Rrt=new ct({justClass:et,beforeGrowLimit:Fs,beforeShrinkLimit:Fs,afterGrowLimit:Fs,afterShrinkLimit:Fs,growFlags:G,shrinkFlags:G}),Frt=new Ve(Rrt,et),Mrt=new On("actionType",{0:{lowerLimit:Fs,upperLimit:Fs,order:G,glyphs:new Ve(G,G)},1:{addGlyph:G},2:{substThreshold:Fs,addGlyph:G,substGlyph:G},3:{},4:{variationAxis:et,minimumLimit:Fs,noStretchValue:Fs,maximumLimit:Fs},5:{flags:G,glyph:G}}),Qrt=new ct({actionClass:G,actionType:G,actionLength:et,actionData:Mrt,padding:new Ia(tr,e=>e.actionLength-e._currentOffset)}),Lrt=new Ve(Qrt,et),Urt=new ct({lookupTable:new hg(new Ze(G,Lrt))}),VG=new ct({classTable:new Ze(G,Ort,{type:"parent"}),wdcOffset:G,postCompensationTable:new Ze(G,Urt,{type:"parent"}),widthDeltaClusters:new hg(new Ze(G,Frt,{type:"parent",relativeTo:e=>e.wdcOffset}))});var $rt=new ct({version:et,format:G,horizontal:new Ze(G,VG),vertical:new Ze(G,VG)});let zrt={action:G},Hrt={markIndex:G,currentIndex:G},Wrt={currentInsertIndex:G,markedInsertIndex:G},Grt=new ct({items:new Rf(new Ze(et,new hg))}),qrt=new On("type",{0:{stateTable:new M4},1:{stateTable:new M4(Hrt),substitutionTable:new Ze(et,Grt)},2:{stateTable:new M4(zrt),ligatureActions:new Ze(et,new Rf(et)),components:new Ze(et,new Rf(G)),ligatureList:new Ze(et,new Rf(G))},4:{lookupTable:new hg},5:{stateTable:new M4(Wrt),insertionActions:new Ze(et,new Rf(G))}}),Krt=new ct({length:et,coverage:Jp,type:tr,subFeatureFlags:et,table:qrt,padding:new Ia(tr,e=>e.length-e._currentOffset)}),Vrt=new ct({featureType:G,featureSetting:G,enableFlags:et,disableFlags:et}),Yrt=new ct({defaultFlags:et,chainLength:et,nFeatureEntries:et,nSubtables:et,features:new Ve(Vrt,"nFeatureEntries"),subtables:new Ve(Krt,"nSubtables")});var Zrt=new ct({version:G,unused:new Ia(G),nChains:et,chains:new Ve(Yrt,"nChains")});let Jrt=new ct({left:Ft,top:Ft,right:Ft,bottom:Ft});var Xrt=new ct({version:Fs,format:G,lookupTable:new hg(Jrt)});let bn={};var KI=bn;bn.cmap=YXe;bn.head=ZXe;bn.hhea=JXe;bn.hmtx=eet;bn.maxp=tet;bn.name=cet;bn["OS/2"]=uet;bn.post=det;bn.fpgm=het;bn.loca=met;bn.prep=pet;bn["cvt "]=fet;bn.glyf=get;bn["CFF "]=fme;bn.CFF2=fme;bn.VORG=ntt;bn.EBLC=ltt;bn.CBLC=bn.EBLC;bn.sbix=utt;bn.COLR=htt;bn.CPAL=ptt;bn.BASE=Ett;bn.GDEF=ktt;bn.GPOS=Ltt;bn.GSUB=Htt;bn.JSTF=Vtt;bn.HVAR=Jtt;bn.DSIG=trt;bn.gasp=nrt;bn.hdmx=art;bn.kern=lrt;bn.LTSH=crt;bn.PCLT=urt;bn.VDMX=mrt;bn.vhea=prt;bn.vmtx=Art;bn.avar=yrt;bn.bsln=Crt;bn.feat=Brt;bn.fvar=_rt;bn.gvar=Prt;bn.just=$rt;bn.morx=Zrt;bn.opbd=Xrt;let ent=new ct({tag:new Ti(4),checkSum:et,offset:new Ze(et,"void",{type:"global"}),length:et}),sF=new ct({tag:new Ti(4),numTables:G,searchRange:G,entrySelector:G,rangeShift:G,tables:new Ve(ent,"numTables")});sF.process=function(){let e={};for(let t of this.tables)e[t.tag]=t;this.tables=e};sF.preEncode=function(){if(!Array.isArray(this.tables)){let r=[];for(let n in this.tables){let i=this.tables[n];i&&r.push({tag:n,checkSum:0,offset:new lT(KI[n],i),length:KI[n].size(i)})}this.tables=r}this.tag="true",this.numTables=this.tables.length;let e=Math.floor(Math.log(this.numTables)/Math.LN2),t=Math.pow(2,e);this.searchRange=t*16,this.entrySelector=Math.log(t)/Math.LN2,this.rangeShift=this.numTables*16-this.searchRange};var gme=sF;function BE(e,t){let r=0,n=e.length-1;for(;r<=n;){let i=r+n>>1,a=t(e[i]);if(a<0)n=i-1;else if(a>0)r=i+1;else return i}return-1}function Hv(e,t){let r=[];for(;e>4,r[n++]=(l&15)<<4|c>>2,r[n++]=(c&3)<<6|u&63}return r}class lF{findSubtable(t,r){for(let[n,i]of r)for(let a of t.tables)if(a.platformID===n&&a.encodingID===i)return a.table;return null}lookup(t,r){if(this.encoding)t=this.encoding.get(t)||t;else if(r){let i=this.getVariationSelector(t,r);if(i)return i}let n=this.cmap;switch(n.version){case 0:return n.codeMap.get(t)||0;case 4:{let i=0,a=n.segCount-1;for(;i<=a;){let s=i+a>>1;if(tn.endCode.get(s))i=s+1;else{let l=n.idRangeOffset.get(s),c;if(l===0)c=t+n.idDelta.get(s);else{let u=l/2+(t-n.startCode.get(s))-(n.segCount-s);c=n.glyphIndexArray.get(u)||0,c!==0&&(c+=n.idDelta.get(s))}return c&65535}}return 0}case 8:throw new Error("TODO: cmap format 8");case 6:case 10:return n.glyphIndices.get(t-n.firstCode)||0;case 12:case 13:{let i=0,a=n.nGroups-1;for(;i<=a;){let s=i+a>>1,l=n.groups.get(s);if(tl.endCharCode)i=s+1;else return n.version===12?l.glyphID+(t-l.startCharCode):l.glyphID}return 0}case 14:throw new Error("TODO: cmap format 14");default:throw new Error(`Unknown cmap format ${n.version}`)}}getVariationSelector(t,r){if(!this.uvs)return 0;let n=this.uvs.varSelectors.toArray(),i=BE(n,s=>r-s.varSelector),a=n[i];return i!==-1&&a.defaultUVS&&(i=BE(a.defaultUVS,s=>ts.startUnicodeValue+s.additionalCount?1:0)),i!==-1&&a.nonDefaultUVS&&(i=BE(a.nonDefaultUVS,s=>t-s.unicodeValue),i!==-1)?a.nonDefaultUVS[i].glyphID:0}getCharacterSet(){let t=this.cmap;switch(t.version){case 0:return Hv(0,t.codeMap.length);case 4:{let r=[],n=t.endCode.toArray();for(let i=0;i=a.glyphID&&t<=a.glyphID+(a.endCharCode-a.startCharCode)&&i.push(a.startCharCode+(t-a.glyphID));return i}case 13:{let i=[];for(let a of r.groups.toArray())t===a.glyphID&&i.push(...Hv(a.startCharCode,a.endCharCode+1));return i}default:throw new Error(`Unknown cmap format ${r.version}`)}}constructor(t){if(this.encoding=null,this.cmap=this.findSubtable(t,[[3,10],[0,6],[0,4],[3,1],[0,3],[0,2],[0,1],[0,0]]),!this.cmap)for(let r of t.tables){let n=Vhe(r.platformID,r.encodingID,r.table.language-1),i=iet(n);i&&(this.cmap=r.table,this.encoding=i)}if(!this.cmap)throw new Error("Could not find a supported cmap table");this.uvs=this.findSubtable(t,[[0,5]]),this.uvs&&this.uvs.version!==14&&(this.uvs=null)}}Ql([Ll],lF.prototype,"getCharacterSet",null);Ql([Ll],lF.prototype,"codePointsForGlyph",null);class tnt{process(t,r){for(let n=0;n=0&&(a=s.pairs[l].value);break;case 2:let c=0,u=0;t>=s.leftTable.firstGlyph&&t=s.rightTable.firstGlyph&&r=s.glyphCount||r>=s.glyphCount)return 0;a=s.kernValue[s.kernIndex[s.leftClass[t]*s.rightClassCount+s.rightClass[r]]];break;default:throw new Error(`Unsupported kerning sub-table format ${i.format}`)}i.coverage.override?n=a:n+=a}return n}constructor(t){this.kern=t.kern}}class rnt{positionGlyphs(t,r){let n=0,i=0;for(let a=0;a1&&(s.minX+=(a.codePoints.length-1)*s.width/a.codePoints.length);let l=-r[n].xAdvance,c=0,u=this.font.unitsPerEm/16;for(let d=n+1;d<=i;d++){let f=t[d],m=f.cbox,g=r[d],A=this.getCombiningClass(f.codePoints[0]);if(A!=="Not_Reordered"){switch(g.xOffset=g.yOffset=0,A){case"Double_Above":case"Double_Below":g.xOffset+=s.minX-m.width/2-m.minX;break;case"Attached_Below_Left":case"Below_Left":case"Above_Left":g.xOffset+=s.minX-m.minX;break;case"Attached_Above_Right":case"Below_Right":case"Above_Right":g.xOffset+=s.maxX-m.width-m.minX;break;default:g.xOffset+=s.minX+(s.width-m.width)/2-m.minX}switch(A){case"Double_Below":case"Below_Left":case"Below":case"Below_Right":case"Attached_Below_Left":case"Attached_Below":(A==="Attached_Below_Left"||A==="Attached_Below")&&(s.minY+=u),g.yOffset=-s.minY-m.maxY,s.minY+=m.height;break;case"Double_Above":case"Above_Left":case"Above":case"Above_Right":case"Attached_Above":case"Attached_Above_Right":(A==="Attached_Above"||A==="Attached_Above_Right")&&(s.maxY+=u),g.yOffset=s.maxY-m.minY,s.maxY+=m.height;break}g.xAdvance=g.yAdvance=0,g.xOffset+=l,g.yOffset+=c}else l-=g.xAdvance,c-=g.yAdvance}}getCombiningClass(t){let r=Whe(t);if((t&-256)===3584){if(r==="Not_Reordered")switch(t){case 3633:case 3636:case 3637:case 3638:case 3639:case 3655:case 3660:case 3645:case 3662:return"Above_Right";case 3761:case 3764:case 3765:case 3766:case 3767:case 3771:case 3788:case 3789:return"Above";case 3772:return"Below"}else if(t===3642)return"Below_Right"}switch(r){case"CCC10":case"CCC11":case"CCC12":case"CCC13":case"CCC14":case"CCC15":case"CCC16":case"CCC17":case"CCC18":case"CCC20":case"CCC22":return"Below";case"CCC23":return"Attached_Above";case"CCC24":return"Above_Right";case"CCC25":case"CCC19":return"Above_Left";case"CCC26":return"Above";case"CCC21":break;case"CCC27":case"CCC28":case"CCC30":case"CCC31":case"CCC33":case"CCC34":case"CCC35":case"CCC36":return"Above";case"CCC29":case"CCC32":return"Below";case"CCC103":return"Below_Right";case"CCC107":return"Above_Right";case"CCC118":return"Below";case"CCC122":return"Above";case"CCC129":case"CCC132":return"Below";case"CCC130":return"Above"}return r}constructor(t){this.font=t}}class mg{get width(){return this.maxX-this.minX}get height(){return this.maxY-this.minY}addPoint(t,r){Math.abs(t)!==1/0&&(tthis.maxX&&(this.maxX=t)),Math.abs(r)!==1/0&&(rthis.maxY&&(this.maxY=r))}copy(){return new mg(this.minX,this.minY,this.maxX,this.maxY)}constructor(t=1/0,r=1/0,n=-1/0,i=-1/0){this.minX=t,this.minY=r,this.maxX=n,this.maxY=i}}const Hx={Caucasian_Albanian:"aghb",Arabic:"arab",Imperial_Aramaic:"armi",Armenian:"armn",Avestan:"avst",Balinese:"bali",Bamum:"bamu",Bassa_Vah:"bass",Batak:"batk",Bengali:["bng2","beng"],Bopomofo:"bopo",Brahmi:"brah",Braille:"brai",Buginese:"bugi",Buhid:"buhd",Chakma:"cakm",Canadian_Aboriginal:"cans",Carian:"cari",Cham:"cham",Cherokee:"cher",Coptic:"copt",Cypriot:"cprt",Cyrillic:"cyrl",Devanagari:["dev2","deva"],Deseret:"dsrt",Duployan:"dupl",Egyptian_Hieroglyphs:"egyp",Elbasan:"elba",Ethiopic:"ethi",Georgian:"geor",Glagolitic:"glag",Gothic:"goth",Grantha:"gran",Greek:"grek",Gujarati:["gjr2","gujr"],Gurmukhi:["gur2","guru"],Hangul:"hang",Han:"hani",Hanunoo:"hano",Hebrew:"hebr",Hiragana:"hira",Pahawh_Hmong:"hmng",Katakana_Or_Hiragana:"hrkt",Old_Italic:"ital",Javanese:"java",Kayah_Li:"kali",Katakana:"kana",Kharoshthi:"khar",Khmer:"khmr",Khojki:"khoj",Kannada:["knd2","knda"],Kaithi:"kthi",Tai_Tham:"lana",Lao:"lao ",Latin:"latn",Lepcha:"lepc",Limbu:"limb",Linear_A:"lina",Linear_B:"linb",Lisu:"lisu",Lycian:"lyci",Lydian:"lydi",Mahajani:"mahj",Mandaic:"mand",Manichaean:"mani",Mende_Kikakui:"mend",Meroitic_Cursive:"merc",Meroitic_Hieroglyphs:"mero",Malayalam:["mlm2","mlym"],Modi:"modi",Mongolian:"mong",Mro:"mroo",Meetei_Mayek:"mtei",Myanmar:["mym2","mymr"],Old_North_Arabian:"narb",Nabataean:"nbat",Nko:"nko ",Ogham:"ogam",Ol_Chiki:"olck",Old_Turkic:"orkh",Oriya:["ory2","orya"],Osmanya:"osma",Palmyrene:"palm",Pau_Cin_Hau:"pauc",Old_Permic:"perm",Phags_Pa:"phag",Inscriptional_Pahlavi:"phli",Psalter_Pahlavi:"phlp",Phoenician:"phnx",Miao:"plrd",Inscriptional_Parthian:"prti",Rejang:"rjng",Runic:"runr",Samaritan:"samr",Old_South_Arabian:"sarb",Saurashtra:"saur",Shavian:"shaw",Sharada:"shrd",Siddham:"sidd",Khudawadi:"sind",Sinhala:"sinh",Sora_Sompeng:"sora",Sundanese:"sund",Syloti_Nagri:"sylo",Syriac:"syrc",Tagbanwa:"tagb",Takri:"takr",Tai_Le:"tale",New_Tai_Lue:"talu",Tamil:["tml2","taml"],Tai_Viet:"tavt",Telugu:["tel2","telu"],Tifinagh:"tfng",Tagalog:"tglg",Thaana:"thaa",Thai:"thai",Tibetan:"tibt",Tirhuta:"tirh",Ugaritic:"ugar",Vai:"vai ",Warang_Citi:"wara",Old_Persian:"xpeo",Cuneiform:"xsux",Yi:"yi ",Inherited:"zinh",Common:"zyyy",Unknown:"zzzz"},mT={};for(let e in Hx){let t=Hx[e];if(Array.isArray(t))for(let r of t)mT[r]=e;else mT[t]=e}function nnt(e){return mT[e]}function int(e){let t=e.length,r=0;for(;r[TA[e].code,TA[e][t]],VI={rlig:ur("ligatures","requiredLigatures"),clig:ur("ligatures","contextualLigatures"),dlig:ur("ligatures","rareLigatures"),hlig:ur("ligatures","historicalLigatures"),liga:ur("ligatures","commonLigatures"),hist:ur("ligatures","historicalLigatures"),smcp:ur("lowerCase","lowerCaseSmallCaps"),pcap:ur("lowerCase","lowerCasePetiteCaps"),frac:ur("fractions","diagonalFractions"),dnom:ur("fractions","diagonalFractions"),numr:ur("fractions","diagonalFractions"),afrc:ur("fractions","verticalFractions"),case:ur("caseSensitiveLayout","caseSensitiveLayout"),ccmp:ur("unicodeDecomposition","canonicalComposition"),cpct:ur("CJKVerticalRomanPlacement","CJKVerticalRomanCentered"),valt:ur("CJKVerticalRomanPlacement","CJKVerticalRomanCentered"),swsh:ur("contextualAlternates","swashAlternates"),cswh:ur("contextualAlternates","contextualSwashAlternates"),curs:ur("cursiveConnection","cursive"),c2pc:ur("upperCase","upperCasePetiteCaps"),c2sc:ur("upperCase","upperCaseSmallCaps"),init:ur("smartSwash","wordInitialSwashes"),fin2:ur("smartSwash","wordFinalSwashes"),medi:ur("smartSwash","nonFinalSwashes"),med2:ur("smartSwash","nonFinalSwashes"),fin3:ur("smartSwash","wordFinalSwashes"),fina:ur("smartSwash","wordFinalSwashes"),pkna:ur("kanaSpacing","proportionalKana"),half:ur("textSpacing","halfWidthText"),halt:ur("textSpacing","altHalfWidthText"),hkna:ur("alternateKana","alternateHorizKana"),vkna:ur("alternateKana","alternateVertKana"),ital:ur("italicCJKRoman","CJKItalicRoman"),lnum:ur("numberCase","upperCaseNumbers"),onum:ur("numberCase","lowerCaseNumbers"),mgrk:ur("mathematicalExtras","mathematicalGreek"),calt:ur("contextualAlternates","contextualAlternates"),vrt2:ur("verticalSubstitution","substituteVerticalForms"),vert:ur("verticalSubstitution","substituteVerticalForms"),tnum:ur("numberSpacing","monospacedNumbers"),pnum:ur("numberSpacing","proportionalNumbers"),sups:ur("verticalPosition","superiors"),subs:ur("verticalPosition","inferiors"),ordn:ur("verticalPosition","ordinals"),pwid:ur("textSpacing","proportionalText"),hwid:ur("textSpacing","halfWidthText"),qwid:ur("textSpacing","quarterWidthText"),twid:ur("textSpacing","thirdWidthText"),fwid:ur("textSpacing","proportionalText"),palt:ur("textSpacing","altProportionalText"),trad:ur("characterShape","traditionalCharacters"),smpl:ur("characterShape","simplifiedCharacters"),jp78:ur("characterShape","JIS1978Characters"),jp83:ur("characterShape","JIS1983Characters"),jp90:ur("characterShape","JIS1990Characters"),jp04:ur("characterShape","JIS2004Characters"),expt:ur("characterShape","expertCharacters"),hojo:ur("characterShape","hojoCharacters"),nlck:ur("characterShape","NLCCharacters"),tnam:ur("characterShape","traditionalNamesCharacters"),ruby:ur("rubyKana","rubyKana"),titl:ur("styleOptions","titlingCaps"),zero:ur("typographicExtras","slashedZero"),ss01:ur("stylisticAlternatives","stylisticAltOne"),ss02:ur("stylisticAlternatives","stylisticAltTwo"),ss03:ur("stylisticAlternatives","stylisticAltThree"),ss04:ur("stylisticAlternatives","stylisticAltFour"),ss05:ur("stylisticAlternatives","stylisticAltFive"),ss06:ur("stylisticAlternatives","stylisticAltSix"),ss07:ur("stylisticAlternatives","stylisticAltSeven"),ss08:ur("stylisticAlternatives","stylisticAltEight"),ss09:ur("stylisticAlternatives","stylisticAltNine"),ss10:ur("stylisticAlternatives","stylisticAltTen"),ss11:ur("stylisticAlternatives","stylisticAltEleven"),ss12:ur("stylisticAlternatives","stylisticAltTwelve"),ss13:ur("stylisticAlternatives","stylisticAltThirteen"),ss14:ur("stylisticAlternatives","stylisticAltFourteen"),ss15:ur("stylisticAlternatives","stylisticAltFifteen"),ss16:ur("stylisticAlternatives","stylisticAltSixteen"),ss17:ur("stylisticAlternatives","stylisticAltSeventeen"),ss18:ur("stylisticAlternatives","stylisticAltEighteen"),ss19:ur("stylisticAlternatives","stylisticAltNineteen"),ss20:ur("stylisticAlternatives","stylisticAltTwenty")};for(let e=1;e<=99;e++)VI[`cv${`00${e}`.slice(-2)}`]=[TA.characterAlternatives.code,e];let PA={};for(let e in VI){let t=VI[e];PA[t[0]]==null&&(PA[t[0]]={}),PA[t[0]][t[1]]=e}function cnt(e){let t={};for(let r in e){let n;(n=VI[r])&&(t[n[0]]==null&&(t[n[0]]={}),t[n[0]][n[1]]=e[r])}return t}function ZG(e){let[t,r]=e;if(isNaN(t))var n=TA[t]&&TA[t].code;else var n=t;if(isNaN(r))var i=TA[t]&&TA[t][r];else var i=r;return[n,i]}function unt(e){let t={};if(Array.isArray(e))for(let r=0;r>1,n=this.table.segments[r];if(n.firstGlyph===65535)return null;if(tn.lastGlyph)i=r+1;else return this.table.version===2?n.value:n.values[t-n.firstGlyph]}return null}case 6:{let i=0,a=this.table.binarySearchHeader.nUnits-1;for(;i<=a;){var r=i+a>>1,n=this.table.segments[r];if(n.glyph===65535)return null;if(tn.glyph)i=r+1;else return n.value}return null}case 8:return this.table.values[t-this.table.firstGlyph];default:throw new Error(`Unknown lookup table format: ${this.table.version}`)}}glyphsForValue(t){let r=[];switch(this.table.version){case 2:case 4:for(let n of this.table.segments)if(this.table.version===2&&n.value===t)r.push(...Hv(n.firstGlyph,n.lastGlyph+1));else for(let i=0;i=-1;){let l=null,c=XG,u=!0;a===t.length||a===-1?c=JG:(l=t[a],l.id===65535?c=eq:(c=this.lookupTable.lookup(l.id),c==null&&(c=XG)));let f=this.stateTable.stateArray.getItem(i)[c],m=this.stateTable.entryTable.getItem(f);c!==JG&&c!==eq&&(n(l,m,a),u=!(m.flags&fnt)),i=m.newState,u&&(a+=s)}return t}traverse(t,r=0,n=new Set){if(n.has(r))return;n.add(r);let{nClasses:i,stateArray:a,entryTable:s}=this.stateTable,l=a.getItem(r);for(let c=4;c=0;)t[n].id===65535&&t.splice(n,1),n--;return t}processSubtable(t,r){if(this.subtable=t,this.glyphs=r,this.subtable.type===4){this.processNoncontextualSubstitutions(this.subtable,this.glyphs);return}this.ligatureStack=[],this.markedGlyph=null,this.firstGlyph=null,this.lastGlyph=null,this.markedIndex=null;let n=this.getStateMachine(t),i=this.getProcessor(),a=!!(this.subtable.coverage&rq);return n.process(this.glyphs,a,i)}getStateMachine(t){return new hnt(t.table.stateTable)}getProcessor(){switch(this.subtable.type){case 0:return this.processIndicRearragement;case 1:return this.processContextualSubstitution;case 2:return this.processLigature;case 4:return this.processNoncontextualSubstitutions;case 5:return this.processGlyphInsertion;default:throw new Error(`Invalid morx subtable type: ${this.subtable.type}`)}}processIndicRearragement(t,r,n){r.flags&mnt&&(this.firstGlyph=n),r.flags&pnt&&(this.lastGlyph=n),Snt(this.glyphs,r.flags&gnt,this.firstGlyph,this.lastGlyph)}processContextualSubstitution(t,r,n){let i=this.subtable.table.substitutionTable.items;if(r.markIndex!==65535){let s=i.getItem(r.markIndex),l=new B2(s);t=this.glyphs[this.markedGlyph];var a=l.lookup(t.id);a&&(this.glyphs[this.markedGlyph]=this.font.getGlyph(a,t.codePoints))}if(r.currentIndex!==65535){let s=i.getItem(r.currentIndex),l=new B2(s);t=this.glyphs[n];var a=l.lookup(t.id);a&&(this.glyphs[n]=this.font.getGlyph(a,t.codePoints))}r.flags&tq&&(this.markedGlyph=n)}processLigature(t,r,n){if(r.flags&Ant&&this.ligatureStack.push(n),r.flags&vnt){let i=this.subtable.table.ligatureActions,a=this.subtable.table.components,s=this.subtable.table.ligatureList,l=r.action,c=!1,u=0,d=[],f=[];for(;!c;){let m=this.ligatureStack.pop();d.unshift(...this.glyphs[m].codePoints);let g=i.getItem(l++);c=!!(g&xnt);let A=!!(g&ynt),v=(g&bnt)<<2>>2;v+=this.glyphs[m].id;let b=a.getItem(v);if(u+=b,c||A){let E=s.getItem(u);this.glyphs[m]=this.font.getGlyph(E,d),f.push(m),u=0,d=[]}else this.glyphs[m]=this.font.getGlyph(65535)}this.ligatureStack.push(...f)}}processNoncontextualSubstitutions(t,r,n){let i=new B2(t.table.lookupTable);for(n=0;n>>5,a=!!(r.flags&Ent);this._insertGlyphs(this.markedIndex,r.markedInsertIndex,i,a)}if(r.currentInsertIndex!==65535){let i=(r.flags&Cnt)>>>5,a=!!(r.flags&wnt);this._insertGlyphs(n,r.currentInsertIndex,i,a)}}getSupportedFeatures(){let t=[];for(let r of this.morx.chains)for(let n of r.features)t.push([n.featureType,n.featureSetting]);return t}generateInputs(t){return this.inputCache||this.generateInputCache(),this.inputCache[t]||[]}generateInputCache(){this.inputCache={};for(let t of this.morx.chains){let r=t.defaultFlags;for(let n of t.subtables)n.subFeatureFlags&r&&this.generateInputsForSubtable(n)}}generateInputsForSubtable(t){if(t.type!==2)return;if(!!(t.coverage&rq))throw new Error("Reverse subtable, not supported.");this.subtable=t,this.ligatureStack=[];let n=this.getStateMachine(t),i=this.getProcessor(),a=[],s=[];this.glyphs=[],n.traverse({enter:(l,c)=>{let u=this.glyphs;s.push({glyphs:u.slice(),ligatureStack:this.ligatureStack.slice()});let d=this.font.getGlyph(l);a.push(d),u.push(a[a.length-1]),i(u[u.length-1],c,u.length-1);let f=0,m=0;for(let g=0;gv.id),A=this.inputCache[m];A?A.push(g):this.inputCache[m]=[g]}},exit:()=>{({glyphs:this.glyphs,ligatureStack:this.ligatureStack}=s.pop()),a.pop()}})}constructor(t){this.processIndicRearragement=this.processIndicRearragement.bind(this),this.processContextualSubstitution=this.processContextualSubstitution.bind(this),this.processLigature=this.processLigature.bind(this),this.processNoncontextualSubstitutions=this.processNoncontextualSubstitutions.bind(this),this.processGlyphInsertion=this.processGlyphInsertion.bind(this),this.font=t,this.morx=t.morx,this.inputCache=null}}Ql([Ll],vme.prototype,"getStateMachine",null);function mc(e,t,r,n=!1,i=!1){let a=e.splice(r[0]-(r[1]-1),r[1]);i&&a.reverse();let s=e.splice(t[0],t[1],...a);return n&&s.reverse(),e.splice(r[0]-(t[1]-1),0,...s),e}function Snt(e,t,r,n){switch(t){case 0:return e;case 1:return mc(e,[r,1],[n,0]);case 2:return mc(e,[r,0],[n,1]);case 3:return mc(e,[r,1],[n,1]);case 4:return mc(e,[r,2],[n,0]);case 5:return mc(e,[r,2],[n,0],!0,!1);case 6:return mc(e,[r,0],[n,2]);case 7:return mc(e,[r,0],[n,2],!1,!0);case 8:return mc(e,[r,1],[n,2]);case 9:return mc(e,[r,1],[n,2],!1,!0);case 10:return mc(e,[r,2],[n,1]);case 11:return mc(e,[r,2],[n,1],!0,!1);case 12:return mc(e,[r,2],[n,2]);case 13:return mc(e,[r,2],[n,2],!0,!1);case 14:return mc(e,[r,2],[n,2],!1,!0);case 15:return mc(e,[r,2],[n,2],!0,!0);default:throw new Error(`Unknown verb: ${t}`)}}class Bnt{substitute(t){t.direction==="rtl"&&t.glyphs.reverse(),this.morxProcessor.process(t.glyphs,cnt(t.features))}getAvailableFeatures(t,r){return unt(this.morxProcessor.getSupportedFeatures())}stringsForGlyph(t){let r=this.morxProcessor.generateInputs(t),n=new Set;for(let i of r)this._addStrings(i,0,n,"");return n}_addStrings(t,r,n,i){let a=this.font._cmapProcessor.codePointsForGlyph(t[r]);for(let s of a){let l=i+String.fromCodePoint(s);r0&&t.applyFeatures(i,r,n)}constructor(t,r,n){this.font=t,this.script=r,this.direction=n,this.stages=[],this.globalFeatures={},this.allFeatures={}}}const knt=["rvrn"],_nt=["ccmp","locl","rlig","mark","mkmk"],jnt=["frac","numr","dnom"],Dnt=["calt","clig","liga","rclt","curs","kern"],Tnt={ltr:["ltra","ltrm"],rtl:["rtla","rtlm"]};class pg{static plan(t,r,n){this.planPreprocessing(t),this.planFeatures(t),this.planPostprocessing(t,n),t.assignGlobalFeatures(r),this.assignFeatures(t,r)}static planPreprocessing(t){t.add({global:[...knt,...Tnt[t.direction]],local:jnt})}static planFeatures(t){}static planPostprocessing(t,r){t.add([..._nt,...Dnt]),t.setFeatureOverrides(r)}static assignFeatures(t,r){for(let n=0;n0&&cT(r[a-1].codePoints[0]);)r[a-1].features.numr=!0,r[a-1].features.frac=!0,a--;for(;sthis.index||this.index>=this.glyphs.length?null:this.glyphs[this.index]}next(){return this.move(1)}prev(){return this.move(-1)}peek(t=1){let r=this.index,n=this.increment(t);return this.index=r,n}peekIndex(t=1){let r=this.index;this.increment(t);let n=this.index;return this.index=r,n}increment(t=1){let r=t<0?-1:1;for(t=Math.abs(t);t--;)this.move(r);return this.glyphs[this.index]}constructor(t,r){this.glyphs=t,this.reset(r)}}const Qnt=["DFLT","dflt","latn"];class YI{findScript(t){if(this.table.scriptList==null)return null;Array.isArray(t)||(t=[t]);for(let r of t)for(let n of this.table.scriptList)if(n.tag===r)return n;return null}selectScript(t,r,n){let i=!1,a;if(!this.script||t!==this.scriptTag){if(a=this.findScript(t),a||(a=this.findScript(Qnt)),!a)return this.scriptTag;this.scriptTag=a.tag,this.script=a.script,this.language=null,this.languageTag=null,i=!0}if((!n||n!==this.direction)&&(this.direction=n||Ame(t)),r&&r.length<4&&(r+=" ".repeat(4-r.length)),!r||r!==this.languageTag){this.language=null;for(let s of this.script.langSysRecords)if(s.tag===r){this.language=s.langSys,this.languageTag=s.tag;break}this.language||(this.language=this.script.defaultLangSys,this.languageTag=null),i=!0}if(i&&(this.features={},this.language))for(let s of this.language.featureIndexes){let l=this.table.featureList[s],c=this.substituteFeatureForVariations(s);this.features[l.tag]=c||l.feature}return this.scriptTag}lookupsForFeatures(t=[],r){let n=[];for(let i of t){let a=this.features[i];if(a)for(let s of a.lookupListIndexes)r&&r.indexOf(s)!==-1||n.push({feature:i,index:s,lookup:this.table.lookupList.get(s)})}return n.sort((i,a)=>i.index-a.index),n}substituteFeatureForVariations(t){if(this.variationsIndex===-1)return null;let n=this.table.featureVariations.featureVariationRecords[this.variationsIndex].featureTableSubstitution.substitutions;for(let i of n)if(i.featureIndex===t)return i.alternateFeatureTable;return null}findVariationsIndex(t){let r=this.table.featureVariations;if(!r)return-1;let n=r.featureVariationRecords;for(let i=0;i{let i=n.axisIndexn===i.id)}sequenceMatchIndices(t,r){return this.match(t,r,(n,i)=>this.currentFeature in i.features?n===i.id:!1,[])}coverageSequenceMatches(t,r){return this.match(t,r,(n,i)=>this.coverageIndex(n,i.id)>=0)}getClassID(t,r){switch(r.version){case 1:let n=t-r.startGlyph;if(n>=0&&ni===this.getClassID(a.id,n))}applyContext(t){let r,n;switch(t.version){case 1:if(r=this.coverageIndex(t.coverage),r===-1)return!1;n=t.ruleSets[r];for(let i of n)if(this.sequenceMatches(1,i.input))return this.applyLookupList(i.lookupRecords);break;case 2:if(this.coverageIndex(t.coverage)===-1||(r=this.getClassID(this.glyphIterator.cur.id,t.classDef),r===-1))return!1;n=t.classSet[r];for(let i of n)if(this.classSequenceMatches(1,i.classes,t.classDef))return this.applyLookupList(i.lookupRecords);break;case 3:if(this.coverageSequenceMatches(0,t.coverages))return this.applyLookupList(t.lookupRecords);break}return!1}applyChainingContext(t){let r;switch(t.version){case 1:if(r=this.coverageIndex(t.coverage),r===-1)return!1;let n=t.chainRuleSets[r];for(let a of n)if(this.sequenceMatches(-a.backtrack.length,a.backtrack)&&this.sequenceMatches(1,a.input)&&this.sequenceMatches(1+a.input.length,a.lookahead))return this.applyLookupList(a.lookupRecords);break;case 2:if(this.coverageIndex(t.coverage)===-1)return!1;r=this.getClassID(this.glyphIterator.cur.id,t.inputClassDef);let i=t.chainClassSet[r];if(!i)return!1;for(let a of i)if(this.classSequenceMatches(-a.backtrack.length,a.backtrack,t.backtrackClassDef)&&this.classSequenceMatches(1,a.input,t.inputClassDef)&&this.classSequenceMatches(1+a.input.length,a.lookahead,t.lookaheadClassDef))return this.applyLookupList(a.lookupRecords);break;case 3:if(this.coverageSequenceMatches(-t.backtrackGlyphCount,t.backtrackCoverage)&&this.coverageSequenceMatches(0,t.inputCoverage)&&this.coverageSequenceMatches(t.inputGlyphCount,t.lookaheadCoverage))return this.applyLookupList(t.lookupRecords);break}return!1}constructor(t,r){this.font=t,this.table=r,this.script=null,this.scriptTag=null,this.language=null,this.languageTag=null,this.features={},this.lookups={},this.variationsIndex=t._variationProcessor?this.findVariationsIndex(t._variationProcessor.normalizedCoords):-1,this.selectScript(),this.glyphs=[],this.positions=[],this.ligatureID=1,this.currentFeature=null}}class Ld{get id(){return this._id}set id(t){this._id=t,this.substituted=!0;let r=this._font.GDEF;if(r&&r.glyphClassDef){let n=YI.prototype.getClassID(t,r.glyphClassDef);this.isBase=n===1,this.isLigature=n===2,this.isMark=n===3,this.markAttachmentType=r.markAttachClassDef?YI.prototype.getClassID(t,r.markAttachClassDef):0}else this.isMark=this.codePoints.length>0&&this.codePoints.every(nF),this.isBase=!this.isMark,this.isLigature=this.codePoints.length>1,this.markAttachmentType=0}copy(){return new Ld(this._font,this.id,this.codePoints,this.features)}constructor(t,r,n=[],i){if(this._font=t,this.codePoints=n,this.id=r,this.features={},Array.isArray(i))for(let a=0;a4352<=e&&e<=4447||43360<=e&&e<=43388,Gnt=e=>4448<=e&&e<=4519||55216<=e&&e<=55238,qnt=e=>4520<=e&&e<=4607||55243<=e&&e<=55291,Knt=e=>12334<=e&&e<=12335,Vnt=e=>Wx<=e&&e<=yme,Ynt=e=>e-WxY6<=e&&e<=$nt,Jnt=e=>Z6<=e&&e<=znt,Xnt=e=>1<=e&&e<=Hnt,eit=0,tit=1,JI=2,cF=3,XI=4,bme=5,rit=6;function e3(e){return Wnt(e)?tit:Gnt(e)?JI:qnt(e)?cF:Ynt(e)?XI:Vnt(e)?bme:Knt(e)?rit:eit}const Wc=0,Gh=1,gT=2,AT=4,vT=5,nit=[[[Wc,0],[Wc,1],[Wc,0],[Wc,0],[Gh,2],[Gh,3],[vT,0]],[[Wc,0],[Wc,1],[gT,2],[Wc,0],[Gh,2],[Gh,3],[vT,0]],[[Wc,0],[Wc,1],[Wc,0],[gT,3],[Gh,2],[Gh,3],[AT,0]],[[Wc,0],[Wc,1],[Wc,0],[Wc,0],[Gh,2],[Gh,3],[AT,0]]];function N2(e,t,r){return new Ld(e,e.glyphForCodePoint(t).id,[t],r)}function wme(e,t,r){let n=e[t],a=n.codePoints[0]-Wx,s=VA+a%bb;a=a/bb|0;let l=Y6+a/ZI|0,c=Z6+a%ZI;if(!r.hasGlyphForCodePoint(l)||!r.hasGlyphForCodePoint(c)||s!==VA&&!r.hasGlyphForCodePoint(s))return t;let u=N2(r,l,n.features);u.features.ljmo=!0;let d=N2(r,c,n.features);d.features.vjmo=!0;let f=[u,d];if(s>VA){let m=N2(r,s,n.features);m.features.tjmo=!0,f.push(m)}return e.splice(t,1,...f),t+f.length-1}function iit(e,t,r){let n=e[t],i=e[t].codePoints[0],a=e3(i),s=e[t-1].codePoints[0],l=e3(s),c,u,d,f;if(l===XI&&a===cF)c=s,f=n;else{a===JI?(u=e[t-1],d=n):(u=e[t-2],d=e[t-1],f=n);let g=u.codePoints[0],A=d.codePoints[0];Znt(g)&&Jnt(A)&&(c=Wx+((g-Y6)*ZI+(A-Z6))*bb)}let m=f&&f.codePoints[0]||VA;if(c!=null&&(m===VA||Xnt(m))){let g=c+(m-VA);if(r.hasGlyphForCodePoint(g)){let A=l===JI?3:2;return e.splice(t-A+1,A,N2(r,g,n.features)),t-A+1}}return u&&(u.features.ljmo=!0),d&&(d.features.vjmo=!0),f&&(f.features.tjmo=!0),l===XI?(wme(e,t-1,r),t+1):t}function ait(e){switch(e3(e)){case XI:case bme:return 1;case JI:return 2;case cF:return 3}}function sit(e,t,r){let n=e[t],i=e[t].codePoints[0];if(r.glyphForCodePoint(i).advanceWidth===0)return;let a=e[t-1].codePoints[0],s=ait(a);return e.splice(t,1),e.splice(t-s,0,n)}function oit(e,t,r){let n=e[t],i=e[t].codePoints[0];if(r.hasGlyphForCodePoint(iq)){let a=N2(r,iq,n.features),s=r.glyphForCodePoint(i).advanceWidth===0?t:t+1;e.splice(s,0,a),t++}return t}var Eme={};Eme=JSON.parse('{"stateTable":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,14,15,16,17],[0,0,0,18,19,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,28,29,30,31,32,33,0,34,0,0,35,36,0,0,37,0],[0,0,0,38,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,39,0,0,0,40,41,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,12,43,0,0,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,0,43,0,0,0,0],[0,0,0,45,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,50,0,0,51,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0],[0,0,0,53,54,55,56,57,58,0,59,0,0,60,61,0,0,62,0],[0,0,0,4,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,63,64,0,0,40,41,0,9,0,10,0,0,0,42,0,63,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,0,2,16,0],[0,0,0,18,65,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,0,0],[0,0,0,69,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,73,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,75,0,0,0,76,77,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,25,79,0,0,0,0],[0,0,0,18,19,20,74,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,81,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,86,0,0,87,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,88,0,0,0,0,0,0,0,0],[0,0,0,18,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,89,90,0,0,76,77,0,23,0,24,0,0,0,78,0,89,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,0,0],[0,0,0,94,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,96,0,0,0,97,98,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,35,100,0,0,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,102,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,107,0,0,108,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0],[0,0,0,28,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,110,111,0,0,97,98,0,33,0,34,0,0,0,99,0,110,0,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,0,0],[0,0,0,0,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,0,0,115,116,117,118,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,39,0,122,0,123,123,8,9,0,10,0,0,0,42,0,39,0,0],[0,124,64,0,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0],[0,39,0,0,0,121,125,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,126,126,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,47,47,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,128,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,129,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,50,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,134,0,0,0,0,0,0,0,0],[0,0,0,135,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,136,0,0,0,137,138,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,60,140,0,0,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,0,140,0,0,0,0],[0,0,0,142,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,147,0,0,148,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0],[0,0,0,53,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,150,151,0,0,137,138,0,58,0,59,0,0,0,139,0,150,0,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,0,0],[0,0,0,155,116,156,157,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,75,3,4,5,159,160,8,161,0,162,0,11,12,163,0,75,16,0],[0,0,0,0,0,40,164,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,0,165,0,0,0,0],[0,124,64,0,0,40,164,0,9,0,10,0,0,0,42,0,124,0,0],[0,0,0,0,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,167,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,168,0,0,0,0,0,0,0,0],[0,0,0,0,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,0,79,0,0,0,0],[0,0,0,169,170,171,172,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,75,0,176,0,177,177,22,23,0,24,0,0,0,78,0,75,0,0],[0,178,90,0,0,0,0,0,0,0,0,0,0,0,0,0,178,0,0],[0,75,0,0,0,175,179,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,180,180,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,83,83,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,182,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,183,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,86,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,188,0,0,0,0,0,0,0,0],[0,0,0,189,170,190,191,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,76,193,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,0,194,0,0,0,0],[0,178,90,0,0,76,193,0,23,0,24,0,0,0,78,0,178,0,0],[0,0,0,0,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,195,196,197,198,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,96,0,202,0,203,203,32,33,0,34,0,0,0,99,0,96,0,0],[0,204,111,0,0,0,0,0,0,0,0,0,0,0,0,0,204,0,0],[0,96,0,0,0,201,205,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,206,206,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,104,104,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,208,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,209,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,107,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,0,0,0],[0,0,0,215,196,216,217,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,97,219,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,0,220,0,0,0,0],[0,204,111,0,0,97,219,0,33,0,34,0,0,0,99,0,204,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,223,0,0,0,40,224,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,119,225,0,0,0,0],[0,0,0,115,116,117,222,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,115,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,226,64,0,0,40,224,0,9,0,10,0,0,0,42,0,226,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,39,0,0,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,44,44,8,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,227,0,228,229,0,9,0,10,0,0,230,0,0,0,0,0],[0,39,0,122,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,231,231,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,232,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,131,131,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,234,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,235,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,0,0,240,241,242,243,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,136,0,247,0,248,248,57,58,0,59,0,0,0,139,0,136,0,0],[0,249,151,0,0,0,0,0,0,0,0,0,0,0,0,0,249,0,0],[0,136,0,0,0,246,250,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,251,251,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,144,144,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,253,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,254,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,147,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,259,0,0,0,0,0,0,0,0],[0,0,0,260,241,261,262,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,137,264,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,0,265,0,0,0,0],[0,249,151,0,0,137,264,0,58,0,59,0,0,0,139,0,249,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,158,225,0,0,0,0],[0,0,0,155,116,156,222,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,155,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,43,266,266,8,161,0,24,0,0,12,267,0,0,0,0],[0,75,0,176,43,268,268,269,161,0,24,0,0,0,267,0,75,0,0],[0,0,0,0,0,270,0,0,271,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,272,0,0,0,0,0,0,0,0],[0,273,274,0,0,40,41,0,9,0,10,0,0,0,42,0,273,0,0],[0,0,0,40,0,123,123,8,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,121,275,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,276,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,279,0,0,0,76,280,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,173,281,0,0,0,0],[0,0,0,169,170,171,278,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,169,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,282,90,0,0,76,280,0,23,0,24,0,0,0,78,0,282,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,75,0,0,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,80,80,22,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,283,0,284,285,0,23,0,24,0,0,286,0,0,0,0,0],[0,75,0,176,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,287,287,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,185,185,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,290,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,291,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,192,281,0,0,0,0],[0,0,0,189,170,190,278,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,189,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,76,0,177,177,22,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,175,296,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,299,0,0,0,97,300,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,199,301,0,0,0,0],[0,0,0,195,196,197,298,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,195,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,302,111,0,0,97,300,0,33,0,34,0,0,0,99,0,302,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,96,0,0,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,101,101,32,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,303,0,304,305,0,33,0,34,0,0,306,0,0,0,0,0],[0,96,0,202,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,307,307,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,308,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,211,211,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,310,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,311,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,218,301,0,0,0,0],[0,0,0,215,196,216,298,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,215,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,97,0,203,203,32,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,201,316,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,0,225,0,0,0,0],[0,0,0,317,318,319,320,8,9,0,10,0,0,321,322,0,0,16,0],[0,223,0,323,0,123,123,8,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,0,0,121,324,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,325,318,326,327,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,64,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,230,0,0,0,0,0],[0,0,0,227,0,228,121,0,9,0,10,0,0,230,0,0,0,0,0],[0,0,0,227,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,0,0],[0,0,0,0,0,329,329,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,330,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,237,237,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,332,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,333,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,337,0,0,0,137,338,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,244,339,0,0,0,0],[0,0,0,240,241,242,336,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,240,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,340,151,0,0,137,338,0,58,0,59,0,0,0,139,0,340,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,136,0,0,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,141,141,57,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,341,0,342,343,0,58,0,59,0,0,344,0,0,0,0,0],[0,136,0,247,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,345,345,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,346,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,256,256,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,348,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,349,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,263,339,0,0,0,0],[0,0,0,260,241,261,336,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,260,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,137,0,248,248,57,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,246,354,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,126,126,8,23,0,0,0,0,0,0,0,0,0,0],[0,355,90,0,0,121,125,0,9,0,10,0,0,0,42,0,355,0,0],[0,0,0,0,0,356,356,269,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,357,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,270,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,363,0,0,0,0,0,0,0,0],[0,0,0,364,116,365,366,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,40,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,0,281,0,0,0,0],[0,0,0,369,370,371,372,22,23,0,24,0,0,373,374,0,0,27,0],[0,279,0,375,0,177,177,22,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,0,0,175,376,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,377,370,378,379,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,90,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,286,0,0,0,0,0],[0,0,0,283,0,284,175,0,23,0,24,0,0,286,0,0,0,0,0],[0,0,0,283,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,0],[0,0,0,0,0,381,381,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,382,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,293,293,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,384,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,385,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,76,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,0,301,0,0,0,0],[0,0,0,387,388,389,390,32,33,0,34,0,0,391,392,0,0,37,0],[0,299,0,393,0,203,203,32,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,0,0,201,394,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,395,388,396,397,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,111,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,306,0,0,0,0,0],[0,0,0,303,0,304,201,0,33,0,34,0,0,306,0,0,0,0,0],[0,0,0,303,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,103,0,0],[0,0,0,0,0,399,399,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,400,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,313,313,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,402,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,403,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,97,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,407,0,0,0,40,408,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,321,409,0,0,0,0],[0,0,0,317,318,319,406,8,9,0,10,0,0,321,322,0,0,16,0],[0,0,0,317,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,410,64,0,0,40,408,0,9,0,10,0,0,0,42,0,410,0,0],[0,223,0,0,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,323,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,328,409,0,0,0,0],[0,0,0,325,318,326,406,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,325,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,0,0,0,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0],[0,0,0,0,0,411,411,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,412,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,413,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,0,339,0,0,0,0],[0,0,0,414,415,416,417,57,58,0,59,0,0,418,419,0,0,62,0],[0,337,0,420,0,248,248,57,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,0,0,246,421,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,422,415,423,424,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,151,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,344,0,0,0,0,0],[0,0,0,341,0,342,246,0,58,0,59,0,0,344,0,0,0,0,0],[0,0,0,341,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,0,0],[0,0,0,0,0,426,426,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,427,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,351,351,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,429,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,430,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,137,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,432,116,433,434,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,0,0,180,180,269,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,359,359,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,437,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,438,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,443,274,0,0,0,0,0,0,0,0,0,0,0,0,0,443,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,367,225,0,0,0,0],[0,0,0,364,116,365,445,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,364,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,448,0,0,0,76,449,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,373,450,0,0,0,0],[0,0,0,369,370,371,447,22,23,0,24,0,0,373,374,0,0,27,0],[0,0,0,369,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,451,90,0,0,76,449,0,23,0,24,0,0,0,78,0,451,0,0],[0,279,0,0,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,375,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,380,450,0,0,0,0],[0,0,0,377,370,378,447,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,377,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,0,0,0,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,0,0],[0,0,0,0,0,452,452,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,453,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,454,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,457,0,0,0,97,458,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,391,459,0,0,0,0],[0,0,0,387,388,389,456,32,33,0,34,0,0,391,392,0,0,37,0],[0,0,0,387,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,460,111,0,0,97,458,0,33,0,34,0,0,0,99,0,460,0,0],[0,299,0,0,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,393,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,398,459,0,0,0,0],[0,0,0,395,388,396,456,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,395,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,0,0,0,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0],[0,0,0,0,0,461,461,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,462,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,463,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,0,409,0,0,0,0],[0,0,0,464,465,466,467,8,9,0,10,0,0,468,469,0,0,16,0],[0,407,0,470,0,123,123,8,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,0,0,121,471,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,472,465,473,474,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,0,0,0,0,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,0,0],[0,0,0,0,0,0,476,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,479,0,0,0,137,480,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,418,481,0,0,0,0],[0,0,0,414,415,416,478,57,58,0,59,0,0,418,419,0,0,62,0],[0,0,0,414,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,482,151,0,0,137,480,0,58,0,59,0,0,0,139,0,482,0,0],[0,337,0,0,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,420,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,425,481,0,0,0,0],[0,0,0,422,415,423,478,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,422,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0],[0,0,0,0,0,483,483,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,484,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,485,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,435,225,0,0,0,0],[0,0,0,432,116,433,445,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,432,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,486,486,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,487,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,440,440,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,489,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,490,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,495,0,496,497,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,0,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,0,225,0,0,0,0],[0,0,0,0,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,0,450,0,0,0,0],[0,0,0,499,500,501,502,22,23,0,24,0,0,503,504,0,0,27,0],[0,448,0,505,0,177,177,22,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,0,0,175,506,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,507,500,508,509,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,0,0,0,0,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,0],[0,0,0,0,0,0,511,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,0,459,0,0,0,0],[0,0,0,512,513,514,515,32,33,0,34,0,0,516,517,0,0,37,0],[0,457,0,518,0,203,203,32,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,0,0,201,519,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,520,513,521,522,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,312,0,0],[0,0,0,0,0,0,524,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,527,0,0,0,40,528,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,468,529,0,0,0,0],[0,0,0,464,465,466,526,8,9,0,10,0,0,468,469,0,0,16,0],[0,0,0,464,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,530,64,0,0,40,528,0,9,0,10,0,0,0,42,0,530,0,0],[0,407,0,0,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,470,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,475,529,0,0,0,0],[0,0,0,472,465,473,526,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,472,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0],[0,0,0,0,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,0,481,0,0,0,0],[0,0,0,531,532,533,534,57,58,0,59,0,0,535,536,0,0,62,0],[0,479,0,537,0,248,248,57,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,0,0,246,538,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,539,532,540,541,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,0,0,0,0,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,350,0,0],[0,0,0,0,0,0,543,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,358,0,0],[0,0,0,0,0,544,544,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,545,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,492,492,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,547,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,548,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,274,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,498,0,0,0,0,0],[0,0,0,495,0,496,368,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,495,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,553,0,0,0,76,554,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,503,555,0,0,0,0],[0,0,0,499,500,501,552,22,23,0,24,0,0,503,504,0,0,27,0],[0,0,0,499,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,556,90,0,0,76,554,0,23,0,24,0,0,0,78,0,556,0,0],[0,448,0,0,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,505,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,510,555,0,0,0,0],[0,0,0,507,500,508,552,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,507,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,559,0,0,0,97,560,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,516,561,0,0,0,0],[0,0,0,512,513,514,558,32,33,0,34,0,0,516,517,0,0,37,0],[0,0,0,512,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,562,111,0,0,97,560,0,33,0,34,0,0,0,99,0,562,0,0],[0,457,0,0,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,518,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,523,561,0,0,0,0],[0,0,0,520,513,521,558,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,520,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0],[0,0,0,0,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,0,529,0,0,0,0],[0,0,0,563,66,564,565,8,9,0,10,0,0,566,68,0,0,16,0],[0,527,0,567,0,123,123,8,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,0,0,121,568,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,569,66,570,571,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,575,0,0,0,137,576,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,535,577,0,0,0,0],[0,0,0,531,532,533,574,57,58,0,59,0,0,535,536,0,0,62,0],[0,0,0,531,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,578,151,0,0,137,576,0,58,0,59,0,0,0,139,0,578,0,0],[0,479,0,0,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,537,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,542,577,0,0,0,0],[0,0,0,539,532,540,574,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,539,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,0,0],[0,0,0,0,0,0,0,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,439,0,0],[0,0,0,0,0,579,579,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,580,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,581,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,0,555,0,0,0,0],[0,0,0,582,91,583,584,22,23,0,24,0,0,585,93,0,0,27,0],[0,553,0,586,0,177,177,22,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,0,0,175,587,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,588,91,589,590,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,0,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,0,561,0,0,0,0],[0,0,0,592,112,593,594,32,33,0,34,0,0,595,114,0,0,37,0],[0,559,0,596,0,203,203,32,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,0,0,201,597,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,598,112,599,600,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,566,165,0,0,0,0],[0,0,0,563,66,564,67,8,9,0,10,0,0,566,68,0,0,16,0],[0,0,0,563,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,527,0,0,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,567,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,572,165,0,0,0,0],[0,0,0,569,66,570,67,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,569,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,0,577,0,0,0,0],[0,0,0,603,152,604,605,57,58,0,59,0,0,606,154,0,0,62,0],[0,575,0,607,0,248,248,57,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,0,0,246,608,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,609,152,610,611,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,0,0,0,0,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,491,0,0],[0,0,0,0,0,0,613,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,585,194,0,0,0,0],[0,0,0,582,91,583,92,22,23,0,24,0,0,585,93,0,0,27,0],[0,0,0,582,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,553,0,0,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,586,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,591,194,0,0,0,0],[0,0,0,588,91,589,92,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,588,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,595,220,0,0,0,0],[0,0,0,592,112,593,113,32,33,0,34,0,0,595,114,0,0,37,0],[0,0,0,592,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,559,0,0,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,596,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,601,220,0,0,0,0],[0,0,0,598,112,599,113,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,598,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,606,265,0,0,0,0],[0,0,0,603,152,604,153,57,58,0,59,0,0,606,154,0,0,62,0],[0,0,0,603,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,575,0,0,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,607,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,612,265,0,0,0,0],[0,0,0,609,152,610,153,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,609,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,549,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0]],"accepting":[false,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,false,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,false,false,true,false,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,false,false,true,true,false,false,true,true,true,false,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,false,false,false,false,false,false,false,true,true,false,false,true,true,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,false,true,true,false,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,false,true,true,true,true,true,false,true,true,false,true,true,true],"tags":[[],["broken_cluster"],["consonant_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["consonant_syllable"],["broken_cluster"],["symbol_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["broken_cluster"],["broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],[],["broken_cluster"],["symbol_cluster"],[],["symbol_cluster"],["symbol_cluster"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["symbol_cluster"],["symbol_cluster"],["symbol_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],["symbol_cluster"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],[],["broken_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],[],["consonant_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],[],["vowel_syllable"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],[],[],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],["standalone_cluster"],[],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],[],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],[],[],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],[],[],[],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],["consonant_syllable"],["vowel_syllable"],["standalone_cluster"]]}');var J6={};J6=JSON.parse('{"categories":["O","IND","S","GB","B","FM","CGJ","VMAbv","VMPst","VAbv","VPst","CMBlw","VPre","VBlw","H","VMBlw","CMAbv","MBlw","CS","R","SUB","MPst","MPre","FAbv","FPst","FBlw","null","SMAbv","SMBlw","VMPre","ZWNJ","ZWJ","WJ","M","VS","N","HN","MAbv"],"decompositions":{"2507":[2503,2494],"2508":[2503,2519],"2888":[2887,2902],"2891":[2887,2878],"2892":[2887,2903],"3018":[3014,3006],"3019":[3015,3006],"3020":[3014,3031],"3144":[3142,3158],"3264":[3263,3285],"3271":[3270,3285],"3272":[3270,3286],"3274":[3270,3266],"3275":[3270,3266,3285],"3402":[3398,3390],"3403":[3399,3390],"3404":[3398,3415],"3546":[3545,3530],"3548":[3545,3535],"3549":[3545,3535,3530],"3550":[3545,3551],"3635":[3661,3634],"3763":[3789,3762],"3955":[3953,3954],"3957":[3953,3956],"3958":[4018,3968],"3959":[4018,3953,3968],"3960":[4019,3968],"3961":[4019,3953,3968],"3969":[3953,3968],"6971":[6970,6965],"6973":[6972,6965],"6976":[6974,6965],"6977":[6975,6965],"6979":[6978,6965],"69934":[69937,69927],"69935":[69938,69927],"70475":[70471,70462],"70476":[70471,70487],"70843":[70841,70842],"70844":[70841,70832],"70846":[70841,70845],"71098":[71096,71087],"71099":[71097,71087]},"stateTable":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[2,2,3,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,17,18,11,19,20,21,22,0,0,0,23,0,0,2,0,0,24,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,28,0,0,0,0,0,27,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,39,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0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,0,29,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,53,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0]],"accepting":[false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],"tags":[[],["broken_cluster"],["independent_cluster"],["symbol_cluster"],["standard_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["numeral_cluster"],["broken_cluster"],["independent_cluster"],["symbol_cluster"],["symbol_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["virama_terminated_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["broken_cluster"],["broken_cluster"],["numeral_cluster"],["number_joiner_terminated_cluster"],["standard_cluster"],["standard_cluster"],["numeral_cluster"]]}');const Ln={X:1,C:2,V:4,N:8,H:16,ZWNJ:32,ZWJ:64,M:128,Placeholder:2048,Dotted_Circle:4096,RS:8192,Coeng:16384,Repha:32768,Ra:65536,CM:131072},an={Start:1,Ra_To_Become_Reph:2,Pre_M:4,Pre_C:8,Base_C:16,After_Main:32,Before_Sub:128,Below_C:256,After_Sub:512,Before_Post:1024,Post_C:2048,After_Post:4096,Final_C:8192,SMVD:16384,End:32768},lit=Ln.C|Ln.Ra|Ln.CM|Ln.V|Ln.Placeholder|Ln.Dotted_Circle,Cme=Ln.ZWJ|Ln.ZWNJ,k2=Ln.H|Ln.Coeng,aq={Default:{hasOldSpec:!1,virama:0,basePos:"Last",rephPos:an.Before_Post,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Devanagari:{hasOldSpec:!0,virama:2381,basePos:"Last",rephPos:an.Before_Post,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Bengali:{hasOldSpec:!0,virama:2509,basePos:"Last",rephPos:an.After_Sub,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Gurmukhi:{hasOldSpec:!0,virama:2637,basePos:"Last",rephPos:an.Before_Sub,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Gujarati:{hasOldSpec:!0,virama:2765,basePos:"Last",rephPos:an.Before_Post,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Oriya:{hasOldSpec:!0,virama:2893,basePos:"Last",rephPos:an.After_Main,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Tamil:{hasOldSpec:!0,virama:3021,basePos:"Last",rephPos:an.After_Post,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Telugu:{hasOldSpec:!0,virama:3149,basePos:"Last",rephPos:an.After_Post,rephMode:"Explicit",blwfMode:"Post_Only"},Kannada:{hasOldSpec:!0,virama:3277,basePos:"Last",rephPos:an.After_Post,rephMode:"Implicit",blwfMode:"Post_Only"},Malayalam:{hasOldSpec:!0,virama:3405,basePos:"Last",rephPos:an.After_Main,rephMode:"Log_Repha",blwfMode:"Pre_And_Post"},Khmer:{hasOldSpec:!1,virama:6098,basePos:"First",rephPos:an.Ra_To_Become_Reph,rephMode:"Vis_Repha",blwfMode:"Pre_And_Post"}},cit={6078:[6081,6078],6079:[6081,6079],6080:[6081,6080],6084:[6081,6084],6085:[6081,6085]},{decompositions:uit}=G6(J6),Ime=new n5(oF("AAARAAAAAABg2AAAAWYPmfDtnXuMXFUdx+/uzs7M7szudAtECGJRIMRQbUAithQWkGAKiVhNpFVRRAmIQVCDkDYICGotIA9BTCz8IeUviv7BQ2PBtBIRLBBQIWAUsKg1BKxRAqIgfs/cc+aeOXPej3tnZX7JJ/dxzj3nd36/8753Z5fUsuxgsAwcAU4Gp4BPgM+Cd4P3RjieDs4GXwLrHJ5bDy4DG8A14LvgZrAZbAF3gns0z18ALgY/B78C94NHwBPgabAE/AX8DbwM5sF/QX0yD5vFcU/wVnAgWAoOAyvAceBE8CGwBpwGzgJfAF8BXwXfAFeC68EmsBlsAXeCreA+8CB4DDwF/gh2gd3gFfAGmKxn2QzYC+wHDgRLweFgJTgWrKrnuq/GcQ04jV6fheN54EJwEbgcXAG+Q8O/j+Mt4DZwB9haz8t9Hz3a8iCN/xiO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ps2/hHV4rPKH0svT4pstU7t2tZ9u/ZdqbJL1MwP6O86Fyt4jYaIrGz9mjEt8lFL4PtVE6votG2P6fpdf/GZRse7s3bf4BtSl/DIbKMctx++Z+8o6K6z9FPOwKsRmXiaNl7C+6NYRpjlbqG1j72f49qsuY4brd/amb4ZVc8TQ+sSH985LrEe8iPWJnfPrJRbWbb+dwn4x6o+r/aS2S7w3qWt//LnYz2ntE0vH1uDcyKatx1rH+EiMPEN1SZG/iz6+9o01Rob6O7Q+xLZ1jHobK61U+pWVvo2EpuWqzzD6Poa+pvhli0wn8Zq/72Mzm2d90o5VN1x9ZKuzbTgvqWwUIin8FSpl1CXXvFRxU0iozVPYJDRtF3uFphn6XAyJUUdD7SjTJ8v6n9fVbVObkKWp001lc9VRlqdOf5v0ZM+bymdbfp1NfG0bq27Y5JMyfxeJkU6o/inKH8O2Zfgidb6h/g3VJ7QcVbWL0Pxt6rlrPqa4KfQ25a2zl4/E8GdM/4fK/wA=")),dit=new Ghe(G6(Eme));class Zs extends pg{static planFeatures(t){t.addStage(fit),t.addStage(["locl","ccmp"]),t.addStage(mit),t.addStage("nukt"),t.addStage("akhn"),t.addStage("rphf",!1),t.addStage("rkrf"),t.addStage("pref",!1),t.addStage("blwf",!1),t.addStage("abvf",!1),t.addStage("half",!1),t.addStage("pstf",!1),t.addStage("vatu"),t.addStage("cjct"),t.addStage("cfar",!1),t.addStage(pit),t.addStage({local:["init"],global:["pres","abvs","blws","psts","haln","dist","abvm","blwm","calt","clig"]}),t.unicodeScript=nnt(t.script),t.indicConfig=aq[t.unicodeScript]||aq.Default,t.isOldSpec=t.indicConfig.hasOldSpec&&t.script[t.script.length-1]!=="2"}static assignFeatures(t,r){for(let n=r.length-1;n>=0;n--){let i=r[n].codePoints[0],a=cit[i]||uit[i];if(a){let s=a.map(l=>{let c=t.font.glyphForCodePoint(l);return new Ld(t.font,c.id,[l],r[n].features)});r.splice(n,1,...s)}}}}tu(Zs,"zeroMarkWidths","NONE");function xT(e){return Ime.get(e.codePoints[0])>>8}function Sme(e){return 1<<(Ime.get(e.codePoints[0])&255)}class NE{constructor(t,r,n,i){this.category=t,this.position=r,this.syllableType=n,this.syllable=i}}function fit(e,t){let r=0,n=0;for(let[i,a,s]of dit.match(t.map(xT))){if(i>n){++r;for(let l=n;lm);break}case"First":f=l;for(let S=f+1;S_&&!(wA(t[B])||S&&t[B].shaperInfo.category===Ln.H);B--);if(t[B].shaperInfo.category!==Ln.H&&B>_){let T=t[_];t.splice(_,0,...t.splice(_+1,B-_)),t[B]=T}break}}let A=an.Start;for(let S=l;Sl;B--)if(t[B-1].shaperInfo.position!==an.Pre_M){_.position=t[B-1].shaperInfo.position;break}}}else _.position!==an.SMVD&&(A=_.position)}let v=f;for(let S=f+1;SS.shaperInfo.position-_.shaperInfo.position),t.splice(l,b.length,...b);for(let S=l;Sl&&!wA(t[B]))}}}function pit(e,t,r){let n=r.indicConfig,i=e._layoutEngine.engine.GSUBProcessor.features;for(let a=0,s=t3(t,0);a=an.Base_C){if(l&&c+1an.Base_C&&c--;break}if(c===s&&aa&&!(t[u].shaperInfo.category&(Ln.M|k2));)u--;$h(t[u])&&t[u].shaperInfo.position!==an.Pre_M?u+1a;d--)if(t[d-1].shaperInfo.position===an.Pre_M){let f=d-1;fa&&t[u].shaperInfo.position===an.SMVD;)u--;if($h(t[u]))for(let g=c+1;ga&&!(t[d-1].shaperInfo.category&(Ln.M|k2));)d--;if(d>a&&t[d-1].shaperInfo.category===Ln.M){let g=u;for(let A=c+1;Aa&&$h(t[d-1])&&d=e.length)return t;let r=e[t].shaperInfo.syllable;for(;++t=0;n--){let i=r[n].codePoints[0];if(sq[i]){let a=sq[i].map(s=>{let l=t.font.glyphForCodePoint(s);return new Ld(t.font,l.id,[s],r[n].features)});r.splice(n,1,...a)}}}}tu(Fn,"zeroMarkWidths","BEFORE_GPOS");function oq(e){return Ait.get(e.codePoints[0])}class xit{constructor(t,r,n){this.category=t,this.syllableType=r,this.syllable=n}}function yit(e,t){let r=0;for(let[n,i,a]of vit.match(t.map(oq))){++r;for(let l=n;l<=i;l++)t[l].shaperInfo=new xit(git[oq(t[l])],a[0],r);let s=t[n].shaperInfo.category==="R"?1:Math.min(3,i-n);for(let l=n;l1){for(a=n+1;a=e.length)return t;let r=e[t].shaperInfo.syllable;for(;++t{let f=new Ld(this.font,u,void 0,s);return f.shaperInfo=l.shaperInfo,f.isLigated=l.isLigated,f.ligatureComponent=d+1,f.substituted=!0,f.isMultiplied=!0,f});return this.glyphs.splice(this.glyphIterator.index+1,0,...c),!0}return!1}case 3:{let i=this.coverageIndex(r.coverage);if(i!==-1){let a=0;return this.glyphIterator.cur.id=r.alternateSet.get(i)[a],!0}return!1}case 4:{let i=this.coverageIndex(r.coverage);if(i===-1)return!1;for(let a of r.ligatureSets.get(i)){let s=this.sequenceMatchIndices(1,a.components);if(!s)continue;let l=this.glyphIterator.cur,c=l.codePoints.slice();for(let v of s)c.push(...this.glyphs[v].codePoints);let u=new Ld(this.font,a.glyph,c,l.features);u.shaperInfo=l.shaperInfo,u.isLigated=!0,u.substituted=!0;let d=l.isMark;for(let v=0;v=0;v--)this.glyphs.splice(s[v],1);return this.glyphs[this.glyphIterator.index]=u,!0}return!1}case 5:return this.applyContext(r);case 6:return this.applyChainingContext(r);case 7:return this.applyLookup(r.lookupType,r.extension);default:throw new Error(`GSUB lookupType ${t} is not supported`)}}}class Bit extends YI{applyPositionValue(t,r){let n=this.positions[this.glyphIterator.peekIndex(t)];r.xAdvance!=null&&(n.xAdvance+=r.xAdvance),r.yAdvance!=null&&(n.yAdvance+=r.yAdvance),r.xPlacement!=null&&(n.xOffset+=r.xPlacement),r.yPlacement!=null&&(n.yOffset+=r.yPlacement);let i=this.font._variationProcessor,a=this.font.GDEF&&this.font.GDEF.itemVariationStore;i&&a&&(r.xPlaDevice&&(n.xOffset+=i.getDelta(a,r.xPlaDevice.a,r.xPlaDevice.b)),r.yPlaDevice&&(n.yOffset+=i.getDelta(a,r.yPlaDevice.a,r.yPlaDevice.b)),r.xAdvDevice&&(n.xAdvance+=i.getDelta(a,r.xAdvDevice.a,r.xAdvDevice.b)),r.yAdvDevice&&(n.yAdvance+=i.getDelta(a,r.yAdvDevice.a,r.yAdvDevice.b)))}applyLookup(t,r){switch(t){case 1:{let i=this.coverageIndex(r.coverage);if(i===-1)return!1;switch(r.version){case 1:this.applyPositionValue(0,r.value);break;case 2:this.applyPositionValue(0,r.values.get(i));break}return!0}case 2:{let i=this.glyphIterator.peek();if(!i)return!1;let a=this.coverageIndex(r.coverage);if(a===-1)return!1;switch(r.version){case 1:let s=r.pairSets.get(a);for(let u of s)if(u.secondGlyph===i.id)return this.applyPositionValue(0,u.value1),this.applyPositionValue(1,u.value2),!0;return!1;case 2:let l=this.getClassID(this.glyphIterator.cur.id,r.classDef1),c=this.getClassID(i.id,r.classDef2);if(l===-1||c===-1)return!1;var n=r.classRecords.get(l).get(c);return this.applyPositionValue(0,n.value1),this.applyPositionValue(1,n.value2),!0}}case 3:{let i=this.glyphIterator.peekIndex(),a=this.glyphs[i];if(!a)return!1;let s=r.entryExitRecords[this.coverageIndex(r.coverage)];if(!s||!s.exitAnchor)return!1;let l=r.entryExitRecords[this.coverageIndex(r.coverage,a.id)];if(!l||!l.entryAnchor)return!1;let c=this.getAnchor(l.entryAnchor),u=this.getAnchor(s.exitAnchor),d=this.positions[this.glyphIterator.index],f=this.positions[i],m;switch(this.direction){case"ltr":d.xAdvance=u.x+d.xOffset,m=c.x+f.xOffset,f.xAdvance-=m,f.xOffset-=m;break;case"rtl":m=u.x+d.xOffset,d.xAdvance-=m,d.xOffset-=m,f.xAdvance=c.x+f.xOffset;break}return this.glyphIterator.flags.rightToLeft?(this.glyphIterator.cur.cursiveAttachment=i,d.yOffset=c.y-u.y):(a.cursiveAttachment=this.glyphIterator.index,d.yOffset=u.y-c.y),!0}case 4:{let i=this.coverageIndex(r.markCoverage);if(i===-1)return!1;let a=this.glyphIterator.index;for(;--a>=0&&(this.glyphs[a].isMark||this.glyphs[a].ligatureComponent>0););if(a<0)return!1;let s=this.coverageIndex(r.baseCoverage,this.glyphs[a].id);if(s===-1)return!1;let l=r.markArray[i],c=r.baseArray[s][l.class];return this.applyAnchor(l,c,a),!0}case 5:{let i=this.coverageIndex(r.markCoverage);if(i===-1)return!1;let a=this.glyphIterator.index;for(;--a>=0&&this.glyphs[a].isMark;);if(a<0)return!1;let s=this.coverageIndex(r.ligatureCoverage,this.glyphs[a].id);if(s===-1)return!1;let l=r.ligatureArray[s],c=this.glyphIterator.cur,u=this.glyphs[a],d=u.ligatureID&&u.ligatureID===c.ligatureID&&c.ligatureComponent>0?Math.min(c.ligatureComponent,u.codePoints.length)-1:u.codePoints.length-1,f=r.markArray[i],m=l[d][f.class];return this.applyAnchor(f,m,a),!0}case 6:{let i=this.coverageIndex(r.mark1Coverage);if(i===-1)return!1;let a=this.glyphIterator.peekIndex(-1),s=this.glyphs[a];if(!s||!s.isMark)return!1;let l=this.glyphIterator.cur,c=!1;if(l.ligatureID===s.ligatureID?l.ligatureID?l.ligatureComponent===s.ligatureComponent&&(c=!0):c=!0:(l.ligatureID&&!l.ligatureComponent||s.ligatureID&&!s.ligatureComponent)&&(c=!0),!c)return!1;let u=this.coverageIndex(r.mark2Coverage,s.id);if(u===-1)return!1;let d=r.mark1Array[i],f=r.mark2Array[u][d.class];return this.applyAnchor(d,f,a),!0}case 7:return this.applyContext(r);case 8:return this.applyChainingContext(r);case 9:return this.applyLookup(r.lookupType,r.extension);default:throw new Error(`Unsupported GPOS table: ${t}`)}}applyAnchor(t,r,n){let i=this.getAnchor(r),a=this.getAnchor(t.markAnchor);this.positions[n];let s=this.positions[this.glyphIterator.index];s.xOffset=i.x-a.x,s.yOffset=i.y-a.y,this.glyphIterator.cur.markAttachment=n}getAnchor(t){let r=t.xCoordinate,n=t.yCoordinate,i=this.font._variationProcessor,a=this.font.GDEF&&this.font.GDEF.itemVariationStore;return i&&a&&(t.xDeviceTable&&(r+=i.getDelta(a,t.xDeviceTable.a,t.xDeviceTable.b)),t.yDeviceTable&&(n+=i.getDelta(a,t.yDeviceTable.a,t.yDeviceTable.b))),{x:r,y:n}}applyFeatures(t,r,n){super.applyFeatures(t,r,n);for(var i=0;inew Ld(this.font,n.id,[...n.codePoints]));let r=null;this.GPOSProcessor&&(r=this.GPOSProcessor.selectScript(t.script,t.language,t.direction)),this.GSUBProcessor&&(r=this.GSUBProcessor.selectScript(t.script,t.language,t.direction)),this.shaper=Iit(r),this.plan=new Nnt(this.font,r,t.direction),this.shaper.plan(this.plan,this.glyphInfos,t.features);for(let n in this.plan.allFeatures)t.features[n]=!0}substitute(t){this.GSUBProcessor&&(this.plan.process(this.GSUBProcessor,this.glyphInfos),t.glyphs=this.glyphInfos.map(r=>this.font.getGlyph(r.id,r.codePoints)))}position(t){return this.shaper.zeroMarkWidths==="BEFORE_GPOS"&&this.zeroMarkAdvances(t.positions),this.GPOSProcessor&&this.plan.process(this.GPOSProcessor,this.glyphInfos,t.positions),this.shaper.zeroMarkWidths==="AFTER_GPOS"&&this.zeroMarkAdvances(t.positions),t.direction==="rtl"&&(t.glyphs.reverse(),t.positions.reverse()),this.GPOSProcessor&&this.GPOSProcessor.features}zeroMarkAdvances(t){for(let r=0;rnew lnt(n.advanceWidth));let r=null;this.engine&&this.engine.position&&(r=this.engine.position(t)),!r&&(!this.engine||this.engine.fallbackPosition)&&(this.unicodeLayoutEngine||(this.unicodeLayoutEngine=new rnt(this.font)),this.unicodeLayoutEngine.positionGlyphs(t.glyphs,t.positions)),(!r||!r.kern)&&t.features.kern!==!1&&this.font.kern&&(this.kernProcessor||(this.kernProcessor=new tnt(this.font)),this.kernProcessor.process(t.glyphs,t.positions),t.features.kern=!0)}hideDefaultIgnorables(t,r){let n=this.font.glyphForCodePoint(32);for(let i=0;i>16;if(r===0)switch(t>>8){case 0:return t===173;case 3:return t===847;case 6:return t===1564;case 23:return 6068<=t&&t<=6069;case 24:return 6155<=t&&t<=6158;case 32:return 8203<=t&&t<=8207||8234<=t&&t<=8238||8288<=t&&t<=8303;case 254:return 65024<=t&&t<=65039||t===65279;case 255:return 65520<=t&&t<=65528;default:return!1}else switch(r){case 1:return 113824<=t&&t<=113827||119155<=t&&t<=119162;case 14:return 917504<=t&&t<=921599;default:return!1}}getAvailableFeatures(t,r){let n=[];return this.engine&&n.push(...this.engine.getAvailableFeatures(t,r)),this.font.kern&&n.indexOf("kern")===-1&&n.push("kern"),n}stringsForGlyph(t){let r=new Set,n=this.font._cmapProcessor.codePointsForGlyph(t);for(let i of n)r.add(String.fromCodePoint(i));if(this.engine&&this.engine.stringsForGlyph)for(let i of this.engine.stringsForGlyph(t))r.add(i);return Array.from(r)}constructor(t){this.font=t,this.unicodeLayoutEngine=null,this.kernProcessor=null,this.font.morx?this.engine=new Bnt(this.font):(this.font.GSUB||this.font.GPOS)&&(this.engine=new Nit(this.font))}}const _it={moveTo:"M",lineTo:"L",quadraticCurveTo:"Q",bezierCurveTo:"C",closePath:"Z"};class ky{toFunction(){return t=>{this.commands.forEach(r=>t[r.command].apply(t,r.args))}}toSVG(){return this.commands.map(r=>{let n=r.args.map(i=>Math.round(i*100)/100);return`${_it[r.command]}${n.join(" ")}`}).join("")}get cbox(){if(!this._cbox){let t=new mg;for(let r of this.commands)for(let n=0;nMath.pow(1-I,3)*g[E]+3*Math.pow(1-I,2)*I*A[E]+3*(1-I)*Math.pow(I,2)*v[E]+Math.pow(I,3)*b[E];for(let I of this.commands)switch(I.command){case"moveTo":case"lineTo":let[S,_]=I.args;t.addPoint(S,_),r=S,n=_;break;case"quadraticCurveTo":case"bezierCurveTo":if(I.command==="quadraticCurveTo")var[a,s,f,m]=I.args,l=r+2/3*(a-r),c=n+2/3*(s-n),u=f+2/3*(a-f),d=m+2/3*(s-m);else var[l,c,u,d,f,m]=I.args;t.addPoint(f,m);for(var g=[r,n],A=[l,c],v=[u,d],b=[f,m],E=0;E<=1;E++){let B=6*g[E]-12*A[E]+6*v[E],T=-3*g[E]+9*A[E]-9*v[E]+3*b[E];if(I=3*A[E]-3*g[E],T===0){if(B===0)continue;let L=-I/B;0{const u=t*l+n*c+a,d=r*l+i*c+s;return[u,d]})}translate(t,r){return this.transform(1,0,0,1,t,r)}rotate(t){let r=Math.cos(t),n=Math.sin(t);return this.transform(r,n,-n,r,0,0)}scale(t,r=t){return this.transform(t,0,0,r,0,0)}constructor(){this.commands=[],this._bbox=null,this._cbox=null}}for(let e of["moveTo","lineTo","quadraticCurveTo","bezierCurveTo","closePath"])ky.prototype[e]=function(...t){return this._bbox=this._cbox=null,this.commands.push({command:e,args:t}),this};var c2=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];class ih{_getPath(){return new ky}_getCBox(){return this.path.cbox}_getBBox(){return this.path.bbox}_getTableMetrics(t){if(this.id"u"||t===null)&&({cbox:t}=this),(s=this._font["OS/2"])&&s.version>0)var i=Math.abs(s.typoAscender-s.typoDescender),a=s.typoAscender-t.maxY;else{let{hhea:l}=this._font;var i=Math.abs(l.ascent-l.descent),a=l.ascent-t.maxY}}return this._font._variationProcessor&&this._font.HVAR&&(r+=this._font._variationProcessor.getAdvanceAdjustment(this.id,this._font.HVAR)),this._metrics={advanceWidth:r,advanceHeight:i,leftBearing:n,topBearing:a}}get cbox(){return this._getCBox()}get bbox(){return this._getBBox()}get path(){return this._getPath()}getScaledPath(t){let r=1/this._font.unitsPerEm*t;return this.path.scale(r)}get advanceWidth(){return this._getMetrics().advanceWidth}get advanceHeight(){return this._getMetrics().advanceHeight}get ligatureCaretPositions(){}_getName(){let{post:t}=this._font;if(!t)return null;switch(t.version){case 1:return c2[this.id];case 2:let r=t.glyphNameIndex[this.id];return r0&&this.codePoints.every(nF),this.isLigature=this.codePoints.length>1}}Ql([Ll],ih.prototype,"cbox",null);Ql([Ll],ih.prototype,"bbox",null);Ql([Ll],ih.prototype,"path",null);Ql([Ll],ih.prototype,"advanceWidth",null);Ql([Ll],ih.prototype,"advanceHeight",null);Ql([Ll],ih.prototype,"name",null);let dq=new ct({numberOfContours:Ft,xMin:Ft,yMin:Ft,xMax:Ft,yMax:Ft});const jit=1,Dit=2,Tit=4,Pit=8,Oit=16,Rit=32,Fit=1,Mit=8,fq=32,Qit=64,Lit=128,Uit=256;class yd{copy(){return new yd(this.onCurve,this.endContour,this.x,this.y)}constructor(t,r,n=0,i=0){this.onCurve=t,this.endContour=r,this.x=n,this.y=i}}class $it{constructor(t,r,n){this.glyphID=t,this.dx=r,this.dy=n,this.pos=0,this.scaleX=this.scaleY=1,this.scale01=this.scale10=0}}class X6 extends ih{_getCBox(t){if(this._font._variationProcessor&&!t)return this.path.cbox;let r=this._font._getTableStream("glyf");r.pos+=this._font.loca.offsets[this.id];let n=dq.decode(r),i=new mg(n.xMin,n.yMin,n.xMax,n.yMax);return Object.freeze(i)}_parseGlyphCoord(t,r,n,i){if(n){var a=t.readUInt8();i||(a=-a),a+=r}else if(i)var a=r;else var a=r+t.readInt16BE();return a}_decode(){let t=this._font.loca.offsets[this.id],r=this._font.loca.offsets[this.id+1];if(t===r)return null;let n=this._font._getTableStream("glyf");n.pos+=t;let i=n.pos,a=dq.decode(n);return a.numberOfContours>0?this._decodeSimple(a,n):a.numberOfContours<0&&this._decodeComposite(a,n,i),a}_decodeSimple(t,r){t.points=[];let n=new Ve(G,t.numberOfContours).decode(r);t.instructions=new Ve(tr,G).decode(r);let i=[],a=n[n.length-1]+1;for(;i.length=0,0,0);t.points.push(f)}let c=0;for(var l=0;l>1,s.length=0}function z(W,R){A&&a.closePath(),a.moveTo(W,R),A=!0}let L=function(){for(;r.pos1&&P(),f+=s.shift(),z(d,f);break;case 5:for(;s.length>=2;)d+=s.shift(),f+=s.shift(),a.lineTo(d,f);break;case 6:case 7:for(K=$===6;s.length>=1;)K?d+=s.shift():f+=s.shift(),a.lineTo(d,f),K=!K;break;case 8:for(;s.length>0;)q=d+s.shift(),Y=f+s.shift(),ne=q+s.shift(),ge=Y+s.shift(),d=ne+s.shift(),f=ge+s.shift(),a.bezierCurveTo(q,Y,ne,ge,d,f);break;case 10:if(X=s.pop()+S,Z=I[X],Z){g[X]=!0;let Se=r.pos,Ie=i;r.pos=Z.offset,i=Z.offset+Z.length,L(),r.pos=Se,i=Ie}break;case 11:if(t.version>=2)break;return;case 14:if(t.version>=2)break;s.length>0&&P(),A&&(a.closePath(),A=!1);break;case 15:if(t.version<2)throw new Error("vsindex operator not supported in CFF v1");B=s.pop();break;case 16:{if(t.version<2)throw new Error("blend operator not supported in CFF v1");if(!T)throw new Error("blend operator in non-variation font");let Se=T.getBlendVector(_,B),Ie=s.pop(),Be=Ie*Se.length,Xe=s.length-Be,ke=Xe-Ie;for(let he=0;he>3;break;case 21:s.length>2&&P(),d+=s.shift(),f+=s.shift(),z(d,f);break;case 22:s.length>1&&P(),d+=s.shift(),z(d,f);break;case 24:for(;s.length>=8;)q=d+s.shift(),Y=f+s.shift(),ne=q+s.shift(),ge=Y+s.shift(),d=ne+s.shift(),f=ge+s.shift(),a.bezierCurveTo(q,Y,ne,ge,d,f);d+=s.shift(),f+=s.shift(),a.lineTo(d,f);break;case 25:for(;s.length>=8;)d+=s.shift(),f+=s.shift(),a.lineTo(d,f);q=d+s.shift(),Y=f+s.shift(),ne=q+s.shift(),ge=Y+s.shift(),d=ne+s.shift(),f=ge+s.shift(),a.bezierCurveTo(q,Y,ne,ge,d,f);break;case 26:for(s.length%2&&(d+=s.shift());s.length>=4;)q=d,Y=f+s.shift(),ne=q+s.shift(),ge=Y+s.shift(),d=ne,f=ge+s.shift(),a.bezierCurveTo(q,Y,ne,ge,d,f);break;case 27:for(s.length%2&&(f+=s.shift());s.length>=4;)q=d+s.shift(),Y=f,ne=q+s.shift(),ge=Y+s.shift(),d=ne+s.shift(),f=ge,a.bezierCurveTo(q,Y,ne,ge,d,f);break;case 28:s.push(r.readInt16BE());break;case 29:if(X=s.pop()+b,Z=v[X],Z){m[X]=!0;let Se=r.pos,Ie=i;r.pos=Z.offset,i=Z.offset+Z.length,L(),r.pos=Se,i=Ie}break;case 30:case 31:for(K=$===31;s.length>=4;)K?(q=d+s.shift(),Y=f,ne=q+s.shift(),ge=Y+s.shift(),f=ge+s.shift(),d=ne+(s.length===1?s.shift():0)):(q=d,Y=f+s.shift(),ne=q+s.shift(),ge=Y+s.shift(),d=ne+s.shift(),f=ge+(s.length===1?s.shift():0)),a.bezierCurveTo(q,Y,ne,ge,d,f),K=!K;break;case 12:switch($=r.readUInt8(),$){case 3:let Se=s.pop(),Ie=s.pop();s.push(Se&&Ie?1:0);break;case 4:Se=s.pop(),Ie=s.pop(),s.push(Se||Ie?1:0);break;case 5:Se=s.pop(),s.push(Se?0:1);break;case 9:Se=s.pop(),s.push(Math.abs(Se));break;case 10:Se=s.pop(),Ie=s.pop(),s.push(Se+Ie);break;case 11:Se=s.pop(),Ie=s.pop(),s.push(Se-Ie);break;case 12:Se=s.pop(),Ie=s.pop(),s.push(Se/Ie);break;case 14:Se=s.pop(),s.push(-Se);break;case 15:Se=s.pop(),Ie=s.pop(),s.push(Se===Ie?1:0);break;case 18:s.pop();break;case 20:let Be=s.pop(),Xe=s.pop();l[Xe]=Be;break;case 21:Xe=s.pop(),s.push(l[Xe]||0);break;case 22:let ke=s.pop(),he=s.pop(),Le=s.pop(),Ye=s.pop();s.push(Le<=Ye?ke:he);break;case 23:s.push(Math.random());break;case 24:Se=s.pop(),Ie=s.pop(),s.push(Se*Ie);break;case 26:Se=s.pop(),s.push(Math.sqrt(Se));break;case 27:Se=s.pop(),s.push(Se,Se);break;case 28:Se=s.pop(),Ie=s.pop(),s.push(Ie,Se);break;case 29:Xe=s.pop(),Xe<0?Xe=0:Xe>s.length-1&&(Xe=s.length-1),s.push(s[Xe]);break;case 30:let Oe=s.pop(),it=s.pop();if(it>=0)for(;it>0;){var W=s[Oe-1];for(let Qt=Oe-2;Qt>=0;Qt--)s[Qt+1]=s[Qt];s[0]=W,it--}else for(;it<0;){var W=s[0];for(let Ot=0;Ot<=Oe;Ot++)s[Ot]=s[Ot+1];s[Oe-1]=W,it++}break;case 34:q=d+s.shift(),Y=f,ne=q+s.shift(),ge=Y+s.shift(),ae=ne+s.shift(),pe=ge,_e=ae+s.shift(),we=pe,xe=_e+s.shift(),Me=we,ye=xe+s.shift(),Ee=Me,d=ye,f=Ee,a.bezierCurveTo(q,Y,ne,ge,ae,pe),a.bezierCurveTo(_e,we,xe,Me,ye,Ee);break;case 35:me=[];for(let Qt=0;Qt<=5;Qt++)d+=s.shift(),f+=s.shift(),me.push(d,f);a.bezierCurveTo(...me.slice(0,6)),a.bezierCurveTo(...me.slice(6)),s.shift();break;case 36:q=d+s.shift(),Y=f+s.shift(),ne=q+s.shift(),ge=Y+s.shift(),ae=ne+s.shift(),pe=ge,_e=ae+s.shift(),we=pe,xe=_e+s.shift(),Me=we+s.shift(),ye=xe+s.shift(),Ee=Me,d=ye,f=Ee,a.bezierCurveTo(q,Y,ne,ge,ae,pe),a.bezierCurveTo(_e,we,xe,Me,ye,Ee);break;case 37:let vt=d,mt=f;me=[];for(let Qt=0;Qt<=4;Qt++)d+=s.shift(),f+=s.shift(),me.push(d,f);Math.abs(d-vt)>Math.abs(f-mt)?(d+=s.shift(),f=mt):(d=vt,f+=s.shift()),me.push(d,f),a.bezierCurveTo(...me.slice(0,6)),a.bezierCurveTo(...me.slice(6));break;default:throw new Error(`Unknown op: 12 ${$}`)}break;default:throw new Error(`Unknown op: ${$}`)}}else if($<247)s.push($-139);else if($<251){var R=r.readUInt8();s.push(($-247)*256+R+108)}else if($<255){var R=r.readUInt8();s.push(-($-251)*256-R-108)}else s.push(r.readInt32BE()/65536)}};return L(),A&&a.closePath(),a}constructor(...t){super(...t),tu(this,"type","CFF")}}let Hit=new ct({originX:G,originY:G,type:new Ti(4),data:new Rl(e=>e.parent.buflen-e._currentOffset)});class Wit extends X6{getImageForSize(t){for(let s=0;s=t)break}let n=r.imageOffsets,i=n[this.id],a=n[this.id+1];return i===a?null:(this._font.stream.pos=i,Hit.decode(this._font.stream,{buflen:a-i}))}render(t,r){let n=this.getImageForSize(r);if(n!=null){let i=r/this._font.unitsPerEm;t.image(n.data,{height:r,x:n.originX,y:(this.bbox.minY-n.originY)*i})}this._font.sbix.flags.renderOutlines&&super.render(t,r)}constructor(...t){super(...t),tu(this,"type","SBIX")}}class hq{constructor(t,r){this.glyph=t,this.color=r}}class Git extends ih{_getBBox(){let t=new mg;for(let r=0;r>1;var a=r.baseGlyphRecord[d];if(this.ida.gid)n=d+1;else{var s=a;break}}if(s==null){var l=this._font._getBaseGlyph(this.id),c={red:0,green:0,blue:0,alpha:255};return[new hq(l,c)]}let u=[];for(let d=s.firstLayerIndex;d=1&&r[n]=n.glyphCount)return;let i=n.offsets[t];if(i===n.offsets[t+1])return;let{stream:a}=this.font;if(a.pos=i,a.pos>=a.length)return;let s=a.readUInt16BE(),l=i+a.readUInt16BE();if(s&qit){var c=a.pos;a.pos=l;var u=this.decodePoints();l=a.pos,a.pos=c}let d=r.map(b=>b.copy());s&=Kit;for(let b=0;b=n.globalCoordCount)throw new Error("Invalid gvar table");var f=n.globalCoords[I&pq]}if(I&mq){var m=[];for(let O=0;OL.copy()),z=r.map(()=>!1);for(let L=0;LMath.max(0,r[c]))return 0;l=(l*a[c]+Number.EPSILON)/(r[c]+Number.EPSILON)}else{if(a[c]i[c])return 0;a[c]s)continue;let c=i,u=i;for(i++;i<=s;)n[i]&&(this.deltaInterpolate(u+1,i-1,u,i,r,t),u=i),i++;u===c?this.deltaShift(a,s,u,r,t):(this.deltaInterpolate(u+1,s,u,c,r,t),c>0&&this.deltaInterpolate(a,c-1,u,c,r,t)),i=s+1}}deltaInterpolate(t,r,n,i,a,s){if(t>r)return;let l=["x","y"];for(let u=0;ua[i][d]){var c=n;n=i,i=c}let f=a[n][d],m=a[i][d],g=s[n][d],A=s[i][d];if(f!==m||g===A){let v=f===m?0:(A-g)/(m-f);for(let b=t;b<=r;b++){let E=a[b][d];E<=f?E+=g-f:E>=m?E+=A-m:E=g+(E-f)*v,s[b][d]=E}}}}deltaShift(t,r,n,i,a){let s=a[n].x-i[n].x,l=a[n].y-i[n].y;if(!(s===0&&l===0))for(let c=t;c<=r;c++)c!==n&&(a[c].x+=s,a[c].y+=l)}getAdvanceAdjustment(t,r){let n,i;if(r.advanceWidthMapping){let a=t;a>=r.advanceWidthMapping.mapCount&&(a=r.advanceWidthMapping.mapCount-1),r.advanceWidthMapping.entryFormat,{outerIndex:n,innerIndex:i}=r.advanceWidthMapping.mapData[a]}else n=0,i=t;return this.getDelta(r.itemVariationStore,n,i)}getDelta(t,r,n){if(r>=t.itemVariationData.length)return 0;let i=t.itemVariationData[r];if(n>=i.deltaSets.length)return 0;let a=i.deltaSets[n],s=this.getBlendVector(t,r),l=0;for(let c=0;cf.peakCoord||f.peakCoord>f.endCoord||f.startCoord<0&&f.endCoord>0&&f.peakCoord!==0||f.peakCoord===0?m=1:i[d]f.endCoord?m=0:i[d]===f.peakCoord?m=1:i[d]=0&&t<=255?1:2}static encode(t,r){r>=0&&r<=255?t.writeUInt8(r):t.writeInt16BE(r)}}let xq=new ct({numberOfContours:Ft,xMin:Ft,yMin:Ft,xMax:Ft,yMax:Ft,endPtsOfContours:new Ve(G,"numberOfContours"),instructions:new Ve(tr,G),flags:new Ve(tr,0),xPoints:new Ve(vq,0),yPoints:new Ve(vq,0)});class oat{encodeSimple(t,r=[]){let n=[],i=[],a=[],s=[],l=0,c=0,u=0,d=0,f=0;for(let E=0;E0&&(s.push(l),l=0),s.push(T),d=T),c=_,u=B,f++}I.command==="closePath"&&n.push(f-1)}t.commands.length>1&&t.commands[t.commands.length-1].command!=="closePath"&&n.push(f-1);let m=t.bbox,g={numberOfContours:n.length,xMin:m.minX,yMin:m.minY,xMax:m.maxX,yMax:m.maxY,endPtsOfContours:n,instructions:r,flags:s,xPoints:i,yPoints:a},A=xq.size(g),v=4-A%4,b=new zI(A+v);return xq.encode(b,g),v!==0&&b.fill(0,v),b.buffer}_encodePoint(t,r,n,i,a,s){let l=t-r;return t===r?i|=s:(-255<=l&&l<=255&&(i|=a,l<0?l=-l:i|=s),n.push(l)),i}}class lat extends Bme{_addGlyph(t){let r=this.font.getGlyph(t),n=r._decode(),i=this.font.loca.offsets[t],a=this.font.loca.offsets[t+1],s=this.font._getTableStream("glyf");s.pos+=i;let l=s.readBuffer(a-i);if(n&&n.numberOfContours<0){l=new Uint8Array(l);let c=new DataView(l.buffer);for(let u of n.components)t=this.includeGlyph(u.glyphID),c.setUint16(u.pos,t)}else n&&this.font._variationProcessor&&(l=this.glyphEncoder.encodeSimple(r.path,n.instructions));return this.glyf.push(l),this.loca.offsets.push(this.offset),this.hmtx.metrics.push({advance:r.advanceWidth,bearing:r._getMetrics().leftBearing}),this.offset+=l.length,this.glyf.length-1}encode(){this.glyf=[],this.offset=0,this.loca={offsets:[],version:this.font.loca.version},this.hmtx={metrics:[],bearings:[]};let t=0;for(;t255?2:1,ranges:[{first:1,nLeft:this.charstrings.length-2}]},r=Object.assign({},this.cff.topDict);r.Private=null,r.charset=t,r.Encoding=null,r.CharStrings=this.charstrings;for(let i of["version","Notice","Copyright","FullName","FamilyName","Weight","PostScript","BaseFontName","FontName"])r[i]=this.addString(this.cff.string(r[i]));r.ROS=[this.addString("Adobe"),this.addString("Identity"),0],r.CIDCount=this.charstrings.length,this.cff.isCIDFont?this.subsetFontdict(r):this.createCIDFontdict(r);let n={version:1,hdrSize:this.cff.hdrSize,offSize:4,header:this.cff.header,nameIndex:[this.cff.postscriptName],topDictIndex:[r],stringIndex:this.strings,globalSubrIndex:this.gsubrs};return dme.toBuffer(n)}constructor(t){if(super(t),this.cff=this.font["CFF "],!this.cff)throw new Error("Not a CFF Font")}}class nc{static probe(t){let r=V6.decode(t.slice(0,4));return r==="true"||r==="OTTO"||r==="\0\0\0"}setDefaultLanguage(t=null){this.defaultLanguage=t}_getTable(t){if(!(t.tag in this._tables))try{this._tables[t.tag]=this._decodeTable(t)}catch{}return this._tables[t.tag]}_getTableStream(t){let r=this.directory.tables[t];return r?(this.stream.pos=r.offset,this.stream):null}_decodeDirectory(){return this.directory=gme.decode(this.stream,{_startOffset:0})}_decodeTable(t){let r=this.stream.pos,n=this._getTableStream(t.tag),i=KI[t.tag].decode(n,this,t.length);return this.stream.pos=r,i}getName(t,r=this.defaultLanguage||WI){let n=this.name&&this.name.records[t];return n&&(n[r]||n[this.defaultLanguage]||n[WI]||n.en||n[Object.keys(n)[0]])||null}get postscriptName(){return this.getName("postscriptName")}get fullName(){return this.getName("fullName")}get familyName(){return this.getName("fontFamily")}get subfamilyName(){return this.getName("fontSubfamily")}get copyright(){return this.getName("copyright")}get version(){return this.getName("version")}get ascent(){return this.hhea.ascent}get descent(){return this.hhea.descent}get lineGap(){return this.hhea.lineGap}get underlinePosition(){return this.post.underlinePosition}get underlineThickness(){return this.post.underlineThickness}get italicAngle(){return this.post.italicAngle}get capHeight(){let t=this["OS/2"];return t?t.capHeight:this.ascent}get xHeight(){let t=this["OS/2"];return t?t.xHeight:0}get numGlyphs(){return this.maxp.numGlyphs}get unitsPerEm(){return this.head.unitsPerEm}get bbox(){return Object.freeze(new mg(this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax))}get _cmapProcessor(){return new lF(this.cmap)}get characterSet(){return this._cmapProcessor.getCharacterSet()}hasGlyphForCodePoint(t){return!!this._cmapProcessor.lookup(t)}glyphForCodePoint(t){return this.getGlyph(this._cmapProcessor.lookup(t),[t])}glyphsForString(t){let r=[],n=t.length,i=0,a=-1,s=-1;for(;i<=n;){let l=0,c=0;if(i{let l=a.axisTag.trim();return l in t?Math.max(a.minValue,Math.min(a.maxValue,t[l])):a.defaultValue}),n=new Ol(this.stream.buffer);n.pos=this._directoryPos;let i=new nc(n,r);return i._tables=this._tables,i}get _variationProcessor(){if(!this.fvar)return null;let t=this.variationCoords;return!t&&!this.CFF2?null:(t||(t=this.fvar.axis.map(r=>r.defaultValue)),new eat(this,t))}getFont(t){return this.getVariation(t)}constructor(t,r=null){tu(this,"type","TTF"),this.defaultLanguage=null,this.stream=t,this.variationCoords=r,this._directoryPos=this.stream.pos,this._tables={},this._glyphs={},this._decodeDirectory();for(let n in this.directory.tables){let i=this.directory.tables[n];KI[n]&&i.length>0&&Object.defineProperty(this,n,{get:this._getTable.bind(this,i)})}}}Ql([Ll],nc.prototype,"bbox",null);Ql([Ll],nc.prototype,"_cmapProcessor",null);Ql([Ll],nc.prototype,"characterSet",null);Ql([Ll],nc.prototype,"_layoutEngine",null);Ql([Ll],nc.prototype,"variationAxes",null);Ql([Ll],nc.prototype,"namedVariations",null);Ql([Ll],nc.prototype,"_variationProcessor",null);let uat=new ct({tag:new Ti(4),offset:new Ze(et,"void",{type:"global"}),compLength:et,length:et,origChecksum:et}),Nme=new ct({tag:new Ti(4),flavor:et,length:et,numTables:G,reserved:new Ia(G),totalSfntSize:et,majorVersion:G,minorVersion:G,metaOffset:et,metaLength:et,metaOrigLength:et,privOffset:et,privLength:et,tables:new Ve(uat,"numTables")});Nme.process=function(){let e={};for(let t of this.tables)e[t.tag]=t;this.tables=e};var dat=Nme;class fat extends nc{static probe(t){return V6.decode(t.slice(0,4))==="wOFF"}_decodeDirectory(){this.directory=dat.decode(this.stream,{_startOffset:0})}_getTableStream(t){let r=this.directory.tables[t];if(r)if(this.stream.pos=r.offset,r.compLength(e.flags&63)===63),tag:e=>e.customTag||mat[e.flags&63],length:yq,transformVersion:e=>e.flags>>>6&3,transformed:e=>e.tag==="glyf"||e.tag==="loca"?e.transformVersion===0:e.transformVersion!==0,transformLength:new HI(yq,e=>e.transformed)}),kme=new ct({tag:new Ti(4),flavor:et,length:et,numTables:G,reserved:new Ia(G),totalSfntSize:et,totalCompressedSize:et,majorVersion:G,minorVersion:G,metaOffset:et,metaLength:et,metaOrigLength:et,privOffset:et,privLength:et,tables:new Ve(pat,"numTables")});kme.process=function(){let e={};for(let t=0;t0){let l=[],c=0;for(let u=0;u>7);if(f&=127,f<10)u=0,d=gf(f,((f&14)<<7)+t.readUInt8());else if(f<20)u=gf(f,((f-10&14)<<7)+t.readUInt8()),d=0;else if(f<84){var s=f-20,l=t.readUInt8();u=gf(f,1+(s&48)+(l>>4)),d=gf(f>>1,1+((s&12)<<2)+(l&15))}else if(f<120){var s=f-84;u=gf(f,1+(s/12<<8)+t.readUInt8()),d=gf(f>>1,1+(s%12>>2<<8)+t.readUInt8())}else if(f<124){var l=t.readUInt8();let A=t.readUInt8();u=gf(f,(l<<4)+(A>>4)),d=gf(f>>1,((A&15)<<8)+t.readUInt8())}else u=gf(f,t.readUInt16BE()),d=gf(f>>1,t.readUInt16BE());i+=u,n+=d,a.push(new yd(m,!1,i,n))}return a}let Eat=new On(et,{65536:{numFonts:et,offsets:new Ve(et,"numFonts")},131072:{numFonts:et,offsets:new Ve(et,"numFonts"),dsigTag:et,dsigLength:et,dsigOffset:et}});class Cat{static probe(t){return V6.decode(t.slice(0,4))==="ttcf"}getFont(t){for(let r of this.header.offsets){let n=new Ol(this.stream.buffer);n.pos=r;let i=new nc(n);if(i.postscriptName===t||i.postscriptName instanceof Uint8Array&&t instanceof Uint8Array&&i.postscriptName.every((a,s)=>t[s]===a))return i}return null}get fonts(){let t=[];for(let r of this.header.offsets){let n=new Ol(this.stream.buffer);n.pos=r,t.push(new nc(n))}return t}constructor(t){if(tu(this,"type","TTC"),this.stream=t,t.readString(4)!=="ttcf")throw new Error("Not a TrueType collection");this.header=Eat.decode(t)}}let Iat=new Ti(tr);new ct({len:et,buf:new Rl("len")});let Sat=new ct({id:G,nameOffset:Ft,attr:tr,dataOffset:Jp,handle:et}),Bat=new ct({name:new Ti(4),maxTypeIndex:G,refList:new Ze(G,new Ve(Sat,e=>e.maxTypeIndex+1),{type:"parent"})}),Nat=new ct({length:G,types:new Ve(Bat,e=>e.length+1)}),kat=new ct({reserved:new Ia(tr,24),typeList:new Ze(G,Nat),nameListOffset:new Ze(G,"void")}),wq=new ct({dataOffset:et,map:new Ze(et,kat),dataLength:et,mapLength:et});class _at{static probe(t){let r=new Ol(t);try{var n=wq.decode(r)}catch{return!1}for(let i of n.map.typeList.types)if(i.name==="sfnt")return!0;return!1}getFont(t){if(!this.sfnt)return null;for(let r of this.sfnt.refList){let n=this.header.dataOffset+r.dataOffset+4,i=new Ol(this.stream.buffer.slice(n)),a=new nc(i);if(a.postscriptName===t||a.postscriptName instanceof Uint8Array&&t instanceof Uint8Array&&a.postscriptName.every((s,l)=>t[l]===s))return a}return null}get fonts(){let t=[];for(let r of this.sfnt.refList){let n=this.header.dataOffset+r.dataOffset+4,i=new Ol(this.stream.buffer.slice(n));t.push(new nc(i))}return t}constructor(t){tu(this,"type","DFont"),this.stream=t,this.header=wq.decode(this.stream);for(let r of this.header.map.typeList.types){for(let n of r.refList)n.nameOffset>=0?(this.stream.pos=n.nameOffset+this.header.map.nameListOffset,n.name=Iat.decode(this.stream)):n.name=null;r.name==="sfnt"&&(this.sfnt=r)}}}Ny(nc);Ny(fat);Ny(Aat);Ny(Cat);Ny(_at);var M_,Eq;function jat(){if(Eq)return M_;Eq=1;function e(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}return M_=e,M_}var Dat=jat();const Tat=hi(Dat);var gd={},Q_={},Cq;function eB(){return Cq||(Cq=1,(function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function r(a,s){return Object.prototype.hasOwnProperty.call(a,s)}e.assign=function(a){for(var s=Array.prototype.slice.call(arguments,1);s.length;){var l=s.shift();if(l){if(typeof l!="object")throw new TypeError(l+"must be non-object");for(var c in l)r(l,c)&&(a[c]=l[c])}}return a},e.shrinkBuf=function(a,s){return a.length===s?a:a.subarray?a.subarray(0,s):(a.length=s,a)};var n={arraySet:function(a,s,l,c,u){if(s.subarray&&a.subarray){a.set(s.subarray(l,l+c),u);return}for(var d=0;d=0;)de[st]=0}var s=0,l=1,c=2,u=3,d=258,f=29,m=256,g=m+1+f,A=30,v=19,b=2*g+1,E=15,I=16,S=7,_=256,B=16,T=17,P=18,O=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],W=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R=512,$=new Array((g+2)*2);a($);var X=new Array(A*2);a(X);var Z=new Array(R);a(Z);var K=new Array(d-u+1);a(K);var q=new Array(f);a(q);var Y=new Array(A);a(Y);function ne(de,st,gt,ve,ce){this.static_tree=de,this.extra_bits=st,this.extra_base=gt,this.elems=ve,this.max_length=ce,this.has_stree=de&&de.length}var ge,ae,pe;function _e(de,st){this.dyn_tree=de,this.max_code=0,this.stat_desc=st}function we(de){return de<256?Z[de]:Z[256+(de>>>7)]}function xe(de,st){de.pending_buf[de.pending++]=st&255,de.pending_buf[de.pending++]=st>>>8&255}function Me(de,st,gt){de.bi_valid>I-gt?(de.bi_buf|=st<>I-de.bi_valid,de.bi_valid+=gt-I):(de.bi_buf|=st<>>=1,gt<<=1;while(--st>0);return gt>>>1}function me(de){de.bi_valid===16?(xe(de,de.bi_buf),de.bi_buf=0,de.bi_valid=0):de.bi_valid>=8&&(de.pending_buf[de.pending++]=de.bi_buf&255,de.bi_buf>>=8,de.bi_valid-=8)}function Se(de,st){var gt=st.dyn_tree,ve=st.max_code,ce=st.stat_desc.static_tree,Ge=st.stat_desc.has_stree,ie=st.stat_desc.extra_bits,at=st.stat_desc.extra_base,bt=st.stat_desc.max_length,U,Re,He,se,be,We,er=0;for(se=0;se<=E;se++)de.bl_count[se]=0;for(gt[de.heap[de.heap_max]*2+1]=0,U=de.heap_max+1;Ubt&&(se=bt,er++),gt[Re*2+1]=se,!(Re>ve)&&(de.bl_count[se]++,be=0,Re>=at&&(be=ie[Re-at]),We=gt[Re*2],de.opt_len+=We*(se+be),Ge&&(de.static_len+=We*(ce[Re*2+1]+be)));if(er!==0){do{for(se=bt-1;de.bl_count[se]===0;)se--;de.bl_count[se]--,de.bl_count[se+1]+=2,de.bl_count[bt]--,er-=2}while(er>0);for(se=bt;se!==0;se--)for(Re=de.bl_count[se];Re!==0;)He=de.heap[--U],!(He>ve)&&(gt[He*2+1]!==se&&(de.opt_len+=(se-gt[He*2+1])*gt[He*2],gt[He*2+1]=se),Re--)}}function Ie(de,st,gt){var ve=new Array(E+1),ce=0,Ge,ie;for(Ge=1;Ge<=E;Ge++)ve[Ge]=ce=ce+gt[Ge-1]<<1;for(ie=0;ie<=st;ie++){var at=de[ie*2+1];at!==0&&(de[ie*2]=Ee(ve[at]++,at))}}function Be(){var de,st,gt,ve,ce,Ge=new Array(E+1);for(gt=0,ve=0;ve>=7;ve8?xe(de,de.bi_buf):de.bi_valid>0&&(de.pending_buf[de.pending++]=de.bi_buf),de.bi_buf=0,de.bi_valid=0}function he(de,st,gt,ve){ke(de),xe(de,gt),xe(de,~gt),e.arraySet(de.pending_buf,de.window,st,gt,de.pending),de.pending+=gt}function Le(de,st,gt,ve){var ce=st*2,Ge=gt*2;return de[ce]>1;ie>=1;ie--)Ye(de,gt,ie);U=Ge;do ie=de.heap[1],de.heap[1]=de.heap[de.heap_len--],Ye(de,gt,1),at=de.heap[1],de.heap[--de.heap_max]=ie,de.heap[--de.heap_max]=at,gt[U*2]=gt[ie*2]+gt[at*2],de.depth[U]=(de.depth[ie]>=de.depth[at]?de.depth[ie]:de.depth[at])+1,gt[ie*2+1]=gt[at*2+1]=U,de.heap[1]=U++,Ye(de,gt,1);while(de.heap_len>=2);de.heap[--de.heap_max]=de.heap[1],Se(de,st),Ie(gt,bt,de.bl_count)}function vt(de,st,gt){var ve,ce=-1,Ge,ie=st[1],at=0,bt=7,U=4;for(ie===0&&(bt=138,U=3),st[(gt+1)*2+1]=65535,ve=0;ve<=gt;ve++)Ge=ie,ie=st[(ve+1)*2+1],!(++at=3&&de.bl_tree[W[st]*2+1]===0;st--);return de.opt_len+=3*(st+1)+5+5+4,st}function Ot(de,st,gt,ve){var ce;for(Me(de,st-257,5),Me(de,gt-1,5),Me(de,ve-4,4),ce=0;ce>>=1)if(st&1&&de.dyn_ltree[gt*2]!==0)return r;if(de.dyn_ltree[18]!==0||de.dyn_ltree[20]!==0||de.dyn_ltree[26]!==0)return n;for(gt=32;gt0?(de.strm.data_type===i&&(de.strm.data_type=Wt(de)),it(de,de.l_desc),it(de,de.d_desc),ie=Qt(de),ce=de.opt_len+3+7>>>3,Ge=de.static_len+3+7>>>3,Ge<=ce&&(ce=Ge)):ce=Ge=gt+5,gt+4<=ce&&st!==-1?Ht(de,st,gt,ve):de.strategy===t||Ge===ce?(Me(de,(l<<1)+(ve?1:0),3),Oe(de,$,X)):(Me(de,(c<<1)+(ve?1:0),3),Ot(de,de.l_desc.max_code+1,de.d_desc.max_code+1,ie+1),Oe(de,de.dyn_ltree,de.dyn_dtree)),Xe(de),ve&&ke(de)}function pr(de,st,gt){return de.pending_buf[de.d_buf+de.last_lit*2]=st>>>8&255,de.pending_buf[de.d_buf+de.last_lit*2+1]=st&255,de.pending_buf[de.l_buf+de.last_lit]=gt&255,de.last_lit++,st===0?de.dyn_ltree[gt*2]++:(de.matches++,st--,de.dyn_ltree[(K[gt]+m+1)*2]++,de.dyn_dtree[we(st)*2]++),de.last_lit===de.lit_bufsize-1}return gA._tr_init=xr,gA._tr_stored_block=Ht,gA._tr_flush_block=hr,gA._tr_tally=pr,gA._tr_align=Yt,gA}var L_,Sq;function _me(){if(Sq)return L_;Sq=1;function e(t,r,n,i){for(var a=t&65535|0,s=t>>>16&65535|0,l=0;n!==0;){l=n>2e3?2e3:n,n-=l;do a=a+r[i++]|0,s=s+a|0;while(--l);a%=65521,s%=65521}return a|s<<16|0}return L_=e,L_}var U_,Bq;function jme(){if(Bq)return U_;Bq=1;function e(){for(var n,i=[],a=0;a<256;a++){n=a;for(var s=0;s<8;s++)n=n&1?3988292384^n>>>1:n>>>1;i[a]=n}return i}var t=e();function r(n,i,a,s){var l=t,c=s+a;n^=-1;for(var u=s;u>>8^l[(n^i[u])&255];return n^-1}return U_=r,U_}var $_,Nq;function Oat(){return Nq||(Nq=1,$_={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}),$_}var kq;function Rat(){if(kq)return gd;kq=1;var e=eB(),t=Pat(),r=_me(),n=jme(),i=Oat(),a=0,s=1,l=3,c=4,u=5,d=0,f=1,m=-2,g=-3,A=-5,v=-1,b=1,E=2,I=3,S=4,_=0,B=2,T=8,P=9,O=15,z=8,L=29,W=256,R=W+1+L,$=30,X=19,Z=2*R+1,K=15,q=3,Y=258,ne=Y+q+1,ge=32,ae=42,pe=69,_e=73,we=91,xe=103,Me=113,ye=666,Ee=1,me=2,Se=3,Ie=4,Be=3;function Xe(U,Re){return U.msg=i[Re],Re}function ke(U){return(U<<1)-(U>4?9:0)}function he(U){for(var Re=U.length;--Re>=0;)U[Re]=0}function Le(U){var Re=U.state,He=Re.pending;He>U.avail_out&&(He=U.avail_out),He!==0&&(e.arraySet(U.output,Re.pending_buf,Re.pending_out,He,U.next_out),U.next_out+=He,Re.pending_out+=He,U.total_out+=He,U.avail_out-=He,Re.pending-=He,Re.pending===0&&(Re.pending_out=0))}function Ye(U,Re){t._tr_flush_block(U,U.block_start>=0?U.block_start:-1,U.strstart-U.block_start,Re),U.block_start=U.strstart,Le(U.strm)}function Oe(U,Re){U.pending_buf[U.pending++]=Re}function it(U,Re){U.pending_buf[U.pending++]=Re>>>8&255,U.pending_buf[U.pending++]=Re&255}function vt(U,Re,He,se){var be=U.avail_in;return be>se&&(be=se),be===0?0:(U.avail_in-=be,e.arraySet(Re,U.input,U.next_in,be,He),U.state.wrap===1?U.adler=r(U.adler,Re,be,He):U.state.wrap===2&&(U.adler=n(U.adler,Re,be,He)),U.next_in+=be,U.total_in+=be,be)}function mt(U,Re){var He=U.max_chain_length,se=U.strstart,be,We,er=U.prev_length,zt=U.nice_match,Te=U.strstart>U.w_size-ne?U.strstart-(U.w_size-ne):0,jt=U.window,$r=U.w_mask,Br=U.prev,rr=U.strstart+Y,Ne=jt[se+er-1],St=jt[se+er];U.prev_length>=U.good_match&&(He>>=2),zt>U.lookahead&&(zt=U.lookahead);do if(be=Re,!(jt[be+er]!==St||jt[be+er-1]!==Ne||jt[be]!==jt[se]||jt[++be]!==jt[se+1])){se+=2,be++;do;while(jt[++se]===jt[++be]&&jt[++se]===jt[++be]&&jt[++se]===jt[++be]&&jt[++se]===jt[++be]&&jt[++se]===jt[++be]&&jt[++se]===jt[++be]&&jt[++se]===jt[++be]&&jt[++se]===jt[++be]&&seer){if(U.match_start=Re,er=We,We>=zt)break;Ne=jt[se+er-1],St=jt[se+er]}}while((Re=Br[Re&$r])>Te&&--He!==0);return er<=U.lookahead?er:U.lookahead}function Qt(U){var Re=U.w_size,He,se,be,We,er;do{if(We=U.window_size-U.lookahead-U.strstart,U.strstart>=Re+(Re-ne)){e.arraySet(U.window,U.window,Re,Re,0),U.match_start-=Re,U.strstart-=Re,U.block_start-=Re,se=U.hash_size,He=se;do be=U.head[--He],U.head[He]=be>=Re?be-Re:0;while(--se);se=Re,He=se;do be=U.prev[--He],U.prev[He]=be>=Re?be-Re:0;while(--se);We+=Re}if(U.strm.avail_in===0)break;if(se=vt(U.strm,U.window,U.strstart+U.lookahead,We),U.lookahead+=se,U.lookahead+U.insert>=q)for(er=U.strstart-U.insert,U.ins_h=U.window[er],U.ins_h=(U.ins_h<U.pending_buf_size-5&&(He=U.pending_buf_size-5);;){if(U.lookahead<=1){if(Qt(U),U.lookahead===0&&Re===a)return Ee;if(U.lookahead===0)break}U.strstart+=U.lookahead,U.lookahead=0;var se=U.block_start+He;if((U.strstart===0||U.strstart>=se)&&(U.lookahead=U.strstart-se,U.strstart=se,Ye(U,!1),U.strm.avail_out===0)||U.strstart-U.block_start>=U.w_size-ne&&(Ye(U,!1),U.strm.avail_out===0))return Ee}return U.insert=0,Re===c?(Ye(U,!0),U.strm.avail_out===0?Se:Ie):(U.strstart>U.block_start&&(Ye(U,!1),U.strm.avail_out===0),Ee)}function Wt(U,Re){for(var He,se;;){if(U.lookahead=q&&(U.ins_h=(U.ins_h<=q)if(se=t._tr_tally(U,U.strstart-U.match_start,U.match_length-q),U.lookahead-=U.match_length,U.match_length<=U.max_lazy_match&&U.lookahead>=q){U.match_length--;do U.strstart++,U.ins_h=(U.ins_h<=q&&(U.ins_h=(U.ins_h<4096)&&(U.match_length=q-1)),U.prev_length>=q&&U.match_length<=U.prev_length){be=U.strstart+U.lookahead-q,se=t._tr_tally(U,U.strstart-1-U.prev_match,U.prev_length-q),U.lookahead-=U.prev_length-1,U.prev_length-=2;do++U.strstart<=be&&(U.ins_h=(U.ins_h<=q&&U.strstart>0&&(be=U.strstart-1,se=er[be],se===er[++be]&&se===er[++be]&&se===er[++be])){We=U.strstart+Y;do;while(se===er[++be]&&se===er[++be]&&se===er[++be]&&se===er[++be]&&se===er[++be]&&se===er[++be]&&se===er[++be]&&se===er[++be]&&beU.lookahead&&(U.match_length=U.lookahead)}if(U.match_length>=q?(He=t._tr_tally(U,1,U.match_length-q),U.lookahead-=U.match_length,U.strstart+=U.match_length,U.match_length=0):(He=t._tr_tally(U,0,U.window[U.strstart]),U.lookahead--,U.strstart++),He&&(Ye(U,!1),U.strm.avail_out===0))return Ee}return U.insert=0,Re===c?(Ye(U,!0),U.strm.avail_out===0?Se:Ie):U.last_lit&&(Ye(U,!1),U.strm.avail_out===0)?Ee:me}function Ht(U,Re){for(var He;;){if(U.lookahead===0&&(Qt(U),U.lookahead===0)){if(Re===a)return Ee;break}if(U.match_length=0,He=t._tr_tally(U,0,U.window[U.strstart]),U.lookahead--,U.strstart++,He&&(Ye(U,!1),U.strm.avail_out===0))return Ee}return U.insert=0,Re===c?(Ye(U,!0),U.strm.avail_out===0?Se:Ie):U.last_lit&&(Ye(U,!1),U.strm.avail_out===0)?Ee:me}function Yt(U,Re,He,se,be){this.good_length=U,this.max_lazy=Re,this.nice_length=He,this.max_chain=se,this.func=be}var hr;hr=[new Yt(0,0,0,0,Ot),new Yt(4,4,8,4,Wt),new Yt(4,5,16,8,Wt),new Yt(4,6,32,32,Wt),new Yt(4,4,16,16,Vt),new Yt(8,16,32,32,Vt),new Yt(8,16,128,128,Vt),new Yt(8,32,128,256,Vt),new Yt(32,128,258,1024,Vt),new Yt(32,258,258,4096,Vt)];function pr(U){U.window_size=2*U.w_size,he(U.head),U.max_lazy_match=hr[U.level].max_lazy,U.good_match=hr[U.level].good_length,U.nice_match=hr[U.level].nice_length,U.max_chain_length=hr[U.level].max_chain,U.strstart=0,U.block_start=0,U.lookahead=0,U.insert=0,U.match_length=U.prev_length=q-1,U.match_available=0,U.ins_h=0}function de(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=T,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new e.Buf16(Z*2),this.dyn_dtree=new e.Buf16((2*$+1)*2),this.bl_tree=new e.Buf16((2*X+1)*2),he(this.dyn_ltree),he(this.dyn_dtree),he(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new e.Buf16(K+1),this.heap=new e.Buf16(2*R+1),he(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new e.Buf16(2*R+1),he(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function st(U){var Re;return!U||!U.state?Xe(U,m):(U.total_in=U.total_out=0,U.data_type=B,Re=U.state,Re.pending=0,Re.pending_out=0,Re.wrap<0&&(Re.wrap=-Re.wrap),Re.status=Re.wrap?ae:Me,U.adler=Re.wrap===2?0:1,Re.last_flush=a,t._tr_init(Re),d)}function gt(U){var Re=st(U);return Re===d&&pr(U.state),Re}function ve(U,Re){return!U||!U.state||U.state.wrap!==2?m:(U.state.gzhead=Re,d)}function ce(U,Re,He,se,be,We){if(!U)return m;var er=1;if(Re===v&&(Re=6),se<0?(er=0,se=-se):se>15&&(er=2,se-=16),be<1||be>P||He!==T||se<8||se>15||Re<0||Re>9||We<0||We>S)return Xe(U,m);se===8&&(se=9);var zt=new de;return U.state=zt,zt.strm=U,zt.wrap=er,zt.gzhead=null,zt.w_bits=se,zt.w_size=1<u||Re<0)return U?Xe(U,m):m;if(se=U.state,!U.output||!U.input&&U.avail_in!==0||se.status===ye&&Re!==c)return Xe(U,U.avail_out===0?A:m);if(se.strm=U,He=se.last_flush,se.last_flush=Re,se.status===ae)if(se.wrap===2)U.adler=0,Oe(se,31),Oe(se,139),Oe(se,8),se.gzhead?(Oe(se,(se.gzhead.text?1:0)+(se.gzhead.hcrc?2:0)+(se.gzhead.extra?4:0)+(se.gzhead.name?8:0)+(se.gzhead.comment?16:0)),Oe(se,se.gzhead.time&255),Oe(se,se.gzhead.time>>8&255),Oe(se,se.gzhead.time>>16&255),Oe(se,se.gzhead.time>>24&255),Oe(se,se.level===9?2:se.strategy>=E||se.level<2?4:0),Oe(se,se.gzhead.os&255),se.gzhead.extra&&se.gzhead.extra.length&&(Oe(se,se.gzhead.extra.length&255),Oe(se,se.gzhead.extra.length>>8&255)),se.gzhead.hcrc&&(U.adler=n(U.adler,se.pending_buf,se.pending,0)),se.gzindex=0,se.status=pe):(Oe(se,0),Oe(se,0),Oe(se,0),Oe(se,0),Oe(se,0),Oe(se,se.level===9?2:se.strategy>=E||se.level<2?4:0),Oe(se,Be),se.status=Me);else{var er=T+(se.w_bits-8<<4)<<8,zt=-1;se.strategy>=E||se.level<2?zt=0:se.level<6?zt=1:se.level===6?zt=2:zt=3,er|=zt<<6,se.strstart!==0&&(er|=ge),er+=31-er%31,se.status=Me,it(se,er),se.strstart!==0&&(it(se,U.adler>>>16),it(se,U.adler&65535)),U.adler=1}if(se.status===pe)if(se.gzhead.extra){for(be=se.pending;se.gzindex<(se.gzhead.extra.length&65535)&&!(se.pending===se.pending_buf_size&&(se.gzhead.hcrc&&se.pending>be&&(U.adler=n(U.adler,se.pending_buf,se.pending-be,be)),Le(U),be=se.pending,se.pending===se.pending_buf_size));)Oe(se,se.gzhead.extra[se.gzindex]&255),se.gzindex++;se.gzhead.hcrc&&se.pending>be&&(U.adler=n(U.adler,se.pending_buf,se.pending-be,be)),se.gzindex===se.gzhead.extra.length&&(se.gzindex=0,se.status=_e)}else se.status=_e;if(se.status===_e)if(se.gzhead.name){be=se.pending;do{if(se.pending===se.pending_buf_size&&(se.gzhead.hcrc&&se.pending>be&&(U.adler=n(U.adler,se.pending_buf,se.pending-be,be)),Le(U),be=se.pending,se.pending===se.pending_buf_size)){We=1;break}se.gzindexbe&&(U.adler=n(U.adler,se.pending_buf,se.pending-be,be)),We===0&&(se.gzindex=0,se.status=we)}else se.status=we;if(se.status===we)if(se.gzhead.comment){be=se.pending;do{if(se.pending===se.pending_buf_size&&(se.gzhead.hcrc&&se.pending>be&&(U.adler=n(U.adler,se.pending_buf,se.pending-be,be)),Le(U),be=se.pending,se.pending===se.pending_buf_size)){We=1;break}se.gzindexbe&&(U.adler=n(U.adler,se.pending_buf,se.pending-be,be)),We===0&&(se.status=xe)}else se.status=xe;if(se.status===xe&&(se.gzhead.hcrc?(se.pending+2>se.pending_buf_size&&Le(U),se.pending+2<=se.pending_buf_size&&(Oe(se,U.adler&255),Oe(se,U.adler>>8&255),U.adler=0,se.status=Me)):se.status=Me),se.pending!==0){if(Le(U),U.avail_out===0)return se.last_flush=-1,d}else if(U.avail_in===0&&ke(Re)<=ke(He)&&Re!==c)return Xe(U,A);if(se.status===ye&&U.avail_in!==0)return Xe(U,A);if(U.avail_in!==0||se.lookahead!==0||Re!==a&&se.status!==ye){var Te=se.strategy===E?Ht(se,Re):se.strategy===I?xr(se,Re):hr[se.level].func(se,Re);if((Te===Se||Te===Ie)&&(se.status=ye),Te===Ee||Te===Se)return U.avail_out===0&&(se.last_flush=-1),d;if(Te===me&&(Re===s?t._tr_align(se):Re!==u&&(t._tr_stored_block(se,0,0,!1),Re===l&&(he(se.head),se.lookahead===0&&(se.strstart=0,se.block_start=0,se.insert=0))),Le(U),U.avail_out===0))return se.last_flush=-1,d}return Re!==c?d:se.wrap<=0?f:(se.wrap===2?(Oe(se,U.adler&255),Oe(se,U.adler>>8&255),Oe(se,U.adler>>16&255),Oe(se,U.adler>>24&255),Oe(se,U.total_in&255),Oe(se,U.total_in>>8&255),Oe(se,U.total_in>>16&255),Oe(se,U.total_in>>24&255)):(it(se,U.adler>>>16),it(se,U.adler&65535)),Le(U),se.wrap>0&&(se.wrap=-se.wrap),se.pending!==0?d:f)}function at(U){var Re;return!U||!U.state?m:(Re=U.state.status,Re!==ae&&Re!==pe&&Re!==_e&&Re!==we&&Re!==xe&&Re!==Me&&Re!==ye?Xe(U,m):(U.state=null,Re===Me?Xe(U,g):d))}function bt(U,Re){var He=Re.length,se,be,We,er,zt,Te,jt,$r;if(!U||!U.state||(se=U.state,er=se.wrap,er===2||er===1&&se.status!==ae||se.lookahead))return m;for(er===1&&(U.adler=r(U.adler,Re,He,0)),se.wrap=0,He>=se.w_size&&(er===0&&(he(se.head),se.strstart=0,se.block_start=0,se.insert=0),$r=new e.Buf8(se.w_size),e.arraySet($r,Re,He-se.w_size,se.w_size,0),Re=$r,He=se.w_size),zt=U.avail_in,Te=U.next_in,jt=U.input,U.avail_in=He,U.next_in=0,U.input=Re,Qt(se);se.lookahead>=q;){be=se.strstart,We=se.lookahead-(q-1);do se.ins_h=(se.ins_h<>>24,b>>>=P,E-=P,P=T>>>16&255,P===0)$[c++]=T&65535;else if(P&16){O=T&65535,P&=15,P&&(E>>=P,E-=P),E<15&&(b+=R[s++]<>>24,b>>>=P,E-=P,P=T>>>16&255,P&16){if(z=T&65535,P&=15,Ef){n.msg="invalid distance too far back",a.mode=e;break e}if(b>>>=P,E-=P,P=c-u,z>P){if(P=z-P,P>g&&a.sane){n.msg="invalid distance too far back",a.mode=e;break e}if(L=0,W=v,A===0){if(L+=m-P,P2;)$[c++]=W[L++],$[c++]=W[L++],$[c++]=W[L++],O-=3;O&&($[c++]=W[L++],O>1&&($[c++]=W[L++]))}else{L=c-z;do $[c++]=$[L++],$[c++]=$[L++],$[c++]=$[L++],O-=3;while(O>2);O&&($[c++]=$[L++],O>1&&($[c++]=$[L++]))}}else if((P&64)===0){T=S[(T&65535)+(b&(1<>3,s-=O,E-=O<<3,b&=(1<=1&&_e[O]===0;O--);if(z>O&&(z=O),O===0)return b[E++]=1<<24|64<<16|0,b[E++]=1<<24|64<<16|0,S.bits=1,0;for(P=1;P0&&(m===i||O!==1))return-1;for(we[1]=0,B=1;Br||m===s&&$>n)return 1;for(;;){ye=B-W,I[T]pe?(Ee=xe[Me+I[T]],me=ge[ae+I[T]]):(Ee=96,me=0),Z=1<>W)+K]=ye<<24|Ee<<16|me|0;while(K!==0);for(Z=1<>=1;if(Z!==0?(X&=Z-1,X+=Z):X=0,T++,--_e[B]===0){if(B===O)break;B=g[A+I[T]]}if(B>z&&(X&Y)!==q){for(W===0&&(W=z),ne+=P,L=B-W,R=1<r||m===s&&$>n)return 1;q=X&Y,b[q]=z<<24|L<<16|ne-E|0}}return X!==0&&(b[ne+X]=B-W<<24|64<<16|0),S.bits=z,0},H_}var Dq;function Uat(){if(Dq)return C0;Dq=1;var e=eB(),t=_me(),r=jme(),n=Qat(),i=Lat(),a=0,s=1,l=2,c=4,u=5,d=6,f=0,m=1,g=2,A=-2,v=-3,b=-4,E=-5,I=8,S=1,_=2,B=3,T=4,P=5,O=6,z=7,L=8,W=9,R=10,$=11,X=12,Z=13,K=14,q=15,Y=16,ne=17,ge=18,ae=19,pe=20,_e=21,we=22,xe=23,Me=24,ye=25,Ee=26,me=27,Se=28,Ie=29,Be=30,Xe=31,ke=32,he=852,Le=592,Ye=15,Oe=Ye;function it(ce){return(ce>>>24&255)+(ce>>>8&65280)+((ce&65280)<<8)+((ce&255)<<24)}function vt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function mt(ce){var Ge;return!ce||!ce.state?A:(Ge=ce.state,ce.total_in=ce.total_out=Ge.total=0,ce.msg="",Ge.wrap&&(ce.adler=Ge.wrap&1),Ge.mode=S,Ge.last=0,Ge.havedict=0,Ge.dmax=32768,Ge.head=null,Ge.hold=0,Ge.bits=0,Ge.lencode=Ge.lendyn=new e.Buf32(he),Ge.distcode=Ge.distdyn=new e.Buf32(Le),Ge.sane=1,Ge.back=-1,f)}function Qt(ce){var Ge;return!ce||!ce.state?A:(Ge=ce.state,Ge.wsize=0,Ge.whave=0,Ge.wnext=0,mt(ce))}function Ot(ce,Ge){var ie,at;return!ce||!ce.state||(at=ce.state,Ge<0?(ie=0,Ge=-Ge):(ie=(Ge>>4)+1,Ge<48&&(Ge&=15)),Ge&&(Ge<8||Ge>15))?A:(at.window!==null&&at.wbits!==Ge&&(at.window=null),at.wrap=ie,at.wbits=Ge,Qt(ce))}function Wt(ce,Ge){var ie,at;return ce?(at=new vt,ce.state=at,at.window=null,ie=Ot(ce,Ge),ie!==f&&(ce.state=null),ie):A}function Vt(ce){return Wt(ce,Oe)}var xr=!0,Ht,Yt;function hr(ce){if(xr){var Ge;for(Ht=new e.Buf32(512),Yt=new e.Buf32(32),Ge=0;Ge<144;)ce.lens[Ge++]=8;for(;Ge<256;)ce.lens[Ge++]=9;for(;Ge<280;)ce.lens[Ge++]=7;for(;Ge<288;)ce.lens[Ge++]=8;for(i(s,ce.lens,0,288,Ht,0,ce.work,{bits:9}),Ge=0;Ge<32;)ce.lens[Ge++]=5;i(l,ce.lens,0,32,Yt,0,ce.work,{bits:5}),xr=!1}ce.lencode=Ht,ce.lenbits=9,ce.distcode=Yt,ce.distbits=5}function pr(ce,Ge,ie,at){var bt,U=ce.state;return U.window===null&&(U.wsize=1<=U.wsize?(e.arraySet(U.window,Ge,ie-U.wsize,U.wsize,0),U.wnext=0,U.whave=U.wsize):(bt=U.wsize-U.wnext,bt>at&&(bt=at),e.arraySet(U.window,Ge,ie-at,bt,U.wnext),at-=bt,at?(e.arraySet(U.window,Ge,ie-at,at,0),U.wnext=at,U.whave=U.wsize):(U.wnext+=bt,U.wnext===U.wsize&&(U.wnext=0),U.whave>>8&255,ie.check=r(ie.check,Sr,2,0),be=0,We=0,ie.mode=_;break}if(ie.flags=0,ie.head&&(ie.head.done=!1),!(ie.wrap&1)||(((be&255)<<8)+(be>>8))%31){ce.msg="incorrect header check",ie.mode=Be;break}if((be&15)!==I){ce.msg="unknown compression method",ie.mode=Be;break}if(be>>>=4,We-=4,dn=(be&15)+8,ie.wbits===0)ie.wbits=dn;else if(dn>ie.wbits){ce.msg="invalid window size",ie.mode=Be;break}ie.dmax=1<>8&1),ie.flags&512&&(Sr[0]=be&255,Sr[1]=be>>>8&255,ie.check=r(ie.check,Sr,2,0)),be=0,We=0,ie.mode=B;case B:for(;We<32;){if(He===0)break e;He--,be+=at[U++]<>>8&255,Sr[2]=be>>>16&255,Sr[3]=be>>>24&255,ie.check=r(ie.check,Sr,4,0)),be=0,We=0,ie.mode=T;case T:for(;We<16;){if(He===0)break e;He--,be+=at[U++]<>8),ie.flags&512&&(Sr[0]=be&255,Sr[1]=be>>>8&255,ie.check=r(ie.check,Sr,2,0)),be=0,We=0,ie.mode=P;case P:if(ie.flags&1024){for(;We<16;){if(He===0)break e;He--,be+=at[U++]<>>8&255,ie.check=r(ie.check,Sr,2,0)),be=0,We=0}else ie.head&&(ie.head.extra=null);ie.mode=O;case O:if(ie.flags&1024&&(Te=ie.length,Te>He&&(Te=He),Te&&(ie.head&&(dn=ie.head.extra_len-ie.length,ie.head.extra||(ie.head.extra=new Array(ie.head.extra_len)),e.arraySet(ie.head.extra,at,U,Te,dn)),ie.flags&512&&(ie.check=r(ie.check,at,Te,U)),He-=Te,U+=Te,ie.length-=Te),ie.length))break e;ie.length=0,ie.mode=z;case z:if(ie.flags&2048){if(He===0)break e;Te=0;do dn=at[U+Te++],ie.head&&dn&&ie.length<65536&&(ie.head.name+=String.fromCharCode(dn));while(dn&&Te>9&1,ie.head.done=!0),ce.adler=ie.check=0,ie.mode=X;break;case R:for(;We<32;){if(He===0)break e;He--,be+=at[U++]<>>=We&7,We-=We&7,ie.mode=me;break}for(;We<3;){if(He===0)break e;He--,be+=at[U++]<>>=1,We-=1,be&3){case 0:ie.mode=K;break;case 1:if(hr(ie),ie.mode=pe,Ge===d){be>>>=2,We-=2;break e}break;case 2:ie.mode=ne;break;case 3:ce.msg="invalid block type",ie.mode=Be}be>>>=2,We-=2;break;case K:for(be>>>=We&7,We-=We&7;We<32;){if(He===0)break e;He--,be+=at[U++]<>>16^65535)){ce.msg="invalid stored block lengths",ie.mode=Be;break}if(ie.length=be&65535,be=0,We=0,ie.mode=q,Ge===d)break e;case q:ie.mode=Y;case Y:if(Te=ie.length,Te){if(Te>He&&(Te=He),Te>se&&(Te=se),Te===0)break e;e.arraySet(bt,at,U,Te,Re),He-=Te,U+=Te,se-=Te,Re+=Te,ie.length-=Te;break}ie.mode=X;break;case ne:for(;We<14;){if(He===0)break e;He--,be+=at[U++]<>>=5,We-=5,ie.ndist=(be&31)+1,be>>>=5,We-=5,ie.ncode=(be&15)+4,be>>>=4,We-=4,ie.nlen>286||ie.ndist>30){ce.msg="too many length or distance symbols",ie.mode=Be;break}ie.have=0,ie.mode=ge;case ge:for(;ie.have>>=3,We-=3}for(;ie.have<19;)ie.lens[ia[ie.have++]]=0;if(ie.lencode=ie.lendyn,ie.lenbits=7,wn={bits:ie.lenbits},Tn=i(a,ie.lens,0,19,ie.lencode,0,ie.work,wn),ie.lenbits=wn.bits,Tn){ce.msg="invalid code lengths set",ie.mode=Be;break}ie.have=0,ie.mode=ae;case ae:for(;ie.have>>24,Ne=Br>>>16&255,St=Br&65535,!(rr<=We);){if(He===0)break e;He--,be+=at[U++]<>>=rr,We-=rr,ie.lens[ie.have++]=St;else{if(St===16){for(qi=rr+2;We>>=rr,We-=rr,ie.have===0){ce.msg="invalid bit length repeat",ie.mode=Be;break}dn=ie.lens[ie.have-1],Te=3+(be&3),be>>>=2,We-=2}else if(St===17){for(qi=rr+3;We>>=rr,We-=rr,dn=0,Te=3+(be&7),be>>>=3,We-=3}else{for(qi=rr+7;We>>=rr,We-=rr,dn=0,Te=11+(be&127),be>>>=7,We-=7}if(ie.have+Te>ie.nlen+ie.ndist){ce.msg="invalid bit length repeat",ie.mode=Be;break}for(;Te--;)ie.lens[ie.have++]=dn}}if(ie.mode===Be)break;if(ie.lens[256]===0){ce.msg="invalid code -- missing end-of-block",ie.mode=Be;break}if(ie.lenbits=9,wn={bits:ie.lenbits},Tn=i(s,ie.lens,0,ie.nlen,ie.lencode,0,ie.work,wn),ie.lenbits=wn.bits,Tn){ce.msg="invalid literal/lengths set",ie.mode=Be;break}if(ie.distbits=6,ie.distcode=ie.distdyn,wn={bits:ie.distbits},Tn=i(l,ie.lens,ie.nlen,ie.ndist,ie.distcode,0,ie.work,wn),ie.distbits=wn.bits,Tn){ce.msg="invalid distances set",ie.mode=Be;break}if(ie.mode=pe,Ge===d)break e;case pe:ie.mode=_e;case _e:if(He>=6&&se>=258){ce.next_out=Re,ce.avail_out=se,ce.next_in=U,ce.avail_in=He,ie.hold=be,ie.bits=We,n(ce,zt),Re=ce.next_out,bt=ce.output,se=ce.avail_out,U=ce.next_in,at=ce.input,He=ce.avail_in,be=ie.hold,We=ie.bits,ie.mode===X&&(ie.back=-1);break}for(ie.back=0;Br=ie.lencode[be&(1<>>24,Ne=Br>>>16&255,St=Br&65535,!(rr<=We);){if(He===0)break e;He--,be+=at[U++]<>Zt)],rr=Br>>>24,Ne=Br>>>16&255,St=Br&65535,!(Zt+rr<=We);){if(He===0)break e;He--,be+=at[U++]<>>=Zt,We-=Zt,ie.back+=Zt}if(be>>>=rr,We-=rr,ie.back+=rr,ie.length=St,Ne===0){ie.mode=Ee;break}if(Ne&32){ie.back=-1,ie.mode=X;break}if(Ne&64){ce.msg="invalid literal/length code",ie.mode=Be;break}ie.extra=Ne&15,ie.mode=we;case we:if(ie.extra){for(qi=ie.extra;We>>=ie.extra,We-=ie.extra,ie.back+=ie.extra}ie.was=ie.length,ie.mode=xe;case xe:for(;Br=ie.distcode[be&(1<>>24,Ne=Br>>>16&255,St=Br&65535,!(rr<=We);){if(He===0)break e;He--,be+=at[U++]<>Zt)],rr=Br>>>24,Ne=Br>>>16&255,St=Br&65535,!(Zt+rr<=We);){if(He===0)break e;He--,be+=at[U++]<>>=Zt,We-=Zt,ie.back+=Zt}if(be>>>=rr,We-=rr,ie.back+=rr,Ne&64){ce.msg="invalid distance code",ie.mode=Be;break}ie.offset=St,ie.extra=Ne&15,ie.mode=Me;case Me:if(ie.extra){for(qi=ie.extra;We>>=ie.extra,We-=ie.extra,ie.back+=ie.extra}if(ie.offset>ie.dmax){ce.msg="invalid distance too far back",ie.mode=Be;break}ie.mode=ye;case ye:if(se===0)break e;if(Te=zt-se,ie.offset>Te){if(Te=ie.offset-Te,Te>ie.whave&&ie.sane){ce.msg="invalid distance too far back",ie.mode=Be;break}Te>ie.wnext?(Te-=ie.wnext,jt=ie.wsize-Te):jt=ie.wnext-Te,Te>ie.length&&(Te=ie.length),$r=ie.window}else $r=bt,jt=Re-ie.offset,Te=ie.length;Te>se&&(Te=se),se-=Te,ie.length-=Te;do bt[Re++]=$r[jt++];while(--Te);ie.length===0&&(ie.mode=_e);break;case Ee:if(se===0)break e;bt[Re++]=ie.length,se--,ie.mode=_e;break;case me:if(ie.wrap){for(;We<32;){if(He===0)break e;He--,be|=at[U++]<>>2]>>>24-P%4*8&255;S[B+P>>>2]|=O<<24-(B+P)%4*8}else for(var z=0;z>>2]=_[z>>>2];return this.sigBytes+=T,this},clamp:function(){var I=this.words,S=this.sigBytes;I[S>>>2]&=4294967295<<32-S%4*8,I.length=n.ceil(S/4)},clone:function(){var I=d.clone.call(this);return I.words=this.words.slice(0),I},random:function(I){for(var S=[],_=0;_>>2]>>>24-T%4*8&255;B.push((P>>>4).toString(16)),B.push((P&15).toString(16))}return B.join("")},parse:function(I){for(var S=I.length,_=[],B=0;B>>3]|=parseInt(I.substr(B,2),16)<<24-B%8*4;return new f.init(_,S/2)}},A=m.Latin1={stringify:function(I){for(var S=I.words,_=I.sigBytes,B=[],T=0;T<_;T++){var P=S[T>>>2]>>>24-T%4*8&255;B.push(String.fromCharCode(P))}return B.join("")},parse:function(I){for(var S=I.length,_=[],B=0;B>>2]|=(I.charCodeAt(B)&255)<<24-B%4*8;return new f.init(_,S)}},v=m.Utf8={stringify:function(I){try{return decodeURIComponent(escape(A.stringify(I)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(I){return A.parse(unescape(encodeURIComponent(I)))}},b=u.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(I){typeof I=="string"&&(I=v.parse(I)),this._data.concat(I),this._nDataBytes+=I.sigBytes},_process:function(I){var S,_=this._data,B=_.words,T=_.sigBytes,P=this.blockSize,O=P*4,z=T/O;I?z=n.ceil(z):z=n.max((z|0)-this._minBufferSize,0);var L=z*P,W=n.min(L*4,T);if(L){for(var R=0;R>>24)&16711935|(S<<24|S>>>8)&4278255360}var _=this._hash.words,B=v[b+0],T=v[b+1],P=v[b+2],O=v[b+3],z=v[b+4],L=v[b+5],W=v[b+6],R=v[b+7],$=v[b+8],X=v[b+9],Z=v[b+10],K=v[b+11],q=v[b+12],Y=v[b+13],ne=v[b+14],ge=v[b+15],ae=_[0],pe=_[1],_e=_[2],we=_[3];ae=f(ae,pe,_e,we,B,7,u[0]),we=f(we,ae,pe,_e,T,12,u[1]),_e=f(_e,we,ae,pe,P,17,u[2]),pe=f(pe,_e,we,ae,O,22,u[3]),ae=f(ae,pe,_e,we,z,7,u[4]),we=f(we,ae,pe,_e,L,12,u[5]),_e=f(_e,we,ae,pe,W,17,u[6]),pe=f(pe,_e,we,ae,R,22,u[7]),ae=f(ae,pe,_e,we,$,7,u[8]),we=f(we,ae,pe,_e,X,12,u[9]),_e=f(_e,we,ae,pe,Z,17,u[10]),pe=f(pe,_e,we,ae,K,22,u[11]),ae=f(ae,pe,_e,we,q,7,u[12]),we=f(we,ae,pe,_e,Y,12,u[13]),_e=f(_e,we,ae,pe,ne,17,u[14]),pe=f(pe,_e,we,ae,ge,22,u[15]),ae=m(ae,pe,_e,we,T,5,u[16]),we=m(we,ae,pe,_e,W,9,u[17]),_e=m(_e,we,ae,pe,K,14,u[18]),pe=m(pe,_e,we,ae,B,20,u[19]),ae=m(ae,pe,_e,we,L,5,u[20]),we=m(we,ae,pe,_e,Z,9,u[21]),_e=m(_e,we,ae,pe,ge,14,u[22]),pe=m(pe,_e,we,ae,z,20,u[23]),ae=m(ae,pe,_e,we,X,5,u[24]),we=m(we,ae,pe,_e,ne,9,u[25]),_e=m(_e,we,ae,pe,O,14,u[26]),pe=m(pe,_e,we,ae,$,20,u[27]),ae=m(ae,pe,_e,we,Y,5,u[28]),we=m(we,ae,pe,_e,P,9,u[29]),_e=m(_e,we,ae,pe,R,14,u[30]),pe=m(pe,_e,we,ae,q,20,u[31]),ae=g(ae,pe,_e,we,L,4,u[32]),we=g(we,ae,pe,_e,$,11,u[33]),_e=g(_e,we,ae,pe,K,16,u[34]),pe=g(pe,_e,we,ae,ne,23,u[35]),ae=g(ae,pe,_e,we,T,4,u[36]),we=g(we,ae,pe,_e,z,11,u[37]),_e=g(_e,we,ae,pe,R,16,u[38]),pe=g(pe,_e,we,ae,Z,23,u[39]),ae=g(ae,pe,_e,we,Y,4,u[40]),we=g(we,ae,pe,_e,B,11,u[41]),_e=g(_e,we,ae,pe,O,16,u[42]),pe=g(pe,_e,we,ae,W,23,u[43]),ae=g(ae,pe,_e,we,X,4,u[44]),we=g(we,ae,pe,_e,q,11,u[45]),_e=g(_e,we,ae,pe,ge,16,u[46]),pe=g(pe,_e,we,ae,P,23,u[47]),ae=A(ae,pe,_e,we,B,6,u[48]),we=A(we,ae,pe,_e,R,10,u[49]),_e=A(_e,we,ae,pe,ne,15,u[50]),pe=A(pe,_e,we,ae,L,21,u[51]),ae=A(ae,pe,_e,we,q,6,u[52]),we=A(we,ae,pe,_e,O,10,u[53]),_e=A(_e,we,ae,pe,Z,15,u[54]),pe=A(pe,_e,we,ae,T,21,u[55]),ae=A(ae,pe,_e,we,$,6,u[56]),we=A(we,ae,pe,_e,ge,10,u[57]),_e=A(_e,we,ae,pe,W,15,u[58]),pe=A(pe,_e,we,ae,Y,21,u[59]),ae=A(ae,pe,_e,we,z,6,u[60]),we=A(we,ae,pe,_e,K,10,u[61]),_e=A(_e,we,ae,pe,P,15,u[62]),pe=A(pe,_e,we,ae,X,21,u[63]),_[0]=_[0]+ae|0,_[1]=_[1]+pe|0,_[2]=_[2]+_e|0,_[3]=_[3]+we|0},_doFinalize:function(){var v=this._data,b=v.words,E=this._nDataBytes*8,I=v.sigBytes*8;b[I>>>5]|=128<<24-I%32;var S=n.floor(E/4294967296),_=E;b[(I+64>>>9<<4)+15]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,b[(I+64>>>9<<4)+14]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,v.sigBytes=(b.length+1)*4,this._process();for(var B=this._hash,T=B.words,P=0;P<4;P++){var O=T[P];T[P]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}return B},clone:function(){var v=l.clone.call(this);return v._hash=this._hash.clone(),v}});function f(v,b,E,I,S,_,B){var T=v+(b&E|~b&I)+S+B;return(T<<_|T>>>32-_)+b}function m(v,b,E,I,S,_,B){var T=v+(b&I|E&~I)+S+B;return(T<<_|T>>>32-_)+b}function g(v,b,E,I,S,_,B){var T=v+(b^E^I)+S+B;return(T<<_|T>>>32-_)+b}function A(v,b,E,I,S,_,B){var T=v+(E^(b|~I))+S+B;return(T<<_|T>>>32-_)+b}i.MD5=l._createHelper(d),i.HmacMD5=l._createHmacHelper(d)})(Math),r.MD5})})(kE)),kE.exports}var Xat=Dg();const est=hi(Xat);var G_={},Rq;function tst(){return Rq||(Rq=1,(function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(r){var n=typeof Uint8Array<"u"?Uint8Array:Array,i=43,a=47,s=48,l=97,c=65,u=45,d=95;function f(A){var v=A.charCodeAt(0);if(v===i||v===u)return 62;if(v===a||v===d)return 63;if(v0)throw new Error("Invalid string. Length must be a multiple of 4");var B=A.length;S=A.charAt(B-2)==="="?2:A.charAt(B-1)==="="?1:0,_=new n(A.length*3/4-S),E=S>0?A.length-4:A.length;var T=0;function P(O){_[T++]=O}for(v=0,b=0;v>16),P((I&65280)>>8),P(I&255);return S===2?(I=f(A.charAt(v))<<2|f(A.charAt(v+1))>>4,P(I&255)):S===1&&(I=f(A.charAt(v))<<10|f(A.charAt(v+1))<<4|f(A.charAt(v+2))>>2,P(I>>8&255),P(I&255)),_}function g(A){var v,b=A.length%3,E="",I,S;function _(T){return t.charAt(T)}function B(T){return _(T>>18&63)+_(T>>12&63)+_(T>>6&63)+_(T&63)}for(v=0,S=A.length-b;v>2),E+=_(I<<4&63),E+="==";break;case 2:I=(A[A.length-2]<<8)+A[A.length-1],E+=_(I>>10),E+=_(I>>4&63),E+=_(I<<2&63),E+="=";break}return E}r.toByteArray=m,r.fromByteArray=g})(e)})(G_)),G_}var rst=tst();const nst=hi(rst);var Dme={};const ist=5,Fq=12,ast=13,sst=16,ost=17,lst=22,Mq=28,Qq=31,cst=33,jE=34,ust=35,q_=36,yT=37,Tme=38,dst=39,fst=40,v2=41,hst=42,re=0,fe=1,_i=2,Pme=3,je=4,mst=[[je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,je,Pme,je,je,je,je,je,je,je,je,je,je,je],[re,je,je,fe,fe,je,je,je,je,fe,fe,re,re,re,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[re,je,je,fe,fe,je,je,je,je,fe,fe,fe,fe,fe,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[je,je,je,fe,fe,fe,je,je,je,fe,fe,fe,fe,fe,fe,fe,fe,fe,fe,fe,je,_i,je,fe,fe,fe,fe,fe,fe,fe,fe,fe,fe],[fe,je,je,fe,fe,fe,je,je,je,fe,fe,fe,fe,fe,fe,fe,fe,fe,fe,fe,je,_i,je,fe,fe,fe,fe,fe,fe,fe,fe,fe,fe],[re,je,je,fe,fe,fe,je,je,je,re,re,re,re,re,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[re,je,je,fe,fe,fe,je,je,je,re,re,re,re,re,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[re,je,je,fe,fe,fe,je,je,je,re,re,fe,re,fe,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[re,je,je,fe,fe,fe,je,je,je,re,re,fe,fe,fe,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[fe,je,je,fe,fe,fe,je,je,je,re,re,fe,fe,fe,fe,fe,fe,fe,re,re,je,_i,je,fe,fe,fe,fe,fe,re,fe,fe,fe,re],[fe,je,je,fe,fe,fe,je,je,je,re,re,fe,fe,fe,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[fe,je,je,fe,fe,fe,je,je,je,fe,fe,fe,fe,fe,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[fe,je,je,fe,fe,fe,je,je,je,fe,fe,fe,fe,fe,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[fe,je,je,fe,fe,fe,je,je,je,fe,fe,fe,fe,fe,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[re,je,je,fe,fe,fe,je,je,je,re,fe,re,re,re,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[re,je,je,fe,fe,fe,je,je,je,re,re,re,re,re,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[re,je,je,fe,re,fe,je,je,je,re,re,fe,re,re,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[re,je,je,fe,re,fe,je,je,je,re,re,re,re,re,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[fe,je,je,fe,fe,fe,je,je,je,fe,fe,fe,fe,fe,fe,fe,fe,fe,fe,fe,je,_i,je,fe,fe,fe,fe,fe,fe,fe,fe,fe,re],[re,je,je,fe,fe,fe,je,je,je,re,re,re,re,re,re,fe,fe,fe,re,je,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,je,re,re,re,re,re,re,re,re,re,re,re,re],[fe,je,je,fe,fe,fe,je,je,je,fe,fe,fe,fe,fe,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[fe,je,je,fe,fe,fe,je,je,je,fe,fe,fe,fe,fe,fe,fe,fe,fe,fe,fe,je,_i,je,fe,fe,fe,fe,fe,fe,fe,fe,fe,fe],[re,je,je,fe,fe,fe,je,je,je,re,fe,re,re,re,re,fe,fe,fe,re,re,je,_i,je,re,re,re,fe,fe,re,re,re,fe,re],[re,je,je,fe,fe,fe,je,je,je,re,fe,re,re,re,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,fe,re,re,re,fe,re],[re,je,je,fe,fe,fe,je,je,je,re,fe,re,re,re,re,fe,fe,fe,re,re,je,_i,je,fe,fe,fe,fe,re,re,re,re,fe,re],[re,je,je,fe,fe,fe,je,je,je,re,fe,re,re,re,re,fe,fe,fe,re,re,je,_i,je,re,re,re,fe,fe,re,re,re,fe,re],[re,je,je,fe,fe,fe,je,je,je,re,fe,re,re,re,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,fe,re,re,re,fe,re],[re,je,je,fe,fe,fe,je,je,je,re,re,re,re,re,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,fe,re,re,fe,re],[re,je,je,fe,fe,fe,je,je,je,re,fe,re,re,re,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,fe,fe,re],[re,je,je,fe,fe,fe,je,je,je,re,fe,re,re,re,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[fe,je,je,fe,fe,fe,je,je,je,fe,fe,fe,fe,fe,re,fe,fe,fe,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re],[re,je,je,fe,fe,re,je,je,je,re,re,re,re,re,re,re,re,re,re,re,je,_i,je,re,re,re,re,re,re,re,re,fe,re]],pst=nst.toByteArray("AAgOAAAAAAAQ4QAAAQ0P8vDtnQuMXUUZx+eyu7d7797d9m5bHoWltKVUlsjLWE0VJNigQoMVqkStEoNQQUl5GIo1KKmogEgqkKbBRki72lYabZMGKoGAjQRtJJDaCCIRiiigREBQS3z+xzOTnZ3O+3HOhd5NfpkzZx7fN9988zivu2M9hGwB28F94DnwEngd/Asc1EtIs9c/bIPDwCxwLDgezHcodyo4w5C+CCwBS8FnwSXgCnA1uFbI93XwbXAbWAfWgx+C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Q9w59x2uMfqI8/q5eKh/l9cb2rwsu9rSNl06ZP2Pmxtz+rNMx93yno0n2/82rVH7rQ+y9P15H6FyRun9ViH81ATmffI7nJ5r8uXXW6enbP6b/B8/l5OifVHYLnb9S39s2zcc+Ph+rh8+eQgVPS72elzGWY/tUtbbabBpDiI7yN1q6/4th2y+ErAc5+9BVvu/7KamJbWNZeuqI/R4tRf+YyD1HmOZM1bMV3/14Sn10c0Xu+Sj1nOXb5jL73ncdy02uvlXZNde65dOHYl7Vs4KYuS6FzWLn2zJlpZqPXPVPOa5yzKOyn1VhT9lmMfdbfH7D11Wf2PXN5h9y+dD287+qxgSnaYmnIrRtIb8pJe6/Uv9OVer6Whn0zfGO/BEloZI9ojmfAlUflClDd178bTmVHVTpZXOkAlk/lb42UujmI89HH5V+cl7XtowY6vTxLVWok6UrGzoGTHN+bB+6ri05687VNpvfuvRfaP2uMlNQth1D5JjGelm/8yn+9p3p/7qk9gnfeddXZmq/Sm333PJT659Kv1zjNbZ9uv2Oi//67CV8/N1nj1DmviyXDNVeJkaeaX8UsyesYg8cu2+NvdaPfb+lLDu5tvt/"),gst=new n5(pst),Lq=function(e){switch(e){case cst:return Fq;case dst:case fst:case hst:return Fq;case ust:return ist;default:return e}},Uq=function(e){switch(e){case yT:case Tme:return jE;case v2:return lst;default:return e}};class K_{constructor(t,r=!1){this.position=t,this.required=r}}class Ast{nextCodePoint(){const t=this.string.charCodeAt(this.pos++),r=this.string.charCodeAt(this.pos);return 55296<=t&&t<=56319&&56320<=r&&r<=57343?(this.pos++,(t-55296)*1024+(r-56320)+65536):t}nextCharClass(){return Lq(gst.get(this.nextCodePoint()))}getSimpleBreak(){switch(this.nextClass){case v2:return!1;case jE:case yT:case Tme:return this.curClass=jE,!1;case q_:return this.curClass=q_,!1}return null}getPairTableBreak(t){let r=!1;switch(mst[this.curClass][this.nextClass]){case re:r=!0;break;case fe:r=t===v2;break;case _i:if(r=t===v2,!r)return r=!1,r;break;case Pme:if(t!==v2)return r;break}return this.LB8a&&(r=!1),this.LB21a&&(this.curClass===sst||this.curClass===ost)?(r=!1,this.LB21a=!1):this.LB21a=this.curClass===ast,this.curClass===Mq?(this.LB30a++,this.LB30a==2&&this.nextClass===Mq&&(r=!0,this.LB30a=0)):this.LB30a=0,this.curClass=this.nextClass,r}nextBreak(){if(this.curClass==null){let t=this.nextCharClass();this.curClass=Uq(t),this.nextClass=t,this.LB8a=t===Qq,this.LB30a=0}for(;this.pos"DAC",length:nl,tables:new Ve(vst,e=>e.length/2)},Ome=(e,t)=>e[t],$q=(e,t)=>e[t]<<8|e[t+1],zq=(e,t)=>e[t]|e[t+1]<<8,V_=(e,t)=>Rme(e,t)>>>0,Y_=(e,t)=>Fme(e,t)>>>0,Hq=e=>Array.from(e,t=>t.toString(16).padStart(2,"0")).join(""),yst=new TextDecoder("utf-8"),bst=e=>yst.decode(e),wst=e=>{const t=e.reduce((i,a)=>i+a.length,0),r=new Uint8Array(t);let n=0;return e.forEach(i=>{r.set(i,n),n+=i.length}),r},Rme=(e,t)=>e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],Fme=(e,t)=>e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24;class Est{decode(t,r){const n={};let i=t.buffer.slice(t.pos,t.pos+r.length-2);for(;i.length>0;){let a=1;const s=[],l=Ome(i,0),c=i.slice(a,a+16);a+=16;for(const u of c)s.push(i.slice(a,a+u)),a+=u;i=i.slice(a),n[l]=wst(s)}return t.pos+=r.length-2,n}}const Cst={name:()=>"DHT",length:nl,tables:new Est},Ist={name:()=>"DQT",length:nl,tables:new Ve(new ct({identifier:new Rl(1),data:new Rl(64)}),e=>(e.length-2)/65)},Sst={name:()=>"DRI",length:nl,restartInterval:nl},Bst={name:()=>"EOI",afterEOI:new Ia(tr,1/0)},Z_={ifd:{"010e":"imageDescription","010f":"make","011a":"xResolution","011b":"yResolution","011c":"planarConfiguration","012d":"transferFunction","013b":"artist","013e":"whitePoint","013f":"primaryChromaticities","0100":"imageWidth","0101":"imageHeight","0102":"bitsPerSample","0103":"compression","0106":"photometricInterpretation","0110":"model","0111":"stripOffsets","0112":"orientation","0115":"samplesPerPixel","0116":"rowsPerStrip","0117":"stripByteCounts","0128":"resolutionUnit","0131":"software","0132":"dateTime","0201":"jpegInterchangeFormat","0202":"jpegInterchangeFormatLength","0211":"ycbCrCoefficients","0212":"ycbCrSubSampling","0213":"ycbCrPositioning","0214":"referenceBlackWhite","829a":"exposureTime","829d":"fNumber","920a":"focalLength","927c":"makerNote",8298:"copyright",8769:"exifIFDPointer",8822:"exposureProgram",8824:"spectralSensitivity",8825:"gpsInfoIFDPointer",8827:"photographicSensitivity",8828:"oecf",8830:"sensitivityType",8831:"standardOutputSensitivity",8832:"recommendedExposureIndex",8833:"isoSpeed",8834:"isoSpeedLatitudeyyy",8835:"isoSpeedLatitudezzz",9e3:"exifVersion",9003:"dateTimeOriginal",9004:"dateTimeDigitized",9101:"componentsConfiguration",9102:"compressedBitsPerPixel",9201:"shutterSpeedValue",9202:"apertureValue",9203:"brightnessValue",9204:"exposureBiasValue",9205:"maxApertureValue",9206:"subjectDistance",9207:"meteringMode",9208:"lightSource",9209:"flash",9214:"subjectArea",9286:"userComment",9290:"subSecTime",9291:"subSecTimeOriginal",9292:"subSecTimeDigitized",a000:"flashpixVersion",a001:"colorSpace",a002:"pixelXDimension",a003:"pixelYDimension",a004:"relatedSoundFile",a005:"interoperabilityIFDPointer",a20b:"flashEnergy",a20c:"spatialFrequencyResponse",a20e:"focalPlaneXResolution",a20f:"focalPlaneYResolution",a40a:"sharpness",a40b:"deviceSettingDescription",a40c:"subjectDistanceRange",a210:"focalPlaneResolutionUnit",a214:"subjectLocation",a215:"exposureIndex",a217:"sensingMethod",a300:"fileSource",a301:"sceneType",a302:"cfaPattern",a401:"customRendered",a402:"exposureMode",a403:"whiteBalance",a404:"digitalZoomRatio",a405:"focalLengthIn35mmFilm",a406:"sceneCaptureType",a407:"gainControl",a408:"contrast",a409:"saturation",a420:"imageUniqueID",a430:"cameraOwnerName",a431:"bodySerialNumber",a432:"lensSpecification",a433:"lensMake",a434:"lensModel",a435:"lensSerialNumber",a500:"gamma"},gps:{"0000":"gpsVersionID","0001":"gpsLatitudeRef","0002":"gpsLatitude","0003":"gpsLongitudeRef","0004":"gpsLongitude","0005":"gpsAltitudeRef","0006":"gpsAltitude","0007":"gpsTimeStamp","0008":"gpsSatellites","0009":"gpsStatus","000a":"gpsMeasureMode","000b":"gpsDOP","000c":"gpsSpeedRef","000d":"gpsSpeed","000e":"gpsTrackRef","000f":"gpsTrack","0010":"gpsImgDirectionRef","0011":"gpsImgDirection","0012":"gpsMapDatum","0013":"gpsDestLatitudeRef","0014":"gpsDestLatitude","0015":"gpsDestLongitudeRef","0016":"gpsDestLongitude","0017":"gpsDestBearingRef","0018":"gpsDestBearing","0019":"gpsDestDistanceRef","001a":"gpsDestDistance","001b":"gpsProcessingMethod","001c":"gpsAreaInformation","001d":"gpsDateStamp","001e":"gpsDifferential","001f":"gpsHPositioningError"}};class Nst{constructor(t){this.bigEndian=t,this.bytes=[0,1,1,2,4,8,1,1,2,4,8,4,8]}_getTagValue(t,r,n){switch(r){case 2:return t.toString("ascii").replace(/\0+$/,"");case 129:return t.toString("utf8").replace(/\0+$/,"");case 7:return"0x"+t.toString("hex");default:return this._getTagValueForNumericalData(t,r,n)}}_getTagValueForNumericalData(t,r,n){const i=[],a=this.bytes[r];for(let s=0;sthis.bigEndian?$q(t,l):zq(t,l),a=l=>this.bigEndian?V_(t,l):Y_(t,l),s=l=>this.bigEndian?Rme(t,l):Fme(t,l);switch(r){case 1:return Ome(t,n);case 3:return i(n);case 4:return a(n);case 5:return a(n)/a(n+4);case 9:return s(n);case 10:return s(n)/s(n+4)}}_decodeIDFEntries(t,r,n,i=!1){let a=2+n;const s={},l=d=>this.bigEndian?$q(t,d):zq(t,d),c=d=>this.bigEndian?V_(t,d):Y_(t,d),u=l(n);for(let d=0;d4){const _=this.bigEndian?V_(b,0):Y_(b,0);b=t.slice(_,_+v)}const E=this._getTagValue(b,m,g),I=this.bigEndian?Hq(f):Hq(f.reverse()),S=r[I];s[S]=E,a+=12}return s}decode(t,r){const n=t.buffer.slice(t.pos-8),i=r.offsetToFirstIFD;if(i>n.length)return t.pos+=r.parent.length-16,{};const a=this._decodeIDFEntries(n,Z_.ifd,i),{exifIFDPointer:s,gpsInfoIFDPointer:l}=a;if(s&&(a.subExif=this._decodeIDFEntries(n,Z_.ifd,s)),l){const c=l;a.gpsInfo=this._decodeIDFEntries(n,Z_.gps,c,!0)}return t.pos+=r.parent.length-16,a}}const kst=e=>{const t=e?nl:$Je,r=e?Uhe:HJe;return new ct({fortyTwo:t,offsetToFirstIFD:r,entries:new Nst(e)})};class _st{decode(t,r){const i=bst(t.buffer.slice(t.pos,t.pos+2))==="MM";return t.pos+=2,kst(i).decode(t,r).entries}}const jst={name:()=>"EXIF",length:nl,identifier:new Ti(6),entries:new _st},Dst={name:()=>"JFIF",length:nl,identifier:new Ti(5),version:nl,units:tr,xDensity:nl,yDensity:nl,thumbnailWidth:tr,thumbnailHeight:tr};class Tst{decode(t){const r=t.buffer.slice(t.pos);let n=0,i=r.indexOf(255);for(;i!==-1;){n=i;const a=r[n+1],s=a>=208&&a<=215;if(a!==0&&!s)break;i=r.indexOf(255,i+1)}return t.pos+=n,r.slice(0,n)}}const Pst=new ct({scanComponentSelector:tr,entropyCodingTable:new Rl(1)}),Ost={name:()=>"SOS",length:nl,numberOfImageComponents:tr,componentSpecifications:new Ve(Pst,e=>e.numberOfImageComponents),startOfSpectral:tr,endOfSpectral:tr,successiveApproximationBit:new Rl(1),data:new Tst},Rst=new ct({id:tr,samplingFactors:tr,quantizationTableId:tr}),Nu={name:()=>"SOF",length:nl,precision:tr,height:nl,width:nl,numberOfComponents:tr,components:new Ve(Rst,e=>e.numberOfComponents)},Fst={name:()=>"SOI"},Mst={length:nl,buf:new Rl(e=>e.length-2)},Qst=Array(63).fill(0).reduce((e,t,r)=>({...e,[r+65472]:Mst}),{}),Lst=new On(nl,{...Qst,65472:Nu,65473:Nu,65474:Nu,65475:Nu,65476:Cst,65477:Nu,65478:Nu,65479:Nu,65481:Nu,65482:Nu,65483:Nu,65484:xst,65485:Nu,65486:Nu,65487:Nu,65496:Fst,65497:Bst,65498:Ost,65499:Ist,65501:Sst,65504:Dst,65505:jst}),Ust=new Ve(Lst),$st=e=>Ust.fromBuffer(e).map(({version:r,...n})=>({type:r,...n})),Mme={decode:$st};var w1=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},Bf=[],N0=[],zst=typeof Uint8Array<"u"?Uint8Array:Array,uF=!1;function Qme(){uF=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,r=e.length;t0)throw new Error("Invalid string. Length must be a multiple of 4");a=e[l-2]==="="?2:e[l-1]==="="?1:0,s=new zst(l*3/4-a),n=a>0?l-4:l;var c=0;for(t=0,r=0;t>16&255,s[c++]=i>>8&255,s[c++]=i&255;return a===2?(i=N0[e.charCodeAt(t)]<<2|N0[e.charCodeAt(t+1)]>>4,s[c++]=i&255):a===1&&(i=N0[e.charCodeAt(t)]<<10|N0[e.charCodeAt(t+1)]<<4|N0[e.charCodeAt(t+2)]>>2,s[c++]=i>>8&255,s[c++]=i&255),s}function Wst(e){return Bf[e>>18&63]+Bf[e>>12&63]+Bf[e>>6&63]+Bf[e&63]}function Gst(e,t,r){for(var n,i=[],a=t;ac?c:l+s));return n===1?(t=e[r-1],i+=Bf[t>>2],i+=Bf[t<<4&63],i+="=="):n===2&&(t=(e[r-2]<<8)+e[r-1],i+=Bf[t>>10],i+=Bf[t>>4&63],i+=Bf[t<<2&63],i+="="),a.push(i),a.join("")}function tB(e,t,r,n,i){var a,s,l=i*8-n-1,c=(1<>1,d=-7,f=r?i-1:0,m=r?-1:1,g=e[t+f];for(f+=m,a=g&(1<<-d)-1,g>>=-d,d+=l;d>0;a=a*256+e[t+f],f+=m,d-=8);for(s=a&(1<<-d)-1,a>>=-d,d+=n;d>0;s=s*256+e[t+f],f+=m,d-=8);if(a===0)a=1-u;else{if(a===c)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-u}return(g?-1:1)*s*Math.pow(2,a-n)}function Lme(e,t,r,n,i,a){var s,l,c,u=a*8-i-1,d=(1<>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:a-1,A=n?1:-1,v=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+f>=1?t+=m/c:t+=m*Math.pow(2,1-f),t*c>=2&&(s++,c/=2),s+f>=d?(l=0,s=d):s+f>=1?(l=(t*c-1)*Math.pow(2,i),s=s+f):(l=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+g]=l&255,g+=A,l/=256,i-=8);for(s=s<0;e[r+g]=s&255,g+=A,s/=256,u-=8);e[r+g-A]|=v*128}var qst={}.toString,Ume=Array.isArray||function(e){return qst.call(e)=="[object Array]"};var $me=50;Nt.TYPED_ARRAY_SUPPORT=w1.TYPED_ARRAY_SUPPORT!==void 0?w1.TYPED_ARRAY_SUPPORT:!0;var Kst=r3();function r3(){return Nt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function nm(e,t){if(r3()=r3())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r3().toString(16)+" bytes");return e|0}function Xst(e){return+e!=e&&(e=0),Nt.alloc(+e)}Nt.isBuffer=RA;function ah(e){return!!(e!=null&&e._isBuffer)}Nt.compare=function(t,r){if(!ah(t)||!ah(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var n=t.length,i=r.length,a=0,s=Math.min(n,i);a>>1;case"base64":return Jme(e).length;default:if(n)return n3(e).length;t=(""+t).toLowerCase(),n=!0}}Nt.byteLength=Wme;function eot(e,t,r){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return uot(this,t,r);case"utf8":case"utf-8":return Kme(this,t,r);case"ascii":return lot(this,t,r);case"latin1":case"binary":return cot(this,t,r);case"base64":return sot(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dot(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Nt.prototype._isBuffer=!0;function OA(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}Nt.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""};Nt.prototype.compare=function(t,r,n,i,a){if(!ah(t))throw new TypeError("Argument must be a Buffer");if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;for(var s=a-i,l=n-r,c=Math.min(s,l),u=this.slice(i,a),d=t.slice(r,n),f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=Nt.from(t,n)),ah(t))return t.length===0?-1:Gq(e,t,r,n,i);if(typeof t=="number")return t=t&255,Nt.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Gq(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Gq(e,t,r,n,i){var a=1,s=e.length,l=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(g,A){return a===1?g[A]:g.readUInt16BE(A*a)}var u;if(i){var d=-1;for(u=r;us&&(r=s-l),u=r;u>=0;u--){for(var f=!0,m=0;mi&&(n=i)):n=i;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var s=0;sa)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return tot(this,t,r,n);case"utf8":case"utf-8":return rot(this,t,r,n);case"ascii":return qme(this,t,r,n);case"latin1":case"binary":return not(this,t,r,n);case"base64":return iot(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return aot(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};Nt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function sot(e,t,r){return t===0&&r===e.length?Wq(e):Wq(e.slice(t,r))}function Kme(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:a>223?3:a>191?2:1;if(i+l<=r){var c,u,d,f;switch(l){case 1:a<128&&(s=a);break;case 2:c=e[i+1],(c&192)===128&&(f=(a&31)<<6|c&63,f>127&&(s=f));break;case 3:c=e[i+1],u=e[i+2],(c&192)===128&&(u&192)===128&&(f=(a&15)<<12|(c&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:c=e[i+1],u=e[i+2],d=e[i+3],(c&192)===128&&(u&192)===128&&(d&192)===128&&(f=(a&15)<<18|(c&63)<<12|(u&63)<<6|d&63,f>65535&&f<1114112&&(s=f))}}s===null?(s=65533,l=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=l}return oot(n)}var qq=4096;function oot(e){var t=e.length;if(t<=qq)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var i="",a=t;an&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}Nt.prototype.readUIntLE=function(t,r,n){t=t|0,r=r|0,n||cl(t,r,this.length);for(var i=this[t],a=1,s=0;++s0&&(a*=256);)i+=this[t+--r]*a;return i};Nt.prototype.readUInt8=function(t,r){return r||cl(t,1,this.length),this[t]};Nt.prototype.readUInt16LE=function(t,r){return r||cl(t,2,this.length),this[t]|this[t+1]<<8};Nt.prototype.readUInt16BE=function(t,r){return r||cl(t,2,this.length),this[t]<<8|this[t+1]};Nt.prototype.readUInt32LE=function(t,r){return r||cl(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Nt.prototype.readUInt32BE=function(t,r){return r||cl(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Nt.prototype.readIntLE=function(t,r,n){t=t|0,r=r|0,n||cl(t,r,this.length);for(var i=this[t],a=1,s=0;++s=a&&(i-=Math.pow(2,8*r)),i};Nt.prototype.readIntBE=function(t,r,n){t=t|0,r=r|0,n||cl(t,r,this.length);for(var i=r,a=1,s=this[t+--i];i>0&&(a*=256);)s+=this[t+--i]*a;return a*=128,s>=a&&(s-=Math.pow(2,8*r)),s};Nt.prototype.readInt8=function(t,r){return r||cl(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Nt.prototype.readInt16LE=function(t,r){r||cl(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};Nt.prototype.readInt16BE=function(t,r){r||cl(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};Nt.prototype.readInt32LE=function(t,r){return r||cl(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Nt.prototype.readInt32BE=function(t,r){return r||cl(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Nt.prototype.readFloatLE=function(t,r){return r||cl(t,4,this.length),tB(this,t,!0,23,4)};Nt.prototype.readFloatBE=function(t,r){return r||cl(t,4,this.length),tB(this,t,!1,23,4)};Nt.prototype.readDoubleLE=function(t,r){return r||cl(t,8,this.length),tB(this,t,!0,52,8)};Nt.prototype.readDoubleBE=function(t,r){return r||cl(t,8,this.length),tB(this,t,!1,52,8)};function ru(e,t,r,n,i,a){if(!ah(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}Nt.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;ru(this,t,r,n,a,0)}var s=1,l=0;for(this[r]=t&255;++l=0&&(l*=256);)this[r+s]=t/l&255;return r+n};Nt.prototype.writeUInt8=function(t,r,n){return t=+t,r=r|0,n||ru(this,t,r,1,255,0),Nt.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=t&255,r+1};function rB(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>(n?i:1-i)*8}Nt.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r|0,n||ru(this,t,r,2,65535,0),Nt.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8):rB(this,t,r,!0),r+2};Nt.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r|0,n||ru(this,t,r,2,65535,0),Nt.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t&255):rB(this,t,r,!1),r+2};function nB(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>(n?i:3-i)*8&255}Nt.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r|0,n||ru(this,t,r,4,4294967295,0),Nt.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255):nB(this,t,r,!0),r+4};Nt.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r|0,n||ru(this,t,r,4,4294967295,0),Nt.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255):nB(this,t,r,!1),r+4};Nt.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r|0,!i){var a=Math.pow(2,8*n-1);ru(this,t,r,n,a-1,-a)}var s=0,l=1,c=0;for(this[r]=t&255;++s>0)-c&255;return r+n};Nt.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r|0,!i){var a=Math.pow(2,8*n-1);ru(this,t,r,n,a-1,-a)}var s=n-1,l=1,c=0;for(this[r+s]=t&255;--s>=0&&(l*=256);)t<0&&c===0&&this[r+s+1]!==0&&(c=1),this[r+s]=(t/l>>0)-c&255;return r+n};Nt.prototype.writeInt8=function(t,r,n){return t=+t,r=r|0,n||ru(this,t,r,1,127,-128),Nt.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=t&255,r+1};Nt.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r|0,n||ru(this,t,r,2,32767,-32768),Nt.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8):rB(this,t,r,!0),r+2};Nt.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r|0,n||ru(this,t,r,2,32767,-32768),Nt.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t&255):rB(this,t,r,!1),r+2};Nt.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r|0,n||ru(this,t,r,4,2147483647,-2147483648),Nt.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):nB(this,t,r,!0),r+4};Nt.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r|0,n||ru(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Nt.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255):nB(this,t,r,!1),r+4};function Vme(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Yme(e,t,r,n,i){return i||Vme(e,t,r,4),Lme(e,t,r,n,23,4),r+4}Nt.prototype.writeFloatLE=function(t,r,n){return Yme(this,t,r,!0,n)};Nt.prototype.writeFloatBE=function(t,r,n){return Yme(this,t,r,!1,n)};function Zme(e,t,r,n,i){return i||Vme(e,t,r,8),Lme(e,t,r,n,52,8),r+8}Nt.prototype.writeDoubleLE=function(t,r,n){return Zme(this,t,r,!0,n)};Nt.prototype.writeDoubleBE=function(t,r,n){return Zme(this,t,r,!1,n)};Nt.prototype.copy=function(t,r,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r=0;--s)t[s+r]=this[s+n];else if(a<1e3||!Nt.TYPED_ARRAY_SUPPORT)for(s=0;s>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var s;if(typeof t=="number")for(s=r;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function got(e){for(var t=[],r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function Jme(e){return Hst(hot(e))}function iB(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function vot(e){return e!==e}function RA(e){return e!=null&&(!!e._isBuffer||Xme(e)||xot(e))}function Xme(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function xot(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&Xme(e.slice(0,0))}var yot=Object.freeze({__proto__:null,Buffer:Nt,INSPECT_MAX_BYTES:$me,SlowBuffer:Xst,isBuffer:RA,kMaxLength:Kst});function epe(){throw new Error("setTimeout has not been defined")}function tpe(){throw new Error("clearTimeout has not been defined")}var jp=epe,Dp=tpe;typeof w1.setTimeout=="function"&&(jp=setTimeout);typeof w1.clearTimeout=="function"&&(Dp=clearTimeout);function rpe(e){if(jp===setTimeout)return setTimeout(e,0);if((jp===epe||!jp)&&setTimeout)return jp=setTimeout,setTimeout(e,0);try{return jp(e,0)}catch{try{return jp.call(null,e,0)}catch{return jp.call(this,e,0)}}}function bot(e){if(Dp===clearTimeout)return clearTimeout(e);if((Dp===tpe||!Dp)&&clearTimeout)return Dp=clearTimeout,clearTimeout(e);try{return Dp(e)}catch{try{return Dp.call(null,e)}catch{return Dp.call(this,e)}}}var im=[],ux=!1,FA,DE=-1;function wot(){!ux||!FA||(ux=!1,FA.length?im=FA.concat(im):DE=-1,im.length&&npe())}function npe(){if(!ux){var e=rpe(wot);ux=!0;for(var t=im.length;t;){for(FA=im,im=[];++DE1)for(var r=1;r0&&s.length>i)){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,elt(l)}return e}function elt(e){typeof console.warn=="function"?console.warn(e):console.log(e)}fi.prototype.addListener=function(t,r){return ope(this,t,r,!1)};fi.prototype.on=fi.prototype.addListener;fi.prototype.prependListener=function(t,r){return ope(this,t,r,!0)};function lpe(e,t,r){var n=!1;function i(){e.removeListener(t,i),n||(n=!0,r.apply(e,arguments))}return i.listener=r,i}fi.prototype.once=function(t,r){if(typeof r!="function")throw new TypeError('"listener" argument must be a function');return this.on(t,lpe(this,t,r)),this};fi.prototype.prependOnceListener=function(t,r){if(typeof r!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(t,lpe(this,t,r)),this};fi.prototype.removeListener=function(t,r){var n,i,a,s,l;if(typeof r!="function")throw new TypeError('"listener" argument must be a function');if(i=this._events,!i)return this;if(n=i[t],!n)return this;if(n===r||n.listener&&n.listener===r)--this._eventsCount===0?this._events=new eg:(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(a=-1,s=n.length;s-- >0;)if(n[s]===r||n[s].listener&&n[s].listener===r){l=n[s].listener,a=s;break}if(a<0)return this;if(n.length===1){if(n[0]=void 0,--this._eventsCount===0)return this._events=new eg,this;delete i[t]}else tlt(n,a);i.removeListener&&this.emit("removeListener",t,l||r)}return this};fi.prototype.off=function(e,t){return this.removeListener(e,t)};fi.prototype.removeAllListeners=function(t){var r,n;if(n=this._events,!n)return this;if(!n.removeListener)return arguments.length===0?(this._events=new eg,this._eventsCount=0):n[t]&&(--this._eventsCount===0?this._events=new eg:delete n[t]),this;if(arguments.length===0){for(var i=Object.keys(n),a=0,s;a0?Reflect.ownKeys(this._events):[]};function tlt(e,t){for(var r=t,n=r+1,i=e.length;n=i)return l;switch(l){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}default:return l}}),s=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),lB(t)?r.showHidden=t:t&&AF(r,t),Ff(r.showHidden)&&(r.showHidden=!1),Ff(r.depth)&&(r.depth=2),Ff(r.colors)&&(r.colors=!1),Ff(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=ilt),i3(r,e,r.depth)}jd.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};jd.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function ilt(e,t){var r=jd.styles[t];return r?"\x1B["+jd.colors[r][0]+"m"+e+"\x1B["+jd.colors[r][1]+"m":e}function alt(e,t){return e}function slt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function i3(e,t,r){if(e.customInspect&&t&&ZA(t.inspect)&&t.inspect!==jd&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return d5(n)||(n=i3(e,n,r)),n}var i=olt(e,t);if(i)return i;var a=Object.keys(t),s=slt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),dx(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return X_(t);if(a.length===0){if(ZA(t)){var l=t.name?": "+t.name:"";return e.stylize("[Function"+l+"]","special")}if(YA(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Gx(t))return e.stylize(Date.prototype.toString.call(t),"date");if(dx(t))return X_(t)}var c="",u=!1,d=["{","}"];if(mF(t)&&(u=!0,d=["[","]"]),ZA(t)){var f=t.name?": "+t.name:"";c=" [Function"+f+"]"}if(YA(t)&&(c=" "+RegExp.prototype.toString.call(t)),Gx(t)&&(c=" "+Date.prototype.toUTCString.call(t)),dx(t)&&(c=" "+X_(t)),a.length===0&&(!u||t.length==0))return d[0]+c+d[1];if(r<0)return YA(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var m;return u?m=llt(e,t,r,s,a):m=a.map(function(g){return ET(e,t,r,s,g,u)}),e.seen.pop(),clt(m,c,d)}function olt(e,t){if(Ff(t))return e.stylize("undefined","undefined");if(d5(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(pF(t))return e.stylize(""+t,"number");if(lB(t))return e.stylize(""+t,"boolean");if(u5(t))return e.stylize("null","null")}function X_(e){return"["+Error.prototype.toString.call(e)+"]"}function llt(e,t,r,n,i){for(var a=[],s=0,l=t.length;s-1&&(a?l=l.split(` `).map(function(u){return" "+u}).join(` `).substr(2):l=` `+l.split(` `).map(function(u){return" "+u}).join(` `))):l=e.stylize("[Circular]","special")),Ff(s)){if(a&&i.match(/^\d+$/))return l;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+l}function clt(e,t,r){var n=e.reduce(function(i,a){return a.indexOf(` `)>=0,i+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function mF(e){return Array.isArray(e)}function lB(e){return typeof e=="boolean"}function u5(e){return e===null}function dpe(e){return e==null}function pF(e){return typeof e=="number"}function d5(e){return typeof e=="string"}function fpe(e){return typeof e=="symbol"}function Ff(e){return e===void 0}function YA(e){return G1(e)&&gF(e)==="[object RegExp]"}function G1(e){return typeof e=="object"&&e!==null}function Gx(e){return G1(e)&&gF(e)==="[object Date]"}function dx(e){return G1(e)&&(gF(e)==="[object Error]"||e instanceof Error)}function ZA(e){return typeof e=="function"}function a3(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}function hpe(e){return Nt.isBuffer(e)}function gF(e){return Object.prototype.toString.call(e)}function ej(e){return e<10?"0"+e.toString(10):e.toString(10)}var ult=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function dlt(){var e=new Date,t=[ej(e.getHours()),ej(e.getMinutes()),ej(e.getSeconds())].join(":");return[e.getDate(),ult[e.getMonth()],t].join(" ")}function mpe(){console.log("%s - %s",dlt(),sB.apply(null,arguments))}function AF(e,t){if(!t||!G1(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}function ppe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var EA=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function vF(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(EA&&e[EA]){var t=e[EA];if(typeof t!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,EA,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var r,n,i=new Promise(function(l,c){r=l,n=c}),a=[],s=0;s0?this.tail.next=t:this.head=t,this.tail=t,++this.length};q1.prototype.unshift=function(e){var t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length};q1.prototype.shift=function(){if(this.length!==0){var e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}};q1.prototype.clear=function(){this.head=this.tail=null,this.length=0};q1.prototype.join=function(e){if(this.length===0)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r};q1.prototype.concat=function(e){if(this.length===0)return Nt.alloc(0);if(this.length===1)return this.head.data;for(var t=Nt.allocUnsafe(e>>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t};var plt=Nt.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function glt(e){if(e&&!plt(e))throw new Error("Unknown encoding: "+e)}function f5(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),glt(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=vlt;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=xlt;break;default:this.write=Alt;return}this.charBuffer=new Nt(6),this.charReceived=0,this.charLength=0}f5.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&i<=56319){this.charLength+=this.surrogateSize,t="";continue}if(this.charReceived=this.charLength=0,e.length===0)return t;break}this.detectIncompleteChar(e);var n=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,n),n-=this.charReceived),t+=e.toString(this.encoding,0,n);var n=t.length-1,i=t.charCodeAt(n);if(i>=55296&&i<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),t.substring(0,n)}return t};f5.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(t==1&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t};f5.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t};function Alt(e){return e.toString(this.encoding)}function vlt(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function xlt(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}bs.ReadableState=Ape;var Xi=hF("stream");Lm(bs,fi);function ylt(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function blt(e,t){return e.listeners(t).length}function Ape(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof $u&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16*1024;this.highWaterMark=r||r===0?r:n,this.highWaterMark=~~this.highWaterMark,this.buffer=new q1,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new f5(e.encoding),this.encoding=e.encoding)}function bs(e){if(!(this instanceof bs))return new bs(e);this._readableState=new Ape(e,this),this.readable=!0,e&&typeof e.read=="function"&&(this._read=e.read),fi.call(this)}bs.prototype.push=function(e,t){var r=this._readableState;return!r.objectMode&&typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Nt.from(e,t),t="")),vpe(this,r,e,t,!1)};bs.prototype.unshift=function(e){var t=this._readableState;return vpe(this,t,e,"",!0)};bs.prototype.isPaused=function(){return this._readableState.flowing===!1};function vpe(e,t,r,n,i){var a=Clt(t,r);if(a)e.emit("error",a);else if(r===null)t.reading=!1,Ilt(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var l=new Error("stream.unshift() after end event");e.emit("error",l)}else{var c;t.decoder&&!i&&!n&&(r=t.decoder.write(r),c=!t.objectMode&&r.length===0),i||(t.reading=!1),c||(t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&cB(e))),Slt(e,t)}else i||(t.reading=!1);return wlt(t)}function wlt(e){return!e.ended&&(e.needReadable||e.length=Vq?e=Vq:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function Yq(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=Elt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}bs.prototype.read=function(e){Xi("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return Xi("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?tj(this):cB(this),null;if(e=Yq(e,t),e===0&&t.ended)return t.length===0&&tj(this),null;var n=t.needReadable;Xi("need readable",n),(t.length===0||t.length-e0?i=xpe(e,t):i=null,i===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&tj(this)),i!==null&&this.emit("data",i),i};function Clt(e,t){var r=null;return!Nt.isBuffer(t)&&typeof t!="string"&&t!==null&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function Ilt(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,cB(e)}}function cB(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(Xi("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?qu(Zq,e):Zq(e))}function Zq(e){Xi("emit readable"),e.emit("readable"),xF(e)}function Slt(e,t){t.readingMore||(t.readingMore=!0,qu(Blt,e,t))}function Blt(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length1&&ype(n.pipes,e)!==-1)&&!u&&(Xi("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,f=!0),r.pause())}function g(E){Xi("onerror",E),b(),e.removeListener("error",g),blt(e,"error")===0&&e.emit("error",E)}ylt(e,"error",g);function A(){e.removeListener("finish",v),b()}e.once("close",A);function v(){Xi("onfinish"),e.removeListener("close",A),b()}e.once("finish",v);function b(){Xi("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(Xi("pipe resume"),r.resume()),e};function Nlt(e){return function(){var t=e._readableState;Xi("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&e.listeners("data").length&&(t.flowing=!0,xF(e))}}bs.prototype.unpipe=function(e){var t=this._readableState;if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=Dlt(e,t.buffer,t.decoder),r}function Dlt(e,t,r){var n;return ea.length?a.length:e;if(s===a.length?i+=a:i+=a.slice(0,e),e-=s,e===0){s===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(s));break}++n}return t.length-=n,i}function Plt(e,t){var r=Nt.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var a=n.data,s=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,s),e-=s,e===0){s===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(s));break}++i}return t.length-=i,r}function tj(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,qu(Olt,t,e))}function Olt(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Rlt(e,t){for(var r=0,n=e.length;r-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function Ult(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Nt.from(t,r)),t}function $lt(e,t,r,n,i){r=Ult(t,r,n),Nt.isBuffer(r)&&(n="buffer");var a=t.objectMode?1:r.length;t.length+=a;var s=t.length=0){var s=n.indexOf(` `,a+1);n=n.substring(s+1)}this.stack=n}}}Lm(uB,Error);function oK(e,t){return typeof e=="string"?e.length=0;u--)if(s[u]!==l[u])return!1;for(u=s.length-1;u>=0;u--)if(c=s[u],!Kx(e[c],t[c],r,n))return!1;return!0}Bc.notDeepEqual=IF;function IF(e,t,r){Kx(e,t,!1)&&Ec(e,t,r,"notDeepEqual",IF)}Bc.notDeepStrictEqual=SF;function SF(e,t,r){Kx(e,t,!0)&&Ec(e,t,r,"notDeepStrictEqual",SF)}Bc.strictEqual=BF;function BF(e,t,r){e!==t&&Ec(e,t,r,"===",BF)}Bc.notStrictEqual=NF;function NF(e,t,r){e===t&&Ec(e,t,r,"!==",NF)}function uK(e,t){if(!e||!t)return!1;if(Object.prototype.toString.call(t)=="[object RegExp]")return t.test(e);try{if(e instanceof t)return!0}catch{}return Error.isPrototypeOf(t)?!1:t.call({},e)===!0}function ict(e){var t;try{e()}catch(r){t=r}return t}function Npe(e,t,r,n){var i;if(typeof t!="function")throw new TypeError('"block" argument must be a function');typeof r=="string"&&(n=r,r=null),i=ict(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&Ec(i,r,"Missing expected exception"+n);var a=typeof n=="string",s=!e&&dx(i),l=!e&&i&&!r;if((s&&a&&uK(i,r)||l)&&Ec(i,r,"Got unwanted exception"+n),e&&i&&r&&!uK(i,r)||!e&&i)throw i}Bc.throws=kpe;function kpe(e,t,r){Npe(!0,e,t,r)}Bc.doesNotThrow=_pe;function _pe(e,t,r){Npe(!1,e,t,r)}Bc.ifError=jpe;function jpe(e){if(e)throw e}var act=Object.freeze({__proto__:null,AssertionError:uB,assert:wb,deepEqual:EF,deepStrictEqual:CF,default:Bc,doesNotThrow:_pe,equal:bF,fail:Ec,ifError:jpe,notDeepEqual:IF,notDeepStrictEqual:SF,notEqual:wF,notStrictEqual:NF,ok:wb,strictEqual:BF,throws:kpe}),Dpe=aB(act);function sct(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var oct=sct,hh={},h5={};(function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function r(a,s){return Object.prototype.hasOwnProperty.call(a,s)}e.assign=function(a){for(var s=Array.prototype.slice.call(arguments,1);s.length;){var l=s.shift();if(l){if(typeof l!="object")throw new TypeError(l+"must be non-object");for(var c in l)r(l,c)&&(a[c]=l[c])}}return a},e.shrinkBuf=function(a,s){return a.length===s?a:a.subarray?a.subarray(0,s):(a.length=s,a)};var n={arraySet:function(a,s,l,c,u){if(s.subarray&&a.subarray){a.set(s.subarray(l,l+c),u);return}for(var d=0;d=0;)e[t]=0}var dct=0,Tpe=1,fct=2,hct=3,mct=258,kF=29,m5=256,Eb=m5+1+kF,fx=30,_F=19,Ppe=2*Eb+1,MA=15,aj=16,pct=7,jF=256,Ope=16,Rpe=17,Fpe=18,IT=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],TE=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],gct=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Mpe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Act=512,Vh=new Array((Eb+2)*2);jy(Vh);var _2=new Array(fx*2);jy(_2);var Cb=new Array(Act);jy(Cb);var Ib=new Array(mct-hct+1);jy(Ib);var DF=new Array(kF);jy(DF);var s3=new Array(fx);jy(s3);function sj(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var Qpe,Lpe,Upe;function oj(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function $pe(e){return e<256?Cb[e]:Cb[256+(e>>>7)]}function Sb(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Vc(e,t,r){e.bi_valid>aj-r?(e.bi_buf|=t<>aj-e.bi_valid,e.bi_valid+=r-aj):(e.bi_buf|=t<>>=1,r<<=1;while(--t>0);return r>>>1}function vct(e){e.bi_valid===16?(Sb(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function xct(e,t){var r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,c=t.stat_desc.max_length,u,d,f,m,g,A,v=0;for(m=0;m<=MA;m++)e.bl_count[m]=0;for(r[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;uc&&(m=c,v++),r[d*2+1]=m,!(d>n)&&(e.bl_count[m]++,g=0,d>=l&&(g=s[d-l]),A=r[d*2],e.opt_len+=A*(m+g),a&&(e.static_len+=A*(i[d*2+1]+g)));if(v!==0){do{for(m=c-1;e.bl_count[m]===0;)m--;e.bl_count[m]--,e.bl_count[m+1]+=2,e.bl_count[c]--,v-=2}while(v>0);for(m=c;m!==0;m--)for(d=e.bl_count[m];d!==0;)f=e.heap[--u],!(f>n)&&(r[f*2+1]!==m&&(e.opt_len+=(m-r[f*2+1])*r[f*2],r[f*2+1]=m),d--)}}function Hpe(e,t,r){var n=new Array(MA+1),i=0,a,s;for(a=1;a<=MA;a++)n[a]=i=i+r[a-1]<<1;for(s=0;s<=t;s++){var l=e[s*2+1];l!==0&&(e[s*2]=zpe(n[l]++,l))}}function yct(){var e,t,r,n,i,a=new Array(MA+1);for(r=0,n=0;n>=7;n8?Sb(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function bct(e,t,r,n){Gpe(e),Sb(e,r),Sb(e,~r),lct.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function hK(e,t,r,n){var i=t*2,a=r*2;return e[i]>1;s>=1;s--)lj(e,r,s);u=a;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],lj(e,r,1),l=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=l,r[u*2]=r[s*2]+r[l*2],e.depth[u]=(e.depth[s]>=e.depth[l]?e.depth[s]:e.depth[l])+1,r[s*2+1]=r[l*2+1]=u,e.heap[1]=u++,lj(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],xct(e,t),Hpe(r,c,e.bl_count)}function pK(e,t,r){var n,i=-1,a,s=t[1],l=0,c=7,u=4;for(s===0&&(c=138,u=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)a=s,s=t[(n+1)*2+1],!(++l=3&&e.bl_tree[Mpe[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function Ect(e,t,r,n){var i;for(Vc(e,t-257,5),Vc(e,r-1,5),Vc(e,n-4,4),i=0;i>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return dK;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return fK;for(r=32;r0?(e.strm.data_type===uct&&(e.strm.data_type=Cct(e)),ST(e,e.l_desc),ST(e,e.d_desc),s=wct(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=r+5,r+4<=i&&t!==-1?qpe(e,t,r,n):e.strategy===cct||a===i?(Vc(e,(Tpe<<1)+(n?1:0),3),mK(e,Vh,_2)):(Vc(e,(fct<<1)+(n?1:0),3),Ect(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),mK(e,e.dyn_ltree,e.dyn_dtree)),Wpe(e),n&&Gpe(e)}function Nct(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(Ib[r]+m5+1)*2]++,e.dyn_dtree[$pe(t)*2]++),e.last_lit===e.lit_bufsize-1}_y._tr_init=Ict;_y._tr_stored_block=qpe;_y._tr_flush_block=Bct;_y._tr_tally=Nct;_y._tr_align=Sct;function kct(e,t,r,n){for(var i=e&65535|0,a=e>>>16&65535|0,s=0;r!==0;){s=r>2e3?2e3:r,r-=s;do i=i+t[n++]|0,a=a+i|0;while(--s);i%=65521,a%=65521}return i|a<<16|0}var Kpe=kct;function _ct(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var jct=_ct();function Dct(e,t,r,n){var i=jct,a=n+r;e^=-1;for(var s=n;s>>8^i[(e^t[s])&255];return e^-1}var Vpe=Dct,Tct={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Ac=h5,M0=_y,Ype=Kpe,Tp=Vpe,Pct=Tct,K1=0,Oct=1,Rct=3,tg=4,vK=5,kf=0,xK=1,Q0=-2,Fct=-3,cj=-5,Mct=-1,Qct=1,H4=2,Lct=3,Uct=4,$ct=0,zct=2,dB=8,Hct=9,Wct=15,Gct=8,qct=29,Kct=256,BT=Kct+1+qct,Vct=30,Yct=19,Zct=2*BT+1,Jct=15,li=3,Wp=258,Dd=Wp+li+1,Xct=32,fB=42,NT=69,PE=73,OE=91,RE=103,QA=113,x2=666,jo=1,p5=2,E1=3,Dy=4,eut=3;function Gp(e,t){return e.msg=Pct[t],t}function yK(e){return(e<<1)-(e>4?9:0)}function Up(e){for(var t=e.length;--t>=0;)e[t]=0}function Pp(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(Ac.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function Pl(e,t){M0._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Pp(e.strm)}function ki(e,t){e.pending_buf[e.pending++]=t}function u2(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function tut(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,Ac.arraySet(t,e.input,e.next_in,i,r),e.state.wrap===1?e.adler=Ype(e.adler,t,i,r):e.state.wrap===2&&(e.adler=Tp(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function Zpe(e,t){var r=e.max_chain_length,n=e.strstart,i,a,s=e.prev_length,l=e.nice_match,c=e.strstart>e.w_size-Dd?e.strstart-(e.w_size-Dd):0,u=e.window,d=e.w_mask,f=e.prev,m=e.strstart+Wp,g=u[n+s-1],A=u[n+s];e.prev_length>=e.good_match&&(r>>=2),l>e.lookahead&&(l=e.lookahead);do if(i=t,!(u[i+s]!==A||u[i+s-1]!==g||u[i]!==u[n]||u[++i]!==u[n+1])){n+=2,i++;do;while(u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&ns){if(e.match_start=t,s=a,a>=l)break;g=u[n+s-1],A=u[n+s]}}while((t=f[t&d])>c&&--r!==0);return s<=e.lookahead?s:e.lookahead}function C1(e){var t=e.w_size,r,n,i,a,s;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Dd)){Ac.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do i=e.head[--r],e.head[r]=i>=t?i-t:0;while(--n);n=t,r=n;do i=e.prev[--r],e.prev[r]=i>=t?i-t:0;while(--n);a+=t}if(e.strm.avail_in===0)break;if(n=tut(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=li)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(C1(e),e.lookahead===0&&t===K1)return jo;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,Pl(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Dd&&(Pl(e,!1),e.strm.avail_out===0))return jo}return e.insert=0,t===tg?(Pl(e,!0),e.strm.avail_out===0?E1:Dy):(e.strstart>e.block_start&&(Pl(e,!1),e.strm.avail_out===0),jo)}function uj(e,t){for(var r,n;;){if(e.lookahead=li&&(e.ins_h=(e.ins_h<=li)if(n=M0._tr_tally(e,e.strstart-e.match_start,e.match_length-li),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=li){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=li&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=li-1)),e.prev_length>=li&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-li,n=M0._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-li),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<=li&&e.strstart>0&&(i=e.strstart-1,n=s[i],n===s[++i]&&n===s[++i]&&n===s[++i])){a=e.strstart+Wp;do;while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=li?(r=M0._tr_tally(e,1,e.match_length-li),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=M0._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(Pl(e,!1),e.strm.avail_out===0))return jo}return e.insert=0,t===tg?(Pl(e,!0),e.strm.avail_out===0?E1:Dy):e.last_lit&&(Pl(e,!1),e.strm.avail_out===0)?jo:p5}function iut(e,t){for(var r;;){if(e.lookahead===0&&(C1(e),e.lookahead===0)){if(t===K1)return jo;break}if(e.match_length=0,r=M0._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(Pl(e,!1),e.strm.avail_out===0))return jo}return e.insert=0,t===tg?(Pl(e,!0),e.strm.avail_out===0?E1:Dy):e.last_lit&&(Pl(e,!1),e.strm.avail_out===0)?jo:p5}function Af(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}var Jv;Jv=[new Af(0,0,0,0,rut),new Af(4,4,8,4,uj),new Af(4,5,16,8,uj),new Af(4,6,32,32,uj),new Af(4,4,16,16,Rv),new Af(8,16,32,32,Rv),new Af(8,16,128,128,Rv),new Af(8,32,128,256,Rv),new Af(32,128,258,1024,Rv),new Af(32,258,258,4096,Rv)];function aut(e){e.window_size=2*e.w_size,Up(e.head),e.max_lazy_match=Jv[e.level].max_lazy,e.good_match=Jv[e.level].good_length,e.nice_match=Jv[e.level].nice_length,e.max_chain_length=Jv[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=li-1,e.match_available=0,e.ins_h=0}function sut(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=dB,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Ac.Buf16(Zct*2),this.dyn_dtree=new Ac.Buf16((2*Vct+1)*2),this.bl_tree=new Ac.Buf16((2*Yct+1)*2),Up(this.dyn_ltree),Up(this.dyn_dtree),Up(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Ac.Buf16(Jct+1),this.heap=new Ac.Buf16(2*BT+1),Up(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Ac.Buf16(2*BT+1),Up(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Jpe(e){var t;return!e||!e.state?Gp(e,Q0):(e.total_in=e.total_out=0,e.data_type=zct,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?fB:QA,e.adler=t.wrap===2?0:1,t.last_flush=K1,M0._tr_init(t),kf)}function Xpe(e){var t=Jpe(e);return t===kf&&aut(e.state),t}function out(e,t){return!e||!e.state||e.state.wrap!==2?Q0:(e.state.gzhead=t,kf)}function ege(e,t,r,n,i,a){if(!e)return Q0;var s=1;if(t===Mct&&(t=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),i<1||i>Hct||r!==dB||n<8||n>15||t<0||t>9||a<0||a>Uct)return Gp(e,Q0);n===8&&(n=9);var l=new sut;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=n,l.w_size=1<vK||t<0)return e?Gp(e,Q0):Q0;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===x2&&t!==tg)return Gp(e,e.avail_out===0?cj:Q0);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===fB)if(n.wrap===2)e.adler=0,ki(n,31),ki(n,139),ki(n,8),n.gzhead?(ki(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),ki(n,n.gzhead.time&255),ki(n,n.gzhead.time>>8&255),ki(n,n.gzhead.time>>16&255),ki(n,n.gzhead.time>>24&255),ki(n,n.level===9?2:n.strategy>=H4||n.level<2?4:0),ki(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(ki(n,n.gzhead.extra.length&255),ki(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Tp(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=NT):(ki(n,0),ki(n,0),ki(n,0),ki(n,0),ki(n,0),ki(n,n.level===9?2:n.strategy>=H4||n.level<2?4:0),ki(n,eut),n.status=QA);else{var s=dB+(n.w_bits-8<<4)<<8,l=-1;n.strategy>=H4||n.level<2?l=0:n.level<6?l=1:n.level===6?l=2:l=3,s|=l<<6,n.strstart!==0&&(s|=Xct),s+=31-s%31,n.status=QA,u2(n,s),n.strstart!==0&&(u2(n,e.adler>>>16),u2(n,e.adler&65535)),e.adler=1}if(n.status===NT)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Tp(e.adler,n.pending_buf,n.pending-i,i)),Pp(e),i=n.pending,n.pending===n.pending_buf_size));)ki(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=Tp(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=PE)}else n.status=PE;if(n.status===PE)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Tp(e.adler,n.pending_buf,n.pending-i,i)),Pp(e),i=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindexi&&(e.adler=Tp(e.adler,n.pending_buf,n.pending-i,i)),a===0&&(n.gzindex=0,n.status=OE)}else n.status=OE;if(n.status===OE)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Tp(e.adler,n.pending_buf,n.pending-i,i)),Pp(e),i=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindexi&&(e.adler=Tp(e.adler,n.pending_buf,n.pending-i,i)),a===0&&(n.status=RE)}else n.status=RE;if(n.status===RE&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&Pp(e),n.pending+2<=n.pending_buf_size&&(ki(n,e.adler&255),ki(n,e.adler>>8&255),e.adler=0,n.status=QA)):n.status=QA),n.pending!==0){if(Pp(e),e.avail_out===0)return n.last_flush=-1,kf}else if(e.avail_in===0&&yK(t)<=yK(r)&&t!==tg)return Gp(e,cj);if(n.status===x2&&e.avail_in!==0)return Gp(e,cj);if(e.avail_in!==0||n.lookahead!==0||t!==K1&&n.status!==x2){var c=n.strategy===H4?iut(n,t):n.strategy===Lct?nut(n,t):Jv[n.level].func(n,t);if((c===E1||c===Dy)&&(n.status=x2),c===jo||c===E1)return e.avail_out===0&&(n.last_flush=-1),kf;if(c===p5&&(t===Oct?M0._tr_align(n):t!==vK&&(M0._tr_stored_block(n,0,0,!1),t===Rct&&(Up(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Pp(e),e.avail_out===0))return n.last_flush=-1,kf}return t!==tg?kf:n.wrap<=0?xK:(n.wrap===2?(ki(n,e.adler&255),ki(n,e.adler>>8&255),ki(n,e.adler>>16&255),ki(n,e.adler>>24&255),ki(n,e.total_in&255),ki(n,e.total_in>>8&255),ki(n,e.total_in>>16&255),ki(n,e.total_in>>24&255)):(u2(n,e.adler>>>16),u2(n,e.adler&65535)),Pp(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?kf:xK)}function uut(e){var t;return!e||!e.state?Q0:(t=e.state.status,t!==fB&&t!==NT&&t!==PE&&t!==OE&&t!==RE&&t!==QA&&t!==x2?Gp(e,Q0):(e.state=null,t===QA?Gp(e,Fct):kf))}function dut(e,t){var r=t.length,n,i,a,s,l,c,u,d;if(!e||!e.state||(n=e.state,s=n.wrap,s===2||s===1&&n.status!==fB||n.lookahead))return Q0;for(s===1&&(e.adler=Ype(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(s===0&&(Up(n.head),n.strstart=0,n.block_start=0,n.insert=0),d=new Ac.Buf8(n.w_size),Ac.arraySet(d,t,r-n.w_size,n.w_size,0),t=d,r=n.w_size),l=e.avail_in,c=e.next_in,u=e.input,e.avail_in=r,e.next_in=0,e.input=t,C1(n);n.lookahead>=li;){i=n.strstart,a=n.lookahead-(li-1);do n.ins_h=(n.ins_h<>>24,A>>>=B,v-=B,B=_>>>16&255,B===0)W[s++]=_&65535;else if(B&16){T=_&65535,B&=15,B&&(v>>=B,v-=B),v<15&&(A+=L[i++]<>>24,A>>>=B,v-=B,B=_>>>16&255,B&16){if(P=_&65535,B&=15,vu){t.msg="invalid distance too far back",n.mode=W4;break e}if(A>>>=B,v-=B,B=s-l,P>B){if(B=P-B,B>f&&n.sane){t.msg="invalid distance too far back",n.mode=W4;break e}if(O=0,z=g,m===0){if(O+=d-B,B2;)W[s++]=z[O++],W[s++]=z[O++],W[s++]=z[O++],T-=3;T&&(W[s++]=z[O++],T>1&&(W[s++]=z[O++]))}else{O=s-P;do W[s++]=W[O++],W[s++]=W[O++],W[s++]=W[O++],T-=3;while(T>2);T&&(W[s++]=W[O++],T>1&&(W[s++]=W[O++]))}}else if((B&64)===0){_=E[(_&65535)+(A&(1<>3,i-=T,v-=T<<3,A&=(1<=1&&R[g]===0;g--);if(A>g&&(A=g),g===0)return a[s++]=1<<24|64<<16|0,a[s++]=1<<24|64<<16|0,c.bits=1,0;for(m=1;m0&&(t===CK||g!==1))return-1;for($[1]=0,d=1;dwK||t===IK&&I>EK)return 1;for(;;){K=d-b,l[f]W?(q=X[Z+l[f]],Y=z[L+l[f]]):(q=96,Y=0),_=1<>b)+B]=K<<24|q<<16|Y|0;while(B!==0);for(_=1<>=1;if(_!==0?(S&=_-1,S+=_):S=0,f++,--R[d]===0){if(d===g)break;d=r[n+l[f]]}if(d>A&&(S&P)!==T){for(b===0&&(b=A),O+=m,v=d-b,E=1<wK||t===IK&&I>EK)return 1;T=S&P,a[T]=A<<24|v<<16|O-s|0}}return S!==0&&(a[O+S]=d-b<<24|64<<16|0),c.bits=A,0},Ou=h5,kT=Kpe,vf=Vpe,xut=hut,j2=vut,yut=0,tge=1,rge=2,SK=4,but=5,G4=6,I1=0,wut=1,Eut=2,W0=-2,nge=-3,ige=-4,Cut=-5,BK=8,age=1,NK=2,kK=3,_K=4,jK=5,DK=6,TK=7,PK=8,OK=9,RK=10,o3=11,zh=12,fj=13,FK=14,hj=15,MK=16,QK=17,LK=18,UK=19,q4=20,K4=21,$K=22,zK=23,HK=24,WK=25,GK=26,mj=27,qK=28,KK=29,Ya=30,sge=31,Iut=32,Sut=852,But=592,Nut=15,kut=Nut;function VK(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function _ut(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Ou.Buf16(320),this.work=new Ou.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function oge(e){var t;return!e||!e.state?W0:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=age,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Ou.Buf32(Sut),t.distcode=t.distdyn=new Ou.Buf32(But),t.sane=1,t.back=-1,I1)}function lge(e){var t;return!e||!e.state?W0:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,oge(e))}function cge(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?W0:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,lge(e))}function uge(e,t){var r,n;return e?(n=new _ut,e.state=n,n.window=null,r=cge(e,t),r!==I1&&(e.state=null),r):W0}function jut(e){return uge(e,kut)}var YK=!0,pj,gj;function Dut(e){if(YK){var t;for(pj=new Ou.Buf32(512),gj=new Ou.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(j2(tge,e.lens,0,288,pj,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;j2(rge,e.lens,0,32,gj,0,e.work,{bits:5}),YK=!1}e.lencode=pj,e.lenbits=9,e.distcode=gj,e.distbits=5}function dge(e,t,r,n){var i,a=e.state;return a.window===null&&(a.wsize=1<=a.wsize?(Ou.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>n&&(i=n),Ou.arraySet(a.window,t,r-n,i,a.wnext),n-=i,n?(Ou.arraySet(a.window,t,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=vf(r.check,z,2,0),u=0,d=0,r.mode=NK;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=Ya;break}if((u&15)!==BK){e.msg="unknown compression method",r.mode=Ya;break}if(u>>>=4,d-=4,P=(u&15)+8,r.wbits===0)r.wbits=P;else if(P>r.wbits){e.msg="invalid window size",r.mode=Ya;break}r.dmax=1<>8&1),r.flags&512&&(z[0]=u&255,z[1]=u>>>8&255,r.check=vf(r.check,z,2,0)),u=0,d=0,r.mode=kK;case kK:for(;d<32;){if(l===0)break e;l--,u+=n[a++]<>>8&255,z[2]=u>>>16&255,z[3]=u>>>24&255,r.check=vf(r.check,z,4,0)),u=0,d=0,r.mode=_K;case _K:for(;d<16;){if(l===0)break e;l--,u+=n[a++]<>8),r.flags&512&&(z[0]=u&255,z[1]=u>>>8&255,r.check=vf(r.check,z,2,0)),u=0,d=0,r.mode=jK;case jK:if(r.flags&1024){for(;d<16;){if(l===0)break e;l--,u+=n[a++]<>>8&255,r.check=vf(r.check,z,2,0)),u=0,d=0}else r.head&&(r.head.extra=null);r.mode=DK;case DK:if(r.flags&1024&&(g=r.length,g>l&&(g=l),g&&(r.head&&(P=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Ou.arraySet(r.head.extra,n,a,g,P)),r.flags&512&&(r.check=vf(r.check,n,g,a)),l-=g,a+=g,r.length-=g),r.length))break e;r.length=0,r.mode=TK;case TK:if(r.flags&2048){if(l===0)break e;g=0;do P=n[a+g++],r.head&&P&&r.length<65536&&(r.head.name+=String.fromCharCode(P));while(P&&g>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=zh;break;case RK:for(;d<32;){if(l===0)break e;l--,u+=n[a++]<>>=d&7,d-=d&7,r.mode=mj;break}for(;d<3;){if(l===0)break e;l--,u+=n[a++]<>>=1,d-=1,u&3){case 0:r.mode=FK;break;case 1:if(Dut(r),r.mode=q4,t===G4){u>>>=2,d-=2;break e}break;case 2:r.mode=QK;break;case 3:e.msg="invalid block type",r.mode=Ya}u>>>=2,d-=2;break;case FK:for(u>>>=d&7,d-=d&7;d<32;){if(l===0)break e;l--,u+=n[a++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=Ya;break}if(r.length=u&65535,u=0,d=0,r.mode=hj,t===G4)break e;case hj:r.mode=MK;case MK:if(g=r.length,g){if(g>l&&(g=l),g>c&&(g=c),g===0)break e;Ou.arraySet(i,n,a,g,s),l-=g,a+=g,c-=g,s+=g,r.length-=g;break}r.mode=zh;break;case QK:for(;d<14;){if(l===0)break e;l--,u+=n[a++]<>>=5,d-=5,r.ndist=(u&31)+1,u>>>=5,d-=5,r.ncode=(u&15)+4,u>>>=4,d-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Ya;break}r.have=0,r.mode=LK;case LK:for(;r.have>>=3,d-=3}for(;r.have<19;)r.lens[R[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,L={bits:r.lenbits},O=j2(yut,r.lens,0,19,r.lencode,0,r.work,L),r.lenbits=L.bits,O){e.msg="invalid code lengths set",r.mode=Ya;break}r.have=0,r.mode=UK;case UK:for(;r.have>>24,I=b>>>16&255,S=b&65535,!(E<=d);){if(l===0)break e;l--,u+=n[a++]<>>=E,d-=E,r.lens[r.have++]=S;else{if(S===16){for(W=E+2;d>>=E,d-=E,r.have===0){e.msg="invalid bit length repeat",r.mode=Ya;break}P=r.lens[r.have-1],g=3+(u&3),u>>>=2,d-=2}else if(S===17){for(W=E+3;d>>=E,d-=E,P=0,g=3+(u&7),u>>>=3,d-=3}else{for(W=E+7;d>>=E,d-=E,P=0,g=11+(u&127),u>>>=7,d-=7}if(r.have+g>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Ya;break}for(;g--;)r.lens[r.have++]=P}}if(r.mode===Ya)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Ya;break}if(r.lenbits=9,L={bits:r.lenbits},O=j2(tge,r.lens,0,r.nlen,r.lencode,0,r.work,L),r.lenbits=L.bits,O){e.msg="invalid literal/lengths set",r.mode=Ya;break}if(r.distbits=6,r.distcode=r.distdyn,L={bits:r.distbits},O=j2(rge,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,L),r.distbits=L.bits,O){e.msg="invalid distances set",r.mode=Ya;break}if(r.mode=q4,t===G4)break e;case q4:r.mode=K4;case K4:if(l>=6&&c>=258){e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=l,r.hold=u,r.bits=d,xut(e,m),s=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,n=e.input,l=e.avail_in,u=r.hold,d=r.bits,r.mode===zh&&(r.back=-1);break}for(r.back=0;b=r.lencode[u&(1<>>24,I=b>>>16&255,S=b&65535,!(E<=d);){if(l===0)break e;l--,u+=n[a++]<>_)],E=b>>>24,I=b>>>16&255,S=b&65535,!(_+E<=d);){if(l===0)break e;l--,u+=n[a++]<>>=_,d-=_,r.back+=_}if(u>>>=E,d-=E,r.back+=E,r.length=S,I===0){r.mode=GK;break}if(I&32){r.back=-1,r.mode=zh;break}if(I&64){e.msg="invalid literal/length code",r.mode=Ya;break}r.extra=I&15,r.mode=$K;case $K:if(r.extra){for(W=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=zK;case zK:for(;b=r.distcode[u&(1<>>24,I=b>>>16&255,S=b&65535,!(E<=d);){if(l===0)break e;l--,u+=n[a++]<>_)],E=b>>>24,I=b>>>16&255,S=b&65535,!(_+E<=d);){if(l===0)break e;l--,u+=n[a++]<>>=_,d-=_,r.back+=_}if(u>>>=E,d-=E,r.back+=E,I&64){e.msg="invalid distance code",r.mode=Ya;break}r.offset=S,r.extra=I&15,r.mode=HK;case HK:if(r.extra){for(W=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Ya;break}r.mode=WK;case WK:if(c===0)break e;if(g=m-c,r.offset>g){if(g=r.offset-g,g>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Ya;break}g>r.wnext?(g-=r.wnext,A=r.wsize-g):A=r.wnext-g,g>r.length&&(g=r.length),v=r.window}else v=i,A=s-r.offset,g=r.length;g>c&&(g=c),c-=g,r.length-=g;do i[s++]=v[A++];while(--g);r.length===0&&(r.mode=K4);break;case GK:if(c===0)break e;i[s++]=r.length,c--,r.mode=K4;break;case mj:if(r.wrap){for(;d<32;){if(l===0)break e;l--,u|=n[a++]<e.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=d,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}u.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}this.pending_close=!1,t(this.init_done,"close before init"),t(this.mode<=e.UNZIP),this.mode===e.DEFLATE||this.mode===e.GZIP||this.mode===e.DEFLATERAW?n.deflateEnd(this.strm):(this.mode===e.INFLATE||this.mode===e.GUNZIP||this.mode===e.INFLATERAW||this.mode===e.UNZIP)&&i.inflateEnd(this.strm),this.mode=e.NONE,this.dictionary=null},u.prototype.write=function(d,f,m,g,A,v,b){return this._write(!0,d,f,m,g,A,v,b)},u.prototype.writeSync=function(d,f,m,g,A,v,b){return this._write(!1,d,f,m,g,A,v,b)},u.prototype._write=function(d,f,m,g,A,v,b,E){if(t.equal(arguments.length,8),t(this.init_done,"write before init"),t(this.mode!==e.NONE,"already finalized"),t.equal(!1,this.write_in_progress,"write already in progress"),t.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,t.equal(!1,f===void 0,"must provide flush value"),this.write_in_progress=!0,f!==e.Z_NO_FLUSH&&f!==e.Z_PARTIAL_FLUSH&&f!==e.Z_SYNC_FLUSH&&f!==e.Z_FULL_FLUSH&&f!==e.Z_FINISH&&f!==e.Z_BLOCK)throw new Error("Invalid flush value");if(m==null&&(m=Nt.alloc(0),A=0,g=0),this.strm.avail_in=A,this.strm.input=m,this.strm.next_in=g,this.strm.avail_out=E,this.strm.output=v,this.strm.next_out=b,this.flush=f,!d)return this._process(),this._checkError()?this._afterSync():void 0;var I=this;return kd.nextTick(function(){I._process(),I._after()}),this},u.prototype._afterSync=function(){var d=this.strm.avail_out,f=this.strm.avail_in;return this.write_in_progress=!1,[f,d]},u.prototype._process=function(){var d=null;switch(this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=n.deflate(this.strm,this.flush);break;case e.UNZIP:switch(this.strm.avail_in>0&&(d=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(d===null)break;if(this.strm.input[d]===l){if(this.gzip_id_bytes_read=1,d++,this.strm.avail_in===1)break}else{this.mode=e.INFLATE;break}case 1:if(d===null)break;this.strm.input[d]===c?(this.gzip_id_bytes_read=2,this.mode=e.GUNZIP):this.mode=e.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:for(this.err=i.inflate(this.strm,this.flush),this.err===e.Z_NEED_DICT&&this.dictionary&&(this.err=i.inflateSetDictionary(this.strm,this.dictionary),this.err===e.Z_OK?this.err=i.inflate(this.strm,this.flush):this.err===e.Z_DATA_ERROR&&(this.err=e.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===e.GUNZIP&&this.err===e.Z_STREAM_END&&this.strm.next_in[0]!==0;)this.reset(),this.err=i.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},u.prototype._checkError=function(){switch(this.err){case e.Z_OK:case e.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===e.Z_FINISH)return this._error("unexpected end of file"),!1;break;case e.Z_STREAM_END:break;case e.Z_NEED_DICT:return this.dictionary==null?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},u.prototype._after=function(){if(this._checkError()){var d=this.strm.avail_out,f=this.strm.avail_in;this.write_in_progress=!1,this.callback(f,d),this.pending_close&&this.close()}},u.prototype._error=function(d){this.strm.msg&&(d=this.strm.msg),this.onerror(d,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},u.prototype.init=function(d,f,m,g,A){t(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),t(d>=8&&d<=15,"invalid windowBits"),t(f>=-1&&f<=9,"invalid compression level"),t(m>=1&&m<=9,"invalid memlevel"),t(g===e.Z_FILTERED||g===e.Z_HUFFMAN_ONLY||g===e.Z_RLE||g===e.Z_FIXED||g===e.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(f,d,m,g,A),this._setDictionary()},u.prototype.params=function(){throw new Error("deflateParams Not supported")},u.prototype.reset=function(){this._reset(),this._setDictionary()},u.prototype._init=function(d,f,m,g,A){switch(this.level=d,this.windowBits=f,this.memLevel=m,this.strategy=g,this.flush=e.Z_NO_FLUSH,this.err=e.Z_OK,(this.mode===e.GZIP||this.mode===e.GUNZIP)&&(this.windowBits+=16),this.mode===e.UNZIP&&(this.windowBits+=32),(this.mode===e.DEFLATERAW||this.mode===e.INFLATERAW)&&(this.windowBits=-1*this.windowBits),this.strm=new r,this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=n.deflateInit2(this.strm,this.level,e.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:case e.UNZIP:this.err=i.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==e.Z_OK&&this._error("Init error"),this.dictionary=A,this.write_in_progress=!1,this.init_done=!0},u.prototype._setDictionary=function(){if(this.dictionary!=null){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:this.err=n.deflateSetDictionary(this.strm,this.dictionary);break}this.err!==e.Z_OK&&this._error("Failed to set dictionary")}},u.prototype._reset=function(){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:case e.GZIP:this.err=n.deflateReset(this.strm);break;case e.INFLATE:case e.INFLATERAW:case e.GUNZIP:this.err=i.inflateReset(this.strm);break}this.err!==e.Z_OK&&this._error("Failed to reset stream")},e.Zlib=u})(Ipe);var Mut=aB(mlt);(function(e){var t=Kq.Buffer,r=Xlt.Transform,n=Ipe,i=Mut,a=Dpe.ok,s=Kq.kMaxLength,l="Cannot create final Buffer. It would be larger than 0x"+s.toString(16)+" bytes";n.Z_MIN_WINDOWBITS=8,n.Z_MAX_WINDOWBITS=15,n.Z_DEFAULT_WINDOWBITS=15,n.Z_MIN_CHUNK=64,n.Z_MAX_CHUNK=1/0,n.Z_DEFAULT_CHUNK=16*1024,n.Z_MIN_MEMLEVEL=1,n.Z_MAX_MEMLEVEL=9,n.Z_DEFAULT_MEMLEVEL=8,n.Z_MIN_LEVEL=-1,n.Z_MAX_LEVEL=9,n.Z_DEFAULT_LEVEL=n.Z_DEFAULT_COMPRESSION;for(var c=Object.keys(n),u=0;u=s?ae=new RangeError(l):ge=t.concat(Z,K),Z=[],R.close(),X(ae,ge)}}function b(R,$){if(typeof $=="string"&&($=t.from($)),!t.isBuffer($))throw new TypeError("Not a string or buffer");var X=R._finishFlushFlag;return R._processChunk($,X)}function E(R){if(!(this instanceof E))return new E(R);z.call(this,R,n.DEFLATE)}function I(R){if(!(this instanceof I))return new I(R);z.call(this,R,n.INFLATE)}function S(R){if(!(this instanceof S))return new S(R);z.call(this,R,n.GZIP)}function _(R){if(!(this instanceof _))return new _(R);z.call(this,R,n.GUNZIP)}function B(R){if(!(this instanceof B))return new B(R);z.call(this,R,n.DEFLATERAW)}function T(R){if(!(this instanceof T))return new T(R);z.call(this,R,n.INFLATERAW)}function P(R){if(!(this instanceof P))return new P(R);z.call(this,R,n.UNZIP)}function O(R){return R===n.Z_NO_FLUSH||R===n.Z_PARTIAL_FLUSH||R===n.Z_SYNC_FLUSH||R===n.Z_FULL_FLUSH||R===n.Z_FINISH||R===n.Z_BLOCK}function z(R,$){var X=this;if(this._opts=R=R||{},this._chunkSize=R.chunkSize||e.Z_DEFAULT_CHUNK,r.call(this,R),R.flush&&!O(R.flush))throw new Error("Invalid flush flag: "+R.flush);if(R.finishFlush&&!O(R.finishFlush))throw new Error("Invalid flush flag: "+R.finishFlush);if(this._flushFlag=R.flush||n.Z_NO_FLUSH,this._finishFlushFlag=typeof R.finishFlush<"u"?R.finishFlush:n.Z_FINISH,R.chunkSize&&(R.chunkSizee.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+R.chunkSize);if(R.windowBits&&(R.windowBitse.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+R.windowBits);if(R.level&&(R.levele.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+R.level);if(R.memLevel&&(R.memLevele.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+R.memLevel);if(R.strategy&&R.strategy!=e.Z_FILTERED&&R.strategy!=e.Z_HUFFMAN_ONLY&&R.strategy!=e.Z_RLE&&R.strategy!=e.Z_FIXED&&R.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+R.strategy);if(R.dictionary&&!t.isBuffer(R.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new n.Zlib($);var Z=this;this._hadError=!1,this._handle.onerror=function(Y,ne){L(Z),Z._hadError=!0;var ge=new Error(Y);ge.errno=ne,ge.code=e.codes[ne],Z.emit("error",ge)};var K=e.Z_DEFAULT_COMPRESSION;typeof R.level=="number"&&(K=R.level);var q=e.Z_DEFAULT_STRATEGY;typeof R.strategy=="number"&&(q=R.strategy),this._handle.init(R.windowBits||e.Z_DEFAULT_WINDOWBITS,K,R.memLevel||e.Z_DEFAULT_MEMLEVEL,q,R.dictionary),this._buffer=t.allocUnsafe(this._chunkSize),this._offset=0,this._level=K,this._strategy=q,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!X._handle},configurable:!0,enumerable:!0})}i.inherits(z,r),z.prototype.params=function(R,$,X){if(Re.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+R);if($!=e.Z_FILTERED&&$!=e.Z_HUFFMAN_ONLY&&$!=e.Z_RLE&&$!=e.Z_FIXED&&$!=e.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+$);if(this._level!==R||this._strategy!==$){var Z=this;this.flush(n.Z_SYNC_FLUSH,function(){a(Z._handle,"zlib binding closed"),Z._handle.params(R,$),Z._hadError||(Z._level=R,Z._strategy=$,X&&X())})}else kd.nextTick(X)},z.prototype.reset=function(){return a(this._handle,"zlib binding closed"),this._handle.reset()},z.prototype._flush=function(R){this._transform(t.alloc(0),"",R)},z.prototype.flush=function(R,$){var X=this,Z=this._writableState;(typeof R=="function"||R===void 0&&!$)&&($=R,R=n.Z_FULL_FLUSH),Z.ended?$&&kd.nextTick($):Z.ending?$&&this.once("end",$):Z.needDrain?$&&this.once("drain",function(){return X.flush(R,$)}):(this._flushFlag=R,this.write(t.alloc(0),"",$))},z.prototype.close=function(R){L(this,R),kd.nextTick(W,this)};function L(R,$){$&&kd.nextTick($),R._handle&&(R._handle.close(),R._handle=null)}function W(R){R.emit("close")}z.prototype._transform=function(R,$,X){var Z,K=this._writableState,q=K.ending||K.ended,Y=q&&(!R||K.length===R.length);if(R!==null&&!t.isBuffer(R))return X(new Error("invalid input"));if(!this._handle)return X(new Error("zlib binding closed"));Y?Z=this._finishFlushFlag:(Z=this._flushFlag,R.length>=K.length&&(this._flushFlag=this._opts.flush||n.Z_NO_FLUSH)),this._processChunk(R,Z,X)},z.prototype._processChunk=function(R,$,X){var Z=R&&R.length,K=this._chunkSize-this._offset,q=0,Y=this,ne=typeof X=="function";if(!ne){var ge=[],ae=0,pe;this.on("error",function(ye){pe=ye}),a(this._handle,"zlib binding closed");do var _e=this._handle.writeSync($,R,q,Z,this._buffer,this._offset,K);while(!this._hadError&&Me(_e[0],_e[1]));if(this._hadError)throw pe;if(ae>=s)throw L(this),new RangeError(l);var we=t.concat(ge,ae);return L(this),we}a(this._handle,"zlib binding closed");var xe=this._handle.write($,R,q,Z,this._buffer,this._offset,K);xe.buffer=R,xe.callback=Me;function Me(ye,Ee){if(this&&(this.buffer=null,this.callback=null),!Y._hadError){var me=K-Ee;if(a(me>=0,"have should not go down"),me>0){var Se=Y._buffer.slice(Y._offset,Y._offset+me);Y._offset+=me,ne?Y.push(Se):(ge.push(Se),ae+=Se.length)}if((Ee===0||Y._offset>=Y._chunkSize)&&(K=Y._chunkSize,Y._offset=0,Y._buffer=t.allocUnsafe(Y._chunkSize)),Ee===0){if(q+=Z-ye,Z=ye,!ne)return!0;var Ie=Y._handle.write($,R,q,Z,Y._buffer,Y._offset,Y._chunkSize);Ie.callback=Me,Ie.buffer=R;return}if(!ne)return!1;X()}}},i.inherits(E,z),i.inherits(I,z),i.inherits(S,z),i.inherits(_,z),i.inherits(B,z),i.inherits(T,z),i.inherits(P,z)})(ape);var Qut=qot(ape);let fge=class{static decode(t,r){throw new Error("PNG.decode not available in browser build")}static load(t){throw new Error("PNG.load not available in browser build")}constructor(t){let r;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.text={};;){const c=this.readUInt32();let u="";for(r=0;r<4;r++)u+=String.fromCharCode(this.data[this.pos++]);switch(u){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"PLTE":this.palette=this.read(c);break;case"IDAT":for(r=0;r0)for(r=0;rthis.data.length)throw new Error("Incomplete or corrupt PNG file")}}read(t){const r=new Array(t);for(let n=0;n{if(r)throw r;var i=0;const{width:a,height:s}=this;var l=this.pixelBitlength/8;const c=Nt.alloc(a*s*l);function u(d,f,m,g,A){A===void 0&&(A=!1);const v=Math.ceil((a-d)/m),b=Math.ceil((s-f)/g),E=l*v,I=A?c:Nt.alloc(E*b);let S=0,_=0;for(;S(this.copyToImageData(r,n),t(r)))}};var FE={exports:{}},ME={exports:{}},Lut=ME.exports,ZK;function hB(){return ZK||(ZK=1,(function(e,t){(function(r,n){e.exports=n(pi())})(Lut,function(r){return(function(n){var i=r,a=i.lib,s=a.Base,l=a.WordArray,c=i.x64={};c.Word=s.extend({init:function(u,d){this.high=u,this.low=d}}),c.WordArray=s.extend({init:function(u,d){u=this.words=u||[],d!=n?this.sigBytes=d:this.sigBytes=u.length*8},toX32:function(){for(var u=this.words,d=u.length,f=[],m=0;m>>2]|=c[f]<<24-f%4*8;s.call(this,d,u)}else s.apply(this,arguments)};l.prototype=a}})(),r.lib.WordArray})})(QE)),QE.exports}var LE={exports:{}},zut=LE.exports,XK;function Hut(){return XK||(XK=1,(function(e,t){(function(r,n){e.exports=n(pi())})(zut,function(r){return(function(){var n=r,i=n.lib,a=i.WordArray,s=n.enc;s.Utf16=s.Utf16BE={stringify:function(c){for(var u=c.words,d=c.sigBytes,f=[],m=0;m>>2]>>>16-m%4*8&65535;f.push(String.fromCharCode(g))}return f.join("")},parse:function(c){for(var u=c.length,d=[],f=0;f>>1]|=c.charCodeAt(f)<<16-f%2*16;return a.create(d,u*2)}},s.Utf16LE={stringify:function(c){for(var u=c.words,d=c.sigBytes,f=[],m=0;m>>2]>>>16-m%4*8&65535);f.push(String.fromCharCode(g))}return f.join("")},parse:function(c){for(var u=c.length,d=[],f=0;f>>1]|=l(c.charCodeAt(f)<<16-f%2*16);return a.create(d,u*2)}};function l(c){return c<<8&4278255360|c>>>8&16711935}})(),r.enc.Utf16})})(LE)),LE.exports}var UE={exports:{}},Wut=UE.exports,eV;function V1(){return eV||(eV=1,(function(e,t){(function(r,n){e.exports=n(pi())})(Wut,function(r){return(function(){var n=r,i=n.lib,a=i.WordArray,s=n.enc;s.Base64={stringify:function(c){var u=c.words,d=c.sigBytes,f=this._map;c.clamp();for(var m=[],g=0;g>>2]>>>24-g%4*8&255,v=u[g+1>>>2]>>>24-(g+1)%4*8&255,b=u[g+2>>>2]>>>24-(g+2)%4*8&255,E=A<<16|v<<8|b,I=0;I<4&&g+I*.75>>6*(3-I)&63));var S=f.charAt(64);if(S)for(;m.length%4;)m.push(S);return m.join("")},parse:function(c){var u=c.length,d=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var m=0;m>>6-g%4*2,b=A|v;f[m>>>2]|=b<<24-m%4*8,m++}return a.create(f,m)}})(),r.enc.Base64})})(UE)),UE.exports}var $E={exports:{}},Gut=$E.exports,tV;function qut(){return tV||(tV=1,(function(e,t){(function(r,n){e.exports=n(pi())})(Gut,function(r){return(function(){var n=r,i=n.lib,a=i.WordArray,s=n.enc;s.Base64url={stringify:function(c,u){u===void 0&&(u=!0);var d=c.words,f=c.sigBytes,m=u?this._safe_map:this._map;c.clamp();for(var g=[],A=0;A>>2]>>>24-A%4*8&255,b=d[A+1>>>2]>>>24-(A+1)%4*8&255,E=d[A+2>>>2]>>>24-(A+2)%4*8&255,I=v<<16|b<<8|E,S=0;S<4&&A+S*.75>>6*(3-S)&63));var _=m.charAt(64);if(_)for(;g.length%4;)g.push(_);return g.join("")},parse:function(c,u){u===void 0&&(u=!0);var d=c.length,f=u?this._safe_map:this._map,m=this._reverseMap;if(!m){m=this._reverseMap=[];for(var g=0;g>>6-g%4*2,b=A|v;f[m>>>2]|=b<<24-m%4*8,m++}return a.create(f,m)}})(),r.enc.Base64url})})($E)),$E.exports}var zE={exports:{}},Kut=zE.exports,rV;function hge(){return rV||(rV=1,(function(e,t){(function(r,n){e.exports=n(pi())})(Kut,function(r){return(function(){var n=r,i=n.lib,a=i.WordArray,s=i.Hasher,l=n.algo,c=[],u=l.SHA1=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(d,f){for(var m=this._hash.words,g=m[0],A=m[1],v=m[2],b=m[3],E=m[4],I=0;I<80;I++){if(I<16)c[I]=d[f+I]|0;else{var S=c[I-3]^c[I-8]^c[I-14]^c[I-16];c[I]=S<<1|S>>>31}var _=(g<<5|g>>>27)+E+c[I];I<20?_+=(A&v|~A&b)+1518500249:I<40?_+=(A^v^b)+1859775393:I<60?_+=(A&v|A&b|v&b)-1894007588:_+=(A^v^b)-899497514,E=b,b=v,v=A<<30|A>>>2,A=g,g=_}m[0]=m[0]+g|0,m[1]=m[1]+A|0,m[2]=m[2]+v|0,m[3]=m[3]+b|0,m[4]=m[4]+E|0},_doFinalize:function(){var d=this._data,f=d.words,m=this._nDataBytes*8,g=d.sigBytes*8;return f[g>>>5]|=128<<24-g%32,f[(g+64>>>9<<4)+14]=Math.floor(m/4294967296),f[(g+64>>>9<<4)+15]=m,d.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var d=s.clone.call(this);return d._hash=this._hash.clone(),d}});n.SHA1=s._createHelper(u),n.HmacSHA1=s._createHmacHelper(u)})(),r.SHA1})})(zE)),zE.exports}var HE={exports:{}},Vut=HE.exports,nV;function TF(){return nV||(nV=1,(function(e,t){(function(r,n){e.exports=n(pi())})(Vut,function(r){return(function(n){var i=r,a=i.lib,s=a.WordArray,l=a.Hasher,c=i.algo,u=[],d=[];(function(){function g(E){for(var I=n.sqrt(E),S=2;S<=I;S++)if(!(E%S))return!1;return!0}function A(E){return(E-(E|0))*4294967296|0}for(var v=2,b=0;b<64;)g(v)&&(b<8&&(u[b]=A(n.pow(v,1/2))),d[b]=A(n.pow(v,1/3)),b++),v++})();var f=[],m=c.SHA256=l.extend({_doReset:function(){this._hash=new s.init(u.slice(0))},_doProcessBlock:function(g,A){for(var v=this._hash.words,b=v[0],E=v[1],I=v[2],S=v[3],_=v[4],B=v[5],T=v[6],P=v[7],O=0;O<64;O++){if(O<16)f[O]=g[A+O]|0;else{var z=f[O-15],L=(z<<25|z>>>7)^(z<<14|z>>>18)^z>>>3,W=f[O-2],R=(W<<15|W>>>17)^(W<<13|W>>>19)^W>>>10;f[O]=L+f[O-7]+R+f[O-16]}var $=_&B^~_&T,X=b&E^b&I^E&I,Z=(b<<30|b>>>2)^(b<<19|b>>>13)^(b<<10|b>>>22),K=(_<<26|_>>>6)^(_<<21|_>>>11)^(_<<7|_>>>25),q=P+K+$+d[O]+f[O],Y=Z+X;P=T,T=B,B=_,_=S+q|0,S=I,I=E,E=b,b=q+Y|0}v[0]=v[0]+b|0,v[1]=v[1]+E|0,v[2]=v[2]+I|0,v[3]=v[3]+S|0,v[4]=v[4]+_|0,v[5]=v[5]+B|0,v[6]=v[6]+T|0,v[7]=v[7]+P|0},_doFinalize:function(){var g=this._data,A=g.words,v=this._nDataBytes*8,b=g.sigBytes*8;return A[b>>>5]|=128<<24-b%32,A[(b+64>>>9<<4)+14]=n.floor(v/4294967296),A[(b+64>>>9<<4)+15]=v,g.sigBytes=A.length*4,this._process(),this._hash},clone:function(){var g=l.clone.call(this);return g._hash=this._hash.clone(),g}});i.SHA256=l._createHelper(m),i.HmacSHA256=l._createHmacHelper(m)})(Math),r.SHA256})})(HE)),HE.exports}var WE={exports:{}},Yut=WE.exports,iV;function Zut(){return iV||(iV=1,(function(e,t){(function(r,n,i){e.exports=n(pi(),TF())})(Yut,function(r){return(function(){var n=r,i=n.lib,a=i.WordArray,s=n.algo,l=s.SHA256,c=s.SHA224=l.extend({_doReset:function(){this._hash=new a.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=l._doFinalize.call(this);return u.sigBytes-=4,u}});n.SHA224=l._createHelper(c),n.HmacSHA224=l._createHmacHelper(c)})(),r.SHA224})})(WE)),WE.exports}var GE={exports:{}},Jut=GE.exports,aV;function mge(){return aV||(aV=1,(function(e,t){(function(r,n,i){e.exports=n(pi(),hB())})(Jut,function(r){return(function(){var n=r,i=n.lib,a=i.Hasher,s=n.x64,l=s.Word,c=s.WordArray,u=n.algo;function d(){return l.create.apply(l,arguments)}var f=[d(1116352408,3609767458),d(1899447441,602891725),d(3049323471,3964484399),d(3921009573,2173295548),d(961987163,4081628472),d(1508970993,3053834265),d(2453635748,2937671579),d(2870763221,3664609560),d(3624381080,2734883394),d(310598401,1164996542),d(607225278,1323610764),d(1426881987,3590304994),d(1925078388,4068182383),d(2162078206,991336113),d(2614888103,633803317),d(3248222580,3479774868),d(3835390401,2666613458),d(4022224774,944711139),d(264347078,2341262773),d(604807628,2007800933),d(770255983,1495990901),d(1249150122,1856431235),d(1555081692,3175218132),d(1996064986,2198950837),d(2554220882,3999719339),d(2821834349,766784016),d(2952996808,2566594879),d(3210313671,3203337956),d(3336571891,1034457026),d(3584528711,2466948901),d(113926993,3758326383),d(338241895,168717936),d(666307205,1188179964),d(773529912,1546045734),d(1294757372,1522805485),d(1396182291,2643833823),d(1695183700,2343527390),d(1986661051,1014477480),d(2177026350,1206759142),d(2456956037,344077627),d(2730485921,1290863460),d(2820302411,3158454273),d(3259730800,3505952657),d(3345764771,106217008),d(3516065817,3606008344),d(3600352804,1432725776),d(4094571909,1467031594),d(275423344,851169720),d(430227734,3100823752),d(506948616,1363258195),d(659060556,3750685593),d(883997877,3785050280),d(958139571,3318307427),d(1322822218,3812723403),d(1537002063,2003034995),d(1747873779,3602036899),d(1955562222,1575990012),d(2024104815,1125592928),d(2227730452,2716904306),d(2361852424,442776044),d(2428436474,593698344),d(2756734187,3733110249),d(3204031479,2999351573),d(3329325298,3815920427),d(3391569614,3928383900),d(3515267271,566280711),d(3940187606,3454069534),d(4118630271,4000239992),d(116418474,1914138554),d(174292421,2731055270),d(289380356,3203993006),d(460393269,320620315),d(685471733,587496836),d(852142971,1086792851),d(1017036298,365543100),d(1126000580,2618297676),d(1288033470,3409855158),d(1501505948,4234509866),d(1607167915,987167468),d(1816402316,1246189591)],m=[];(function(){for(var A=0;A<80;A++)m[A]=d()})();var g=u.SHA512=a.extend({_doReset:function(){this._hash=new c.init([new l.init(1779033703,4089235720),new l.init(3144134277,2227873595),new l.init(1013904242,4271175723),new l.init(2773480762,1595750129),new l.init(1359893119,2917565137),new l.init(2600822924,725511199),new l.init(528734635,4215389547),new l.init(1541459225,327033209)])},_doProcessBlock:function(A,v){for(var b=this._hash.words,E=b[0],I=b[1],S=b[2],_=b[3],B=b[4],T=b[5],P=b[6],O=b[7],z=E.high,L=E.low,W=I.high,R=I.low,$=S.high,X=S.low,Z=_.high,K=_.low,q=B.high,Y=B.low,ne=T.high,ge=T.low,ae=P.high,pe=P.low,_e=O.high,we=O.low,xe=z,Me=L,ye=W,Ee=R,me=$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vt=Oe,Ye=he,Oe=Le,he=Xe,Le=ke,ke=Be+rr|0,Xe=Ie+Ne+(ke>>>0>>0?1:0)|0,Ie=me,Be=Se,me=ye,Se=Ee,ye=xe,Ee=Me,Me=rr+St|0,xe=Ne+Zt+(Me>>>0>>0?1:0)|0}L=E.low=L+Me,E.high=z+xe+(L>>>0>>0?1:0),R=I.low=R+Ee,I.high=W+ye+(R>>>0>>0?1:0),X=S.low=X+Se,S.high=$+me+(X>>>0>>0?1:0),K=_.low=K+Be,_.high=Z+Ie+(K>>>0>>0?1:0),Y=B.low=Y+ke,B.high=q+Xe+(Y>>>0>>0?1:0),ge=T.low=ge+Le,T.high=ne+he+(ge>>>0>>0?1:0),pe=P.low=pe+Oe,P.high=ae+Ye+(pe>>>0>>0?1:0),we=O.low=we+vt,O.high=_e+it+(we>>>0>>0?1:0)},_doFinalize:function(){var A=this._data,v=A.words,b=this._nDataBytes*8,E=A.sigBytes*8;v[E>>>5]|=128<<24-E%32,v[(E+128>>>10<<5)+30]=Math.floor(b/4294967296),v[(E+128>>>10<<5)+31]=b,A.sigBytes=v.length*4,this._process();var I=this._hash.toX32();return I},clone:function(){var A=a.clone.call(this);return A._hash=this._hash.clone(),A},blockSize:1024/32});n.SHA512=a._createHelper(g),n.HmacSHA512=a._createHmacHelper(g)})(),r.SHA512})})(GE)),GE.exports}var qE={exports:{}},Xut=qE.exports,sV;function e0t(){return sV||(sV=1,(function(e,t){(function(r,n,i){e.exports=n(pi(),hB(),mge())})(Xut,function(r){return(function(){var n=r,i=n.x64,a=i.Word,s=i.WordArray,l=n.algo,c=l.SHA512,u=l.SHA384=c.extend({_doReset:function(){this._hash=new s.init([new a.init(3418070365,3238371032),new a.init(1654270250,914150663),new a.init(2438529370,812702999),new a.init(355462360,4144912697),new a.init(1731405415,4290775857),new a.init(2394180231,1750603025),new a.init(3675008525,1694076839),new a.init(1203062813,3204075428)])},_doFinalize:function(){var d=c._doFinalize.call(this);return d.sigBytes-=16,d}});n.SHA384=c._createHelper(u),n.HmacSHA384=c._createHmacHelper(u)})(),r.SHA384})})(qE)),qE.exports}var KE={exports:{}},t0t=KE.exports,oV;function r0t(){return oV||(oV=1,(function(e,t){(function(r,n,i){e.exports=n(pi(),hB())})(t0t,function(r){return(function(n){var i=r,a=i.lib,s=a.WordArray,l=a.Hasher,c=i.x64,u=c.Word,d=i.algo,f=[],m=[],g=[];(function(){for(var b=1,E=0,I=0;I<24;I++){f[b+5*E]=(I+1)*(I+2)/2%64;var S=E%5,_=(2*b+3*E)%5;b=S,E=_}for(var b=0;b<5;b++)for(var E=0;E<5;E++)m[b+5*E]=E+(2*b+3*E)%5*5;for(var B=1,T=0;T<24;T++){for(var P=0,O=0,z=0;z<7;z++){if(B&1){var L=(1<>>24)&16711935|(B<<24|B>>>8)&4278255360,T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360;var P=I[_];P.high^=T,P.low^=B}for(var O=0;O<24;O++){for(var z=0;z<5;z++){for(var L=0,W=0,R=0;R<5;R++){var P=I[z+5*R];L^=P.high,W^=P.low}var $=A[z];$.high=L,$.low=W}for(var z=0;z<5;z++)for(var X=A[(z+4)%5],Z=A[(z+1)%5],K=Z.high,q=Z.low,L=X.high^(K<<1|q>>>31),W=X.low^(q<<1|K>>>31),R=0;R<5;R++){var P=I[z+5*R];P.high^=L,P.low^=W}for(var Y=1;Y<25;Y++){var L,W,P=I[Y],ne=P.high,ge=P.low,ae=f[Y];ae<32?(L=ne<>>32-ae,W=ge<>>32-ae):(L=ge<>>64-ae,W=ne<>>64-ae);var pe=A[m[Y]];pe.high=L,pe.low=W}var _e=A[0],we=I[0];_e.high=we.high,_e.low=we.low;for(var z=0;z<5;z++)for(var R=0;R<5;R++){var Y=z+5*R,P=I[Y],xe=A[Y],Me=A[(z+1)%5+5*R],ye=A[(z+2)%5+5*R];P.high=xe.high^~Me.high&ye.high,P.low=xe.low^~Me.low&ye.low}var P=I[0],Ee=g[O];P.high^=Ee.high,P.low^=Ee.low}},_doFinalize:function(){var b=this._data,E=b.words;this._nDataBytes*8;var I=b.sigBytes*8,S=this.blockSize*32;E[I>>>5]|=1<<24-I%32,E[(n.ceil((I+1)/S)*S>>>5)-1]|=128,b.sigBytes=E.length*4,this._process();for(var _=this._state,B=this.cfg.outputLength/8,T=B/8,P=[],O=0;O>>24)&16711935|(L<<24|L>>>8)&4278255360,W=(W<<8|W>>>24)&16711935|(W<<24|W>>>8)&4278255360,P.push(W),P.push(L)}return new s.init(P,B)},clone:function(){for(var b=l.clone.call(this),E=b._state=this._state.slice(0),I=0;I<25;I++)E[I]=E[I].clone();return b}});i.SHA3=l._createHelper(v),i.HmacSHA3=l._createHmacHelper(v)})(Math),r.SHA3})})(KE)),KE.exports}var VE={exports:{}},n0t=VE.exports,lV;function i0t(){return lV||(lV=1,(function(e,t){(function(r,n){e.exports=n(pi())})(n0t,function(r){return(function(n){var i=r,a=i.lib,s=a.WordArray,l=a.Hasher,c=i.algo,u=s.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),d=s.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),f=s.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),m=s.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),g=s.create([0,1518500249,1859775393,2400959708,2840853838]),A=s.create([1352829926,1548603684,1836072691,2053994217,0]),v=c.RIPEMD160=l.extend({_doReset:function(){this._hash=s.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(T,P){for(var O=0;O<16;O++){var z=P+O,L=T[z];T[z]=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360}var W=this._hash.words,R=g.words,$=A.words,X=u.words,Z=d.words,K=f.words,q=m.words,Y,ne,ge,ae,pe,_e,we,xe,Me,ye;_e=Y=W[0],we=ne=W[1],xe=ge=W[2],Me=ae=W[3],ye=pe=W[4];for(var Ee,O=0;O<80;O+=1)Ee=Y+T[P+X[O]]|0,O<16?Ee+=b(ne,ge,ae)+R[0]:O<32?Ee+=E(ne,ge,ae)+R[1]:O<48?Ee+=I(ne,ge,ae)+R[2]:O<64?Ee+=S(ne,ge,ae)+R[3]:Ee+=_(ne,ge,ae)+R[4],Ee=Ee|0,Ee=B(Ee,K[O]),Ee=Ee+pe|0,Y=pe,pe=ae,ae=B(ge,10),ge=ne,ne=Ee,Ee=_e+T[P+Z[O]]|0,O<16?Ee+=_(we,xe,Me)+$[0]:O<32?Ee+=S(we,xe,Me)+$[1]:O<48?Ee+=I(we,xe,Me)+$[2]:O<64?Ee+=E(we,xe,Me)+$[3]:Ee+=b(we,xe,Me)+$[4],Ee=Ee|0,Ee=B(Ee,q[O]),Ee=Ee+ye|0,_e=ye,ye=Me,Me=B(xe,10),xe=we,we=Ee;Ee=W[1]+ge+Me|0,W[1]=W[2]+ae+ye|0,W[2]=W[3]+pe+_e|0,W[3]=W[4]+Y+we|0,W[4]=W[0]+ne+xe|0,W[0]=Ee},_doFinalize:function(){var T=this._data,P=T.words,O=this._nDataBytes*8,z=T.sigBytes*8;P[z>>>5]|=128<<24-z%32,P[(z+64>>>9<<4)+14]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,T.sigBytes=(P.length+1)*4,this._process();for(var L=this._hash,W=L.words,R=0;R<5;R++){var $=W[R];W[R]=($<<8|$>>>24)&16711935|($<<24|$>>>8)&4278255360}return L},clone:function(){var T=l.clone.call(this);return T._hash=this._hash.clone(),T}});function b(T,P,O){return T^P^O}function E(T,P,O){return T&P|~T&O}function I(T,P,O){return(T|~P)^O}function S(T,P,O){return T&O|P&~O}function _(T,P,O){return T^(P|~O)}function B(T,P){return T<>>32-P}i.RIPEMD160=l._createHelper(v),i.HmacRIPEMD160=l._createHmacHelper(v)})(),r.RIPEMD160})})(VE)),VE.exports}var YE={exports:{}},a0t=YE.exports,cV;function PF(){return cV||(cV=1,(function(e,t){(function(r,n){e.exports=n(pi())})(a0t,function(r){(function(){var n=r,i=n.lib,a=i.Base,s=n.enc,l=s.Utf8,c=n.algo;c.HMAC=a.extend({init:function(u,d){u=this._hasher=new u.init,typeof d=="string"&&(d=l.parse(d));var f=u.blockSize,m=f*4;d.sigBytes>m&&(d=u.finalize(d)),d.clamp();for(var g=this._oKey=d.clone(),A=this._iKey=d.clone(),v=g.words,b=A.words,E=0;E>>2]&255;L.sigBytes-=W}};a.BlockCipher=g.extend({cfg:g.cfg.extend({mode:b,padding:I}),reset:function(){var L;g.reset.call(this);var W=this.cfg,R=W.iv,$=W.mode;this._xformMode==this._ENC_XFORM_MODE?L=$.createEncryptor:(L=$.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==L?this._mode.init(this,R&&R.words):(this._mode=L.call($,this,R&&R.words),this._mode.__creator=L)},_doProcessBlock:function(L,W){this._mode.processBlock(L,W)},_doFinalize:function(){var L,W=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(W.pad(this._data,this.blockSize),L=this._process(!0)):(L=this._process(!0),W.unpad(L)),L},blockSize:128/32});var S=a.CipherParams=s.extend({init:function(L){this.mixIn(L)},toString:function(L){return(L||this.formatter).stringify(this)}}),_=i.format={},B=_.OpenSSL={stringify:function(L){var W,R=L.ciphertext,$=L.salt;return $?W=l.create([1398893684,1701076831]).concat($).concat(R):W=R,W.toString(d)},parse:function(L){var W,R=d.parse(L),$=R.words;return $[0]==1398893684&&$[1]==1701076831&&(W=l.create($.slice(2,4)),$.splice(0,4),R.sigBytes-=16),S.create({ciphertext:R,salt:W})}},T=a.SerializableCipher=s.extend({cfg:s.extend({format:B}),encrypt:function(L,W,R,$){$=this.cfg.extend($);var X=L.createEncryptor(R,$),Z=X.finalize(W),K=X.cfg;return S.create({ciphertext:Z,key:R,iv:K.iv,algorithm:L,mode:K.mode,padding:K.padding,blockSize:L.blockSize,formatter:$.format})},decrypt:function(L,W,R,$){$=this.cfg.extend($),W=this._parse(W,$.format);var X=L.createDecryptor(R,$).finalize(W.ciphertext);return X},_parse:function(L,W){return typeof L=="string"?W.parse(L,this):L}}),P=i.kdf={},O=P.OpenSSL={execute:function(L,W,R,$,X){if($||($=l.random(64/8)),X)var Z=m.create({keySize:W+R,hasher:X}).compute(L,$);else var Z=m.create({keySize:W+R}).compute(L,$);var K=l.create(Z.words.slice(W),R*4);return Z.sigBytes=W*4,S.create({key:Z,iv:K,salt:$})}},z=a.PasswordBasedCipher=T.extend({cfg:T.cfg.extend({kdf:O}),encrypt:function(L,W,R,$){$=this.cfg.extend($);var X=$.kdf.execute(R,L.keySize,L.ivSize,$.salt,$.hasher);$.iv=X.iv;var Z=T.encrypt.call(this,L,W,X.key,$);return Z.mixIn(X),Z},decrypt:function(L,W,R,$){$=this.cfg.extend($),W=this._parse(W,$.format);var X=$.kdf.execute(R,L.keySize,L.ivSize,W.salt,$.hasher);$.iv=X.iv;var Z=T.decrypt.call(this,L,W,X.key,$);return Z}})})()})})(XE)),XE.exports}var eC={exports:{}},u0t=eC.exports,hV;function d0t(){return hV||(hV=1,(function(e,t){(function(r,n,i){e.exports=n(pi(),ul())})(u0t,function(r){return r.mode.CFB=(function(){var n=r.lib.BlockCipherMode.extend();n.Encryptor=n.extend({processBlock:function(a,s){var l=this._cipher,c=l.blockSize;i.call(this,a,s,c,l),this._prevBlock=a.slice(s,s+c)}}),n.Decryptor=n.extend({processBlock:function(a,s){var l=this._cipher,c=l.blockSize,u=a.slice(s,s+c);i.call(this,a,s,c,l),this._prevBlock=u}});function i(a,s,l,c){var u,d=this._iv;d?(u=d.slice(0),this._iv=void 0):u=this._prevBlock,c.encryptBlock(u,0);for(var f=0;f>24&255)===255){var c=l>>16&255,u=l>>8&255,d=l&255;c===255?(c=0,u===255?(u=0,d===255?d=0:++d):++u):++c,l=0,l+=c<<16,l+=u<<8,l+=d}else l+=1<<24;return l}function a(l){return(l[0]=i(l[0]))===0&&(l[1]=i(l[1])),l}var s=n.Encryptor=n.extend({processBlock:function(l,c){var u=this._cipher,d=u.blockSize,f=this._iv,m=this._counter;f&&(m=this._counter=f.slice(0),this._iv=void 0),a(m);var g=m.slice(0);u.encryptBlock(g,0);for(var A=0;A>>2]|=l<<24-c%4*8,n.sigBytes+=l},unpad:function(n){var i=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=i}},r.pad.Ansix923})})(aC)),aC.exports}var sC={exports:{}},w0t=sC.exports,xV;function E0t(){return xV||(xV=1,(function(e,t){(function(r,n,i){e.exports=n(pi(),ul())})(w0t,function(r){return r.pad.Iso10126={pad:function(n,i){var a=i*4,s=a-n.sigBytes%a;n.concat(r.lib.WordArray.random(s-1)).concat(r.lib.WordArray.create([s<<24],1))},unpad:function(n){var i=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=i}},r.pad.Iso10126})})(sC)),sC.exports}var oC={exports:{}},C0t=oC.exports,yV;function I0t(){return yV||(yV=1,(function(e,t){(function(r,n,i){e.exports=n(pi(),ul())})(C0t,function(r){return r.pad.Iso97971={pad:function(n,i){n.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(n,i)},unpad:function(n){r.pad.ZeroPadding.unpad(n),n.sigBytes--}},r.pad.Iso97971})})(oC)),oC.exports}var lC={exports:{}},S0t=lC.exports,bV;function B0t(){return bV||(bV=1,(function(e,t){(function(r,n,i){e.exports=n(pi(),ul())})(S0t,function(r){return r.pad.ZeroPadding={pad:function(n,i){var a=i*4;n.clamp(),n.sigBytes+=a-(n.sigBytes%a||a)},unpad:function(n){for(var i=n.words,a=n.sigBytes-1,a=n.sigBytes-1;a>=0;a--)if(i[a>>>2]>>>24-a%4*8&255){n.sigBytes=a+1;break}}},r.pad.ZeroPadding})})(lC)),lC.exports}var cC={exports:{}},N0t=cC.exports,wV;function k0t(){return wV||(wV=1,(function(e,t){(function(r,n,i){e.exports=n(pi(),ul())})(N0t,function(r){return r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding})})(cC)),cC.exports}var uC={exports:{}},_0t=uC.exports,EV;function j0t(){return EV||(EV=1,(function(e,t){(function(r,n,i){e.exports=n(pi(),ul())})(_0t,function(r){return(function(n){var i=r,a=i.lib,s=a.CipherParams,l=i.enc,c=l.Hex,u=i.format;u.Hex={stringify:function(d){return d.ciphertext.toString(c)},parse:function(d){var f=c.parse(d);return s.create({ciphertext:f})}}})(),r.format.Hex})})(uC)),uC.exports}var dC={exports:{}},D0t=dC.exports,CV;function T0t(){return CV||(CV=1,(function(e,t){(function(r,n,i){e.exports=n(pi(),V1(),Dg(),Tg(),ul())})(D0t,function(r){return(function(){var n=r,i=n.lib,a=i.BlockCipher,s=n.algo,l=[],c=[],u=[],d=[],f=[],m=[],g=[],A=[],v=[],b=[];(function(){for(var S=[],_=0;_<256;_++)_<128?S[_]=_<<1:S[_]=_<<1^283;for(var B=0,T=0,_=0;_<256;_++){var P=T^T<<1^T<<2^T<<3^T<<4;P=P>>>8^P&255^99,l[B]=P,c[P]=B;var O=S[B],z=S[O],L=S[z],W=S[P]*257^P*16843008;u[B]=W<<24|W>>>8,d[B]=W<<16|W>>>16,f[B]=W<<8|W>>>24,m[B]=W;var W=L*16843009^z*65537^O*257^B*16843008;g[P]=W<<24|W>>>8,A[P]=W<<16|W>>>16,v[P]=W<<8|W>>>24,b[P]=W,B?(B=O^S[S[S[L^O]]],T^=S[S[T]]):B=T=1}})();var E=[0,1,2,4,8,16,32,64,128,27,54],I=s.AES=a.extend({_doReset:function(){var S;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var _=this._keyPriorReset=this._key,B=_.words,T=_.sigBytes/4,P=this._nRounds=T+6,O=(P+1)*4,z=this._keySchedule=[],L=0;L6&&L%T==4&&(S=l[S>>>24]<<24|l[S>>>16&255]<<16|l[S>>>8&255]<<8|l[S&255]):(S=S<<8|S>>>24,S=l[S>>>24]<<24|l[S>>>16&255]<<16|l[S>>>8&255]<<8|l[S&255],S^=E[L/T|0]<<24),z[L]=z[L-T]^S);for(var W=this._invKeySchedule=[],R=0;R>>24]]^A[l[S>>>16&255]]^v[l[S>>>8&255]]^b[l[S&255]]}}},encryptBlock:function(S,_){this._doCryptBlock(S,_,this._keySchedule,u,d,f,m,l)},decryptBlock:function(S,_){var B=S[_+1];S[_+1]=S[_+3],S[_+3]=B,this._doCryptBlock(S,_,this._invKeySchedule,g,A,v,b,c);var B=S[_+1];S[_+1]=S[_+3],S[_+3]=B},_doCryptBlock:function(S,_,B,T,P,O,z,L){for(var W=this._nRounds,R=S[_]^B[0],$=S[_+1]^B[1],X=S[_+2]^B[2],Z=S[_+3]^B[3],K=4,q=1;q>>24]^P[$>>>16&255]^O[X>>>8&255]^z[Z&255]^B[K++],ne=T[$>>>24]^P[X>>>16&255]^O[Z>>>8&255]^z[R&255]^B[K++],ge=T[X>>>24]^P[Z>>>16&255]^O[R>>>8&255]^z[$&255]^B[K++],ae=T[Z>>>24]^P[R>>>16&255]^O[$>>>8&255]^z[X&255]^B[K++];R=Y,$=ne,X=ge,Z=ae}var Y=(L[R>>>24]<<24|L[$>>>16&255]<<16|L[X>>>8&255]<<8|L[Z&255])^B[K++],ne=(L[$>>>24]<<24|L[X>>>16&255]<<16|L[Z>>>8&255]<<8|L[R&255])^B[K++],ge=(L[X>>>24]<<24|L[Z>>>16&255]<<16|L[R>>>8&255]<<8|L[$&255])^B[K++],ae=(L[Z>>>24]<<24|L[R>>>16&255]<<16|L[$>>>8&255]<<8|L[X&255])^B[K++];S[_]=Y,S[_+1]=ne,S[_+2]=ge,S[_+3]=ae},keySize:256/32});n.AES=a._createHelper(I)})(),r.AES})})(dC)),dC.exports}var fC={exports:{}},P0t=fC.exports,IV;function O0t(){return IV||(IV=1,(function(e,t){(function(r,n,i){e.exports=n(pi(),V1(),Dg(),Tg(),ul())})(P0t,function(r){return(function(){var n=r,i=n.lib,a=i.WordArray,s=i.BlockCipher,l=n.algo,c=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],u=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],d=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],f=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],m=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],g=l.DES=s.extend({_doReset:function(){for(var E=this._key,I=E.words,S=[],_=0;_<56;_++){var B=c[_]-1;S[_]=I[B>>>5]>>>31-B%32&1}for(var T=this._subKeys=[],P=0;P<16;P++){for(var O=T[P]=[],z=d[P],_=0;_<24;_++)O[_/6|0]|=S[(u[_]-1+z)%28]<<31-_%6,O[4+(_/6|0)]|=S[28+(u[_+24]-1+z)%28]<<31-_%6;O[0]=O[0]<<1|O[0]>>>31;for(var _=1;_<7;_++)O[_]=O[_]>>>(_-1)*4+3;O[7]=O[7]<<5|O[7]>>>27}for(var L=this._invSubKeys=[],_=0;_<16;_++)L[_]=T[15-_]},encryptBlock:function(E,I){this._doCryptBlock(E,I,this._subKeys)},decryptBlock:function(E,I){this._doCryptBlock(E,I,this._invSubKeys)},_doCryptBlock:function(E,I,S){this._lBlock=E[I],this._rBlock=E[I+1],A.call(this,4,252645135),A.call(this,16,65535),v.call(this,2,858993459),v.call(this,8,16711935),A.call(this,1,1431655765);for(var _=0;_<16;_++){for(var B=S[_],T=this._lBlock,P=this._rBlock,O=0,z=0;z<8;z++)O|=f[z][((P^B[z])&m[z])>>>0];this._lBlock=P,this._rBlock=T^O}var L=this._lBlock;this._lBlock=this._rBlock,this._rBlock=L,A.call(this,1,1431655765),v.call(this,8,16711935),v.call(this,2,858993459),A.call(this,16,65535),A.call(this,4,252645135),E[I]=this._lBlock,E[I+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function A(E,I){var S=(this._lBlock>>>E^this._rBlock)&I;this._rBlock^=S,this._lBlock^=S<>>E^this._lBlock)&I;this._lBlock^=S,this._rBlock^=S<192.");var S=I.slice(0,2),_=I.length<4?I.slice(0,2):I.slice(2,4),B=I.length<6?I.slice(0,2):I.slice(4,6);this._des1=g.createEncryptor(a.create(S)),this._des2=g.createEncryptor(a.create(_)),this._des3=g.createEncryptor(a.create(B))},encryptBlock:function(E,I){this._des1.encryptBlock(E,I),this._des2.decryptBlock(E,I),this._des3.encryptBlock(E,I)},decryptBlock:function(E,I){this._des3.decryptBlock(E,I),this._des2.encryptBlock(E,I),this._des1.decryptBlock(E,I)},keySize:192/32,ivSize:64/32,blockSize:64/32});n.TripleDES=s._createHelper(b)})(),r.TripleDES})})(fC)),fC.exports}var hC={exports:{}},R0t=hC.exports,SV;function F0t(){return SV||(SV=1,(function(e,t){(function(r,n,i){e.exports=n(pi(),V1(),Dg(),Tg(),ul())})(R0t,function(r){return(function(){var n=r,i=n.lib,a=i.StreamCipher,s=n.algo,l=s.RC4=a.extend({_doReset:function(){for(var d=this._key,f=d.words,m=d.sigBytes,g=this._S=[],A=0;A<256;A++)g[A]=A;for(var A=0,v=0;A<256;A++){var b=A%m,E=f[b>>>2]>>>24-b%4*8&255;v=(v+g[A]+E)%256;var I=g[A];g[A]=g[v],g[v]=I}this._i=this._j=0},_doProcessBlock:function(d,f){d[f]^=c.call(this)},keySize:256/32,ivSize:0});function c(){for(var d=this._S,f=this._i,m=this._j,g=0,A=0;A<4;A++){f=(f+1)%256,m=(m+d[f])%256;var v=d[f];d[f]=d[m],d[m]=v,g|=d[(d[f]+d[m])%256]<<24-A*8}return this._i=f,this._j=m,g}n.RC4=a._createHelper(l);var u=s.RC4Drop=l.extend({cfg:l.cfg.extend({drop:192}),_doReset:function(){l._doReset.call(this);for(var d=this.cfg.drop;d>0;d--)c.call(this)}});n.RC4Drop=a._createHelper(u)})(),r.RC4})})(hC)),hC.exports}var mC={exports:{}},M0t=mC.exports,BV;function Q0t(){return BV||(BV=1,(function(e,t){(function(r,n,i){e.exports=n(pi(),V1(),Dg(),Tg(),ul())})(M0t,function(r){return(function(){var n=r,i=n.lib,a=i.StreamCipher,s=n.algo,l=[],c=[],u=[],d=s.Rabbit=a.extend({_doReset:function(){for(var m=this._key.words,g=this.cfg.iv,A=0;A<4;A++)m[A]=(m[A]<<8|m[A]>>>24)&16711935|(m[A]<<24|m[A]>>>8)&4278255360;var v=this._X=[m[0],m[3]<<16|m[2]>>>16,m[1],m[0]<<16|m[3]>>>16,m[2],m[1]<<16|m[0]>>>16,m[3],m[2]<<16|m[1]>>>16],b=this._C=[m[2]<<16|m[2]>>>16,m[0]&4294901760|m[1]&65535,m[3]<<16|m[3]>>>16,m[1]&4294901760|m[2]&65535,m[0]<<16|m[0]>>>16,m[2]&4294901760|m[3]&65535,m[1]<<16|m[1]>>>16,m[3]&4294901760|m[0]&65535];this._b=0;for(var A=0;A<4;A++)f.call(this);for(var A=0;A<8;A++)b[A]^=v[A+4&7];if(g){var E=g.words,I=E[0],S=E[1],_=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,B=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,T=_>>>16|B&4294901760,P=B<<16|_&65535;b[0]^=_,b[1]^=T,b[2]^=B,b[3]^=P,b[4]^=_,b[5]^=T,b[6]^=B,b[7]^=P;for(var A=0;A<4;A++)f.call(this)}},_doProcessBlock:function(m,g){var A=this._X;f.call(this),l[0]=A[0]^A[5]>>>16^A[3]<<16,l[1]=A[2]^A[7]>>>16^A[5]<<16,l[2]=A[4]^A[1]>>>16^A[7]<<16,l[3]=A[6]^A[3]>>>16^A[1]<<16;for(var v=0;v<4;v++)l[v]=(l[v]<<8|l[v]>>>24)&16711935|(l[v]<<24|l[v]>>>8)&4278255360,m[g+v]^=l[v]},blockSize:128/32,ivSize:64/32});function f(){for(var m=this._X,g=this._C,A=0;A<8;A++)c[A]=g[A];g[0]=g[0]+1295307597+this._b|0,g[1]=g[1]+3545052371+(g[0]>>>0>>0?1:0)|0,g[2]=g[2]+886263092+(g[1]>>>0>>0?1:0)|0,g[3]=g[3]+1295307597+(g[2]>>>0>>0?1:0)|0,g[4]=g[4]+3545052371+(g[3]>>>0>>0?1:0)|0,g[5]=g[5]+886263092+(g[4]>>>0>>0?1:0)|0,g[6]=g[6]+1295307597+(g[5]>>>0>>0?1:0)|0,g[7]=g[7]+3545052371+(g[6]>>>0>>0?1:0)|0,this._b=g[7]>>>0>>0?1:0;for(var A=0;A<8;A++){var v=m[A]+g[A],b=v&65535,E=v>>>16,I=((b*b>>>17)+b*E>>>15)+E*E,S=((v&4294901760)*v|0)+((v&65535)*v|0);u[A]=I^S}m[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,m[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,m[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,m[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,m[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,m[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,m[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,m[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}n.Rabbit=a._createHelper(d)})(),r.Rabbit})})(mC)),mC.exports}var pC={exports:{}},L0t=pC.exports,NV;function U0t(){return NV||(NV=1,(function(e,t){(function(r,n,i){e.exports=n(pi(),V1(),Dg(),Tg(),ul())})(L0t,function(r){return(function(){var n=r,i=n.lib,a=i.StreamCipher,s=n.algo,l=[],c=[],u=[],d=s.RabbitLegacy=a.extend({_doReset:function(){var m=this._key.words,g=this.cfg.iv,A=this._X=[m[0],m[3]<<16|m[2]>>>16,m[1],m[0]<<16|m[3]>>>16,m[2],m[1]<<16|m[0]>>>16,m[3],m[2]<<16|m[1]>>>16],v=this._C=[m[2]<<16|m[2]>>>16,m[0]&4294901760|m[1]&65535,m[3]<<16|m[3]>>>16,m[1]&4294901760|m[2]&65535,m[0]<<16|m[0]>>>16,m[2]&4294901760|m[3]&65535,m[1]<<16|m[1]>>>16,m[3]&4294901760|m[0]&65535];this._b=0;for(var b=0;b<4;b++)f.call(this);for(var b=0;b<8;b++)v[b]^=A[b+4&7];if(g){var E=g.words,I=E[0],S=E[1],_=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,B=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,T=_>>>16|B&4294901760,P=B<<16|_&65535;v[0]^=_,v[1]^=T,v[2]^=B,v[3]^=P,v[4]^=_,v[5]^=T,v[6]^=B,v[7]^=P;for(var b=0;b<4;b++)f.call(this)}},_doProcessBlock:function(m,g){var A=this._X;f.call(this),l[0]=A[0]^A[5]>>>16^A[3]<<16,l[1]=A[2]^A[7]>>>16^A[5]<<16,l[2]=A[4]^A[1]>>>16^A[7]<<16,l[3]=A[6]^A[3]>>>16^A[1]<<16;for(var v=0;v<4;v++)l[v]=(l[v]<<8|l[v]>>>24)&16711935|(l[v]<<24|l[v]>>>8)&4278255360,m[g+v]^=l[v]},blockSize:128/32,ivSize:64/32});function f(){for(var m=this._X,g=this._C,A=0;A<8;A++)c[A]=g[A];g[0]=g[0]+1295307597+this._b|0,g[1]=g[1]+3545052371+(g[0]>>>0>>0?1:0)|0,g[2]=g[2]+886263092+(g[1]>>>0>>0?1:0)|0,g[3]=g[3]+1295307597+(g[2]>>>0>>0?1:0)|0,g[4]=g[4]+3545052371+(g[3]>>>0>>0?1:0)|0,g[5]=g[5]+886263092+(g[4]>>>0>>0?1:0)|0,g[6]=g[6]+1295307597+(g[5]>>>0>>0?1:0)|0,g[7]=g[7]+3545052371+(g[6]>>>0>>0?1:0)|0,this._b=g[7]>>>0>>0?1:0;for(var A=0;A<8;A++){var v=m[A]+g[A],b=v&65535,E=v>>>16,I=((b*b>>>17)+b*E>>>15)+E*E,S=((v&4294901760)*v|0)+((v&65535)*v|0);u[A]=I^S}m[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,m[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,m[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,m[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,m[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,m[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,m[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,m[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}n.RabbitLegacy=a._createHelper(d)})(),r.RabbitLegacy})})(pC)),pC.exports}var gC={exports:{}},$0t=gC.exports,kV;function z0t(){return kV||(kV=1,(function(e,t){(function(r,n,i){e.exports=n(pi(),V1(),Dg(),Tg(),ul())})($0t,function(r){return(function(){var n=r,i=n.lib,a=i.BlockCipher,s=n.algo;const l=16,c=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],u=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var d={pbox:[],sbox:[]};function f(b,E){let I=E>>24&255,S=E>>16&255,_=E>>8&255,B=E&255,T=b.sbox[0][I]+b.sbox[1][S];return T=T^b.sbox[2][_],T=T+b.sbox[3][B],T}function m(b,E,I){let S=E,_=I,B;for(let T=0;T1;--T)S=S^b.pbox[T],_=f(b,S)^_,B=S,S=_,_=B;return B=S,S=_,_=B,_=_^b.pbox[1],S=S^b.pbox[0],{left:S,right:_}}function A(b,E,I){for(let P=0;P<4;P++){b.sbox[P]=[];for(let O=0;O<256;O++)b.sbox[P][O]=u[P][O]}let S=0;for(let P=0;P=I&&(S=0);let _=0,B=0,T=0;for(let P=0;P0)throw new Error("Invalid string. Length must be a multiple of 4");a=e[l-2]==="="?2:e[l-1]==="="?1:0,s=new q0t(l*3/4-a),n=a>0?l-4:l;var c=0;for(t=0,r=0;t>16&255,s[c++]=i>>8&255,s[c++]=i&255;return a===2?(i=k0[e.charCodeAt(t)]<<2|k0[e.charCodeAt(t+1)]>>4,s[c++]=i&255):a===1&&(i=k0[e.charCodeAt(t)]<<10|k0[e.charCodeAt(t+1)]<<4|k0[e.charCodeAt(t+2)]>>2,s[c++]=i>>8&255,s[c++]=i&255),s}function V0t(e){return _f[e>>18&63]+_f[e>>12&63]+_f[e>>6&63]+_f[e&63]}function Y0t(e,t,r){for(var n,i=[],a=t;ac?c:l+s));return n===1?(t=e[r-1],i+=_f[t>>2],i+=_f[t<<4&63],i+="=="):n===2&&(t=(e[r-2]<<8)+e[r-1],i+=_f[t>>10],i+=_f[t>>4&63],i+=_f[t<<2&63],i+="="),a.push(i),a.join("")}function mB(e,t,r,n,i){var a,s,l=i*8-n-1,c=(1<>1,d=-7,f=r?i-1:0,m=r?-1:1,g=e[t+f];for(f+=m,a=g&(1<<-d)-1,g>>=-d,d+=l;d>0;a=a*256+e[t+f],f+=m,d-=8);for(s=a&(1<<-d)-1,a>>=-d,d+=n;d>0;s=s*256+e[t+f],f+=m,d-=8);if(a===0)a=1-u;else{if(a===c)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-u}return(g?-1:1)*s*Math.pow(2,a-n)}function gge(e,t,r,n,i,a){var s,l,c,u=a*8-i-1,d=(1<>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:a-1,A=n?1:-1,v=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+f>=1?t+=m/c:t+=m*Math.pow(2,1-f),t*c>=2&&(s++,c/=2),s+f>=d?(l=0,s=d):s+f>=1?(l=(t*c-1)*Math.pow(2,i),s=s+f):(l=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+g]=l&255,g+=A,l/=256,i-=8);for(s=s<0;e[r+g]=s&255,g+=A,s/=256,u-=8);e[r+g-A]|=v*128}var Z0t={}.toString,Age=Array.isArray||function(e){return Z0t.call(e)=="[object Array]"};var vge=50;Bt.TYPED_ARRAY_SUPPORT=S1.TYPED_ARRAY_SUPPORT!==void 0?S1.TYPED_ARRAY_SUPPORT:!0;var J0t=l3();function l3(){return Bt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function am(e,t){if(l3()=l3())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l3().toString(16)+" bytes");return e|0}function ndt(e){return+e!=e&&(e=0),Bt.alloc(+e)}Bt.isBuffer=UA;function sh(e){return!!(e!=null&&e._isBuffer)}Bt.compare=function(t,r){if(!sh(t)||!sh(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var n=t.length,i=r.length,a=0,s=Math.min(n,i);a>>1;case"base64":return Nge(e).length;default:if(n)return c3(e).length;t=(""+t).toLowerCase(),n=!0}}Bt.byteLength=bge;function idt(e,t,r){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return mdt(this,t,r);case"utf8":case"utf-8":return Cge(this,t,r);case"ascii":return fdt(this,t,r);case"latin1":case"binary":return hdt(this,t,r);case"base64":return udt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pdt(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Bt.prototype._isBuffer=!0;function LA(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}Bt.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""};Bt.prototype.compare=function(t,r,n,i,a){if(!sh(t))throw new TypeError("Argument must be a Buffer");if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;for(var s=a-i,l=n-r,c=Math.min(s,l),u=this.slice(i,a),d=t.slice(r,n),f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=Bt.from(t,n)),sh(t))return t.length===0?-1:TV(e,t,r,n,i);if(typeof t=="number")return t=t&255,Bt.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):TV(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function TV(e,t,r,n,i){var a=1,s=e.length,l=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(g,A){return a===1?g[A]:g.readUInt16BE(A*a)}var u;if(i){var d=-1;for(u=r;us&&(r=s-l),u=r;u>=0;u--){for(var f=!0,m=0;mi&&(n=i)):n=i;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var s=0;sa)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return adt(this,t,r,n);case"utf8":case"utf-8":return sdt(this,t,r,n);case"ascii":return Ege(this,t,r,n);case"latin1":case"binary":return odt(this,t,r,n);case"base64":return ldt(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return cdt(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};Bt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function udt(e,t,r){return t===0&&r===e.length?DV(e):DV(e.slice(t,r))}function Cge(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:a>223?3:a>191?2:1;if(i+l<=r){var c,u,d,f;switch(l){case 1:a<128&&(s=a);break;case 2:c=e[i+1],(c&192)===128&&(f=(a&31)<<6|c&63,f>127&&(s=f));break;case 3:c=e[i+1],u=e[i+2],(c&192)===128&&(u&192)===128&&(f=(a&15)<<12|(c&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:c=e[i+1],u=e[i+2],d=e[i+3],(c&192)===128&&(u&192)===128&&(d&192)===128&&(f=(a&15)<<18|(c&63)<<12|(u&63)<<6|d&63,f>65535&&f<1114112&&(s=f))}}s===null?(s=65533,l=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=l}return ddt(n)}var PV=4096;function ddt(e){var t=e.length;if(t<=PV)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var i="",a=t;an&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}Bt.prototype.readUIntLE=function(t,r,n){t=t|0,r=r|0,n||dl(t,r,this.length);for(var i=this[t],a=1,s=0;++s0&&(a*=256);)i+=this[t+--r]*a;return i};Bt.prototype.readUInt8=function(t,r){return r||dl(t,1,this.length),this[t]};Bt.prototype.readUInt16LE=function(t,r){return r||dl(t,2,this.length),this[t]|this[t+1]<<8};Bt.prototype.readUInt16BE=function(t,r){return r||dl(t,2,this.length),this[t]<<8|this[t+1]};Bt.prototype.readUInt32LE=function(t,r){return r||dl(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Bt.prototype.readUInt32BE=function(t,r){return r||dl(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Bt.prototype.readIntLE=function(t,r,n){t=t|0,r=r|0,n||dl(t,r,this.length);for(var i=this[t],a=1,s=0;++s=a&&(i-=Math.pow(2,8*r)),i};Bt.prototype.readIntBE=function(t,r,n){t=t|0,r=r|0,n||dl(t,r,this.length);for(var i=r,a=1,s=this[t+--i];i>0&&(a*=256);)s+=this[t+--i]*a;return a*=128,s>=a&&(s-=Math.pow(2,8*r)),s};Bt.prototype.readInt8=function(t,r){return r||dl(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Bt.prototype.readInt16LE=function(t,r){r||dl(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};Bt.prototype.readInt16BE=function(t,r){r||dl(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};Bt.prototype.readInt32LE=function(t,r){return r||dl(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Bt.prototype.readInt32BE=function(t,r){return r||dl(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Bt.prototype.readFloatLE=function(t,r){return r||dl(t,4,this.length),mB(this,t,!0,23,4)};Bt.prototype.readFloatBE=function(t,r){return r||dl(t,4,this.length),mB(this,t,!1,23,4)};Bt.prototype.readDoubleLE=function(t,r){return r||dl(t,8,this.length),mB(this,t,!0,52,8)};Bt.prototype.readDoubleBE=function(t,r){return r||dl(t,8,this.length),mB(this,t,!1,52,8)};function nu(e,t,r,n,i,a){if(!sh(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}Bt.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;nu(this,t,r,n,a,0)}var s=1,l=0;for(this[r]=t&255;++l=0&&(l*=256);)this[r+s]=t/l&255;return r+n};Bt.prototype.writeUInt8=function(t,r,n){return t=+t,r=r|0,n||nu(this,t,r,1,255,0),Bt.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=t&255,r+1};function pB(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>(n?i:1-i)*8}Bt.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r|0,n||nu(this,t,r,2,65535,0),Bt.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8):pB(this,t,r,!0),r+2};Bt.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r|0,n||nu(this,t,r,2,65535,0),Bt.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t&255):pB(this,t,r,!1),r+2};function gB(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>(n?i:3-i)*8&255}Bt.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r|0,n||nu(this,t,r,4,4294967295,0),Bt.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255):gB(this,t,r,!0),r+4};Bt.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r|0,n||nu(this,t,r,4,4294967295,0),Bt.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255):gB(this,t,r,!1),r+4};Bt.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r|0,!i){var a=Math.pow(2,8*n-1);nu(this,t,r,n,a-1,-a)}var s=0,l=1,c=0;for(this[r]=t&255;++s>0)-c&255;return r+n};Bt.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r|0,!i){var a=Math.pow(2,8*n-1);nu(this,t,r,n,a-1,-a)}var s=n-1,l=1,c=0;for(this[r+s]=t&255;--s>=0&&(l*=256);)t<0&&c===0&&this[r+s+1]!==0&&(c=1),this[r+s]=(t/l>>0)-c&255;return r+n};Bt.prototype.writeInt8=function(t,r,n){return t=+t,r=r|0,n||nu(this,t,r,1,127,-128),Bt.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=t&255,r+1};Bt.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r|0,n||nu(this,t,r,2,32767,-32768),Bt.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8):pB(this,t,r,!0),r+2};Bt.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r|0,n||nu(this,t,r,2,32767,-32768),Bt.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t&255):pB(this,t,r,!1),r+2};Bt.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r|0,n||nu(this,t,r,4,2147483647,-2147483648),Bt.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):gB(this,t,r,!0),r+4};Bt.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r|0,n||nu(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Bt.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255):gB(this,t,r,!1),r+4};function Ige(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Sge(e,t,r,n,i){return i||Ige(e,t,r,4),gge(e,t,r,n,23,4),r+4}Bt.prototype.writeFloatLE=function(t,r,n){return Sge(this,t,r,!0,n)};Bt.prototype.writeFloatBE=function(t,r,n){return Sge(this,t,r,!1,n)};function Bge(e,t,r,n,i){return i||Ige(e,t,r,8),gge(e,t,r,n,52,8),r+8}Bt.prototype.writeDoubleLE=function(t,r,n){return Bge(this,t,r,!0,n)};Bt.prototype.writeDoubleBE=function(t,r,n){return Bge(this,t,r,!1,n)};Bt.prototype.copy=function(t,r,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r=0;--s)t[s+r]=this[s+n];else if(a<1e3||!Bt.TYPED_ARRAY_SUPPORT)for(s=0;s>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var s;if(typeof t=="number")for(s=r;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function ydt(e){for(var t=[],r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function Nge(e){return K0t(Adt(e))}function AB(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function wdt(e){return e!==e}function UA(e){return e!=null&&(!!e._isBuffer||kge(e)||Edt(e))}function kge(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Edt(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&kge(e.slice(0,0))}var Cdt=Object.freeze({__proto__:null,Buffer:Bt,INSPECT_MAX_BYTES:vge,SlowBuffer:ndt,isBuffer:UA,kMaxLength:J0t}),u3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ty(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var jT={exports:{}},Py={};function jge(){throw new Error("setTimeout has not been defined")}function Dge(){throw new Error("clearTimeout has not been defined")}var Op=jge,Rp=Dge;typeof S1.setTimeout=="function"&&(Op=setTimeout);typeof S1.clearTimeout=="function"&&(Rp=clearTimeout);function Tge(e){if(Op===setTimeout)return setTimeout(e,0);if((Op===jge||!Op)&&setTimeout)return Op=setTimeout,setTimeout(e,0);try{return Op(e,0)}catch{try{return Op.call(null,e,0)}catch{return Op.call(this,e,0)}}}function Idt(e){if(Rp===clearTimeout)return clearTimeout(e);if((Rp===Dge||!Rp)&&clearTimeout)return Rp=clearTimeout,clearTimeout(e);try{return Rp(e)}catch{try{return Rp.call(null,e)}catch{return Rp.call(this,e)}}}var sm=[],hx=!1,$A,AC=-1;function Sdt(){!hx||!$A||(hx=!1,$A.length?sm=$A.concat(sm):AC=-1,sm.length&&Pge())}function Pge(){if(!hx){var e=Tge(Sdt);hx=!0;for(var t=sm.length;t;){for($A=sm,sm=[];++AC1)for(var r=1;r0&&s.length>i)){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,nft(l)}return e}function nft(e){typeof console.warn=="function"?console.warn(e):console.log(e)}Gi.prototype.addListener=function(t,r){return Fge(this,t,r,!1)};Gi.prototype.on=Gi.prototype.addListener;Gi.prototype.prependListener=function(t,r){return Fge(this,t,r,!0)};function Mge(e,t,r){var n=!1;function i(){e.removeListener(t,i),n||(n=!0,r.apply(e,arguments))}return i.listener=r,i}Gi.prototype.once=function(t,r){if(typeof r!="function")throw new TypeError('"listener" argument must be a function');return this.on(t,Mge(this,t,r)),this};Gi.prototype.prependOnceListener=function(t,r){if(typeof r!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(t,Mge(this,t,r)),this};Gi.prototype.removeListener=function(t,r){var n,i,a,s,l;if(typeof r!="function")throw new TypeError('"listener" argument must be a function');if(i=this._events,!i)return this;if(n=i[t],!n)return this;if(n===r||n.listener&&n.listener===r)--this._eventsCount===0?this._events=new rg:(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(a=-1,s=n.length;s-- >0;)if(n[s]===r||n[s].listener&&n[s].listener===r){l=n[s].listener,a=s;break}if(a<0)return this;if(n.length===1){if(n[0]=void 0,--this._eventsCount===0)return this._events=new rg,this;delete i[t]}else ift(n,a);i.removeListener&&this.emit("removeListener",t,l||r)}return this};Gi.prototype.off=function(e,t){return this.removeListener(e,t)};Gi.prototype.removeAllListeners=function(t){var r,n;if(n=this._events,!n)return this;if(!n.removeListener)return arguments.length===0?(this._events=new rg,this._eventsCount=0):n[t]&&(--this._eventsCount===0?this._events=new rg:delete n[t]),this;if(arguments.length===0){for(var i=Object.keys(n),a=0,s;a0?Reflect.ownKeys(this._events):[]};function ift(e,t){for(var r=t,n=r+1,i=e.length;n=i)return l;switch(l){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}default:return l}}),s=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),xB(t)?r.showHidden=t:t&&$F(r,t),Mf(r.showHidden)&&(r.showHidden=!1),Mf(r.depth)&&(r.depth=2),Mf(r.colors)&&(r.colors=!1),Mf(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=lft),d3(r,e,r.depth)}Td.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};Td.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function lft(e,t){var r=Td.styles[t];return r?"\x1B["+Td.colors[r][0]+"m"+e+"\x1B["+Td.colors[r][1]+"m":e}function cft(e,t){return e}function uft(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function d3(e,t,r){if(e.customInspect&&t&&XA(t.inspect)&&t.inspect!==Td&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return v5(n)||(n=d3(e,n,r)),n}var i=dft(e,t);if(i)return i;var a=Object.keys(t),s=uft(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),mx(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return xj(t);if(a.length===0){if(XA(t)){var l=t.name?": "+t.name:"";return e.stylize("[Function"+l+"]","special")}if(JA(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Vx(t))return e.stylize(Date.prototype.toString.call(t),"date");if(mx(t))return xj(t)}var c="",u=!1,d=["{","}"];if(QF(t)&&(u=!0,d=["[","]"]),XA(t)){var f=t.name?": "+t.name:"";c=" [Function"+f+"]"}if(JA(t)&&(c=" "+RegExp.prototype.toString.call(t)),Vx(t)&&(c=" "+Date.prototype.toUTCString.call(t)),mx(t)&&(c=" "+xj(t)),a.length===0&&(!u||t.length==0))return d[0]+c+d[1];if(r<0)return JA(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var m;return u?m=fft(e,t,r,s,a):m=a.map(function(g){return DT(e,t,r,s,g,u)}),e.seen.pop(),hft(m,c,d)}function dft(e,t){if(Mf(t))return e.stylize("undefined","undefined");if(v5(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(LF(t))return e.stylize(""+t,"number");if(xB(t))return e.stylize(""+t,"boolean");if(A5(t))return e.stylize("null","null")}function xj(e){return"["+Error.prototype.toString.call(e)+"]"}function fft(e,t,r,n,i){for(var a=[],s=0,l=t.length;s-1&&(a?l=l.split(` `).map(function(u){return" "+u}).join(` `).substr(2):l=` `+l.split(` `).map(function(u){return" "+u}).join(` `))):l=e.stylize("[Circular]","special")),Mf(s)){if(a&&i.match(/^\d+$/))return l;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+l}function hft(e,t,r){var n=e.reduce(function(i,a){return a.indexOf(` `)>=0,i+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function QF(e){return Array.isArray(e)}function xB(e){return typeof e=="boolean"}function A5(e){return e===null}function Hge(e){return e==null}function LF(e){return typeof e=="number"}function v5(e){return typeof e=="string"}function Wge(e){return typeof e=="symbol"}function Mf(e){return e===void 0}function JA(e){return Z1(e)&&UF(e)==="[object RegExp]"}function Z1(e){return typeof e=="object"&&e!==null}function Vx(e){return Z1(e)&&UF(e)==="[object Date]"}function mx(e){return Z1(e)&&(UF(e)==="[object Error]"||e instanceof Error)}function XA(e){return typeof e=="function"}function f3(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}function Gge(e){return Bt.isBuffer(e)}function UF(e){return Object.prototype.toString.call(e)}function yj(e){return e<10?"0"+e.toString(10):e.toString(10)}var mft=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pft(){var e=new Date,t=[yj(e.getHours()),yj(e.getMinutes()),yj(e.getSeconds())].join(":");return[e.getDate(),mft[e.getMonth()],t].join(" ")}function qge(){console.log("%s - %s",pft(),vB.apply(null,arguments))}function $F(e,t){if(!t||!Z1(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}function Kge(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var CA=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function zF(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(CA&&e[CA]){var t=e[CA];if(typeof t!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,CA,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var r,n,i=new Promise(function(l,c){r=l,n=c}),a=[],s=0;s0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(A){var v={data:A,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var A=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,A}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(A){if(this.length===0)return"";for(var v=this.head,b=""+v.data;v=v.next;)b+=A+v.data;return b}},{key:"concat",value:function(A){if(this.length===0)return l.alloc(0);for(var v=l.allocUnsafe(A>>>0),b=this.head,E=0;b;)f(b.data,v,E),E+=b.data.length,b=b.next;return v}},{key:"consume",value:function(A,v){var b;return AI.length?I.length:A;if(S===I.length?E+=I:E+=I.slice(0,A),A-=S,A===0){S===I.length?(++b,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=I.slice(S));break}++b}return this.length-=b,E}},{key:"_getBuffer",value:function(A){var v=l.allocUnsafe(A),b=this.head,E=1;for(b.data.copy(v),A-=b.data.length;b=b.next;){var I=b.data,S=A>I.length?I.length:A;if(I.copy(v,v.length-A,0,S),A-=S,A===0){S===I.length?(++E,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=I.slice(S));break}++E}return this.length-=E,v}},{key:d,value:function(A,v){return u(this,t({},v,{depth:0,customInspect:!1}))}}]),m})(),bj}function yft(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,$n.nextTick(TT,this,e)):$n.nextTick(TT,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?$n.nextTick(vC,r):(r._writableState.errorEmitted=!0,$n.nextTick(RV,r,a)):$n.nextTick(RV,r,a):t?($n.nextTick(vC,r),t(a)):$n.nextTick(vC,r)}),this)}function RV(e,t){TT(e,t),vC(e)}function vC(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function bft(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function TT(e,t){e.emit("error",t)}function wft(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var Yge={destroy:yft,undestroy:bft,errorOrDestroy:wft},J1={};function Eft(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Zge={};function Y0(e,t,r){r||(r=Error);function n(a,s,l){return typeof t=="string"?t:t(a,s,l)}var i=(function(a){Eft(s,a);function s(l,c,u){return a.call(this,n(l,c,u))||this}return s})(r);i.prototype.name=r.name,i.prototype.code=e,Zge[e]=i}function FV(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function Cft(e,t,r){return e.substr(0,t.length)===t}function Ift(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function Sft(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Y0("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Y0("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&Cft(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(Ift(e," argument"))i="The ".concat(e," ").concat(n," ").concat(FV(t,"type"));else{var a=Sft(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(FV(t,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);Y0("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Y0("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Y0("ERR_STREAM_PREMATURE_CLOSE","Premature close");Y0("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Y0("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Y0("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Y0("ERR_STREAM_WRITE_AFTER_END","write after end");Y0("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Y0("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Y0("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");J1.codes=Zge;var Bft=J1.codes.ERR_INVALID_OPT_VALUE;function Nft(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function kft(e,t,r,n){var i=Nft(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?r:"highWaterMark";throw new Bft(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}var Jge={getHighWaterMark:kft},PT;typeof Object.create=="function"?PT=function(t,r){t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:PT=function(t,r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t};var _ft=PT,jft=Object.freeze({__proto__:null,default:_ft}),x5=Ty(jft),Dft=Bt.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Tft(e){if(e&&!Dft(e))throw new Error("Unknown encoding: "+e)}function yB(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),Tft(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Oft;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Rft;break;default:this.write=Pft;return}this.charBuffer=new Bt(6),this.charReceived=0,this.charLength=0}yB.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&i<=56319){this.charLength+=this.surrogateSize,t="";continue}if(this.charReceived=this.charLength=0,e.length===0)return t;break}this.detectIncompleteChar(e);var n=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,n),n-=this.charReceived),t+=e.toString(this.encoding,0,n);var n=t.length-1,i=t.charCodeAt(n);if(i>=55296&&i<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),t.substring(0,n)}return t};yB.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(t==1&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t};yB.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t};function Pft(e){return e.toString(this.encoding)}function Oft(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function Rft(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var Fft=Object.freeze({__proto__:null,StringDecoder:yB}),Xge=Ty(Fft),MV=J1.codes.ERR_STREAM_PREMATURE_CLOSE;function Mft(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i0)if(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==bB.prototype&&(t=Hft(t)),n)a.endEmitted?D2(e,new Jft):Nj(e,a,t,!0);else if(a.ended)D2(e,new Yft);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Nj(e,a,t,!1):OT(e,a)):Nj(e,a,t,!1)}else n||(a.reading=!1,OT(e,a))}return!a.ended&&(a.length=UV?e=UV:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function $V(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=tht(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Si.prototype.read=function(e){Un("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return Un("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?kj(this):EB(this),null;if(e=$V(e,t),e===0&&t.ended)return t.length===0&&kj(this),null;var n=t.needReadable;Un("need readable",n),(t.length===0||t.length-e0?i=sAe(e,t):i=null,i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&kj(this)),i!==null&&this.emit("data",i),i};function rht(e,t){if(Un("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?EB(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,iAe(e)))}}function EB(e){var t=e._readableState;Un("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(Un("emitReadable",t.flowing),t.emittedReadable=!0,$n.nextTick(iAe,e))}function iAe(e){var t=e._readableState;Un("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,KF(e)}function OT(e,t){t.readingMore||(t.readingMore=!0,$n.nextTick(nht,e,t))}function nht(e,t){for(;!t.reading&&!t.ended&&(t.length1&&oAe(n.pipes,e)!==-1)&&!u&&(Un("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function m(b){Un("onerror",b),v(),e.removeListener("error",m),tAe(e,"error")===0&&D2(e,b)}Xft(e,"error",m);function g(){e.removeListener("finish",A),v()}e.once("close",g);function A(){Un("onfinish"),e.removeListener("close",g),v()}e.once("finish",A);function v(){Un("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(Un("pipe resume"),r.resume()),e};function iht(e){return function(){var r=e._readableState;Un("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&tAe(e,"data")&&(r.flowing=!0,KF(e))}}Si.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,Un("on readable",n.length,n.reading),n.length?EB(this):n.reading||$n.nextTick(aht,this)),r};Si.prototype.addListener=Si.prototype.on;Si.prototype.removeListener=function(e,t){var r=y5.prototype.removeListener.call(this,e,t);return e==="readable"&&$n.nextTick(aAe,this),r};Si.prototype.removeAllListeners=function(e){var t=y5.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&$n.nextTick(aAe,this),t};function aAe(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function aht(e){Un("readable nexttick read 0"),e.read(0)}Si.prototype.resume=function(){var e=this._readableState;return e.flowing||(Un("resume"),e.flowing=!e.readableListening,sht(this,e)),e.paused=!1,this};function sht(e,t){t.resumeScheduled||(t.resumeScheduled=!0,$n.nextTick(oht,e,t))}function oht(e,t){Un("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),KF(e),t.flowing&&!t.reading&&e.read(0)}Si.prototype.pause=function(){return Un("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Un("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function KF(e){var t=e._readableState;for(Un("flow",t.flowing);t.flowing&&e.read()!==null;);}Si.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(Un("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&t.push(s)}t.push(null)}),e.on("data",function(s){if(Un("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var l=t.push(s);l||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=(function(l){return function(){return e[l].apply(e,arguments)}})(i));for(var a=0;a=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function kj(e){var t=e._readableState;Un("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,$n.nextTick(lht,t,e))}function lht(e,t){if(Un("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(Si.from=function(e,t){return Sj===void 0&&(Sj=$ft()),Sj(Si,e,t)});function oAe(e,t){for(var r=0,n=e.length;r-1))throw new Cht(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(Ls.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Nht(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=CB.from(t,r)),t}Object.defineProperty(Ls.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function kht(e,t,r,n,i,a){if(!r){var s=Nht(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var l=t.objectMode?1:n.length;t.length+=l;var c=t.length0;return Zht(s,c,u,function(d){i||(i=d),d&&a.forEach(qV),!c&&(a.forEach(qV),n(i))})});return t.reduce(Jht)}var tmt=emt;(function(e,t){const r=Py;t=e.exports=r.Readable,t.Stream=r.Readable,t.Readable=r.Readable,t.Writable=r.Writable,t.Duplex=r.Duplex,t.Transform=r.Transform,t.PassThrough=r.PassThrough,t.finished=WF,t.pipeline=tmt})(jT,jT.exports);var mAe=jT.exports,pAe=_ge(mAe),gAe={},AAe={};function KV(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i=0){var s=n.indexOf(` `,a+1);n=n.substring(s+1)}this.stack=n}}}Nb(SB,Error);function XV(e,t){return typeof e=="string"?e.length=0;u--)if(s[u]!==l[u])return!1;for(u=s.length-1;u>=0;u--)if(c=s[u],!Jx(e[c],t[c],r,n))return!1;return!0}Nc.notDeepEqual=tM;function tM(e,t,r){Jx(e,t,!1)&&Cc(e,t,r,"notDeepEqual",tM)}Nc.notDeepStrictEqual=rM;function rM(e,t,r){Jx(e,t,!0)&&Cc(e,t,r,"notDeepStrictEqual",rM)}Nc.strictEqual=nM;function nM(e,t,r){e!==t&&Cc(e,t,r,"===",nM)}Nc.notStrictEqual=iM;function iM(e,t,r){e===t&&Cc(e,t,r,"!==",iM)}function rY(e,t){if(!e||!t)return!1;if(Object.prototype.toString.call(t)=="[object RegExp]")return t.test(e);try{if(e instanceof t)return!0}catch{}return Error.isPrototypeOf(t)?!1:t.call({},e)===!0}function smt(e){var t;try{e()}catch(r){t=r}return t}function yAe(e,t,r,n){var i;if(typeof t!="function")throw new TypeError('"block" argument must be a function');typeof r=="string"&&(n=r,r=null),i=smt(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&Cc(i,r,"Missing expected exception"+n);var a=typeof n=="string",s=!e&&mx(i),l=!e&&i&&!r;if((s&&a&&rY(i,r)||l)&&Cc(i,r,"Got unwanted exception"+n),e&&i&&r&&!rY(i,r)||!e&&i)throw i}Nc.throws=bAe;function bAe(e,t,r){yAe(!0,e,t,r)}Nc.doesNotThrow=wAe;function wAe(e,t,r){yAe(!1,e,t,r)}Nc.ifError=EAe;function EAe(e){if(e)throw e}var omt=Object.freeze({__proto__:null,AssertionError:SB,assert:jb,deepEqual:XF,deepStrictEqual:eM,default:Nc,doesNotThrow:wAe,equal:ZF,fail:Cc,ifError:EAe,notDeepEqual:tM,notDeepStrictEqual:rM,notEqual:JF,notStrictEqual:iM,ok:jb,strictEqual:nM,throws:bAe}),CAe=Ty(omt);(function(e){var t=CAe,r=Tat,n=Mat,i=zat,a=Gat;for(var s in a)e[s]=a[s];e.NONE=0,e.DEFLATE=1,e.INFLATE=2,e.GZIP=3,e.GUNZIP=4,e.DEFLATERAW=5,e.INFLATERAW=6,e.UNZIP=7;var l=31,c=139;function u(d){if(typeof d!="number"||de.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=d,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}u.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}this.pending_close=!1,t(this.init_done,"close before init"),t(this.mode<=e.UNZIP),this.mode===e.DEFLATE||this.mode===e.GZIP||this.mode===e.DEFLATERAW?n.deflateEnd(this.strm):(this.mode===e.INFLATE||this.mode===e.GUNZIP||this.mode===e.INFLATERAW||this.mode===e.UNZIP)&&i.inflateEnd(this.strm),this.mode=e.NONE,this.dictionary=null},u.prototype.write=function(d,f,m,g,A,v,b){return this._write(!0,d,f,m,g,A,v,b)},u.prototype.writeSync=function(d,f,m,g,A,v,b){return this._write(!1,d,f,m,g,A,v,b)},u.prototype._write=function(d,f,m,g,A,v,b,E){if(t.equal(arguments.length,8),t(this.init_done,"write before init"),t(this.mode!==e.NONE,"already finalized"),t.equal(!1,this.write_in_progress,"write already in progress"),t.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,t.equal(!1,f===void 0,"must provide flush value"),this.write_in_progress=!0,f!==e.Z_NO_FLUSH&&f!==e.Z_PARTIAL_FLUSH&&f!==e.Z_SYNC_FLUSH&&f!==e.Z_FULL_FLUSH&&f!==e.Z_FINISH&&f!==e.Z_BLOCK)throw new Error("Invalid flush value");if(m==null&&(m=Bt.alloc(0),A=0,g=0),this.strm.avail_in=A,this.strm.input=m,this.strm.next_in=g,this.strm.avail_out=E,this.strm.output=v,this.strm.next_out=b,this.flush=f,!d)return this._process(),this._checkError()?this._afterSync():void 0;var I=this;return $n.nextTick(function(){I._process(),I._after()}),this},u.prototype._afterSync=function(){var d=this.strm.avail_out,f=this.strm.avail_in;return this.write_in_progress=!1,[f,d]},u.prototype._process=function(){var d=null;switch(this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=n.deflate(this.strm,this.flush);break;case e.UNZIP:switch(this.strm.avail_in>0&&(d=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(d===null)break;if(this.strm.input[d]===l){if(this.gzip_id_bytes_read=1,d++,this.strm.avail_in===1)break}else{this.mode=e.INFLATE;break}case 1:if(d===null)break;this.strm.input[d]===c?(this.gzip_id_bytes_read=2,this.mode=e.GUNZIP):this.mode=e.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:for(this.err=i.inflate(this.strm,this.flush),this.err===e.Z_NEED_DICT&&this.dictionary&&(this.err=i.inflateSetDictionary(this.strm,this.dictionary),this.err===e.Z_OK?this.err=i.inflate(this.strm,this.flush):this.err===e.Z_DATA_ERROR&&(this.err=e.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===e.GUNZIP&&this.err===e.Z_STREAM_END&&this.strm.next_in[0]!==0;)this.reset(),this.err=i.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},u.prototype._checkError=function(){switch(this.err){case e.Z_OK:case e.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===e.Z_FINISH)return this._error("unexpected end of file"),!1;break;case e.Z_STREAM_END:break;case e.Z_NEED_DICT:return this.dictionary==null?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},u.prototype._after=function(){if(this._checkError()){var d=this.strm.avail_out,f=this.strm.avail_in;this.write_in_progress=!1,this.callback(f,d),this.pending_close&&this.close()}},u.prototype._error=function(d){this.strm.msg&&(d=this.strm.msg),this.onerror(d,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},u.prototype.init=function(d,f,m,g,A){t(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),t(d>=8&&d<=15,"invalid windowBits"),t(f>=-1&&f<=9,"invalid compression level"),t(m>=1&&m<=9,"invalid memlevel"),t(g===e.Z_FILTERED||g===e.Z_HUFFMAN_ONLY||g===e.Z_RLE||g===e.Z_FIXED||g===e.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(f,d,m,g,A),this._setDictionary()},u.prototype.params=function(){throw new Error("deflateParams Not supported")},u.prototype.reset=function(){this._reset(),this._setDictionary()},u.prototype._init=function(d,f,m,g,A){switch(this.level=d,this.windowBits=f,this.memLevel=m,this.strategy=g,this.flush=e.Z_NO_FLUSH,this.err=e.Z_OK,(this.mode===e.GZIP||this.mode===e.GUNZIP)&&(this.windowBits+=16),this.mode===e.UNZIP&&(this.windowBits+=32),(this.mode===e.DEFLATERAW||this.mode===e.INFLATERAW)&&(this.windowBits=-1*this.windowBits),this.strm=new r,this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=n.deflateInit2(this.strm,this.level,e.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:case e.UNZIP:this.err=i.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==e.Z_OK&&this._error("Init error"),this.dictionary=A,this.write_in_progress=!1,this.init_done=!0},u.prototype._setDictionary=function(){if(this.dictionary!=null){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:this.err=n.deflateSetDictionary(this.strm,this.dictionary);break}this.err!==e.Z_OK&&this._error("Failed to set dictionary")}},u.prototype._reset=function(){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:case e.GZIP:this.err=n.deflateReset(this.strm);break;case e.INFLATE:case e.INFLATERAW:case e.GUNZIP:this.err=i.inflateReset(this.strm);break}this.err!==e.Z_OK&&this._error("Failed to reset stream")},e.Zlib=u})(AAe);(function(e){var t=Bb.Buffer,r=mAe.Transform,n=AAe,i=HF,a=CAe.ok,s=Bb.kMaxLength,l="Cannot create final Buffer. It would be larger than 0x"+s.toString(16)+" bytes";n.Z_MIN_WINDOWBITS=8,n.Z_MAX_WINDOWBITS=15,n.Z_DEFAULT_WINDOWBITS=15,n.Z_MIN_CHUNK=64,n.Z_MAX_CHUNK=1/0,n.Z_DEFAULT_CHUNK=16*1024,n.Z_MIN_MEMLEVEL=1,n.Z_MAX_MEMLEVEL=9,n.Z_DEFAULT_MEMLEVEL=8,n.Z_MIN_LEVEL=-1,n.Z_MAX_LEVEL=9,n.Z_DEFAULT_LEVEL=n.Z_DEFAULT_COMPRESSION;for(var c=Object.keys(n),u=0;u=s?ae=new RangeError(l):ge=t.concat(Z,K),Z=[],R.close(),X(ae,ge)}}function b(R,$){if(typeof $=="string"&&($=t.from($)),!t.isBuffer($))throw new TypeError("Not a string or buffer");var X=R._finishFlushFlag;return R._processChunk($,X)}function E(R){if(!(this instanceof E))return new E(R);z.call(this,R,n.DEFLATE)}function I(R){if(!(this instanceof I))return new I(R);z.call(this,R,n.INFLATE)}function S(R){if(!(this instanceof S))return new S(R);z.call(this,R,n.GZIP)}function _(R){if(!(this instanceof _))return new _(R);z.call(this,R,n.GUNZIP)}function B(R){if(!(this instanceof B))return new B(R);z.call(this,R,n.DEFLATERAW)}function T(R){if(!(this instanceof T))return new T(R);z.call(this,R,n.INFLATERAW)}function P(R){if(!(this instanceof P))return new P(R);z.call(this,R,n.UNZIP)}function O(R){return R===n.Z_NO_FLUSH||R===n.Z_PARTIAL_FLUSH||R===n.Z_SYNC_FLUSH||R===n.Z_FULL_FLUSH||R===n.Z_FINISH||R===n.Z_BLOCK}function z(R,$){var X=this;if(this._opts=R=R||{},this._chunkSize=R.chunkSize||e.Z_DEFAULT_CHUNK,r.call(this,R),R.flush&&!O(R.flush))throw new Error("Invalid flush flag: "+R.flush);if(R.finishFlush&&!O(R.finishFlush))throw new Error("Invalid flush flag: "+R.finishFlush);if(this._flushFlag=R.flush||n.Z_NO_FLUSH,this._finishFlushFlag=typeof R.finishFlush<"u"?R.finishFlush:n.Z_FINISH,R.chunkSize&&(R.chunkSizee.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+R.chunkSize);if(R.windowBits&&(R.windowBitse.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+R.windowBits);if(R.level&&(R.levele.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+R.level);if(R.memLevel&&(R.memLevele.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+R.memLevel);if(R.strategy&&R.strategy!=e.Z_FILTERED&&R.strategy!=e.Z_HUFFMAN_ONLY&&R.strategy!=e.Z_RLE&&R.strategy!=e.Z_FIXED&&R.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+R.strategy);if(R.dictionary&&!t.isBuffer(R.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new n.Zlib($);var Z=this;this._hadError=!1,this._handle.onerror=function(Y,ne){L(Z),Z._hadError=!0;var ge=new Error(Y);ge.errno=ne,ge.code=e.codes[ne],Z.emit("error",ge)};var K=e.Z_DEFAULT_COMPRESSION;typeof R.level=="number"&&(K=R.level);var q=e.Z_DEFAULT_STRATEGY;typeof R.strategy=="number"&&(q=R.strategy),this._handle.init(R.windowBits||e.Z_DEFAULT_WINDOWBITS,K,R.memLevel||e.Z_DEFAULT_MEMLEVEL,q,R.dictionary),this._buffer=t.allocUnsafe(this._chunkSize),this._offset=0,this._level=K,this._strategy=q,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!X._handle},configurable:!0,enumerable:!0})}i.inherits(z,r),z.prototype.params=function(R,$,X){if(Re.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+R);if($!=e.Z_FILTERED&&$!=e.Z_HUFFMAN_ONLY&&$!=e.Z_RLE&&$!=e.Z_FIXED&&$!=e.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+$);if(this._level!==R||this._strategy!==$){var Z=this;this.flush(n.Z_SYNC_FLUSH,function(){a(Z._handle,"zlib binding closed"),Z._handle.params(R,$),Z._hadError||(Z._level=R,Z._strategy=$,X&&X())})}else $n.nextTick(X)},z.prototype.reset=function(){return a(this._handle,"zlib binding closed"),this._handle.reset()},z.prototype._flush=function(R){this._transform(t.alloc(0),"",R)},z.prototype.flush=function(R,$){var X=this,Z=this._writableState;(typeof R=="function"||R===void 0&&!$)&&($=R,R=n.Z_FULL_FLUSH),Z.ended?$&&$n.nextTick($):Z.ending?$&&this.once("end",$):Z.needDrain?$&&this.once("drain",function(){return X.flush(R,$)}):(this._flushFlag=R,this.write(t.alloc(0),"",$))},z.prototype.close=function(R){L(this,R),$n.nextTick(W,this)};function L(R,$){$&&$n.nextTick($),R._handle&&(R._handle.close(),R._handle=null)}function W(R){R.emit("close")}z.prototype._transform=function(R,$,X){var Z,K=this._writableState,q=K.ending||K.ended,Y=q&&(!R||K.length===R.length);if(R!==null&&!t.isBuffer(R))return X(new Error("invalid input"));if(!this._handle)return X(new Error("zlib binding closed"));Y?Z=this._finishFlushFlag:(Z=this._flushFlag,R.length>=K.length&&(this._flushFlag=this._opts.flush||n.Z_NO_FLUSH)),this._processChunk(R,Z,X)},z.prototype._processChunk=function(R,$,X){var Z=R&&R.length,K=this._chunkSize-this._offset,q=0,Y=this,ne=typeof X=="function";if(!ne){var ge=[],ae=0,pe;this.on("error",function(ye){pe=ye}),a(this._handle,"zlib binding closed");do var _e=this._handle.writeSync($,R,q,Z,this._buffer,this._offset,K);while(!this._hadError&&Me(_e[0],_e[1]));if(this._hadError)throw pe;if(ae>=s)throw L(this),new RangeError(l);var we=t.concat(ge,ae);return L(this),we}a(this._handle,"zlib binding closed");var xe=this._handle.write($,R,q,Z,this._buffer,this._offset,K);xe.buffer=R,xe.callback=Me;function Me(ye,Ee){if(this&&(this.buffer=null,this.callback=null),!Y._hadError){var me=K-Ee;if(a(me>=0,"have should not go down"),me>0){var Se=Y._buffer.slice(Y._offset,Y._offset+me);Y._offset+=me,ne?Y.push(Se):(ge.push(Se),ae+=Se.length)}if((Ee===0||Y._offset>=Y._chunkSize)&&(K=Y._chunkSize,Y._offset=0,Y._buffer=t.allocUnsafe(Y._chunkSize)),Ee===0){if(q+=Z-ye,Z=ye,!ne)return!0;var Ie=Y._handle.write($,R,q,Z,Y._buffer,Y._offset,Y._chunkSize);Ie.callback=Me,Ie.buffer=R;return}if(!ne)return!1;X()}}},i.inherits(E,z),i.inherits(I,z),i.inherits(S,z),i.inherits(_,z),i.inherits(B,z),i.inherits(T,z),i.inherits(P,z)})(gAe);var y2=_ge(gAe);class IAe extends pAe.Writable{constructor(t,r,n){super({decodeStrings:!1}),this.finalize=this.finalize.bind(this),this.document=t,this.id=r,n==null&&(n={}),this.data=n,this.gen=0,this.deflate=null,this.compress=this.document.compress&&!this.data.Filter,this.uncompressedLength=0,this.chunks=[]}initDeflate(){return this.data.Filter="FlateDecode",this.deflate=y2.createDeflate(),this.deflate.on("data",t=>(this.chunks.push(t),this.data.Length+=t.length)),this.deflate.on("end",this.finalize)}_write(t,r,n){return t instanceof Uint8Array||(t=Bt.from(t+` `,"binary")),this.uncompressedLength+=t.length,this.data.Length==null&&(this.data.Length=0),this.compress?(this.deflate||this.initDeflate(),this.deflate.write(t)):(this.chunks.push(t),this.data.Length+=t.length),n()}end(){return super.end(...arguments),this.deflate?this.deflate.end():this.finalize()}finalize(){if(this.offset=this.document._offset,this.document._write(`${this.id} ${this.gen} obj`),this.document._write(Mu.convert(this.data)),this.chunks.length){this.document._write("stream");for(let t of Array.from(this.chunks))this.document._write(t);this.chunks.length=0,this.document._write(` endstream`)}return this.document._write("endobj"),this.document._refEnd(this)}toString(){return`${this.id} ${this.gen} R`}}class SAe{constructor(t){t===void 0&&(t={}),this._items={},this.limits=typeof t.limits=="boolean"?t.limits:!0}add(t,r){return this._items[t]=r}get(t){return this._items[t]}toString(){const t=Object.keys(this._items).sort((n,i)=>this._compareKeys(n,i)),r=["<<"];if(this.limits&&t.length>1){const n=t[0],i=t[t.length-1];r.push(` /Limits ${Mu.convert([this._dataForKey(n),this._dataForKey(i)])}`)}r.push(` /${this._keysName()} [`);for(let n of t)r.push(` ${Mu.convert(this._dataForKey(n))} ${Mu.convert(this._items[n])}`);return r.push("]"),r.push(">>"),r.join(` `)}_compareKeys(){throw new Error("Must be implemented by subclasses")}_keysName(){throw new Error("Must be implemented by subclasses")}_dataForKey(){throw new Error("Must be implemented by subclasses")}}class yC extends SAe{_compareKeys(t,r){return t.localeCompare(r)}_keysName(){return"Names"}_dataForKey(t){return new String(t)}}const Mv=(e,t)=>(Array(t+1).join("0")+e).slice(-t),lmt=/[\n\r\t\b\f()\\]/g,cmt={"\n":"\\n","\r":"\\r"," ":"\\t","\b":"\\b","\f":"\\f","\\":"\\\\","(":"\\(",")":"\\)"},umt=function(e){const t=e.length;if(t&1)throw new Error("Buffer length must be even");for(let r=0,n=t-1;r127){n=!0;break}return n&&(r=umt(Bt.from(`\uFEFF${r}`,"utf16le")).toString("binary")),r=r.replace(lmt,i=>cmt[i]),`(${r})`}if(Bt.isBuffer(t))return`<${t.toString("hex")}>`;if(t instanceof IAe||t instanceof yC)return t.toString();if(t instanceof Date)return`(D:${Mv(t.getUTCFullYear(),4)}`+Mv(t.getUTCMonth()+1,2)+Mv(t.getUTCDate(),2)+Mv(t.getUTCHours(),2)+Mv(t.getUTCMinutes(),2)+Mv(t.getUTCSeconds(),2)+"Z)";if(Array.isArray(t))return`[${Array.from(t).map(n=>Mu.convert(n)).join(" ")}]`;if({}.toString.call(t)==="[object Object]"){const r=["<<"];for(let n in t){const i=t[n];r.push(`/${n} ${Mu.convert(i)}`)}return r.push(">>"),r.join(` `)}return typeof t=="number"?Mu.number(t):`${t}`}static number(t){if(t>-1e21&&t<1e21)return Math.round(t*1e6)/1e6;throw new Error(`unsupported number: ${t}`)}}const dmt={top:72,left:72,bottom:72,right:72},fmt={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]};class hmt{constructor(t,r){r===void 0&&(r={}),this.document=t,this._options=r,this.size=r.size||"letter",this.layout=r.layout||"portrait",this.userUnit=r.userUnit||1,typeof r.margin=="number"?this.margins={top:r.margin,left:r.margin,bottom:r.margin,right:r.margin}:this.margins=r.margins||dmt;const n=Array.isArray(this.size)?this.size:fmt[this.size.toUpperCase()];this.width=n[this.layout==="portrait"?0:1],this.height=n[this.layout==="portrait"?1:0],this.content=this.document.ref(),r.font&&t.font(r.font,r.fontFamily),r.fontSize&&t.fontSize(r.fontSize),this.resources=this.document.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"]}),this.dictionary=this.document.ref({Type:"Page",Parent:this.document._root.data.Pages,MediaBox:[0,0,this.width,this.height],Contents:this.content,Resources:this.resources,UserUnit:this.userUnit}),this.markings=[]}get fonts(){const t=this.resources.data;return t.Font!=null?t.Font:t.Font={}}get xobjects(){const t=this.resources.data;return t.XObject!=null?t.XObject:t.XObject={}}get ext_gstates(){const t=this.resources.data;return t.ExtGState!=null?t.ExtGState:t.ExtGState={}}get patterns(){const t=this.resources.data;return t.Pattern!=null?t.Pattern:t.Pattern={}}get colorSpaces(){const t=this.resources.data;return t.ColorSpace||(t.ColorSpace={})}get annotations(){const t=this.dictionary.data;return t.Annots!=null?t.Annots:t.Annots=[]}get structParentTreeKey(){const t=this.dictionary.data;return t.StructParents!=null?t.StructParents:t.StructParents=this.document.createStructParentTreeNextKey()}maxY(){return this.height-this.margins.bottom}write(t){return this.content.write(t)}_setTabOrder(){!this.dictionary.Tabs&&this.document.hasMarkInfoDictionary()&&(this.dictionary.data.Tabs="S")}end(){this._setTabOrder(),this.dictionary.end(),this.resources.data.ColorSpace=this.resources.data.ColorSpace||{};for(let t of Object.values(this.document.spotColors))this.resources.data.ColorSpace[t.id]=t;return this.resources.end(),this.content.end()}}const mmt=e=>{const t=[];for(let r=0;r>8*(3-r%4)&255);return Bt.from(t)};class pmt{static generateFileID(t){t===void 0&&(t={});let r=`${t.CreationDate.getTime()} `;for(let n in t)t.hasOwnProperty(n)&&(r+=`${n}: ${t[n].valueOf()} `);return mmt(est(r))}}const{number:gmt}=Mu;let aM=class{constructor(t){this.doc=t,this.stops=[],this.embedded=!1,this.transform=[1,0,0,1,0,0]}stop(t,r,n){if(n==null&&(n=1),r=this.doc._normalizeColor(r),this.stops.length===0)if(r.length===3)this._colorSpace="DeviceRGB";else if(r.length===4)this._colorSpace="DeviceCMYK";else if(r.length===1)this._colorSpace="DeviceGray";else throw new Error("Unknown color space");else if(this._colorSpace==="DeviceRGB"&&r.length!==3||this._colorSpace==="DeviceCMYK"&&r.length!==4||this._colorSpace==="DeviceGray"&&r.length!==1)throw new Error("All gradient stops must use the same color space");return n=Math.max(0,Math.min(1,n)),this.stops.push([t,r,n]),this}setTransform(t,r,n,i,a,s){return this.transform=[t,r,n,i,a,s],this}embed(t){let r;const n=this.stops.length;if(n===0)return;this.embedded=!0,this.matrix=t;const i=this.stops[n-1];i[0]<1&&this.stops.push([1,i[1],i[2]]);const a=[],s=[],l=[];for(let d=0;dd[2]<1)){let d=this.opacityGradient();d._colorSpace="DeviceGray";for(let v of this.stops)d.stop(v[0],[v[2]]);d=d.embed(this.matrix);const f=[0,0,this.doc.page.width,this.doc.page.height],m=this.doc.ref({Type:"XObject",Subtype:"Form",FormType:1,BBox:f,Group:{Type:"Group",S:"Transparency",CS:"DeviceGray"},Resources:{ProcSet:["PDF","Text","ImageB","ImageC","ImageI"],Pattern:{Sh1:d}}});m.write("/Pattern cs /Sh1 scn"),m.end(`${f.join(" ")} re f`);const g=this.doc.ref({Type:"ExtGState",SMask:{Type:"Mask",S:"Luminosity",G:m}});g.end();const A=this.doc.ref({Type:"Pattern",PatternType:1,PaintType:1,TilingType:2,BBox:f,XStep:f[2],YStep:f[3],Resources:{ProcSet:["PDF","Text","ImageB","ImageC","ImageI"],Pattern:{Sh1:u},ExtGState:{Gs1:g}}});A.write("/Gs1 gs /Pattern cs /Sh1 scn"),A.end(`${f.join(" ")} re f`),this.doc.page.patterns[this.id]=A}else this.doc.page.patterns[this.id]=u;return u}apply(t){const[r,n,i,a,s,l]=this.doc._ctm,[c,u,d,f,m,g]=this.transform,A=[r*c+i*u,n*c+a*u,r*d+i*f,n*d+a*f,r*m+i*g+s,n*m+a*g+l];(!this.embedded||A.join(" ")!==this.matrix.join(" "))&&this.embed(A),this.doc._setColorSpace("Pattern",t);const v=t?"SCN":"scn";return this.doc.addContent(`/${this.id} ${v}`)}},Amt=class BAe extends aM{constructor(t,r,n,i,a){super(t),this.x1=r,this.y1=n,this.x2=i,this.y2=a}shader(t){return this.doc.ref({ShadingType:2,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.x2,this.y2],Function:t,Extend:[!0,!0]})}opacityGradient(){return new BAe(this.doc,this.x1,this.y1,this.x2,this.y2)}},vmt=class NAe extends aM{constructor(t,r,n,i,a,s,l){super(t),this.doc=t,this.x1=r,this.y1=n,this.r1=i,this.x2=a,this.y2=s,this.r2=l}shader(t){return this.doc.ref({ShadingType:3,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.r1,this.x2,this.y2,this.r2],Function:t,Extend:[!0,!0]})}opacityGradient(){return new NAe(this.doc,this.x1,this.y1,this.r1,this.x2,this.y2,this.r2)}};var xmt={PDFGradient:aM,PDFLinearGradient:Amt,PDFRadialGradient:vmt};const ymt=["DeviceCMYK","DeviceRGB"];let bmt=class{constructor(t,r,n,i,a){this.doc=t,this.bBox=r,this.xStep=n,this.yStep=i,this.stream=a}createPattern(){const t=this.doc.ref();t.end();const[r,n,i,a,s,l]=this.doc._ctm,[c,u,d,f,m,g]=[1,0,0,1,0,0],A=[r*c+i*u,n*c+a*u,r*d+i*f,n*d+a*f,r*m+i*g+s,n*m+a*g+l],v=this.doc.ref({Type:"Pattern",PatternType:1,PaintType:2,TilingType:2,BBox:this.bBox,XStep:this.xStep,YStep:this.yStep,Matrix:A.map(b=>+b.toFixed(5)),Resources:t});return v.end(this.stream),v}embedPatternColorSpaces(){ymt.forEach(t=>{const r=this.getPatternColorSpaceId(t);if(this.doc.page.colorSpaces[r])return;const n=this.doc.ref(["Pattern",t]);n.end(),this.doc.page.colorSpaces[r]=n})}getPatternColorSpaceId(t){return`CsP${t}`}embed(){this.id||(this.doc._patternCount=this.doc._patternCount+1,this.id="P"+this.doc._patternCount,this.pattern=this.createPattern()),this.doc.page.patterns[this.id]||(this.doc.page.patterns[this.id]=this.pattern)}apply(t,r){this.embedPatternColorSpaces(),this.embed();const n=this.doc._normalizeColor(r);if(!n)throw Error(`invalid pattern color. (value: ${r})`);const i=this.getPatternColorSpaceId(this.doc._getColorSpace(n));this.doc._setColorSpace(i,t);const a=t?"SCN":"scn";return this.doc.addContent(`${n.join(" ")} /${this.id} ${a}`)}};var wmt={PDFTilingPattern:bmt};class Oj{constructor(t,r,n,i,a,s){this.id="CS"+Object.keys(t.spotColors).length,this.name=r,this.values=[n,i,a,s],this.ref=t.ref(["Separation",this.name,"DeviceCMYK",{Range:[0,1,0,1,0,1,0,1],C0:[0,0,0,0],C1:this.values.map(l=>l/100),FunctionType:2,Domain:[0,1],N:1}]),this.ref.end()}toString(){return`${this.ref.id} 0 R`}}const{PDFGradient:Emt,PDFLinearGradient:Cmt,PDFRadialGradient:Imt}=xmt,{PDFTilingPattern:nY}=wmt;var Smt={initColor(){return this.spotColors={},this._opacityRegistry={},this._opacityCount=0,this._patternCount=0,this._gradCount=0},_normalizeColor(e){if(typeof e=="string"){if(e.charAt(0)==="#"){e.length===4&&(e=e.replace(/#([0-9A-F])([0-9A-F])([0-9A-F])/i,"#$1$1$2$2$3$3"));const t=parseInt(e.slice(1),16);e=[t>>16,t>>8&255,t&255]}else if(iY[e])e=iY[e];else if(this.spotColors[e])return this.spotColors[e]}return Array.isArray(e)?(e.length===3?e=e.map(t=>t/255):e.length===4&&(e=e.map(t=>t/100)),e):null},_setColor(e,t){return e instanceof Emt?(e.apply(t),!0):Array.isArray(e)&&e[0]instanceof nY?(e[0].apply(t,e[1]),!0):this._setColorCore(e,t)},_setColorCore(e,t){if(e=this._normalizeColor(e),!e)return!1;const r=t?"SCN":"scn",n=this._getColorSpace(e);return this._setColorSpace(n,t),e instanceof Oj?(this.page.colorSpaces[e.id]=e.ref,this.addContent(`1 ${r}`)):this.addContent(`${e.join(" ")} ${r}`),!0},_setColorSpace(e,t){const r=t?"CS":"cs";return this.addContent(`/${e} ${r}`)},_getColorSpace(e){return e instanceof Oj?e.id:e.length===4?"DeviceCMYK":"DeviceRGB"},fillColor(e,t){return this._setColor(e,!1)&&this.fillOpacity(t),this._fillColor=[e,t],this},strokeColor(e,t){return this._setColor(e,!0)&&this.strokeOpacity(t),this},opacity(e){return this._doOpacity(e,e),this},fillOpacity(e){return this._doOpacity(e,null),this},strokeOpacity(e){return this._doOpacity(null,e),this},_doOpacity(e,t){let r,n;if(e==null&&t==null)return;e!=null&&(e=Math.max(0,Math.min(1,e))),t!=null&&(t=Math.max(0,Math.min(1,t)));const i=`${e}_${t}`;return this._opacityRegistry[i]?[r,n]=this._opacityRegistry[i]:(r={Type:"ExtGState"},e!=null&&(r.ca=e),t!=null&&(r.CA=t),r=this.ref(r),r.end(),n=`Gs${++this._opacityCount}`,this._opacityRegistry[i]=[r,n]),this.page.ext_gstates[n]=r,this.addContent(`/${n} gs`)},linearGradient(e,t,r,n){return new Cmt(this,e,t,r,n)},radialGradient(e,t,r,n,i,a){return new Imt(this,e,t,r,n,i,a)},pattern(e,t,r,n){return new nY(this,e,t,r,n)},addSpotColor(e,t,r,n,i){const a=new Oj(this,e,t,r,n,i);return this.spotColors[e]=a,this}},iY={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};let Hr,Wr,Hn,Ei,Xv,ex;Hr=Wr=Hn=Ei=Xv=ex=0;const kAe={M:2,m:2,Z:0,z:0,L:2,l:2,H:1,h:1,V:1,v:1,C:6,c:6,S:4,s:4,Q:4,q:4,T:2,t:2,A:7,a:7},Bmt=e=>e in kAe,Nmt=e=>{const t=e.codePointAt(0);return t===32||t===9||t===13||t===10},kmt=e=>{const t=e.codePointAt(0);return t==null?!1:48<=t&&t<=57},Rj=(e,t)=>{let r=t,n="",i="none";for(;r{const t=[];let r=null,n=[],i=0,a=!1,s=!1;for(let l=0;l1&&(m=Math.sqrt(m),r*=m,n*=m);const g=f/r,A=d/r,v=-d/n,b=f/n,E=g*l+A*c,I=v*l+b*c,S=g*e+A*t,_=v*e+b*t;let T=1/((S-E)*(S-E)+(_-I)*(_-I))-.25;T<0&&(T=0);let P=Math.sqrt(T);a===i&&(P=-P);const O=.5*(E+S)-P*(_-I),z=.5*(I+_)+P*(S-E),L=Math.atan2(I-z,E-O);let R=Math.atan2(_-z,S-O)-L;R<0&&a===1?R+=2*Math.PI:R>0&&a===0&&(R-=2*Math.PI);const $=Math.ceil(Math.abs(R/(Math.PI*.5+.001))),X=[];for(let Z=0;Z<$;Z++){const K=L+Z*R/$,q=L+(Z+1)*R/$;X[Z]=[O,z,K,q,r,n,d,f]}return X},Tmt=function(e,t,r,n,i,a,s,l){const c=l*i,u=-s*a,d=s*i,f=l*a,m=.5*(n-r),g=8/3*Math.sin(m*.5)*Math.sin(m*.5)/Math.sin(m),A=e+Math.cos(r)-g*Math.sin(r),v=t+Math.sin(r)+g*Math.cos(r),b=e+Math.cos(n),E=t+Math.sin(n),I=b+g*Math.sin(n),S=E-g*Math.cos(n);return[c*A+u*v,d*A+f*v,c*I+u*S,d*I+f*S,c*b+u*E,d*b+f*E]};class Pmt{static apply(t,r){const n=_mt(r);jmt(n,t)}}const{number:gs}=Mu,Y4=4*((Math.sqrt(2)-1)/3);var Omt={initVector(){return this._ctm=[1,0,0,1,0,0],this._ctmStack=[]},save(){return this._ctmStack.push(this._ctm.slice()),this.addContent("q")},restore(){return this._ctm=this._ctmStack.pop()||[1,0,0,1,0,0],this.addContent("Q")},closePath(){return this.addContent("h")},lineWidth(e){return this.addContent(`${gs(e)} w`)},_CAP_STYLES:{BUTT:0,ROUND:1,SQUARE:2},lineCap(e){return typeof e=="string"&&(e=this._CAP_STYLES[e.toUpperCase()]),this.addContent(`${e} J`)},_JOIN_STYLES:{MITER:0,ROUND:1,BEVEL:2},lineJoin(e){return typeof e=="string"&&(e=this._JOIN_STYLES[e.toUpperCase()]),this.addContent(`${e} j`)},miterLimit(e){return this.addContent(`${gs(e)} M`)},dash(e,t){t===void 0&&(t={});const r=e;if(Array.isArray(e)||(e=[e,t.space||e]),!e.every(i=>Number.isFinite(i)&&i>0))throw new Error(`dash(${JSON.stringify(r)}, ${JSON.stringify(t)}) invalid, lengths must be numeric and greater than zero`);return e=e.map(gs).join(" "),this.addContent(`[${e}] ${gs(t.phase||0)} d`)},undash(){return this.addContent("[] 0 d")},moveTo(e,t){return this.addContent(`${gs(e)} ${gs(t)} m`)},lineTo(e,t){return this.addContent(`${gs(e)} ${gs(t)} l`)},bezierCurveTo(e,t,r,n,i,a){return this.addContent(`${gs(e)} ${gs(t)} ${gs(r)} ${gs(n)} ${gs(i)} ${gs(a)} c`)},quadraticCurveTo(e,t,r,n){return this.addContent(`${gs(e)} ${gs(t)} ${gs(r)} ${gs(n)} v`)},rect(e,t,r,n){return this.addContent(`${gs(e)} ${gs(t)} ${gs(r)} ${gs(n)} re`)},roundedRect(e,t,r,n,i){i==null&&(i=0),i=Math.min(i,.5*r,.5*n);const a=i*(1-Y4);return this.moveTo(e+i,t),this.lineTo(e+r-i,t),this.bezierCurveTo(e+r-a,t,e+r,t+a,e+r,t+i),this.lineTo(e+r,t+n-i),this.bezierCurveTo(e+r,t+n-a,e+r-a,t+n,e+r-i,t+n),this.lineTo(e+i,t+n),this.bezierCurveTo(e+a,t+n,e,t+n-a,e,t+n-i),this.lineTo(e,t+i),this.bezierCurveTo(e,t+a,e+a,t,e+i,t),this.closePath()},ellipse(e,t,r,n){n==null&&(n=r),e-=r,t-=n;const i=r*Y4,a=n*Y4,s=e+r*2,l=t+n*2,c=e+r,u=t+n;return this.moveTo(e,u),this.bezierCurveTo(e,u-a,c-i,t,c,t),this.bezierCurveTo(c+i,t,s,u-a,s,u),this.bezierCurveTo(s,u+a,c+i,l,c,l),this.bezierCurveTo(c-i,l,e,u+a,e,u),this.closePath()},circle(e,t,r){return this.ellipse(e,t,r)},arc(e,t,r,n,i,a){a==null&&(a=!1);const s=2*Math.PI,l=.5*Math.PI;let c=i-n;Math.abs(c)>s?c=s:c!==0&&a!==c<0&&(c=(a?-1:1)*s+c);const u=Math.ceil(Math.abs(c)/l),d=c/u,f=d/l*Y4*r;let m=n,g=-Math.sin(m)*f,A=Math.cos(m)*f,v=e+Math.cos(m)*r,b=t+Math.sin(m)*r;this.moveTo(v,b);for(let E=0;Egs(A)).join(" ");return this.addContent(`${g} cm`)},translate(e,t){return this.transform(1,0,0,1,e,t)},rotate(e,t){t===void 0&&(t={});let r;const n=e*Math.PI/180,i=Math.cos(n),a=Math.sin(n);let s=r=0;if(t.origin!=null){[s,r]=t.origin;const l=s*i-r*a,c=s*a+r*i;s-=l,r-=c}return this.transform(i,a,-a,i,s,r)},scale(e,t,r){r===void 0&&(r={});let n;t==null&&(t=e),typeof t=="object"&&(r=t,t=e);let i=n=0;return r.origin!=null&&([i,n]=r.origin,i-=e*i,n-=t*n),this.transform(e,0,0,t,i,n)}},h3={};const Rmt=(e,t,r)=>{let n=[],i=t+1;for(let a=e;athis.glyphWidths[lY[r]]),this.bbox=Array.from(this.attributes.FontBBox.split(/\s+/)).map(r=>+r),this.ascender=+(this.attributes.Ascender||0),this.descender=+(this.attributes.Descender||0),this.xHeight=+(this.attributes.XHeight||0),this.capHeight=+(this.attributes.CapHeight||0),this.lineGap=this.bbox[3]-this.bbox[1]-(this.ascender-this.descender)}parse(){const t=Fmt(this.contents);this.attributes=t.attributes,this.glyphWidths=t.glyphWidths,this.kernPairs=t.kernPairs}encodeText(t){const r=[];for(let n=0,i=t.length,a=0<=i;a?ni;a?n++:n--){let s=t.charCodeAt(n);s=oY[s]||s,r.push(s.toString(16))}return r}glyphsForString(t){const r=[];for(let n=0,i=t.length,a=0<=i;a?ni;a?n++:n--){const s=t.charCodeAt(n);r.push(this.characterToGlyph(s))}return r}characterToGlyph(t){return lY[oY[t]||t]||".notdef"}widthOfGlyph(t){return this.glyphWidths[t]||0}getKernPair(t,r){return this.kernPairs[t+r]||0}advancesForGlyphs(t){const r=[];for(let n=0;n[e.FontName,{attributes:e,glyphWidths:{},kernPairs:{}}],zmt=e=>{const{attributes:t,glyphWidths:r,kernPairs:n}=e,i=t.map($mt);return Object.keys(r).forEach(a=>{r[a].forEach((s,l)=>{s&&(i[l][1].glyphWidths[a]=s)})}),Object.keys(n).forEach(a=>{n[a].forEach((s,l)=>{s&&(i[l][1].kernPairs[a]=s)})}),Object.fromEntries(i)},cY=zmt(Umt),Hmt=e=>class extends e{constructor(r,n,i){super(),this.document=r,this.name=n,this.id=i,this.font=sM.fromJson(cY[this.name]),this.ascender=this.font.ascender,this.descender=this.font.descender,this.bbox=this.font.bbox,this.lineGap=this.font.lineGap}embed(){return this.dictionary.data={Type:"Font",BaseFont:this.name,Subtype:"Type1",Encoding:"WinAnsiEncoding"},this.dictionary.end()}encode(r){const n=this.font.encodeText(r),i=this.font.glyphsForString(`${r}`),a=this.font.advancesForGlyphs(i),s=[];for(let l=0;l`0000${i.toString(16)}`.slice(-4)).join("")},Wmt=e=>class extends e{constructor(r,n,i){super(),this.document=r,this.font=n,this.id=i,this.subset=this.font.createSubset(),this.unicode=[[0]],this.widths=[this.font.getGlyph(0).advanceWidth],this.name=this.font.postscriptName,this.scale=1e3/this.font.unitsPerEm,this.ascender=this.font.ascent*this.scale,this.descender=this.font.descent*this.scale,this.xHeight=this.font.xHeight*this.scale,this.capHeight=this.font.capHeight*this.scale,this.lineGap=this.font.lineGap*this.scale,this.bbox=this.font.bbox,this.layoutCache=Object.create(null)}layoutRun(r,n){const i=this.font.layout(r,n,void 0,void 0,"ltr");for(let a=0;a>8;let a=0;this.font.post.isFixedPitch&&(a|=1),1<=i&&i<=7&&(a|=2),a|=4,i===10&&(a|=8),this.font.head.macStyle.italic&&(a|=64);const l=[0,1,2,3,4,5].map(()=>String.fromCharCode(Math.random()*26+65)).join("")+"+"+this.font.postscriptName,{bbox:c}=this.font,u=this.document.ref({Type:"FontDescriptor",FontName:l,Flags:a,FontBBox:[c.minX*this.scale,c.minY*this.scale,c.maxX*this.scale,c.maxY*this.scale],ItalicAngle:this.font.italicAngle,Ascent:this.ascender,Descent:this.descender,CapHeight:(this.font.capHeight||this.font.ascent)*this.scale,XHeight:(this.font.xHeight||0)*this.scale,StemV:0});r?u.data.FontFile3=n:u.data.FontFile2=n,u.end();const d={Type:"Font",Subtype:"CIDFontType0",BaseFont:l,CIDSystemInfo:{Registry:new String("Adobe"),Ordering:new String("Identity"),Supplement:0},FontDescriptor:u,W:[0,this.widths]};r||(d.Subtype="CIDFontType2",d.CIDToGIDMap="Identity");const f=this.document.ref(d);return f.end(),this.dictionary.data={Type:"Font",Subtype:"Type0",BaseFont:l,Encoding:"Identity-H",DescendantFonts:[f],ToUnicode:this.toUnicodeCmap()},this.dictionary.end()}toUnicodeCmap(){const r=this.document.ref();let n=[],i=`/CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (Adobe) /Ordering (UCS) /Supplement 0 >> def /CMapName /Adobe-Identity-UCS def /CMapType 2 def 1 begincodespacerange <0000> endcodespacerange`;for(let[a,s]of this.unicode.entries()){const l=[];n.length>=100&&(i+=` `+n.length+` beginbfchar `+n.join(` `)+` endbfchar`,n=[]);for(let c of s)c>65535&&(c-=65536,l.push(Fj(c>>>10&1023|55296)),c=56320|c&1023),l.push(Fj(c));n.push("<"+Fj(a)+"><"+l.join(" ")+">")}return n.length&&(i+=` `+n.length+` beginbfchar `+n.join(` `)+` endbfchar `),i+=`endcmap CMapName currentdict /CMap defineresource pop end end`,r.end(i),r}};class BB{static open(t,r,n,i){let a;if(typeof r=="string"){if(uY.isStandardFont(r))return new uY(t,r,i);throw new Error(`Can't open ${r} in browser build`)}else r instanceof Uint8Array?a=Ab(r,n):r instanceof ArrayBuffer?a=Ab(new Uint8Array(r),n):typeof r=="object"&&(a=r);if(a==null)throw new Error("Not a supported font format or standard PDF font.");return new Gmt(t,a,i)}encode(){throw new Error("Must be implemented by subclasses")}widthOfString(){throw new Error("Must be implemented by subclasses")}ref(){return this.dictionary!=null?this.dictionary:this.dictionary=this.document.ref()}finalize(){if(!(this.embedded||this.dictionary==null))return this.embed(),this.embedded=!0}embed(){throw new Error("Must be implemented by subclasses")}lineHeight(t,r){r==null&&(r=!1);const n=r?this.lineGap:0;return(this.ascender+n-this.descender)/1e3*t}}const uY=Hmt(BB),Gmt=Wmt(BB);var qmt={initFonts(){return this._fontFamilies={},this._fontCount=0,this._fontSize=12,this._font=null,this._registeredFonts={},this.font("Helvetica")},font(e,t,r){let n,i;if(typeof t=="number"&&(r=t,t=null),typeof e=="string"&&this._registeredFonts[e]?(n=e,{src:e,family:t}=this._registeredFonts[e]):(n=t||e,typeof n!="string"&&(n=null)),r!=null&&this.fontSize(r),i=this._fontFamilies[n])return this._font=i,this;const a=`F${++this._fontCount}`;return this._font=BB.open(this,e,t,a),(i=this._fontFamilies[this._font.name])?(this._font=i,this):(n&&(this._fontFamilies[n]=this._font),this._font.name&&(this._fontFamilies[this._font.name]=this._font),this)},fontSize(e){return this._fontSize=e,this},currentLineHeight(e){return e==null&&(e=!1),this._font.lineHeight(this._fontSize,e)},registerFont(e,t,r){return this._registeredFonts[e]={src:t,family:r},this}};function Z4(e){return Math.fround(e)}const dY="­",Mj="-";class FT extends Gi{constructor(t,r){super(),this.document=t,this.horizontalScaling=r.horizontalScaling||100,this.indent=(r.indent||0)*this.horizontalScaling/100,this.characterSpacing=(r.characterSpacing||0)*this.horizontalScaling/100,this.wordSpacing=(r.wordSpacing===0)*this.horizontalScaling/100,this.columns=r.columns||1,this.columnGap=(r.columnGap!=null?r.columnGap:18)*this.horizontalScaling/100,this.lineWidth=(r.width*this.horizontalScaling/100-this.columnGap*(this.columns-1))/this.columns,this.spaceLeft=this.lineWidth,this.startX=this.document.x,this.startY=this.document.y,this.column=1,this.ellipsis=r.ellipsis,this.continuedX=0,this.features=r.features,r.height!=null?(this.height=r.height,this.maxY=Z4(this.startY+r.height)):this.maxY=Z4(this.document.page.maxY()),this.on("firstLine",n=>{const i=this.continuedX||this.indent;if(this.document.x+=i,this.lineWidth-=i,!n.indentAllLines)return this.once("line",()=>{if(this.document.x-=i,this.lineWidth+=i,n.continued&&!this.continuedX&&(this.continuedX=this.indent),!n.continued)return this.continuedX=0})}),this.on("lastLine",n=>{const{align:i}=n;return i==="justify"&&(n.align="left"),this.lastLine=!0,this.once("line",()=>(this.document.y+=n.paragraphGap||0,n.align=i,this.lastLine=!1))})}wordWidth(t){return this.document.widthOfString(t,this)+this.characterSpacing+this.wordSpacing}canFit(t,r){return t[t.length-1]!=dY?r<=this.spaceLeft:r+this.wordWidth(Mj)<=this.spaceLeft}eachWord(t,r){let n;const i=new Dme(t);let a=null;const s=Object.create(null);for(;n=i.nextBreak();){var l;let d=t.slice(a?.position||0,n.position),f=s[d]!=null?s[d]:s[d]=this.wordWidth(d);if(f>this.lineWidth+this.continuedX){let m=a;const g={};for(;d.length;){var c,u;f>this.spaceLeft?(c=Math.ceil(this.spaceLeft/(f/d.length)),f=this.wordWidth(d.slice(0,c)),u=f<=this.spaceLeft&&cthis.spaceLeft&&c>0;for(;A||u;)A?(f=this.wordWidth(d.slice(0,--c)),A=f>this.spaceLeft&&c>0):(f=this.wordWidth(d.slice(0,++c)),A=f>this.spaceLeft&&c>0,u=f<=this.spaceLeft&&cthis.maxY||n>this.maxY)&&this.nextSection();let i="",a=0,s=0,l=0,{y:c}=this.document;const u=()=>(r.textWidth=a+this.wordSpacing*(s-1),r.wordCount=s,r.lineWidth=this.lineWidth,{y:c}=this.document,this.emit("line",i,r,this),l++);return this.emit("sectionStart",r,this),this.eachWord(t,(d,f,m,g)=>{if((g==null||g.required)&&(this.emit("firstLine",r,this),this.spaceLeft=this.lineWidth),this.canFit(d,f)&&(i+=d,a+=f,s++),m.required||!this.canFit(d,f)){const A=this.document.currentLineHeight(!0);if(this.height!=null&&this.ellipsis&&Z4(this.document.y+A*2)>this.maxY&&this.column>=this.columns){for(this.ellipsis===!0&&(this.ellipsis="…"),i=i.replace(/\s+$/,""),a=this.wordWidth(i+this.ellipsis);i&&a>this.lineWidth;)i=i.slice(0,-1).replace(/\s+$/,""),a=this.wordWidth(i+this.ellipsis);a<=this.lineWidth&&(i=i+this.ellipsis),a=this.wordWidth(i)}return m.required&&(f>this.spaceLeft&&(u(),i=d,a=f,s=1),this.emit("lastLine",r,this)),i[i.length-1]==dY&&(i=i.slice(0,-1)+Mj,this.spaceLeft-=this.wordWidth(Mj)),u(),Z4(this.document.y+A)>this.maxY&&!this.nextSection()?(s=0,i="",!1):m.required?(this.spaceLeft=this.lineWidth,i="",a=0,s=0):(this.spaceLeft=this.lineWidth-f,i=d,a=f,s=1)}else return this.spaceLeft-=f}),s>0&&(this.emit("lastLine",r,this),u()),this.emit("sectionEnd",r,this),r.continued===!0?(l>1&&(this.continuedX=0),this.continuedX+=r.textWidth||0,this.document.y=c):this.document.x=this.startX}nextSection(t){if(this.emit("sectionEnd",t,this),++this.column>this.columns){if(this.height!=null)return!1;this.document.continueOnNewPage(),this.column=1,this.startY=this.document.page.margins.top,this.maxY=this.document.page.maxY(),this.document.x=this.startX,this.document._fillColor&&this.document.fillColor(...this.document._fillColor),this.emit("pageBreak",t,this)}else this.document.x+=this.lineWidth+this.columnGap,this.document.y=this.startY,this.emit("columnBreak",t,this);return this.emit("sectionStart",t,this),!0}}const{number:Hh}=Mu;var Kmt={initText(){return this._line=this._line.bind(this),this.x=0,this.y=0,this._lineGap=0},lineGap(e){return this._lineGap=e,this},moveDown(e){return e==null&&(e=1),this.y+=this.currentLineHeight(!0)*e+this._lineGap,this},moveUp(e){return e==null&&(e=1),this.y-=this.currentLineHeight(!0)*e+this._lineGap,this},_text(e,t,r,n,i){n=this._initOptions(t,r,n),e=e==null?"":`${e}`,n.wordSpacing&&(e=e.replace(/\s{2,}/g," "));const a=()=>{n.structParent&&n.structParent.add(this.struct(n.structType||"P",[this.markStructureContent(n.structType||"P")]))};if(n.rotation!==0&&(this.save(),this.rotate(-n.rotation,{origin:[this.x,this.y]})),n.width){let s=this._wrapper;s||(s=new FT(this,n),s.on("line",i),s.on("firstLine",a)),this._wrapper=n.continued?s:null,this._textOptions=n.continued?n:null,s.wrap(e,n)}else for(let s of e.split(` `))a(),i(s,n);return n.rotation!==0&&this.restore(),this},text(e,t,r,n){return this._text(e,t,r,n,this._line)},widthOfString(e,t){t===void 0&&(t={});const r=t.horizontalScaling||100;return(this._font.widthOfString(e,this._fontSize,t.features)+(t.characterSpacing||0)*(e.length-1))*r/100},boundsOfString(e,t,r,n){},heightOfString(e,t){const{x:r,y:n}=this;t=this._initOptions(t),t.height=1/0;const i=t.lineGap||this._lineGap||0;this._text(e,this.x,this.y,t,()=>this.y+=this.currentLineHeight(!0)+i);const a=this.y-n;return this.x=r,this.y=n,a},list(e,t,r,n,i){n=this._initOptions(t,r,n);const a=n.listType||"bullet",s=Math.round(this._font.ascender/1e3*this._fontSize),l=s/2,c=n.bulletRadius||s/3,u=n.textIndent||(a==="bullet"?c*5:s*2),d=n.bulletIndent||(a==="bullet"?c*8:s*2);let f=1;const m=[],g=[],A=[];var v=function(I){let S=1;for(let _=0;_{let _,B,T,P;n.structParent&&(n.structTypes?[B,T,P]=n.structTypes:[B,T,P]=["LI","Lbl","LBody"]),B?(_=this.struct(B),n.structParent.add(_)):n.structParent&&(_=n.structParent);let O;if((O=g[S++])!==f){const L=d*(O-f);this.x+=L,i.lineWidth-=L,f=O}switch(_&&(T||P)&&_.add(this.struct(T||P,[this.markStructureContent(T||P)])),a){case"bullet":this.circle(this.x-u+c,this.y+l,c),this.fill();break;case"numbered":case"lettered":var z=b(A[S-1]);this._fragment(z,this.x-u,this.y,n);break}_&&T&&P&&_.add(this.struct(P,[this.markStructureContent(P)])),_&&_!==n.structParent&&_.end()}),i.on("sectionStart",()=>{const _=u+d*(f-1);return this.x+=_,i.lineWidth-=_}),i.on("sectionEnd",()=>{const _=u+d*(f-1);return this.x-=_,i.lineWidth+=_}),i.wrap(I,n)};for(let I=0;I{if(S ${Hh(-z)}`)}return S=P},T=P=>{if(B(P),I.length>0)return this.addContent(`[${I.join(" ")}] TJ`),I.length=0};for(s=0;s{let r,n;const i=this.image.colors,a=this.width*this.height,s=Bt.alloc(a*i),l=Bt.alloc(a);let c=n=r=0;const u=t.length,d=this.image.bits===16?1:0;for(;c{const n=Bt.alloc(this.width*this.height);let i=0;for(let a=0,s=r.length;a{this.imgData=y2.deflateSync(t),this.finalize()})}}class Jmt{static open(t,r){let n;if(Bt.isBuffer(t))n=t;else if(t instanceof ArrayBuffer)n=Bt.from(new Uint8Array(t));else{let i;if(i=/^data:.+?;base64,(.*)$/.exec(t))n=Bt.from(i[1],"base64");else if(n=h3.readFileSync(t),!n)return}if(n[0]===255&&n[1]===216)return new Ymt(n,r);if(n[0]===137&&n.toString("ascii",1,4)==="PNG")return new Zmt(n,r);throw new Error("Unknown image format.")}}var Xmt={initImages(){return this._imageRegistry={},this._imageCount=0},image(e,t,r,n){n===void 0&&(n={});let i,a,s,l,c,u,d,f,m,g;typeof t=="object"&&(n=t,t=null);const A=n.ignoreOrientation||n.ignoreOrientation!==!1&&this.options.ignoreOrientation;t=(u=t??n.x)!=null?u:this.x,r=(d=r??n.y)!=null?d:this.y,typeof e=="string"&&(l=this._imageRegistry[e]),l||(e.width&&e.height?l=e:l=this.openImage(e)),l.obj||l.embed(this),this.page.xobjects[l.label]==null&&(this.page.xobjects[l.label]=l.obj);let{width:v,height:b}=l;!A&&l.orientation>4&&([v,b]=[b,v]);let E=n.width||v,I=n.height||b;if(n.width&&!n.height){const S=E/v;E=v*S,I=b*S}else if(n.height&&!n.width){const S=I/b;E=v*S,I=b*S}else n.scale?(E=v*n.scale,I=b*n.scale):n.fit?([s,i]=n.fit,a=s/i,c=v/b,c>a?(E=s,I=s/c):(I=i,E=i*c)):n.cover&&([s,i]=n.cover,a=s/i,c=v/b,c>a?(I=i,E=i*c):(E=s,I=s/c));if((n.fit||n.cover)&&(n.align==="center"?t=t+s/2-E/2:n.align==="right"&&(t=t+s-E),n.valign==="center"?r=r+i/2-I/2:n.valign==="bottom"&&(r=r+i-I)),A)I=-I,r-=I,f=0;else switch(l.orientation){default:case 1:I=-I,r-=I,f=0;break;case 2:E=-E,I=-I,t-=E,r-=I,f=0;break;case 3:m=t,g=r,I=-I,t-=E,f=180;break;case 4:break;case 5:m=t,g=r,[E,I]=[I,E],r-=I,f=90;break;case 6:m=t,g=r,[E,I]=[I,E],I=-I,f=90;break;case 7:m=t,g=r,[E,I]=[I,E],I=-I,E=-E,t-=E,f=90;break;case 8:m=t,g=r,[E,I]=[I,E],I=-I,t-=E,r-=I,f=-90;break}return n.link!=null&&this.link(t,r,E,I,n.link),n.goTo!=null&&this.goTo(t,r,E,I,n.goTo),n.destination!=null&&this.addNamedDestination(n.destination,"XYZ",t,r,null),this.y===r&&(this.y+=I),this.save(),f&&this.rotate(f,{origin:[m,g]}),this.transform(E,0,0,I,t,r),this.addContent(`/${l.label} Do`),this.restore(),this},openImage(e){let t;return typeof e=="string"&&(t=this._imageRegistry[e]),t||(t=Jmt.open(e,`I${++this._imageCount}`),typeof e=="string"&&(this._imageRegistry[e]=t)),t}},ept={annotate(e,t,r,n,i){i.Type="Annot",i.Rect=this._convertRect(e,t,r,n),i.Border=[0,0,0],i.Subtype==="Link"&&typeof i.F>"u"&&(i.F=4),i.Subtype!=="Link"&&i.C==null&&(i.C=this._normalizeColor(i.color||[0,0,0])),delete i.color,typeof i.Dest=="string"&&(i.Dest=new String(i.Dest));for(let s in i){const l=i[s];i[s[0].toUpperCase()+s.slice(1)]=l}const a=this.ref(i);return this.page.annotations.push(a),a.end(),this},note(e,t,r,n,i,a){return a===void 0&&(a={}),a.Subtype="Text",a.Contents=new String(i),a.Name==null&&(a.Name="Comment"),a.color==null&&(a.color=[243,223,92]),this.annotate(e,t,r,n,a)},goTo(e,t,r,n,i,a){return a===void 0&&(a={}),a.Subtype="Link",a.A=this.ref({S:"GoTo",D:new String(i)}),a.A.end(),this.annotate(e,t,r,n,a)},link(e,t,r,n,i,a){if(a===void 0&&(a={}),a.Subtype="Link",typeof i=="number"){const s=this._root.data.Pages.data;if(i>=0&&i0){this.options.expanded&&(this.outlineData.Count=this.children.length);const t=this.children[0],r=this.children[this.children.length-1];this.outlineData.First=t.dictionary,this.outlineData.Last=r.dictionary;for(let n=0,i=this.children.length;n0&&(a.outlineData.Prev=this.children[n-1].dictionary),n0)return this._root.data.Outlines=this.outline.dictionary,this._root.data.PageMode=this._root.data.PageMode||"UseOutlines"}};class bC{constructor(t,r){this.refs=[{pageRef:t,mcid:r}]}push(t){t.refs.forEach(r=>this.refs.push(r))}}class Qp{constructor(t,r,n,i){n===void 0&&(n={}),i===void 0&&(i=null),this.document=t,this._attached=!1,this._ended=!1,this._flushed=!1,this.dictionary=t.ref({S:r});const a=this.dictionary.data;(Array.isArray(n)||this._isValidChild(n))&&(i=n,n={}),typeof n.title<"u"&&(a.T=new String(n.title)),typeof n.lang<"u"&&(a.Lang=new String(n.lang)),typeof n.alt<"u"&&(a.Alt=new String(n.alt)),typeof n.expanded<"u"&&(a.E=new String(n.expanded)),typeof n.actual<"u"&&(a.ActualText=new String(n.actual)),this._children=[],i&&(Array.isArray(i)||(i=[i]),i.forEach(s=>this.add(s)),this.end())}add(t){if(this._ended)throw new Error("Cannot add child to already-ended structure element");if(!this._isValidChild(t))throw new Error("Invalid structure element child");return t instanceof Qp&&(t.setParent(this.dictionary),this._attached&&t.setAttached()),t instanceof bC&&this._addContentToParentTree(t),typeof t=="function"&&this._attached&&(t=this._contentForClosure(t)),this._children.push(t),this}_addContentToParentTree(t){t.refs.forEach(r=>{let{pageRef:n,mcid:i}=r;const a=this.document.getStructParentTree().get(n.data.StructParents);a[i]=this.dictionary})}setParent(t){if(this.dictionary.data.P)throw new Error("Structure element added to more than one parent");this.dictionary.data.P=t,this._flush()}setAttached(){this._attached||(this._children.forEach((t,r)=>{t instanceof Qp&&t.setAttached(),typeof t=="function"&&(this._children[r]=this._contentForClosure(t))}),this._attached=!0,this._flush())}end(){this._ended||(this._children.filter(t=>t instanceof Qp).forEach(t=>t.end()),this._ended=!0,this._flush())}_isValidChild(t){return t instanceof Qp||t instanceof bC||typeof t=="function"}_contentForClosure(t){const r=this.document.markStructureContent(this.dictionary.data.S);return t(),this.document.endMarkedContent(),this._addContentToParentTree(r),r}_isFlushable(){return!this.dictionary.data.P||!this._ended?!1:this._children.every(t=>typeof t=="function"?!1:t instanceof Qp?t._isFlushable():!0)}_flush(){this._flushed||!this._isFlushable()||(this.dictionary.data.K=[],this._children.forEach(t=>this._flushChild(t)),this.dictionary.end(),this._children=[],this.dictionary.data.K=null,this._flushed=!0)}_flushChild(t){t instanceof Qp&&this.dictionary.data.K.push(t.dictionary),t instanceof bC&&t.refs.forEach(r=>{let{pageRef:n,mcid:i}=r;this.dictionary.data.Pg||(this.dictionary.data.Pg=n),this.dictionary.data.Pg===n?this.dictionary.data.K.push(i):this.dictionary.data.K.push({Type:"MCR",Pg:n,MCID:i})})}}class rpt extends SAe{_compareKeys(t,r){return parseInt(t)-parseInt(r)}_keysName(){return"Nums"}_dataForKey(t){return parseInt(t)}}var npt={initMarkings(e){this.structChildren=[],e.tagged&&(this.getMarkInfoDictionary().data.Marked=!0,this.getStructTreeRoot())},markContent(e,t){if(t===void 0&&(t=null),e==="Artifact"||t&&t.mcid){let n=0;for(this.page.markings.forEach(i=>{(n||i.structContent||i.tag==="Artifact")&&n++});n--;)this.endMarkedContent()}if(!t)return this.page.markings.push({tag:e}),this.addContent(`/${e} BMC`),this;this.page.markings.push({tag:e,options:t});const r={};return typeof t.mcid<"u"&&(r.MCID=t.mcid),e==="Artifact"&&(typeof t.type=="string"&&(r.Type=t.type),Array.isArray(t.bbox)&&(r.BBox=[t.bbox[0],this.page.height-t.bbox[3],t.bbox[2],this.page.height-t.bbox[1]]),Array.isArray(t.attached)&&t.attached.every(n=>typeof n=="string")&&(r.Attached=t.attached)),e==="Span"&&(t.lang&&(r.Lang=new String(t.lang)),t.alt&&(r.Alt=new String(t.alt)),t.expanded&&(r.E=new String(t.expanded)),t.actual&&(r.ActualText=new String(t.actual))),this.addContent(`/${e} ${Mu.convert(r)} BDC`),this},markStructureContent(e,t){t===void 0&&(t={});const r=this.getStructParentTree().get(this.page.structParentTreeKey),n=r.length;r.push(null),this.markContent(e,{...t,mcid:n});const i=new bC(this.page.dictionary,n);return this.page.markings.slice(-1)[0].structContent=i,i},endMarkedContent(){return this.page.markings.pop(),this.addContent("EMC"),this},struct(e,t,r){return t===void 0&&(t={}),r===void 0&&(r=null),new Qp(this,e,t,r)},addStructure(e){const t=this.getStructTreeRoot();return e.setParent(t),e.setAttached(),this.structChildren.push(e),t.data.K||(t.data.K=[]),t.data.K.push(e.dictionary),this},initPageMarkings(e){e.forEach(t=>{if(t.structContent){const r=t.structContent,n=this.markStructureContent(t.tag,t.options);r.push(n),this.page.markings.slice(-1)[0].structContent=r}else this.markContent(t.tag,t.options)})},endPageMarkings(e){const t=e.markings;return t.forEach(()=>e.write("EMC")),e.markings=[],t},getMarkInfoDictionary(){return this._root.data.MarkInfo||(this._root.data.MarkInfo=this.ref({})),this._root.data.MarkInfo},hasMarkInfoDictionary(){return!!this._root.data.MarkInfo},getStructTreeRoot(){return this._root.data.StructTreeRoot||(this._root.data.StructTreeRoot=this.ref({Type:"StructTreeRoot",ParentTree:new rpt,ParentTreeNextKey:0})),this._root.data.StructTreeRoot},getStructParentTree(){return this.getStructTreeRoot().data.ParentTree},createStructParentTreeNextKey(){this.getMarkInfoDictionary();const e=this.getStructTreeRoot(),t=e.data.ParentTreeNextKey++;return e.data.ParentTree.add(t,[]),t},endMarkings(){const e=this._root.data.StructTreeRoot;e&&(e.end(),this.structChildren.forEach(t=>t.end())),this._root.data.MarkInfo&&this._root.data.MarkInfo.end()}};const hY={readOnly:1,required:2,noExport:4,multiline:4096,password:8192,toggleToOffButton:16384,radioButton:32768,pushButton:65536,combo:131072,edit:262144,sort:524288,multiSelect:2097152,noSpell:4194304},mY={left:0,center:1,right:2},pY={value:"V",defaultValue:"DV"},gY={zip:"0",zipPlus4:"1",zip4:"1",phone:"2",ssn:"3"},AY={number:{nDec:0,sepComma:!1,negStyle:"MinusBlack",currency:"",currencyPrepend:!0},percent:{nDec:0,sepComma:!1}};var ipt={initForm(){if(!this._font)throw new Error("Must set a font before calling initForm method");this._acroform={fonts:{},defaultFont:this._font.name},this._acroform.fonts[this._font.id]=this._font.ref();let e={Fields:[],NeedAppearances:!0,DA:new String(`/${this._font.id} 0 Tf 0 g`),DR:{Font:{}}};e.DR.Font[this._font.id]=this._font.ref();const t=this.ref(e);return this._root.data.AcroForm=t,this},endAcroForm(){if(this._root.data.AcroForm){if(!Object.keys(this._acroform.fonts).length&&!this._acroform.defaultFont)throw new Error("No fonts specified for PDF form");let e=this._root.data.AcroForm.data.DR.Font;Object.keys(this._acroform.fonts).forEach(t=>{e[t]=this._acroform.fonts[t]}),this._root.data.AcroForm.data.Fields.forEach(t=>{this._endChild(t)}),this._root.data.AcroForm.end()}return this},_endChild(e){return Array.isArray(e.data.Kids)&&(e.data.Kids.forEach(t=>{this._endChild(t)}),e.end()),this},formField(e,t){t===void 0&&(t={});let r=this._fieldDict(e,null,t),n=this.ref(r);return this._addToParent(n),n},formAnnotation(e,t,r,n,i,a,s){s===void 0&&(s={});let l=this._fieldDict(e,t,s);l.Subtype="Widget",l.F===void 0&&(l.F=4),this.annotate(r,n,i,a,l);let c=this.page.annotations[this.page.annotations.length-1];return this._addToParent(c)},formText(e,t,r,n,i,a){return a===void 0&&(a={}),this.formAnnotation(e,"text",t,r,n,i,a)},formPushButton(e,t,r,n,i,a){return a===void 0&&(a={}),this.formAnnotation(e,"pushButton",t,r,n,i,a)},formCombo(e,t,r,n,i,a){return a===void 0&&(a={}),this.formAnnotation(e,"combo",t,r,n,i,a)},formList(e,t,r,n,i,a){return a===void 0&&(a={}),this.formAnnotation(e,"list",t,r,n,i,a)},formRadioButton(e,t,r,n,i,a){return a===void 0&&(a={}),this.formAnnotation(e,"radioButton",t,r,n,i,a)},formCheckbox(e,t,r,n,i,a){return a===void 0&&(a={}),this.formAnnotation(e,"checkbox",t,r,n,i,a)},_addToParent(e){let t=e.data.Parent;return t?(t.data.Kids||(t.data.Kids=[]),t.data.Kids.push(e)):this._root.data.AcroForm.data.Fields.push(e),this},_fieldDict(e,t,r){if(r===void 0&&(r={}),!this._acroform)throw new Error("Call document.initForm() method before adding form elements to document");let n=Object.assign({},r);return t!==null&&(n=this._resolveType(t,r)),n=this._resolveFlags(n),n=this._resolveJustify(n),n=this._resolveFont(n),n=this._resolveStrings(n),n=this._resolveColors(n),n=this._resolveFormat(n),n.T=new String(e),n.parent&&(n.Parent=n.parent,delete n.parent),n},_resolveType(e,t){if(e==="text")t.FT="Tx";else if(e==="pushButton")t.FT="Btn",t.pushButton=!0;else if(e==="radioButton")t.FT="Btn",t.radioButton=!0;else if(e==="checkbox")t.FT="Btn";else if(e==="combo")t.FT="Ch",t.combo=!0;else if(e==="list")t.FT="Ch";else throw new Error(`Invalid form annotation type '${e}'`);return t},_resolveFormat(e){const t=e.format;if(t&&t.type){let r,n,i="";if(gY[t.type]!==void 0)r="AFSpecial_Keystroke",n="AFSpecial_Format",i=gY[t.type];else{let a=t.type.charAt(0).toUpperCase()+t.type.slice(1);if(r=`AF${a}_Keystroke`,n=`AF${a}_Format`,t.type==="date")r+="Ex",i=String(t.param);else if(t.type==="time")i=String(t.param);else if(t.type==="number"){let s=Object.assign({},AY.number,t);i=String([String(s.nDec),s.sepComma?"0":"1",'"'+s.negStyle+'"',"null",'"'+s.currency+'"',String(s.currencyPrepend)].join(","))}else if(t.type==="percent"){let s=Object.assign({},AY.percent,t);i=String([String(s.nDec),s.sepComma?"0":"1"].join(","))}}e.AA=e.AA?e.AA:{},e.AA.K={S:"JavaScript",JS:new String(`${r}(${i});`)},e.AA.F={S:"JavaScript",JS:new String(`${n}(${i});`)}}return delete e.format,e},_resolveColors(e){let t=this._normalizeColor(e.backgroundColor);return t&&(e.MK||(e.MK={}),e.MK.BG=t),t=this._normalizeColor(e.borderColor),t&&(e.MK||(e.MK={}),e.MK.BC=t),delete e.backgroundColor,delete e.borderColor,e},_resolveFlags(e){let t=0;return Object.keys(e).forEach(r=>{hY[r]&&(e[r]&&(t|=hY[r]),delete e[r])}),t!==0&&(e.Ff=e.Ff?e.Ff:0,e.Ff|=t),e},_resolveJustify(e){let t=0;return e.align!==void 0&&(typeof mY[e.align]=="number"&&(t=mY[e.align]),delete e.align),t!==0&&(e.Q=t),e},_resolveFont(e){if(this._acroform.fonts[this._font.id]==null&&(this._acroform.fonts[this._font.id]=this._font.ref()),this._acroform.defaultFont!==this._font.name){e.DR={Font:{}};const t=e.fontSize||0;e.DR.Font[this._font.id]=this._font.ref(),e.DA=new String(`/${this._font.id} ${t} Tf 0 g`)}return e},_resolveStrings(e){let t=[];function r(n){if(Array.isArray(n))for(let i=0;i{e[n]!==void 0&&(e[pY[n]]=e[n],delete e[n])}),["V","DV"].forEach(n=>{typeof e[n]=="string"&&(e[n]=new String(e[n]))}),e.MK&&e.MK.CA&&(e.MK.CA=new String(e.MK.CA)),e.label&&(e.MK=e.MK?e.MK:{},e.MK.CA=new String(e.label),delete e.label),e}},apt={file(e,t){t===void 0&&(t={}),t.name=t.name||e,t.relationship=t.relationship||"Unspecified";const r={Type:"EmbeddedFile",Params:{}};let n;if(!e)throw new Error("No src specified");if(Bt.isBuffer(e))n=e;else if(e instanceof ArrayBuffer)n=Bt.from(new Uint8Array(e));else{let u;if(u=/^data:(.*?);base64,(.*)$/.exec(e))u[1]&&(r.Subtype=u[1].replace("/","#2F")),n=Bt.from(u[2],"base64");else{if(n=h3.readFileSync(e),!n)throw new Error(`Could not read contents of file at filepath ${e}`);const{birthtime:d,ctime:f}=h3.statSync(e);r.Params.CreationDate=d,r.Params.ModDate=f}}t.creationDate instanceof Date&&(r.Params.CreationDate=t.creationDate),t.modifiedDate instanceof Date&&(r.Params.ModDate=t.modifiedDate),t.type&&(r.Subtype=t.type.replace("/","#2F"));const i=jV.MD5(jV.lib.WordArray.create(new Uint8Array(n)));r.Params.CheckSum=new String(i),r.Params.Size=n.byteLength;let a;this._fileRegistry||(this._fileRegistry={});let s=this._fileRegistry[t.name];s&&spt(r,s)?a=s.ref:(a=this.ref(r),a.end(n),this._fileRegistry[t.name]={...r,ref:a});const l={Type:"Filespec",AFRelationship:t.relationship,F:new String(t.name),EF:{F:a},UF:new String(t.name)};t.description&&(l.Desc=new String(t.description));const c=this.ref(l);return c.end(),t.hidden||this.addNamedEmbeddedFile(t.name,c),this._root.data.AF?this._root.data.AF.push(c):this._root.data.AF=[c],c}};function spt(e,t){return e.Subtype===t.Subtype&&e.Params.CheckSum.toString()===t.Params.CheckSum.toString()&&e.Params.Size===t.Params.Size&&e.Params.CreationDate.getTime()===t.Params.CreationDate.getTime()&&(e.Params.ModDate===void 0&&t.Params.ModDate===void 0||e.Params.ModDate.getTime()===t.Params.ModDate.getTime())}var opt="/home/runner/work/react-pdf/react-pdf/packages/pdfkit/src/mixins",lpt={initPDFA(e){e.charAt(e.length-3)==="-"?(this.subset_conformance=e.charAt(e.length-1).toUpperCase(),this.subset=parseInt(e.charAt(e.length-2))):(this.subset_conformance="B",this.subset=parseInt(e.charAt(e.length-1)))},endSubset(){this._addPdfaMetadata(),this._addColorOutputIntent()},_addColorOutputIntent(){const e=h3.readFileSync(`${opt}/data/sRGB_IEC61966_2_1.icc`),t=this.ref({Length:e.length,N:3});t.write(e),t.end();const r=this.ref({Type:"OutputIntent",S:"GTS_PDFA1",Info:new String("sRGB IEC61966-2.1"),OutputConditionIdentifier:new String("sRGB IEC61966-2.1"),DestOutputProfile:t});r.end(),this._root.data.OutputIntents=[r]},_getPdfaid(){return` ${this.subset} ${this.subset_conformance} `},_addPdfaMetadata(){this.appendXML(this._getPdfaid())}},cpt={initPDFUA(){this.subset=1},endSubset(){this._addPdfuaMetadata()},_addPdfuaMetadata(){this.appendXML(this._getPdfuaid())},_getPdfuaid(){return` ${this.subset} `}},upt={_importSubset(e){Object.assign(this,e)},initSubset(e){switch(e.subset){case"PDF/A-1":case"PDF/A-1a":case"PDF/A-1b":case"PDF/A-2":case"PDF/A-2a":case"PDF/A-2b":case"PDF/A-3":case"PDF/A-3a":case"PDF/A-3b":this._importSubset(lpt),this.initPDFA(e.subset);break;case"PDF/UA":this._importSubset(cpt),this.initPDFUA();break}}};class dpt{constructor(){this._metadata=` `}_closeTags(){this._metadata=this._metadata.concat(` `)}append(t,r){r===void 0&&(r=!0),this._metadata=this._metadata.concat(t),r&&(this._metadata=this._metadata.concat(` `))}getXML(){return this._metadata}getLength(){return this._metadata.length}end(){this._closeTags(),this._metadata=this._metadata.trim()}}var fpt={initMetadata(){this.metadata=new dpt},appendXML(e,t){t===void 0&&(t=!0),this.metadata.append(e,t)},_addInfo(){this.appendXML(` ${this.info.CreationDate.toISOString().split(".")[0]+"Z"} ${this.info.Creator} `),(this.info.Title||this.info.Author||this.info.Subject)&&(this.appendXML(` `),this.info.Title&&this.appendXML(` ${this.info.Title} `),this.info.Author&&this.appendXML(` ${this.info.Author} `),this.info.Subject&&this.appendXML(` ${this.info.Subject} `),this.appendXML(` `)),this.appendXML(` ${this.info.Creator}`,!1),this.info.Keywords&&this.appendXML(` ${this.info.Keywords}`,!1),this.appendXML(` `)},endMetadata(){this._addInfo(),this.metadata.end(),this.version!=1.3&&(this.metadataRef=this.ref({length:this.metadata.getLength(),Type:"Metadata",Subtype:"XML"}),this.metadataRef.compress=!1,this.metadataRef.write(Bt.from(this.metadata.getXML(),"utf-8")),this.metadataRef.end(),this._root.data.Metadata=this.metadataRef)}};class lM extends pAe.Readable{constructor(t){switch(t===void 0&&(t={}),super(t),this.options=t,t.pdfVersion){case"1.4":this.version=1.4;break;case"1.5":this.version=1.5;break;case"1.6":this.version=1.6;break;case"1.7":case"1.7ext3":this.version=1.7;break;default:this.version=1.3;break}this.compress=this.options.compress!=null?this.options.compress:!0,this._pageBuffer=[],this._pageBufferStart=0,this._offsets=[],this._waiting=0,this._ended=!1,this._offset=0;const r=this.ref({Type:"Pages",Count:0,Kids:[]}),n=this.ref({Dests:new yC});if(this._root=this.ref({Type:"Catalog",Pages:r,Names:n}),this.options.lang&&(this._root.data.Lang=new String(this.options.lang)),this.page=null,this.initMetadata(),this.initColor(),this.initVector(),this.initFonts(t.font),this.initText(),this.initImages(),this.initOutline(),this.initMarkings(t),this.initSubset(t),this.info={Producer:"PDFKit",Creator:"PDFKit",CreationDate:new Date},this.options.info)for(let i in this.options.info){const a=this.options.info[i];this.info[i]=a}this.options.displayTitle&&(this._root.data.ViewerPreferences=this.ref({DisplayDocTitle:!0})),this._id=pmt.generateFileID(this.info),this._write(`%PDF-${this.version}`),this._write("%ÿÿÿÿ"),this.options.autoFirstPage!==!1&&this.addPage()}addPage(t){t==null&&({options:t}=this),this.options.bufferPages||this.flushPages(),this.page=new hmt(this,t),this._pageBuffer.push(this.page);const r=this._root.data.Pages.data;return r.Kids.push(this.page.dictionary),r.Count++,this.x=this.page.margins.left,this.y=this.page.margins.top,this._ctm=[1,0,0,1,0,0],this.transform(1,0,0,-1,0,this.page.height),this.emit("pageAdded"),this}continueOnNewPage(t){const r=this.endPageMarkings(this.page);return this.addPage(t??this.page._options),this.initPageMarkings(r),this}bufferedPageRange(){return{start:this._pageBufferStart,count:this._pageBuffer.length}}switchToPage(t){let r;if(!(r=this._pageBuffer[t-this._pageBufferStart]))throw new Error(`switchToPage(${t}) out of bounds, current buffer covers pages ${this._pageBufferStart} to ${this._pageBufferStart+this._pageBuffer.length-1}`);return this.page=r}flushPages(){const t=this._pageBuffer;this._pageBuffer=[],this._pageBufferStart+=t.length;for(let r of t)this.endPageMarkings(r),r.end()}addNamedDestination(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i{Object.assign(lM.prototype,e)};Z0(fpt);Z0(Smt);Z0(Omt);Z0(qmt);Z0(Kmt);Z0(Xmt);Z0(ept);Z0(tpt);Z0(npt);Z0(ipt);Z0(apt);Z0(upt);lM.LineWrapper=FT;const hpt=["Courier","Courier-Bold","Courier-Oblique","Courier-BoldOblique","Helvetica","Helvetica-Bold","Helvetica-Oblique","Helvetica-BoldOblique","Times-Roman","Times-Bold","Times-Italic","Times-BoldItalic"];class mpt{name;src;fullName;familyName;subfamilyName;postscriptName;copyright;version;underlinePosition;underlineThickness;italicAngle;bbox;"OS/2";hhea;numGlyphs;characterSet;availableFeatures;type;constructor(t){this.name=t,this.fullName=t,this.familyName=t,this.subfamilyName=t,this.type="STANDARD",this.postscriptName=t,this.availableFeatures=[],this.copyright="",this.version=1,this.underlinePosition=-100,this.underlineThickness=50,this.italicAngle=0,this.bbox={},this["OS/2"]={},this.hhea={},this.numGlyphs=0,this.characterSet=[],this.src=BB.open(null,t)}encode(t){return this.src.encode(t)}layout(t){const[r,n]=this.encode(t),i=r.map((s,l)=>{const c=this.getGlyph(parseInt(s,16));return c.advanceWidth=n[l].advanceWidth,c}),a=n.reduce((s,l)=>s+l.advanceWidth,0);return{positions:n,stringIndices:n.map((s,l)=>l),glyphs:i,script:"latin",language:"dflt",direction:"ltr",features:{},advanceWidth:a,advanceHeight:0,bbox:void 0}}glyphForCodePoint(t){const r=this.getGlyph(t);return r.advanceWidth=400,r}getGlyph(t){return{id:t,codePoints:[t],isLigature:!1,name:this.src.font.characterToGlyph(t),_font:this.src,advanceWidth:void 0}}hasGlyphForCodePoint(t){return this.src.font.characterToGlyph(t)!==".notdef"}get ascent(){return 900}get capHeight(){switch(this.name){case"Times-Roman":case"Times-Bold":case"Times-Italic":case"Times-BoldItalic":return 650;case"Courier":case"Courier-Bold":case"Courier-Oblique":case"Courier-BoldOblique":return 550;default:return 690}}get xHeight(){switch(this.name){case"Times-Roman":case"Times-Bold":case"Times-Italic":case"Times-BoldItalic":return 440;case"Courier":case"Courier-Bold":case"Courier-Oblique":case"Courier-BoldOblique":return 390;default:return 490}}get descent(){switch(this.name){case"Times-Roman":case"Times-Bold":case"Times-Italic":case"Times-BoldItalic":return-220;case"Courier":case"Courier-Bold":case"Courier-Oblique":case"Courier-BoldOblique":return-230;default:return-200}}get lineGap(){return 0}get unitsPerEm(){return 1e3}stringsForGlyph(){throw new Error("Method not implemented.")}glyphsForString(){throw new Error("Method not implemented.")}widthOfGlyph(){throw new Error("Method not implemented.")}getAvailableFeatures(){throw new Error("Method not implemented.")}createSubset(){throw new Error("Method not implemented.")}getVariation(){throw new Error("Method not implemented.")}getFont(){throw new Error("Method not implemented.")}getName(){throw new Error("Method not implemented.")}setDefaultLanguage(){throw new Error("Method not implemented.")}}const ppt=async(e,t)=>{const n=await(await fetch(e,t)).arrayBuffer();return new Uint8Array(n)},gpt=e=>{const t=e.split(",")[0],r=t.substring(0,5)==="data:",n=t.split(";")[1]==="base64";return r&&n};class Apt{src;fontFamily;fontStyle;fontWeight;data;options;loadResultPromise;constructor(t,r,n,i,a){this.src=t,this.fontFamily=r,this.fontStyle=n||"normal",this.fontWeight=i||400,this.data=null,this.options=a||{},this.loadResultPromise=null}async _load(){const{postscriptName:t}=this.options;let r=null;if(hpt.includes(this.src))r=new mpt(this.src);else if(gpt(this.src)){const n=this.src.split(",")[1],i=new Uint8Array(atob(n).split("").map(a=>a.charCodeAt(0)));r=Ab(i,t)}else{const{headers:n,body:i,method:a="GET"}=this.options,s=await ppt(this.src,{method:a,body:i,headers:n});r=Ab(s,t)}if(r&&"fonts"in r)throw new Error("Font collection is not supported");this.data=r}async load(){return this.loadResultPromise===null&&(this.loadResultPromise=this._load()),this.loadResultPromise}}const vpt={thin:100,hairline:100,ultralight:200,extralight:200,light:300,normal:400,medium:500,semibold:600,demibold:600,bold:700,ultrabold:800,extrabold:800,heavy:900,black:900},vY=e=>typeof e=="string"?vpt[e]:e,xY=(e,t)=>e.fontWeight-t.fontWeight;class cM{family;sources;static create(t){return new cM(t)}constructor(t){this.family=t,this.sources=[]}register({src:t,fontWeight:r,fontStyle:n,...i}){const a=r?vY(r):void 0;this.sources.push(new Apt(t,this.family,n,a,i))}resolve(t){const{fontWeight:r=400,fontStyle:n="normal"}=t,i=this.sources.filter(d=>d.fontStyle===n),a=i.find(d=>d.fontWeight===r);if(a)return a;let s=null;const l=vY(r);if(l>=400&&l<=500){const d=i.filter(g=>g.fontWeight<=l),f=i.filter(g=>g.fontWeight>500);s=i.filter(g=>g.fontWeight>=l&&g.fontWeight<500)[0]||d[d.length-1]||f[0]}const c=i.filter(d=>d.fontWeightd.fontWeight>l).sort(xY);if(l<400&&(s=c[c.length-1]||u[0]),l>500&&(s=u[0]||c[c.length-1]),!s)throw new Error(`Could not resolve font for ${this.family}, fontWeight ${r}, fontStyle ${n}`);return s}}class xpt{fontFamilies={};emojiSource=null;constructor(){this.register({family:"Helvetica",fonts:[{src:"Helvetica",fontStyle:"normal",fontWeight:400},{src:"Helvetica-Bold",fontStyle:"normal",fontWeight:700},{src:"Helvetica-Oblique",fontStyle:"italic",fontWeight:400},{src:"Helvetica-BoldOblique",fontStyle:"italic",fontWeight:700}]}),this.register({family:"Courier",fonts:[{src:"Courier",fontStyle:"normal",fontWeight:400},{src:"Courier-Bold",fontStyle:"normal",fontWeight:700},{src:"Courier-Oblique",fontStyle:"italic",fontWeight:400},{src:"Courier-BoldOblique",fontStyle:"italic",fontWeight:700}]}),this.register({family:"Times-Roman",fonts:[{src:"Times-Roman",fontStyle:"normal",fontWeight:400},{src:"Times-Bold",fontStyle:"normal",fontWeight:700},{src:"Times-Italic",fontStyle:"italic",fontWeight:400},{src:"Times-BoldItalic",fontStyle:"italic",fontWeight:700}]}),this.register({family:"Helvetica-Bold",src:"Helvetica-Bold"}),this.register({family:"Helvetica-Oblique",src:"Helvetica-Oblique"}),this.register({family:"Helvetica-BoldOblique",src:"Helvetica-BoldOblique"}),this.register({family:"Courier-Bold",src:"Courier-Bold"}),this.register({family:"Courier-Oblique",src:"Courier-Oblique"}),this.register({family:"Courier-BoldOblique",src:"Courier-BoldOblique"}),this.register({family:"Times-Bold",src:"Times-Bold"}),this.register({family:"Times-Italic",src:"Times-Italic"}),this.register({family:"Times-BoldItalic",src:"Times-BoldItalic"}),this.load({fontFamily:"Helvetica",fontStyle:"normal",fontWeight:400}),this.load({fontFamily:"Helvetica",fontStyle:"normal",fontWeight:700}),this.load({fontFamily:"Helvetica",fontStyle:"italic",fontWeight:400}),this.load({fontFamily:"Helvetica",fontStyle:"italic",fontWeight:700})}hyphenationCallback=null;register=t=>{const{family:r}=t;if(this.fontFamilies[r]||(this.fontFamilies[r]=cM.create(r)),"fonts"in t)for(let n=0;n{this.emojiSource=t};registerHyphenationCallback=t=>{this.hyphenationCallback=t};getFont=t=>{const{fontFamily:r}=t;if(!this.fontFamilies[r])throw new Error(`Font family not registered: ${r}. Please register it calling Font.register() method.`);return this.fontFamilies[r].resolve(t)};load=async t=>{const r=this.getFont(t);r&&await r.load()};reset=()=>{const t=Object.keys(this.fontFamilies);for(let r=0;r{this.fontFamilies={}};getRegisteredFonts=()=>this.fontFamilies;getEmojiSource=()=>this.emojiSource;getHyphenationCallback=()=>this.hyphenationCallback;getRegisteredFontFamilies=()=>Object.keys(this.fontFamilies)}const ypt=(e,t,r)=>{if(Math.abs(e)>r.length)return r;const n=r.length+e;return Object.assign([],r,{[n]:t(r[n])})},bpt=(...e)=>async(t,...r)=>{let n=t;const i=e.slice().reverse();for(let a=0;ae&&e.replace(/(^|\s)\S/g,t=>t.toUpperCase()),NB=e=>Array.isArray(e)?e:[e],Zc=(...e)=>(t,...r)=>{let n=t;const i=e.slice().reverse();for(let a=0;ae.slice(0,e.length-1);function kB(e,t){const r={},n=Object.keys(t);for(let i=0;ie==null;function Im(e){return e===""?"":e[e.length-1]}const _Ae=(e,t)=>{const r=Object.entries(e),n={};return r.reduce((i,[a,s],l)=>(i[a]=t(s,a,l),i),n)},Cpt=e=>/((-)?\d+\.?\d*)%/g.exec(`${e}`),sl=e=>{const t=Cpt(e);if(t){const r=parseFloat(t[1]);return{percent:r/100,value:r}}return null},MT=(e,t)=>{const r=NB(e),n=Object.assign({},t);return r.forEach(i=>{delete n[i]}),n},uM=(e,t)=>{const r={};for(let n=0;n{const r=new Array(t);for(let n=0;nArray.prototype.slice.call(e,0).reverse(),Db=e=>e&&e.charAt(0).toUpperCase()+e.slice(1),Ipt=(e,t)=>{const r=[];for(let n=0;ntypeof e=="string"?Number.parseFloat(e):e;var Qj,bY;function Spt(){if(bY)return Qj;bY=1,Qj=e;function e(t){var r=0,n=0,i=0,a=0;return t.map(function(s){s=s.slice();var l=s[0],c=l.toUpperCase();if(l!=c)switch(s[0]=c,l){case"a":s[6]+=i,s[7]+=a;break;case"v":s[1]+=a;break;case"h":s[1]+=i;break;default:for(var u=1;u2&&(s.push([c].concat(u.splice(0,2))),d="l",c=c=="m"?"l":"L");;){if(u.length==e[d])return u.unshift(c),s.push(u);if(u.length1&&(s=1),s<-1&&(s=-1),a*Math.acos(s)},Ppt=function(t,r,n,i,a,s,l,c,u,d,f,m){var g=Math.pow(a,2),A=Math.pow(s,2),v=Math.pow(f,2),b=Math.pow(m,2),E=g*A-g*b-A*v;E<0&&(E=0),E/=g*b+A*v,E=Math.sqrt(E)*(l===c?-1:1);var I=E*a/s*m,S=E*-s/a*f,_=d*I-u*S+(t+n)/2,B=u*I+d*S+(r+i)/2,T=(f-I)/a,P=(m-S)/s,O=(-f-I)/a,z=(-m-S)/s,L=EY(1,0,T,P),W=EY(T,P,O,z);return c===0&&W>0&&(W-=T2),c===1&&W<0&&(W+=T2),[_,B,L,W]},Opt=function(t){var r=t.px,n=t.py,i=t.cx,a=t.cy,s=t.rx,l=t.ry,c=t.xAxisRotation,u=c===void 0?0:c,d=t.largeArcFlag,f=d===void 0?0:d,m=t.sweepFlag,g=m===void 0?0:m,A=[];if(s===0||l===0)return[];var v=Math.sin(u*T2/360),b=Math.cos(u*T2/360),E=b*(r-i)/2+v*(n-a)/2,I=-v*(r-i)/2+b*(n-a)/2;if(E===0&&I===0)return[];s=Math.abs(s),l=Math.abs(l);var S=Math.pow(E,2)/Math.pow(s,2)+Math.pow(I,2)/Math.pow(l,2);S>1&&(s*=Math.sqrt(S),l*=Math.sqrt(S));var _=Ppt(r,n,i,a,s,l,f,g,v,b,E,I),B=Dpt(_,4),T=B[0],P=B[1],O=B[2],z=B[3],L=Math.abs(z)/(T2/4);Math.abs(1-L)<1e-7&&(L=1);var W=Math.max(Math.ceil(L),1);z/=W;for(var R=0;R4?(n=g[g.length-4],i=g[g.length-3]):(n=u,i=d),r.push(g)}return r}function J4(e,t,r,n){return["C",e,t,r,n,r,n]}function CY(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}var $j={exports:{}},zj,IY;function Fpt(){return IY||(IY=1,zj={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),zj}var Hj={exports:{}},Wj,SY;function Mpt(){return SY||(SY=1,Wj=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}),Wj}var BY;function Qpt(){if(BY)return Hj.exports;BY=1;var e=Mpt(),t=Array.prototype.concat,r=Array.prototype.slice,n=Hj.exports=function(a){for(var s=[],l=0,c=a.length;l=4&&c[3]!==1&&(u=", "+c[3]),"hwb("+c[0]+", "+c[1]+"%, "+c[2]+"%"+u+")"},a.to.keyword=function(c){return n[c.slice(0,3)]};function s(c,u,d){return Math.min(Math.max(u,c),d)}function l(c){var u=Math.round(c).toString(16).toUpperCase();return u.length<2?"0"+u:u}return $j.exports}var Upt=Lpt();const Tb=hi(Upt),$pt=(e,t)=>{t.props?.d&&e.path(t.props.d)},kY=4*((Math.sqrt(2)-1)/3),zpt=(e,t)=>{const r=t.props?.x||0,n=t.props?.y||0,i=t.props?.rx||0,a=t.props?.ry||0,s=t.props?.width||0,l=t.props?.height||0;if(!(!s||!l)){if(i&&a){const c=i*kY,u=a*kY;e.moveTo(r+i,n),e.lineTo(r-i+s,n),e.bezierCurveTo(r-i+s+c,n,r+s,n+a-u,r+s,n+a),e.lineTo(r+s,n+l-a),e.bezierCurveTo(r+s,n+l-a+u,r-i+s+c,n+l,r-i+s,n+l),e.lineTo(r+i,n+l),e.bezierCurveTo(r+i-c,n+l,r,n+l-a+u,r,n+l-a),e.lineTo(r,n+a),e.bezierCurveTo(r,n+a-u,r+i-c,n,r+i,n)}else e.moveTo(r,n),e.lineTo(r+s,n),e.lineTo(r+s,n+l),e.lineTo(r,n+l);e.closePath()}},Hpt=(e,t)=>{const{x1:r,x2:n,y1:i,y2:a}=t.props||{};e.moveTo(r,i),e.lineTo(n,a)},Wpt=()=>{},_Y=4*((Math.sqrt(2)-1)/3),DAe=(e,t,r,n=0,i=0)=>{const a=n-t,s=i-r,l=t*_Y,c=r*_Y,u=a+t*2,d=s+r*2,f=a+t,m=s+r;e.moveTo(a,m),e.bezierCurveTo(a,m-c,f-l,s,f,s),e.bezierCurveTo(f+l,s,u,m-c,u,m),e.bezierCurveTo(u,m+c,f+l,d,f,d),e.bezierCurveTo(f-l,d,a,m+c,a,m),e.closePath()},Gpt=(e,t)=>{const{cx:r,cy:n,rx:i,ry:a}=t.props||{};DAe(e,i,a,r,n)},qpt=(e,t)=>{const r=t.props?.cx,n=t.props?.cy,i=t.props?.r;DAe(e,i,i,r,n)},Np=e=>{if(e>-1e21&&e<1e21)return Math.round(e*1e6)/1e6;throw new Error(`unsupported number: ${e}`)},Kpt=(e,t,r,n,i)=>{const a=[],s=e._fontSize/1e3;let l,c=0,u=!1;e.save(),e.transform(1,0,0,-1,0,e.page.height),i=e.page.height-i,e.page.fonts[e._font.id]==null&&(e.page.fonts[e._font.id]=e._font.ref()),e.addContent("BT"),e.addContent(`1 0 0 1 ${Np(n)} ${Np(i)} Tm`),e.addContent(`/${e._font.id} ${Np(e._fontSize)} Tf`);const d=m=>{if(c ${Np(-A)}`)}return c=m},f=m=>{if(d(m),a.length>0)return e.addContent(`[${a.join(" ")}] TJ`),a.length=0};for(l=0;l{const a=1e3/e._fontSize,l=1e3/(e._font.font.unitsPerEm||1e3),c=e._font.encodeGlyphs(t),u=r.map((d,f)=>({xAdvance:d.xAdvance*a,yAdvance:d.yAdvance*a,xOffset:d.xOffset,yOffset:d.yOffset,advanceWidth:t[f].advanceWidth*l}));return Kpt(e,c,u,n,i)},Vpt=(e,t)=>{if(!t.glyphs||!t.positions)return;const r=t.xAdvance,n=t.attributes.font?.[0],{fontSize:i,color:a,opacity:s}=t.attributes;a&&e.fillColor(a),e.fillOpacity(s),n&&e.font(n.type==="STANDARD"?n.fullName:n,i);try{TAe(e,t.glyphs,t.positions,0,0)}catch(l){console.log(l)}e.translate(r,0)},Ypt=(e,t,r,n)=>{e.save();const i=t.box?.x||0,a=t.box?.y||0,s=t.runs[0]?.attributes.font?.[0],l=t.runs[0]?.attributes?.scale||1,c=t.xAdvance;if(!s)return;const u=s.ascent*l,d=s.xHeight*l,f=s.descent*l,m=s.capHeight*l;let g=i,A=a;switch(r){case"middle":g=i-c/2;break;case"end":g=i-c;break;default:g=i;break}switch(n){case"middle":case"central":A=a+m/2;break;case"hanging":A=a+m;break;case"mathematical":A=a+d;break;case"text-after-edge":A=a+f;break;case"text-before-edge":A=a+u;break;default:A=a;break}e.translate(g,A),t.runs.forEach(v=>Vpt(e,v)),e.restore()},Zpt=(e,t)=>{t.children.forEach(n=>Ypt(e,n.lines[0],n.props.textAnchor,n.props.dominantBaseline))},Jpt=e=>{const t=[];for(let r=0;r{let t=(e||"").trim().replace(/,/g," ").replace(/(\d)-(\d)/g,"$1 -$2").split(/\s+/);t.length%2!==0&&(t=t.slice(0,-1));const r=t.map(parseFloat);return Jpt(r)},PAe=(e,t)=>{t.length>0&&(e.moveTo(t[0][0],t[0][1]),t.slice(1).forEach(r=>e.lineTo(r[0],r[1])))},Xpt=(e,t)=>{const r=dM(t.props.points||"");PAe(e,r)},egt=(e,t)=>{const r=dM(t.props.points||"");PAe(e,r),e.closePath()},tgt=(e,t)=>{if(!t.box||!t.image?.data)return;const{x:r=0,y:n=0}=t.props,{width:i,height:a,opacity:s}=t.style,l=t.box.paddingLeft||0,c=t.box.paddingLeft||0;if(i===0||a===0){console.warn(`Image with src '${t.props.href}' skipped due to invalid dimensions`);return}if(typeof i=="string"||typeof a=="string"){console.warn(`Image with src '${t.props.href}' skipped due to percentage width or height`);return}e.save(),e.fillOpacity(s||1).image(t.image.data,r+c,n+l,{width:i,height:a}),e.restore()},X4=4*((Math.sqrt(2)-1)/3),_B=(e,t)=>{if(!t.box||!t.style)return;const{top:r,left:n,width:i,height:a}=t.box,{borderTopLeftRadius:s=0,borderTopRightRadius:l=0,borderBottomRightRadius:c=0,borderBottomLeftRadius:u=0}=t.style,d=Math.min(l,.5*i,.5*a),f=d*(1-X4);e.moveTo(n+d,r),e.lineTo(n+i-d,r),e.bezierCurveTo(n+i-f,r,n+i,r+f,n+i,r+d);const m=Math.min(c,.5*i,.5*a),g=m*(1-X4);e.lineTo(n+i,r+a-m),e.bezierCurveTo(n+i,r+a-g,n+i-g,r+a,n+i-m,r+a);const A=Math.min(u,.5*i,.5*a),v=A*(1-X4);e.lineTo(n+A,r+a),e.bezierCurveTo(n+v,r+a,n,r+a-v,n,r+a-A);const b=Math.min(s,.5*i,.5*a),E=b*(1-X4);e.lineTo(n,r+b),e.bezierCurveTo(n,r+E,n+E,r,n+b,r),e.closePath(),e.clip()},rgt=(e,t,r)=>{const{operation:n,value:i}=t;switch(n){case"scale":{const[a,s]=i;e.scale(a,s,{origin:r});break}case"rotate":{const[a]=i;e.rotate(a,{origin:r});break}case"translate":{const[a,s=0]=i;e.translate(a,s,{origin:r});break}case"skew":{const[a=0,s=0]=i,l=a*Math.PI/180,c=s*Math.PI/180,u=Math.tan(l),d=Math.tan(c);let f=0,m=0;if(r!=null){[f,m]=Array.from(r);const g=f+u*m,A=m+d*f;f-=g,m-=A}e.transform(1,d,u,1,f,m);break}case"matrix":{e.transform(...i);break}default:console.error(`Transform operation: '${n}' doesn't supported`)}},OAe=(e,t)=>{if(!t.origin)return;const{props:r,style:n}=t,i=[t.origin.left,t.origin.top],a="transform"in r?r.transform:void 0;(n?.transform||a||[]).forEach(l=>{rgt(e,l,i)})},ngt=e=>{const t=Rpt(Npt(jpt(e.props?.d||"")));if(!t.length)return[0,0,0,0];const r=[1/0,1/0,-1/0,-1/0];for(let n=0,i=t.length;nr[2]&&(r[2]=a[s+0]),a[s+1]>r[3]&&(r[3]=a[s+1])}return r},igt=e=>{const t=e.props?.r||0,r=e.props?.cx||0,n=e.props?.cy||0;return[r-t,n-t,r+t,n+t]},agt=e=>{const t=e.props?.cx||0,r=e.props?.cy||0,n=e.props?.rx||0,i=e.props?.ry||0;return[t-n,r-i,t+n,r+i]},sgt=e=>{const t=e.props?.x1||0,r=e.props?.y1||0,n=e.props?.x2||0,i=e.props?.y2||0;return[Math.min(t,n),Math.min(r,i),Math.max(t,n),Math.max(r,i)]},ogt=e=>{const t=e.props?.x||0,r=e.props?.y||0,n=e.props?.width||0,i=e.props?.height||0;return[t,r,t+n,r+i]},jY=e=>Math.max(-1/0,...e),DY=e=>Math.min(1/0,...e),TY=e=>{const t=dM(e.props?.points),r=t.map(i=>i[0]),n=t.map(i=>i[1]);return[DY(r),DY(n),jY(r),jY(n)]},lgt={[Dhe]:ogt,[The]:sgt,[jhe]:ngt,[Rhe]:igt,[Fhe]:agt,[Mhe]:TY,[Lhe]:TY},RAe=e=>{const t=lgt[e.type];return t?t(e):[0,0,0,0]},cgt=(e,t)=>{if(!t.props||!("strokeWidth"in t.props))return;const r=t.props.strokeWidth;r&&e.lineWidth(r)},ugt=(e,t)=>{if(!t.props||!("stroke"in t.props))return;const r=t.props.stroke;r&&e.strokeColor(r)},dgt=(e,t)=>{if(!t.props||!("opacity"in t.props))return;const r=t.props.opacity;Qa(r)||e.opacity(r)},fgt=(e,t)=>{if(!t.props||!("fillOpacity"in t.props))return;const r=t.props.fillOpacity||null;Qa(r)||e.fillOpacity(r)},hgt=(e,t)=>{if(!t.props||!("strokeOpacity"in t.props))return;const r=t.props?.strokeOpacity;Qa(r)||e.strokeOpacity(r)},mgt=(e,t)=>{if(!t.props||!("strokeLinejoin"in t.props))return;const r=t.props.strokeLinejoin;r&&e.lineJoin(r)},pgt=(e,t)=>{if(!t.props||!("strokeLinecap"in t.props))return;const r=t.props?.strokeLinecap;r&&e.lineCap(r)},ggt=(e,t)=>{if(!t.props||!("strokeDasharray"in t.props))return;const r=t.props?.strokeDasharray||null;r&&e.dash(r.split(/[\s,]+/).map(Number))},Agt=e=>!e.props||!("fill"in e.props)||typeof e.props.fill=="string"?!1:e.props.fill?.type===PJe,vgt=e=>!e.props||!("fill"in e.props)||typeof e.props.fill=="string"?!1:e.props.fill?.type===OJe;function xgt(e,t){const r=e[0]*t[0]+e[2]*t[1],n=e[1]*t[0]+e[3]*t[1],i=e[0]*t[2]+e[2]*t[3],a=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return[r,n,i,a,s,l]}const FAe=(e,t,r,n)=>{const a=t.map(s=>{switch(s.operation){case"scale":{const l=s.value;return[l[0],0,0,l[1],0,0]}case"translate":{const l=s.value;let c=l[0]||0,u=l[1]||0;return n==="objectBoundingBox"&&(c=(r[2]-r[0])*c,u=(r[3]-r[1])*u),[1,0,0,1,c,u]}case"rotate":{const l=s.value,c=Math.cos(l[0]),u=Math.sin(l[0]);return[c,u,-u,c,0,0]}case"skew":{const l=s.value;return[1,Math.tan(l[0]),Math.tan(l[1]),1,0,0]}case"matrix":{const l=s.value;let c=l[4]||0,u=l[5]||0;return n==="objectBoundingBox"&&(c=(r[2]-r[0])*c,u=(r[3]-r[1])*u),[l[0],l[1],l[2],l[3],c,u]}default:return[1,0,0,1,0,0]}}).reduce(xgt,[1,0,0,1,0,0]);e.setTransform(...a)},ygt=(e,t)=>{if(!t.props||!("fill"in t.props))return;const r=RAe(t),n=t.props?.fill;if(!n)return;const i=n.props.gradientUnits||"objectBoundingBox",a=n.props.gradientTransform||[];let s=n.props.x1||0,l=n.props.y1||0,c=n.props.x2||1,u=n.props.y2||0;if(i==="objectBoundingBox"){const f=r[2]-r[0],m=r[3]-r[1],g=r[0],A=r[1];s=f*s+g,l=m*l+A,c=f*c+g,u=m*u+A}const d=e.linearGradient(s,l,c,u);FAe(d,a,r,i),n.children?.forEach(f=>{d.stop(f.props.offset,f.props.stopColor,f.props.stopOpacity)}),e.fill(d)},bgt=(e,t)=>{if(!t.props||!("fill"in t.props))return;const r=RAe(t),n=t.props?.fill;if(!n)return;const i=n.props.gradientUnits||"objectBoundingBox",a=n.props.gradientTransform||[];let s=n.props.r||.5,l=n.props.cx||.5,c=n.props.cy||.5,u=n.props.fx||l,d=n.props.fy||c;if(i==="objectBoundingBox"){const m=r[2]-r[0],g=r[3]-r[1],A=r[0],v=r[1];s=s*m,l=m*l+A,c=g*c+v,u=m*u+A,d=g*d+v}const f=e.radialGradient(l,c,0,u,d,s);FAe(f,a,r,i),n.children?.forEach(m=>{f.stop(m.props.offset,m.props.stopColor,m.props.stopOpacity)}),e.fill(f)},wgt=(e,t)=>{if(!t.props||!("fill"in t.props))return;const r=t.props?.fill;r&&e.fillColor(r)},Egt=(e,t)=>Agt(t)?ygt(e,t):vgt(t)?bgt(e,t):wgt(e,t),Cgt=(e,t)=>{const r=t.props||{};"fill"in r&&"stroke"in r&&r.fill&&r.stroke?e.fillAndStroke(r.fillRule):"fill"in r&&r.fill?e.fill(r.fillRule):"stroke"in r&&r.stroke?e.stroke():(e.save(),e.opacity(0),e.fill(null),e.restore())},PY=()=>{},Igt={[JR]:PY,[z1]:PY,[jhe]:$pt,[Dhe]:zpt,[The]:Hpt,[kJe]:Wpt,[yr]:Zpt,[Rhe]:qpt,[$1]:tgt,[Fhe]:Gpt,[Mhe]:egt,[Lhe]:Xpt},MAe=(e,t)=>{const r=Igt[t.type];r?r(e,t):console.warn(`SVG node of type ${t.type} is not currently supported`)},Sgt=(e,t)=>{pgt(e,t),ggt(e,t),mgt(e,t),cgt(e,t),ugt(e,t),Egt(e,t),hgt(e,t),fgt(e,t),dgt(e,t),OAe(e,t),MAe(e,t),Cgt(e,t)},Bgt=(e,t)=>{if(!t.props||!("clipPath"in t.props))return;const r=t.props.clipPath;r&&((r.children||[]).forEach(i=>MAe(e,i)),e.clip())},QAe=(e,t)=>{(t.children||[]).forEach(n=>{e.save(),Bgt(e,n),Sgt(e,n),QAe(e,n),e.restore()})},Ngt=(e,t)=>{if(!t.box)return;const{width:r,height:n}=t.box,{viewBox:i,preserveAspectRatio:a}=t.props,{meetOrSlice:s="meet",align:l="xMidYMid"}=a||{};if(i==null||r==null||n==null)return;const c=i?.minX||0,u=i?.minY||0,d=i?.maxX||r,f=i?.maxY||n,m=d/f,g=r/n,A=r/d,v=n/f;if(l==="none"){e.scale(A,v),e.translate(-c,-u);return}if(m=g&&s==="slice")switch(e.scale(v,v),l){case"xMinYMin":case"xMinYMid":case"xMinYMax":e.translate(-c,-u);break;case"xMidYMin":case"xMidYMid":case"xMidYMax":e.translate(-c-(d-r*f/n)/2,-u);break;default:e.translate(-c-(d-r*f/n),-u)}else switch(e.scale(A,A),l){case"xMinYMin":case"xMidYMin":case"xMaxYMin":e.translate(-c,-u);break;case"xMinYMid":case"xMidYMid":case"xMaxYMid":e.translate(-c,-u-(f-n*d/r)/2);break;default:e.translate(-c,-u-(f-n*d/r))}},kgt=(e,t)=>{if(!t.box)return;const{top:r,left:n}=t.box,i=t.box.paddingLeft||0,a=t.box.paddingTop||0;e.translate(n+i,r+a)},_gt=(e,t)=>{e.save(),_B(e,t),kgt(e,t),Ngt(e,t),QAe(e,t),e.restore()},OY={value:"#000",opacity:1},fM=e=>{if(!e)return OY;const t=Tb.get(e);if(!t)return OY;const r=Tb.to.hex(t.value.slice(0,3)),n=t.value[3];return{value:r,opacity:n}},jgt=/^#.+/,Dgt=e=>e.match(jgt),Tgt=(e,t)=>{const{xOffset:r=0,yOffset:n=0,width:i,height:a,image:s}=t;e.translate(-i+r,-a+n),e.image(s,0,0,{fit:[i,a],align:"center",valign:"bottom"})},Pgt=(e,t)=>{if(!t.glyphs||!t.positions)return;const r=t.attributes.font?.[0];if(!r)return;e.save();const n=r.glyphForCodePoint(32),i=r.glyphForCodePoint(65532);let a=0;for(let s=0;s{if(!t.glyphs||!t.positions)return;const r=t.attributes.font?.[0];if(!r)return;const{fontSize:n,link:i}=t.attributes,a=fM(t.attributes.color),s=Qa(t.attributes.opacity)?a.opacity:t.attributes.opacity,{height:l=0,descent:c=0,xAdvance:u=0}=t;e.fillColor(a.value),e.fillOpacity(s),i&&(Dgt(i)?e.goTo(0,-l-c,u,l,i.slice(1)):e.link(0,-l-c,u,l,i)),Pgt(e,t),e.font(r.type==="STANDARD"?r.fullName:r,n);try{TAe(e,t.glyphs,t.positions,0,0)}catch(d){console.log(d)}e.translate(u,0)},Rgt=(e,t,r)=>{const n=fM(r);e.save(),e.fillOpacity(n.opacity),e.rect(t.x,t.y,t.width,t.height),e.fill(n.value),e.restore()},Fgt=(e,t)=>{if(e.save(),e.lineWidth(t.rect.height),e.strokeOpacity(t.opacity),/dashed/.test(t.style)?e.dash(3*t.rect.height,{}):/dotted/.test(t.style)&&e.dash(t.rect.height,{}),/wavy/.test(t.style)){const r=Math.max(2,t.rect.height);let n=1.1*r;const i=Math.floor(t.rect.width/(2*n)),s=(t.rect.width-i*2*n)/i/2;n+=s;const l=t.rect.y+r,c=t.rect.y-r;let{x:u}=t.rect;e.moveTo(t.rect.x,t.rect.y);for(let d=0;d{if(!t.box)return;const r=t.ascent||0;e.save(),e.translate(t.box.x,t.box.y+r);for(let n=0;n{t.forEach(r=>{Mgt(e,r)})},Lgt=(e,t)=>{if(!t.box||!t.lines)return;const{top:r,left:n}=t.box,i=[t.lines],a=t.box?.paddingTop||0,s=t.box?.paddingLeft||0,l=t.lines[0]?t.lines[0].box.y:0,c=t.alignOffset||0;e.save(),e.translate(n+s-c,r+a-l),i.forEach(u=>{Qgt(e,u)}),e.restore()},Ugt=(e,t)=>{if(!t.box)return;const{width:r,height:n}=t.box,a=(t.props?.dpi||72)/72;e.addPage({size:[r,n],margin:0,userUnit:a})},$gt=(e,t)=>{if(!t.box)return;const{top:r,left:n}=t.box,i=t?.children?.[0].value||"",a=t.style?.backgroundColor;e.note(n,r,0,0,i,{color:a})},zgt=(e,t)=>{const r=t.image.data;let n;return typeof r=="string"&&(n=e._imageRegistry[r]),n||(n=e.openImage(r)),n.obj||n.embed(e),n},Qf=e=>!Number.isNaN(parseFloat(e))&&Number.isFinite(e),LAe=(e,t,r,n,i,a)=>{const s=e/t,l=r/n,c=sl(i??null),u=sl(a??null),d=c?c.percent:.5,f=u?u.percent:.5;if(s>l){const b=t,E=b*l,I=Qf(a)?a:0,S=Qf(i)?i:(e-E)*d;return{width:E,height:b,xOffset:S,yOffset:I}}const m=e,g=m/l,A=Qf(i)?i:0,v=Qf(a)?a:(t-g)*f;return{width:m,height:g,yOffset:v,xOffset:A}},UAe=(e,t,r,n,i,a)=>{const s=r,l=n,c=sl(i??null),u=sl(a??null),d=c?c.percent:.5,f=u?u.percent:.5,m=Qf(i)?i:(e-s)*d,g=Qf(a)?a:(t-l)*f;return{width:s,height:l,xOffset:m,yOffset:g}},Hgt=(e,t,r,n,i,a)=>{const s=r/n,l=e/t,c=sl(i??null),u=sl(a??null),d=c?c.percent:.5,f=u?u.percent:.5;if(l>s){const b=e,E=b/s,I=Qf(i)?i:0,S=Qf(a)?a:(t-E)*f;return{width:b,height:E,yOffset:S,xOffset:I}}const m=t,g=m*s,A=Qf(i)?i:(e-g)*d,v=Qf(a)?a:0;return{width:g,height:m,xOffset:A,yOffset:v}},Wgt=(e,t,r,n,i,a)=>{const s=LAe(e,t,r,n,i,a),l=UAe(e,t,r,n,i,a);return s.width({width:e,height:t,xOffset:sl(r??null)?0:r||0,yOffset:sl(n??null)?0:n||0}),qgt=(e="fill",t,r,n,i,a,s)=>{switch(e){case"contain":return LAe(t,r,n,i,a,s);case"cover":return Hgt(t,r,n,i,a,s);case"none":return UAe(t,r,n,i,a,s);case"scale-down":return Wgt(t,r,n,i,a,s);default:return Ggt(t,r,a,s)}},Kgt=(e,t,r)=>{if(!t.box||!t.image)return;const{left:n,top:i}=t.box,a=t.style?.opacity,s=t.style?.objectFit,l=t.style?.objectPositionX,c=t.style?.objectPositionY,u=t.box.paddingTop||0,d=t.box.paddingRight||0,f=t.box.paddingBottom||0,m=t.box.paddingLeft||0,g=r.imageCache||new Map,{width:A,height:v,xOffset:b,yOffset:E}=qgt(s,t.box.width-m-d,t.box.height-u-f,t.image.width,t.image.height,l,c);if(t.image.data)if(A!==0&&v!==0){const I=t.image.key,S=g.get(I)||zgt(e,t);I&&g.set(I,S);const _=Qa(a)?1:a;e.fillOpacity(_).image(S,n+m+b,i+u+E,{width:A,height:v})}else console.warn(`Image with src '${JSON.stringify(t.props.src||t.props.source)}' skipped due to invalid dimensions`)},Vgt=(e,t,r)=>{e.save(),_B(e,t),Kgt(e,t,r),e.restore()},Ygt="#a1c6e7",Zgt="#c4deb9",Jgt="#f8cca1",Xgt=(e,t)=>{if(!t.box)return;const{left:r,top:n,width:i,height:a,paddingLeft:s=0,paddingTop:l=0,paddingRight:c=0,paddingBottom:u=0,borderLeftWidth:d=0,borderTopWidth:f=0,borderRightWidth:m=0,borderBottomWidth:g=0}=t.box;e.fillColor(Ygt).opacity(.5).rect(r+s+d,n+l+f,i-s-c-m-d,a-l-u-f-g).fill()},eAt=(e,t)=>{if(!t.box)return;const{left:r,top:n,width:i,height:a,paddingLeft:s=0,paddingTop:l=0,paddingRight:c=0,paddingBottom:u=0,borderLeftWidth:d=0,borderTopWidth:f=0,borderRightWidth:m=0,borderBottomWidth:g=0}=t.box;e.fillColor(Zgt).opacity(.5),e.rect(r+s+d,n+f,i-c-s-d-m,l).fill(),e.rect(r+d,n+f,s,a-f-g).fill(),e.rect(r+i-c-m,n+f,c,a-f-g).fill(),e.rect(r+s+d,n+a-u-g,i-c-s-d-m,u).fill()},tAt=(e,t)=>{if(!t.box)return;const{left:r,top:n,width:i,height:a}=t.box,{marginLeft:s=0,marginTop:l=0,marginRight:c=0,marginBottom:u=0}=t.box;e.fillColor(Jgt).opacity(.5),e.rect(r,n-l,i,l).fill(),e.rect(r-s,n-l,s,a+l+u).fill(),e.rect(r+i,n-l,c,a+l+u).fill(),e.rect(r,n+a,i,u).fill()},rAt=(e,t)=>{if(!t.box)return;const{left:r,top:n,width:i,height:a}=t.box,{marginLeft:s=0,marginTop:l=0,marginRight:c=0,marginBottom:u=0}=t.box,d=Math.round(i+s+c),f=Math.round(a+l+u);e.fontSize(6).opacity(1).fillColor("black").text(`${d} x ${f}`,r-s,Math.max(n-l-4,1),{width:1/0})},nAt=(e,t)=>{t.origin&&e.circle(t.origin.left,t.origin.top,3).fill("red").circle(t.origin.left,t.origin.top,5).stroke("red")},iAt=(e,t)=>{t.props&&(!("debug"in t.props)||!t.props.debug||(e.save(),Xgt(e,t),eAt(e,t),tAt(e,t),rAt(e,t),nAt(e,t),e.restore()))},aAt=["dash","clip","save","path","fill","font","text","rect","scale","moveTo","lineTo","stroke","rotate","circle","lineCap","opacity","ellipse","polygon","restore","lineJoin","fontSize","fillColor","lineWidth","translate","miterLimit","strokeColor","fillOpacity","roundedRect","fillAndStroke","strokeOpacity","bezierCurveTo","quadraticCurveTo","linearGradient","radialGradient"],sAt=e=>{const t=aAt.reduce((r,n)=>({...r,[n]:(...i)=>(e[n](...i),t)}),{});return t},oAt=(e,t)=>{if(!t.box)return;const{top:r,left:n,width:i,height:a}=t.box,s=t.box.paddingTop||0,l=t.box.paddingLeft||0,c=t.box.paddingRight||0,u=t.box.paddingBottom||0,d=i-l-c,f=a-s-u;(!d||!f)&&console.warn("Canvas element has null width or height. Please provide valid values via the `style` prop in order to correctly render it."),e.save().translate(n+l,r+s),t.props.paint&&t.props.paint(sAt(e),d,f),e.restore()},Di=4*((Math.sqrt(2)-1)/3),lAt=(e,t,r,n,i)=>{const{top:a,left:s,width:l,height:c}=t,{borderTopWidth:u,borderRightWidth:d,borderLeftWidth:f}=r;e.moveTo(s+i,a),e.lineTo(s+l-n,a);const m=n*(1-Di);e.bezierCurveTo(s+l-m,a,s+l,a+m,s+l,a+n);const g=a+Math.max(u,n);e.lineTo(s+l,g),e.lineTo(s+l-d,g);const A=Math.max(n-d,0),v=Math.max(n-u,0),b=A*(1-Di),E=v*(1-Di);e.bezierCurveTo(s+l-d,a+u+E,s+l-d-b,a+u,s+l-d-A,a+u),e.lineTo(s+Math.max(i,f),a+u);const I=Math.max(i-f,0),S=Math.max(i-u,0),_=I*(1-Di),B=S*(1-Di),T=a+Math.max(u,i);e.bezierCurveTo(s+f+_,a+u,s+f,a+u+B,s+f,T),e.lineTo(s,T),e.lineTo(s,a+i);const P=i*(1-Di);if(e.bezierCurveTo(s,a+P,s+P,a,s+i,a),e.closePath(),e.clip(),d){const O=-u/d;e.moveTo(s+l/2,O*(-l/2)+a),e.lineTo(s+l,a),e.lineTo(s,a),e.lineTo(s,a+c),e.closePath(),e.clip()}if(f){const O=-u/f;e.moveTo(s+l/2,O*(-l/2)+a),e.lineTo(s,a),e.lineTo(s+l,a),e.lineTo(s+l,a+c),e.closePath(),e.clip()}},cAt=(e,t,r,n,i)=>{const{top:a,left:s,width:l}=t,{borderTopColor:c,borderTopWidth:u,borderTopStyle:d,borderRightWidth:f,borderLeftWidth:m}=r,g=i*(1-Di),A=n*(1-Di);e.moveTo(s,a+Math.max(i,u)),e.bezierCurveTo(s,a+g,s+g,a,s+i,a),e.lineTo(s+l-n,a),e.bezierCurveTo(s+l-A,a,s+l,a+A,s+l,a+n),e.strokeColor(c),e.lineWidth(Math.max(f,u,m)*2),d==="dashed"?e.dash(u*2,{space:u*1.2}):d==="dotted"&&e.dash(u,{space:u*1.2}),e.stroke(),e.undash()},uAt=(e,t,r,n,i)=>{const{top:a,left:s,width:l,height:c}=t,{borderTopWidth:u,borderRightWidth:d,borderBottomWidth:f}=r;e.moveTo(s+l,a+n),e.lineTo(s+l,a+c-i);const m=i*(1-Di);e.bezierCurveTo(s+l,a+c-m,s+l-m,a+c,s+l-i,a+c);const g=s+l-Math.max(d,i);e.lineTo(g,a+c),e.lineTo(g,a+c-f);const A=Math.max(i-d,0),v=Math.max(i-f,0),b=A*(1-Di),E=v*(1-Di);e.bezierCurveTo(s+l-d-b,a+c-f,s+l-d,a+c-f-E,s+l-d,a+c-Math.max(i,f)),e.lineTo(s+l-d,a+Math.max(n,u));const I=Math.max(n-d,0),S=Math.max(n-u,0),_=I*(1-Di),B=S*(1-Di),T=s+l-Math.max(n,d);e.bezierCurveTo(s+l-d,a+u+B,s+l-d-_,a+u,T,a+u),e.lineTo(T,a),e.lineTo(s+l-n,a);const P=n*(1-Di);if(e.bezierCurveTo(s+l-P,a,s+l,a+P,s+l,a+n),e.closePath(),e.clip(),u){const O=-u/d;e.moveTo(s+l/2,O*(-l/2)+a),e.lineTo(s+l,a),e.lineTo(s+l,a+c),e.lineTo(s,a+c),e.closePath(),e.clip()}if(f){const O=f/d;e.moveTo(s+l/2,O*(-l/2)+a+c),e.lineTo(s+l,a+c),e.lineTo(s+l,a),e.lineTo(s,a),e.closePath(),e.clip()}},dAt=(e,t,r,n,i)=>{const{top:a,left:s,width:l,height:c}=t,{borderRightColor:u,borderRightStyle:d,borderRightWidth:f,borderTopWidth:m,borderBottomWidth:g}=r,A=i*(1-Di),v=n*(1-Di);e.moveTo(s+l-n,a),e.bezierCurveTo(s+l-v,a,s+l,a+v,s+l,a+n),e.lineTo(s+l,a+c-i),e.bezierCurveTo(s+l,a+c-A,s+l-A,a+c,s+l-i,a+c),e.strokeColor(u),e.lineWidth(Math.max(f,m,g)*2),d==="dashed"?e.dash(f*2,{space:f*1.2}):d==="dotted"&&e.dash(f,{space:f*1.2}),e.stroke(),e.undash()},fAt=(e,t,r,n,i)=>{const{top:a,left:s,width:l,height:c}=t,{borderBottomWidth:u,borderRightWidth:d,borderLeftWidth:f}=r;e.moveTo(s+l-i,a+c),e.lineTo(s+n,a+c);const m=n*(1-Di);e.bezierCurveTo(s+m,a+c,s,a+c-m,s,a+c-n);const g=a+c-Math.max(u,n);e.lineTo(s,g),e.lineTo(s+f,g);const A=Math.max(n-f,0),v=Math.max(n-u,0),b=A*(1-Di),E=v*(1-Di);e.bezierCurveTo(s+f,a+c-u-E,s+f+b,a+c-u,s+f+A,a+c-u),e.lineTo(s+l-Math.max(i,d),a+c-u);const I=Math.max(i-d,0),S=Math.max(i-u,0),_=I*(1-Di),B=S*(1-Di),T=a+c-Math.max(u,i);e.bezierCurveTo(s+l-d-_,a+c-u,s+l-d,a+c-u-B,s+l-d,T),e.lineTo(s+l,T),e.lineTo(s+l,a+c-i);const P=i*(1-Di);if(e.bezierCurveTo(s+l,a+c-P,s+l-P,a+c,s+l-i,a+c),e.closePath(),e.clip(),d){const O=u/d;e.moveTo(s+l/2,O*(-l/2)+a+c),e.lineTo(s+l,a+c),e.lineTo(s,a+c),e.lineTo(s,a),e.closePath(),e.clip()}if(f){const O=-u/f;e.moveTo(s+l/2,O*(l/2)+a+c),e.lineTo(s,a+c),e.lineTo(s+l,a+c),e.lineTo(s+l,a),e.closePath(),e.clip()}},hAt=(e,t,r,n,i)=>{const{top:a,left:s,width:l,height:c}=t,{borderBottomColor:u,borderBottomStyle:d,borderBottomWidth:f,borderRightWidth:m,borderLeftWidth:g}=r,A=n*(1-Di),v=i*(1-Di);e.moveTo(s+l,a+c-i),e.bezierCurveTo(s+l,a+c-v,s+l-v,a+c,s+l-i,a+c),e.lineTo(s+n,a+c),e.bezierCurveTo(s+A,a+c,s,a+c-A,s,a+c-n),e.strokeColor(u),e.lineWidth(Math.max(f,m,g)*2),d==="dashed"?e.dash(f*2,{space:f*1.2}):d==="dotted"&&e.dash(f,{space:f*1.2}),e.stroke(),e.undash()},mAt=(e,t,r,n,i)=>{const{top:a,left:s,width:l,height:c}=t,{borderTopWidth:u,borderLeftWidth:d,borderBottomWidth:f}=r;e.moveTo(s,a+c-n),e.lineTo(s,a+i);const m=i*(1-Di);e.bezierCurveTo(s,a+m,s+m,a,s+i,a);const g=s+Math.max(d,i);e.lineTo(g,a),e.lineTo(g,a+u);const A=Math.max(i-d,0),v=Math.max(i-u,0),b=A*(1-Di),E=v*(1-Di);e.bezierCurveTo(s+d+b,a+u,s+d,a+u+E,s+d,a+Math.max(i,u)),e.lineTo(s+d,a+c-Math.max(n,f));const I=Math.max(n-d,0),S=Math.max(n-f,0),_=I*(1-Di),B=S*(1-Di),T=s+Math.max(n,d);e.bezierCurveTo(s+d,a+c-f-B,s+d+_,a+c-f,T,a+c-f),e.lineTo(T,a+c),e.lineTo(s+n,a+c);const P=n*(1-Di);if(e.bezierCurveTo(s+P,a+c,s,a+c-P,s,a+c-n),e.closePath(),e.clip(),f){const O=-f/d;e.moveTo(s+l/2,O*(l/2)+a+c),e.lineTo(s,a+c),e.lineTo(s,a),e.lineTo(s+l,a),e.closePath(),e.clip()}if(f){const O=-u/d;e.moveTo(s+l/2,O*(-l/2)+a),e.lineTo(s,a),e.lineTo(s,a+c),e.lineTo(s+l,a+c),e.closePath(),e.clip()}},pAt=(e,t,r,n,i)=>{const{top:a,left:s,height:l}=t,{borderLeftColor:c,borderLeftStyle:u,borderLeftWidth:d,borderTopWidth:f,borderBottomWidth:m}=r,g=n*(1-Di),A=i*(1-Di);e.moveTo(s+n,a+l),e.bezierCurveTo(s+g,a+l,s,a+l-g,s,a+l-n),e.lineTo(s,a+i),e.bezierCurveTo(s,a+A,s+A,a,s+i,a),e.strokeColor(c),e.lineWidth(Math.max(d,f,m)*2),u==="dashed"?e.dash(d*2,{space:d*1.2}):u==="dotted"&&e.dash(d,{space:d*1.2}),e.stroke(),e.undash()},gAt=e=>e.box&&(e.box.borderTopWidth||e.box.borderRightWidth||e.box.borderBottomWidth||e.box.borderLeftWidth),AAt=(e,t)=>{if(!t.box||!gAt(t))return;const{width:r,height:n,borderTopWidth:i=0,borderLeftWidth:a=0,borderRightWidth:s=0,borderBottomWidth:l=0}=t.box,{opacity:c=1,borderTopColor:u="black",borderTopStyle:d="solid",borderLeftColor:f="black",borderLeftStyle:m="solid",borderRightColor:g="black",borderRightStyle:A="solid",borderBottomColor:v="black",borderBottomStyle:b="solid"}=t.style,E=t.style.borderTopLeftRadius||0,I=t.style.borderTopRightRadius||0,S=t.style.borderBottomLeftRadius||0,_=t.style.borderBottomRightRadius||0,B={borderTopColor:u,borderTopWidth:i,borderTopStyle:d,borderLeftColor:f,borderLeftWidth:a,borderLeftStyle:m,borderRightColor:g,borderRightWidth:s,borderRightStyle:A,borderBottomColor:v,borderBottomWidth:l,borderBottomStyle:b},T=Math.min(I,.5*r,.5*n),P=Math.min(E,.5*r,.5*n),O=Math.min(_,.5*r,.5*n),z=Math.min(S,.5*r,.5*n);e.save(),e.strokeOpacity(c),i&&(e.save(),lAt(e,t.box,B,T,P),cAt(e,t.box,B,T,P),e.restore()),s&&(e.save(),uAt(e,t.box,B,T,O),dAt(e,t.box,B,T,O),e.restore()),l&&(e.save(),fAt(e,t.box,B,z,O),hAt(e,t.box,B,z,O),e.restore()),a&&(e.save(),mAt(e,t.box,B,z,P),pAt(e,t.box,B,z,P),e.restore()),e.restore()},vAt=(e,t)=>{if(!t.box)return;const{top:r,left:n,width:i,height:a}=t.box,s=fM(t.style.backgroundColor),l=Qa(t.style?.opacity)?1:t.style.opacity,c=Math.min(s.opacity,l);e.fillOpacity(c).fillColor(s.value).rect(n,r,i,a).fill()},xAt=(e,t)=>{t.box&&t.style?.backgroundColor&&(e.save(),_B(e,t),vAt(e,t),e.restore())},RY=e=>typeof e=="string",yAt=e=>/^#.+/.test(e),FY=(e,t,r)=>{if(!r||!t.box)return;const n=yAt(r),i=n?"goTo":"link",a=n?r.slice(1):r,{top:s,left:l,width:c,height:u}=t.box;e[i](l,s,c,u,a)},bAt=(e,t)=>{const r=t.props||{};if("src"in r&&RY(r.src))return FY(e,t,r.src);if("href"in r&&RY(r.href))return FY(e,t,r.href)},wAt=(e,t)=>{t.box&&t.props&&"id"in t.props&&e.addNamedDestination(t.props.id,"XYZ",null,t.box.top,null)},hM=e=>{const t={...e};return Object.entries(t).forEach(r=>{r[1]||delete t[r[0]]}),t},mM=e=>({required:e.props?.required||!1,noExport:e.props?.noExport||!1,readOnly:e.props?.readOnly||!1,value:e.props?.value||void 0,defaultValue:e.props?.defaultValue||void 0}),EAt=(e,t)=>hM({...mM(e),parent:t||void 0,align:e.props?.align||"left",multiline:e.props?.multiline||void 0,password:e.props?.password||!1,noSpell:e.props?.noSpell||!1,format:e.props?.format||void 0,fontSize:e.props?.fontSize||void 0,MaxLen:e.props?.maxLength||void 0}),$Ae=e=>hM({...mM(e),sort:e.props?.sort||!1,edit:e.props?.edit||!1,multiSelect:e.props?.multiSelect||!1,noSpell:e.props?.noSpell||!1,select:e.props?.select||[""]}),MY=(e,t,r,n)=>{const i=e.ref({Type:"XObject",Subtype:"Form",BBox:[0,0,r,n],Resources:{ProcSet:["PDF","Text","ImageB","ImageC","ImageI"],Font:{ZaDi:e._acroform.fonts.ZaDi}}});return i.initDeflate(),i.write(`/Tx BMC q /ZaDi ${n*.8} Tf BT ${r*.45} ${n/4} Td (${t}) Tj ET Q EMC`),i.end(null),i},CAt=(e,t,r)=>{const{width:n,height:i}=t.box||{},a=t.props?.onState||"Yes",s=t.props?.offState||"Off",l=t.props?.xMark||!1;if(!Object.prototype.hasOwnProperty.call(e._acroform.fonts,"ZaDi")){const u=e.ref({Type:"Font",Subtype:"Type1",BaseFont:"ZapfDingbats"});e._acroform.fonts.ZaDi=u,u.end(null)}const c={[a]:MY(e,l?"8":"4",n,i),[s]:MY(e,l?" ":"8",n,i)};return hM({...mM(t),backgroundColor:t.props?.backgroundColor||void 0,borderColor:t.props?.borderColor||void 0,parent:r||void 0,value:`/${t.props?.checked===!0?a:s}`,defaultValue:`/${t.props?.checked===!0?a:s}`,AS:t.props?.checked===!0?a:s,AP:{N:c,D:c}})},IAt=(e,t,r)=>{if(!t.box)return;const{top:n,left:i,width:a,height:s}=t.box,l=t.props?.name||"",c=r.fieldSets?.at(0);e._root.data.AcroForm||e.initForm(),e.formText(l,i,n,a,s,EAt(t,c))},SAt=(e,t)=>{if(!t.box)return;const{top:r,left:n,width:i,height:a}=t.box,s=t.props?.name||"";e._root.data.AcroForm||e.initForm(),e.formCombo(s,n,r,i,a,$Ae(t))},BAt=(e,t,r)=>{const n=t.props?.name||"";e._root.data.AcroForm||e.initForm();const i=e.formField(n),a=r;a.fieldSets?a.fieldSets.push(i):a.fieldSets=[i]},NAt=(e,t,r)=>{r.fieldSets.pop()},kAt=(e,t)=>{if(!t.box)return;const{top:r,left:n,width:i,height:a}=t.box||{},s="name"in t.props&&t.props.name||"";e._root.data.AcroForm||e.initForm(),e.formList(s,n,r,i,a,$Ae(t))},_At=(e,t,r)=>{if(!t.box)return;const{top:n,left:i,width:a,height:s}=t.box,l=t.props?.name||"",c=r.fieldSets?.at(0);e._root.data.AcroForm||e.initForm(),e.formCheckbox(l,i,n,a,s,CAt(e,t,c))},jAt=e=>e.type!==yr&&e.type!==_g,DAt=(e,t,r)=>{e.save(),t.box&&e.translate(t.box.left,t.box.top);const n=t.children||[],i=a=>zAe(e,a,r);n.forEach(i),e.restore()},TAt={[yr]:Lgt,[ZR]:$gt,[$1]:Vgt,[Phe]:BAt,[_Je]:IAt,[jJe]:SAt,[DJe]:_At,[TJe]:kAt,[XR]:oAt,[_g]:_gt,[VR]:bAt},PAt={[Phe]:NAt},zAe=(e,t,r)=>{const n=t.style?.overflow==="hidden",i=jAt(t);t.type===YR&&Ugt(e,t),e.save(),n&&_B(e,t),OAe(e,t),xAt(e,t),AAt(e,t);const a=TAt[t.type];a&&a(e,t,r),i&&DAt(e,t,r);const s=PAt[t.type];s&&s(e,t,r),wAt(e,t),iAt(e,t),e.restore()},HAe=(e,t,r,n)=>{if(t.box&&t.props){if("bookmark"in t.props&&t.props.bookmark){const i=t.props.bookmark,{title:a,parent:s,expanded:l,zoom:c,fit:u}=i,d=n[s]||e.outline,f=i.top||t.box.top,m=i.left||t.box.left,g=d.addItem(a,{pageNumber:r,expanded:l,top:f,left:m,zoom:c,fit:u});n[i.ref]=g}t.children&&t.children.forEach(i=>HAe(e,i,r,n))}},OAt=(e,t)=>{const r={};(t.children||[]).forEach((i,a)=>{HAe(e,i,a,r)})},RAt=(e,t)=>{const r=t.children||[],n={imageCache:new Map,fieldSets:[]};return r.forEach(i=>zAe(e,i,n)),OAt(e,t),e.end(),e};var Gj,QY;function FAt(){if(QY)return Gj;QY=1;function e(a){this.value=a,this.match=function(s){return this.value>=s.height}}function t(a){this.value=a,this.match=function(s){return this.value=s.width}}function n(a){this.value=a,this.match=function(s){return this.value0;){var A=f.shift();if(A.type==="number"||A.type==="literal"){m.push(A);continue}if(A.type==="operator"){if(a.test(A.value)){A={type:"query",key:m.pop(),value:f.shift()},m.push(A);continue}for(;g.length>0;)m.unshift(g.pop());g.push(A)}}for(;g.length>0;)m.unshift(g.pop());function v(){var b=m.shift();if(b.type==="number")return parseInt(b.value);if(b.type==="literal")return b.value;if(b.type==="operator"){var E=v(),I=v();return t(b.value,E,I)}if(b.type==="query"){var E=b.key.value,I=b.value.value;return e(E,I)}}return v()}return Kj={parse:function(f){var m=u(f),g=d(m);return g}},Kj}var Vj,$Y;function LAt(){if($Y)return Vj;$Y=1;var e=QAt();return Vj=function(t,r){var n={};return Object.keys(t).forEach(function(i){e.parse(i).match(r)&&Object.assign(n,t[i])}),n},Vj}var UAt=LAt();const $At=hi(UAt);var Yj,zY;function zAt(){if(zY)return Yj;zY=1;var e=function(t,r,n){if(t==null)return[0,0,0];var i=(1-Math.abs(2*n-1))*r,a=t/60,s=i*(1-Math.abs(a%2-1));a=Math.floor(a);var l,c,u;a===0?(l=i,c=s,u=0):a===1?(l=s,c=i,u=0):a===2?(l=0,c=i,u=s):a===3?(l=0,c=s,u=i):a===4?(l=s,c=0,u=i):a===5&&(l=i,c=0,u=s);var d=n-i/2;return l+=d,c+=d,u+=d,[Math.abs(Math.round(l*255)),Math.abs(Math.round(c*255)),Math.abs(Math.round(u*255))]};return Yj=e,Yj}var Zj,HY;function HAt(){if(HY)return Zj;HY=1;var e=zAt();function t(a,s){return a>s?s:a}function r(a,s){return a359;)a-=360;return a}function i(a,s,l){a=n(a),s=r(t(s,100),0),l=r(t(l,100),0),s/=100,l/=100;var c=e(a,s,l);return"#"+c.map(function(u){return(256+u).toString(16).substr(-2)}).join("")}return Zj=i,Zj}var WAt=HAt();const GAt=hi(WAt);var Jj,WY;function qAt(){if(WY)return Jj;WY=1;var e=40,t=41,r=39,n=34,i=92,a=47,s=44,l=58,c=42,u=117,d=85,f=43,m=/^[a-f0-9?-]+$/i;return Jj=function(g){for(var A=[],v=g,b,E,I,S,_,B,T,P,O=0,z=v.charCodeAt(O),L=v.length,W=[{nodes:A}],R=0,$,X="",Z="",K="";O=48&&c<=57)return!0;var u=s.charCodeAt(2);return c===r&&u>=48&&u<=57}return l===r?(c=s.charCodeAt(1),c>=48&&c<=57):l>=48&&l<=57}return Xj=function(s){var l=0,c=s.length,u,d,f;if(c===0||!a(s))return!1;for(u=s.charCodeAt(l),(u===t||u===e)&&l++;l57));)l+=1;if(u=s.charCodeAt(l),d=s.charCodeAt(l+1),u===r&&d>=48&&d<=57)for(l+=2;l57));)l+=1;if(u=s.charCodeAt(l),d=s.charCodeAt(l+1),f=s.charCodeAt(l+2),(u===n||u===i)&&(d>=48&&d<=57||(d===t||d===e)&&f>=48&&f<=57))for(l+=d===t||d===e?3:2;l57));)l+=1;return{number:s.slice(0,l),unit:s.slice(l)}},Xj}var ZAt=YAt();const JAt=hi(ZAt),XAt=e=>e.filter(Boolean),e1t=e=>e.reduce((t,r)=>{const n=Array.isArray(r)?pM(r):r;return Object.keys(n).forEach(i=>{n[i]!==null&&n[i]!==void 0&&(t[i]=n[i])}),t},{}),pM=Zc(e1t,XAt,NB),t1t=(e,t)=>Object.keys(t).reduce((r,n)=>/@media/.test(n)?{...r,...$At({[n]:t[n]},e)}:{...r,[n]:t[n]},{}),r1t=e=>/rgba?/g.test(e),n1t=e=>/hsla?/g.test(e),i1t=e=>{const t=Tb.get.rgb(e);return Tb.to.hex(t)},a1t=e=>{const t=Tb.get.hsl(e).map(Math.round);return GAt(...t).toUpperCase()},P2=e=>r1t(e)?i1t(e):n1t(e)?a1t(e):e,s1t=e=>{if(typeof e=="number")return{value:e,unit:void 0};const t=/^(-?\d*\.?\d+)(in|mm|cm|pt|vh|vw|px|rem)?$/g.exec(e);return t?{value:parseFloat(t[1]),unit:t[2]||"pt"}:{value:e,unit:void 0}},il=(e,t)=>{const r=s1t(t),n=72,i=e.dpi||72,a=1/25.4*n,s=1/2.54*n;if(typeof r.value!="number")return r.value;switch(r.unit){case"rem":return r.value*(e.remBase||18);case"in":return r.value*n;case"mm":return r.value*a;case"cm":return r.value*s;case"vh":return r.value*(e.height/100);case"vw":return r.value*(e.width/100);case"px":return Math.round(r.value*(n/i));default:return r.value}},gg=(e,t)=>({[e]:Ps(t)}),Xa=(e,t,r)=>({[e]:il(r,t)}),om=(e,t)=>({[e]:P2(t)}),Ai=(e,t)=>({[e]:t}),o1t=/(-?\d+(\.\d+)?(in|mm|cm|pt|vw|vh|px|rem)?)\s(\S+)\s(.+)/,l1t=e=>e.match(o1t)||[],Wh=(e,t,r)=>{const n=l1t(`${t}`);if(n){const i=n[1]||t,a=n[4]||t,s=n[5]||t,l=a,c=s?P2(s):void 0,u=i?il(r,i):void 0;if(e.match(/(Top|Right|Bottom|Left)$/))return{[`${e}Color`]:c,[`${e}Style`]:l,[`${e}Width`]:u};if(e.match(/Color$/))return{borderTopColor:c,borderRightColor:c,borderBottomColor:c,borderLeftColor:c};if(e.match(/Style$/)){if(typeof l=="number")throw new Error(`Invalid border style: ${l}`);return{borderTopStyle:l,borderRightStyle:l,borderBottomStyle:l,borderLeftStyle:l}}if(e.match(/Width$/)){if(typeof u!="number")throw new Error(`Invalid border width: ${u}`);return{borderTopWidth:u,borderRightWidth:u,borderBottomWidth:u,borderLeftWidth:u}}if(e.match(/Radius$/)){const d=t?il(r,t):void 0;if(typeof d!="number")throw new Error(`Invalid border radius: ${d}`);return{borderTopLeftRadius:d,borderTopRightRadius:d,borderBottomRightRadius:d,borderBottomLeftRadius:d}}if(typeof u!="number")throw new Error(`Invalid border width: ${u}`);if(typeof l=="number")throw new Error(`Invalid border style: ${l}`);return{borderTopColor:c,borderTopStyle:l,borderTopWidth:u,borderRightColor:c,borderRightStyle:l,borderRightWidth:u,borderBottomColor:c,borderBottomStyle:l,borderBottomWidth:u,borderLeftColor:c,borderLeftStyle:l,borderLeftWidth:u}}return{[e]:t}},c1t={border:Wh,borderBottom:Wh,borderBottomColor:om,borderBottomLeftRadius:Xa,borderBottomRightRadius:Xa,borderBottomStyle:Ai,borderBottomWidth:Xa,borderColor:Wh,borderLeft:Wh,borderLeftColor:om,borderLeftStyle:Ai,borderLeftWidth:Xa,borderRadius:Wh,borderRight:Wh,borderRightColor:om,borderRightStyle:Ai,borderRightWidth:Xa,borderStyle:Wh,borderTop:Wh,borderTopColor:om,borderTopLeftRadius:Xa,borderTopRightRadius:Xa,borderTopStyle:Ai,borderTopWidth:Xa,borderWidth:Wh},u1t={backgroundColor:om,color:om,opacity:gg},d1t={height:Xa,maxHeight:Xa,maxWidth:Xa,minHeight:Xa,minWidth:Xa,width:Xa},f1t=[1,1,0],h1t=[1,1,"auto"],m1t=(e,t,r)=>{let n=f1t,i=[];t==="auto"?n=h1t:i=`${t}`.split(" ");const a=Ps(i[0]||n[0]),s=Ps(i[1]||n[1]),l=il(r,i[2]||n[2]);return{flexGrow:a,flexShrink:s,flexBasis:l}},p1t={alignContent:Ai,alignItems:Ai,alignSelf:Ai,flex:m1t,flexBasis:Xa,flexDirection:Ai,flexFlow:Ai,flexGrow:gg,flexShrink:gg,flexWrap:Ai,justifyContent:Ai,justifySelf:Ai},g1t=(e,t,r)=>{const n=`${t}`.split(" "),i=il(r,n?.[0]||t),a=il(r,n?.[1]||t);return{rowGap:i,columnGap:a}},A1t={gap:g1t,columnGap:Xa,rowGap:Xa},v1t={aspectRatio:gg,bottom:Xa,display:Ai,left:Xa,position:Ai,right:Xa,top:Xa,overflow:Ai,zIndex:gg},x1t="px,in,mm,cm,pt,%,vw,vh",e8=(e,t)=>{const r=e.toString();console.error(` @react-pdf/stylesheet parsing error: ${r}: ${t}, ${" ".repeat(r.length+2)}^ Unsupported ${r} value format `)},Og=({expandsTo:e,maxValues:t=1,autoSupported:r=!1}={})=>(n,i,a)=>{const s=VAt(`${i}`),l=[];for(let u=0;ut)return e8(n,i),{};const c=il(a,l[0]);if(e){const u=il(a,l[1]||l[0]),d=il(a,l[2]||l[0]),f=il(a,l[3]||l[1]||l[0]);return e({first:c,second:u,third:d,fourth:f})}return{[n]:c}},y1t=Og({expandsTo:({first:e,second:t,third:r,fourth:n})=>({marginTop:e,marginRight:t,marginBottom:r,marginLeft:n}),maxValues:4,autoSupported:!0}),b1t=Og({expandsTo:({first:e,second:t})=>({marginTop:e,marginBottom:t}),maxValues:2,autoSupported:!0}),w1t=Og({expandsTo:({first:e,second:t})=>({marginRight:e,marginLeft:t}),maxValues:2,autoSupported:!0}),eE=Og({autoSupported:!0}),E1t={margin:y1t,marginBottom:eE,marginHorizontal:w1t,marginLeft:eE,marginRight:eE,marginTop:eE,marginVertical:b1t},C1t=Og({expandsTo:({first:e,second:t,third:r,fourth:n})=>({paddingTop:e,paddingRight:t,paddingBottom:r,paddingLeft:n}),maxValues:4}),I1t=Og({expandsTo:({first:e,second:t})=>({paddingTop:e,paddingBottom:t}),maxValues:2}),S1t=Og({expandsTo:({first:e,second:t})=>({paddingRight:e,paddingLeft:t}),maxValues:2}),tE=Og(),B1t={padding:C1t,paddingBottom:tE,paddingHorizontal:S1t,paddingLeft:tE,paddingRight:tE,paddingTop:tE,paddingVertical:I1t},Xx=e=>{switch(e){case"top":case"left":return"0%";case"right":case"bottom":return"100%";case"center":return"50%";default:return e}},N1t=(e,t,r)=>{const n=`${t}`.split(" "),i=Xx(il(r,n?.[0]||t)),a=Xx(il(r,n?.[1]||t));return{objectPositionX:i,objectPositionY:a}},qY=(e,t,r)=>({[e]:Xx(il(r,t))}),k1t={objectPosition:N1t,objectPositionX:qY,objectPositionY:qY,objectFit:Ai},_1t=e=>typeof e=="number"?e:parseInt(e,10),t8={thin:100,hairline:100,ultralight:200,extralight:200,light:300,normal:400,medium:500,semibold:600,demibold:600,bold:700,ultrabold:800,extrabold:800,heavy:900,black:900},j1t=e=>{if(!e)return t8.normal;if(typeof e=="number")return e;const t=e.toLowerCase();return t8[t]?t8[t]:_1t(e)},D1t=(e,t)=>({[e]:j1t(t)}),T1t=(e,t,r)=>{if(e==="")return e;const n=il(r,t.fontSize||18),i=il(r,e),{percent:a}=sl(i)||{};return a?a*n:isNaN(e)?i:i*n},P1t=(e,t,r,n)=>({[e]:T1t(t,n,r)}),O1t={direction:Ai,fontFamily:Ai,fontSize:Xa,fontStyle:Ai,fontWeight:D1t,letterSpacing:Xa,lineHeight:P1t,maxLines:gg,textAlign:Ai,textDecoration:Ai,textDecorationColor:om,textDecorationStyle:Ai,textIndent:Ai,textOverflow:Ai,textTransform:Ai,verticalAlign:Ai},R1t=e=>typeof e=="string"&&/^-?\d*\.?\d*$/.test(e),QT=e=>typeof e!="string"?e:R1t(e)?parseFloat(e):e,F1t=e=>{const t=e.trim().split(/\)[ ,]|\)/);if(t.length===1)return[[t[0],!0]];const r=[];for(let n=0;n=0?",":" ",c=s.split(l).map(u=>u.trim());r.push({operation:a.trim(),value:c})}}return r},rE=e=>{const t=/(-?\d*\.?\d*)(\w*)?/i,[,r,n]=t.exec(e),i=Number.parseFloat(r);return n==="rad"?i*180/Math.PI:i},M1t=({operation:e,value:t})=>{switch(e){case"scale":{const[r,n=r]=t.map(i=>Number.parseFloat(i));return{operation:"scale",value:[r,n]}}case"scaleX":return{operation:"scale",value:[Number.parseFloat(t),1]};case"scaleY":return{operation:"scale",value:[1,Number.parseFloat(t)]};case"rotate":return{operation:"rotate",value:[rE(t)]};case"translate":return{operation:"translate",value:t.map(r=>Number.parseFloat(r))};case"translateX":return{operation:"translate",value:[Number.parseFloat(t),0]};case"translateY":return{operation:"translate",value:[0,Number.parseFloat(t)]};case"skew":return{operation:"skew",value:t.map(rE)};case"skewX":return{operation:"skew",value:[rE(t),0]};case"skewY":return{operation:"skew",value:[0,rE(t)]};default:return{operation:e,value:t.map(r=>Number.parseFloat(r))}}},Q1t=e=>e.map(t=>M1t(t)),KY=(e,t)=>typeof t!="string"?{[e]:t}:{[e]:Q1t(F1t(t))},VY={top:!0,bottom:!0},L1t=(e,t)=>VY[e]?1:VY[t]?-1:0,U1t=e=>!e||e.length===0?["center","center"]:(e.length===1?[e[0],"center"]:e).sort(L1t),$1t=(e,t,r)=>{const n=`${t}`.split(" "),i=U1t(n),a=il(r,i[0]),s=il(r,i[1]);return{transformOriginX:Xx(a)||QT(a),transformOriginY:Xx(s)||QT(s)}},YY=(e,t,r)=>{const n=il(r,t);return{[e]:Xx(n)||QT(n)}},z1t={transform:KY,gradientTransform:KY,transformOrigin:$1t,transformOriginX:YY,transformOriginY:YY},H1t={fill:om,stroke:om,strokeDasharray:Ai,strokeWidth:Xa,fillOpacity:gg,strokeOpacity:gg,fillRule:Ai,textAnchor:Ai,strokeLinecap:Ai,strokeLinejoin:Ai,visibility:Ai,clipPath:Ai,dominantBaseline:Ai},ZY={...c1t,...u1t,...d1t,...p1t,...A1t,...v1t,...E1t,...B1t,...k1t,...O1t,...z1t,...H1t},W1t=e=>t=>{const r=Object.keys(t),n={};for(let i=0;i{const r=n=>t1t(e,n);return Zc(W1t(e),r,pM)(t)};function gM(){var e=(function(t){var r={R:"13k,1a,2,3,3,2+1j,ch+16,a+1,5+2,2+n,5,a,4,6+16,4+3,h+1b,4mo,179q,2+9,2+11,2i9+7y,2+68,4,3+4,5+13,4+3,2+4k,3+29,8+cf,1t+7z,w+17,3+3m,1t+3z,16o1+5r,8+30,8+mc,29+1r,29+4v,75+73",EN:"1c+9,3d+1,6,187+9,513,4+5,7+9,sf+j,175h+9,qw+q,161f+1d,4xt+a,25i+9",ES:"17,2,6dp+1,f+1,av,16vr,mx+1,4o,2",ET:"z+2,3h+3,b+1,ym,3e+1,2o,p4+1,8,6u,7c,g6,1wc,1n9+4,30+1b,2n,6d,qhx+1,h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1,2,5,41+3,3+1,5,x+5,3+1,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2d+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,f0c+4,1o+6,t5,1s+3,2a,f5l+1,43t+2,i+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,gzhy+6n",AL:"16w,3,2,e+1b,z+2,2+2s,g+1,8+1,b+m,2+t,s+2i,c+e,4h+f,1d+1e,1bwe+dp,3+3z,x+c,2+1,35+3y,2rm+z,5+7,b+5,dt+l,c+u,17nl+27,1t+27,4x+6n,3+d",LRO:"6ct",RLO:"6cu",LRE:"6cq",RLE:"6cr",PDF:"6cs",LRI:"6ee",RLI:"6ef",FSI:"6eg",PDI:"6eh"},n={},i={};n.L=1,i[1]="L",Object.keys(r).forEach(function(Oe,it){n[Oe]=1<1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function v(Oe,it){var vt=36,mt=0,Qt=new Map,Ot=it&&new Map,Wt;return Oe.split(",").forEach(function Vt(xr){if(xr.indexOf("+")!==-1)for(var Ht=+xr;Ht--;)Vt(Wt);else{Wt=xr;var Yt=xr.split(">"),hr=Yt[0],pr=Yt[1];hr=String.fromCodePoint(mt+=parseInt(hr,vt)),pr=String.fromCodePoint(mt+=parseInt(pr,vt)),Qt.set(hr,pr),it&&Ot.set(pr,hr)}}),{map:Qt,reverseMap:Ot}}var b,E,I;function S(){if(!b){var Oe=v(A.pairs,!0),it=Oe.map,vt=Oe.reverseMap;b=it,E=vt,I=v(A.canonical,!1).map}}function _(Oe){return S(),b.get(Oe)||null}function B(Oe){return S(),E.get(Oe)||null}function T(Oe){return S(),I.get(Oe)||null}var P=n.L,O=n.R,z=n.EN,L=n.ES,W=n.ET,R=n.AN,$=n.CS,X=n.B,Z=n.S,K=n.ON,q=n.BN,Y=n.NSM,ne=n.AL,ge=n.LRO,ae=n.RLO,pe=n.LRE,_e=n.RLE,we=n.PDF,xe=n.LRI,Me=n.RLI,ye=n.FSI,Ee=n.PDI;function me(Oe,it){for(var vt=125,mt=new Uint32Array(Oe.length),Qt=0;Qt0)Ge--;else if(at>0){for(ie=0;!ve[ve.length-1]._isolate;)ve.pop();var be=ve[ve.length-1]._isolInitIndex;be!=null&&(xr.set(be,bt),xr.set(bt,be)),ve.pop(),at--}ce=ve[ve.length-1],Vt[bt]=ce._level,ce._override&&Wt(bt,ce._override)}else U&we?(Ge===0&&(ie>0?ie--:!ce._isolate&&ve.length>1&&(ve.pop(),ce=ve[ve.length-1])),Vt[bt]=ce._level):U&X&&(Vt[bt]=Yt.level);else Vt[bt]=ce._level,ce._override&&U!==q&&Wt(bt,ce._override)}for(var We=[],er=null,zt=Yt.start;zt<=Yt.end;zt++){var Te=mt[zt];if(!(Te&c)){var jt=Vt[zt],$r=Te&a,Br=Te===Ee;er&&jt===er._level?(er._end=zt,er._endsWithIsolInit=$r):We.push(er={_start:zt,_end:zt,_level:jt,_startsWithPDI:Br,_endsWithIsolInit:$r})}}for(var rr=[],Ne=0;Ne=0;Fo--)if(!(mt[Fo]&c)){ia=Vt[Fo];break}var $i=dn[dn.length-1],Kn=Vt[$i],Ua=Yt.level;if(!(mt[$i]&a)){for(var ss=$i+1;ss<=Yt.end;ss++)if(!(mt[ss]&c)){Ua=Vt[ss];break}}rr.push({_seqIndices:dn,_sosType:Math.max(ia,qi)%2?O:P,_eosType:Math.max(Ua,Kn)%2?O:P})}}for(var os=0;os=0;Wa--)if(!(mt[lr[Wa]]&c)){vo=mt[lr[Wa]];break}Wt(to,vo&(a|Ee)?K:vo)}}if(Ot.get(z))for(var ri=0;ri=-1;Na--){var le=Na===-1?eo:mt[lr[Na]];if(le&s){le===ne&&Wt(Us,R);break}}}if(Ot.get(ne))for(var ue=0;ue=0&&(xt=mt[lr[Tt]],!!(xt&c));Tt--);for(var nr=ze+1;nr=0&&mt[lr[jr]]&(W|c);jr--)Wt(lr[jr],z);for(Lt++;Lt=0&&mt[lr[pn]]&c;pn--)Wt(lr[pn],K);for(var Vr=fn+1;Vr=0;zi--){var Qo=ro[zi].char;if(Qo===$s||Qo===B(T(no))||_(T(Qo))===no){Mo.push([ro[zi].seqIndex,cs]),ro.length=zi;break}}}Mo.sort(function(Rn,ja){return Rn[0]-ja[0]})}for(var va=0;va=0;Lo--){var jc=lr[Lo];if(mt[jc]&ml){var Uo=mt[jc]&hl?O:P;Uo!==za?ka=Uo:ka=za;break}}}if(ka){if(mt[lr[Ul]]=mt[lr[io]]=ka,ka!==za){for(var aa=Ul+1;aa=0;xa--)if(mt[lr[xa]]&c)_a=xa;else{Ga=mt[lr[xa]]&hl?O:P;break}for(var zs=yi,ao=Cs+1;ao=0&&m(Oe[yo])&u;yo--)Vt[yo]=Yt.level}}return{levels:Vt,paragraphs:Ht};function ni(Rn,ja){for(var ya=Rn;ya=Vt&&m(Oe[Yt])&u;Yt--)Ht[Yt]=Wt.level;for(var hr=Wt.level,pr=1/0,de=0;dehr&&(hr=st),st=pr;gt--)for(var ve=0;ve=gt){for(var ce=ve;ve+1=gt;)ve++;ve>ce&&Ot.push([ce+Vt,ve+Vt])}}}),Ot}function Le(Oe,it,vt,mt){var Qt=Ye(Oe,it,vt,mt),Ot=[].concat(Oe);return Qt.forEach(function(Wt,Vt){Ot[Vt]=(it.levels[Wt]&1?Xe(Oe[Wt]):null)||Oe[Wt]}),Ot.join("")}function Ye(Oe,it,vt,mt){for(var Qt=he(Oe,it,vt,mt),Ot=[],Wt=0;Wt"&&(X(),$=!1):Z[0]==="<"&&(!r(Z[1])||Z[1]==="/")&&($=!0),$}}function i($){var X=!1;return function(Z,K){return X?!r(K[0])&&r(K[1])&&(Z(),X=!1):!r(K[0])&&K[1]===$&&(X=!0),X}}function a($,X){return function(){var Z="",K="";function q(){Z+=K,K=""}function Y(ne){return Z="",K="",ne}return function(ne,ge){K+=ne;var ae=$.reduce(function(pe,_e){return pe||_e(q,[ne,ge])},!1);if(!ae&&(r(ne)&&!r(ge)&&q(),!r(ne)&&r(ge))){if(K.length>=X)return Y([Z,K]);q()}if(ge==="")return(K.length1)for(var q=0,Y=1;Y-1;)q.push(K);return X[Z.toLocaleLowerCase().replace(/\-/g,"")]=q,X},{})}function u($){var X=0;function Z(){return $[X++]}return Z}function d($){var X=0,Z=$;function K(){if(Z=$.slice(X++),!(Z.length<3))return Z}function q(){return X===2}return[K,q]}function f($,Y,Z,K){for(var q=new Array($.length+1),Y=("."+Y+".").split(""),ne,ge,ae,pe,_e,we,xe=-1,Me,ye,Ee,me,Se=q.length;Se--;)q[Se]=0;for(Me=d(Y),ye=Me[0],Ee=Me[1];ne=ye();)for(xe++,Ee()&&xe--,ae=K,me=u(ne);(ge=me())&&(pe=ae[ge])!==void 0;){switch(ae={},_e=-1,Object.prototype.toString.call(pe)){case"[object Array]":ae=pe[0],_e=pe[1];break;case"[object Object]":ae=pe;break;case"[object Number]":_e=pe;break}if(!(_e<0)){Z[_e].splice||(Z[_e]=Z[_e].slice("")),we=Z[_e];for(var Ie=0;Ie>0,_e=L(X,_,v),we=L(X,S,A,z),xe=ne+pe;if(Y[xe]={},$[2]&&(Y[xe]=W($[2],ne),q=c($[2])),we&&we.length&&(Y[xe]=O(Y[xe],W(we,ne)),q=O(q,c(we))),K[xe]=O({},Y[xe]),Z&&!("Promise"in P))throw new Error("Failed to create hyphenator: Could not find global Promise object, needed for hyphenator to work in async mode");return function(Me,ye){ye=ye||{};var Ee=L(ye,B,ne),me=L(ye,T,pe)>>0,Se=L(ye,S,A,z),Ie=Ee+me;return!Y[Ie]&&$[2]&&(Y[Ie]=W($[2],Ee),K[Ie]=O(K[Ie],Y[Ie])),Se&&Se.length&&(Y[Ie]=O(Y[Ie],W(Se,Ee)),q=O(q,c(Se)),K[Ie]=O(K[Ie],Y[Ie])),m(Me,ge,ae,K[Ie],q,Ee,_e,me,Z)}}return R})})(wC)),wC.exports}var K1t=q1t();const V1t=hi(K1t);var EC={exports:{}},Y1t=EC.exports,XY;function Z1t(){return XY||(XY=1,(function(e){(function(t,r){e.exports?e.exports=r():t.hyphenationPatternsEnUs=r()})(Y1t,function(){return["0004,004,001,003,005,0005,00005,000005,0002,002,0000005,0003,00003,00505,00034,0001,00055,00004,4,05,0055,04,42,03,02,2,404,3,044,01,0505,55,5,045,041,0033,000004,22,00504,5504,0042,1,21,41,402,405,4004,43,23,000054,303,3005,022,5004,000003,252,45,25,2004,000505,054,403,401,3002,0025,144,432,00054,34,12,234,0022,014,0304,012,143,503,0403,101,052,414,212,011,043,00002,0041,0024,05005,03003,00102,0404,04303,01004,0034,025,0044,00404,00025,0103,042,0205,412,104,54,344,433,5005,253,055,0402,3004,0043,204,505,454,0000004,00303,04004,552,201,4005,0255,52,444,14,44,02004,033,05004,00045,00013,0021,0405,00044,0054,50055,000303,00001,304,0204,11,301,232,122,00305,504,000043,0104,00052,000045,50004,0023,00033,00032,00202,5003,202,0401,0000505,214,102,032,000161,004101,00501,00301,0036,0052,00023,006101,006,00401,000521,0014,0063,00012,000501,000006,000604,000601,005001,005005,0010305,00006,003012,003005,0003011,0061,013,000021,000022,000105,00211,00062,00051,000112,006013,000011,0200306,1021,0050001,003003,2102,305,000015,01030005,000035,001011,00021,16330001,0234,030006,5020001,000001,00016,0031,021,21431,002305,0350014,0000012,000063,00101,106,105,00435,00063,0300061,00041,100306,003602,023,0503,0010011,10003,1005,30011,00031,0001001,0000061,0030003,30305,001201,0301,5000101,500101,00015,000401,000065,000016,0000402,0500002,000205,030201,500301,00014,5001,000002,00030011,01034,0300006,030213,00400304,050001,05003,000311,0634,00061,0006,00000604,00050013,00213,0030001,100003,000033,30002,00003632,0003004,050003,0000021,006303,0000006,00005005,30451,03001,00231,00056,00011,6,001001,00500001,03005,503005,0000010001,1002,003001,001065,300001,32011,32,0000003,0213001,0500053,021005,10001,0000011,0001041,0020016,100032,50011,0606,5002,3001,03002,0015001,0102,00003001,000000033,0000001,300101,300015,0101003,00000101,0100501,0101,0010033,00000362,000014,0005001,031",'{".":{"a":{"c":{"h":0},"d":{"d":{"e":{"r":1}}},"f":{"t":2},"l":{"t":3},"m":{"a":{"t":4}},"n":{"c":4,"g":0,"i":{"m":5},"t":[{"e":3,"i":{"s":6}},0]},"r":{"s":4,"t":{"i":{"e":1},"y":1}},"s":{"c":3,"p":2,"s":2,"t":{"e":{"r":7}}},"t":{"o":{"m":6}},"u":{"d":2},"v":{"i":1},"w":{"n":0}},"b":{"a":{"g":1,"n":{"a":4},"s":{"e":0}},"e":{"r":[{"a":4},0],"s":{"m":3,"t":{"o":4}}},"r":{"i":8},"u":{"t":{"t":{"i":0}}}},"c":{"a":{"m":{"p":{"e":0}},"n":{"c":5},"p":{"a":{"b":6}},"r":{"o":{"l":5}},"t":1},"e":{"l":{"a":1}},"h":[{"i":{"l":{"l":{"i":7}}}},1],"i":[{"t":{"r":5}},9],"o":{"e":3,"r":[{"n":{"e":{"r":5}}},1],"n":{"g":{"r":5}}}},"d":{"e":{"m":{"o":{"i":1}},"o":3,"r":{"a":3,"i":[{"v":{"a":4}},3]},"s":{"c":0}},"i":{"c":{"t":{"i":{"o":10}}}},"o":{"t":1},"u":{"c":1,"m":{"b":6}},"r":{"i":{"v":67}}},"e":{"a":{"r":{"t":{"h":7}},"s":{"i":11}},"b":1,"e":{"r":0},"g":9,"l":{"d":4,"e":{"m":3}},"n":{"a":{"m":12},"g":3,"s":3},"q":{"u":{"i":{"t":13}}},"r":{"r":{"i":1}},"s":3,"u":[{"l":{"e":{"r":1}}},3],"y":{"e":5},"t":{"h":{"y":{"l":162}}},"v":[{"e":{"r":{"s":{"i":{"b":158}}}}},9]},"f":{"e":{"s":11},"o":{"r":{"m":{"e":{"r":5}}}}},"g":{"a":[{"s":{"o":{"m":163}}},9],"e":[{"n":{"t":14},"o":{"g":4,"m":{"e":1},"t":164}},9],"i":{"a":4,"b":1},"o":{"r":1}},"h":{"a":{"n":{"d":{"i":6},"k":5}},"e":[{"r":{"o":{"i":6,"e":3}},"s":11,"t":11,"m":{"o":165},"p":{"a":166}},9],"i":{"b":3,"e":{"r":3}},"o":{"n":{"e":{"y":5},"o":11},"v":5}},"i":{"d":{"l":1,"o":{"l":12}},"m":{"m":3,"p":{"i":{"n":4}}},"n":[{"c":{"i":3},"e":8,"k":9,"s":3,"u":{"t":167}},2],"r":{"r":4},"s":{"i":1}},"j":{"u":{"r":3}},"l":{"a":{"c":{"y":1},"m":1,"t":{"e":{"r":5},"h":6}},"e":[{"g":{"e":5},"n":0,"p":5,"v":15,"i":{"c":{"e":{"s":170}}}},9],"i":{"g":[{"a":5},1],"n":9,"o":3,"t":1}},"m":{"a":{"g":{"a":16},"l":{"o":5},"n":{"a":5},"r":{"t":{"i":5}}},"e":[{"r":{"c":11},"t":{"e":{"r":4},"a":{"l":{"a":0}}},"g":{"a":{"l":171}}},9],"i":{"s":[{"t":{"i":6},"e":{"r":{"s":173}}},15],"m":{"i":{"c":172}}},"o":{"n":{"e":11},"r":{"o":3}},"u":{"t":{"a":[{"b":6},4]}}},"n":{"i":{"c":1},"e":{"o":{"f":174}},"o":{"e":{"t":{"h":15}},"n":{"e":{"m":175}}}},"o":{"d":[{"d":5},9],"f":{"t":{"e":4}},"r":{"a":{"t":{"o":4}},"c":3,"d":2,"t":3},"s":[{"t":{"l":1}},3],"t":{"h":11},"u":{"t":11}},"p":{"e":{"d":{"a":{"l":5}},"t":{"e":4,"i":{"t":4}}},"i":{"e":1,"o":{"n":5},"t":9},"r":{"e":{"m":11,"a":{"m":15}}},"o":{"l":{"y":{"s":137}},"s":{"t":{"a":{"m":137}}}}},"r":{"a":{"c":1,"n":{"t":0},"t":{"i":{"o":{"n":{"a":7}}}},"v":{"e":{"n":{"o":176}}}},"e":{"e":[{"c":173},8],"m":{"i":{"t":4}},"s":[{"t":{"a":{"t":4}}},8]},"i":{"g":1,"t":{"u":5}},"o":{"q":1,"s":{"t":5},"w":{"d":5}},"u":{"d":1}},"s":{"c":{"i":{"e":11}},"e":{"l":{"f":6,"l":6},"n":9,"r":{"i":{"e":4}},"m":{"i":[{"c":0,"d":177,"p":36,"r":36,"s":178,"v":36},6]}},"h":9,"i":[{"n":{"g":17}},9],"t":[{"a":{"b":{"l":5}}},1],"y":9,"p":{"h":{"i":{"n":179}},"i":{"n":{"o":137}}}},"t":{"a":[{"p":{"e":{"s":{"t":{"r":180}}}}},1],"e":[{"n":{"a":{"n":5}},"l":{"e":{"g":{"r":3}}}},1],"h":9,"i":[{"l":0,"m":{"o":16},"n":{"g":17,"k":5}},9],"o":{"n":{"a":0},"p":[{"i":5,"o":{"g":170}},1],"u":{"s":5},"q":9},"r":{"i":{"b":{"u":{"t":6}}}}},"u":{"n":{"a":[{"t":{"t":144}},2],"c":{"e":3},"d":{"e":{"r":7}},"e":[{"r":{"r":181}},2],"k":4,"o":4,"u":3},"p":3,"r":{"e":11},"s":{"a":4}},"v":{"e":{"n":{"d":{"e":0}},"r":{"a":4}},"i":{"c":{"a":{"r":151}}}},"w":{"i":{"l":{"i":5}},"e":{"b":{"l":131}}},"y":{"e":1},"k":{"i":{"l":{"n":{"i":168}}},"o":{"r":{"t":{"e":169}}}}},"a":{"b":{".":18,"a":{"l":19,"n":19},"e":[{"r":{"d":4}},8],"i":{"a":5,"t":{"a":{"b":13}}},"l":{"a":{"t":4}},"o":{"l":{"i":{"z":20,"c":19}}},"r":[{"o":{"g":4}},18],"u":{"l":3}},"c":{"a":{"r":[{"d":4,"o":4},21],"b":{"l":24}},"e":{"o":{"u":19},"r":2},"h":{"e":{"t":19}},"i":[{"e":23,"n":2,"o":23},22],"r":{"o":{"b":4}},"t":{"i":{"f":5}},"u":{"l":3,"m":1}},"d":[{"d":{"i":{"n":1}},"e":{"r":{".":4}},"i":[{"a":23,"c":{"a":3},"e":{"r":0},"o":23,"t":23,"u":19},25],"l":{"e":1},"o":{"w":3},"r":{"a":{"n":4}},"s":{"u":1},"u":[{"c":23,"m":4},18]},24],"e":{"r":[{"i":{"e":17}},1]},"f":[{"f":[{"i":{"s":{"h":170}}},0]},24],"g":{"a":{"b":21,"n":0},"e":{"l":{"l":4},"o":0,"u":18},"i":2,"l":26,"n":2,"o":[{"g":27,"n":{"i":3}},24],"u":{"e":{"r":19},"l":4},"y":21},"h":{"a":23,"e":23,"l":1,"o":23},"i":[{"a":19,"c":{".":23},"l":{"y":4},"n":[{"i":{"n":5},"o":5},28],"t":{"e":{"n":5}}},9],"j":29,"k":{"e":{"n":2}},"l":{"a":{"b":4,"d":3,"r":21},"d":{"i":18},"e":[{"n":{"d":3,"t":{"i":21}},"o":30},25],"i":[{"a":{".":1},"e":0},2],"l":{"e":{"v":4},"i":{"c":18}},"m":18,"o":{"g":{".":19}},"y":{".":21,"s":[{"t":31},18],"t":32,"z":27}},"m":{"a":[{"b":4,"g":3,"r":{"a":5},"s":{"c":4},"t":{"i":{"s":21},"o":33}},18],"e":{"r":{"a":4},"n":{"t":{"a":{"b":182}}}},"i":{"c":3,"f":4,"l":{"y":4},"n":[{"o":0},2]},"o":[{"n":19,"r":{"i":6}},24],"p":{"e":{"n":5}}},"n":[{"a":{"g":{"e":3},"l":{"y":[{"s":183},27]},"r":[{"c":3,"i":17},23],"t":{"i":23}},"d":[{"e":{"s":17},"i":{"s":3},"l":2,"o":{"w":1}},18],"e":{"e":19,"n":23,"s":{"t":{".":4}},"u":23},"g":[{"i":{"e":5},"l":2},25],"i":{"c":34,"e":{"s":23},"f":35,"m":{"e":1,"i":19},"n":{"e":19},"o":3,"p":23,"s":{"h":3},"t":3,"u":23},"k":{"l":{"i":1}},"n":{"i":{"z":32}},"o":[{"t":[{"h":7},4],"a":{"c":148}},0],"s":{"a":9,"c":{"o":1},"n":1,"p":[{"o":11},9],"t":1,"u":{"r":1},"g":{"r":5},"v":11},"t":{"a":{"l":36},"i":{"e":1,"d":137,"n":184,"r":{"e":137}},"o":18,"r":9,"w":1},"u":{"a":3,"l":3,"r":19}},24],"o":18,"p":{"a":{"r":17,"t":4},"e":{"r":{"o":4},"a":{"b":{"l":{"e":132}}}},"h":{"e":{"r":23},"i":18},"i":{"l":{"l":{"a":[{"r":4},21]}},"n":3,"t":{"a":3,"u":23}},"l":24,"o":{"c":6,"l":{"a":4},"r":{"i":6},"s":{"t":12}},"s":{"e":{"s":5}},"u":23},"q":{"u":{"e":6}},"r":[{"a":{"c":{"t":3},"d":{"e":19,"i":{"s":4}},"l":3,"m":{"e":{"t":{"e":19}}},"n":{"g":17},"p":11,"t":[{"i":{"o":19,"v":4}},1],"u":19,"v":38,"w":17},"b":{"a":{"l":36}},"c":{"h":{"a":{"n":1},"e":{"t":185}}},"d":{"i":{"n":{"e":4}},"r":1},"e":{"a":{"s":4},"e":23,"n":{"t":3},"s":{"s":19}},"f":{"i":1,"l":1},"i":[{"a":{"l":4,"n":3},"e":{"t":23},"m":1,"n":{"a":{"t":4}},"o":3,"z":9},2],"m":{"i":9},"o":{"d":20,"n":{"i":19},"o":23},"p":9,"q":3,"r":{"e":17,"a":{"n":{"g":{"e":9}}}},"s":{"a":1,"h":9}},37],"s":{".":18,"a":{"b":1,"n":{"t":3}},"h":{"i":17},"i":{"a":{".":19},"b":23,"c":23,"t":39},"k":{"i":11},"l":1,"o":{"c":21},"p":{"h":4},"s":{"h":1},"t":{"e":{"n":3},"r":2},"u":{"r":{"a":6}},"y":{"m":{"p":{"t":{"o":{"t":4}}}}}},"t":{"a":[{"b":{"l":3},"c":4,"l":{"o":3},"p":4},24],"e":{"c":[{"h":4},5],"g":{"o":3},"n":{".":3},"r":{"a":3,"n":[{"a":19},6]},"s":{"t":3},"v":4},"h":[{"e":{"m":5,"n":19,"r":{"o":{"s":186}}},"o":[{"m":5},1]},18],"i":{".":18,"a":19,"b":20,"c":2,"f":3,"o":{"n":{"a":{"r":7}}},"t":{"u":3}},"o":{"g":21,"m":[{"i":{"z":4}},24],"p":21,"s":21},"r":[{"o":{"p":4}},29],"s":{"k":1},"t":{"a":{"g":1},"e":[{"s":{".":170}},4],"h":1},"u":[{"a":4,"e":4,"l":3,"r":{"a":3}},24],"y":24},"u":{"b":1,"g":{"h":[{"t":{"l":17}},12],"u":3},"l":[{"i":{"f":13}},40],"n":{"d":5},"r":3,"s":{"i":{"b":4}},"t":{"e":{"n":5},"h":2}},"v":{"a":[{"g":3,"n":19},24],"e":{"n":{"o":0},"r":{"a":3,"n":4,"y":4}},"i":[{"e":{"r":0},"g":3,"o":{"u":3}},2],"o":{"c":4,"r":29}},"w":{"a":{"y":27},"i":3,"l":{"y":1},"s":0},"x":{"i":{"c":1,"d":1}},"y":{"a":{"l":4},"e":0,"s":0},"z":{"i":{"e":{"r":0}},"z":{"i":5}}},"b":{"a":{".":32,"d":{"g":{"e":{"r":5}}},"g":{"e":1},"l":{"a":15},"n":{"d":{"a":{"g":5}},"e":0,"i":11},"r":{"b":{"i":7},"i":{"a":17},"o":{"n":{"i":{"e":187}}}},"s":{"s":{"i":0}},"t":[{"h":{"y":2}},41],"z":1,"c":{"k":{"e":{"r":{".":84}}}}},"b":[{"e":[{"r":23},24],"i":{"n":{"a":0},"t":0}},42],"d":43,"e":{".":18,"a":{"k":17,"t":12},"d":[{"a":3,"e":3,"i":3},44],"g":{"i":3,"u":4},"l":[{"i":2,"o":3},41],"m":45,"n":{"i":{"g":4},"u":4},"s":[{"p":3,"t":{"r":4}},46],"t":[{"i":{"z":5},"r":4,"w":3},27],"w":3,"y":{"o":4},"v":{"i":{"e":9}}},"f":25,"h":47,"i":{"b":9,"d":[{"i":{"f":167}},1],"e":[{"n":4,"r":1},27],"f":48,"l":[{"i":{"z":3},"l":{"a":{"b":8}}},41],"n":{"a":{"r":49},"d":0,"e":{"t":4}},"o":{"g":{"r":3},"u":4,"m":5,"r":{"b":2,"h":15}},"t":[{"i":{"o":50,"v":{"e":188}},"r":3,"u":{"a":51},"z":19},9]},"j":29,"k":1,"l":[{"a":{"t":{"h":7},"n":{"d":189}},"e":{".":21,"n":17,"s":{"p":32}},"i":{"s":23,"n":{"d":189}},"o":[{"n":{"d":190}},21],"u":{"n":{"t":17}}},52],"m":43,"n":[{"e":{"g":5}},47],"o":{"d":[{"i":11},27],"e":1,"l":{"i":{"c":11}},"m":{"b":{"i":0}},"n":{"a":[{"t":5},0]},"o":27,"r":{".":32,"a":43,"d":5,"e":32,"i":32,"n":{"o":191}},"s":53,"t":{"a":19,"h":6,"o":1,"u":{"l":192}},"u":{"n":{"d":54}}},"p":18,"r":{"i":{"t":18},"o":{"t":{"h":54}},"u":{"s":{"q":17}}},"s":[{"o":{"r":17}},55],"t":[{"l":1,"o":21,"r":23},25],"u":{"f":{"f":{"e":{"r":0}}},"g":{"a":1},"l":{"i":3},"m":{"i":17},"n":[{"t":{"i":17}},1],"r":{"e":3},"s":{"i":{"e":[{"r":193,"s":193},5]},"s":{"e":17,"i":{"n":{"g":17}}},"t":32},"t":{"a":18,"i":{"o":27},"o":19,"e":{"d":{".":8}},"t":{"e":{"d":0}}}},"v":29,"w":56,"y":{".":32,"s":0}},"c":{"a":[{"b":{"i":{"n":11},"l":2},"c":{"h":17},"d":{"e":{"n":4,"m":194}},"g":46,"h":57,"l":{"a":{"t":3},"l":{"a":0,"i":{"n":6}},"o":18},"n":{"d":5,"e":0,"i":{"c":0,"s":5,"z":11},"t":{"y":0},"y":17},"p":{"e":{"r":4}},"r":{"o":{"m":5}},"s":{"t":{"e":{"r":6},"i":{"g":5}},"y":18},"t":{"h":1,"i":{"v":18},"a":{"s":195}},"v":{"a":{"l":5}}},41],"c":[{"h":{"a":6},"i":{"a":0},"o":{"m":{"p":{"a":10}},"n":17,"u":{"t":12}}},23],"e":{".":25,"d":{".":18,"e":{"n":18}},"i":27,"l":{".":32,"l":27},"n":[{"c":27,"e":58,"i":18,"t":27},41],"p":27,"r":{"a":{"m":4}},"s":{"a":18,"s":{"i":[{"b":59},27]},"t":5},"t":[{"a":60},0],"w":0},"h":[{".":18,"a":{"b":61,"n":{"i":{"c":32,"s":20}}},"e":[{"a":{"p":54},"d":18,"l":{"o":5},"m":{"i":27},"n":{"e":4},"r":{".":3,"s":3}},8],"i":{"n":[{"e":{".":32,"s":{"s":4}},"i":32},62],"o":32,"t":27,"z":8,"e":{"v":{"o":6}}},"o":63,"t":{"i":1},"s":{".":18,"h":{"u":11}}},25],"i":[{"a":[{"b":64,"r":5},27],"c":4,"e":{"r":18},"f":{"i":{"c":{".":32}}},"i":18,"l":{"a":1,"i":27},"m":25,"n":[{"a":[{"t":27},21],"e":{"m":11},"g":[{".":19},29],"o":32,"q":8},25],"o":{"n":17},"p":{"e":18,"h":3,"i":{"c":18}},"s":{"t":{"a":18,"i":18}},"t":[{"i":{"z":11}},42],"z":32,"g":{"a":{"r":152}}},41],"k":[{"i":3},2],"l":[{"a":{"r":[{"a":{"t":{"i":{"o":19}}},"e":32},18]},"e":{"m":0,"a":{"r":0}},"i":{"c":18,"m":17},"y":0},65],"n":19,"o":[{"a":{"g":4},"e":8,"g":[{"r":1},25],"i":[{"n":{"c":3}},0],"l":{"i":5,"o":[{"r":11},32]},"m":{"e":{"r":5}},"n":{"a":0,"e":21,"g":11,"t":5},"p":{"a":3,"i":{"c":11},"l":1,"h":{"o":{"n":196}}},"r":{"b":18,"o":{"n":12}},"s":{"e":0},"v":[{"e":17},15],"w":{"a":5},"z":{"e":5,"i":4},"u":{"s":{"t":{"i":84}}}},41],"q":29,"r":{"a":{"s":{"t":6},"t":{".":32,"i":{"c":32}}},"e":{"a":{"t":11},"d":32,"t":{"a":47},"v":0},"i":[{"f":5,"n":21,"s":17,"t":{"i":[{"e":11},32]}},8],"o":{"p":{"l":0,"o":6},"s":{"e":17},"c":{"o":{"d":197}},"e":{"c":{"o":148}}},"u":{"d":0}},"s":66,"t":[{"a":{"b":0,"n":{"g":4,"t":19}},"e":[{"r":23},24],"i":{"c":{"u":21},"m":{"i":12}},"u":{"r":0},"w":21,"r":{"o":{"m":{"e":{"c":198}}}}},42],"u":{"d":5,"f":21,"i":[{"t":{"y":4}},21],"l":{"i":32,"t":{"i":{"s":0},"u":27}},"m":{"a":9,"e":23,"i":1},"n":27,"p":{"i":3,"y":4},"r":{"a":{"b":67,"n":{"c":{"e":199}}},"i":{"a":4}},"s":[{"s":{"i":17}},41],"t":[{"i":{"e":1,"v":56},"r":18},68]},"y":41,"z":{"e":0}},"d":{"a":[{".":32,"b":70,"c":{"h":17},"f":18,"g":25,"m":71,"n":{"g":11},"r":{"d":6,"k":6,"y":18},"t":[{"i":{"v":18},"o":18,"a":{"b":137}},27],"v":[{"e":5},53],"y":32,"l":{"o":{"n":{"e":48}}}},69],"b":29,"c":19,"d":[{"a":{"b":20},"i":{"b":94}},72],"e":{".":25,"a":{"f":6,"l":{"s":{".":1}}},"b":{"i":{"t":5},"o":{"n":1}},"c":{"a":{"n":36},"i":{"l":1},"o":{"m":4},"l":{"a":{"r":200},"i":{"n":{"a":64}}}},"d":42,"e":{".":18},"i":{"f":4},"l":{"i":{"e":17,"q":16},"o":4},"m":[{".":32,"i":{"c":[{".":5},27],"l":4},"o":{"n":{"s":1},"r":7,"s":9}},21],"n":[{"a":{"r":1},"o":3,"t":{"i":{"f":7}},"u":3},41],"p":[{"a":3,"i":17,"u":9},2],"q":23,"r":{"h":21,"m":32,"n":{"i":{"z":6}},"s":5},"s":[{".":24,"c":2,"o":64,"t":{"i":11,"r":3},"u":1,"i":{"c":11}},8],"t":[{"o":9,"i":{"c":9}},2],"v":[{"i":{"l":11}},2],"y":18,"f":{"i":{"n":{"i":{"t":{"i":201}}}}}},"f":43,"g":{"a":21,"e":{"t":73},"i":2,"y":24},"h":74,"i":{".":32,"a":[{"b":5},75],"c":{"a":{"m":1,"i":{"d":15}},"e":21,"t":27},"d":27,"e":{"n":76},"f":[{"f":{"r":{"a":5}}},29],"g":{"e":3},"l":{"a":{"t":{"o":1}}},"n":[{"a":41,"e":{".":27},"i":[{"z":4},32]},29],"o":[{"g":5},41],"p":{"l":1},"r":[{"e":[{"n":9,"r":9},2],"t":{"i":6}},8],"s":[{"i":32,"t":77},15],"t":{"i":24},"v":78,"m":{"e":{"t":{"h":{"y":141}}}}},"j":29,"k":79,"l":{"a":56,"e":{".":27,"d":27,"s":{".":27,"s":18},"a":{"d":42}},"o":48,"u":56,"y":25,"i":{"e":202}},"m":29,"n":80,"o":[{".":27,"d":{"e":4},"e":32,"f":57,"g":21,"l":{"a":1,"i":17,"o":{"r":4}},"m":{"i":{"z":5}},"n":{"a":{"t":3},"i":17},"o":{"d":11},"p":{"p":0},"r":21,"s":27,"u":{"t":56},"v":1,"x":27,"w":{"o":{"r":{"d":203}}}},41],"p":29,"r":[{"a":{"g":{"o":{"n":6}},"i":18},"e":[{"a":{"r":6},"n":[{"a":{"l":204}},32]},0],"i":{"b":0,"l":17,"f":{"t":{"a":189}},"p":{"l":{"e":{"g":205}}}},"o":{"p":0,"w":18,"m":{"e":{"d":206}}},"u":{"p":{"l":{"i":32}}},"y":18},41],"s":[{"p":1,"w":21,"y":21},81],"t":{"h":24,"a":{"b":23}},"u":[{"a":[{"l":{".":9}},82],"c":[{"a":29,"e":{"r":5},"t":{".":18,"s":18}},9],"e":{"l":4},"g":1,"l":{"e":23},"m":{"b":{"e":0}},"n":1,"p":[{"e":1},18],"o":{"p":{"o":{"l":207}}}},41],"v":29,"w":29,"y":[{"n":32,"s":{"e":1,"p":5}},24]},"e":{"a":{"b":72,"c":{"t":23},"d":[{"i":{"e":5}},15],"g":{"e":[{"r":4},1]},"l":[{"e":{"r":5},"o":{"u":11}},1],"m":{"e":{"r":11}},"n":{"d":19,"i":{"e":{"s":111}}},"r":{"a":11,"c":0,"e":{"s":5},"i":{"c":0,"l":0},"k":5,"t":[{"e":12},8]},"s":{"p":4,"s":23,"t":12},"t":[{"e":{"n":5},"h":{"i":12},"i":{"f":19},"u":83},9],"v":[{"e":{"n":11},"i":5,"o":5},9]},"b":[{"e":{"l":{".":21,"s":21},"n":21},"i":{"t":21},"r":23},42],"c":{"a":{"d":21,"n":{"c":6}},"c":{"a":6},"e":[{"s":{"s":{"a":4}}},29],"i":[{"b":21,"f":{"i":{"c":{"a":{"t":4}},"e":4},"y":4},"m":3,"t":[{"e":19},0]},9],"l":{"a":{"m":21},"u":{"s":21}},"o":{"l":24,"m":{"m":21,"p":{"e":21}},"n":{"c":21},"r":[{"a":3,"o":5},24]},"r":[{"e":{"m":21}},29],"t":{"a":{"n":1},"e":1},"u":[{"l":[{"a":3},21]},29],"h":{"a":{"s":23}}},"d":{"a":37,"d":61,"e":{"r":34,"s":0},"i":[{"a":23,"b":3,"c":{"a":3},"m":3,"t":2,"z":5},18],"o":[{"l":21,"n":84},18],"r":{"i":21},"u":{"l":[{"o":4,"i":{"n":{"g":2}}},21]},"g":{"l":15}},"e":{"c":9,"d":{"i":11},"f":9,"l":{"i":11,"y":1},"m":9,"n":{"a":1},"p":85,"s":[{"t":17},86],"t":{"y":1},"x":19},"f":[{"e":{"r":{"e":83}},"f":41,"i":{"c":[{"i":32},21],"l":17,"n":{"e":23,"i":{"t":{"e":20}}},"t":27},"o":{"r":{"e":{"s":6}}},"u":{"s":{"e":{".":21}}}},29],"g":{"a":{"l":18},"e":{"r":17},"i":{"b":4,"c":1,"n":{"g":4},"t":87},"n":4,"o":{".":21,"s":21},"u":{"l":2,"r":19},"y":32},"h":[{"e":{"r":17}},72],"i":[{"c":19,"d":4,"g":[{"l":4},8],"m":{"b":23},"n":{"f":23,"g":29,"s":{"t":19}},"r":{"d":0},"t":{"e":11,"h":3,"y":19}},9],"j":[{"u":{"d":[{"i":4},21]}},29],"k":{"i":{"n":0},"l":{"a":1}},"l":{"a":[{".":21,"c":21,"n":{"d":17},"t":{"i":{"v":4}},"w":21,"x":{"a":36}},29],"e":{"a":23,"b":{"r":{"a":4}},"c":32,"d":21,"g":{"a":3},"n":19,"r":34,"s":29},"f":9,"i":[{"b":{"e":23},"c":{".":33,"a":3},"e":{"r":23},"g":{"i":{"b":4}},"m":19,"n":{"g":83},"o":23,"s":[{"h":4},24],"v":88,"t":{"i":{"s":208}}},9],"l":{"a":[{"b":1},18],"o":17},"o":{"c":19,"g":4,"p":{".":3},"a":29},"s":{"h":9},"t":{"a":1},"u":{"d":19,"g":4}},"m":{"a":{"c":21,"g":21,"n":[{"a":4},19]},"b":4,"e":[{"l":24,"t":21},29],"i":{"c":{"a":3},"e":0,"g":{"r":{"a":4}},"n":[{"e":4,"i":35},89],"s":[{"h":4,"s":19},21],"z":3},"n":{"i":{"z":32}},"o":{"g":0,"n":{"i":{"o":7}}},"p":{"i":3},"u":{"l":[{"a":4},21],"n":11},"y":23},"n":{"a":{"m":{"o":4},"n":{"t":21}},"c":{"h":{"e":{"r":17}}},"d":{"i":{"c":3,"x":2}},"e":{"a":19,"e":19,"m":3,"r":{"o":4},"s":{"i":4,"t":4},"t":{"r":3},"w":23},"i":{"c":{"s":4},"e":19,"l":19,"o":23,"s":{"h":3},"t":3,"u":19,"z":32},"n":18,"o":[{"g":0,"s":21,"v":3},18],"s":{"w":1},"t":{"a":{"g":{"e":5}},"h":{"e":{"s":18}}},"u":{"a":3,"f":4},"y":{".":23},"z":61},"o":{"f":19,"g":[{"r":{"a":{"p":3}}},9],"i":90,"l":23,"p":{"a":{"r":11}},"r":[{"e":3,"o":{"l":4}},29],"s":0,"t":[{"o":1},21],"u":{"t":19},"w":19},"p":{"a":[{"i":23,"n":{"c":4}},24],"e":{"l":19,"n":{"t":23},"t":{"i":{"t":{"i":{"o":4}}}}},"h":{"e":17},"l":{"i":21},"o":29,"r":{"e":{"c":[{"a":4},21],"d":21,"h":3},"o":[{"b":21},23]},"s":{"h":1},"t":{"i":{"b":13}},"u":{"t":[{"a":4},21]},"i":{"n":{"e":{"p":{"h":209}}}}},"q":[{"u":{"i":{"l":12,"s":91}}},29],"r":{"a":[{"b":0,"n":{"d":18},"r":3,"t":{"i":{".":18}}},2],"b":[{"l":1},25],"c":{"h":[{"e":1},3]},"e":{".":25,"a":{"l":23},"c":{"o":5},"i":{"n":11},"l":{".":4},"m":{"o":3},"n":{"a":4,"c":{"e":4},"e":18,"t":3},"q":0,"s":{"s":4,"t":3},"t":17},"h":2,"i":[{"a":[{"n":{".":210}},92],"c":{"k":32},"e":{"n":23,"r":0},"n":{"e":3},"o":29,"t":18,"u":1,"v":[{"a":21},0]},2],"m":93,"n":{"i":{"s":1,"t":18,"z":32},"o":3},"o":[{"b":4,"c":19,"r":0,"u":2},25],"s":[{"e":{"t":3}},2],"t":{"e":{"r":11},"l":18,"w":3},"u":[{"t":0},18],"w":{"a":{"u":32}}},"s":{"a":[{"g":{"e":{".":21,"s":21}}},72],"c":[{"a":[{"n":4},24],"r":23,"u":4},9],"e":[{"c":[{"r":4},24],"n":{"c":4},"r":{"t":{".":21,"s":21},"v":{"a":21}}},74],"h":[{"a":23,"e":{"n":5}},18],"i":[{"c":24,"d":[{"e":{"n":4}},24],"g":{"n":{"a":4}},"m":94,"n":95,"s":{"t":{"e":17}},"u":0},29],"k":{"i":{"n":19}},"m":{"i":1},"o":{"l":[{"u":3},24],"n":[{"a":4},24]},"p":[{"e":{"r":3},"i":{"r":{"a":4}},"r":{"e":1},"a":{"c":{"i":211}}},29],"s":[{"i":{"b":96}},25],"t":{"a":{"n":36},"i":{"g":3,"m":4},"o":[{"n":23},44],"r":[{"o":19,"u":{"c":10}},25]},"u":{"r":[{"r":4},24]},"w":1},"t":{"a":{"b":0},"e":{"n":{"d":17},"o":23},"h":{"o":{"d":54},"y":{"l":{"e":{"n":{"e":162}}}}},"i":{"c":2,"d":{"e":19},"n":[{"o":0},17],"r":19,"t":{"i":{"o":19,"v":4}}},"n":18,"o":{"n":{"a":4}},"r":{"a":23,"e":23,"i":{"c":3,"f":4},"o":{"g":3,"s":4}},"u":{"a":3},"y":{"m":4},"z":4},"u":[{"n":19,"p":23,"r":{"o":3},"s":0,"t":{"e":17,"i":{"l":6},"r":4},"c":{"l":{"i":{"d":212}}}},18],"v":{"a":{"p":97,"s":[{"t":4},24]},"e":{"a":19,"l":{"l":3,"o":12},"n":{"g":19,"i":17},"r":[{"b":19},2]},"i":[{"d":3,"l":0,"n":21,"v":0},29],"o":{"c":19},"u":19},"w":{"a":[{"g":21},29],"e":{"e":19},"h":23,"i":{"l":6,"n":{"g":3},"t":23}},"x":{"p":41},"y":{"c":32,"e":{".":32},"s":0}},"f":{"a":[{"b":{"l":3,"r":11},"c":{"e":1},"g":18,"i":{"n":17},"l":{"l":{"e":6}},"m":{"a":26,"i":{"s":5}},"r":[{"t":{"h":5}},32],"t":{"a":3,"h":{"e":3},"o":18},"u":{"l":{"t":7}}},41],"b":56,"d":18,"e":{".":18,"a":{"s":17,"t":{"h":54}},"b":[{"r":{"u":{"a":15}}},1],"c":{"a":18,"t":32},"d":25,"l":{"i":3},"m":{"o":1},"n":{"d":[{"e":6},8]},"r":[{"r":32,"m":{"i":{"o":213}}},15],"v":0},"f":[{"e":{"s":21},"i":{"e":21,"n":{".":19},"s":94},"l":{"y":21},"y":24},43],"h":18,"i":[{"a":3,"c":{".":48,"a":{"l":47,"n":23,"t":{"e":18}},"e":{"n":23,"r":3},"i":[{"a":32,"e":32},0],"s":18,"u":3,"h":27},"d":{"e":{"l":4}},"g":{"h":{"t":7}},"l":{"i":5,"l":{"i":{"n":6}},"y":18},"n":[{"a":32,"d":97,"e":9,"g":98,"n":0},25],"s":{"t":{"i":0}},"t":{"t":{"e":{"d":{".":5}}}}},41],"l":[{"e":{"s":{"s":19}},"i":{"n":17},"o":{"r":{"e":11},"w":{"e":{"r":{".":84}}}},"y":100,"a":{"g":{"e":{"l":214}}},"u":{"o":{"r":27}}},99],"m":18,"n":18,"o":[{"n":[{"d":{"e":0},"t":0},32],"r":[{"a":{"t":4,"y":5},"e":{"t":6},"i":0,"t":{"a":6}},9],"s":5},41],"p":56,"r":{"a":{"t":0},"e":{"a":19,"s":{"c":6}},"i":[{"l":17},8],"o":{"l":6}},"s":48,"t":[{"o":21,"y":24},25],"u":[{"e":{"l":4},"g":18,"m":{"i":{"n":1}},"n":{"e":4},"r":{"i":3},"s":{"i":17,"s":0},"t":{"a":18}},27],"y":41},"g":{"a":[{"f":0,"l":{".":32,"i":27,"o":3},"m":[{"e":{"t":4},"o":19},25],"n":{"i":{"s":5,"z":[{"a":6},3]},"o":18},"r":{"n":67},"s":{"s":17},"t":{"h":12,"i":{"v":18}},"z":18},41],"b":23,"d":1,"e":{".":25,"d":25,"e":{"z":17},"l":{"i":{"n":0,"s":4,"z":4},"y":18},"n":[{"a":{"t":1},"i":{"z":4},"o":18,"y":18,"c":{"y":{".":8}}},41],"o":[{"m":3,"d":215},41],"r":{"y":21},"s":{"i":32},"t":{"h":6,"o":18,"y":1,"i":{"c":{".":8}}},"v":1},"g":[{"e":[{"r":23},24],"l":{"u":6},"o":0},101],"h":{"i":{"n":3},"o":{"u":{"t":4}},"t":{"o":1,"w":{"e":15}}},"i":{".":32,"a":[{"r":5},102],"c":[{"i":{"a":32},"o":21},29],"e":{"n":6,"s":{".":32}},"l":0,"m":{"e":{"n":23}},"n":{".":68,"g":{"e":5},"s":103},"o":32,"r":[{"l":0},27],"s":{"l":23},"u":1,"v":32,"z":27},"l":[{"a":[{"d":{"i":6},"s":32},0],"e":[{"a":{"d":29}},41],"i":{"b":0,"g":23,"s":{"h":43}},"o":[{"r":11,"b":{"i":{"n":106}}},27]},9],"m":[{"y":21},29],"n":{"a":[{".":21,"c":69},1],"e":{"t":{"t":17,"i":{"s":{"m":137}}}},"i":[{"n":24,"o":21},29],"o":[{"n":21,"m":{"o":5},"r":{".":216,"e":{"s":{"p":24}}}},29]},"o":[{".":27,"b":5,"e":32,"g":104,"i":{"s":3},"n":[{"a":105,"d":{"o":7},"i":[{"z":{"a":217}},3]},8],"o":32,"r":{"i":{"z":4},"o":{"u":5}},"s":{".":32},"v":15},41],"p":23,"r":[{"a":{"d":{"a":18},"i":21,"n":84,"p":{"h":{".":32,"e":{"r":[{".":7},19]},"i":{"c":32},"y":18}},"y":18},"e":{"n":0,"s":{"s":{".":18}}},"i":{"t":18,"e":{"v":213}},"o":21,"u":{"f":17}},41],"s":[{"t":{"e":19}},9],"t":{"h":11},"u":{"a":[{"r":{"d":27}},1],"e":25,"i":{"t":106},"n":27,"s":27,"t":[{"a":{"n":29}},26]},"w":23,"y":[{"n":107,"r":{"a":4}},41]},"h":{"a":{"b":{"l":73},"c":{"h":17},"e":{"m":0,"t":0},"g":{"u":19},"l":{"a":[{"m":12},3]},"m":1,"n":{"c":{"i":0,"y":0},"d":{".":32},"g":[{"e":{"r":6},"o":6},0],"i":{"z":108},"k":0,"t":{"e":0}},"p":{"l":11,"t":5,"a":{"r":{"r":218}}},"r":{"a":{"n":3,"s":4},"d":[{"e":12},8],"l":{"e":0},"p":{"e":{"n":6}},"t":{"e":{"r":5}}},"s":{"s":5},"u":{"n":17},"z":[{"a":11},32],"i":{"r":{"s":137}},"t":{"c":{"h":213}}},"b":29,"e":{"a":{"d":41,"r":27},"c":{"a":{"n":1,"t":19}},"d":[{"o":13},21],"l":{"i":93,"l":{"i":{"s":0},"y":0},"o":19},"m":{"p":0},"n":[{"a":[{"t":5},17]},9],"o":{"r":5},"p":5,"r":{"a":[{"p":12},21],"b":{"a":0},"e":{"a":6},"n":23,"o":{"u":19},"y":23},"s":[{"p":64},29],"t":[{"e":{"d":0}},1],"u":0,"x":{"a":168}},"f":29,"h":29,"i":{"a":{"n":4},"c":{"o":1},"g":{"h":6},"l":109,"m":{"e":{"r":36}},"n":{"a":21},"o":{"n":{"e":17}},"p":[{"e":{"l":{"a":219}}},1],"r":{"l":0,"o":3,"p":0,"r":0},"s":{"e":{"l":11},"s":0},"t":{"h":{"e":{"r":6}},"e":{"s":{"i":{"d":12}}}},"v":9},"k":18,"l":[{"a":{"n":17},"o":[{"r":{"i":11}},24]},80],"m":[{"e":{"t":17}},43],"n":[{"a":{"u":{"z":12}}},42],"o":{"d":{"i":{"z":19},"s":19},"g":[{"e":17},1],"l":{"a":{"r":5},"e":110},"m":{"a":1,"e":12},"n":{"a":0,"y":4},"o":{"d":27,"n":17},"r":{"a":{"t":5},"i":{"s":4,"c":{".":187}},"t":{"e":12},"u":4},"s":{"e":[{"n":4},0],"p":15},"u":{"s":[{"e":54},41]},"v":{"e":{"l":5}}},"p":56,"r":[{"e":{"e":6},"o":{"n":{"i":{"z":5}},"p":{"o":11}}},26],"s":[{"h":21},101],"t":{"a":{"r":21},"e":{"n":2,"s":4,"o":{"u":216}},"y":21},"u":{"g":1,"m":{"i":{"n":1}},"n":{"k":{"e":5},"t":0},"s":{"t":14},"t":1},"w":[{"a":{"r":{"t":21}}},29],"y":{"p":{"e":3,"h":3,"o":{"t":{"h":{"a":137}}}},"s":9}},"i":{"a":[{"l":24,"m":[{"e":{"t":{"e":5}}},0],"n":[{"c":18,"i":11,"t":46},24],"p":{"e":4},"s":{"s":17},"t":{"i":{"v":21},"r":{"i":{"c":1}},"u":21}},42],"b":{"e":[{"r":{"a":3,"t":4}},0],"i":{"a":4,"n":3,"t":{".":4,"e":4}},"l":[{"i":3},29],"o":19,"r":[{"i":94},29],"u":{"n":19}},"c":{"a":{"m":18,"p":32,"r":[{".":21,"a":21},18],"s":6,"y":21},"c":{"u":17},"e":{"o":18},"h":18,"i":[{"d":19,"n":{"a":4},"p":[{"a":3},24]},25],"l":{"y":21},"o":{"c":94},"r":[{"a":32,"y":21},43],"t":{"e":1,"u":[{"a":111},84]},"u":{"l":{"a":3},"m":1,"o":4,"r":23}},"d":[{"a":{"i":21,"n":{"c":4}},"d":4,"e":{"a":{"l":11},"s":0},"i":[{"a":{"n":4,"r":0},"e":19,"o":[{"u":5,"s":1},3],"t":2,"u":4},24],"l":{"e":23},"o":{"m":21,"w":3},"r":21,"u":[{"o":4},24]},25],"e":[{"d":{"e":0},"g":{"a":113},"l":{"d":12},"n":{"a":67,"e":0,"n":19,"t":{"i":23}},"r":{".":29},"s":{"c":23,"t":29},"t":23},112],"f":{".":18,"e":{"r":{"o":4}},"f":{"e":{"n":5},"r":1},"i":{"c":{".":18},"e":23},"l":23,"t":18,"a":{"c":{"e":{"t":137}}}},"g":[{"a":{"b":5},"e":{"r":{"a":3}},"h":{"t":{"i":12}},"i":[{"b":23,"l":3,"n":3,"t":3},18],"l":28,"o":[{"r":3,"t":4},24],"r":{"e":19},"u":{"i":5,"r":2},"n":{"i":{"t":[{"e":{"r":213}},0]}}},25],"h":23,"i":114,"j":[{"k":21},23],"k":18,"l":{"a":[{"b":93,"d":{"e":21},"m":94,"r":{"a":5}},29],"e":{"g":23,"r":2,"v":17},"f":4,"i":[{"a":3,"b":9,"o":3,"s":{"t":1},"t":25,"z":9},2],"l":{"a":{"b":5}},"n":18,"o":{"q":3},"t":{"y":1},"u":{"r":4},"v":3},"m":{"a":{"g":[{"e":3},21],"r":{"y":5}},"e":{"n":{"t":{"a":{"r":10}}},"t":18},"i":[{"d":{"a":4},"l":{"e":5},"n":{"i":19},"t":18},2],"n":{"i":1},"o":{"n":23},"u":[{"l":{"a":3}},24],"p":{"e":{"d":{"a":201}}}},"n":{".":25,"a":{"u":83,"v":18},"c":{"e":{"l":36,"r":3}},"d":[{"l":{"i":{"n":{"g":4}}}},18],"e":[{"e":23,"r":{"a":{"r":17}},"s":{"s":19}},25],"g":{"a":18,"e":[{"n":4},18],"i":18,"l":{"i":{"n":{"g":4}}},"o":18,"u":18},"i":[{".":19,"a":21,"o":3,"s":2,"t":{"e":{".":19,"l":{"y":{".":19}}},"i":{"o":32},"y":3}},25],"k":18,"l":18,"n":25,"o":[{"c":90,"s":0,"t":21},42],"s":[{"e":3,"u":{"r":{"a":7}}},25],"t":{".":25,"h":112},"u":[{"s":19},2],"y":18,"f":{"r":{"a":{"s":220}}}},"o":[{".":18,"g":{"e":17,"r":9},"l":29,"m":1,"n":{"a":{"t":11},"e":{"r":{"y":0}},"i":11},"p":{"h":4},"r":{"i":11},"s":21,"t":{"h":4,"i":19,"o":1},"u":{"r":21}},25],"p":[{"e":0,"h":{"r":{"a":{"s":115}}},"i":[{"c":1},3],"r":{"e":96},"u":{"l":3}},25],"q":{"u":{"a":23,"e":{"f":4},"i":{"d":3,"t":116}}},"r":[{"a":[{"b":0,"c":21},29],"d":{"e":5},"e":{"d":{"e":0},"f":21,"l":117,"s":21},"g":{"i":4},"i":[{"d":{"e":5},"s":1,"t":{"u":11},"z":118},2],"m":{"i":{"n":1}},"o":{"g":0,"n":{".":32}},"u":{"l":4},"r":{"e":{"v":{"o":{"c":221}}}}},18],"s":{".":25,"a":{"g":4,"r":3,"s":6},"c":[{"h":3},119],"e":[{"r":3},18],"f":27,"h":{"a":{"n":4},"o":{"n":3,"p":5}},"i":{"b":3,"d":0,"s":19,"t":{"i":{"v":4}}},"k":26,"l":{"a":{"n":36}},"m":{"s":18},"o":[{"m":{"e":{"r":5}}},24],"p":[{"i":9,"y":1},2],"s":[{"a":{"l":1},"e":{"n":36,"s":1}},62],"t":{"a":{".":1},"e":2,"i":2,"l":{"y":0},"r":{"a":{"l":18}}},"u":[{"s":4},24]},"t":{"a":{".":18,"b":{"i":0},"g":21,"m":120,"n":23,"t":23},"e":[{"r":{"a":3,"i":19},"s":[{"i":{"m":{"a":29}}},1]},25],"h":[{"i":{"l":148}},25],"i":[{"a":18,"c":[{"a":3,"k":31},22],"g":3,"l":{"l":4},"m":24,"o":25,"s":[{"m":21},18],"n":{"e":{"r":{"a":{"r":158}}}}},29],"o":{"m":121,"n":18},"r":{"a":{"m":21},"y":4},"t":18,"u":{"a":{"t":3},"d":19,"l":3},"z":{".":18}},"u":29,"v":[{"e":{"l":{"l":3},"n":{".":3},"r":{".":83,"s":{".":21}}},"i":{"l":{".":4},"o":4,"t":2},"o":{"r":{"e":19,"o":35},"t":83}},25],"w":56,"x":{"o":1},"y":18,"z":{"a":{"r":18},"i":0,"o":{"n":{"t":32}}}},"j":{"a":[{"c":{"q":0},"p":[{"a":{"n":{"e":{"s":220}}}},1],"n":{"u":{"a":12}}},32],"e":[{"r":{"s":5,"e":{"m":222}},"s":{"t":{"i":{"e":18},"y":18}},"w":11},41],"o":{"p":1},"u":{"d":{"g":32}}},"k":{"a":{".":27,"b":23,"g":19,"i":{"s":17},"l":0},"b":29,"e":{"d":24,"e":41,"g":1,"l":{"i":[{"n":{"g":223}},4]},"n":{"d":73},"r":29,"s":[{"t":{".":23}},0],"t":{"y":1}},"f":23,"h":1,"i":[{".":32,"c":122,"l":{"l":21,"o":6},"m":21,"n":{".":21,"d":{"e":0},"e":{"s":{"s":19},"t":{"i":{"c":224}}},"g":0},"p":1,"s":[{"h":19},0]},29],"k":1,"l":[{"e":{"y":18},"y":18},29],"m":29,"n":{"e":{"s":19},"o":69},"o":{"r":4,"s":{"h":17},"u":23,"v":{"i":{"a":{"n":41}}}},"r":{"o":{"n":5}},"s":[{"c":21,"l":1,"y":21,"h":{"a":23}},101],"t":19,"w":29},"l":{"a":{"b":{"i":{"c":11},"o":21},"c":{"i":[{"e":225},17]},"d":{"e":21,"y":3},"g":{"n":0},"m":{"o":11},"n":{"d":[{"l":0},27],"e":{"t":5},"t":{"e":0}},"r":{"g":0,"i":11,"c":{"e":{"n":176}}},"s":{"e":0},"t":{"a":{"n":4},"e":{"l":{"i":18}},"i":{"v":18}},"v":[{"a":95},18],"i":{"n":{"e":{"s":{"s":226}}}}},"b":[{"i":{"n":17}},42],"c":[{"e":0,"i":23,"h":{"a":{"i":23},"i":{"l":{"d":227}}}},101],"d":[{"e":[{"r":{"e":1,"i":1}},24],"i":[{"s":4},0],"r":[{"i":21},23]},25],"e":{"a":[{"d":{"e":{"r":{".":183}}},"s":{"a":228}},9],"b":{"i":1},"f":{"t":6},"g":{".":32,"g":32,"e":{"n":{"d":{"r":{"e":230}}}}},"m":{"a":{"t":[{"i":{"c":5}},1]}},"n":{".":18,"c":27,"e":{".":32},"t":41,"o":{"i":{"d":78}}},"p":{"h":3,"r":1},"r":{"a":{"b":6},"e":0,"g":27,"i":68,"o":21},"s":[{"c":{"o":4},"q":32,"s":[{".":32},27]},8],"v":{"a":23,"e":{"r":{".":0,"a":0,"s":0}}},"y":[{"e":18},27],"c":{"t":{"a":{"b":229}}}},"f":[{"r":19},25],"g":[{"a":[{"r":12},19],"e":{"s":21},"o":11},80],"h":48,"i":{"a":{"g":1,"m":9,"r":{"i":{"z":6}},"s":1,"t":{"o":1}},"b":{"i":4},"c":{"i":{"o":32},"o":{"r":1},"s":18,"t":{".":18},"u":21,"y":23},"d":{"a":23,"e":{"r":5},"i":27},"f":{"e":{"r":11},"f":21,"l":1},"g":{"a":{"t":{"e":32}},"h":27,"r":{"a":1}},"k":27,"l":123,"m":{"b":{"l":0},"i":11,"o":1,"p":90},"n":{"a":21,"e":[{"a":11},124],"i":11,"k":{"e":{"r":6}}},"o":{"g":4},"q":125,"s":{"p":0},"t":[{".":24,"i":{"c":{"a":32,"s":108}},"h":{"o":{"g":204}}},29],"v":{"e":{"r":11}},"z":29},"j":18,"k":{"a":[{"l":23,"t":0},11]},"l":[{"a":{"w":21},"e":[{"a":19,"c":23,"g":23,"l":23,"n":73,"t":73},24],"i":[{"n":[{"a":19},126],"s":{"h":231}},9],"o":[{"q":{"u":{"i":10}},"u":{"t":4},"w":19},1],"f":{"l":2}},29],"m":[{"e":{"t":19},"i":{"n":{"g":3}},"o":{"d":21,"n":[{"e":{"l":{"l":232}}},17]}},25],"n":81,"o":{".":27,"b":{"a":{"l":5},"o":{"t":{"o":233}}},"c":{"i":1},"f":18,"g":{"i":{"c":27},"o":19,"u":27,"e":{"s":{".":9}}},"m":{"e":{"r":11}},"n":{"g":32,"i":[{"z":127},0]},"o":{"d":6},"p":{"e":{".":32},"i":11,"m":23},"r":{"a":[{"t":{"o":1}},17],"i":{"e":4},"o":{"u":5}},"s":{".":32,"e":{"t":5},"o":{"p":{"h":{"i":{"z":32},"y":32}}},"t":0},"t":{"a":1},"u":{"n":{"d":6},"t":25},"v":18,"a":{"d":{"e":{"d":{".":17},"r":{".":183}}}}},"p":[{"a":{"b":5},"h":{"a":23,"i":19},"i":{"n":{"g":4},"t":23},"l":21,"r":19},25],"r":43,"s":[{"c":21,"e":24,"i":{"e":21}},81],"t":[{"a":{"g":4,"n":{"e":7}},"e":[{"n":17,"r":{"a":36},"a":23},29],"h":{"i":[{"l":{"y":148}},11]},"i":{"e":{"s":{".":19}},"s":17},"r":29,"u":[{"r":{"a":12}},8]},18],"u":{"a":4,"b":{"r":3},"c":{"h":17,"i":3},"e":{"n":3,"p":15},"f":0,"i":{"d":4},"m":{"a":1,"i":32,"n":{".":19,"i":{"a":32}},"b":{"i":{"a":{".":235}}}},"o":[{"r":11},3],"p":18,"s":{"s":17,"t":{"e":11}},"t":41,"n":{"k":{"e":{"r":234}}}},"v":{"e":{"n":19,"t":128}},"w":42,"y":[{"a":18,"b":18,"m":{"e":4},"n":{"o":3},"s":[{"e":19,"t":{"y":{"r":4}}},58],"g":{"a":{"m":{"i":236}}}},41]},"m":{"a":[{"b":25,"c":{"a":9,"h":{"i":{"n":{"e":4}}},"l":1},"g":{"i":{"n":5},"n":32},"h":25,"i":{"d":6},"l":{"d":18,"i":{"g":3,"n":4},"l":{"i":0},"t":{"y":0},"a":{"p":222}},"n":{"i":{"a":32,"s":5,"z":11},".":24,"u":{"s":{"c":237}}},"p":[{"h":{"r":{"o":244}}},18],"r":{"i":{"n":{"e":{".":4}},"z":4},"l":{"y":0},"v":11,"g":{"i":{"n":238}}},"s":{"c":{"e":4},"e":0,"t":15},"t":{"e":32,"h":12,"i":{"s":3,"z":{"a":18}}}},41],"b":[{"a":{"t":129},"i":{"l":19,"n":{"g":83},"v":0}},43],"c":56,"e":{".":18,"d":[{".":18,"i":{"a":32,"e":3,"c":[{"i":{"n":152}},84],"o":{"c":239}},"y":108},25],"g":[{"r":{"a":{"n":240}}},9],"l":{"o":{"n":5},"t":0},"m":[{"o":130},9],"n":[{"a":[{"c":5},0],"d":{"e":0},"e":18,"i":0,"s":[{"u":7},17],"t":[{"e":0},27],".":24},41],"o":{"n":4},"r":{"s":{"a":19}},"s":[{"t":{"i":27}},25],"t":{"a":[{"l":11},1],"e":2,"h":{"i":4},"r":[{"i":{"c":32,"e":4},"y":3},21]},"v":1},"f":43,"h":25,"i":{".":32,"a":3,"d":{"a":[{"b":241},0],"g":0},"g":0,"l":{"i":{"a":27,"e":108,"t":{"a":27}},"l":[{"a":{"g":208},"i":{"l":{"i":59}}},21]},"n":{"a":0,"d":27,"e":{"e":19},"g":{"l":[{"i":5,"y":19},21]},"t":0,"u":[{"t":{"e":{"r":242,"s":{"t":242}}}},21],"i":{"s":{".":174}}},"o":{"t":17},"s":[{"e":{"r":{".":0}},"l":5,"t":{"i":0,"r":{"y":19}}},24],"t":{"h":18},"z":24},"k":18,"l":43,"m":[{"a":{"r":{"y":5},"b":243}},29],"n":[{"a":1,"i":{"n":21},"o":1},43],"o":[{"c":{"r":[{"a":{"t":[{"i":{"z":32}},245]}},18]},"d":131,"g":{"o":1},"i":{"s":[{"e":5},84]},"k":18,"l":{"e":{"s":{"t":4},"c":246}},"m":{"e":3},"n":{"e":{"t":5,"y":{"l":247}},"g":{"e":5},"i":{"a":12,"s":{"m":0,"t":0},"z":3},"o":{"l":36,"c":{"h":12},"e":{"n":171},"s":249},"y":{".":3}},"r":[{"a":{".":18},"o":{"n":{"i":{"s":248}}}},9],"s":[{"e":{"y":4},"p":3},8],"t":{"h":[{"e":{"t":250}},12]},"u":{"f":19,"s":[{"i":{"n":98}},27]},"v":9,"e":{"l":{"a":{"s":167}}}},41],"p":[{"a":{"r":{"a":[{"b":5},7],"i":6}},"e":{"t":23},"h":{"a":{"s":36}},"i":[{"a":0,"e":{"s":4},"n":34,"r":19,"s":4},24],"o":{"r":{"i":11},"s":{"i":{"t":{"e":6}}},"u":{"s":21},"v":6},"t":{"r":1},"y":24},43],"r":47,"s":[{"h":[{"a":{"c":{"k":251}}},21],"i":19},101],"t":18,"u":[{"l":{"a":{"r":49},"t":[{"i":[{"u":252},54]},32]},"m":27,"n":8,"p":18,"u":1,"d":{"r":{"o":9}}},41],"w":18},"n":{"a":[{"b":[{"u":21},81],"c":{".":18,"a":1,"t":19},"g":{"e":{"r":{".":5}}},"k":0,"l":{"i":[{"a":4},1],"t":18},"m":{"i":{"t":4}},"n":[{"c":{"i":36},"i":{"t":0},"k":17},24],"r":{"c":[{"h":{"s":{".":73}}},11],"e":18,"i":11,"l":0,"m":19},"s":[{"c":0,"t":{"i":5}},21],"t":[{"a":{"l":3},"o":{"m":{"i":{"z":6}}}},24],"u":[{"s":{"e":11},"t":27},24],"v":{"e":0}},41],"b":80,"c":{"a":{"r":6},"e":{"s":{".":21}},"h":{"a":23,"e":{"o":19,"s":{"t":253}},"i":{"l":19,"s":23}},"i":{"n":2,"t":1},"o":{"u":{"r":{"a":7}}},"r":29,"u":29},"d":{"a":{"i":21,"n":19},"e":[{"s":{"t":{".":4}}},29],"i":{"b":0,"f":79,"t":29,"z":23,"e":{"c":{"k":29}}},"u":{"c":19,"r":0},"w":{"e":9},"t":{"h":{"r":3}}},"e":{".":25,"a":{"r":23},"b":[{"u":11,"a":{"c":{"k":3}}},9],"c":[{"k":32},9],"d":25,"g":{"a":{"t":[{"i":{"v":5}},1]},"e":32},"l":{"a":1,"i":{"z":5}},"m":{"i":4,"o":1},"n":[{"e":18},41],"o":27,"p":{"o":1},"q":9,"r":[{"a":{"b":6,"r":21},"e":24,"i":132,"r":0},29],"s":[{".":25,"p":18,"t":25,"w":18,"k":{"i":119}},41],"t":{"i":{"c":27}},"v":[{"e":19},1],"w":1},"f":[{"i":{"n":{"i":{"t":{"e":{"s":226}}}}}},23],"g":{"a":{"b":21},"e":{"l":23,"n":{"e":[{"s":5},133]},"r":{"e":19,"i":23}},"h":{"a":4,"o":2},"i":{"b":23,"n":2,"t":19},"l":{"a":21},"o":{"v":17},"s":{"h":4,"p":{"r":2}},"u":[{"m":21},29],"y":24},"h":[{"a":[{"b":12},0],"e":0},80],"i":{"a":[{"n":[{".":114},3],"p":1},68],"b":{"a":3,"l":1},"d":[{"i":4},1],"e":{"r":1},"f":{"i":[{"c":{"a":{"t":4}}},9]},"g":{"r":19},"k":0,"m":[{"i":{"z":3}},29],"n":[{"e":{".":32},"g":0},29],"o":1,"s":{".":32,"t":{"a":0}},"t":[{"h":21,"i":{"o":27},"o":{"r":23},"r":3},24]},"j":29,"k":[{"e":{"r":{"o":19},"t":23},"i":{"n":3},"l":29,"r":{"u":{"p":3}}},44],"l":[{"e":{"s":{"s":19}}},43],"m":[{"e":[{"t":17},0]},19],"n":[{"e":0,"i":{"a":{"l":11},"v":0}},101],"o":{"b":{"l":[{"e":3},0]},"c":{"l":19,"e":{"r":{"o":{"s":254}}}},"d":66,"e":27,"g":[{"e":17},18],"i":{"s":{"i":6}},"l":{"i":134,"o":{"g":{"i":{"s":32}}}},"m":{"i":{"c":27,"z":108,"s":{"t":82}},"o":1,"y":3,"a":{"l":214},"e":{"n":{"o":194}}},"n":[{"a":{"g":0},"i":[{"z":19,"s":{"o":255}},5],"e":{"q":15}},1],"p":[{"o":{"l":{"i":135,"y":{".":256}}}},18],"r":{"a":{"b":5,"r":{"y":1}}},"s":{"c":18,"e":0,"t":5},"t":{"a":4},"u":[{"n":27},41],"v":{"e":{"l":136,"m":{"b":2}}},"w":{"l":12}},"p":[{"i":0,"r":{"e":{"c":17}}},72],"q":29,"r":[{"u":0},29],"s":[{"a":{"b":4,"t":{"i":36}},"c":[{"e":{"i":{"v":4}}},1],"e":[{"s":83},24],"i":{"d":137,"g":17},"l":24,"m":[{"o":{"o":1}},3],"o":{"c":21},"p":{"e":1,"i":19},"t":{"a":{"b":{"l":6}}}},81],"t":[{"a":{"b":0},"e":{"r":{"s":12}},"i":[{"b":19,"e":{"r":0},"f":8,"n":{"e":23,"g":83},"p":0},9],"r":{"o":{"l":{"l":{"i":7}}},"e":{"p":137}},"s":1,"u":{"m":{"e":11}}},29],"u":{"a":2,"d":1,"e":{"n":4},"f":{"f":{"e":0}},"i":{"n":23,"t":50},"m":[{"e":2,"i":19},21],"n":138,"o":23,"t":{"r":3}},"v":74,"w":72,"y":{"m":0,"p":0},"z":[{"a":23},18]},"o":{"a":[{"d":11,"l":{"e":{"s":108}},"r":{"d":12},"s":{"e":0,"t":{"e":6}},"t":{"i":5}},18],"b":{"a":{"b":35,"r":19},"e":{"l":0},"i":[{"n":[{"g":4},24]},29],"r":23,"u":{"l":3},"l":{"i":{"g":189}}},"c":{"e":29,"h":[{"e":{"t":23},"a":{"s":23}},0],"i":{"f":12,"l":21},"l":{"a":{"m":21}},"o":{"d":21},"r":{"a":{"c":3,"t":{"i":{"z":4}}},"e":12,"i":{"t":32}},"t":{"o":{"r":{"a":7}}},"u":{"l":{"a":3},"r":{"e":19}}},"d":{"d":{"e":{"d":4}},"i":{"c":3,"o":11,"t":{"i":{"c":137}}},"o":[{"r":12},139],"u":{"c":{"t":{".":4,"s":4}}},"e":{"l":{"l":{"i":12}}}},"e":{"l":21,"n":{"g":19},"r":[{"s":{"t":257}},23],"t":{"a":1},"v":23},"f":{"i":[{"t":{"e":4,"t":17}},24]},"g":{"a":{"r":121,"t":{"i":{"v":4},"o":21}},"e":[{"n":{"e":19},"o":19,"r":21},29],"i":{"e":23,"s":140,"t":3},"l":[{"y":79},21],"n":{"i":{"z":27}},"r":{"o":21},"u":{"i":5},"y":[{"n":25},41]},"h":[{"a":{"b":6}},74],"i":[{"c":{"e":{"s":11}},"d":{"e":{"r":3}},"f":{"f":17},"g":0,"l":{"e":{"t":4}},"n":{"g":23,"t":{"e":{"r":6}}},"s":{"m":19,"o":{"n":4},"t":{"e":{"n":6}}},"t":{"e":{"r":3}}},9],"j":19,"k":[{"e":{"n":23,"s":{"t":15}},"i":{"e":4}},25],"l":{"a":[{"n":21,"s":{"s":36}},29],"d":[{"e":15},9],"e":{"r":3,"s":{"c":23,"t":{"e":{"r":88}}},"t":23},"f":{"i":1},"i":[{"a":23,"c":{"e":23},"d":{".":4},"f":73,"l":19,"n":{"g":3},"o":19,"s":{".":19,"h":3},"t":{"e":19,"i":{"o":19}},"v":19,"g":{"o":{"p":{"o":258}}}},9],"l":{"i":{"e":17}},"o":{"g":{"i":{"z":4}},"r":0,"n":{"o":{"m":259}}},"p":{"l":4},"t":9,"u":{"b":3,"m":{"e":3},"n":3,"s":19},"v":9,"y":24},"m":{"a":{"h":4,"l":5,"t":{"i":{"z":4}}},"b":{"e":9,"l":1},"e":[{"n":{"a":3},"r":{"s":{"e":4}},"t":[{"r":{"y":4}},21],"c":{"h":{"a":260}}},24],"i":{"a":23,"c":{".":3,"a":3},"d":19,"n":[{"i":19},2]},"m":{"e":{"n":{"d":32}}},"o":{"g":{"e":0},"n":21},"p":{"i":3,"r":{"o":7}}},"n":[{"a":[{"c":1,"n":23},2],"c":[{"i":{"l":27}},2],"d":[{"o":4},25],"e":{"n":23,"s":{"t":4}},"g":{"u":1},"i":{"c":2,"o":23,"s":2,"u":19},"k":{"e":{"y":3}},"o":{"d":{"i":1},"m":{"y":3,"i":{"c":137}},"r":{"m":{"a":23}},"t":{"o":{"n":261}},"u":23},"s":[{"p":{"i":[{"r":{"a":10}},36]},"u":17},3],"t":{"e":{"n":36},"i":[{"f":7},93]},"u":{"m":4},"v":{"a":6}},24],"o":[{"d":{"e":5,"i":5},"k":1,"p":{"i":11},"r":{"d":23},"s":{"t":6}},9],"p":{"a":24,"e":{"d":5,"r":[{"a":[{"g":18},27]},2]},"h":[{"a":{"n":19},"e":{"r":19}},25],"i":{"n":{"g":3},"t":23,"s":{"m":{".":2}}},"o":{"n":19,"s":{"i":21}},"r":29,"u":2,"y":5},"q":29,"r":{"a":[{".":19,"g":83,"l":{"i":{"z":4}},"n":{"g":{"e":4}}},29],"e":{"a":[{"l":19},5],"i":3,"s":{"h":5,"t":{".":4}},"w":17},"g":{"u":1},"i":{"a":56,"c":{"a":3},"l":19,"n":2,"o":29,"t":{"y":3},"u":23},"m":{"i":9},"n":{"e":8},"o":{"f":19,"u":{"g":3}},"p":{"e":4},"r":{"h":27},"s":{"e":[{"n":5},1],"t":17},"t":{"h":{"i":3,"y":3,"o":{"n":{"i":{"t":262}}},"r":{"i":137}},"y":1,"i":{"v":{"e":{"l":{"y":4}}}}},"u":{"m":19},"y":29},"s":{"a":{"l":3},"c":[{"e":1,"o":{"p":[{"i":18},23]},"r":19},9],"i":{"e":95,"t":{"i":{"v":4},"o":3,"y":3},"u":0},"l":1,"o":24,"p":{"a":1,"o":1,"h":{"e":{"r":83}}},"t":{"a":[{"t":{"i":19}},9],"i":{"l":4,"t":4}}},"t":{"a":{"n":21},"e":{"l":{"e":{"g":36}},"r":{".":3,"s":4},"s":[{"t":{"e":{"r":263},"o":{"r":264}}},21]},"h":[{"e":{"s":{"i":5},"o":{"s":265}},"i":14},18],"i":{"c":{".":3,"a":4,"e":23},"f":23,"s":23},"o":{"s":5}},"u":[{"b":{"l":3,"a":{"d":{"o":116}}},"c":{"h":{"i":6}},"e":{"t":4},"l":1,"n":{"c":{"e":{"r":6}},"d":8},"v":4},9],"v":{"e":{"n":1,"r":{"n":{"e":17},"s":12,"t":1}},"i":{"s":23,"t":{"i":36},"a":{"n":{".":266}}},"o":{"l":60}},"w":{"d":{"e":{"r":3}},"e":{"l":3,"s":{"t":4}},"i":2,"n":{"i":5},"o":21},"y":{"a":2},"x":{"i":{"d":{"i":{"c":267}}}}},"p":{"a":[{"c":{"a":1,"e":1,"t":0},"d":21,"g":{"a":{"n":32,"t":23}},"i":[{"n":17},21],"l":[{"m":{"a":{"t":268}}},21],"n":{"a":0,"e":{"l":11},"t":{"y":0},"y":3},"p":[{"u":1},2],"r":{"a":{"b":{"l":6},"g":{"e":5,"r":{"a":269}},"l":{"e":228},"m":[{"e":12},36]},"d":{"i":5},"e":[{"l":5},27],"i":[{"s":0},28]},"t":{"e":[{"r":4},9],"h":{"i":{"c":32},"y":4},"r":{"i":{"c":1}}},"v":0,"y":27},41],"b":43,"d":1,"e":{".":18,"a":[{"r":{"l":17}},138],"c":9,"d":[{"e":27,"i":[{"a":36,"c":0},27]},37],"e":[{"d":0,"v":208},21],"k":0,"l":{"a":1,"i":{"e":17}},"n":{"a":{"n":1},"c":21,"t":{"h":0}},"o":{"n":4},"r":{"a":{".":21,"b":{"l":6},"g":21},"i":[{"s":{"t":6}},21],"m":{"a":{"l":0},"e":7},"n":21,"o":11,"t":{"i":11},"u":4,"v":15},"t":[{"e":{"n":4},"i":{"z":4}},9]},"f":18,"g":18,"h":{".":18,"a":{"r":{"i":6}},"e":{"n":{"o":11},"r":1,"s":{".":1}},"i":{"c":2,"e":32,"n":{"g":4},"s":{"t":{"i":32}},"z":27,"l":{"a":{"n":{"t":168},"t":{"e":{"l":270}}}}},"l":9,"o":{"b":27,"n":{"e":27,"i":32},"r":0},"s":18,"t":3,"u":32,"y":41},"i":{"a":[{"n":17},3],"c":{"i":{"e":1},"y":1,"a":{"d":271}},"d":[{"a":19,"e":3,"i":32},21],"e":{"c":27,"n":3},"g":{"r":{"a":{"p":1}}},"l":{"o":3},"n":[{".":21,"d":17,"o":21},9],"o":[{"n":17},141],"t":{"h":[{"a":4},23],"u":9}},"k":142,"l":[{"a":{"n":27,"s":{"t":6}},"i":{"a":11,"e":{"r":5},"g":18,"n":[{"a":{"r":5}},0],"c":{"a":{"b":208}}},"o":{"i":17},"u":{"m":[{"b":17},0]}},143],"m":43,"n":48,"o":{"c":1,"d":{".":32},"e":{"m":4,"t":144},"g":145,"i":{"n":[{"t":32,"c":{"a":12}},84]},"l":{"y":{"t":6,"e":137,"p":{"h":{"o":{"n":{"o":272}}}}},"e":{".":41}},"n":{"i":1},"p":1,"r":[{"y":1},124],"s":[{"s":15},41],"t":[{"a":1},21],"u":{"n":32}},"p":[{"a":{"r":{"a":5}},"e":[{"d":21,"l":19,"n":23,"r":23,"t":23},24],"o":{"s":{"i":{"t":{"e":5}}}}},43],"r":[{"a":{"y":{"e":17}},"e":{"c":{"i":32,"o":5},"e":{"m":11},"f":{"a":{"c":6}},"l":{"a":0},"r":11,"s":{"e":23,"s":27,"p":{"l":{"i":84}}},"t":{"e":{"n":5}},"v":11,"m":{"a":{"c":273}},"n":{"e":{"u":15}}},"i":{"e":53,"n":{"t":146},"s":[{"o":12},0]},"o":{"c":{"a":23,"e":{"s":{"s":8}},"i":{"t":{"y":{".":274}}}},"f":{"i":{"t":6}},"l":11,"s":{"e":12},"t":15,"g":{"e":208}}},9],"s":[{"e":[{"u":{"d":[{"o":{"d":276,"f":276}},275]}},24],"h":1,"i":{"b":21}},81],"t":[{"a":{"b":134},"e":24,"h":24,"i":{"m":11},"u":{"r":0},"w":21,"o":{"m":{"a":{"t":277}}},"r":{"o":{"l":278}}},42],"u":{"b":[{"e":{"s":{"c":181}}},11],"e":0,"f":0,"l":{"c":11},"m":1,"n":9,"r":{"r":0},"s":32,"t":[{"e":[{"r":11},32],"r":3,"t":{"e":{"d":0},"i":{"n":0}}},9]},"w":23},"q":{"u":[{"a":{"v":5,"i":{"n":{"t":{"e":279}}},"s":{"i":[{"r":281,"s":281},280]}},"e":{".":25,"r":27,"t":27},"i":{"n":{"t":{"e":{"s":{"s":282}}}},"v":{"a":{"r":14}}}},9]},"r":{"a":{"b":[{"i":3,"o":{"l":{"i":{"c":29},"o":{"i":236}}}},25],"c":{"h":{"e":17,"u":3},"l":19},"f":{"f":{"i":5},"t":0},"i":24,"l":{"o":1},"m":{"e":{"t":[{"r":{"i":{"z":283}}},11],"n":24},"i":24,"o":{"u":3}},"n":{"e":{"o":6},"g":{"e":0},"i":21,"o":4,"h":{"a":{"s":167}}},"p":{"e":{"r":11},"h":{"y":27}},"r":{"c":5,"e":[{"f":5},17],"i":{"l":18}},"s":24,"t":{"i":{"o":{"n":115}}},"u":{"t":0},"v":{"a":{"i":4},"e":{"l":11}},"z":{"i":{"e":4}},"d":{"i":{"g":127,"o":{"g":249}}},"o":{"r":2}},"b":[{"a":{"b":21,"g":21},"i":[{"f":0,"n":[{"e":19,"g":{".":4,"e":284}},24]},8],"o":1},29],"c":[{"e":[{"n":17},24],"h":{"a":23,"e":{"r":0}},"i":{"b":90,"t":1},"u":{"m":12}},29],"d":{"a":{"l":21},"i":[{"a":0,"e":{"r":0},"n":[{"g":3},17]},9]},"e":{".":25,"a":{"l":2,"n":3,"r":{"r":4},"v":32,"w":1},"b":{"r":{"a":{"t":19}}},"c":{"o":{"l":{"l":5},"m":{"p":{"e":5}}},"r":{"e":1},"i":{"p":{"r":285}},"t":{"a":{"n":{"g":286}}}},"d":[{"e":2,"i":{"s":3,"t":5}},37],"f":{"a":{"c":1},"e":[{"r":{".":4}},9],"i":3,"y":1},"g":{"i":{"s":11}},"i":{"t":4},"l":{"i":2,"u":4},"n":{"t":{"a":90,"e":0}},"o":2,"p":{"i":{"n":4},"o":{"s":{"i":1}},"u":2},"r":[{"i":21,"o":17,"u":4},147],"s":{".":21,"p":{"i":1},"s":{"i":{"b":6}},"t":[{"a":{"l":4},"r":3},8]},"t":{"e":{"r":1},"i":{"z":96},"r":{"i":[{"b":{"u":85}},3]}},"u":[{"t":{"i":4}},8],"v":[{"a":{"l":1},"e":{"l":11,"r":{".":30,"s":4,"t":4}},"i":{"l":4},"o":{"l":{"u":5}}},8],"w":{"h":1}},"f":[{"u":0,"y":21},29],"g":[{"e":{"r":3,"t":23},"i":{"c":23,"n":[{"g":3},0],"s":19,"t":19},"l":29,"o":{"n":0},"u":23},9],"h":[{".":18,"a":{"l":18}},1],"i":{"a":[{"b":0,"g":1,"l":{".":23}},3],"b":[{"a":11},21],"c":{"a":{"s":5},"e":21,"i":[{"d":32,"e":1},18],"o":21},"d":{"e":{"r":5}},"e":{"n":{"c":3,"t":3},"r":2,"t":4},"g":{"a":{"n":5},"i":32},"l":{"i":{"z":11}},"m":{"a":{"n":32},"i":5,"o":27,"p":{"e":0}},"n":{"a":[{".":32},24],"d":0,"e":0,"g":0},"o":2,"p":{"h":[{"e":6},32],"l":[{"i":{"c":5}},9]},"q":21,"s":[{".":21,"c":0,"h":23,"p":0},24],"t":{"a":{"b":116},"e":{"d":{".":19},"r":{".":5,"s":5}},"i":{"c":11},"u":[{"r":5},9]},"v":{"e":{"l":5,"t":11},"i":11,"o":{"l":287}}},"j":23,"k":{"e":{"t":23},"l":{"e":1,"i":{"n":1}},".":288,"h":{"o":2},"r":{"a":{"u":29}},"s":{".":288}},"l":[{"e":[{"d":24,"q":{"u":30}},0],"i":{"g":21,"s":[{"h":4},21]},"o":73},29],"m":[{"a":{"c":5},"e":[{"n":23,"r":{"s":4}},24],"i":{"n":{"g":[{".":21},3]},"o":21,"t":23},"y":21},29],"n":{"a":{"r":21},"e":{"l":23,"r":21,"t":19,"y":23},"i":{"c":19,"s":92,"t":23,"v":23},"o":[{"u":21},0],"u":23},"o":{"b":{"l":11,"o":{"t":289}},"c":[{"r":3},24],"e":[{"l":{"a":{"s":167}},"p":{"i":{"d":{"e":290}}}},1],"f":{"e":2,"i":{"l":4}},"k":[{"e":{"r":4}},8],"l":{"e":{".":32}},"m":{"e":{"t":{"e":5},"s":{"h":3}},"i":0,"p":0},"n":{"a":{"l":0},"e":0,"i":{"s":134},"t":{"a":0}},"o":{"m":41,"t":32},"p":{"e":{"l":3},"i":{"c":11}},"r":{"i":11,"o":4},"s":{"p":{"e":{"r":5}},"s":0},"t":{"h":{"e":1},"y":1,"r":{"o":{"n":2}}},"v":{"a":1,"e":{"l":5}},"x":5},"p":[{"e":{"a":21,"n":{"t":19},"r":{".":4},"t":23},"h":95,"i":{"n":{"g":3}},"o":23,"a":{"u":{"l":{"i":291}}}},29],"r":[{"e":{"c":0,"f":0,"o":21,"s":{"t":0}},"i":{"o":0,"v":0},"o":{"n":17,"s":17},"y":{"s":17}},72],"s":[{"a":[{"t":{"i":5}},29],"c":1,"e":[{"c":[{"r":0},23],"r":{".":4,"a":{"d":{"i":238}}},"s":3,"v":148},24],"h":[{"a":19},29],"i":[{"b":90},29],"o":{"n":12},"p":29,"w":19},44],"t":{"a":{"c":{"h":36},"g":21},"e":{"b":23,"n":{"d":17},"o":5},"i":[{"b":4,"d":0,"e":{"r":21},"g":23,"l":{"i":12,"l":17,"y":21},"s":{"t":21},"v":21},29],"r":{"i":23,"o":{"p":{"h":115}},"e":{"u":29}},"s":{"h":1},"h":{"o":{"u":29}}},"u":{"a":3,"e":{"l":93,"n":3},"g":{"l":1},"i":{"n":3},"m":{"p":{"l":11}},"n":[{"k":6,"t":{"y":0}},9],"s":{"c":19},"t":{"i":{"n":6}}},"v":{"e":[{"l":{"i":17},"n":23,"r":{".":4},"s":{"t":19},"y":23,"i":{"l":29}},1],"i":{"c":23,"v":0},"o":23},"w":29,"y":{"c":1,"n":{"g":{"e":32}},"t":3},"z":{"s":{"c":2}}},"s":{"a":[{"b":42,"c":{"k":32,"r":{"i":11},"t":23},"i":32,"l":{"a":{"r":36},"m":0,"o":4,"t":0,"e":{"s":{"c":54,"w":7}}},"n":{"c":27,"d":{"e":0}},"p":[{"a":{"r":{"i":{"l":292}}}},29],"t":{"a":4,"i":{"o":76},"u":11},"u":0,"v":{"o":{"r":4}},"w":32},9],"b":56,"c":{"a":{"n":{"t":149},"p":[{"e":{"r":267}},0],"v":6,"t":{"o":{"l":208}}},"e":{"d":21,"i":18,"s":21},"h":[{"o":21,"i":{"t":{"z":21}},"r":{"o":{"d":{"i":{"n":{"g":293}}}}}},8],"i":{"e":68,"n":{"d":150},"u":{"t":{"t":294}}},"l":{"e":6,"i":21},"o":{"f":17,"p":{"y":18},"u":{"r":{"a":7}}},"u":29,"r":{"a":{"p":{"e":{"r":{".":36}}}}},"y":{"t":{"h":247}}},"d":56,"e":{".":18,"a":[{"s":17,"w":5},1],"c":{"o":151,"t":27},"d":[{"e":95,"l":19},125],"g":[{"r":11},9],"i":32,"l":{"e":2,"f":32,"v":32},"m":{"e":[{"s":{"t":295}},18],"o":{"l":1},"a":{"p":{"h":287}},"i":{"t":{"i":{"c":296}}}},"n":{"a":{"t":5},"c":18,"d":0,"e":{"d":19},"g":5,"i":{"n":19},"t":{"d":18,"l":18}},"p":{"a":152,"t":{"e":{"m":{"b":11}}}},"r":{".":43,"l":21,"o":0,"v":{"o":18}},"s":[{"h":4,"t":5},72],"u":{"m":113},"v":[{"e":{"n":11}},32],"w":{"i":0},"x":32},"f":47,"g":48,"h":[{".":25,"e":{"r":2,"v":32},"i":{"n":2,"o":3,"p":27,"v":6},"o":[{"l":{"d":4},"n":12,"r":[{"t":7},17],"e":{"s":{"t":137}}},0],"w":18},24],"i":{"b":2,"c":{"c":19},"d":{"e":{".":27,"s":[{"t":6,"w":6},32],"d":{".":8}},"i":[{"z":4},32]},"g":{"n":{"a":18}},"l":{"e":0,"y":18},"n":[{"a":24,"e":{".":32},"g":23},42],"o":[{"n":[{"a":6},32]},41],"r":[{"a":5,"e":{"s":{"i":{"d":4}}}},9],"s":41,"t":{"i":{"o":27}},"u":32,"v":41,"z":32},"k":[{"e":[{"t":23},18],"i":{"n":{"e":4,"g":4}},"y":{"s":{"c":15}}},9],"l":[{"a":{"t":23},"e":24,"i":{"t":{"h":7}},"o":{"v":{"a":{"k":{"i":{"a":297}}}}}},74],"m":[{"a":[{"l":{"l":54},"n":12},23],"e":{"l":17,"n":19},"i":{"t":{"h":32}},"o":{"l":{"d":49}}},42],"n":72,"o":[{"c":{"e":1},"f":{"t":12},"l":{"a":{"b":1},"d":153,"i":{"c":3},"v":32,"u":{"t":{"e":9}}},"m":27,"n":{".":68,"a":17,"g":0},"p":[{"h":{"i":{"c":32,"z":19},"y":19}},21],"r":{"c":5,"d":5},"v":[{"i":4},18],"g":{"a":{"m":{"y":298}}}},41],"p":{"a":[{"i":32,"n":0,"c":{"e":299,"i":{"n":69}}},25],"e":{"n":{"d":17},"o":57,"r":25,"c":{"i":{"o":11}}},"h":{"e":[{"r":[{"o":213},27]},24],"o":6},"i":{"l":17,"n":{"g":4},"o":18,"c":{"i":{"l":208}}},"l":{"y":21},"o":{"n":21,"r":[{"t":{"s":{"c":300,"w":300}}},17],"t":18,"k":{"e":{"s":{"w":10}}}}},"q":{"u":{"a":{"l":{"l":36}},"i":{"t":{"o":88}}}},"r":29,"s":[{"a":[{"s":12,"c":{"h":{"u":301}}},29],"c":94,"e":{"l":23,"n":{"g":19},"s":{".":21},"t":19},"i":[{"e":[{"r":0},21],"l":{"y":4},"a":{"n":{".":210}},"g":{"n":{"a":{"b":302}}}},29],"l":[{"i":1},21],"n":21,"p":{"e":{"n":{"d":115}}},"t":9,"u":{"r":{"a":6}},"w":4,"h":{"a":{"t":3}}},25],"t":{".":25,"a":{"g":24,"l":24,"m":{"i":17,"p":69},"n":{"d":32,"t":{"s":{"h":{"i":303}}}},"p":90,"t":{".":32,"i":15},"r":{"t":{"l":{"i":12}}}},"e":{"d":21,"r":{"n":{"i":7},"o":19},"w":[{"a":6},8]},"h":{"e":23},"i":[{".":21,"a":19,"c":[{"k":32},29],"e":21,"f":23,"n":{"g":3},"r":32},9],"l":{"e":29},"o":{"c":{"k":32},"m":{"a":12},"n":{"e":32},"p":21,"r":{"e":27,"a":{"b":304}}},"r":[{"a":{"d":21,"t":{"u":32,"a":{"g":305}},"y":21},"i":{"d":21,"b":{"u":{"t":7}}},"y":18},1],"w":61,"y":[{"l":{"i":{"s":137}}},24],"b":4,"s":{"c":{"r":4}},"u":{"p":{"i":{"d":306}}}},"u":[{"a":{"l":2},"b":111,"g":151,"i":{"s":4,"t":12},"l":21,"m":[{"i":11},9],"n":9,"r":9,"p":{"e":{"r":{"e":307}}}},41],"v":18,"w":[{"o":18,"i":{"m":{"m":177}}},9],"y":[{"c":18,"l":27,"n":{"o":5,"c":41},"r":{"i":{"n":4}},"t":{"h":{"i":308}}},21]},"t":{"a":[{".":27,"b":[{"l":{"e":{"s":4}},"o":{"l":{"i":{"z":32,"s":{"m":309}}}}},25],"c":{"i":18},"d":{"o":4},"f":46,"i":{"l":{"o":5}},"l":[{"a":4,"e":{"n":5},"i":11,"k":[{"a":204},18],"l":{"i":{"s":0}},"o":{"g":4}},9],"m":{"o":4,"i":{"n":82}},"n":{"d":{"e":0},"t":{"a":54}},"p":{"e":{"r":4},"l":4,"a":{"t":{"h":310}}},"r":{"a":0,"c":18,"e":18,"i":{"z":3},"r":{"h":311}},"s":{"e":0,"y":4},"t":{"i":{"c":18},"u":{"r":1}},"u":{"n":17},"v":0,"w":25,"x":{"i":{"s":0}},"g":{"o":{"n":{".":3}}}},41],"b":42,"c":[{"h":[{"e":{"t":5},"c":15,"i":{"e":{"r":237}}},21],"r":29},18],"d":43,"e":{".":18,"a":{"d":{"i":17},"t":18,"c":{"h":{"e":{"r":{".":36}}}}},"c":{"e":17,"t":32},"d":[{"i":4},42],"e":41,"g":[{"e":{"r":4},"i":4},0],"l":{".":27,"i":17,"s":32,"e":{"g":84,"r":{"o":249}}},"m":{"a":[{"t":11},154]},"n":{"a":{"n":27},"c":27,"d":27,"e":{"s":18},"t":[{"a":{"g":0}},41]},"o":41,"p":[{"e":4},1],"r":{"c":11,"d":155,"i":[{"e":{"s":5},"s":11,"z":{"a":6},"c":{".":8}},41],"n":{"i":{"t":32}},"v":5,"g":{"e":{"i":312}}},"s":{".":18,"s":[{".":23,"e":{"s":313}},18]},"t":{"h":{"e":6}},"u":27,"x":27,"y":18},"f":42,"g":43,"h":{".":25,"a":{"n":17,"l":{"a":{"m":228}}},"e":[{"a":[{"s":3,"t":5},18],"i":{"s":11},"t":27},9],"i":{"c":{".":4,"a":4},"l":18,"n":{"k":32}},"l":18,"o":{"d":{"e":4,"i":{"c":32},"o":{"n":11}},"o":18,"r":{"i":{"t":6,"z":5}},"g":{"e":{"n":{"i":314}}},"k":{"e":{"r":175}}},"s":25,"y":{"l":{"a":{"n":228}},"s":{"c":11}}},"i":{"a":[{"b":1,"t":{"o":1},"n":{".":70}},41],"b":156,"c":{"k":18,"o":21,"u":157},"d":{"i":32},"e":{"n":27},"f":[{"y":4},8],"g":[{"u":32},25],"l":{"l":{"i":{"n":6}}},"m":[{"p":18,"u":{"l":5}},41],"n":[{"a":24,"e":{".":27},"i":27,"o":{"m":285}},42],"o":[{"c":4,"n":{"e":{"e":6}}},41],"q":32,"s":{"a":3,"e":27,"m":0,"o":4,"p":0,"t":{"i":{"c":{"a":32}}}},"t":{"l":3},"u":1,"v":[{"a":0},41],"z":[{"a":3,"e":{"n":3}},41]},"l":[{"a":[{"n":17},19],"e":{".":27,"d":27,"s":{".":27},"t":{".":19}},"o":19,"i":{"e":{"r":315}}},25],"m":[{"e":0},43],"n":81,"o":[{"b":3,"c":{"r":{"a":{"t":4}}},"d":{"o":18},"f":25,"g":{"r":9},"i":{"c":4},"m":{"a":9,"b":0,"y":3},"n":{"a":{"l":{"i":0},"t":3},"o":18,"y":18},"r":{"a":9,"i":{"e":3,"z":5}},"s":8,"u":{"r":32,"t":18},"w":{"a":{"r":3}},"l":{"o":{"g":{"y":84}}},"t":{"i":{"c":11}}},41],"p":43,"r":{"a":[{"b":11,"c":{"h":5,"i":[{"t":17},36],"t":{"e":17}},"s":17,"v":{"e":{"n":5,"s":158,"r":{"s":[{"a":{"b":317}},15]}}},"i":{"t":{"o":{"r":316}}}},41],"e":{"f":5,"m":[{"i":6},0],"a":{"c":{"h":{"e":318}}}},"i":{"a":[{"l":{".":1}},32],"c":{"e":{"s":5},"i":{"a":32},"s":18},"m":25,"v":0},"o":{"m":{"i":5},"n":{"i":6,"y":18},"p":{"h":{"e":5},"i":{"s":175},"o":{"l":{"e":{"s":320},"i":{"s":320,"t":321}}}},"s":{"p":11},"v":11,"l":{"e":{"u":{"m":319}}},"f":{"i":{"c":{".":17},"t":11}}},"u":{"i":5,"s":17}},"s":[{"c":[{"h":{"i":{"e":12}}},21],"h":0,"w":21},101],"t":[{"e":{"s":21},"o":19,"u":0,"r":{"i":{"b":{"u":{"t":322}}}}},66],"u":[{"a":[{"r":3},2],"b":{"i":1},"d":8,"e":18,"f":46,"i":76,"m":27,"n":{"i":{"s":1}},"p":{".":48},"r":{"e":27,"i":[{"s":11},32],"o":5,"y":4,"n":{"a":{"r":12}}},"s":27},41],"v":18,"w":[{"a":43,"i":{"s":17},"o":18,"h":29},1],"y":[{"a":18,"l":25,"p":{"e":12,"h":4,"a":{"l":64}}},41],"z":[{"e":1},18]},"u":{"a":{"b":18,"c":0,"n":{"a":4,"i":0},"r":{"a":{"n":{"t":5}},"d":8,"i":11,"t":11},"t":29,"v":0,"d":{"r":{"a":{"t":{"i":3,"u":15}}}}},"b":{"e":[{"l":21,"r":[{"o":21},23]},1],"i":[{"n":{"g":33}},72],"l":{"e":{".":23}}},"c":{"a":23,"i":{"b":0,"t":1},"l":{"e":12},"r":23,"u":23,"y":21},"d":{"d":4,"e":{"r":3,"s":{"t":4},"v":17},"i":{"c":29,"e":{"d":3,"s":3},"s":4,"t":19},"o":{"n":[{"y":232},21]},"s":{"i":1},"u":21},"e":{"n":{"e":21,"s":17,"t":{"e":0}},"r":{"i":{"l":0}},"a":{"m":15}},"f":{"a":27,"l":23},"g":{"h":{"e":{"n":11}},"i":{"n":4}},"i":[{"l":{"i":{"z":5}},"n":[{"g":29},1],"r":{"m":0},"t":{"a":17},"v":[{"e":{"r":{".":0}}},11]},156],"j":19,"k":18,"l":{"a":[{"b":5,"t":{"i":19}},29],"c":{"h":[{"e":32},17]},"d":{"e":{"r":3}},"e":[{"n":29},1],"g":{"i":1},"i":[{"a":19,"n":{"g":3},"s":{"h":4}},9],"l":{"a":{"r":1},"i":{"b":96,"s":1}},"m":61,"o":72,"s":[{"e":{"s":5}},18],"t":{"i":2,"r":{"a":54},"u":18},"u":[{"l":4},23],"v":4},"m":{"a":{"b":4},"b":{"i":1,"l":{"y":1}},"i":[{"n":{"g":83}},29],"o":{"r":{"o":6}},"p":9},"n":{"a":{"t":17},"e":[{"r":1},24],"i":[{"m":1,"n":24,"s":{"h":4},"v":11},29],"s":[{"w":1},93],"t":{"a":{"b":11},"e":{"r":{".":1},"s":1}},"u":0,"y":4,"z":4},"o":{"r":{"s":21},"s":19,"u":29},"p":{"e":[{"r":{"s":6}},29],"i":{"a":19,"n":{"g":3}},"l":23,"p":[{"o":{"r":{"t":10}}},3],"t":{"i":{"b":5},"u":17}},"r":{"a":[{".":18,"g":21,"s":21,"l":{".":216}},29],"b":{"e":1},"c":0,"d":2,"e":{"a":{"t":5}},"f":{"e":{"r":1},"r":1},"i":{"f":[{"i":{"c":0}},23],"n":2,"o":23,"t":29,"z":3,"a":{"l":{".":0}}},"l":[{"i":{"n":{"g":{".":5}}}},9],"n":{"o":1},"o":{"s":17},"p":{"e":1,"i":1},"s":{"e":{"r":5}},"t":{"e":{"s":4},"h":{"e":3},"i":[{"e":1},17]},"u":23},"s":[{"a":{"d":19,"n":19,"p":1},"c":[{"i":3},8],"e":{"a":5,"r":{".":9}},"i":{"a":19,"c":23},"l":{"i":{"n":1}},"p":2,"s":{"l":4},"t":{"e":{"r":{"e":4}},"r":2},"u":[{"r":17},24]},25],"t":{"a":{"b":0,"t":23},"e":{".":18,"l":18,"n":[{"i":17},18]},"i":[{"l":{"i":{"z":5}},"n":{"e":23,"g":3},"o":{"n":{"a":7}},"s":21,"z":31},101],"l":34,"o":{"f":4,"g":5,"m":{"a":{"t":{"i":{"c":5}}}},"n":19,"u":21},"s":0},"u":[{"m":1},23],"v":74,"x":{"u":11},"z":{"e":1}},"v":{"a":[{".":32,"b":159,"c":{"i":{"l":5},"u":11},"g":[{"e":1,"u":{"e":{"r":170}}},0],"l":{"i":{"e":4},"o":5,"u":15},"m":{"o":4},"n":{"i":{"z":4}},"p":{"i":4},"r":{"i":{"e":{"d":5}}},"t":[{"i":{"v":29}},27],"u":{"d":{"e":{"v":54}}}},41],"e":{".":18,"d":18,"g":11,"l":{".":23,"l":{"i":11},"o":1,"y":21},"n":{"o":{"m":11},"u":{"e":19}},"r":{"d":21,"e":{".":32,"l":[{"y":{".":41}},21],"n":[{"c":5},23],"s":21,"i":{"g":324}},"i":{"e":11},"m":{"i":{"n":36}},"s":{"e":27},"t":{"h":11}},"s":[{".":18,"t":{"e":0,"i":{"t":{"e":15}}}},99],"t":{"e":[{"r":11},1],"y":1}},"i":{"a":{"l":{"i":4},"n":32},"d":{"e":{".":32,"d":32,"n":47,"s":32},"i":32},"f":23,"g":{"n":4},"k":0,"l":[{"i":{"t":32,"z":127}},25],"n":[{"a":26,"c":24,"d":5,"g":18},29],"o":{"l":11,"r":73,"u":2},"p":1,"r":{"o":4},"s":{"i":{"t":11},"o":3,"u":3},"t":{"i":18,"r":11,"y":18},"v":[{"i":{"p":{"a":{"r":325}}}},27]},"o":{".":32,"i":[{"r":{"d":{"u":323}},"c":{"e":{"p":213}}},0],"k":27,"l":{"a":1,"e":19,"t":32,"v":27},"m":{"i":5},"r":{"a":{"b":5},"i":17,"y":1},"t":{"a":1,"e":{"e":18}}},"v":26,"y":21},"w":{"a":{"b":{"l":19},"c":25,"g":{"e":{"r":4},"o":5},"i":{"t":6},"l":{".":19},"m":0,"r":{"t":0},"s":{"t":[{"e":{"w":{"a":326}}},0]},"t":{"e":2},"v":{"e":{"r":4,"g":327}}},"b":29,"e":{"a":{"r":{"i":{"e":5}},"t":{"h":54}},"d":{"n":0},"e":{"t":12,"v":5,"k":{"n":137}},"l":{"l":0},"r":29,"s":{"t":12},"v":23},"h":{"i":0},"i":[{"l":[{"l":{"i":{"n":6}}},8],"n":{"d":{"e":0},"g":0},"r":0,"s":{"e":27},"t":{"h":12},"z":5,"d":{"e":{"s":{"p":6}}}},9],"k":21,"l":{"e":{"s":1},"i":{"n":3}},"n":{"o":21},"o":[{"m":15,"v":{"e":{"n":4}},"k":{"e":{"n":85}}},160],"p":19,"r":{"a":[{"p":{"a":{"r":{"o":12}}}},0],"i":[{"t":{"a":36,"e":{"r":{".":183}}}},0]},"s":{"h":23,"l":1,"p":{"e":1},"t":60},"t":18,"y":1,"c":23},"x":{"a":[{"c":{"e":5},"g":{"o":21},"m":11,"p":21,"s":5},29],"c":161,"e":[{"c":{"u":{"t":{"o":1}}},"d":24,"r":{"i":0,"o":4}},29],"h":[{"i":[{"l":6},8],"u":0},29],"i":[{"a":4,"c":4,"d":{"i":4},"m":{"e":21,"i":{"z":4}}},23],"o":[{"b":21},23],"p":[{"a":{"n":{"d":17}},"e":{"c":{"t":{"o":10}},"d":11}},23],"t":[{"i":23},74],"u":[{"a":3},29],"x":1,"q":[{"u":{"i":{"s":54}}},29]},"y":{"a":{"c":19,"r":110,"t":19},"b":29,"c":[{"e":[{"r":4},24],"h":[{"e":[{"d":264},0]},23],"o":{"m":17,"t":17}},29],"d":29,"e":{"e":19,"r":[{"f":21},29],"s":[{"t":{"e":{"r":{"y":328}}}},0],"t":1},"g":{"i":19},"h":47,"i":29,"l":{"a":23,"l":{"a":{"b":{"l":6}}},"o":23,"u":19},"m":{"b":{"o":{"l":7}},"e":[{"t":{"r":{"y":20}}},0],"p":{"a":12}},"n":{"c":{"h":{"r":3}},"d":4,"g":4,"i":{"c":4},"x":32},"o":[{"d":4,"g":33,"m":0,"n":{"e":{"t":4},"s":21},"s":21},72],"p":{"e":{"d":21,"r":6},"i":3,"o":[{"c":21},23],"t":{"a":9},"u":19},"r":{"a":{"m":5},"i":{"a":4},"o":23,"r":1},"s":{"c":1,"e":161,"i":{"c":{"a":3},"o":3,"s":27},"o":21,"s":0,"t":[{"a":3,"r":{"o":29}},2],"u":{"r":17}},"t":{"h":{"i":{"n":23}},"i":{"c":3}},"w":29},"z":{"a":[{"b":79,"r":8},2],"b":18,"e":[{"n":1,"p":1,"r":[{"o":3},29],"t":0},25],"i":[{"l":21,"s":21,"a":{"n":{".":23}}},42],"l":32,"m":18,"o":[{"m":1,"o":{"l":4},"p":{"h":{"r":329}}},41],"t":{"e":0},"z":[{"y":21,"w":231},101]}}',["as-so-ciate","as-so-ciates","dec-li-na-tion","oblig-a-tory","phil-an-thropic","present","presents","project","projects","reci-procity","re-cog-ni-zance","ref-or-ma-tion","ret-ri-bu-tion","ta-ble"]]})})(EC)),EC.exports}var J1t=Z1t();const X1t=hi(J1t),AM=e=>{let t=0,r="";const n=[];return e.forEach(i=>{r+=i.string,n.push({...i,start:t,end:t+i.string.length,attributes:i.attributes||{}}),t+=i.string.length}),{string:r,runs:n}},evt=e=>[e],tvt=(e={},t={})=>r=>{const n=[],i=[],a=t.hyphenationCallback||e.wordHyphenation?.()||evt;for(let l=0;lObject.assign({},e),GAe=(e,t)=>{const r=Object.assign({},e,{height:t}),n=Object.assign({},e,{y:e.y+t,height:e.height-t});return[r,n]},nvt=(e,t)=>{const[,r]=GAe(t,e);return r},ivt=e=>e.reduce((t,r)=>t+r.box.height,0),avt=e=>{const t=e.attributes||{},r=t.fontSize||12,n=t.font,i=typeof n=="string"?null:n?.[0]?.unitsPerEm;return i?r/i:0},Oy=e=>e.attributes?.scale||avt(e),eZ=(e,t)=>{if(!t)return 0;const r=t.glyphIndices||[],n=r[e];return r.slice(0,e).filter(i=>i===n).length},vM=e=>e.attributes?.font?.[0]||null,tZ=(e,t,r,n)=>{if(!n)return[];if(e===t)return[];if(e===0&&t===n.codePoints.length)return[n];const i=n.codePoints.slice(e,t),a=String.fromCodePoint(...i);return r?r.layout(a,void 0,void 0,void 0,"ltr").glyphs:[n]},m3=(e,t)=>{const r=t?.glyphIndices?.[e];return Qa(r)?e:r},qAe=e=>{const t=e[0];return e.map(r=>r-t)},Pb=(e,t,r)=>{const n=Oy(r),i=vM(r),a=m3(e,r),s=m3(t,r),l=r.glyphs?.[a],c=r.glyphs?.[s],u=eZ(e,r),d=u>0?tZ(u,1/0,i,l):[],f=eZ(t,r),m=tZ(0,f,i,c),g=a+Math.min(1,u),A=(r.glyphs||[]).slice(g,s),v=S=>({xAdvance:S.advanceWidth*n,yAdvance:0,xOffset:0,yOffset:0}),b=d.map(v),E=(r.positions||[]).slice(g,s),I=m.map(v);return Object.assign({},r,{start:r.start+e,end:Math.min(r.end,r.start+t),glyphIndices:qAe((r.glyphIndices||[]).slice(e,t)),glyphs:[d,A,m].flat(),positions:[b,E,I].flat()})},LT=(e,t)=>t?t.findIndex(r=>r.start<=e&&e{const n=LT(e,r),i=Math.max(LT(t-1,r),n);return r.slice(n,i+1)},svt=(e,t)=>{const r=t.start-e,n=t.end-e;return Object.assign({},t,{start:r,end:n})},ovt=(e,t,r)=>{const n=a=>Pb(e-a.start,t-a.start,a),i=a=>Pb(0,t-a.start,a);return r.map((a,s)=>{let l=a;const c=s===0,u=!c&&s===r.length-1;return c&&(l=n(a)),u&&(l=i(a)),svt(e,l)})},gx=(e,t,r)=>{if(r.string.length===0)return r;const n=r.string.slice(e,t),i=KAe(e,t,r.runs),a=ovt(e,t,i);return Object.assign({},r,{string:n,runs:a})},lvt=e=>e.search(/\S/g),cvt=e=>{const t=e.match(/\S/g);return t?e.lastIndexOf(t[t.length-1]):-1},uvt=e=>{const t=lvt(e.string),r=cvt(e.string);return gx(t,r+1,e)},dvt=()=>({start:0,end:0,glyphIndices:[],glyphs:[],positions:[],attributes:{}}),VAe=e=>typeof e=="number",fvt=(e,t)=>{const r=Im(t),n=Qa(r)?0:r+1,i=Array(e).fill(n);return t.concat(i)},YAe=(e,t)=>typeof t=="string"?null:t&&e?t.glyphForCodePoint(e):null,hvt=(e,t)=>{const r=e.codePoints?.length||0,n=t.end+r,i=t.glyphs.concat(e),a=fvt(r,t.glyphIndices);if(!t.positions)return Object.assign({},t,{end:n,glyphs:i,glyphIndices:a});const s=t.positions.concat({xAdvance:e.advanceWidth*Oy(t),yAdvance:0,xOffset:0,yOffset:0});return Object.assign({},t,{end:n,glyphs:i,glyphIndices:a,positions:s})},ZAe=(e,t)=>{if(!e)return t;const r=vM(t),n=VAe(e)?YAe(e,r):e;return hvt(n,t)},JAe=e=>String.fromCodePoint(...e||[]),XAe=(e,t)=>{const r=typeof e=="number"?[e]:e?.codePoints,n=JAe(r||[]),i=t.string+n,a=t.runs.slice(0,-1),s=Im(t.runs)||dvt(),l=a.concat(ZAe(e,s));return Object.assign({},t,{string:i,runs:l})},e1e=8230,mvt=String.fromCharCode(e1e),pvt=e=>{if(!e.encode)return e1e;const[t]=e.encode(mvt);return parseInt(t[0],16)},rZ=e=>{const t=Im(e)?.runs||[],r=Im(t)?.attributes?.font[0];if(r){const n=e.length-1,i=pvt(r),a=r.glyphForCodePoint(i),s=XAe(a,uvt(e[n]));return Object.assign([],e,{[n]:s})}return e},t1e=(e,t)=>{const r=Object.assign({},t.attributes);return delete r[e],Object.assign({},t,{attributes:r})},jB=e=>{const{font:t,attachment:r}=e.attributes,n=r?.height||0,i=typeof t=="string"?0:t?.[0]?.ascent||0;return Math.max(n,i*Oy(e))},r1e=e=>{const t=e.attributes?.font,r=typeof t=="string"?0:t?.[0]?.descent||0;return Oy(e)*r},gvt=e=>{const t=e.attributes?.font;return(typeof t=="string"?0:t?.[0]?.lineGap||0)*Oy(e)},n1e=e=>e.attributes?.lineHeight||gvt(e)+jB(e)-r1e(e),i1e=e=>{const t=(r,n)=>Math.max(r,n1e(n));return e.runs.reduce(t,0)},Avt=(e,t)=>{const r=Math.max(e.x,t.x),n=Math.min(e.x+e.width,t.x+t.width),i=Math.max(e.y,t.y),a=Math.min(e.y+e.height,t.y+t.height);return n>=r&&a>=i},vvt=(e,t)=>{if(!Avt(t,e))return[e];const r=t.x,n=t.x+t.width,i=e.x,a=e.x+e.width,s=Object.assign({},e,{width:r-i}),l=Object.assign({},e,{x:n,width:a-n});return[s,l].filter(c=>c.width>0)},xvt=(e,t)=>{let r=[e];for(let n=0;n{const l=vvt(s,i);return a.concat(l)},[])}return r},yvt=(e,t)=>{const{excludeRects:r,...n}=e;if(!r)return[n];const i=[],a=Math.max(...r.map(l=>l.y+l.height));let s=n;for(;s.y{if(!!e.string.includes(bvt))return e;const r=e.runs.map(n=>t1e("attachment",n));return Object.assign({},e,{runs:r})},Evt=(e,t,r)=>{let n=e.shift(),i=n.y;return t.map((a,s)=>{const l=s===0?r:0,c=a.runs?.[0]?.attributes||{},u=Math.max(i1e(a),c.lineHeight);i+u>n.y+n.height&&e.length>0&&(n=e.shift(),i=n.y);const d={string:a.string,runs:a.runs,box:{x:n.x+l,y:i,width:n.width-l,height:u}};return i+=u,wvt(d)})},Cvt=(e,t={})=>(r,n)=>{const i=i1e(n),a=n.runs?.[0]?.attributes?.indent||0,s=yvt(r,i),l=s.map(u=>u.width);l.unshift(l[0]-a);const c=e.linebreaker(t)(n,l);return Evt(s,c,a)},Ivt=(e,t)=>{const r=[];let n=0;for(let i=0;in=>{const i=[],a=[...n],s=Cvt(e,t),l=Qa(r.maxLines)?1/0:r.maxLines,c=r.truncateMode==="ellipsis";let u=l,d=rvt(r),f=a.shift();for(;u>0&&f;){const m=s(d,f),g=m.slice(0,u),A=ivt(g),v=c&&m.length!==g.length;if(u-=g.length,d.height>=A)i.push(v?rZ(g):g),d=nvt(A,d),f=a.shift();else{i.push(rZ(Ivt(d.height,g)));break}}return i},Bvt=e=>{const{runs:t}=e;return t.length===0?0:t[0].start},Nvt=e=>{const{runs:t}=e;return t.length===0?0:Im(t).end},a1e=e=>Nvt(e)-Bvt(e),nZ=gM(),kvt=e=>e.reduce((t,r)=>{const n=r.end-r.start,i=jAe(r.attributes.bidiLevel,n);return t.concat(i)},[]),_vt=(e,t)=>{const r=[];for(let n=0;n{const a=r.slice(n,i+1);for(let s=a.length-1;s>=0;s-=1)r[i-s]=a[s]}),r},iZ=(e,t,r)=>{for(let n=0;n=i.start&&r{const t=kvt(e.runs),n=e.runs[0]?.attributes.direction==="rtl"?1:0,s={paragraphs:[{start:0,end:a1e(e)-1,level:n}],levels:t},l=nZ.getReorderSegments(e.string,s);if(l.length===0)return e;const c=_vt(e.string,l),u=nZ.getReorderedString(e.string,s),d=e.runs.map(f=>{const m=c.slice(f.start,f.end),g=[],A=[],v=new Set;for(let b=0;be.map(jvt),Tvt=()=>e=>e.map(Dvt),Pvt=123,Ovt=(e=[])=>e.reduce((t,r)=>{const n=r?.codePoints||[Pvt];if(t.length===0)return n.map(()=>0);const i=t[t.length-1],a=n.map(()=>i+1);return[...t,...a]},[]),Rvt=e=>e.attributes?.characterSpacing||0,Fvt=(e,t)=>{const r=Oy(e),n=Rvt(e);return t.map((i,a)=>{const l=a===t.length?0:n;return Object.assign({},i,{xAdvance:i.xAdvance*r+l,yAdvance:i.yAdvance*r,xOffset:i.xOffset*r,yOffset:i.yOffset*r})})},Mvt=e=>t=>{const{start:r,end:n,attributes:i={}}=t,{font:a}=i;if(!a)return{...t,glyphs:[],glyphIndices:[],positions:[]};const s=e.slice(r,n);if(typeof a=="string")throw new Error("Invalid font");const l=a[0].layout(s,void 0,void 0,void 0,"ltr"),c=Fvt(t,l.positions),u=Ovt(l.glyphs);return{...t,positions:c,glyphIndices:u,glyphs:l.glyphs}},Qvt=()=>e=>{const t=e.runs.map(Mvt(e.string));return Object.assign({},e,{runs:t})},Lvt=e=>{if(!e.positions)return e;const t=e.attributes?.font?.[0]?.unitsPerEm||0,r=(e.attributes?.yOffset||0)*t,n=e.positions.map(i=>Object.assign({},i,{yOffset:r}));return Object.assign({},e,{positions:n})},Uvt=()=>e=>{const t=e.runs.map(Lvt);return Object.assign({},e,{runs:t})},$vt=e=>e.sort((t,r)=>t.start-r.start||t.end-r.end),aZ=e=>e.start===e.end,zvt=(e,t)=>e[1]-t[1]||e[3]-t[3],Hvt=e=>e.reduce((r,n,i)=>r.concat([["start",n.start,n.attributes,i],["end",n.end,n.attributes,i]]),[]).sort(zvt),Wvt=e=>e.reduce((t,r)=>{const n=Object.assign({},t.attributes,r.attributes);return Object.assign({},r,{attributes:n})},{}),Gvt=e=>{const t=e.reduce((r,n)=>(r[n.start]||(r[n.start]=[]),r[n.start].push(n),r),[]);return Object.values(t)},qvt=e=>Gvt(e).map(Wvt),Kvt=e=>{const t=[],r=Hvt(e);let n=-1,i={};const a=[];for(let s=0;s{const t=qvt(e.filter(n=>aZ(n))),r=Kvt(e.filter(n=>!aZ(n)));return $vt(t.concat(r))},s1e=()=>({string:"",runs:[]}),Yvt=e=>{const t=e.runs.map(r=>t1e("font",r));return Object.assign({},e,{runs:t})},Zvt=e=>t=>{if(Qa(t))return s1e();const{string:r}=t,{fontSubstitution:n,scriptItemizer:i,bidi:a}=e,{runs:s}=Yvt(t),{runs:l}=i()(t),{runs:c}=n()(t),{runs:u}=a()(t),d=u.concat(c).concat(l).concat(s);return{string:r,runs:Vvt(d)}},Jvt=()=>e=>{const t=[];let r=0,n=e.string.indexOf(` `)+1;for(;n>0;)t.push(gx(r,n,e)),r=n,n=e.string.indexOf(` `,n)+1;return r===0?t.push(e):re.reduce((t,r)=>t+(r.xAdvance||0),0),xM=e=>o1e(e.positions||[]),yM=e=>{const t=(r,n)=>r+xM(n);return e.runs.reduce(t,0)},Xvt=32,bM=e=>(e?.codePoints||[]).includes(Xvt),ext=e=>{const t=e.glyphs||[],r=e.positions||[],n=t.findIndex(i=>!bM(i));return r.slice(0,n)},txt=e=>ext(e).reduce((r,n)=>r+(n.xAdvance||0),0),rxt=e=>{const t=e.runs||[];return txt(t[0])},nxt=e=>{const t=yY(e.glyphs||[]),r=yY(e.positions||[]),n=t.findIndex(i=>!bM(i));return r.slice(0,n)},ixt=e=>nxt(e).reduce((r,n)=>r+(n.xAdvance||0),0),axt=e=>{const t=e.runs||[];return ixt(Im(t))},sxt=e=>Pb(0,e.end-e.start-1,e),oxt=e=>{const t=Ept(e.string),r=ypt(-1,sxt,e.runs);return Object.assign({},e,{string:t,runs:r})},lxt={center:.5,right:1},cxt=e=>Im(e.string)===` `?oxt(e):e,uxt=e=>rxt(e)+(e.overflowLeft||0),dxt=e=>axt(e)+(e.overflowRight||0),fxt=e=>{const t=uxt(e),r=dxt(e),n=e.box.x-t,i=e.box.width+t+r,a=Object.assign({},e.box,{x:n,width:i});return Object.assign({},e,{box:a,overflowLeft:t,overflowRight:r})},hxt=(e,t,r)=>n=>{const i=yM(n),a=lxt[r]||0,s=Math.max(0,n.box.width-i),l=r==="justify"||i>n.box.width,c=n.box.x+s*a,u=Object.assign({},n.box,{x:c}),d=Object.assign({},n,{box:u});return l?e.justification(t)(d):d},mxt=e=>{let t=0,r=0,n=0,i=0;const a=e.runs.map(s=>{const l=n1e(s),c=jB(s),u=r1e(s),d=xM(s);return n=Math.max(n,l),t=Math.max(t,c),r=Math.max(r,u),i+=d,Object.assign({},s,{height:l,ascent:c,descent:u,xAdvance:d})});return Object.assign({},e,{runs:a,height:n,ascent:t,descent:r,xAdvance:i})},pxt=(e,t)=>(r,n,i)=>{const a=n===i.length-1,s=r.runs?.[0]?.attributes||{},l=a?s.alignLastLine:s.align;return Zc(mxt,e.textDecoration(),hxt(e,t,l),fxt,cxt)(r)},gxt=(e,t)=>r=>{const n=pxt(e,t);return r.map(i=>i.map(n))},Axt=65532,vxt=e=>e.codePoints.includes(Axt),xxt=e=>{if(!e.positions)return e;const t=e.glyphs||[],r=e.attributes?.attachment;if(!r)return e;const n=e.positions.map((i,a)=>{const s=t[a];return r.width&&vxt(s)?Object.assign({},i,{xAdvance:r.width}):Object.assign({},i)});return Object.assign({},e,{positions:n})},yxt=()=>e=>{const t=e.runs.map(xxt);return Object.assign({},e,{runs:t})},bxt=e=>({align:e.align||(e.direction==="rtl"?"right":"left"),alignLastLine:e.alignLastLine||(e.align==="justify"?"left":e.align||"left"),attachment:e.attachment||null,backgroundColor:e.backgroundColor||null,bullet:e.bullet||null,characterSpacing:e.characterSpacing||0,color:e.color||"black",direction:e.direction||"ltr",features:e.features||[],fill:e.fill!==!1,font:e.font||[],fontSize:e.fontSize||12,hangingPunctuation:e.hangingPunctuation||!1,hyphenationFactor:e.hyphenationFactor||0,indent:e.indent||0,justificationFactor:e.justificationFactor||1,lineHeight:e.lineHeight||null,lineSpacing:e.lineSpacing||0,link:e.link||null,marginLeft:e.marginLeft||e.margin||0,marginRight:e.marginRight||e.margin||0,opacity:e.opacity,paddingTop:e.paddingTop||e.padding||0,paragraphSpacing:e.paragraphSpacing||0,script:e.script||null,shrinkFactor:e.shrinkFactor||0,strike:e.strike||!1,strikeColor:e.strikeColor||e.color||"black",strikeStyle:e.strikeStyle||"solid",stroke:e.stroke||!1,underline:e.underline||!1,underlineColor:e.underlineColor||e.color||"black",underlineStyle:e.underlineStyle||"solid",verticalAlign:e.verticalAlign||null,wordSpacing:e.wordSpacing||0,yOffset:e.yOffset||0}),wxt=e=>{const t=bxt(e.attributes);return Object.assign({},e,{attributes:t})},Ext=()=>e=>{const t=e.string||"",r=(e.runs||[]).map(wxt);return{string:t,runs:r}},Cxt=()=>e=>(e.runs.forEach(t=>{const{attributes:r}=t,{verticalAlign:n}=r;n==="sub"?r.yOffset=-.2:n==="super"&&(r.yOffset=.4)}),e),Ixt=gM(),Sxt=e=>e.reduce((t,r)=>{const n=r.end-r.start,i=jAe(r.attributes.bidiLevel,n);return t.concat(i)},[]),Bxt=()=>e=>{const t=Sxt(e.runs);let r="";return e.string.split("").forEach((i,a)=>{const l=t[a]%2===1?Ixt.getMirroredCharacter(e.string.charAt(a)):null;r+=l||i}),{...e,string:r}},l1e=e=>(t,r,n={})=>{const i=Zc(Uvt(),yxt(),Cxt(),tvt(e,n),Qvt(),Bxt(),Zvt(e)),a=s=>s.map(i);return Zc(gxt(e,n),Tvt(),Svt(e,n,r),a,Jvt(),Ext())(t)},Nxt=gM(),c1e=()=>e=>{const{string:t}=e,r=e.runs[0]?.attributes.direction,{levels:n}=Nxt.getEmbeddingLevels(t,r);let i=null,a=0,s=0;const l=[];for(let u=0;u{let n=null,i=1/0;const a={width:0,stretch:0,shrink:0},s=t[Math.min(r,t.length-1)],l=c=>{const u="stretch"in c?c.stretch:null;if(a.width0?(s-a.width)/a.stretch:nE;const d="shrink"in c?c.shrink:null;return a.width>s?d&&a.shrink-d>0?(s-a.width)/a.shrink:nE:0};for(let c=0;cs){if(n===null){let d=c===0?c+1:c;for(;d=m&&(n=c,i=m)}}return a.width-a.shrink>s?n:null},_xt=(e,t)=>{let r=0,n=0,i=e;const a=[0];for(;i.length>0;){const s=kxt(i,t,n);s!==null?(r+=s,a.push(r),i=i.slice(s+1,i.length),r++,n++):i=[]}return a};class jxt{data;prev;next;constructor(t){this.data=t,this.prev=null,this.next=null}}class r8{static Node=jxt;head;tail;listSize;listLength;constructor(){this.head=null,this.tail=null,this.listSize=0,this.listLength=0}isLinked(t){return!(t&&t.prev===null&&t.next===null&&this.tail!==t&&this.head!==t||this.isEmpty())}size(){return this.listSize}isEmpty(){return this.listSize===0}first(){return this.head}last(){return this.last}forEach(t){let r=this.head;for(;r!==null;)t(r),r=r.next}at(t){let r=this.head,n=0;if(t>=this.listLength||t<0)return null;for(;r!==null;){if(t===n)return r;r=r.next,n+=1}return null}insertAfter(t,r){return this.isLinked(t)?(r.prev=t,r.next=t.next,t.next===null?this.tail=r:t.next.prev=r,t.next=r,this.listSize+=1,this):this}insertBefore(t,r){return this.isLinked(t)?(r.prev=t.prev,r.next=t,t.prev===null?this.head=r:t.prev.next=r,t.prev=r,this.listSize+=1,this):this}push(t){return this.head===null?this.unshift(t):this.insertAfter(this.tail,t),this}unshift(t){return this.head===null?(this.head=t,this.tail=t,t.prev=null,t.next=null,this.listSize+=1):this.insertBefore(this.head,t),this}remove(t){return this.isLinked(t)?(t.prev===null?this.head=t.next:t.prev.next=t.next,t.next===null?this.tail=t.prev:t.next.prev=t.prev,this.listSize-=1,this):this}}function sZ(e,t,r,n,i,a){return{position:e,demerits:t,line:r,fitnessClass:n,totals:i||{width:0,stretch:0,shrink:0},previous:a}}function Dxt(e,t,r,n,i,a){let s=r.width-i.totals.width,l=0,c=0;const u=a0?(u-s)/l:_o.infinity):s>u?(c=r.shrink-i.totals.shrink,c>0?(u-s)/c:_o.infinity):0}function Txt(e,t,r){const n={width:t.width,stretch:t.stretch,shrink:t.shrink};for(let i=r;ir)break}return n}function Pxt(e){const t=[];if(e.size()===0)return[];let r={data:{demerits:1/0}};for(e.forEach(n=>{n.data.demerits{const n={demerits:{line:10,flagged:100,fitness:3e3},tolerance:r||3},i=new r8,a={width:0,stretch:0,shrink:0},s=t;i.push(new r8.Node(sZ(0,0,0,0,void 0,null)));function l(c,u,d){let f=i.first();for(;f!==null;){let m=0;const g=[{active:void 0,demerits:1/0},{active:void 0,demerits:1/0},{active:void 0,demerits:1/0},{active:void 0,demerits:1/0}];for(;f!==null;){m=f.data.line+1;const v=Dxt(d,s,a,u,f.data,m);if((v<-1||c.type==="penalty"&&c.penalty===-_o.infinity)&&i.remove(f),v>=-1&&v<=n.tolerance){const b=100*Math.pow(Math.abs(v),3);let E=0;c.type==="penalty"&&c.penalty>=0?E=Math.pow(n.demerits.line+b,2)+Math.pow(c.penalty,2):c.type==="penalty"&&c.penalty!==-_o.infinity?E=Math.pow(n.demerits.line+b,2)-Math.pow(c.penalty,2):E=Math.pow(n.demerits.line+b,2),c.type==="penalty"&&d[f.data.position].type==="penalty"&&(E+=n.demerits.flagged*c.flagged*d[f.data.position].flagged);let I;v<-.5?I=0:v<=.5?I=1:v<=1?I=2:I=3,Math.abs(I-f.data.fitnessClass)>1&&(E+=n.demerits.fitness),E+=f.data.demerits,E=m)break}const A=Txt(d,a,u);for(let v=0;v{if(c.type==="box"){a.width+=c.width;return}if(c.type==="glue"){u>0&&d[u-1].type==="box"&&l(c,u,d),a.width+=c.width,a.stretch+=c.stretch,a.shrink+=c.shrink;return}c.type==="penalty"&&c.penalty!==_o.infinity&&l(c,u,d)}),Pxt(i)};_o.infinity=1e4;_o.glue=(e,t,r,n,i)=>({type:"glue",start:t,end:r,width:e,stretch:n,shrink:i});_o.box=(e,t,r,n=!1)=>({type:"box",width:e,start:t,end:r,hyphenated:n});_o.penalty=(e,t,r)=>({type:"penalty",width:e,penalty:t,flagged:r});const Oxt=(e,t)=>{const r=t.start+e,n=t.end+e;return Object.assign({},t,{start:r,end:n})},Rxt=e=>e.end-e.start,Fxt=(e,t)=>{const r=e.end+Rxt(t),n=(e.glyphs||[]).concat(t.glyphs||[]),i=(e.positions||[]).concat(t.positions||[]),a=Object.assign({},e.attributes,t.attributes),s=e.glyphIndices||[],l=Im(s)||0,c=(t.glyphIndices||[]).map(d=>d+l+1),u=qAe(s.concat(c));return Object.assign({},e,{end:r,glyphs:n,positions:i,attributes:a,glyphIndices:u})},Mxt=(e,t,r)=>{if(!t)return r;const n=Pb(0,e,r),i=Pb(e,1/0,r);return Fxt(ZAe(t,n),i)},Qxt=(e,t,r)=>{const n=vM(r),i=VAe(t)?YAe(t,n):t;return Mxt(e,i,r)},Lxt=(e,t)=>LT(e,t.runs),Uxt=(e,t,r)=>{const n=Lxt(e,r);if(n===-1)return XAe(t,r);const i=[t],a=r.string.slice(0,e)+JAe(i)+r.string.slice(e),s=r.runs.map((l,c)=>c===n?Qxt(e-l.start,t,l):c>n?Oxt(i.length,l):l);return Object.assign({},r,{string:a,runs:s})},$xt=(e,t,r)=>{const n=r.start||0,i=Math.max(0,m3(e-n,r)),a=Math.max(0,m3(t-n,r)),s=(r.positions||[]).slice(i,a);return o1e(s)},zxt=(e,t,r)=>KAe(e,t,r.runs).reduce((i,a)=>i+$xt(e,t,a),0),Hxt=45,Wxt=5,Gxt=50,iE={width:3,stretch:6,shrink:9},qxt=(e,t,r)=>{let n=0,i=null;const a=r.reduce((s,l)=>{const c=t[l],u=t[l-1];if(l===t.length-1)return s;let d;return c.type==="penalty"?(i=u.end,d=gx(n,i,e),d=Uxt(d.string.length,Hxt,d)):(i=c.end,d=gx(n,i,e)),n=i,[...s,d]},[]);return a.push(gx(n,e.string.length,e)),a},Kxt=(e,{align:t},r)=>{let n=0;const i=5,{syllables:a}=e,s=r.hyphenationPenalty||(t==="justify"?100:600),l=a.reduce((c,u,d)=>{const f=zxt(n,n+u.length,e);if(u.trim()===""){const m=f*iE.width/iE.stretch,g=f*iE.width/iE.shrink,A=n+u.length;c.push(_o.glue(f,n,A,m,g))}else{const m=a[d+1]!==" ",g=n+u.length;c.push(_o.box(f,n,g,m)),a[d+1]&&m&&c.push(_o.penalty(i,s,1))}return n+=u.length,c},[]);return l.push(_o.glue(0,n,n,_o.infinity,0)),l.push(_o.penalty(0,-_o.infinity,1)),l},Vxt=e=>e.runs?.[0]?.attributes||{},u1e=e=>(t,r)=>{let n=e.tolerance||4;const i=Vxt(t),a=Kxt(t,i,e);let s=_o(a,r,n);for(;s.length===0&&n{const r=t.expandCharFactor||{},n=t.shrinkCharFactor||{};return e===ey.GROW?Object.assign({},Zxt,r):Object.assign({},Xxt,n)},tyt=(e,t)=>{const r=t.expandWhitespaceFactor||{},n=t.shrinkWhitespaceFactor||{};return e===ey.GROW?Object.assign({},Yxt,r):Object.assign({},Jxt,n)},ryt=(e,t)=>r=>{const n=eyt(e,t),i=tyt(e,t),a=[];for(let s=0;s0&&(a[s-1].after=0))):c.isMark&&s>0?(l=Object.assign({},a[s-1]),l.before=0,a[s-1].after=0):l=Object.assign({},n),a.push(l)}return a},nyt=(e,t,r)=>{const n=e>0?ey.GROW:ey.SHRINK,i=ryt(n,r),a=t.runs.reduce((s,l)=>s.concat(i(l.glyphs)),[]);return a[0].before=0,a[a.length-1].after=0,a},oZ=0,n8=3,iyt=(e,t)=>{let r=0;const n=[],i=[];for(let d=oZ;d<=n8;d+=1)n[d]=i[d]=0;for(let d=0;d0&&a>-1&&(n[a]=(s+(e-r))/s);const u=[];for(let d=0;d{let r=0;for(const n of t.runs)for(const i of n.positions)i.xAdvance+=e[r++];return t},h1e=e=>t=>{const r=t.box.width-yM(t);if(r===0)return t;const n=nyt(r,t,e),i=iyt(r,n);return ayt(i,t)},lZ=e=>{const t=(r,n)=>Math.max(r,jB(n));return e.runs.reduce(t,0)},syt=12,m1e=()=>e=>{let t=e.overflowLeft||0;const r=e.overflowRight||0,n=yM(e)-r;e.decorationLines=[];for(let i=0;ie=>{const{string:t}=e;let r="Unknown",n=0,i=0;const a=[];if(!t)return s1e();for(let l=0;le.split(g1e),aE={},uyt=e=>{const t=e.includes(g1e)?e:lyt(e);return cyt(t)},A1e=()=>e=>{const t=`_${e}`;return Qa(e)?[]:(aE[t]||(aE[t]=uyt(e)),aE[t])},dyt=[173],cZ=e=>e.attributes.fontSize||12,fyt=(e,t,r)=>{const n=[...t,r];for(let i=0;i({string:e,runs:t})=>{let r=null,n=null,i=0,a=0;const s=[];for(let l=0;l{var e=import.meta.url;return(function(t){t=t||{};var r;r||(r=typeof t<"u"?t:{});var n,i;r.ready=new Promise(function(le,ue){n=le,i=ue});var a=Object.assign({},r),s="";typeof document<"u"&&document.currentScript&&(s=document.currentScript.src),e&&(s=e),s.indexOf("blob:")!==0?s=s.substr(0,s.replace(/[?#].*/,"").lastIndexOf("/")+1):s="";var l=r.print||console.log.bind(console),c=r.printErr||console.warn.bind(console);Object.assign(r,a),a=null;var u;r.wasmBinary&&(u=r.wasmBinary),r.noExitRuntime,typeof WebAssembly!="object"&&X("no native wasm support detected");var d,f=!1;function m(le,ue,Fe){Fe=ue+Fe;for(var ze="";!(ue>=Fe);){var tt=le[ue++];if(!tt)break;if(tt&128){var xt=le[ue++]&63;if((tt&224)==192)ze+=String.fromCharCode((tt&31)<<6|xt);else{var Pt=le[ue++]&63;tt=(tt&240)==224?(tt&15)<<12|xt<<6|Pt:(tt&7)<<18|xt<<12|Pt<<6|le[ue++]&63,65536>tt?ze+=String.fromCharCode(tt):(tt-=65536,ze+=String.fromCharCode(55296|tt>>10,56320|tt&1023))}}else ze+=String.fromCharCode(tt)}return ze}var g,A,v,b,E,I,S,_,B;function T(){var le=d.buffer;g=le,r.HEAP8=A=new Int8Array(le),r.HEAP16=b=new Int16Array(le),r.HEAP32=I=new Int32Array(le),r.HEAPU8=v=new Uint8Array(le),r.HEAPU16=E=new Uint16Array(le),r.HEAPU32=S=new Uint32Array(le),r.HEAPF32=_=new Float32Array(le),r.HEAPF64=B=new Float64Array(le)}var P,O=[],z=[],L=[];function W(){var le=r.preRun.shift();O.unshift(le)}var R=0,$=null;function X(le){throw r.onAbort&&r.onAbort(le),le="Aborted("+le+")",c(le),f=!0,le=new WebAssembly.RuntimeError(le+". Build with -sASSERTIONS for more info."),i(le),le}function Z(le){return le.startsWith("data:application/octet-stream;base64,")}var K;if(K="data:application/octet-stream;base64,AGFzbQEAAAABugM3YAF/AGACf38AYAF/AX9gA39/fwBgAn98AGACf38Bf2ADf39/AX9gBH9/f30BfWADf398AGAAAGAEf39/fwBgAX8BfGACf38BfGAFf39/f38Bf2AAAX9gA39/fwF9YAZ/f31/fX8AYAV/f39/fwBgAn9/AX1gBX9/f319AX1gAX8BfWADf35/AX5gB39/f39/f38AYAZ/f39/f38AYAR/f39/AX9gBn9/f319fQF9YAR/f31/AGADf399AX1gBn98f39/fwF/YAR/fHx/AGACf30AYAh/f39/f39/fwBgDX9/f39/f39/f39/f38AYAp/f39/f39/f39/AGAFf39/f38BfGAEfHx/fwF9YA1/fX1/f399fX9/f39/AX9gB39/f319f38AYAJ+fwF/YAN/fX0BfWABfAF8YAN/fHwAYAR/f319AGAHf39/fX19fQF9YA1/fX99f31/fX19fX1/AX9gC39/f39/f399fX19AX9gCH9/f39/f319AGAEf39+fgBgB39/f39/f38Bf2ACfH8BfGAFf398fH8AYAN/f38BfGAEf39/fABgA39/fQBgBn9/fX99fwF/ArUBHgFhAWEAHwFhAWIAAwFhAWMACQFhAWQAFgFhAWUAEQFhAWYAIAFhAWcAAAFhAWgAIQFhAWkAAwFhAWoAAAFhAWsAFwFhAWwACgFhAW0ABQFhAW4AAwFhAW8AAQFhAXAAFwFhAXEABgFhAXIAAAFhAXMAIgFhAXQACgFhAXUADQFhAXYAFgFhAXcAAgFhAXgAAwFhAXkAGAFhAXoAAgFhAUEAAQFhAUIAEQFhAUMAAQFhAUQAAAOiAqACAgMSBwcACRkDAAoRBgYKEwAPDxMBBiMTCgcHGgMUASQFJRQHAwMKCgMmAQYYDxobFAAKBw8KBwMDAgkCAAAFGwACBwIHBgIDAQMIDAABKAkHBQURACkZASoAAAIrLAIALQcHBy4HLwkFCgMCMA0xAgMJAgACAQYKAQIBBQEACQIFAQEABQAODQ0GFQIBHBUGAgkCEAAAAAUyDzMMBQYINAUCAwUODg41AgMCAgIDBgICNgIBDAwMAQsLCwsLCx0CAAIAAAABABABBQIC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AAC4AEAQN/IAJBgARPBEAgACABIAIQFyAADwsgACACaiEDAkAgACABc0EDcUUEQAJAIABBA3FFBEAgACECDAELIAJFBEAgACECDAELIAAhAgNAIAIgAS0AADoAACABQQFqIQEgAkEBaiICQQNxRQ0BIAIgA0kNAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgACADQQRrIgRLBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAtIAQF/IwBBEGsiBCQAIAQgAzYCDAJAIABFBEBBAEEAIAEgAiAEKAIMEHEMAQsgACgC9AMgACABIAIgBCgCDBBxCyAEQRBqJAALkwECAX0BfyMAQRBrIgYkACAGQQhqIABB6ABqIAAgAkEBdGovAWIQH0MAAMB/IQUCQAJAAkAgBi0ADEEBaw4CAAECCyAGKgIIIQUMAQsgBioCCCADlEMK1yM8lCEFCyAALQADQRB0QYCAwABxBEAgBSAAIAEgAiAEEFQiA0MAAAAAIAMgA1sbkiEFCyAGQRBqJAAgBQu1AQECfyAAKAIEQQFqIgEgACgCACICKALsAyACKALoAyICa0ECdU8EQANAIAAoAggiAUUEQCAAQQA2AgggAEIANwIADwsgACABKAIENgIAIAAgASgCCDYCBCAAIAEoAgA2AgggARAjIAAoA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0AAkADQCABIAIoAuwDIAIoAugDIgJrQQJ1SQRAIAIgAUECdGooAgAiASgC3AMNAyABLwAVIAEtABdBEHRyIgJBgOAAcUGAwABHBEAgAkEIdkEPcSICBH8gAgUgAC0AFUEEdgtBBUYEQCAALQAUQQhxDQQLIAEtAABBAnENAyAEIAEgBBshBAsgA0EQahAuIAMoAhQiASADKAIQIgJyDQEMAwsLEAIACyABIQQLIAMoAhgiAQRAA0AgASgCACECIAEQIyACIgENAAsLIARFBEAgACoCmAMhBQwBCyAEEE4gBCoCoAOSIQULIANBIGokACAFC6EDAQh/AkAgACgC6AMiBSAAKALsAyIHRwRAA0AgACAFKAIAIgIoAuQDRwRAAkAgACgC9AMoAgAiAQRAIAIgACAGIAERBgAiAQ0BC0GIBBAeIgEgAigCEDYCECABIAIpAgg3AgggASACKQIANwIAIAFBFGogAkEUakHoABArGiABQgA3AoABIAFB/ABqIgNBADsBACABQgA3AogBIAFCADcCkAEgAyACQfwAahCgASABQZgBaiACQZgBakHQAhArGiABQQA2AvADIAFCADcC6AMgAigC7AMiAyACKALoAyIERwRAIAMgBGsiBEEASA0FIAEgBBAeIgM2AuwDIAEgAzYC6AMgASADIARqNgLwAyACKALoAyIEIAIoAuwDIghHBEADQCADIAQoAgA2AgAgA0EEaiEDIARBBGoiBCAIRw0ACwsgASADNgLsAwsgASACKQL0AzcC9AMgASACKAKEBDYChAQgASACKQL8AzcC/AMgAUEANgLkAwsgBSABNgIAIAEgADYC5AMLIAZBAWohBiAFQQRqIgUgB0cNAAsLDwsQAgALUAACQAJAAkACQAJAIAIOBAQAAQIDCyAAIAEgAUEwahBDDwsgACABIAFBMGogAxBEDwsgACABIAFBMGoQQg8LECQACyAAIAEgAUEwaiADEEULcAIBfwF9IwBBEGsiBCQAIARBCGogACABQQJ0QdwlaigCACACEDZDAADAfyEFAkACQAJAIAQtAAxBAWsOAgABAgsgBCoCCCEFDAELIAQqAgggA5RDCtcjPJQhBQsgBEEQaiQAIAVDAAAAACAFIAVb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NgIAIAAgATMBADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATAAADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATEAADcDAA8LAAsgAiACKAIAQQdqQXhxIgFBCGo2AgAgACABKwMAOQMADwsgACACIAMRAQALDwsgAiACKAIAIgFBBGo2AgAgACABNAIANwMADwsgAiACKAIAIgFBBGo2AgAgACABNQIANwMADwsgAiACKAIAQQdqQXhxIgFBCGo2AgAgACABKQMANwMAC84BAgN/An0jAEEQayIDJABBASEEIANBCGogAEH8AGoiBSAAIAFBAXRqQegAaiIBLwEAEB8CQAJAIAMqAggiByACKgIAIgZcBEAgByAHWwRAIAItAAQhAgwCCyAGIAZcIQQLIAItAAQhAiAERQ0AIAMtAAwgAkH/AXFGDQELIAUgASAGIAIQOQNAIAAtAAAiAUEEcQ0BIAAgAUEEcjoAACAAKAIQIgEEQCAAIAERAAALIABBgICA/gc2ApwBIAAoAuQDIgANAAsLIANBEGokAAtdAQR/IAAoAgAhAgNAIAIsAAAiAxBXBEBBfyEEIAAgAkEBaiICNgIAIAFBzJmz5gBNBH9BfyADQTBrIgMgAUEKbCIEaiADIARB/////wdzShsFIAQLIQEMAQsLIAELrhQCEn8BfiMAQdAAayIIJAAgCCABNgJMIAhBN2ohFyAIQThqIRQCQAJAAkACQANAIAEhDSAHIA5B/////wdzSg0BIAcgDmohDgJAAkACQCANIgctAAAiCQRAA0ACQAJAIAlB/wFxIgFFBEAgByEBDAELIAFBJUcNASAHIQkDQCAJLQABQSVHBEAgCSEBDAILIAdBAWohByAJLQACIQogCUECaiIBIQkgCkElRg0ACwsgByANayIHIA5B/////wdzIhhKDQcgAARAIAAgDSAHECYLIAcNBiAIIAE2AkwgAUEBaiEHQX8hEgJAIAEsAAEiChBXRQ0AIAEtAAJBJEcNACABQQNqIQcgCkEwayESQQEhFQsgCCAHNgJMQQAhDAJAIAcsAAAiCUEgayIBQR9LBEAgByEKDAELIAchCkEBIAF0IgFBidEEcUUNAANAIAggB0EBaiIKN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IAAgAkEFR0EAIAIbRQRAQbgwIAMgBBBJDwsgAyAEEHALIgEBfiABIAKtIAOtQiCGhCAEIAARFQAiBUIgiKckASAFpwuoAQEFfyAAKAJUIgMoAgAhBSADKAIEIgQgACgCFCAAKAIcIgdrIgYgBCAGSRsiBgRAIAUgByAGECsaIAMgAygCACAGaiIFNgIAIAMgAygCBCAGayIENgIECyAEIAIgAiAESxsiBARAIAUgASAEECsaIAMgAygCACAEaiIFNgIAIAMgAygCBCAEazYCBAsgBUEAOgAAIAAgACgCLCIBNgIcIAAgATYCFCACCwQAQgALBABBAAuKBQIGfgJ/IAEgASgCAEEHakF4cSIBQRBqNgIAIAAhCSABKQMAIQMgASkDCCEGIwBBIGsiCCQAAkAgBkL///////////8AgyIEQoCAgICAgMCAPH0gBEKAgICAgIDA/8MAfVQEQCAGQgSGIANCPIiEIQQgA0L//////////w+DIgNCgYCAgICAgIAIWgRAIARCgYCAgICAgIDAAHwhAgwCCyAEQoCAgICAgICAQH0hAiADQoCAgICAgICACFINASACIARCAYN8IQIMAQsgA1AgBEKAgICAgIDA//8AVCAEQoCAgICAgMD//wBRG0UEQCAGQgSGIANCPIiEQv////////8Dg0KAgICAgICA/P8AhCECDAELQoCAgICAgID4/wAhAiAEQv///////7//wwBWDQBCACECIARCMIinIgBBkfcASQ0AIAMhAiAGQv///////z+DQoCAgICAgMAAhCIFIQcCQCAAQYH3AGsiAUHAAHEEQCACIAFBQGqthiEHQgAhAgwBCyABRQ0AIAcgAa0iBIYgAkHAACABa62IhCEHIAIgBIYhAgsgCCACNwMQIAggBzcDGAJAQYH4ACAAayIAQcAAcQRAIAUgAEFAaq2IIQNCACEFDAELIABFDQAgBUHAACAAa62GIAMgAK0iAoiEIQMgBSACiCEFCyAIIAM3AwAgCCAFNwMIIAgpAwhCBIYgCCkDACIDQjyIhCECIAgpAxAgCCkDGIRCAFKtIANC//////////8Pg4QiA0KBgICAgICAgAhaBEAgAkIBfCECDAELIANCgICAgICAgIAIUg0AIAJC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ECMLVQECfyMAQTBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBAEEwEB4gAkEwECshACACQTBqJAAgAAs7AQF/IAEgACgCBCIFQQF1aiEBIAAoAgAhACABIAIgAyAEIAVBAXEEfyABKAIAIABqKAIABSAACxEdAAs3AQF/IAEgACgCBCIDQQF1aiEBIAAoAgAhACABIAIgA0EBcQR/IAEoAgAgAGooAgAFIAALERIACzcBAX8gASAAKAIEIgNBAXVqIQEgACgCACEAIAEgAiADQQFxBH8gASgCACAAaigCAAUgAAsRDAALNQEBfyABIAAoAgQiAkEBdWohASAAKAIAIQAgASACQQFxBH8gASgCACAAaigCAAUgAAsRCwALYQECfyMAQRBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBAEEQEB4iACACKQMINwMIIAAgAikDADcDACACQRBqJAAgAAtjAQJ/IwBBEGsiAyQAIAEgACgCBCIEQQF1aiEBIAAoAgAhACADIAEgAiAEQQFxBH8gASgCACAAaigCAAUgAAsRAwBBEBAeIgAgAykDCDcDCCAAIAMpAwA3AwAgA0EQaiQAIAALNwEBfyABIAAoAgQiA0EBdWohASAAKAIAIQAgASACIANBAXEEfyABKAIAIABqKAIABSAACxEEAAs5AQF/IAEgACgCBCIEQQF1aiEBIAAoAgAhACABIAIgAyAEQQFxBH8gASgCACAAaigCAAUgAAsRCAALCQAgASAAEQIACwUAQcM7Cw8AIAEgACgCAGogAjYCAAsNACABIAAoAgBqKAIACxgBAX9BEBAeIgBCADcDCCAAQQA2AgAgAAsYAQF/QRAQHiIAQgA3AwAgAEIANwMIIAALDABBMBAeQQBBMBAqCzcBAX8gASAAKAIEIgNBAXVqIQEgACgCACEAIAEgAiADQQFxBH8gASgCACAAaigCAAUgAAsRHgALBQBBvjsLIQAgACABKAIAIAEgASwAC0EASBtBuzsgAigCABAQNgIACyoBAX9BDBAeIgFBADoABCABIAAoAgA2A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AABB/gFxOgAACxAAIAAoAgAtAABBBHFBAnYLegECfyMAQRBrIgEkACAAKAIAIgAoAggEQANAIAAtAAAiAkEEcUUEQCAAIAJBBHI6AAAgACgCECICBEAgACACEQAACyAAQYCAgP4HNgKcASAAKALkAyIADQELCyABQRBqJAAPCyABQYAINgIAIABBBUHYJSABECwQJAALLgEBfyAAKAIIIQEgAEEANgIIIAEEQCABIAEoAgAoAgQRAAALIAAoAgBBADYCEAsXACAAKAIEKAIIIgAgACgCACgCCBEAAAsuAQF/IAAoAgghAiAAIAE2AgggAgRAIAIgAigCACgCBBEAAAsgACgCAEEFNgIQCz4BAX8gACgCBCEBIABBADYCBCABBEAgASABKAIAKAIEEQAACyAAKAIAIgBBADYCCCAAIAAtAABB7wFxOgAAC0kBAX8jAEEQayIGJAAgBiABKAIEKAIEIgEgAiADIAQgBSABKAIAKAIIERAAIAAgBisDALY4AgAgACAGKwMItjgCBCAGQRBqJAALcwECfyMAQRBrIgIkACAAKAIEIQMgACABNgIEIAMEQCADIAMoAgAoAgQRAAALIAAoAgAiACgC6AMgACgC7ANHBEAgAkH5IzYCACAAQQVB2CUgAhAsECQACyAAQQQ2AgggACAALQAAQRByOgAAIAJBEGokAAs8AQF/AkAgACgCACIAKALsAyAAKALoAyIAa0ECdSABTQ0AIAAgAUECdGooAgAiAEUNACAAKAIEIQILIAILGQAgACgCACgC5AMiAEUEQEEADwsgACgCBAsXACAAKAIAIgAoAuwDIAAoAugDa0ECdQuOAwEDfyMAQdACayICJAACQCAAKAIAIgAoAuwDIAAoAugDRg0AIAEoAgAiAygC5AMhASAAIAMQb0UNACAAIAFGBEAgAkEIakEAQcQCECoaIAJBADoAGCACQgA3AxAgAkGAgID+BzYCDCACQRxqQQBBxAEQKhogAkHgAWohBCACQSBqIQEDQCABQoCAgPyLgIDAv383AhAgAUKBgICAEDcCCCABQoCAgPyLgIDAv383AgAgAUEYaiIBIARHDQALIAJCgICA/IuAgMC/fzcD8AEgAkKBgICAEDcD6AEgAk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AAMMdAADUHQAAxB0AANsdAADUHQAAxB0AANsdAADiHQAAdmlpaWQAAADUHQAAxB0AAOIdAADbHQAAxR0AAMIdAADFHQAA2x0AAMIdAADFHQAA4h0AAMUdAADiHQAAxR0AANsdAABkaWlpAAAAAOEdAADEHQAA2x0AAGZpaWkAAAAA1B0AAMQdAADEHQAA3B0AANQdAADEHQAAxB0AANwdAADFHQAAxB0AAMQdAADEHQAAxB0AANwdAADUHQAAxB0AANUdAADVHQAAxB0AANQdAADEHQAAoR0AANQdAADEHQAAuR0AANUdAADFHQAAAAAAANQdAADEHQAA4h0AAOIdAADbHQAAdmlpZGRpAADBHQAAxR0AQcArC0EZAAoAGRkZAAAAAAUAAAAAAAAJAAAAAAsAAAAAAAAAABkAEQoZGRkDCgcAAQAJCxgAAAkGCwAACwAGGQAAABkZGQBBkSwLIQ4AAAAAAAAAABkACg0ZGRkADQAAAgAJDgAAAAkADgAADgBByywLAQwAQdcsCxUTAAAAABMAAAAACQwAAAAAAAwAAAwAQYUtCwEQAEGRLQsVDwAAAAQPAAAAAAkQAAAAAAAQAAAQAEG/LQsBEgBByy0LHhEAAAAAEQAAAAAJEgAAAAAAEgAAEgAAGgAAABoaGgBBgi4LDhoAAAAaGhoAAAAAAAAJAEGzLgsBFABBvy4LFRcAAAAAFwAAAAAJFAAAAAAAFAAAFABB7S4LARYAQfkuCycVAAAAABUAAAAACRYAAAAAABYAABYAADAxMjM0NTY3ODlBQkNERUYAQcQvCwHSAEHsLwsI//////////8AQbAwCwkQIgEAAAAAAAUAQcQwCwHNAEHcMAsKzgAAAM8AAAD8HQBB9DALAQIAQYQxCwj//////////wBByDELAQUAQdQxCwHQAEHsMQsOzgAAANEAAAAIHgAAAAQAQYQyCwEBAEGUMgsF/////woAQdgyCwHT",!Z(K)){var q=K;K=r.locateFile?r.locateFile(q,s):s+q}function Y(){var le=K;try{if(le==K&&u)return new Uint8Array(u);if(Z(le))try{var ue=Ha(le.slice(37)),Fe=new Uint8Array(ue.length);for(le=0;le=ue?"_"+le:le}function pe(le,ue){return le=ae(le),function(){return ue.apply(this,arguments)}}var _e=[{},{value:void 0},{value:null},{value:!0},{value:!1}],we=[];function xe(le){var ue=Error,Fe=pe(le,function(ze){this.name=le,this.message=ze,ze=Error(ze).stack,ze!==void 0&&(this.stack=this.toString()+` `+ze.replace(/^Error(:[^\n]*)?\n/,""))});return Fe.prototype=Object.create(ue.prototype),Fe.prototype.constructor=Fe,Fe.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},Fe}var Me=void 0;function ye(le){throw new Me(le)}var Ee=le=>(le||ye("Cannot use deleted val. handle = "+le),_e[le].value),me=le=>{switch(le){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var ue=we.length?we.pop():_e.length;return _e[ue]={ga:1,value:le},ue}},Se=void 0,Ie=void 0;function Be(le){for(var ue="";v[le];)ue+=Ie[v[le++]];return ue}var Xe=[];function ke(){for(;Xe.length;){var le=Xe.pop();le.M.$=!1,le.delete()}}var he=void 0,Le={};function Ye(le,ue){for(ue===void 0&&ye("ptr should not be undefined");le.R;)ue=le.ba(ue),le=le.R;return ue}var Oe={};function it(le){le=vo(le);var ue=Be(le);return ri(le),ue}function vt(le,ue){var Fe=Oe[le];return Fe===void 0&&ye(ue+" has unknown type "+it(le)),Fe}function mt(){}var Qt=!1;function Ot(le){--le.count.value,le.count.value===0&&(le.T?le.U.W(le.T):le.P.N.W(le.O))}function Wt(le,ue,Fe){return ue===Fe?le:Fe.R===void 0?null:(le=Wt(le,ue,Fe.R),le===null?null:Fe.na(le))}var Vt={};function xr(le,ue){return ue=Ye(le,ue),Le[ue]}var Ht=void 0;function Yt(le){throw new Ht(le)}function hr(le,ue){return ue.P&&ue.O||Yt("makeClassHandle requires ptr and ptrType"),!!ue.U!=!!ue.T&&Yt("Both smartPtrType and smartPtr must be specified"),ue.count={value:1},pr(Object.create(le,{M:{value:ue}}))}function pr(le){return typeof FinalizationRegistry>"u"?(pr=ue=>ue,le):(Qt=new FinalizationRegistry(ue=>{Ot(ue.M)}),pr=ue=>{var Fe=ue.M;return Fe.T&&Qt.register(ue,{M:Fe},ue),ue},mt=ue=>{Qt.unregister(ue)},pr(le))}var de={};function st(le){for(;le.length;){var ue=le.pop();le.pop()(ue)}}function gt(le){return this.fromWireType(I[le>>2])}var ve={},ce={};function Ge(le,ue,Fe){function ze(Tt){Tt=Fe(Tt),Tt.length!==le.length&&Yt("Mismatched type converter count");for(var nr=0;nr{Oe.hasOwnProperty(Tt)?tt[nr]=Oe[Tt]:(xt.push(Tt),ve.hasOwnProperty(Tt)||(ve[Tt]=[]),ve[Tt].push(()=>{tt[nr]=Oe[Tt],++Pt,Pt===xt.length&&ze(tt)}))}),xt.length===0&&ze(tt)}function ie(le){switch(le){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+le)}}function at(le,ue,Fe={}){if(!("argPackAdvance"in ue))throw new TypeError("registerType registeredInstance requires argPackAdvance");var ze=ue.name;if(le||ye('type "'+ze+'" must have a positive integer typeid pointer'),Oe.hasOwnProperty(le)){if(Fe.ua)return;ye("Cannot register type '"+ze+"' twice")}Oe[le]=ue,delete ce[le],ve.hasOwnProperty(le)&&(ue=ve[le],delete ve[le],ue.forEach(tt=>tt()))}function bt(le){ye(le.M.P.N.name+" instance already deleted")}function U(){}function Re(le,ue,Fe){if(le[ue].S===void 0){var ze=le[ue];le[ue]=function(){return le[ue].S.hasOwnProperty(arguments.length)||ye("Function '"+Fe+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+le[ue].S+")!"),le[ue].S[arguments.length].apply(this,arguments)},le[ue].S=[],le[ue].S[ze.Z]=ze}}function He(le,ue){r.hasOwnProperty(le)?(ye("Cannot register public name '"+le+"' twice"),Re(r,le,le),r.hasOwnProperty(void 0)&&ye("Cannot register multiple overloads of a function with the same number of arguments (undefined)!"),r[le].S[void 0]=ue):r[le]=ue}function se(le,ue,Fe,ze,tt,xt,Pt,Tt){this.name=le,this.constructor=ue,this.X=Fe,this.W=ze,this.R=tt,this.pa=xt,this.ba=Pt,this.na=Tt,this.ja=[]}function be(le,ue,Fe){for(;ue!==Fe;)ue.ba||ye("Expected null or instance of "+Fe.name+", got an instance of "+ue.name),le=ue.ba(le),ue=ue.R;return le}function We(le,ue){return ue===null?(this.ea&&ye("null is not a valid "+this.name),0):(ue.M||ye('Cannot pass "'+Bn(ue)+'" as a '+this.name),ue.M.O||ye("Cannot pass deleted object as a pointer of type "+this.name),be(ue.M.O,ue.M.P.N,this.N))}function er(le,ue){if(ue===null){if(this.ea&&ye("null is not a valid "+this.name),this.da){var Fe=this.fa();return le!==null&&le.push(this.W,Fe),Fe}return 0}if(ue.M||ye('Cannot pass "'+Bn(ue)+'" as a '+this.name),ue.M.O||ye("Cannot pass deleted object as a pointer of type "+this.name),!this.ca&&ue.M.P.ca&&ye("Cannot convert argument of type "+(ue.M.U?ue.M.U.name:ue.M.P.name)+" to parameter type "+this.name),Fe=be(ue.M.O,ue.M.P.N,this.N),this.da)switch(ue.M.T===void 0&&ye("Passing raw pointer to smart pointer is illegal"),this.Ba){case 0:ue.M.U===this?Fe=ue.M.T:ye("Cannot convert argument of type "+(ue.M.U?ue.M.U.name:ue.M.P.name)+" to parameter type "+this.name);break;case 1:Fe=ue.M.T;break;case 2:if(ue.M.U===this)Fe=ue.M.T;else{var ze=ue.clone();Fe=this.xa(Fe,me(function(){ze.delete()})),le!==null&&le.push(this.W,Fe)}break;default:ye("Unsupporting sharing policy")}return Fe}function zt(le,ue){return ue===null?(this.ea&&ye("null is not a valid "+this.name),0):(ue.M||ye('Cannot pass "'+Bn(ue)+'" as a '+this.name),ue.M.O||ye("Cannot pass deleted object as a pointer of type "+this.name),ue.M.P.ca&&ye("Cannot convert argument of type "+ue.M.P.name+" to parameter type "+this.name),be(ue.M.O,ue.M.P.N,this.N))}function Te(le,ue,Fe,ze){this.name=le,this.N=ue,this.ea=Fe,this.ca=ze,this.da=!1,this.W=this.xa=this.fa=this.ka=this.Ba=this.wa=void 0,ue.R!==void 0?this.toWireType=er:(this.toWireType=ze?We:zt,this.V=null)}function jt(le,ue){r.hasOwnProperty(le)||Yt("Replacing nonexistant public symbol"),r[le]=ue,r[le].Z=void 0}function $r(le,ue){var Fe=[];return function(){if(Fe.length=0,Object.assign(Fe,arguments),le.includes("j")){var ze=r["dynCall_"+le];ze=Fe&&Fe.length?ze.apply(null,[ue].concat(Fe)):ze.call(null,ue)}else ze=P.get(ue).apply(null,Fe);return ze}}function Br(le,ue){le=Be(le);var Fe=le.includes("j")?$r(le,ue):P.get(ue);return typeof Fe!="function"&&ye("unknown function pointer with signature "+le+": "+ue),Fe}var rr=void 0;function Ne(le,ue){function Fe(xt){tt[xt]||Oe[xt]||(ce[xt]?ce[xt].forEach(Fe):(ze.push(xt),tt[xt]=!0))}var ze=[],tt={};throw ue.forEach(Fe),new rr(le+": "+ze.map(it).join([", "]))}function St(le,ue,Fe,ze,tt){var xt=ue.length;2>xt&&ye("argTypes array size mismatch! Must at least get return value and 'this' types!");var Pt=ue[1]!==null&&Fe!==null,Tt=!1;for(Fe=1;Fe>2]);return Fe}function un(le){4>2])};case 3:return function(Fe){return this.fromWireType(B[Fe>>3])};default:throw new TypeError("Unknown float type: "+le)}}function Tn(le,ue,Fe){switch(ue){case 0:return Fe?function(ze){return A[ze]}:function(ze){return v[ze]};case 1:return Fe?function(ze){return b[ze>>1]}:function(ze){return E[ze>>1]};case 2:return Fe?function(ze){return I[ze>>2]}:function(ze){return S[ze>>2]};default:throw new TypeError("Unknown integer type: "+le)}}function Sr(le,ue){for(var Fe="",ze=0;!(ze>=ue/2);++ze){var tt=b[le+2*ze>>1];if(tt==0)break;Fe+=String.fromCharCode(tt)}return Fe}function wn(le,ue,Fe){if(Fe===void 0&&(Fe=2147483647),2>Fe)return 0;Fe-=2;var ze=ue;Fe=Fe<2*le.length?Fe/2:le.length;for(var tt=0;tt>1]=le.charCodeAt(tt),ue+=2;return b[ue>>1]=0,ue-ze}function qi(le){return 2*le.length}function ia(le,ue){for(var Fe=0,ze="";!(Fe>=ue/4);){var tt=I[le+4*Fe>>2];if(tt==0)break;++Fe,65536<=tt?(tt-=65536,ze+=String.fromCharCode(55296|tt>>10,56320|tt&1023)):ze+=String.fromCharCode(tt)}return ze}function Fo(le,ue,Fe){if(Fe===void 0&&(Fe=2147483647),4>Fe)return 0;var ze=ue;Fe=ze+Fe-4;for(var tt=0;tt=xt){var Pt=le.charCodeAt(++tt);xt=65536+((xt&1023)<<10)|Pt&1023}if(I[ue>>2]=xt,ue+=4,ue+4>Fe)break}return I[ue>>2]=0,ue-ze}function $i(le){for(var ue=0,Fe=0;Fe=ze&&++Fe,ue+=4}return ue}var Kn={};function Ua(le){var ue=Kn[le];return ue===void 0?Be(le):ue}var ss=[];function os(le){var ue=ss.length;return ss.push(le),ue}function $a(le,ue){for(var Fe=Array(le),ze=0;ze>2],"parameter "+ze);return Fe}var lr=[],eo=[null,[],[]];Me=r.BindingError=xe("BindingError"),r.count_emval_handles=function(){for(var le=0,ue=5;ue<_e.length;++ue)_e[ue]!==void 0&&++le;return le},r.get_first_emval=function(){for(var le=5;le<_e.length;++le)if(_e[le]!==void 0)return _e[le];return null},Se=r.PureVirtualError=xe("PureVirtualError");for(var yi=Array(256),za=0;256>za;++za)yi[za]=String.fromCharCode(za);Ie=yi,r.getInheritedInstanceCount=function(){return Object.keys(Le).length},r.getLiveInheritedInstances=function(){var le=[],ue;for(ue in Le)Le.hasOwnProperty(ue)&&le.push(Le[ue]);return le},r.flushPendingDeletes=ke,r.setDelayFunction=function(le){he=le,Xe.length&&he&&he(ke)},Ht=r.InternalError=xe("InternalError"),U.prototype.isAliasOf=function(le){if(!(this instanceof U&&le instanceof U))return!1;var ue=this.M.P.N,Fe=this.M.O,ze=le.M.P.N;for(le=le.M.O;ue.R;)Fe=ue.ba(Fe),ue=ue.R;for(;ze.R;)le=ze.ba(le),ze=ze.R;return ue===ze&&Fe===le},U.prototype.clone=function(){if(this.M.O||bt(this),this.M.aa)return this.M.count.value+=1,this;var le=pr,ue=Object,Fe=ue.create,ze=Object.getPrototypeOf(this),tt=this.M;return le=le(Fe.call(ue,ze,{M:{value:{count:tt.count,$:tt.$,aa:tt.aa,O:tt.O,P:tt.P,T:tt.T,U:tt.U}}})),le.M.count.value+=1,le.M.$=!1,le},U.prototype.delete=function(){this.M.O||bt(this),this.M.$&&!this.M.aa&&ye("Object already scheduled for deletion"),mt(this),Ot(this.M),this.M.aa||(this.M.T=void 0,this.M.O=void 0)},U.prototype.isDeleted=function(){return!this.M.O},U.prototype.deleteLater=function(){return this.M.O||bt(this),this.M.$&&!this.M.aa&&ye("Object already scheduled for deletion"),Xe.push(this),Xe.length===1&&he&&he(ke),this.M.$=!0,this},Te.prototype.qa=function(le){return this.ka&&(le=this.ka(le)),le},Te.prototype.ha=function(le){this.W&&this.W(le)},Te.prototype.argPackAdvance=8,Te.prototype.readValueFromPointer=gt,Te.prototype.deleteObject=function(le){le!==null&&le.delete()},Te.prototype.fromWireType=function(le){function ue(){return this.da?hr(this.N.X,{P:this.wa,O:Fe,U:this,T:le}):hr(this.N.X,{P:this,O:le})}var Fe=this.qa(le);if(!Fe)return this.ha(le),null;var ze=xr(this.N,Fe);if(ze!==void 0)return ze.M.count.value===0?(ze.M.O=Fe,ze.M.T=le,ze.clone()):(ze=ze.clone(),this.ha(le),ze);if(ze=this.N.pa(Fe),ze=Vt[ze],!ze)return ue.call(this);ze=this.ca?ze.la:ze.pointerType;var tt=Wt(Fe,this.N,ze.N);return tt===null?ue.call(this):this.da?hr(ze.N.X,{P:ze,O:tt,U:this,T:le}):hr(ze.N.X,{P:ze,O:tt})},rr=r.UnboundTypeError=xe("UnboundTypeError");var Ha=typeof atob=="function"?atob:function(le){var ue="",Fe=0;le=le.replace(/[^A-Za-z0-9\+\/=]/g,"");do{var ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(le.charAt(Fe++)),tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(le.charAt(Fe++)),xt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(le.charAt(Fe++)),Pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(le.charAt(Fe++));ze=ze<<2|tt>>4,tt=(tt&15)<<4|xt>>2;var Tt=(xt&3)<<6|Pt;ue+=String.fromCharCode(ze),xt!==64&&(ue+=String.fromCharCode(tt)),Pt!==64&&(ue+=String.fromCharCode(Tt))}while(FePt.ta).concat(tt.map(Pt=>Pt.za));Ge([le],xt,Pt=>{var Tt={};return tt.forEach((nr,Lt)=>{var vr=Pt[Lt],jr=nr.ra,fn=nr.sa,bi=Pt[Lt+tt.length],pn=nr.ya,Vr=nr.Aa;Tt[nr.oa]={read:Aa=>vr.fromWireType(jr(fn,Aa)),write:(Aa,xo)=>{var ls=[];pn(Vr,Aa,bi.toWireType(ls,xo)),st(ls)}}}),[{name:ue.name,fromWireType:function(nr){var Lt={},vr;for(vr in Tt)Lt[vr]=Tt[vr].read(nr);return ze(nr),Lt},toWireType:function(nr,Lt){for(var vr in Tt)if(!(vr in Lt))throw new TypeError('Missing field: "'+vr+'"');var jr=Fe();for(vr in Tt)Tt[vr].write(jr,Lt[vr]);return nr!==null&&nr.push(ze,jr),jr},argPackAdvance:8,readValueFromPointer:gt,V:ze}]})},v:function(){},B:function(le,ue,Fe,ze,tt){var xt=ie(Fe);ue=Be(ue),at(le,{name:ue,fromWireType:function(Pt){return!!Pt},toWireType:function(Pt,Tt){return Tt?ze:tt},argPackAdvance:8,readValueFromPointer:function(Pt){if(Fe===1)var Tt=A;else if(Fe===2)Tt=b;else if(Fe===4)Tt=I;else throw new TypeError("Unknown boolean type size: "+ue);return this.fromWireType(Tt[Pt>>xt])},V:null})},f:function(le,ue,Fe,ze,tt,xt,Pt,Tt,nr,Lt,vr,jr,fn){vr=Be(vr),xt=Br(tt,xt),Tt&&(Tt=Br(Pt,Tt)),Lt&&(Lt=Br(nr,Lt)),fn=Br(jr,fn);var bi=ae(vr);He(bi,function(){Ne("Cannot construct "+vr+" due to unbound types",[ze])}),Ge([le,ue,Fe],ze?[ze]:[],function(pn){if(pn=pn[0],ze)var Vr=pn.N,Aa=Vr.X;else Aa=U.prototype;pn=pe(bi,function(){if(Object.getPrototypeOf(this)!==xo)throw new Me("Use 'new' to construct "+vr);if(ls.Y===void 0)throw new Me(vr+" has no accessible constructor");var hl=ls.Y[arguments.length];if(hl===void 0)throw new Me("Tried to invoke ctor of "+vr+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(ls.Y).toString()+") parameters instead!");return hl.apply(this,arguments)});var xo=Object.create(Aa,{constructor:{value:pn}});pn.prototype=xo;var ls=new se(vr,pn,xo,fn,Vr,xt,Tt,Lt);Vr=new Te(vr,ls,!0,!1),Aa=new Te(vr+"*",ls,!1,!1);var ac=new Te(vr+" const*",ls,!1,!0);return Vt[le]={pointerType:Aa,la:ac},jt(bi,pn),[Vr,Aa,ac]})},d:function(le,ue,Fe,ze,tt,xt,Pt){var Tt=Zt(Fe,ze);ue=Be(ue),xt=Br(tt,xt),Ge([],[le],function(nr){function Lt(){Ne("Cannot call "+vr+" due to unbound types",Tt)}nr=nr[0];var vr=nr.name+"."+ue;ue.startsWith("@@")&&(ue=Symbol[ue.substring(2)]);var jr=nr.N.constructor;return jr[ue]===void 0?(Lt.Z=Fe-1,jr[ue]=Lt):(Re(jr,ue,vr),jr[ue].S[Fe-1]=Lt),Ge([],Tt,function(fn){return fn=St(vr,[fn[0],null].concat(fn.slice(1)),null,xt,Pt),jr[ue].S===void 0?(fn.Z=Fe-1,jr[ue]=fn):jr[ue].S[Fe-1]=fn,[]}),[]})},p:function(le,ue,Fe,ze,tt,xt){0{Ne("Cannot construct "+Tt.name+" due to unbound types",Pt)},Ge([],Pt,function(Lt){return Lt.splice(1,0,null),Tt.N.Y[ue-1]=St(nr,Lt,null,tt,xt),[]}),[]})},a:function(le,ue,Fe,ze,tt,xt,Pt,Tt){var nr=Zt(Fe,ze);ue=Be(ue),xt=Br(tt,xt),Ge([],[le],function(Lt){function vr(){Ne("Cannot call "+jr+" due to unbound types",nr)}Lt=Lt[0];var jr=Lt.name+"."+ue;ue.startsWith("@@")&&(ue=Symbol[ue.substring(2)]),Tt&&Lt.N.ja.push(ue);var fn=Lt.N.X,bi=fn[ue];return bi===void 0||bi.S===void 0&&bi.className!==Lt.name&&bi.Z===Fe-2?(vr.Z=Fe-2,vr.className=Lt.name,fn[ue]=vr):(Re(fn,ue,jr),fn[ue].S[Fe-2]=vr),Ge([],nr,function(pn){return pn=St(jr,pn,Lt,xt,Pt),fn[ue].S===void 0?(pn.Z=Fe-2,fn[ue]=pn):fn[ue].S[Fe-2]=pn,[]}),[]})},A:function(le,ue){ue=Be(ue),at(le,{name:ue,fromWireType:function(Fe){var ze=Ee(Fe);return un(Fe),ze},toWireType:function(Fe,ze){return me(ze)},argPackAdvance:8,readValueFromPointer:gt,V:null})},n:function(le,ue,Fe){Fe=ie(Fe),ue=Be(ue),at(le,{name:ue,fromWireType:function(ze){return ze},toWireType:function(ze,tt){return tt},argPackAdvance:8,readValueFromPointer:dn(ue,Fe),V:null})},e:function(le,ue,Fe,ze,tt){ue=Be(ue),tt===-1&&(tt=4294967295),tt=ie(Fe);var xt=Tt=>Tt;if(ze===0){var Pt=32-8*Fe;xt=Tt=>Tt<>>Pt}Fe=ue.includes("unsigned")?function(Tt,nr){return nr>>>0}:function(Tt,nr){return nr},at(le,{name:ue,fromWireType:xt,toWireType:Fe,argPackAdvance:8,readValueFromPointer:Tn(ue,tt,ze!==0),V:null})},b:function(le,ue,Fe){function ze(xt){xt>>=2;var Pt=S;return new tt(g,Pt[xt+1],Pt[xt])}var tt=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][ue];Fe=Be(Fe),at(le,{name:Fe,fromWireType:ze,argPackAdvance:8,readValueFromPointer:ze},{ua:!0})},o:function(le,ue){ue=Be(ue);var Fe=ue==="std::string";at(le,{name:ue,fromWireType:function(ze){var tt=S[ze>>2],xt=ze+4;if(Fe)for(var Pt=xt,Tt=0;Tt<=tt;++Tt){var nr=xt+Tt;if(Tt==tt||v[nr]==0){if(Pt=Pt?m(v,Pt,nr-Pt):"",Lt===void 0)var Lt=Pt;else Lt+="\0",Lt+=Pt;Pt=nr+1}}else{for(Lt=Array(tt),Tt=0;Tt=nr?Tt++:2047>=nr?Tt+=2:55296<=nr&&57343>=nr?(Tt+=4,++xt):Tt+=3}xt=Tt}else xt=tt.length;if(Tt=Wa(4+xt+1),nr=Tt+4,S[Tt>>2]=xt,Fe&&Pt){if(Pt=nr,nr=xt+1,xt=v,0=vr){var jr=tt.charCodeAt(++Lt);vr=65536+((vr&1023)<<10)|jr&1023}if(127>=vr){if(Pt>=nr)break;xt[Pt++]=vr}else{if(2047>=vr){if(Pt+1>=nr)break;xt[Pt++]=192|vr>>6}else{if(65535>=vr){if(Pt+2>=nr)break;xt[Pt++]=224|vr>>12}else{if(Pt+3>=nr)break;xt[Pt++]=240|vr>>18,xt[Pt++]=128|vr>>12&63}xt[Pt++]=128|vr>>6&63}xt[Pt++]=128|vr&63}}xt[Pt]=0}}else if(Pt)for(Pt=0;PtE,Tt=1;else ue===4&&(ze=ia,tt=Fo,xt=$i,Pt=()=>S,Tt=2);at(le,{name:Fe,fromWireType:function(nr){for(var Lt=S[nr>>2],vr=Pt(),jr,fn=nr+4,bi=0;bi<=Lt;++bi){var pn=nr+4+bi*ue;(bi==Lt||vr[pn>>Tt]==0)&&(fn=ze(fn,pn-fn),jr===void 0?jr=fn:(jr+="\0",jr+=fn),fn=pn+ue)}return ri(nr),jr},toWireType:function(nr,Lt){typeof Lt!="string"&&ye("Cannot pass non-string to C++ string type "+Fe);var vr=xt(Lt),jr=Wa(4+vr+ue);return S[jr>>2]=vr>>Tt,tt(Lt,jr+4,vr+ue),nr!==null&&nr.push(ri,jr),jr},argPackAdvance:8,readValueFromPointer:gt,V:function(nr){ri(nr)}})},k:function(le,ue,Fe,ze,tt,xt){de[le]={name:Be(ue),fa:Br(Fe,ze),W:Br(tt,xt),ia:[]}},h:function(le,ue,Fe,ze,tt,xt,Pt,Tt,nr,Lt){de[le].ia.push({oa:Be(ue),ta:Fe,ra:Br(ze,tt),sa:xt,za:Pt,ya:Br(Tt,nr),Aa:Lt})},C:function(le,ue){ue=Be(ue),at(le,{va:!0,name:ue,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},s:function(le,ue,Fe,ze,tt){le=ss[le],ue=Ee(ue),Fe=Ua(Fe);var xt=[];return S[ze>>2]=me(xt),le(ue,Fe,xt,tt)},t:function(le,ue,Fe,ze){le=ss[le],ue=Ee(ue),Fe=Ua(Fe),le(ue,Fe,null,ze)},g:un,m:function(le,ue){var Fe=$a(le,ue),ze=Fe[0];ue=ze.name+"_$"+Fe.slice(1).map(function(Pt){return Pt.name}).join("_")+"$";var tt=lr[ue];if(tt!==void 0)return tt;var xt=Array(le-1);return tt=os((Pt,Tt,nr,Lt)=>{for(var vr=0,jr=0;jr>>=0,2147483648=Fe;Fe*=2){var ze=ue*(1+.2/Fe);ze=Math.min(ze,le+100663296);var tt=Math;ze=Math.max(le,ze),tt=tt.min.call(tt,2147483648,ze+(65536-ze%65536)%65536);e:{try{d.grow(tt-g.byteLength+65535>>>16),T();var xt=1;break e}catch{}xt=void 0}if(xt)return!0}return!1},z:function(){return 52},u:function(){return 70},y:function(le,ue,Fe,ze){for(var tt=0,xt=0;xt>2],Tt=S[ue+4>>2];ue+=8;for(var nr=0;nr>2]=tt,0}};(function(){function le(tt){r.asm=tt.exports,d=r.asm.E,T(),P=r.asm.J,z.unshift(r.asm.F),R--,r.monitorRunDependencies&&r.monitorRunDependencies(R),R==0&&$&&(tt=$,$=null,tt())}function ue(tt){le(tt.instance)}function Fe(tt){return ne().then(function(xt){return WebAssembly.instantiate(xt,ze)}).then(function(xt){return xt}).then(tt,function(xt){c("failed to asynchronously prepare wasm: "+xt),X(xt)})}var ze={a:to};if(R++,r.monitorRunDependencies&&r.monitorRunDependencies(R),r.instantiateWasm)try{return r.instantiateWasm(ze,le)}catch(tt){c("Module.instantiateWasm callback failed with error: "+tt),i(tt)}return(function(){return u||typeof WebAssembly.instantiateStreaming!="function"||Z(K)||typeof fetch!="function"?Fe(ue):fetch(K,{credentials:"same-origin"}).then(function(tt){return WebAssembly.instantiateStreaming(tt,ze).then(ue,function(xt){return c("wasm streaming compile failed: "+xt),c("falling back to ArrayBuffer instantiation"),Fe(ue)})})})().catch(i),{}})(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.F).apply(null,arguments)};var vo=r.___getTypeName=function(){return(vo=r.___getTypeName=r.asm.G).apply(null,arguments)};r.__embind_initialize_bindings=function(){return(r.__embind_initialize_bindings=r.asm.H).apply(null,arguments)};var Wa=r._malloc=function(){return(Wa=r._malloc=r.asm.I).apply(null,arguments)},ri=r._free=function(){return(ri=r._free=r.asm.K).apply(null,arguments)};r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.L).apply(null,arguments)};var Us;$=function le(){Us||Na(),Us||($=le)};function Na(){function le(){if(!Us&&(Us=!0,r.calledRun=!0,!f)){if(ge(z),n(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;){var ue=r.postRun.shift();L.unshift(ue)}ge(L)}}if(!(01?l-1:0),u=1;ua?e.Node.createWithConfig(a):e.Node.createDefault()),t(e.Node.prototype,"free",function(){e.Node.destroy(this)}),t(e.Node.prototype,"freeRecursive",function(){for(let i=0,a=this.getChildCount();i1&&arguments[1]!==void 0?arguments[1]:NaN,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:CC.LTR;return i.call(this,a,s,l)}),{Config:e.Config,Node:e.Node,...pyt}}async function Ayt(){return gyt(await hyt())}const wM=String.raw,hZ=wM`(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})`,mZ=wM`\u{E0061}-\u{E007A}`,vyt=()=>new RegExp(wM`[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[${mZ}]{2}[\u{E0030}-\u{E0039}${mZ}]{1,3}\u{E007F}|${hZ}(?:\u200D${hZ})*`,"gu");var pZ=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},jf=[],_0=[],xyt=typeof Uint8Array<"u"?Uint8Array:Array,EM=!1;function x1e(){EM=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,r=e.length;t0)throw new Error("Invalid string. Length must be a multiple of 4");a=e[l-2]==="="?2:e[l-1]==="="?1:0,s=new xyt(l*3/4-a),n=a>0?l-4:l;var c=0;for(t=0,r=0;t>16&255,s[c++]=i>>8&255,s[c++]=i&255;return a===2?(i=_0[e.charCodeAt(t)]<<2|_0[e.charCodeAt(t+1)]>>4,s[c++]=i&255):a===1&&(i=_0[e.charCodeAt(t)]<<10|_0[e.charCodeAt(t+1)]<<4|_0[e.charCodeAt(t+2)]>>2,s[c++]=i>>8&255,s[c++]=i&255),s}function byt(e){return jf[e>>18&63]+jf[e>>12&63]+jf[e>>6&63]+jf[e&63]}function wyt(e,t,r){for(var n,i=[],a=t;ac?c:l+s));return n===1?(t=e[r-1],i+=jf[t>>2],i+=jf[t<<4&63],i+="=="):n===2&&(t=(e[r-2]<<8)+e[r-1],i+=jf[t>>10],i+=jf[t>>4&63],i+=jf[t<<2&63],i+="="),a.push(i),a.join("")}function DB(e,t,r,n,i){var a,s,l=i*8-n-1,c=(1<>1,d=-7,f=r?i-1:0,m=r?-1:1,g=e[t+f];for(f+=m,a=g&(1<<-d)-1,g>>=-d,d+=l;d>0;a=a*256+e[t+f],f+=m,d-=8);for(s=a&(1<<-d)-1,a>>=-d,d+=n;d>0;s=s*256+e[t+f],f+=m,d-=8);if(a===0)a=1-u;else{if(a===c)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-u}return(g?-1:1)*s*Math.pow(2,a-n)}function y1e(e,t,r,n,i,a){var s,l,c,u=a*8-i-1,d=(1<>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:a-1,A=n?1:-1,v=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+f>=1?t+=m/c:t+=m*Math.pow(2,1-f),t*c>=2&&(s++,c/=2),s+f>=d?(l=0,s=d):s+f>=1?(l=(t*c-1)*Math.pow(2,i),s=s+f):(l=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+g]=l&255,g+=A,l/=256,i-=8);for(s=s<0;e[r+g]=s&255,g+=A,s/=256,u-=8);e[r+g-A]|=v*128}var Eyt={}.toString,b1e=Array.isArray||function(e){return Eyt.call(e)=="[object Array]"};var Cyt=50;Mt.TYPED_ARRAY_SUPPORT=pZ.TYPED_ARRAY_SUPPORT!==void 0?pZ.TYPED_ARRAY_SUPPORT:!0;p3();function p3(){return Mt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function lm(e,t){if(p3()=p3())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p3().toString(16)+" bytes");return e|0}Mt.isBuffer=Kyt;function lh(e){return!!(e!=null&&e._isBuffer)}Mt.compare=function(t,r){if(!lh(t)||!lh(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var n=t.length,i=r.length,a=0,s=Math.min(n,i);a>>1;case"base64":return j1e(e).length;default:if(n)return g3(e).length;t=(""+t).toLowerCase(),n=!0}}Mt.byteLength=C1e;function kyt(e,t,r){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Qyt(this,t,r);case"utf8":case"utf-8":return B1e(this,t,r);case"ascii":return Fyt(this,t,r);case"latin1":case"binary":return Myt(this,t,r);case"base64":return Oyt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Lyt(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Mt.prototype._isBuffer=!0;function zA(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}Mt.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""};Mt.prototype.compare=function(t,r,n,i,a){if(!lh(t))throw new TypeError("Argument must be a Buffer");if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;for(var s=a-i,l=n-r,c=Math.min(s,l),u=this.slice(i,a),d=t.slice(r,n),f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=Mt.from(t,n)),lh(t))return t.length===0?-1:AZ(e,t,r,n,i);if(typeof t=="number")return t=t&255,Mt.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):AZ(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function AZ(e,t,r,n,i){var a=1,s=e.length,l=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(g,A){return a===1?g[A]:g.readUInt16BE(A*a)}var u;if(i){var d=-1;for(u=r;us&&(r=s-l),u=r;u>=0;u--){for(var f=!0,m=0;mi&&(n=i)):n=i;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var s=0;sa)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return _yt(this,t,r,n);case"utf8":case"utf-8":return jyt(this,t,r,n);case"ascii":return S1e(this,t,r,n);case"latin1":case"binary":return Dyt(this,t,r,n);case"base64":return Tyt(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pyt(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};Mt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Oyt(e,t,r){return t===0&&r===e.length?gZ(e):gZ(e.slice(t,r))}function B1e(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:a>223?3:a>191?2:1;if(i+l<=r){var c,u,d,f;switch(l){case 1:a<128&&(s=a);break;case 2:c=e[i+1],(c&192)===128&&(f=(a&31)<<6|c&63,f>127&&(s=f));break;case 3:c=e[i+1],u=e[i+2],(c&192)===128&&(u&192)===128&&(f=(a&15)<<12|(c&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:c=e[i+1],u=e[i+2],d=e[i+3],(c&192)===128&&(u&192)===128&&(d&192)===128&&(f=(a&15)<<18|(c&63)<<12|(u&63)<<6|d&63,f>65535&&f<1114112&&(s=f))}}s===null?(s=65533,l=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=l}return Ryt(n)}var vZ=4096;function Ryt(e){var t=e.length;if(t<=vZ)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var i="",a=t;an&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}Mt.prototype.readUIntLE=function(t,r,n){t=t|0,r=r|0,n||fl(t,r,this.length);for(var i=this[t],a=1,s=0;++s0&&(a*=256);)i+=this[t+--r]*a;return i};Mt.prototype.readUInt8=function(t,r){return r||fl(t,1,this.length),this[t]};Mt.prototype.readUInt16LE=function(t,r){return r||fl(t,2,this.length),this[t]|this[t+1]<<8};Mt.prototype.readUInt16BE=function(t,r){return r||fl(t,2,this.length),this[t]<<8|this[t+1]};Mt.prototype.readUInt32LE=function(t,r){return r||fl(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Mt.prototype.readUInt32BE=function(t,r){return r||fl(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Mt.prototype.readIntLE=function(t,r,n){t=t|0,r=r|0,n||fl(t,r,this.length);for(var i=this[t],a=1,s=0;++s=a&&(i-=Math.pow(2,8*r)),i};Mt.prototype.readIntBE=function(t,r,n){t=t|0,r=r|0,n||fl(t,r,this.length);for(var i=r,a=1,s=this[t+--i];i>0&&(a*=256);)s+=this[t+--i]*a;return a*=128,s>=a&&(s-=Math.pow(2,8*r)),s};Mt.prototype.readInt8=function(t,r){return r||fl(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Mt.prototype.readInt16LE=function(t,r){r||fl(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};Mt.prototype.readInt16BE=function(t,r){r||fl(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};Mt.prototype.readInt32LE=function(t,r){return r||fl(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Mt.prototype.readInt32BE=function(t,r){return r||fl(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Mt.prototype.readFloatLE=function(t,r){return r||fl(t,4,this.length),DB(this,t,!0,23,4)};Mt.prototype.readFloatBE=function(t,r){return r||fl(t,4,this.length),DB(this,t,!1,23,4)};Mt.prototype.readDoubleLE=function(t,r){return r||fl(t,8,this.length),DB(this,t,!0,52,8)};Mt.prototype.readDoubleBE=function(t,r){return r||fl(t,8,this.length),DB(this,t,!1,52,8)};function iu(e,t,r,n,i,a){if(!lh(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}Mt.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;iu(this,t,r,n,a,0)}var s=1,l=0;for(this[r]=t&255;++l=0&&(l*=256);)this[r+s]=t/l&255;return r+n};Mt.prototype.writeUInt8=function(t,r,n){return t=+t,r=r|0,n||iu(this,t,r,1,255,0),Mt.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=t&255,r+1};function TB(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>(n?i:1-i)*8}Mt.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r|0,n||iu(this,t,r,2,65535,0),Mt.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8):TB(this,t,r,!0),r+2};Mt.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r|0,n||iu(this,t,r,2,65535,0),Mt.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t&255):TB(this,t,r,!1),r+2};function PB(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>(n?i:3-i)*8&255}Mt.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r|0,n||iu(this,t,r,4,4294967295,0),Mt.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255):PB(this,t,r,!0),r+4};Mt.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r|0,n||iu(this,t,r,4,4294967295,0),Mt.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255):PB(this,t,r,!1),r+4};Mt.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r|0,!i){var a=Math.pow(2,8*n-1);iu(this,t,r,n,a-1,-a)}var s=0,l=1,c=0;for(this[r]=t&255;++s>0)-c&255;return r+n};Mt.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r|0,!i){var a=Math.pow(2,8*n-1);iu(this,t,r,n,a-1,-a)}var s=n-1,l=1,c=0;for(this[r+s]=t&255;--s>=0&&(l*=256);)t<0&&c===0&&this[r+s+1]!==0&&(c=1),this[r+s]=(t/l>>0)-c&255;return r+n};Mt.prototype.writeInt8=function(t,r,n){return t=+t,r=r|0,n||iu(this,t,r,1,127,-128),Mt.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=t&255,r+1};Mt.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r|0,n||iu(this,t,r,2,32767,-32768),Mt.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8):TB(this,t,r,!0),r+2};Mt.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r|0,n||iu(this,t,r,2,32767,-32768),Mt.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t&255):TB(this,t,r,!1),r+2};Mt.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r|0,n||iu(this,t,r,4,2147483647,-2147483648),Mt.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):PB(this,t,r,!0),r+4};Mt.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r|0,n||iu(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Mt.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255):PB(this,t,r,!1),r+4};function N1e(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function k1e(e,t,r,n,i){return i||N1e(e,t,r,4),y1e(e,t,r,n,23,4),r+4}Mt.prototype.writeFloatLE=function(t,r,n){return k1e(this,t,r,!0,n)};Mt.prototype.writeFloatBE=function(t,r,n){return k1e(this,t,r,!1,n)};function _1e(e,t,r,n,i){return i||N1e(e,t,r,8),y1e(e,t,r,n,52,8),r+8}Mt.prototype.writeDoubleLE=function(t,r,n){return _1e(this,t,r,!0,n)};Mt.prototype.writeDoubleBE=function(t,r,n){return _1e(this,t,r,!1,n)};Mt.prototype.copy=function(t,r,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r=0;--s)t[s+r]=this[s+n];else if(a<1e3||!Mt.TYPED_ARRAY_SUPPORT)for(s=0;s>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var s;if(typeof t=="number")for(s=r;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function Wyt(e){for(var t=[],r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function j1e(e){return yyt($yt(e))}function OB(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function qyt(e){return e!==e}function Kyt(e){return e!=null&&(!!e._isBuffer||D1e(e)||Vyt(e))}function D1e(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Vyt(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&D1e(e.slice(0,0))}class RB{data;width;height;format;constructor(t){const r=new fge(t);this.data=t,this.width=r.width,this.height=r.height,this.format="png"}static isValid(t){try{return!!new RB(t)}catch{return!1}}}class T1e{data;width;height;format;constructor(t){if(this.data=t,this.format="jpeg",this.width=0,this.height=0,t.readUInt16BE(0)!==65496)throw new Error("SOI not found in JPEG");const r=Mme.decode(this.data);let n;for(let i=0;i4&&([this.width,this.height]=[this.height,this.width])}static isValid(t){return t&&Mt.isBuffer(t)&&t.readUInt16BE(0)===65496}}const Yyt=({limit:e=100}={})=>{let t={},r=[];return{get:n=>n?t[n]:null,set:(n,i)=>{r.push(n),r.length>e&&delete t[r.shift()],t[n]=i},reset:()=>{t={},r=[]},length:()=>r.length}},i8=Yyt({limit:30}),P1e=Mt.isBuffer,O1e=e=>typeof Blob<"u"&&e instanceof Blob,R1e=e=>"data"in e,Zyt=e=>"uri"in e&&/^data:image\/[a-zA-Z]*;base64,[^"]*/g.test(e.uri),Jyt=async e=>{const{method:t="GET",headers:r,body:n,credentials:i}=e,s=await(await fetch(e.uri,{method:t,headers:r,body:n,credentials:i})).arrayBuffer();return Mt.from(s)},F1e=e=>{const t=e.toLowerCase();return t==="jpg"||t==="jpeg"||t==="png"},Xyt=e=>{let t;return T1e.isValid(e)?t="jpg":RB.isValid(e)&&(t="png"),t};function E5(e,t){switch(t.toLowerCase()){case"jpg":case"jpeg":return new T1e(e);case"png":return new RB(e);default:return null}}const e2t=async({uri:e})=>{const t=/^data:image\/([a-zA-Z]*);base64,([^"]*)/g.exec(e);if(!t)throw new Error(`Invalid base64 image: ${e}`);const r=t[1],n=t[2];if(!F1e(r))throw new Error(`Base64 image invalid format: ${r}`);return E5(Mt.from(n,"base64"),r)},t2t=async e=>{if(e.data&&e.format)return E5(e.data,e.format);throw new Error(`Invalid data given for local file: ${JSON.stringify(e)}`)},M1e=async e=>{const t=Xyt(e);return t?E5(e,t):null},r2t=async e=>{const{type:t}=e;if(!t||t==="application/octet-stream"){const i=await e.arrayBuffer(),a=Mt.from(i);return M1e(a)}if(!t.startsWith("image/"))throw new Error(`Invalid blob type: ${t}`);const r=t.replace("image/","");if(!F1e(r))throw new Error(`Invalid blob type: ${t}`);const n=await e.arrayBuffer();return E5(Mt.from(n),r)},n2t=e=>{const t=e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71&&e[4]===13&&e[5]===10&&e[6]===26&&e[7]===10,r=e[0]===255&&e[1]===216&&e[2]===255;let n="";if(t)n="png";else if(r)n="jpg";else throw new Error("Not valid image extension");return n},i2t=async e=>{const t=await Jyt(e),r=n2t(t);return E5(t,r)},a2t=e=>O1e(e)||P1e(e)?null:R1e(e)?e.data.toString():e.uri,Q1e=(e,{cache:t=!0}={})=>{let r;const n=a2t(e);if(O1e(e))r=r2t(e);else if(P1e(e))r=M1e(e);else{if(t&&i8.get(n))return i8.get(n);Zyt(e)?r=e2t(e):R1e(e)?r=t2t(e):r=i2t(e)}if(!r)throw new Error("Cannot resolve image");return t&&n&&i8.set(n,r),r},L1e=(e,t)=>{switch(t){case"uppercase":return e.toUpperCase();case"lowercase":return e.toLowerCase();case"capitalize":return wpt(e);case"upperfirst":return Db(e);default:return e}},s2t=e=>e.type===JR,o2t=e=>e.type===z1,l2t={bidi:c1e,linebreaker:u1e,justification:h1e,textDecoration:m1e,scriptItemizer:p1e,wordHyphenation:A1e,fontSubstitution:v1e},c2t=l1e(l2t),U1e=(e,t)=>{if(!t)return[{string:""}];const r=[],{fill:n="black",fontFamily:i="Helvetica",fontWeight:a,fontStyle:s,fontSize:l=18,textDecorationColor:c,textDecorationStyle:u,textTransform:d,opacity:f}=t.props,m=t.props.textDecoration,g=typeof i=="string"?[i]:[...i||[]];g.push("Helvetica");const v={font:g.map(b=>{const E={fontFamily:b,fontWeight:a,fontStyle:s};return e.getFont(E)?.data}),opacity:f,fontSize:l,color:n,underlineStyle:u,underline:m==="underline"||m==="underline line-through"||m==="line-through underline",underlineColor:c||n,strike:m==="line-through"||m==="underline line-through"||m==="line-through underline",strikeStyle:u,strikeColor:c||n};for(let b=0;bAM(U1e(e,t)),xZ=999999999999,d2t={before:-.5,after:-.5},f2t=e=>(t,r)=>{const n=u2t(e,t),i=t.props.x===void 0?r:t.props.x,a=t.props?.y||0,s={x:i,y:a,width:xZ,height:xZ},c={hyphenationCallback:t.props.hyphenationCallback||e?.getHyphenationCallback()||null,shrinkWhitespaceFactor:d2t},u=c2t(n,s,c).flat();return Object.assign({},t,{lines:u})},h2t=e=>{const t=e.children.map((r,n)=>{if(!s2t(r))return r;const i=r.children[0];return r.props.x===void 0&&n{if(!t.children)return t;let r=t.props?.x||0;const n=f2t(e),a=h2t(t).children.map(s=>{const l=n(s,r);return r+=l.lines[0].xAdvance,l});return Object.assign({},t,{children:a})},p2t=e=>e.type===Ohe,g2t=e=>((e.children||[]).find(p2t)?.children||[]).reduce((i,a)=>{const s=a.props?.id;return s&&(i[s]=a),i},{}),A2t=e=>e.type!==Ohe,v2t=e=>{if(!e.children)return e;const t=e.children.filter(A2t);return Object.assign({},e,{children:t})},yZ=/url\(['"]?#([^'"]+)['"]?\)/,bZ=(e,t)=>{if(!t)return;if(!yZ.test(t))return t;const r=t.match(yZ);return e[r[1]]},$1e=e=>t=>{const r=t.props,n="fill"in r?bZ(e,r?.fill):void 0,i="clipPath"in r?bZ(e,r?.clipPath):void 0,a=Object.assign({},t.props,{fill:n,clipPath:i}),s=t.children?t.children.map($1e(e)):void 0;return Object.assign({},t,{props:a,children:s})},x2t=e=>{if(!e.children)return e;const t=g2t(e),r=e.children.map($1e(t));return Object.assign({},e,{children:r})},y2t=e=>v2t(x2t(e)),z1e=e=>{if(!e)return null;if(typeof e!="string")return e;const t=e.split(/[,\s]+/).map(Ps);return t.length!==4?null:{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},b2t=e=>{const t=z1e(e.props.viewBox);return t?{width:t.maxX,height:t.maxY}:e.props.width&&e.props.height?{width:Ps(e.props.width),height:Ps(e.props.height)}:{width:0,height:0}},H1e=["x","y","clipPath","clipRule","opacity","fill","fillOpacity","fillRule","stroke","strokeLinecap","strokeLinejoin","strokeOpacity","strokeWidth","textAnchor","dominantBaseline","color","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","opacity","textDecoration","lineHeight","textAlign","visibility","wordSpacing"],w2t=Ipt(["x"],H1e),E2t={[yr]:w2t},C2t=e=>{const t=e.props||{},r=E2t[e.type]??H1e;return uM(r,t)},W1e=e=>{if(!e.children)return e;const t=C2t(e),r=e.children.map(n=>{const i=Object.assign({},t,n.props||{}),a=Object.assign({},n,{props:i});return W1e(a)});return Object.assign({},e,{children:r})},I2t=e=>{if(typeof e!="string")return e;const t=e.replace(/[\s\r\t\n]+/gm," ").replace(/^defer\s/,"").split(" "),r=t[0]||"xMidYMid",n=t[1]||"meet";return{align:r,meetOrSlice:n}},S2t=["width","height","color","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","fill","fillRule","clipPath","offset","transform","strokeLinejoin","strokeLinecap","strokeDasharray","gradientUnits","gradientTransform"],B2t=["y","y1","y2","height","cy","ry"],N2t=["x","x1","x2","width","cx","rx"],k2t=e=>e.type===_g,G1e=e=>e.type===yr,_2t=e=>e.type===z1,j2t=e=>t=>_Ae(t,(r,n)=>{const i=sl(r);return i&&B2t.includes(n)?i.percent*e.height:i&&N2t.includes(n)?i.percent*e.width:r}),a8=e=>{const t=sl(e);return t?t.percent:Ps(e)},wZ=e=>t=>WAe(e,{transform:t}).transform,D2t=e=>t=>{let r=j2t(e)(t.props);return r=kB({x:Ps,x1:Ps,x2:Ps,y:Ps,y1:Ps,y2:Ps,r:Ps,rx:Ps,ry:Ps,cx:Ps,cy:Ps,width:Ps,height:Ps,offset:a8,fill:P2,opacity:a8,stroke:P2,stopOpacity:a8,stopColor:P2,transform:wZ(e),gradientTransform:wZ(e)},r),Object.assign({},t,{props:r})},T2t=e=>{const t=e.style||{},r=Object.assign({},t,e.props);return Object.assign({},e,{props:r})},P2t=e=>{const t=n=>n==="none"?null:n,r=_Ae(e.props,t);return Object.assign({},e,{props:r})},O2t=e=>{const t=e.props||{},r=uM(S2t,t),n=Object.assign({},r,e.style||{});return Object.assign({},e,{style:n})},R2t=e=>{const t=kB({width:Ps,height:Ps,viewBox:z1e,preserveAspectRatio:I2t},e.props);return Object.assign({},e,{props:t})},F2t=e=>({type:JR,props:{},style:{},children:[e]}),M2t=e=>{if(!G1e(e)||!e.children)return e;const t=n=>_2t(n)?F2t(n):n,r=e.children.map(t);return Object.assign({},e,{children:r})},q1e=e=>t=>{if(G1e(t))return m2t(e,t);if(!t.children)return t;const r=t.children.map(q1e(e));return Object.assign({},t,{children:r})},Q2t=e=>Zc(D2t(e),M2t,P2t,T2t),K1e=e=>t=>{if(!t.children)return t;const r=Zc(K1e(e),Q2t(e)),n=t.children.map(r);return Object.assign({},t,{children:n})},L2t=e=>{const t={},r=e.children?.slice(0)||[];for(;r.length>0;){const n=r.shift();n.props&&"id"in n.props&&(t[n.props.id]=n),n.children&&r.push(...n.children)}return t},V1e=(e,t)=>{if(e.props&&"xlinkHref"in e.props){const n=t[e.props.xlinkHref.replace(/^#/,"")];if(!n)return e;const i=Object.assign({},n.props,e.props);return delete i.xlinkHref,Object.assign({},n,{props:i})}const r=e.children?.map(n=>V1e(n,t));return Object.assign({},e,{children:r})},U2t=e=>{const t=L2t(e);return V1e(e,t)},$2t=(e,t)=>{const r=b2t(e);return Zc(y2t,q1e(t),R2t,O2t,W1e,K1e(r),U2t)(e)},Y1e=(e,t)=>{if(!("children"in e))return e;const r=a=>Y1e(a,t),n=k2t(e)?$2t(e,t):e,i=n.children?.map(r);return Object.assign({},n,{children:i})};let z2t;const H2t=async()=>{const e=await(z2t??=Ayt()),t=e.Config.create();return t.setPointScaleFactor(0),{node:{create:()=>e.Node.createWithConfig(t)}}},W2t=async e=>{const t=await H2t();return Object.assign({},e,{yoga:t})},EZ=e=>e.style.zIndex,G2t=e=>e.type!==Qhe&&e.type!==_g,q2t=(e,t)=>{const r=EZ(e),n=EZ(t);return!r&&!n?0:r?n?n-r:-1:1},Z1e=e=>{if(!e.children)return e;const r=(G2t(e)?e.children.sort(q2t):e.children).map(Z1e);return Object.assign({},e,{children:r})},K2t=e=>Z1e(e),Yh={},J1e=vyt(),V2t=e=>e!=="️",CZ=(e,t=!1)=>Array.from(e).filter(t?()=>!0:V2t).map(r=>r.codePointAt(0).toString(16)).join("-"),Y2t=(e,t)=>{if("builder"in t)return t.builder(CZ(e,t.withVariationSelectors));const{url:r,format:n="png",withVariationSelectors:i}=t;return`${r}${CZ(e,i)}.${n}`},IZ=(e,t)=>{if(!t)return[];const r=[];return Array.from(e.matchAll(J1e)).forEach(n=>{const i=n[0];if(!Yh[i]||Yh[i].loading){const a=Y2t(i,t);Yh[i]={loading:!0},r.push(Q1e({uri:a}).then(s=>{Yh[i].loading=!1,Yh[i].data=s.data}).catch(s=>{console.warn(s,"Failed to load emoji image"),Yh[i].loading=!1}))}}),r},Z2t=e=>{const t=[];for(let r=0;r{const{index:s}=a,l=a[0],c=n.attributes.fontSize,u=n.string.slice(i,s+a[0].length);Yh[l]&&Yh[l].data?t.push({string:u.replace(a[0],""),attributes:{...n.attributes,attachment:{width:c,height:c,yOffset:Math.floor(c*.1),image:Yh[l].data}}}):t.push({string:u,attributes:n.attributes}),i=s+l.length}),i{if(e.props.src)return e.props.src;if(e.props.source)return e.props.source},X2t=async e=>{const t=typeof e=="function"?await e():await e;return typeof t=="string"?{uri:t}:t},ebt=async e=>{const t=J2t(e),{cache:r}=e.props;if(!t){console.warn(!1,'Image should receive either a "src" or "source" prop');return}try{const n=await X2t(t);if(!n)throw new Error(`Image's "src" or "source" prop returned ${n}`);if(e.image=await Q1e(n,{cache:r}),Buffer.isBuffer(n)||n instanceof Blob)return;e.image.key="data"in n?n.data.toString():n.uri}catch(n){console.warn(n.message)}},tbt=e=>e.type===$1,rbt=(e,t)=>{const r=[],n=t.children?.slice(0)||[],i=e?e.getEmojiSource():null;for(;n.length>0;){const a=n.shift();if(tbt(a)&&r.push(ebt(a)),e&&a.style?.fontFamily){const s=NB(a.style.fontFamily);r.push(...s.map(l=>e.load({fontFamily:l,fontStyle:a.style.fontStyle,fontWeight:a.style.fontWeight})))}typeof a=="string"&&r.push(...IZ(a,i)),"value"in a&&typeof a.value=="string"&&r.push(...IZ(a.value,i)),a.children&&a.children.forEach(s=>{n.push(s)})}return r},SZ=async(e,t)=>{const r=rbt(t,e);return await Promise.all(r),e},nbt=e=>e.type===VR,BZ={color:"blue",textDecoration:"underline"},ibt=(e,t)=>{let r=[t.style];return nbt(t)&&(r=Array.isArray(t.style)?[BZ,...t.style]:[BZ,t.style]),WAe(e,r)},X1e=e=>t=>{const r=ibt(e,t);if(!t.children)return Object.assign({},t,{style:r});const n=t.children.map(X1e(e));return Object.assign({},t,{style:r,children:n})},eve=e=>{const t=e.props?.dpi||72,r=e.style,n=e.box?.width||r.width,i=e.box?.height||r.height,a=e.props?.orientation||"portrait",s=r?.fontSize||18;return X1e({width:n,height:i,orientation:a,dpi:t,remBase:s})(e)},abt=e=>{if(!e.children)return e;const t=e.children.map(eve);return Object.assign({},e,{children:t})},NZ=e=>t=>Qa(t.style?.[e])?"50%":t.style?.[e]??null,sbt=e=>{if(!e.box)return null;const{left:t,top:r,width:n,height:i}=e.box,a=NZ("transformOriginX")(e),s=NZ("transformOriginY")(e),l=sl(a),c=sl(s),u=l?n*l.percent:a,d=c?i*c.percent:s;if(Qa(u)||typeof u=="string")throw new Error(`Invalid origin offsetX: ${u}`);if(Qa(d)||typeof d=="string")throw new Error(`Invalid origin offsetY: ${d}`);return{left:t+u,top:r+d}},tve=e=>{const t=sbt(e),r=Object.assign({},e,{origin:t});if(!e.children)return r;const n=e.children.map(tve);return Object.assign({},r,{children:n})},obt=e=>{if(!e.children)return e;const t=e.children.map(tve);return Object.assign({},e,{children:t})},lbt=e=>typeof e=="string"?{title:e,fit:!1,expanded:!1}:e,cbt=e=>{let t=0;const n=(e.children||[]).slice(0).map(i=>({value:i,parent:null}));for(;n.length>0;){const i=n.shift();if(!i)break;const a=i.value;let s=i.parent;if(a.props&&"bookmark"in a.props&&a.props.bookmark){const l=lbt(a.props.bookmark),u={ref:t++,parent:s?.ref,...l};a.props.bookmark=u,s=u}a.children&&a.children.forEach(l=>{n.push({value:l,parent:s})})}return e},ubt=["portrait","landscape"],dbt=e=>{const t=e.props?.orientation||"portrait";return ubt.includes(t)?t:"portrait"},fbt=e=>dbt(e)==="landscape",hbt={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224],ID1:[153,243]},mbt=e=>{if(typeof e=="number")return{value:e,unit:void 0};const t=/^(-?\d*\.?\d+)(in|mm|cm|pt|px)?$/g.exec(e);return t?{value:parseFloat(t[1]),unit:t[2]||"pt"}:{value:e,unit:void 0}},kZ=(e,t)=>{if(!e)return 0;const r=mbt(e),n=72,i=1/25.4*n,a=1/2.54*n;if(typeof r.value=="string")throw new Error(`Invalid page size: ${e}`);switch(r.unit){case"in":return r.value*n;case"mm":return r.value*i;case"cm":return r.value*a;case"px":return Math.round(r.value*(n/t));default:return r.value}},s8=({width:e,height:t},r)=>({width:kZ(e,r),height:kZ(t,r)}),SM=e=>({width:e[0],height:e[1]}),pbt=e=>({width:e.height,height:e.width}),gbt=e=>SM(hbt[e.toUpperCase()]),Abt=e=>SM([e,e]),vbt=e=>{const t=e.props?.size||"A4",r=e.props?.dpi||72;let n;return typeof t=="string"?n=gbt(t):Array.isArray(t)?n=s8(SM(t),r):typeof t=="number"?n=s8(Abt(t),r):n=s8(t,r),fbt(e)?pbt(n):n},xbt=e=>{const t=vbt(e),r=pM(e.style||{});return{...e,style:{...r,...t}}},ybt=e=>{if(!e.children)return e;const t=e.children.map(xbt);return Object.assign({},e,{children:t})},A3=e=>e.props&&"fixed"in e.props?e.props.fixed===!0:!1,bbt=(e,t)=>{let r=0;if(!e.lines)return 0;for(let n=0;nt)return n;r+=i.box.height}return e.lines.length},wbt=(e,t)=>{let r=0;if(!e.lines)return r;for(let n=0;n{const r=e.box?.top||0,n=e.props.widows||2,i=e.props.orphans||2,a=e.lines.length,s=bbt(e,t-r);return s===0?0:a{const r=Ebt(e,t),n=wbt(e,r),i=e.box.height-n,a=Object.assign({},e,{box:{...e.box,height:n,borderBottomWidth:0},style:{...e.style,marginBottom:0,paddingBottom:0,borderBottomWidth:0,borderBottomLeftRadius:0,borderBottomRightRadius:0},lines:e.lines.slice(0,r)}),s=Object.assign({},e,{box:{...e.box,top:0,height:i,borderTopWidth:0},style:{...e.style,marginTop:0,paddingTop:0,borderTopWidth:0,borderTopLeftRadius:0,borderTopRightRadius:0},lines:e.lines.slice(r)});return[a,s]},Ibt=e=>e.box?.top||0,Sbt=e=>!Qa(e.style?.height),Bbt=(e,t)=>{if(!e)return[null,null];const r=Ibt(e),n=Object.assign({},e,{box:{...e.box,borderBottomWidth:0},style:{...e.style,marginBottom:0,paddingBottom:0,borderBottomWidth:0,borderBottomLeftRadius:0,borderBottomRightRadius:0}});n.style.height=t-r;const i=Sbt(e)?e.box.height-(t-r):null,a=Object.assign({},e,{box:{...e.box,top:0,borderTopWidth:0},style:{...e.style,marginTop:0,paddingTop:0,borderTopWidth:0,borderTopLeftRadius:0,borderTopRightRadius:0}});return i&&(a.style.height=i),[n,a]},Nbt=[_g,ZR,$1,XR],rve=e=>Nbt.includes(e.type)?!1:e.props&&"wrap"in e.props?e.props.wrap:!0,sE=(e,t)=>{const{yogaNode:r}=e;return r?r.getComputedPadding(t):null},C5=e=>{const{style:t,box:r}=e,n=sE(e,Wn.Top)||r?.paddingTop||t?.paddingTop||0,i=sE(e,Wn.Right)||r?.paddingRight||t?.paddingRight||0,a=sE(e,Wn.Bottom)||r?.paddingBottom||t?.paddingBottom||0,s=sE(e,Wn.Left)||r?.paddingLeft||t?.paddingLeft||0;return{paddingTop:n,paddingRight:i,paddingBottom:a,paddingLeft:s}},kbt=e=>{const t=e.style?.height,{paddingBottom:r}=C5(e);return t-r},_bt=e=>{const t=e.style?.height,{paddingTop:r,paddingBottom:n}=C5(e);return t-n-r},_Z=e=>typeof e=="string",jbt=e=>typeof e=="number",Dbt=e=>typeof e=="boolean",Tbt=e=>e&&e.type===Symbol.for("react.fragment"),b2=e=>{if(!e)return[];if(Array.isArray(e))return e.reduce((s,l)=>s.concat(b2(l)),[]);if(Dbt(e))return[];if(_Z(e)||jbt(e))return[{type:z1,value:`${e}`}];if(Tbt(e))return b2(e.props.children);if(!_Z(e.type))return b2(e.type(e.props));const{type:t,props:{style:r={},children:n,...i}}=e,a=NB(n).reduce((s,l)=>s.concat(b2(l)),[]);return[{type:t,style:r,props:i,children:a}]},Pbt=e=>"break"in e.props?e.props.break:!1,Obt=e=>"minPresenceAhead"in e.props?e.props.minPresenceAhead:0,Rbt=e=>Math.max(...e.map(t=>t.box.top+t.box.height)),Fbt=e=>e.box.top+e.box.height+e.box.marginBottom+Obt(e),Mbt=(e,t)=>{const r=Fbt(e),n=Rbt(t.filter(i=>!("fixed"in i.props)));return Math.min(r,n)},Qbt=(e,t,r,n)=>{if("fixed"in e.props)return!1;const i=r!A3(c)).length>0;return Pbt(e)||i&&!a||!i&&s>r&&l},Lbt=[8232,8233],Ubt=e=>Lbt.reduce((t,r)=>e&&e.hasGlyphForCodePoint&&e.hasGlyphForCodePoint(r)?t:[...t,String.fromCharCode(r)],[]),$bt=e=>e.map(t=>{const r=Ubt(t.attributes.font[0]),n=new RegExp(r.join("|"));return{string:t.string.replace(n,""),attributes:t.attributes}}),jZ=[$bt,Z2t],zbt=e=>e.type===$1,Hbt=e=>e.type===z1,nve=(e,t,r=null,n=0)=>{if(!t)return[{string:""}];let i=[];const{color:a="black",direction:s="ltr",fontFamily:l="Helvetica",fontWeight:c,fontStyle:u,fontSize:d=18,textAlign:f,lineHeight:m,textDecoration:g,textDecorationColor:A,textDecorationStyle:v,textTransform:b,letterSpacing:E,textIndent:I,opacity:S,verticalAlign:_}=t.style,B=typeof l=="string"?[l]:[...l||[]];B.push("Helvetica");const T=B.map(z=>{const L={fontFamily:z,fontWeight:c,fontStyle:u};return e.getFont(L)?.data}),P=n===0?null:t.style.backgroundColor,O={font:T,color:a,opacity:S,fontSize:d,lineHeight:m,direction:s,verticalAlign:_,backgroundColor:P,indent:I,characterSpacing:E,strikeStyle:v,underlineStyle:v,underline:g==="underline"||g==="underline line-through"||g==="line-through underline",strike:g==="line-through"||g==="underline line-through"||g==="line-through underline",strikeColor:A||a,underlineColor:A||a,link:r||t.props?.src||t.props?.href,align:f||(s==="rtl"?"right":"left")};for(let z=0;z{const r=nve(e,t);return AM(r)},Gbt={bidi:c1e,linebreaker:u1e,justification:h1e,textDecoration:m1e,scriptItemizer:p1e,wordHyphenation:A1e,fontSubstitution:v1e},qbt=l1e(Gbt),Kbt=e=>e.style?.maxLines,Vbt=e=>e.style?.textOverflow,Ybt=(e,t,r)=>{const n=Kbt(r),i=Vbt(r);return{x:0,y:0,width:e,maxLines:n,height:t||1/0,truncateMode:i}},Zbt=(e,t)=>({hyphenationPenalty:t.props.hyphenationPenalty,shrinkWhitespaceFactor:{before:-.5,after:-.5},hyphenationCallback:t.props.hyphenationCallback||e?.getHyphenationCallback()||null}),$T=(e,t,r,n)=>{const i=Wbt(n,e),a=Ybt(t,r,e),s=Zbt(n,e);return qbt(i,a,s).reduce((c,u)=>[...c,...u],[])},Jbt=e=>e.type===_g,ive=e=>e.type===yr,Xbt=e=>!Jbt(e)&&!ive(e),ewt=e=>ive(e)&&!e.lines,BM=(e,t)=>{if(ewt(e)){const r=e.box.width-(e.box.paddingRight+e.box.paddingLeft),n=e.box.height-(e.box.paddingTop+e.box.paddingBottom);e.lines=$T(e,r,n,t)}if(Xbt(e)){if(!e.children)return e;const r=i=>BM(i,t),n=e.children.map(r);return Object.assign({},e,{children:n})}return e},ave=["color","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","opacity","textDecoration","textTransform","lineHeight","textAlign","visibility","wordSpacing"],twt=[...ave,"backgroundColor"],sve=e=>t=>t.type===e,rwt=sve(_g),nwt=sve(yr),iwt=(e,t,r)=>e==="textDecoration"?[r,t].filter(n=>n&&n!=="none").join(" "):t,awt=(e,t)=>{const r={...e};return Object.entries(t).forEach(([n,i])=>{r[n]=iwt(n,i,e[n])}),r},swt=e=>t=>{const r=awt(e,t.style||{});return Object.assign({},t,{style:r})},NM=e=>{if(rwt(e)||!("children"in e))return e;const t=nwt(e)?twt:ave,r=uM(t,e.style||{}),n=Zc(NM,swt(r)),i=e.children.map(n);return Object.assign({},e,{children:i})},oE=(e,t)=>{const{yogaNode:r}=e;return r?r.getComputedMargin(t):null},kM=e=>{const{style:t,box:r}=e,n=oE(e,Wn.Top)||r?.marginTop||t?.marginTop||0,i=oE(e,Wn.Right)||r?.marginRight||t?.marginRight||0,a=oE(e,Wn.Bottom)||r?.marginBottom||t?.marginBottom||0,s=oE(e,Wn.Left)||r?.marginLeft||t?.marginLeft||0;return{marginTop:n,marginRight:i,marginBottom:a,marginLeft:s}},owt=e=>{const{yogaNode:t}=e;return{top:t?.getComputedTop()||0,right:t?.getComputedRight()||0,bottom:t?.getComputedBottom()||0,left:t?.getComputedLeft()||0}},lwt={width:0,height:0},cwt=e=>{const{yogaNode:t}=e;return t?{width:t.getComputedWidth(),height:t.getComputedHeight()}:lwt},lE=(e,t)=>e?e.getComputedBorder(t):0,uwt=e=>{const{yogaNode:t}=e;return{borderTopWidth:lE(t,Wn.Top),borderRightWidth:lE(t,Wn.Right),borderBottomWidth:lE(t,Wn.Bottom),borderLeftWidth:lE(t,Wn.Left)}},dwt=e=>t=>{const{yogaNode:r}=t;return r&&r.setDisplay(e==="none"?O2.None:O2.Flex),t},fwt={hidden:Ax.Hidden,scroll:Ax.Scroll},hwt=e=>t=>{const{yogaNode:r}=t;if(!Qa(e)&&r){const n=fwt[e]||Ax.Visible;r.setOverflow(n)}return t},mwt={wrap:xx.Wrap,"wrap-reverse":xx.WrapReverse},pwt=e=>t=>{const{yogaNode:r}=t;if(r){const n=mwt[e]||xx.NoWrap;r.setFlexWrap(n)}return t},ga=(e,t)=>r=>n=>{const{yogaNode:i}=n;if(!Qa(r)&&i){const a=!Qa(t),s=`set${Db(e)}`,l=`${s}Auto`,c=`${s}Percent`,u=sl(r);if(u&&!i[c])throw new Error(`You can't pass percentage values to ${e} property`);u?a?i[c]?.(t,u.value):i[c]?.(u.value):r==="auto"?a?i[l]?.(t):i[l]?.():a?i[s]?.(t,r):i[s]?.(r)}return n},gwt=e=>t=>ga("flexGrow")(e||0)(t),Awt=ga("flexBasis"),vwt={"flex-start":No.FlexStart,center:No.Center,"flex-end":No.FlexEnd,stretch:No.Stretch,baseline:No.Baseline,"space-between":No.SpaceBetween,"space-around":No.SpaceAround,"space-evenly":No.SpaceEvenly},_M=e=>t=>r=>{const{yogaNode:n}=r,i=e==="items"?No.Stretch:No.Auto;if(n){const a=vwt[t]||i;n[`setAlign${Db(e)}`](a)}return r},xwt=_M("self"),ywt=_M("items"),bwt=e=>t=>ga("flexShrink")(e||1)(t),wwt=e=>t=>{const{yogaNode:r}=t;return!Qa(e)&&r&&r.setAspectRatio(e),t},Ewt=_M("content"),Cwt={absolute:vx.Absolute,relative:vx.Relative,static:vx.Static},Iwt=e=>t=>{const{yogaNode:r}=t;return!Qa(e)&&r&&r.setPositionType(Cwt[e]),t},Swt={row:qp.Row,"row-reverse":qp.RowReverse,"column-reverse":qp.ColumnReverse},Bwt=e=>t=>{const{yogaNode:r}=t;if(r){const n=Swt[e]||qp.Column;r.setFlexDirection(n)}return t},Nwt={center:T0.Center,"flex-end":T0.FlexEnd,"space-between":T0.SpaceBetween,"space-around":T0.SpaceAround,"space-evenly":T0.SpaceEvenly},kwt=e=>t=>{const{yogaNode:r}=t;if(!Qa(e)&&r){const n=Nwt[e]||T0.FlexStart;r.setJustifyContent(n)}return t},_wt=ga("margin",Wn.Top),jwt=ga("margin",Wn.Right),Dwt=ga("margin",Wn.Bottom),Twt=ga("margin",Wn.Left),Pwt=ga("padding",Wn.Top),Owt=ga("padding",Wn.Right),Rwt=ga("padding",Wn.Bottom),Fwt=ga("padding",Wn.Left),Mwt=ga("border",Wn.Top),Qwt=ga("border",Wn.Right),Lwt=ga("border",Wn.Bottom),Uwt=ga("border",Wn.Left),$wt=ga("position",Wn.Top),zwt=ga("position",Wn.Right),Hwt=ga("position",Wn.Bottom),Wwt=ga("position",Wn.Left),Gwt=ga("width"),qwt=ga("minWidth"),Kwt=ga("maxWidth"),Vwt=ga("height"),Ywt=ga("minHeight"),Zwt=ga("maxHeight"),Jwt=ga("gap",R2.Row),Xwt=ga("gap",R2.Column),e5t=e=>!e||typeof e=="string"?null:(e.maxX-e.minX)/(e.maxY-e.minY),t5t=(e,t)=>(r,n,i,a)=>{const s=e5t(t.props.viewBox)||1;return n===Dl.Exactly||n===Dl.AtMost?{width:r,height:r/s}:a===Dl.Exactly?{width:i*s}:{}},DZ=e=>e.lines?Math.max(0,...e.lines.map(t=>t.xAdvance)):0,TZ=e=>e.lines?e.lines.reduce((t,r)=>t+r.box.height,0):-1,r5t={center:.5,right:1},n5t=(e,t,r)=>(n,i,a)=>{if(i===Dl.Exactly)return t.lines||(t.lines=$T(t,n,a,r)),{height:TZ(t),width:n};if(i===Dl.AtMost){const s=r5t[t.style?.textAlign]||0;return t.lines||(t.lines=$T(t,n,a,r),t.alignOffset=(n-DZ(t))*s),{height:TZ(t),width:Math.min(n,DZ(t))}}return{}},i5t=e=>e.image?.data?e.image.width/e.image.height:1,ove=e=>Qa(e.box?.height),a5t=10,s5t=(e,t)=>(r,n,i,a)=>{const s=i5t(t),l=kM(t),c=C5(e),u=ove(e)?1/0:(e.box?.height||0)-c.paddingTop-c.paddingBottom-l.marginTop-l.marginBottom-a5t;if(!t.image)return{width:0,height:0};if(n===Dl.Exactly&&a===Dl.Undefined){const d=r/s;return{height:Math.min(u,d)}}if(a===Dl.Exactly&&(n===Dl.AtMost||n===Dl.Undefined))return{width:Math.min(i*s,r)};if(n===Dl.Exactly&&a===Dl.AtMost){const d=r/s;return{height:Math.min(i,u,d)}}return n===Dl.AtMost&&a===Dl.AtMost?s>1?{width:r,height:Math.min(r/s,i)}:{height:i,width:Math.min(i*s,r)}:{height:i,width:r}},o5t=10,PZ=e=>Math.max(-1/0,...e),l5t=()=>{const e={},t=[],r=()=>e,n=(c,u)=>t.push([c,u]),i=(c,u)=>(n(c,u),e),a=(c,u,d,f)=>(n(c,u),n(c+d,u),n(c,u+f),n(c+d,u+f),e),s=(c,u,d,f)=>(f=f||d,n(c-d,u-f),n(c+d,u-f),n(c+d,u+f),n(c-d,u+f),e),l=(...c)=>(t.push(...c),e);return e.rect=a,e.moveTo=i,e.lineTo=i,e.circle=s,e.polygon=l,e.ellipse=s,e.roundedRect=a,e.text=r,e.path=r,e.lineWidth=r,e.bezierCurveTo=r,e.quadraticCurveTo=r,e.scale=r,e.rotate=r,e.translate=r,e.dash=r,e.clip=r,e.save=r,e.fill=r,e.font=r,e.stroke=r,e.lineCap=r,e.opacity=r,e.restore=r,e.lineJoin=r,e.fontSize=r,e.fillColor=r,e.miterLimit=r,e.strokeColor=r,e.fillOpacity=r,e.strokeOpacity=r,e.linearGradient=r,e.radialGradient=r,e.getWidth=()=>PZ(t.map(c=>c[0])),e.getHeight=()=>PZ(t.map(c=>c[1])),e},c5t=(e,t)=>()=>{const r=kM(t),n=C5(e),i=ove(e)?1/0:(e.box?.height||0)-n.paddingTop-n.paddingBottom-r.marginTop-r.marginBottom-o5t,a=l5t();t.props.paint(a);const s=a.getWidth(),l=Math.min(i,a.getHeight());return{width:s,height:l}},X1=e=>t=>t.type===e,lve=X1(_g),cve=X1(yr),u5t=X1(ZR),d5t=X1(YR),f5t=X1($1),h5t=X1(XR),m5t=X1(z1),p5t=e=>{const t=d5t(e)?e.box?.height:e.style?.height;return Vwt(t)},g5t=e=>{Zc(p5t(e),Gwt(e.style.width),qwt(e.style.minWidth),Kwt(e.style.maxWidth),Ywt(e.style.minHeight),Zwt(e.style.maxHeight),_wt(e.style.marginTop),jwt(e.style.marginRight),Dwt(e.style.marginBottom),Twt(e.style.marginLeft),Pwt(e.style.paddingTop),Owt(e.style.paddingRight),Rwt(e.style.paddingBottom),Fwt(e.style.paddingLeft),Iwt(e.style.position),$wt(e.style.top),zwt(e.style.right),Hwt(e.style.bottom),Wwt(e.style.left),Mwt(e.style.borderTopWidth),Qwt(e.style.borderRightWidth),Lwt(e.style.borderBottomWidth),Uwt(e.style.borderLeftWidth),dwt(e.style.display),Bwt(e.style.flexDirection),xwt(e.style.alignSelf),Ewt(e.style.alignContent),ywt(e.style.alignItems),kwt(e.style.justifyContent),pwt(e.style.flexWrap),hwt(e.style.overflow),wwt(e.style.aspectRatio),Awt(e.style.flexBasis),gwt(e.style.flexGrow),bwt(e.style.flexShrink),Jwt(e.style.rowGap),Xwt(e.style.columnGap))(e)},A5t=e=>t=>(e.insertChild(t.yogaNode,e.getChildCount()),t),v5t=(e,t,r)=>{const{yogaNode:n}=e;return cve(e)&&n.setMeasureFunc(n5t(t,e,r)),f5t(e)&&n.setMeasureFunc(s5t(t,e)),h5t(e)&&n.setMeasureFunc(c5t(t,e)),lve(e)&&n.setMeasureFunc(t5t(t,e)),e},x5t=e=>!cve(e)&&!u5t(e)&&!lve(e),uve=(e,t,r)=>n=>{const i=r.node.create(),a=Object.assign({},n,{yogaNode:i});if(g5t(a),x5t(n)&&n.children){const s=Zc(A5t(i),uve(e,t,r));a.children=n.children.map(s)}return v5t(a,e,t),a},y5t=e=>(e.yogaNode.calculateLayout(),e),dve=e=>{if(m5t(e))return e;const t=Object.assign(C5(e),kM(e),uwt(e),owt(e),cwt(e)),r=Object.assign({},e,{box:t});if(!e.children)return r;const n=e.children.map(dve);return Object.assign({},r,{children:n})},fve=e=>{const t=Object.assign({},e);if(delete t.yogaNode,!e.children)return t;const r=e.children.map(fve);return Object.assign({},t,{children:r})},b5t=e=>(e.yogaNode&&e.yogaNode.freeRecursive(),e),hve=(e,t,r)=>Qa(e)?null:Zc(fve,b5t,dve,y5t,uve(e,t,r))(e),w5t=(e,t)=>{if(!e.children)return e;const r=i=>hve(i,t,e.yoga),n=e.children.map(r);return Object.assign({},e,{children:n})},mve=e=>e.type===yr,E5t=.001,zT=(e,t)=>Object.assign({},t,{children:e}),pve=e=>e.box?.top||0,C5t=e=>e.every(A3),gve=e=>e.props&&"render"in e.props,Ave=Zc(BM,hve,NM,eve),I5t=e=>{console.warn(`Node of type ${e.type} can't wrap between pages and it's bigger than available page height`)},vve=(e,t,r)=>{const n=[],i=[];for(let a=0;a0&&b.children.length===0){if(n.length===0)n.push(s,...c),i.push(...l);else{const I=Object.assign({},s.box,{top:s.box.top-e}),S=Object.assign({},s,{box:I});n.push(...c),i.push(S,...l)}break}b&&n.push(b),E&&i.push(E);continue}n.push(s)}return[n,i]},S5t=(e,t,r)=>{const n=r.children||[],i=e-pve(r);return vve(i,t,n)},B5t=(e,t,r)=>{const[n,i]=Bbt(e,t),[a,s]=S5t(t,r,e);return[zT(a,n),zT(s,i)]},N5t=(e,t,r)=>mve(e)?Cbt(e,t):B5t(e,t,r),xve=e=>{const t=e.children||[];return gve(e)||t.some(xve)},HT=(e,t)=>{const r=gve(t),n=(c=[])=>{if(r){const u=t.props.render(e);return b2(u).filter(Boolean).map(d=>HT(e,d))}return c.map(u=>HT(e,u))},a=r&&mve(t)?{...t.box,height:0}:t.box,s=n(t.children),l=r?null:t.lines;return Object.assign({},t,{box:a,lines:l,children:s})},yve=(e,t,r,n)=>{if(xve(t)){const i=HT(e,t);return Ave(i,r,n)}return t},OZ=(e,t,r,n)=>{const i=kbt(e),a=_bt(e),s=yve({pageNumber:t},e,r,n),l=e.style.height,[c,u]=vve(i,a,s.children),d=b=>Ave(b,r,n),f={...e.box,height:l},m=d(Object.assign({},e,{box:f,children:c}));if(u.length===0||C5t(u))return[m,null];const g=MT("height",e.box),A=MT("bookmark",e.props),v=d(Object.assign({},e,{props:A,box:g,children:u}));return[m,v]},k5t=(e,t,r,n,i)=>{const s={totalPages:i.length,pageNumber:n+1,subPageNumber:r.subPageNumber+1,subPageTotalPages:r.subPageTotalPages};return yve(s,r,e,t)},_5t=e=>e.map((t,r)=>({...t,subPageNumber:r,subPageTotalPages:e.length})),j5t=e=>MT(["subPageNumber","subPageTotalPages"],e),D5t=(e,t,r,n)=>{if(!e)return[];if(e.props?.wrap===!1)return[e];let i=OZ(e,t,r,n);const a=[i[0]];let s=i[1];for(;s!==null;)i=OZ(s,t+a.length,r,n),a.push(i[0]),s=i[1];return a},T5t=(e,t)=>{let r=[],n=1;for(let i=0;ij5t(k5t(t,e.yoga,...i))),zT(r,e)},RZ=e=>t=>{const r=sl(t),n=e.width;return r?r.percent*n:t},FZ=e=>t=>{const r=sl(t),n=e.height;return r?r.percent*n:t},P5t=e=>{const t=e.style,r=kB({paddingTop:FZ(t),paddingLeft:RZ(t),paddingRight:RZ(t),paddingBottom:FZ(t)},e.style);return Object.assign({},e,{style:r})},O5t=e=>{if(!e.children)return e;const t=e.children.map(P5t);return Object.assign({},e,{children:t})},cE=e=>t=>{if(!t)return;const r=sl(t);return r?r.percent*Math.min(e.width,e.height):t},bve=e=>{const t=kB({borderTopLeftRadius:cE(e.box),borderTopRightRadius:cE(e.box),borderBottomRightRadius:cE(e.box),borderBottomLeftRadius:cE(e.box)},e.style||{}),r=Object.assign({},e,{style:t});if(!e.children)return r;const n=e.children.map(bve);return Object.assign({},r,{children:n})},R5t=(e,t)=>{const r=sl(t);return r?r.percent*e:t},F5t=e=>{const t=e.style.height,r=e.style?.paddingTop||0,n=e.style?.paddingBottom||0;return t-r-n},M5t=(e,t)=>{if(Qa(e.style?.height)||Qa(t.style?.height))return t;const r=F5t(e),n=R5t(r,t.style.height),i=Object.assign({},t.style,{height:n});return Object.assign({},t,{style:i})},Q5t=e=>{if(!e.children)return e;const t=n=>M5t(e,n),r=e.children.map(t);return Object.assign({},e,{children:r})},L5t=e=>{if(!e.children)return e;const t=e.children.map(Q5t);return Object.assign({},e,{children:t})},jM=e=>t=>t.type===e,U5t=jM(VR),wve=jM(yr),Eve=jM(z1),$5t=e=>"render"in e.props,z5t=e=>wve(e)||Eve(e),H5t=e=>{const t=e.children||[];return t.every(Eve)?!0:t.every(wve)?!1:t.every(z5t)},W5t=e=>{const t={type:yr,props:{},style:{},box:{},children:e.children};return Object.assign({},e,{children:[t]})},G5t=e=>U5t(e)?$5t(e)?Object.assign({},e,{type:yr}):H5t(e)?W5t(e):e:e,Cve=e=>{if(!e.children)return e;const t=Zc(G5t,Cve),r=e.children.map(t);return Object.assign({},e,{children:r})},q5t=bpt(K2t,obt,SZ,T5t,BM,bve,w5t,Y1e,SZ,NM,L5t,O5t,abt,Cve,cbt,ybt,W2t);var o8={exports:{}},l8={};var MZ;function K5t(){return MZ||(MZ=1,(function(e){function t(K,q){var Y=K.length;K.push(q);e:for(;0>>1,ge=K[ne];if(0>>1;nei(_e,Y))wei(xe,_e)?(K[ne]=xe,K[we]=Y,ne=we):(K[ne]=_e,K[pe]=Y,ne=pe);else if(wei(xe,Y))K[ne]=xe,K[we]=Y,ne=we;else break e}}return q}function i(K,q){var Y=K.sortIndex-q.sortIndex;return Y!==0?Y:K.id-q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,f=null,m=3,g=!1,A=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;function S(K){for(var q=r(u);q!==null;){if(q.callback===null)n(u);else if(q.startTime<=K)n(u),q.sortIndex=q.expirationTime,t(c,q);else break;q=r(u)}}function _(K){if(v=!1,S(K),!A)if(r(c)!==null)A=!0,X();else{var q=r(u);q!==null&&Z(_,q.startTime-K)}}var B=!1,T=-1,P=5,O=-1;function z(){return!(e.unstable_now()-OK&&z());){var ne=f.callback;if(typeof ne=="function"){f.callback=null,m=f.priorityLevel;var ge=ne(f.expirationTime<=K);if(K=e.unstable_now(),typeof ge=="function"){f.callback=ge,S(K),q=!0;break t}f===r(c)&&n(c),S(K)}else n(c);f=r(c)}if(f!==null)q=!0;else{var ae=r(u);ae!==null&&Z(_,ae.startTime-K),q=!1}}break e}finally{f=null,m=Y,g=!1}q=void 0}}finally{q?W():B=!1}}}var W;if(typeof I=="function")W=function(){I(L)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,$=R.port2;R.port1.onmessage=L,W=function(){$.postMessage(null)}}else W=function(){b(L,0)};function X(){B||(B=!0,W())}function Z(K,q){T=b(function(){K(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_continueExecution=function(){A||g||(A=!0,X())},e.unstable_forceFrameRate=function(K){0>K||125ne?(K.sortIndex=Y,t(u,K),r(c)===null&&K===r(u)&&(v?(E(T),T=-1):v=!0,Z(_,Y-ne))):(K.sortIndex=ge,t(c,K),A||g||(A=!0,X())),K},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(K){var q=m;return function(){var Y=m;m=q;try{return K.apply(this,arguments)}finally{m=Y}}}})(l8)),l8}var QZ;function V5t(){return QZ||(QZ=1,o8.exports=K5t()),o8.exports}var Ive=V5t();const Y5t=hi(Ive),Sve=VZ({__proto__:null,default:Y5t},[Ive]);function Z5t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function J5t(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})})),r}var LZ,Bve={exports:{}},UZ={exports:{}},X5t=J5t(Sve),uE;Bve.exports=(LZ||(LZ=1,(uE=UZ).exports=function(e){function t(x,y,D,M){return new wh(x,y,D,M)}function r(x){var y="https://react.dev/errors/"+x;if(1)":-1--V||qe[M]!==It[V]){var mr=` `+qe[M].replace(" at new "," at ");return x.displayName&&mr.includes("")&&(mr=mr.replace("",x.displayName)),mr}while(1<=M&&0<=V);break}}}finally{qg=!1,Error.prepareStackTrace=D}return(D=x?x.displayName||x.name:"")?a(D):""}function l(x){switch(x.tag){case 26:case 27:case 5:return a(x.type);case 16:return a("Lazy");case 13:return a("Suspense");case 19:return a("SuspenseList");case 0:case 15:return s(x.type,!1);case 11:return s(x.type.render,!1);case 1:return s(x.type,!0);default:return""}}function c(x){try{var y="";do y+=l(x),x=x.return;while(x);return y}catch(D){return` Error generating stack: `+D.message+` `+D.stack}}function u(x){return{current:x}}function d(x){0>of||(x.current=Vg[of],Vg[of]=null,of--)}function f(x,y){of++,Vg[of]=x.current,x.current=y}function m(x){var y=42&x;if(y!==0)return y;switch(x&-x){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194176&x;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&x;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return x}}function g(x,y){var D=x.pendingLanes;if(D===0)return 0;var M=0,V=x.suspendedLanes;x=x.pingedLanes;var ee=134217727&D;return ee!==0?(D=ee&~V)!=0?M=m(D):(x&=ee)!=0&&(M=m(x)):(D&=~V)!=0?M=m(D):x!==0&&(M=m(x)),M===0?0:y!==0&&y!==M&&(y&V)==0&&((V=M&-M)>=(x=y&-y)||V===32&&(4194176&x)!=0)?y:M}function A(x,y){switch(x){case 1:case 2:case 4:case 8:return y+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return y+5e3;default:return-1}}function v(){var x=Yg;return(4194176&(Yg<<=1))==0&&(Yg=128),x}function b(){var x=Ry;return(62914560&(Ry<<=1))==0&&(Ry=4194304),x}function E(x){for(var y=[],D=0;31>D;D++)y.push(x);return y}function I(x,y){x.pendingLanes|=y,y!==268435456&&(x.suspendedLanes=0,x.pingedLanes=0,x.warmLanes=0)}function S(x,y,D){x.pendingLanes|=y,x.suspendedLanes&=~y;var M=31-pu(y);x.entangledLanes|=y,x.entanglements[M]=1073741824|x.entanglements[M]|4194218&D}function _(x,y){var D=x.entangledLanes|=y;for(x=x.entanglements;D;){var M=31-pu(D),V=1<_n?(Oa=ln,ln=null):Oa=ln.sibling;var zn=$t(An,ln,si[_n],Ds);if(zn===null){ln===null&&(ln=Oa);break}x&&ln&&zn.alternate===null&&y(An,ln),Mn=ee(zn,Mn,_n),ca===null?ps=zn:ca.sibling=zn,ca=zn,ln=Oa}if(_n===si.length)return D(An,ln),ps;if(ln===null){for(;_n_n?(Oa=ln,ln=null):Oa=ln.sibling;var Ea=$t(An,ln,zn.value,Ds);if(Ea===null){ln===null&&(ln=Oa);break}x&&ln&&Ea.alternate===null&&y(An,ln),Mn=ee(Ea,Mn,_n),ca===null?ps=Ea:ca.sibling=Ea,ca=Ea,ln=Oa}if(zn.done)return D(An,ln),ps;if(ln===null){for(;!zn.done;_n++,zn=si.next())(zn=cr(An,zn.value,Ds))!==null&&(Mn=ee(zn,Mn,_n),ca===null?ps=zn:ca.sibling=zn,ca=zn);return ps}for(ln=M(ln);!zn.done;_n++,zn=si.next())(zn=Or(ln,An,_n,zn.value,Ds))!==null&&(x&&zn.alternate!==null&&ln.delete(zn.key===null?_n:zn.key),Mn=ee(zn,Mn,_n),ca===null?ps=zn:ca.sibling=zn,ca=zn);return x&&ln.forEach((function(Su){return y(An,Su)})),ps})(ut,nt,Ct=Mi.call(Ct),ft)}if(typeof Ct.then=="function")return wa(ut,nt,Qt(Ct),ft);if(Ct.$$typeof===Ho)return wa(ut,nt,ja(ut,Ct),ft);Wt(ut,Ct)}return typeof Ct=="string"&&Ct!==""||typeof Ct=="number"||typeof Ct=="bigint"?(Ct=""+Ct,nt!==null&&nt.tag===6?(D(ut,nt.sibling),(nt=V(nt,Ct)).return=ut,ut=nt):(D(ut,nt),(nt=id(Ct,ut.mode,ft)).return=ut,ut=nt),Ce(ut)):D(ut,nt)}return function(ut,nt,Ct,ft){try{cf=0;var en=wa(ut,nt,Ct,ft);return Pa=null,en}catch(An){if(An===Ph)throw An;var Mi=t(29,An,null,ut.mode);return Mi.lanes=ft,Mi.return=ut,Mi}}}function Ht(x,y){f(Ks,x=A0),f(ap,y),A0=x|y.baseLanes}function Yt(){f(Ks,A0),f(ap,ap.current)}function hr(){A0=Ks.current,d(ap),d(Ks)}function pr(x){var y=x.alternate;f(fs,1&fs.current),f(xu,x),yu===null&&(y===null||ap.current!==null||y.memoizedState!==null)&&(yu=x)}function de(x){if(x.tag===22){if(f(fs,fs.current),f(xu,x),yu===null){var y=x.alternate;y!==null&&y.memoizedState!==null&&(yu=x)}}else st()}function st(){f(fs,fs.current),f(xu,xu.current)}function gt(x){d(xu),yu===x&&(yu=null),d(fs)}function ve(x){for(var y=x;y!==null;){if(y.tag===13){var D=y.memoizedState;if(D!==null&&((D=D.dehydrated)===null||Et(D)||_r(D)))return y}else if(y.tag===19&&y.memoizedProps.revealOrder!==void 0){if((128&y.flags)!=0)return y}else if(y.child!==null){y.child.return=y,y=y.child;continue}if(y===x)break;for(;y.sibling===null;){if(y.return===null||y.return===x)return null;y=y.return}y.sibling.return=y.return,y=y.sibling}return null}function ce(){throw Error(r(321))}function Ge(x,y){if(y===null)return!1;for(var D=0;Dee?ee:8);var Ce,Ue,qe,It=yn.T,mr={};yn.T=mr,pn(x,!1,y,D);try{var cr=V(),$t=yn.S;$t!==null&&$t(mr,cr),cr!==null&&typeof cr=="object"&&typeof cr.then=="function"?bi(x,y,(Ce=M,Ue=[],qe={status:"pending",value:null,reason:null,then:function(Or){Ue.push(Or)}},cr.then((function(){qe.status="fulfilled",qe.value=Ce;for(var Or=0;OraA&&(y.flags|=128,M=!0,J0(V,!1),y.lanes=4194304)}else{if(!M)if((x=ve(ee))!==null){if(y.flags|=128,M=!0,x=x.updateQueue,y.updateQueue=x,Gd(y,x),J0(V,!0),V.tail===null&&V.tailMode==="hidden"&&!ee.alternate)return Bs(y),null}else 2*ql()-V.renderingStartTime>aA&&D!==536870912&&(y.flags|=128,M=!0,J0(V,!1),y.lanes=4194304);V.isBackwards?(ee.sibling=y.child,y.child=ee):((x=V.last)!==null?x.sibling=ee:y.child=ee,V.last=ee)}return V.tail!==null?(y=V.tail,V.rendering=y,V.tail=y.sibling,V.renderingStartTime=ql(),y.sibling=null,x=fs.current,f(fs,M?1&x|2:1&x),y):(Bs(y),null);case 22:case 23:return gt(y),hr(),M=y.memoizedState!==null,x!==null?x.memoizedState!==null!==M&&(y.flags|=8192):M&&(y.flags|=8192),M?(536870912&D)!=0&&(128&y.flags)==0&&(Bs(y),6&y.subtreeFlags&&(y.flags|=8192)):Bs(y),(D=y.updateQueue)!==null&&Gd(y,D.retryQueue),D=null,x!==null&&x.memoizedState!==null&&x.memoizedState.cachePool!==null&&(D=x.memoizedState.cachePool.pool),M=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(M=y.memoizedState.cachePool.pool),M!==D&&(y.flags|=2048),x!==null&&d(cp),null;case 24:return D=null,x!==null&&(D=x.memoizedState.cache),y.memoizedState.cache!==D&&(y.flags|=2048),Bi(Vs),Bs(y),null;case 25:return null}throw Error(r(156,y.tag))}function nv(x,y){switch(O(y),y.tag){case 1:return 65536&(x=y.flags)?(y.flags=-65537&x|128,y):null;case 3:return Bi(Vs),L(),(65536&(x=y.flags))!=0&&(128&x)==0?(y.flags=-65537&x|128,y):null;case 26:case 27:case 5:return R(y),null;case 13:if(gt(y),(x=y.memoizedState)!==null&&x.dehydrated!==null&&y.alternate===null)throw Error(r(340));return 65536&(x=y.flags)?(y.flags=-65537&x|128,y):null;case 19:return d(fs),null;case 4:return L(),null;case 10:return Bi(y.type),null;case 22:case 23:return gt(y),hr(),x!==null&&d(cp),65536&(x=y.flags)?(y.flags=-65537&x|128,y):null;case 24:return Bi(Vs),null;default:return null}}function Rg(x,y){switch(O(y),y.tag){case 3:Bi(Vs),L();break;case 26:case 27:case 5:R(y);break;case 4:L();break;case 13:gt(y);break;case 19:d(fs);break;case 10:Bi(y.type);break;case 22:case 23:gt(y),hr(),x!==null&&d(cp);break;case 24:Bi(Vs)}}function qd(x,y){try{var D=y.updateQueue,M=D!==null?D.lastEffect:null;if(M!==null){var V=M.next;D=V;do{if((D.tag&x)===x){M=void 0;var ee=D.create,Ce=D.inst;M=ee(),Ce.destroy=M}D=D.next}while(D!==V)}}catch(Ue){kr(y,y.return,Ue)}}function ou(x,y,D){try{var M=y.updateQueue,V=M!==null?M.lastEffect:null;if(V!==null){var ee=V.next;M=ee;do{if((M.tag&x)===x){var Ce=M.inst,Ue=Ce.destroy;if(Ue!==void 0){Ce.destroy=void 0,V=y;var qe=D;try{Ue()}catch(It){kr(V,qe,It)}}}M=M.next}while(M!==ee)}}catch(It){kr(y,y.return,It)}}function Um(x){var y=x.updateQueue;if(y!==null){var D=x.stateNode;try{Le(y,D)}catch(M){kr(x,x.return,M)}}}function gh(x,y,D){D.props=ml(x.type,x.memoizedProps),D.state=x.memoizedState;try{D.componentWillUnmount()}catch(M){kr(x,y,M)}}function Kd(x,y){try{var D=x.ref;if(D!==null){var M=x.stateNode;switch(x.tag){case 26:case 27:case 5:var V=Wo(M);break;default:V=M}typeof D=="function"?x.refCleanup=D(V):D.current=V}}catch(ee){kr(x,y,ee)}}function oc(x,y){var D=x.ref,M=x.refCleanup;if(D!==null)if(typeof M=="function")try{M()}catch(V){kr(x,y,V)}finally{x.refCleanup=null,(x=x.alternate)!=null&&(x.refCleanup=null)}else if(typeof D=="function")try{D(null)}catch(V){kr(x,y,V)}else D.current=null}function iv(x){var y=x.type,D=x.memoizedProps,M=x.stateNode;try{Qe(M,y,D,x)}catch(V){kr(x,x.return,V)}}function gl(x){return x.tag===5||x.tag===3||x.tag===4}function Al(x){e:for(;;){for(;x.sibling===null;){if(x.return===null||gl(x.return))return null;x=x.return}for(x.sibling.return=x.return,x=x.sibling;x.tag!==5&&x.tag!==6&&x.tag!==18;){if(2&x.flags||x.child===null||x.tag===4)continue e;x.child.return=x,x=x.child}if(!(2&x.flags))return x.stateNode}}function $m(x,y,D){var M=x.tag;if(M===5||M===6)x=x.stateNode,y?Jt(D,x,y):te(D,x);else if(M!==4&&!sf&&(x=x.child)!==null)for($m(x,y,D),x=x.sibling;x!==null;)$m(x,y,D),x=x.sibling}function zm(x,y,D){var M=x.tag;if(M===5||M===6)x=x.stateNode,y?kt(D,x,y):J(D,x);else if(M!==4&&!sf&&(x=x.child)!==null)for(zm(x,y,D),x=x.sibling;x!==null;)zm(x,y,D),x=x.sibling}function Hm(x,y,D){var M=D.flags;switch(D.tag){case 0:case 11:case 15:cc(x,D),4&M&&qd(5,D);break;case 1:if(cc(x,D),4&M)if(x=D.stateNode,y===null)try{x.componentDidMount()}catch(Ue){kr(D,D.return,Ue)}else{var V=ml(D.type,y.memoizedProps);y=y.memoizedState;try{x.componentDidUpdate(V,y,x.__reactInternalSnapshotBeforeUpdate)}catch(Ue){kr(D,D.return,Ue)}}64&M&&Um(D),512&M&&Kd(D,D.return);break;case 3:if(cc(x,D),64&M&&(M=D.updateQueue)!==null){if(x=null,D.child!==null)switch(D.child.tag){case 27:case 5:x=Wo(D.child.stateNode);break;case 1:x=D.child.stateNode}try{Le(M,x)}catch(Ue){kr(D,D.return,Ue)}}break;case 26:case 27:case 5:cc(x,D),y===null&&4&M&&iv(D),512&M&&Kd(D,D.return);break;case 12:case 13:default:cc(x,D);break;case 22:if(!(V=D.memoizedState!==null||fd)){y=y!==null&&y.memoizedState!==null||qo;var ee=fd,Ce=qo;fd=V,(qo=y)&&!Ce?Ju(x,D,(8772&D.subtreeFlags)!=0):cc(x,D),fd=ee,qo=Ce}512&M&&(D.memoizedProps.mode==="manual"?Kd(D,D.return):oc(D,D.return))}}function Fg(x){var y=x.alternate;y!==null&&(x.alternate=null,Fg(y)),x.child=null,x.deletions=null,x.sibling=null,x.tag===5&&(y=x.stateNode)!==null&&Gs(y),x.stateNode=null,x.return=null,x.dependencies=null,x.memoizedProps=null,x.memoizedState=null,x.pendingProps=null,x.stateNode=null,x.updateQueue=null}function lu(x,y,D){for(D=D.child;D!==null;)Mg(x,y,D),D=D.sibling}function Mg(x,y,D){switch(D.tag){case 26:case 27:var M,V;case 5:qo||oc(D,y);case 6:if(M=Bl,V=g0,Bl=null,lu(x,y,D),g0=V,(Bl=M)!==null)if(g0)try{Ki(Bl,D.stateNode)}catch(ee){kr(D,y,ee)}else try{Dr(Bl,D.stateNode)}catch(ee){kr(D,y,ee)}break;case 18:Bl!==null&&(g0?gn(Bl,D.stateNode):Ur(Bl,D.stateNode));break;case 4:M=Bl,V=g0,Bl=D.stateNode.containerInfo,g0=!0,lu(x,y,D),Bl=M,g0=V;break;case 0:case 11:case 14:case 15:qo||ou(2,D,y),qo||ou(4,D,y),lu(x,y,D);break;case 1:qo||(oc(D,y),typeof(M=D.stateNode).componentWillUnmount=="function"&&gh(D,y,M)),lu(x,y,D);break;case 21:lu(x,y,D);break;case 22:oc(D,y),qo=(M=qo)||D.memoizedState!==null,lu(x,y,D),qo=M;break;default:lu(x,y,D)}}function Ah(x,y){var D=(function(M){switch(M.tag){case 13:case 19:var V=M.stateNode;return V===null&&(V=M.stateNode=new $y),V;case 22:return(V=(M=M.stateNode)._retryCache)===null&&(V=M._retryCache=new $y),V;default:throw Error(r(435,M.tag))}})(x);y.forEach((function(M){var V=tf.bind(null,x,M);D.has(M)||(D.add(M),M.then(V,V))}))}function lc(x,y){var D=y.deletions;if(D!==null)for(var M=0;MD?32:D;D=yn.T;var V=gi();try{if(Vn(M),yn.T=null,hf===null)var ee=!1;else{M=Ev,Ev=null;var Ce=hf,Ue=Mh;if(hf=null,Mh=0,(6&Va)!=0)throw Error(r(331));var qe=Va;Va|=4,X0(Ce.current),uc(Ce,Ce.current,Ue,M),Va=qe,ge(0),uv&&uv.onPostCommitFiberRoot,ee=!0}return ee}finally{Vn(V),yn.T=D,r0(x,y)}}return!1}function wo(x,y,D){y=P(D,y),(x=Se(x,y=cs(x.stateNode,y,2),2))!==null&&(I(x,2),ne(x))}function kr(x,y,D){if(x.tag===3)wo(x,x,D);else for(;y!==null;){if(y.tag===3){wo(y,x,D);break}if(y.tag===1){var M=y.stateNode;if(typeof y.type.getDerivedStateFromError=="function"||typeof M.componentDidCatch=="function"&&(x0===null||!x0.has(M))){x=P(D,x),(M=Se(y,D=no(2),2))!==null&&($s(D,M,y,x),I(M,2),ne(M));break}}y=y.return}}function Da(x,y,D){var M=x.pingCache;if(M===null){M=x.pingCache=new O5;var V=new Set;M.set(y,V)}else(V=M.get(y))===void 0&&(V=new Set,M.set(y,V));V.has(D)||(yv=!0,V.add(D),x=qa.bind(null,x,y,D),y.then(x,x))}function qa(x,y,D){var M=x.pingCache;M!==null&&M.delete(y),x.pingedLanes|=x.suspendedLanes&D,x.warmLanes&=~D,Vi===x&&(ai&D)===D&&(ms===4||ms===3&&(62914560&ai)===ai&&300>ql()-wv?(2&Va)==0&&ed(x,0):Ko|=D,dp===ai&&(dp=0)),ne(x)}function ef(x,y){y===0&&(y=b()),(x=K(x,y))!==null&&(I(x,y),ne(x))}function Hl(x){var y=x.memoizedState,D=0;y!==null&&(D=y.retryLane),ef(x,D)}function tf(x,y){var D=0;switch(x.tag){case 13:var M=x.stateNode,V=x.memoizedState;V!==null&&(D=V.retryLane);break;case 19:M=x.stateNode;break;case 22:M=x.stateNode._retryCache;break;default:throw Error(r(314))}M!==null&&M.delete(y),ef(x,D)}function wh(x,y,D,M){this.tag=x,this.key=D,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=y,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=M,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function n0(x){return!(!(x=x.prototype)||!x.isReactComponent)}function Wl(x,y){var D=x.alternate;return D===null?((D=t(x.tag,y,x.key,x.mode)).elementType=x.elementType,D.type=x.type,D.stateNode=x.stateNode,D.alternate=x,x.alternate=D):(D.pendingProps=y,D.type=x.type,D.flags=0,D.subtreeFlags=0,D.deletions=null),D.flags=31457280&x.flags,D.childLanes=x.childLanes,D.lanes=x.lanes,D.child=x.child,D.memoizedProps=x.memoizedProps,D.memoizedState=x.memoizedState,D.updateQueue=x.updateQueue,y=x.dependencies,D.dependencies=y===null?null:{lanes:y.lanes,firstContext:y.firstContext},D.sibling=x.sibling,D.index=x.index,D.ref=x.ref,D.refCleanup=x.refCleanup,D}function Eh(x,y){x.flags&=31457282;var D=x.alternate;return D===null?(x.childLanes=0,x.lanes=y,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=D.childLanes,x.lanes=D.lanes,x.child=D.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=D.memoizedProps,x.memoizedState=D.memoizedState,x.updateQueue=D.updateQueue,x.type=D.type,y=D.dependencies,x.dependencies=y===null?null:{lanes:y.lanes,firstContext:y.firstContext}),x}function rf(x,y,D,M,V,ee){var Ce=0;if(M=x,typeof x=="function")n0(x)&&(Ce=1);else if(typeof x=="string")Ce=5;else e:switch(x){case wl:return Cr(D.children,V,ee,y);case ks:Ce=8,V|=24;break;case du:return(x=t(12,D,y,2|V)).elementType=du,x.lanes=ee,x;case sd:return(x=t(13,D,y,V)).elementType=sd,x.lanes=ee,x;case od:return(x=t(19,D,y,V)).elementType=od,x.lanes=ee,x;case Zm:return nd(D,V,ee,y);default:if(typeof x=="object"&&x!==null)switch(x.$$typeof){case Ym:case Ho:Ce=10;break e;case Wg:Ce=9;break e;case Ch:Ce=11;break e;case i0:Ce=14;break e;case Qc:Ce=16,M=null;break e}Ce=29,D=Error(r(130,x===null?"null":typeof x,"")),M=null}return(y=t(Ce,D,y,V)).elementType=x,y.type=M,y.lanes=ee,y}function Cr(x,y,D,M){return(x=t(7,x,M,y)).lanes=D,x}function nd(x,y,D,M){(x=t(22,x,M,y)).elementType=Zm,x.lanes=D;var V={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var ee=V._current;if(ee===null)throw Error(r(456));if((2&V._pendingVisibility)==0){var Ce=K(ee,2);Ce!==null&&(V._pendingVisibility|=2,zo(Ce,0,2))}},attach:function(){var ee=V._current;if(ee===null)throw Error(r(456));if((2&V._pendingVisibility)!=0){var Ce=K(ee,2);Ce!==null&&(V._pendingVisibility&=-3,zo(Ce,0,2))}}};return x.stateNode=V,x}function id(x,y,D){return(x=t(6,x,null,y)).lanes=D,x}function Rc(x,y,D){return(y=t(4,x.children!==null?x.children:[],x.key,y)).lanes=D,y.stateNode={containerInfo:x.containerInfo,pendingChildren:null,implementation:x.implementation},y}function Vm(x,y,D,M,V,ee,Ce,Ue){this.tag=1,this.containerInfo=x,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=hu,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=E(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=E(0),this.hiddenUpdates=E(null),this.identifierPrefix=M,this.onUncaughtError=V,this.onCaughtError=ee,this.onRecoverableError=Ce,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Ue,this.incompleteTransitions=new Map}function cu(x,y,D,M,V,ee){V=(function(Ce){return Ce?Ce=Bh:Bh})(V),M.context===null?M.context=V:M.pendingContext=V,(M=me(y)).payload={element:D},(ee=ee===void 0?null:ee)!==null&&(M.callback=ee),(D=Se(x,M,y))!==null&&(zo(D,0,y),Ie(D,x,y))}var ad,uu,Fc={},Oi=gr,Ns=X5t,Hs=Object.assign,dc=Symbol.for("react.element"),bl=Symbol.for("react.transitional.element"),Mc=Symbol.for("react.portal"),wl=Symbol.for("react.fragment"),ks=Symbol.for("react.strict_mode"),du=Symbol.for("react.profiler"),Ym=Symbol.for("react.provider"),Wg=Symbol.for("react.consumer"),Ho=Symbol.for("react.context"),Ch=Symbol.for("react.forward_ref"),sd=Symbol.for("react.suspense"),od=Symbol.for("react.suspense_list"),i0=Symbol.for("react.memo"),Qc=Symbol.for("react.lazy"),Zm=Symbol.for("react.offscreen"),Jm=Symbol.for("react.memo_cache_sentinel"),Gg=Symbol.iterator,Xm=Symbol.for("react.client.reference"),yn=Oi.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,qg=!1,nf=Array.isArray,Wo=e.getPublicInstance,sv=e.getRootHostContext,ld=e.getChildHostContext,oo=e.prepareForCommit,Ih=e.resetAfterCommit,fu=e.createInstance,Sh=e.appendInitialChild,Kg=e.finalizeInitialChildren,ov=e.shouldSetTextContent,Eo=e.createTextInstance,cd=null,Gl=null,hu=e.noTimeout,El=!0,a0=null,Lc=null,Vn=e.setCurrentUpdatePriority,gi=e.getCurrentUpdatePriority,Go=e.resolveUpdatePriority,Ws=e.shouldAttemptEagerTransition,Gs=null;e.requestPostPaintCallback;var s0=e.maySuspendCommit,o0=null,qs=null,af=null,lv=null,k=null,N=null,F=null,J=e.appendChild,te=e.appendChildToContainer,Ae=e.commitTextUpdate,Qe=null,yt=e.commitUpdate,kt=e.insertBefore,Jt=null,Dr=e.removeChild,Ki=e.removeChildFromContainer,Yn=e.resetTextContent,ea=null,_s=null,ds=null,pt=null,ot=e.clearContainer,Et=null,_r=null,Jr=null,ii=null,Ur=null,gn=null,En=null,Cn=null,mu=null,sf=null,Vg=[],of=-1,Bh={},pu=Math.clz32?Math.clz32:function(x){return(x>>>=0)==0?32:31-(B5(x)/ep|0)|0},B5=Math.log,ep=Math.LN2,Yg=128,Ry=4194304,Nh=Ns.unstable_scheduleCallback,tp=Ns.unstable_cancelCallback,N5=Ns.unstable_shouldYield,k5=Ns.unstable_requestPaint,ql=Ns.unstable_now,Fy=Ns.unstable_ImmediatePriority,cv=Ns.unstable_UserBlockingPriority,Zg=Ns.unstable_NormalPriority,rp=Ns.unstable_IdlePriority,My=Ns.log,Qy=Ns.unstable_setDisableYieldValue,uv=null,Cl=typeof Object.is=="function"?Object.is:function(x,y){return x===y&&(x!==0||1/x==1/y)||x!=x&&y!=y},kh=new WeakMap,Il=[],l0=0,dv=null,_h=[],Kl=0,ud=null,gu=u(null),np=u(null),Uc=u(null),Au=u(null),fv=!1,c0=null;Error(r(519));var Sl=[],jh=0,Dh=0,fc=null,u0=null,Th=!1,d0=!1,Jg=!1,vu=0,ip=null,Xg=0,Ri=0,f0=null,h0=!1,eA=!1,hv=Object.prototype.hasOwnProperty,Ph=Error(r(460)),lf=Error(r(474)),la={then:function(){}},Ta=null,Pa=null,cf=0,m0=xr(!0),tA=xr(!1),ap=u(null),Ks=u(0),xu=u(null),yu=null,fs=u(0),Co=0,on=null,Fi=null,Ka=null,sp=!1,Oh=!1,uf=!1,mv=0,op=0,Rh=null,_5=0,pv=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}},bu={readContext:Rn,use:zt,useCallback:ce,useContext:ce,useEffect:ce,useImperativeHandle:ce,useLayoutEffect:ce,useInsertionEffect:ce,useMemo:ce,useReducer:ce,useRef:ce,useState:ce,useDebugValue:ce,useDeferredValue:ce,useTransition:ce,useSyncExternalStore:ce,useId:ce};bu.useCacheRefresh=ce,bu.useMemoCache=ce,bu.useHostTransitionStatus=ce,bu.useFormState=ce,bu.useActionState=ce,bu.useOptimistic=ce;var wu={readContext:Rn,use:zt,useCallback:function(x,y){return be().memoizedState=[x,y===void 0?null:y],x},useContext:Rn,useEffect:vo,useImperativeHandle:function(x,y,D){D=D!=null?D.concat([x]):null,Ha(4194308,4,Na.bind(null,y,x),D)},useLayoutEffect:function(x,y){return Ha(4194308,4,x,y)},useInsertionEffect:function(x,y){Ha(4,2,x,y)},useMemo:function(x,y){var D=be();y=y===void 0?null:y;var M=x();if(uf){T(!0);try{x()}finally{T(!1)}}return D.memoizedState=[M,y],M},useReducer:function(x,y,D){var M=be();if(D!==void 0){var V=D(y);if(uf){T(!0);try{D(y)}finally{T(!1)}}}else V=y;return M.memoizedState=M.baseState=V,x={pending:null,lanes:0,dispatch:null,lastRenderedReducer:x,lastRenderedState:V},M.queue=x,x=x.dispatch=jr.bind(null,on,x),[M.memoizedState,x]},useRef:function(x){return x={current:x},be().memoizedState=x},useState:function(x){var y=(x=Tn(x)).queue,D=fn.bind(null,on,y);return y.dispatch=D,[x.memoizedState,D]},useDebugValue:ue,useDeferredValue:function(x,y){return tt(be(),x,y)},useTransition:function(){var x=Tn(!1);return x=Pt.bind(null,on,x.queue,!0,!1),be().memoizedState=x,[!1,x]},useSyncExternalStore:function(x,y,D){var M=on,V=be();if(D=y(),Vi===null)throw Error(r(349));(60&ai)!=0||St(M,y,D),V.memoizedState=D;var ee={value:D,getSnapshot:y};return V.queue=ee,vo(un.bind(null,M,ee,x),[x]),M.flags|=2048,yi(9,Zt.bind(null,M,ee,D,y),{destroy:void 0},null),D},useId:function(){var x=be(),y=Vi.identifierPrefix;return y=":"+y+"r"+(_5++).toString(32)+":",x.memoizedState=y},useCacheRefresh:function(){return be().memoizedState=vr.bind(null,on)}};wu.useMemoCache=Te,wu.useHostTransitionStatus=Tt,wu.useFormState=ss,wu.useActionState=ss,wu.useOptimistic=function(x){var y=be();y.memoizedState=y.baseState=x;var D={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return y.queue=D,y=pn.bind(null,on,!0,D),D.dispatch=y,[x,y]};var dd={readContext:Rn,use:zt,useCallback:Fe,useContext:Rn,useEffect:Wa,useImperativeHandle:le,useInsertionEffect:ri,useLayoutEffect:Us,useMemo:ze,useReducer:$r,useRef:za,useState:function(){return $r(jt)},useDebugValue:ue,useDeferredValue:function(x,y){return xt(We(),Fi.memoizedState,x,y)},useTransition:function(){var x=$r(jt)[0],y=We().memoizedState;return[typeof x=="boolean"?x:er(x),y]},useSyncExternalStore:Ne,useId:nr};dd.useCacheRefresh=Lt,dd.useMemoCache=Te,dd.useHostTransitionStatus=Tt,dd.useFormState=os,dd.useActionState=os,dd.useOptimistic=function(x,y){return Sr(We(),0,x,y)};var p0={readContext:Rn,use:zt,useCallback:Fe,useContext:Rn,useEffect:Wa,useImperativeHandle:le,useInsertionEffect:ri,useLayoutEffect:Us,useMemo:ze,useReducer:rr,useRef:za,useState:function(){return rr(jt)},useDebugValue:ue,useDeferredValue:function(x,y){var D=We();return Fi===null?tt(D,x,y):xt(D,Fi.memoizedState,x,y)},useTransition:function(){var x=rr(jt)[0],y=We().memoizedState;return[typeof x=="boolean"?x:er(x),y]},useSyncExternalStore:Ne,useId:nr};p0.useCacheRefresh=Lt,p0.useMemoCache=Te,p0.useHostTransitionStatus=Tt,p0.useFormState=eo,p0.useActionState=eo,p0.useOptimistic=function(x,y){var D=We();return Fi!==null?Sr(D,0,x,y):(D.baseState=x,[x,D.queue.dispatch])};var lp={isMounted:function(x){return!!(x=x._reactInternals)&&(function(y){var D=y,M=y;if(y.alternate)for(;D.return;)D=D.return;else{y=D;do(4098&(D=y).flags)!=0&&(M=D.return),y=D.return;while(y)}return D.tag===3?M:null})(x)===x},enqueueSetState:function(x,y,D){x=x._reactInternals;var M=$o(),V=me(M);V.payload=y,D!=null&&(V.callback=D),(y=Se(x,V,M))!==null&&(zo(y,0,M),Ie(y,x,M))},enqueueReplaceState:function(x,y,D){x=x._reactInternals;var M=$o(),V=me(M);V.tag=1,V.payload=y,D!=null&&(V.callback=D),(y=Se(x,V,M))!==null&&(zo(y,0,M),Ie(y,x,M))},enqueueForceUpdate:function(x,y){x=x._reactInternals;var D=$o(),M=me(D);M.tag=2,y!=null&&(M.callback=y),(y=Se(x,M,D))!==null&&(zo(y,0,D),Ie(y,x,D))}};typeof reportError=="function"&&reportError;var Ly=Error(r(461)),js=!1,gv={dehydrated:null,treeContext:null,retryLane:0},Av=u(null),rA=null,Fh=null,nA=null,j5=typeof AbortController<"u"?AbortController:function(){var x=[],y=this.signal={aborted:!1,addEventListener:function(D,M){x.push(M)}};this.abort=function(){y.aborted=!0,x.forEach((function(D){return D()}))}},D5=Ns.unstable_scheduleCallback,T5=Ns.unstable_NormalPriority,Vs={$$typeof:Ho,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},Uy=yn.S;yn.S=function(x,y){typeof y=="object"&&y!==null&&typeof y.then=="function"&&(function(D,M){if(ip===null){var V=ip=[];Xg=0,Ri=xe(),f0={status:"pending",value:void 0,then:function(ee){V.push(ee)}}}Xg++,M.then(Me,Me)})(0,y),Uy!==null&&Uy(x,y)};var cp=u(null),fd=!1,qo=!1,vv=!1,$y=typeof WeakSet=="function"?WeakSet:Set,hs=null,P5=!1,Bl=null,g0=!1,Eu=null,df=8192,xv={getCacheForType:function(x){var y=Rn(Vs),D=y.data.get(x);return D===void 0&&(D=x(),y.data.set(x,D)),D}};if(typeof Symbol=="function"&&Symbol.for){var up=Symbol.for;up("selector.component"),up("selector.has_pseudo_class"),up("selector.role"),up("selector.test_id"),up("selector.text")}var O5=typeof WeakMap=="function"?WeakMap:Map,Va=0,Vi=null,In=null,ai=0,ba=0,Cu=null,iA=!1,yv=!1,A0=0,ms=0,v0=0,ff=0,Ko=0,ta=0,dp=0,fp=null,Iu=null,bv=!1,wv=0,aA=1/0,sA=null,x0=null,oA=!1,hf=null,Mh=0,lA=0,Ev=null,Qh=0,hp=null;return Fc.createContainer=function(x,y,D,M,V,ee,Ce,Ue,qe,It){return(function(mr,cr,$t,Or,wa,ut,nt,Ct,ft,en,Mi,An){return mr=new Vm(mr,cr,$t,nt,Ct,ft,en,null),cr=1,ut===!0&&(cr|=24),ut=t(3,null,null,cr),mr.current=ut,ut.stateNode=mr,(cr=Ss()).refCount++,mr.pooledCache=cr,cr.refCount++,ut.memoizedState={element:Or,isDehydrated:$t,cache:cr},ye(ut),mr})(x,y,!1,null,0,M,ee,Ce,Ue,qe)},Fc.flushSyncWork=function(){return(6&Va)!=0||(ge(0),!1)},Fc.updateContainer=function(x,y,D,M){var V=y.current,ee=$o();return cu(V,ee,x,y,D,M),ee},Fc.updateContainerSync=function(x,y,D,M){return y.tag===0&&Yr(),cu(y.current,2,x,y,D,M),2},Fc},uE.exports.default=uE.exports,Object.defineProperty(uE.exports,"__esModule",{value:!0})),UZ.exports);var $Z,e4t=Z5t(Bve.exports),Nve={exports:{}},kp={};Nve.exports=($Z||($Z=1,kp.ConcurrentRoot=1,kp.ContinuousEventPriority=8,kp.DefaultEventPriority=32,kp.DiscreteEventPriority=2,kp.IdleEventPriority=268435456,kp.LegacyRoot=0,kp.NoEventPriority=0),kp);var c8=Nve.exports;const kve=(e,t)=>{const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i{const d=e4t({appendChild:e,appendChildToContainer:t,appendInitialChild:e,createInstance:i,createTextInstance:a,insertBefore:s,commitUpdate:(f,m,g,A)=>{kve(g,A)||n(f,null,m,g,A)},commitTextUpdate:r,removeChild:l,removeChildFromContainer:c,resetAfterCommit:u,noTimeout:-1,shouldSetTextContent:()=>!1,finalizeInitialChildren:()=>!1,getPublicInstance:f=>f,getRootHostContext:()=>zZ,getChildHostContext:()=>zZ,prepareForCommit(){},clearContainer(){},resetTextContent(){},getCurrentUpdatePriority:()=>c8.DefaultEventPriority,maySuspendCommit:()=>!1,requestPostPaintCallback:()=>{},resolveUpdatePriority:()=>c8.DefaultEventPriority,setCurrentUpdatePriority:()=>{},shouldAttemptEagerTransition:()=>!1});return{createContainer:f=>d.createContainer(f,c8.ConcurrentRoot,null,!1,null,"",u8,u8,u8,null),updateContainer:(f,m,g,A)=>{d.updateContainerSync(f,m,g,A),d.flushSyncWork()}}};var d8,HZ;function r4t(){if(HZ)return d8;HZ=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},l=0;l<10;l++)s["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return d8=i()?Object.assign:function(a,s){for(var l,c=n(a),u,d=1;dHt||(k.current=xr[Ht],xr[Ht]=null,Ht--)}function hr(k,N){Ht++,xr[Ht]=k.current,k.current=N}var pr={},de={current:pr},st={current:!1},gt=pr;function ve(k,N){var F=k.type.contextTypes;if(!F)return pr;var J=k.stateNode;if(J&&J.__reactInternalMemoizedUnmaskedChildContext===N)return J.__reactInternalMemoizedMaskedChildContext;var te,Ae={};for(te in F)Ae[te]=N[te];return J&&((k=k.stateNode).__reactInternalMemoizedUnmaskedChildContext=N,k.__reactInternalMemoizedMaskedChildContext=Ae),Ae}function ce(k){return(k=k.childContextTypes)!=null}function Ge(k){Yt(st),Yt(de)}function ie(k){Yt(st),Yt(de)}function at(k,N,F){if(de.current!==pr)throw Error(a(168));hr(de,N),hr(st,F)}function bt(k,N,F){var J=k.stateNode;if(k=N.childContextTypes,typeof J.getChildContext!="function")return F;for(var te in J=J.getChildContext())if(!(te in k))throw Error(a(108,P(N)||"Unknown",te));return r({},F,{},J)}function U(k){var N=k.stateNode;return N=N&&N.__reactInternalMemoizedMergedChildContext||pr,gt=de.current,hr(de,N),hr(st,st.current),!0}function Re(k,N,F){var J=k.stateNode;if(!J)throw Error(a(169));F?(N=bt(k,N,gt),J.__reactInternalMemoizedMergedChildContext=N,Yt(st),Yt(de),hr(de,N)):Yt(st),hr(st,F)}var He=i.unstable_runWithPriority,se=i.unstable_scheduleCallback,be=i.unstable_cancelCallback,We=i.unstable_shouldYield,er=i.unstable_requestPaint,zt=i.unstable_now,Te=i.unstable_getCurrentPriorityLevel,jt=i.unstable_ImmediatePriority,$r=i.unstable_UserBlockingPriority,Br=i.unstable_NormalPriority,rr=i.unstable_LowPriority,Ne=i.unstable_IdlePriority,St={},Zt=er!==void 0?er:function(){},un=null,Bn=null,dn=!1,Tn=zt(),Sr=1e4>Tn?zt:function(){return zt()-Tn};function wn(){switch(Te()){case jt:return 99;case $r:return 98;case Br:return 97;case rr:return 96;case Ne:return 95;default:throw Error(a(332))}}function qi(k){switch(k){case 99:return jt;case 98:return $r;case 97:return Br;case 96:return rr;case 95:return Ne;default:throw Error(a(332))}}function ia(k,N){return k=qi(k),He(k,N)}function Fo(k,N,F){return k=qi(k),se(k,N,F)}function $i(k){return un===null?(un=[k],Bn=se(jt,Ua)):un.push(k),St}function Kn(){if(Bn!==null){var k=Bn;Bn=null,be(k)}Ua()}function Ua(){if(!dn&&un!==null){dn=!0;var k=0;try{var N=un;ia(99,(function(){for(;k=N&&(gl=!0),k.firstContext=null)}function ue(k,N){if(vo!==k&&N!==!1&&N!==0)if(typeof N=="number"&&N!==1073741823||(vo=k,N=1073741823),N={context:k,observedBits:N,next:null},to===null){if(Ha===null)throw Error(a(308));to=N,Ha.dependencies={expirationTime:0,firstContext:N,responders:null}}else to=to.next=N;return k._currentValue2}var Fe=!1;function ze(k){return{baseState:k,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function tt(k){return{baseState:k.baseState,firstUpdate:k.firstUpdate,lastUpdate:k.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function xt(k,N){return{expirationTime:k,suspenseConfig:N,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Pt(k,N){k.lastUpdate===null?k.firstUpdate=k.lastUpdate=N:(k.lastUpdate.next=N,k.lastUpdate=N)}function Tt(k,N){var F=k.alternate;if(F===null){var J=k.updateQueue,te=null;J===null&&(J=k.updateQueue=ze(k.memoizedState))}else J=k.updateQueue,te=F.updateQueue,J===null?te===null?(J=k.updateQueue=ze(k.memoizedState),te=F.updateQueue=ze(F.memoizedState)):J=k.updateQueue=tt(te):te===null&&(te=F.updateQueue=tt(J));te===null||J===te?Pt(J,N):J.lastUpdate===null||te.lastUpdate===null?(Pt(J,N),Pt(te,N)):(Pt(J,N),te.lastUpdate=N)}function nr(k,N){var F=k.updateQueue;(F=F===null?k.updateQueue=ze(k.memoizedState):Lt(k,F)).lastCapturedUpdate===null?F.firstCapturedUpdate=F.lastCapturedUpdate=N:(F.lastCapturedUpdate.next=N,F.lastCapturedUpdate=N)}function Lt(k,N){var F=k.alternate;return F!==null&&N===F.updateQueue&&(N=k.updateQueue=tt(N)),N}function vr(k,N,F,J,te,Ae){switch(F.tag){case 1:return typeof(k=F.payload)=="function"?k.call(Ae,J,te):k;case 3:k.effectTag=-4097&k.effectTag|64;case 0:if((te=typeof(k=F.payload)=="function"?k.call(Ae,J,te):k)==null)break;return r({},J,te);case 2:Fe=!0}return J}function jr(k,N,F,J,te){Fe=!1;for(var Ae=(N=Lt(k,N)).baseState,Qe=null,yt=0,kt=N.firstUpdate,Jt=Ae;kt!==null;){var Dr=kt.expirationTime;Drgn?(En=Ur,Ur=null):En=Ur.sibling;var Cn=Yn(pt,Ur,Et[gn],_r);if(Cn===null){Ur===null&&(Ur=En);break}k&&Ur&&Cn.alternate===null&&N(pt,Ur),ot=Ae(Cn,ot,gn),ii===null?Jr=Cn:ii.sibling=Cn,ii=Cn,Ur=En}if(gn===Et.length)return F(pt,Ur),Jr;if(Ur===null){for(;gngn?(En=Ur,Ur=null):En=Ur.sibling;var mu=Yn(pt,Ur,Cn.value,_r);if(mu===null){Ur===null&&(Ur=En);break}k&&Ur&&mu.alternate===null&&N(pt,Ur),ot=Ae(mu,ot,gn),ii===null?Jr=mu:ii.sibling=mu,ii=mu,Ur=En}if(Cn.done)return F(pt,Ur),Jr;if(Ur===null){for(;!Cn.done;gn++,Cn=Et.next())(Cn=Ki(pt,Cn.value,_r))!==null&&(ot=Ae(Cn,ot,gn),ii===null?Jr=Cn:ii.sibling=Cn,ii=Cn);return Jr}for(Ur=J(pt,Ur);!Cn.done;gn++,Cn=Et.next())(Cn=ea(Ur,pt,gn,Cn.value,_r))!==null&&(k&&Cn.alternate!==null&&Ur.delete(Cn.key===null?gn:Cn.key),ot=Ae(Cn,ot,gn),ii===null?Jr=Cn:ii.sibling=Cn,ii=Cn);return k&&Ur.forEach((function(sf){return N(pt,sf)})),Jr}return function(pt,ot,Et,_r){var Jr=typeof Et=="object"&&Et!==null&&Et.type===d&&Et.key===null;Jr&&(Et=Et.props.children);var ii=typeof Et=="object"&&Et!==null;if(ii)switch(Et.$$typeof){case c:e:{for(ii=Et.key,Jr=ot;Jr!==null;){if(Jr.key===ii){if(Jr.tag===7?Et.type===d:Jr.elementType===Et.type){F(pt,Jr.sibling),(ot=te(Jr,Et.type===d?Et.props.children:Et.props)).ref=ro(pt,Jr,Et),ot.return=pt,pt=ot;break e}F(pt,Jr);break}N(pt,Jr),Jr=Jr.sibling}Et.type===d?((ot=El(Et.props.children,pt.mode,_r,Et.key)).return=pt,pt=ot):((_r=hu(Et.type,Et.key,Et.props,null,pt.mode,_r)).ref=ro(pt,ot,Et),_r.return=pt,pt=_r)}return Qe(pt);case u:e:{for(Jr=Et.key;ot!==null;){if(ot.key===Jr){if(ot.tag===4&&ot.stateNode.containerInfo===Et.containerInfo&&ot.stateNode.implementation===Et.implementation){F(pt,ot.sibling),(ot=te(ot,Et.children||[])).return=pt,pt=ot;break e}F(pt,ot);break}N(pt,ot),ot=ot.sibling}(ot=Lc(Et,pt.mode,_r)).return=pt,pt=ot}return Qe(pt)}if(typeof Et=="string"||typeof Et=="number")return Et=""+Et,ot!==null&&ot.tag===6?(F(pt,ot.sibling),(ot=te(ot,Et)).return=pt,pt=ot):(F(pt,ot),(ot=a0(Et,pt.mode,_r)).return=pt,pt=ot),Qe(pt);if(Mo(Et))return _s(pt,ot,Et,_r);if(T(Et))return ds(pt,ot,Et,_r);if(ii&&cs(pt,Et),Et===void 0&&!Jr)switch(pt.tag){case 1:case 0:throw pt=pt.type,Error(a(152,pt.displayName||pt.name||"Component"))}return F(pt,ot)}}var $s=no(!0),zi=no(!1),Qo={},va={current:Qo},au={current:Qo},Ul={current:Qo};function io(k){if(k===Qo)throw Error(a(174));return k}function Ku(k,N){hr(Ul,N),hr(au,k),hr(va,Qo),N=$(N),Yt(va),hr(va,N)}function ka(k){Yt(va),Yt(au),Yt(Ul)}function _c(k){var N=io(Ul.current),F=io(va.current);F!==(N=X(F,k.type,N))&&(hr(au,k),hr(va,N))}function Vu(k){au.current===k&&(Yt(va),Yt(au))}var Hi={current:0};function Lo(k){for(var N=k;N!==null;){if(N.tag===13){var F=N.memoizedState;if(F!==null&&((F=F.dehydrated)===null||Qt(F)||Ot(F)))return N}else if(N.tag===19&&N.memoizedProps.revealOrder!==void 0){if((64&N.effectTag)!=0)return N}else if(N.child!==null){N.child.return=N,N=N.child;continue}if(N===k)break;for(;N.sibling===null;){if(N.return===null||N.return===k)return null;N=N.return}N.sibling.return=N.return,N=N.sibling}return null}function jc(k,N){return{responder:k,props:N}}var Uo=s.ReactCurrentDispatcher,aa=s.ReactCurrentBatchConfig,pl=0,Cs=null,_a=null,Is=null,Ga=null,xa=null,zs=null,ao=0,sa=null,Bi=0,$l=!1,us=null,yo=0;function ni(){throw Error(a(321))}function so(k,N){if(N===null)return!1;for(var F=0;Fao&&i0(ao=Dr)):(od(Dr,kt.suspenseConfig),Ae=kt.eagerReducer===k?kt.eagerState:k(Ae,kt.action)),Qe=kt,kt=kt.next}while(kt!==null&&kt!==J);Jt||(yt=Qe,te=Ae),$a(Ae,N.memoizedState)||(gl=!0),N.memoizedState=Ae,N.baseUpdate=yt,N.baseState=te,F.lastRenderedState=Ae}return[N.memoizedState,F.dispatch]}function su(k){var N=ya();return typeof k=="function"&&(k=k()),N.memoizedState=N.baseState=k,k=(k=N.queue={last:null,dispatch:null,lastRenderedReducer:sc,lastRenderedState:k}).dispatch=Um.bind(null,Cs,k),[N.memoizedState,k]}function mh(k){return Yu(sc)}function ph(k,N,F,J){return k={tag:k,create:N,destroy:F,deps:J,next:null},sa===null?(sa={lastEffect:null}).lastEffect=k.next=k:(N=sa.lastEffect)===null?sa.lastEffect=k.next=k:(F=N.next,N.next=k,k.next=F,sa.lastEffect=k),k}function Gd(k,N,F,J){var te=ya();Bi|=k,te.memoizedState=ph(N,F,void 0,J===void 0?null:J)}function J0(k,N,F,J){var te=Ss();J=J===void 0?null:J;var Ae=void 0;if(_a!==null){var Qe=_a.memoizedState;if(Ae=Qe.destroy,J!==null&&so(J,Qe.deps))return void ph(0,F,Ae,J)}Bi|=k,te.memoizedState=ph(N,F,Ae,J)}function Bs(k,N){return Gd(516,192,k,N)}function rv(k,N){return J0(516,192,k,N)}function nv(k,N){return typeof N=="function"?(k=k(),N(k),function(){N(null)}):N!=null?(k=k(),N.current=k,function(){N.current=null}):void 0}function Rg(){}function qd(k,N){return ya().memoizedState=[k,N===void 0?null:N],k}function ou(k,N){var F=Ss();N=N===void 0?null:N;var J=F.memoizedState;return J!==null&&N!==null&&so(N,J[1])?J[0]:(F.memoizedState=[k,N],k)}function Um(k,N,F){if(!(25>yo))throw Error(a(301));var J=k.alternate;if(k===Cs||J!==null&&J===Cs)if($l=!0,k={expirationTime:pl,suspenseConfig:null,action:F,eagerReducer:null,eagerState:null,next:null},us===null&&(us=new Map),(F=us.get(N))===void 0)us.set(N,k);else{for(N=F;N.next!==null;)N=N.next;N.next=k}else{var te=Hs(),Ae=pn.suspense;Ae={expirationTime:te=dc(te,k,Ae),suspenseConfig:Ae,action:F,eagerReducer:null,eagerState:null,next:null};var Qe=N.last;if(Qe===null)Ae.next=Ae;else{var yt=Qe.next;yt!==null&&(Ae.next=yt),Qe.next=Ae}if(N.last=Ae,k.expirationTime===0&&(J===null||J.expirationTime===0)&&(J=N.lastRenderedReducer)!==null)try{var kt=N.lastRenderedState,Jt=J(kt,F);if(Ae.eagerReducer=J,Ae.eagerState=Jt,$a(Jt,kt))return}catch{}bl(k,te)}}var gh={readContext:ue,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useResponder:ni,useDeferredValue:ni,useTransition:ni},Kd={readContext:ue,useCallback:qd,useContext:ue,useEffect:Bs,useImperativeHandle:function(k,N,F){return F=F!=null?F.concat([k]):null,Gd(4,36,nv.bind(null,N,k),F)},useLayoutEffect:function(k,N){return Gd(4,36,k,N)},useMemo:function(k,N){var F=ya();return N=N===void 0?null:N,k=k(),F.memoizedState=[k,N],k},useReducer:function(k,N,F){var J=ya();return N=F!==void 0?F(N):N,J.memoizedState=J.baseState=N,k=(k=J.queue={last:null,dispatch:null,lastRenderedReducer:k,lastRenderedState:N}).dispatch=Um.bind(null,Cs,k),[J.memoizedState,k]},useRef:function(k){return k={current:k},ya().memoizedState=k},useState:su,useDebugValue:Rg,useResponder:jc,useDeferredValue:function(k,N){var F=su(k),J=F[0],te=F[1];return Bs((function(){i.unstable_next((function(){var Ae=aa.suspense;aa.suspense=N===void 0?null:N;try{te(k)}finally{aa.suspense=Ae}}))}),[k,N]),J},useTransition:function(k){var N=su(!1),F=N[0],J=N[1];return[qd((function(te){J(!0),i.unstable_next((function(){var Ae=aa.suspense;aa.suspense=k===void 0?null:k;try{J(!1),te()}finally{aa.suspense=Ae}}))}),[k,F]),F]}},oc={readContext:ue,useCallback:ou,useContext:ue,useEffect:rv,useImperativeHandle:function(k,N,F){return F=F!=null?F.concat([k]):null,J0(4,36,nv.bind(null,N,k),F)},useLayoutEffect:function(k,N){return J0(4,36,k,N)},useMemo:function(k,N){var F=Ss();N=N===void 0?null:N;var J=F.memoizedState;return J!==null&&N!==null&&so(N,J[1])?J[0]:(k=k(),F.memoizedState=[k,N],k)},useReducer:Yu,useRef:function(){return Ss().memoizedState},useState:mh,useDebugValue:Rg,useResponder:jc,useDeferredValue:function(k,N){var F=mh(),J=F[0],te=F[1];return rv((function(){i.unstable_next((function(){var Ae=aa.suspense;aa.suspense=N===void 0?null:N;try{te(k)}finally{aa.suspense=Ae}}))}),[k,N]),J},useTransition:function(k){var N=mh(),F=N[0],J=N[1];return[ou((function(te){J(!0),i.unstable_next((function(){var Ae=aa.suspense;aa.suspense=k===void 0?null:k;try{J(!1),te()}finally{aa.suspense=Ae}}))}),[k,F]),F]}},iv=s.ReactCurrentOwner,gl=!1;function Al(k,N,F,J){N.child=k===null?zi(N,null,F,J):$s(N,k.child,F,J)}function $m(k,N,F,J,te){F=F.render;var Ae=N.ref;return le(N,te),J=Rn(k,N,F,J,Ae,te),k===null||gl?(N.effectTag|=1,Al(k,N,J,te),N.child):(N.updateQueue=k.updateQueue,N.effectTag&=-517,k.expirationTime<=te&&(k.expirationTime=0),uc(k,N,te))}function zm(k,N,F,J,te,Ae){if(k===null){var Qe=F.type;return typeof Qe!="function"||cd(Qe)||Qe.defaultProps!==void 0||F.compare!==null||F.defaultProps!==void 0?((k=hu(F.type,null,J,null,N.mode,Ae)).ref=N.ref,k.return=N,N.child=k):(N.tag=15,N.type=Qe,Hm(k,N,Qe,J,te,Ae))}return Qe=k.child,teN)&&uu.set(k,N))}}function Mc(k,N){k.expirationTime(k=k.nextKnownPendingLevel)?N:k:N}function ks(k){if(k.lastExpiredTime!==0)k.callbackExpirationTime=1073741823,k.callbackPriority=99,k.callbackNode=$i(Ym.bind(null,k));else{var N=wl(k),F=k.callbackNode;if(N===0)F!==null&&(k.callbackNode=null,k.callbackExpirationTime=0,k.callbackPriority=90);else{var J=Hs();if(J=N===1073741823?99:N===1||N===2?95:0>=(J=10*(1073741821-N)-10*(1073741821-J))?99:250>=J?98:5250>=J?97:95,F!==null){var te=k.callbackPriority;if(k.callbackExpirationTime===N&&te>=J)return;F!==St&&be(F)}k.callbackExpirationTime=N,k.callbackPriority=J,N=N===1073741823?$i(Ym.bind(null,k)):Fo(J,du.bind(null,k),{timeout:10*(1073741821-N)-Sr()}),k.callbackNode=N}}}function du(k,N){if(Ns=0,N)return Gs(k,N=Hs()),ks(k),null;var F=wl(k);if(F!==0){if(N=k.callbackNode,(Yr&(xl|yl))!==oa)throw Error(a(327));if(Wo(),k===wo&&F===Da||Ho(k,F),kr!==null){var J=Yr;Yr|=xl;for(var te=sd();;)try{Zm();break}catch(yt){Ch(k,yt)}if(Wa(),Yr=J,bo.current=te,qa===td)throw N=ef,Ho(k,F),Go(k,F),ks(k),N;if(kr===null)switch(te=k.finishedWork=k.current.alternate,k.finishedExpirationTime=F,J=qa,wo=null,J){case Pc:case td:throw Error(a(345));case bh:Gs(k,2=F){k.lastPingedTime=F,Ho(k,F);break}}if((Ae=wl(k))!==0&&Ae!==F)break;if(J!==0&&J!==F){k.lastPingedTime=J;break}k.timeoutHandle=_e(yn.bind(null,k),te);break}yn(k);break;case rd:if(Go(k,F),F===(J=k.lastSuspendedTime)&&(k.nextKnownPendingLevel=Xm(te)),Wl&&((te=k.lastPingedTime)===0||te>=F)){k.lastPingedTime=F,Ho(k,F);break}if((te=wl(k))!==0&&te!==F)break;if(J!==0&&J!==F){k.lastPingedTime=J;break}if(tf!==1073741823?J=10*(1073741821-tf)-Sr():Hl===1073741823?J=0:(J=10*(1073741821-Hl)-5e3,0>(J=(te=Sr())-J)&&(J=0),(F=10*(1073741821-F)-te)<(J=(120>J?120:480>J?480:1080>J?1080:1920>J?1920:3e3>J?3e3:4320>J?4320:1960*av(J/1960))-J)&&(J=F)),10=(J=0|Qe.busyMinDurationMs)?J=0:(te=0|Qe.busyDelayMs,J=(Ae=Sr()-(10*(1073741821-Ae)-(0|Qe.timeoutMs||5e3)))<=te?0:te+J-Ae),10 component higher in the tree to provide a loading indicator or placeholder to display.`+Vt(te))}qa!==r0&&(qa=bh),Ae=Wm(Ae,te),kt=J;do{switch(kt.tag){case 3:Qe=Ae,kt.effectTag|=4096,kt.expirationTime=N,nr(kt,ed(kt,Qe,N));break e;case 1:Qe=Ae;var ot=kt.type,Et=kt.stateNode;if((64&kt.effectTag)==0&&(typeof ot.getDerivedStateFromError=="function"||Et!==null&&typeof Et.componentDidCatch=="function"&&(Rc===null||!Rc.has(Et)))){kt.effectTag|=4096,kt.expirationTime=N,nr(kt,zg(kt,Qe,N));break e}}kt=kt.return}while(kt!==null)}kr=Gg(kr)}catch(_r){N=_r;continue}break}}function sd(){var k=bo.current;return bo.current=gh,k===null?gh:k}function od(k,N){kn0&&(n0=k)}function Qc(){for(;kr!==null;)kr=Jm(kr)}function Zm(){for(;kr!==null&&!We();)kr=Jm(kr)}function Jm(k){var N=Hg(k.alternate,k,Da);return k.memoizedProps=k.pendingProps,N===null&&(N=Gg(k)),t0.current=null,N}function Gg(k){kr=k;do{var N=kr.alternate;if(k=kr.return,(2048&kr.effectTag)==0){e:{var F=N,J=Da,te=(N=kr).pendingProps;switch(N.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 20:case 21:break;case 1:case 17:ce(N.type)&&Ge();break;case 3:ka(),ie(),(te=N.stateNode).pendingContext&&(te.context=te.pendingContext,te.pendingContext=null),F===null||F.child,zl(N);break;case 5:Vu(N);var Ae=io(Ul.current);if(J=N.type,F!==null&&N.stateNode!=null)vh(F,N,J,te,Ae),F.ref!==N.ref&&(N.effectTag|=128);else if(te){F=io(va.current);var Qe=q(J,te,Ae,F,N);Qg(Qe,N,!1,!1),N.stateNode=Qe,ne(Qe,J,te,Ae,F)&&vl(N),N.ref!==null&&(N.effectTag|=128)}else if(N.stateNode===null)throw Error(a(166));break;case 6:if(F&&N.stateNode!=null)cc(F,N,F.memoizedProps,te);else{if(typeof te!="string"&&N.stateNode===null)throw Error(a(166));F=io(Ul.current),Ae=io(va.current),N.stateNode=pe(te,F,Ae,N)}break;case 13:if(Yt(Hi),te=N.memoizedState,(64&N.effectTag)!=0){N.expirationTime=J;break e}te=te!==null,Ae=!1,F===null?N.memoizedProps.fallback:(Ae=(J=F.memoizedState)!==null,te||J===null||(J=F.child.sibling)!==null&&((Qe=N.firstEffect)!==null?(N.firstEffect=J,J.nextEffect=Qe):(N.firstEffect=N.lastEffect=J,J.nextEffect=null),J.effectTag=8)),te&&!Ae&&(2&N.mode)!=0&&(F===null&&N.memoizedProps.unstable_avoidThisFallback!==!0||(1&Hi.current)!=0?qa===Pc&&(qa=Oc):(qa!==Pc&&qa!==Oc||(qa=rd),n0!==0&&wo!==null&&(Go(wo,Da),Ws(wo,n0)))),(te||Ae)&&(N.effectTag|=4);break;case 4:ka(),zl(N);break;case 10:Us(N);break;case 19:if(Yt(Hi),(te=N.memoizedState)===null)break;if(Ae=(64&N.effectTag)!=0,(Qe=te.rendering)===null){if(Ae)Xu(te,!1);else if(qa!==Pc||F!==null&&(64&F.effectTag)!=0)for(F=N.child;F!==null;){if((Qe=Lo(F))!==null){for(N.effectTag|=64,Xu(te,!1),(F=Qe.updateQueue)!==null&&(N.updateQueue=F,N.effectTag|=4),te.lastEffect===null&&(N.firstEffect=null),N.lastEffect=te.lastEffect,F=J,te=N.child;te!==null;)J=F,(Ae=te).effectTag&=2,Ae.nextEffect=null,Ae.firstEffect=null,Ae.lastEffect=null,(Qe=Ae.alternate)===null?(Ae.childExpirationTime=0,Ae.expirationTime=J,Ae.child=null,Ae.memoizedProps=null,Ae.memoizedState=null,Ae.updateQueue=null,Ae.dependencies=null):(Ae.childExpirationTime=Qe.childExpirationTime,Ae.expirationTime=Qe.expirationTime,Ae.child=Qe.child,Ae.memoizedProps=Qe.memoizedProps,Ae.memoizedState=Qe.memoizedState,Ae.updateQueue=Qe.updateQueue,J=Qe.dependencies,Ae.dependencies=J===null?null:{expirationTime:J.expirationTime,firstContext:J.firstContext,responders:J.responders}),te=te.sibling;hr(Hi,1&Hi.current|2),N=N.child;break e}F=F.sibling}}else{if(!Ae)if((F=Lo(Qe))!==null){if(N.effectTag|=64,Ae=!0,(F=F.updateQueue)!==null&&(N.updateQueue=F,N.effectTag|=4),Xu(te,!0),te.tail===null&&te.tailMode==="hidden"){(N=N.lastEffect=te.lastEffect)!==null&&(N.nextEffect=null);break}}else Sr()>te.tailExpiration&&1te&&(te=J),(Qe=Ae.childExpirationTime)>te&&(te=Qe),Ae=Ae.sibling;F.childExpirationTime=te}if(N!==null)return N;k!==null&&(2048&k.effectTag)==0&&(k.firstEffect===null&&(k.firstEffect=kr.firstEffect),kr.lastEffect!==null&&(k.lastEffect!==null&&(k.lastEffect.nextEffect=kr.firstEffect),k.lastEffect=kr.lastEffect),1(k=k.childExpirationTime)?N:k}function yn(k){var N=wn();return ia(99,qg.bind(null,k,N)),null}function qg(k,N){if(Wo(),(Yr&(xl|yl))!==oa)throw Error(a(327));var F=k.finishedWork,J=k.finishedExpirationTime;if(F===null)return null;if(k.finishedWork=null,k.finishedExpirationTime=0,F===k.current)throw Error(a(177));k.callbackNode=null,k.callbackExpirationTime=0,k.callbackPriority=90,k.nextKnownPendingLevel=0;var te=Xm(F);if(k.firstPendingTime=te,J<=k.lastSuspendedTime?k.firstSuspendedTime=k.lastSuspendedTime=k.nextKnownPendingLevel=0:J<=k.firstSuspendedTime&&(k.firstSuspendedTime=J-1),J<=k.lastPingedTime&&(k.lastPingedTime=0),J<=k.lastExpiredTime&&(k.lastExpiredTime=0),k===wo&&(kr=wo=null,Da=0),1=F?Ju(k,N,F):(hr(Hi,1&Hi.current),(N=uc(k,N,F))!==null?N.sibling:null);hr(Hi,1&Hi.current);break;case 19:if(J=N.childExpirationTime>=F,(64&k.effectTag)!=0){if(J)return Dc(k,N,F);N.effectTag|=64}if((te=N.memoizedState)!==null&&(te.rendering=null,te.tail=null),hr(Hi,Hi.current),!J)return null}return uc(k,N,F)}gl=!1}}else gl=!1;switch(N.expirationTime=0,N.tag){case 2:if(J=N.type,k!==null&&(k.alternate=null,N.alternate=null,N.effectTag|=2),k=N.pendingProps,te=ve(N,de.current),le(N,F),te=Rn(null,N,J,k,te,F),N.effectTag|=1,typeof te=="object"&&te!==null&&typeof te.render=="function"&&te.$$typeof===void 0){if(N.tag=1,ja(),ce(J)){var Ae=!0;U(N)}else Ae=!1;N.memoizedState=te.state!==null&&te.state!==void 0?te.state:null;var Qe=J.getDerivedStateFromProps;typeof Qe=="function"&&Aa(N,J,Qe,k),te.updater=xo,N.stateNode=te,te._reactInternalFiber=N,ml(N,J,k,F),N=Ah(null,N,J,!0,Ae,F)}else N.tag=0,Al(null,N,te,F),N=N.child;return N;case 16:if(te=N.elementType,k!==null&&(k.alternate=null,N.alternate=null,N.effectTag|=2),k=N.pendingProps,(function(Dr){if(Dr._status===-1){Dr._status=0;var Ki=Dr._ctor;Ki=Ki(),Dr._result=Ki,Ki.then((function(Yn){Dr._status===0&&(Yn=Yn.default,Dr._status=1,Dr._result=Yn)}),(function(Yn){Dr._status===0&&(Dr._status=2,Dr._result=Yn)}))}})(te),te._status!==1)throw te._result;switch(te=te._result,N.type=te,Ae=N.tag=(function(Dr){if(typeof Dr=="function")return cd(Dr)?1:0;if(Dr!=null){if((Dr=Dr.$$typeof)===b)return 11;if(Dr===S)return 14}return 2})(te),k=yi(te,k),Ae){case 0:N=lu(null,N,te,k,F);break;case 1:N=Mg(null,N,te,k,F);break;case 11:N=$m(null,N,te,k,F);break;case 14:N=zm(null,N,te,yi(te.type,k),J,F);break;default:throw Error(a(306,te,""))}return N;case 0:return J=N.type,te=N.pendingProps,lu(k,N,J,te=N.elementType===J?te:yi(J,te),F);case 1:return J=N.type,te=N.pendingProps,Mg(k,N,J,te=N.elementType===J?te:yi(J,te),F);case 3:if(lc(N),(J=N.updateQueue)===null)throw Error(a(282));if(te=(te=N.memoizedState)!==null?te.element:null,jr(N,J,N.pendingProps,null,F),(J=N.memoizedState.element)===te)N=uc(k,N,F);else{if((te=N.stateNode.hydrate)&&(te=!1),te)for(F=zi(N,null,J,F),N.child=F;F;)F.effectTag=-3&F.effectTag|1024,F=F.sibling;else Al(k,N,J,F);N=N.child}return N;case 5:return _c(N),J=N.type,te=N.pendingProps,Ae=k!==null?k.memoizedProps:null,Qe=te.children,ae(J,te)?Qe=null:Ae!==null&&ae(J,Ae)&&(N.effectTag|=16),Fg(k,N),4&N.mode&&F!==1&&null(J,te)?(N.expirationTime=N.childExpirationTime=1,N=null):(Al(k,N,Qe,F),N=N.child),N;case 6:return null;case 13:return Ju(k,N,F);case 4:return Ku(N,N.stateNode.containerInfo),J=N.pendingProps,k===null?N.child=$s(N,null,J,F):Al(k,N,J,F),N.child;case 11:return J=N.type,te=N.pendingProps,$m(k,N,J,te=N.elementType===J?te:yi(J,te),F);case 7:return Al(k,N,N.pendingProps,F),N.child;case 8:case 12:return Al(k,N,N.pendingProps.children,F),N.child;case 10:e:{if(J=N.type._context,te=N.pendingProps,Qe=N.memoizedProps,ri(N,Ae=te.value),Qe!==null){var yt=Qe.value;if((Ae=$a(yt,Ae)?0:0|(typeof J._calculateChangedBits=="function"?J._calculateChangedBits(yt,Ae):1073741823))==0){if(Qe.children===te.children&&!st.current){N=uc(k,N,F);break e}}else for((yt=N.child)!==null&&(yt.return=N);yt!==null;){var kt=yt.dependencies;if(kt!==null){Qe=yt.child;for(var Jt=kt.firstContext;Jt!==null;){if(Jt.context===J&&(Jt.observedBits&Ae)!=0){yt.tag===1&&((Jt=xt(F,null)).tag=2,Tt(yt,Jt)),yt.expirationTime=N&&k<=N}function Go(k,N){var F=k.firstSuspendedTime,J=k.lastSuspendedTime;FN||F===0)&&(k.lastSuspendedTime=N),N<=k.lastPingedTime&&(k.lastPingedTime=0),N<=k.lastExpiredTime&&(k.lastExpiredTime=0)}function Ws(k,N){N>k.firstPendingTime&&(k.firstPendingTime=N);var F=k.firstSuspendedTime;F!==0&&(N>=F?k.firstSuspendedTime=k.lastSuspendedTime=k.nextKnownPendingLevel=0:N>=k.lastSuspendedTime&&(k.lastSuspendedTime=N+1),N>k.nextKnownPendingLevel&&(k.nextKnownPendingLevel=N))}function Gs(k,N){var F=k.lastExpiredTime;(F===0||F>N)&&(k.lastExpiredTime=N)}function s0(k){var N=k._reactInternalFiber;if(N===void 0)throw typeof k.render=="function"?Error(a(188)):Error(a(268,Object.keys(k)));return(k=W(N))===null?null:k.stateNode}function o0(k,N){(k=k.memoizedState)!==null&&k.dehydrated!==null&&k.retryTime"u")return!1;var J=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(J.isDisabled||!J.supportsFiber)return!0;try{var te=J.inject(F);Sh=function(Ae){try{J.onCommitFiberRoot(te,Ae,void 0,(64&Ae.current.effectTag)==64)}catch{}},Kg=function(Ae){try{J.onCommitFiberUnmount(te,Ae)}catch{}}}catch{}return!0})(r({},k,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:function(F){return(F=W(F))===null?null:F.stateNode},findFiberByHostInstance:function(F){return N?N(F):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}};dE.exports=af.default||af;var lv=dE.exports;return dE.exports=e,lv};var l4t=a4t(_ve.exports);const jve=(e,t)=>{const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;il4t({appendChild:e,appendChildToContainer:t,appendInitialChild:e,createInstance:i,createTextInstance:a,insertBefore:s,commitUpdate:n,commitTextUpdate:r,removeChild:l,removeChildFromContainer:c,resetAfterCommit:u,shouldSetTextContent:()=>!1,finalizeInitialChildren:()=>!1,getPublicInstance:d=>d,getRootHostContext:()=>WZ,getChildHostContext:()=>WZ,prepareForCommit(){},clearContainer(){},resetTextContent(){},prepareUpdate:(d,f,m,g)=>!jve(m,g)}),u4t=gr.version.startsWith("19");var d4t=u4t?t4t:c4t;const f4t=e=>Object.fromEntries(Object.entries(e).filter(t=>{let[,r]=t;return r!==void 0})),h4t=(e,t)=>{let{style:r,children:n,...i}=t;return{type:e,box:{},style:r||{},props:i||{},children:[]}},m4t=e=>({type:"TEXT_INSTANCE",value:e}),Dve=(e,t)=>{const r=e.type==="TEXT"||e.type==="LINK"||e.type==="TSPAN"||e.type==="NOTE";if(t.type==="TEXT_INSTANCE"&&!r){console.warn(`Invalid '${t.value}' string child outside component`);return}e.children.push(t)},p4t=(e,t)=>{e.type==="ROOT"?e.document=t:Dve(e,t)},g4t=(e,t,r)=>{var n;const i=(n=e.children)===null||n===void 0?void 0:n.indexOf(r);i!==void 0&&i!==-1&&t&&e.children.splice(i,0,t)},A4t=(e,t)=>{var r;const n=(r=e.children)===null||r===void 0?void 0:r.indexOf(t);n!==void 0&&n!==-1&&e.children.splice(n,1)},v4t=(e,t)=>{var r;const n=(r=e.children)===null||r===void 0?void 0:r.indexOf(t);n!==void 0&&n!==-1&&e.children.splice(n,1)},x4t=(e,t,r)=>{e.value=r},y4t=(e,t,r,n,i)=>{const{style:a,...s}=i;e.props=s,e.style=a},b4t=e=>{let{onChange:t=()=>{}}=e;return d4t({appendChild:Dve,appendChildToContainer:p4t,commitTextUpdate:x4t,commitUpdate:y4t,createInstance:h4t,createTextInstance:m4t,insertBefore:g4t,removeChild:A4t,removeChildFromContainer:v4t,resetAfterCommit:t})},w4t=new xpt;let fE;const AA={},E4t=e=>{const t=()=>{var m;const g=((m=AA.change)===null||m===void 0?void 0:m.slice())||[];for(let A=0;A{fE.updateContainer(m,n,null,g)};e&&i(e);const a=async function(m){m===void 0&&(m=!0);const g=r.document.props||{},{pdfVersion:A,language:v,pageLayout:b,pageMode:E,title:I,author:S,subject:_,keyboards:B,creator:T="react-pdf",producer:P="react-pdf",creationDate:O=new Date,modificationDate:z}=g,L=new lM({compress:m,pdfVersion:A,lang:v,displayTitle:!0,autoFirstPage:!1,info:f4t({Title:I,Author:S,Subject:_,Keywords:B,Creator:T,Producer:P,CreationDate:O,ModificationDate:z})});b&&(L._root.data.PageLayout=Db(b)),E&&(L._root.data.PageMode=Db(E));const W=await q5t(r.document,w4t),R=RAt(L,W);return{layout:W,fileStream:R}},s=function(m){m===void 0&&(m={}),r.document.props.onRender&&r.document.props.onRender(m)};return{on:(m,g)=>{AA[m]||(AA[m]=[]),AA[m].push(g)},container:r,toBlob:async()=>{const m=[],{layout:g,fileStream:A}=await a();return new Promise((v,b)=>{A.on("data",E=>{m.push(E instanceof Uint8Array?E:new Uint8Array(E))}),A.on("end",()=>{try{const E=new Blob(m,{type:"application/pdf"});s({blob:E,_INTERNAL__LAYOUT__DATA_:g}),v(E)}catch(E){b(E)}})})},toBuffer:async()=>{const{layout:m,fileStream:g}=await a();return s({_INTERNAL__LAYOUT__DATA_:m}),g},toString:async()=>{let m="";const{fileStream:g}=await a(!1);return new Promise((A,v)=>{try{g.on("data",b=>{m+=b}),g.on("end",()=>{s(),A(m)})}catch(b){v(b)}})},removeListener:(m,g)=>{if(!AA[m])return;const A=AA[m].indexOf(g);A>-1&&AA[m].splice(A,1)},updateContainer:i}},C4t={create:e=>e},I4t={planned:"Planifiée",in_progress:"En cours",completed:"Terminée",cancelled:"Annulée"},S4t={scheduled:"Programmé",in_transit:"En cours",completed:"Terminé",cancelled:"Annulé"},B4t=841.89,Tve=25,GZ=B4t-Tve*2;function N4t(e){e.organization.logoUrl;const t=!!e.mission.description,r=e.trips.length,i=360+(e.mission.additionalCrew?.length||0)*15+40+r*22+(t?50:0)+80,a=i>GZ,s=a?Math.min(.9,GZ/i):1,c=a&&s<.88?4:5;return{pagePadding:Tve,headerMarginBottom:a&&s<.88?10:12,titleMarginBottom:a&&s<.88?3:4,sectionMarginBottom:a&&s<.88?6:8,infoRowMarginBottom:c,tableRowPadding:a&&s<.88?3:4,signaturesMarginTop:a&&s<.88?12:15,signatureLineHeight:a&&s<.88?28:30,fontSize:a&&s<.85?8.5:9,sectionTitleFontSize:a&&s<.85?9.5:10,titleFontSize:a&&s<.85?15:16,tableFontSize:a&&s<.85?7:7.5}}function k4t({data:e}){const{organization:t,mission:r,trips:n}=e,i=N4t(e),a=C4t.create({page:{padding:i.pagePadding,fontSize:i.fontSize,fontFamily:"Helvetica"},header:{flexDirection:"row",justifyContent:"space-between",marginBottom:i.headerMarginBottom,paddingBottom:6,borderBottomWidth:1,borderBottomColor:"#000"},logoContainer:{width:80},logo:{width:70,height:"auto",objectFit:"contain"},organizationInfo:{width:"65%",textAlign:"right",fontSize:i.fontSize-1},companyName:{fontSize:11,fontWeight:"bold",marginBottom:2},title:{fontSize:i.titleFontSize,fontWeight:"bold",textAlign:"center",marginBottom:i.titleMarginBottom,textTransform:"uppercase"},subtitle:{fontSize:i.fontSize-1,textAlign:"center",color:"#666",marginBottom:8},section:{marginBottom:i.sectionMarginBottom},sectionTitle:{fontSize:i.sectionTitleFontSize,fontWeight:"bold",marginBottom:4,paddingBottom:2,borderBottomWidth:1,borderBottomColor:"#ccc"},twoColumns:{flexDirection:"row",justifyContent:"space-between",marginBottom:i.sectionMarginBottom,width:"100%"},column:{width:"48%",flexShrink:0},infoRow:{marginBottom:i.infoRowMarginBottom,fontSize:i.fontSize},label:{fontWeight:"bold"},table:{marginTop:4},tableRow:{flexDirection:"row",borderBottomWidth:1,borderBottomColor:"#ddd",paddingVertical:i.tableRowPadding},tableHeader:{backgroundColor:"#f0f0f0",fontWeight:"bold",fontSize:i.tableFontSize},tableCell:{fontSize:i.tableFontSize,paddingHorizontal:3},colNumber:{width:"8%"},colSens:{width:"32%"},colDepart:{width:"20%"},colArrivee:{width:"20%"},colStatut:{width:"20%"},signatures:{flexDirection:"row",justifyContent:"space-between",marginTop:i.signaturesMarginTop,paddingTop:8,borderTopWidth:1,borderTopColor:"#000"},signatureBox:{width:"45%"},signatureLabel:{fontSize:i.fontSize-1,marginBottom:i.signatureLineHeight-5,fontWeight:"bold"},signatureLine:{borderBottomWidth:1,borderBottomColor:"#000",height:i.signatureLineHeight}});return o.jsx(Qhe,{children:o.jsxs(YR,{size:"A4",style:a.page,children:[o.jsxs(ua,{style:a.header,children:[o.jsx(ua,{style:a.logoContainer,children:t.logoUrl&&o.jsx($1,{src:t.logoUrl.startsWith("http")||t.logoUrl.startsWith("/")?t.logoUrl:`/${t.logoUrl}`,style:a.logo})}),o.jsxs(ua,{style:a.organizationInfo,children:[o.jsx(yr,{style:a.companyName,children:t.companyName}),t.legalName&&o.jsx(yr,{children:t.legalName}),t.addressLine&&o.jsx(yr,{children:t.addressLine}),(t.city||t.country)&&o.jsxs(yr,{children:[t.city,t.city&&t.country&&", ",t.country]}),t.phone&&o.jsxs(yr,{children:["Tél: ",t.phone]}),t.email&&o.jsxs(yr,{children:["Email: ",t.email]}),t.website&&o.jsxs(yr,{children:["Web: ",t.website]}),t.taxId&&o.jsxs(yr,{children:["RCCM/IFU: ",t.taxId]})]})]}),o.jsx(yr,{style:a.title,children:"ORDRE DE MISSION"}),o.jsx(ua,{style:a.subtitle,children:o.jsxs(yr,{children:["Code mission : ",r.code," • Statut : ",I4t[r.status]||r.status]})}),o.jsxs(ua,{style:a.twoColumns,children:[o.jsx(ua,{style:a.column,children:o.jsxs(ua,{style:a.section,children:[o.jsx(yr,{style:a.sectionTitle,children:"Mission"}),o.jsxs(yr,{style:a.infoRow,children:[o.jsx(yr,{style:a.label,children:"Client :"})," ",r.clientName||"—"]}),o.jsxs(yr,{style:a.infoRow,children:[o.jsx(yr,{style:a.label,children:"Référence client :"})," ",r.clientReference||"—"]}),o.jsxs(yr,{style:a.infoRow,children:[o.jsx(yr,{style:a.label,children:"Lieu de chargement :"})," ",r.loadingSite||"—"]}),o.jsxs(yr,{style:a.infoRow,children:[o.jsx(yr,{style:a.label,children:"Lieu de déchargement :"})," ",r.unloadingSite||"—"]}),o.jsxs(yr,{style:a.infoRow,children:[o.jsx(yr,{style:a.label,children:"Type de chargement :"})," ",r.loadingType||"—"]})]})}),o.jsx(ua,{style:a.column,children:o.jsxs(ua,{style:a.section,children:[o.jsx(yr,{style:a.sectionTitle,children:"Informations"}),o.jsxs(yr,{style:a.infoRow,children:[o.jsx(yr,{style:a.label,children:"N° bon de chargement :"})," ",r.loadingOrderNumber||"—"]}),o.jsxs(yr,{style:a.infoRow,children:[o.jsx(yr,{style:a.label,children:"Date du bon :"})," ",r.loadingOrderDate?Kr(new Date(r.loadingOrderDate),"PPP",{locale:tn}):"—"]}),o.jsxs(yr,{style:a.infoRow,children:[o.jsx(yr,{style:a.label,children:"Nombre de tours prévus :"})," ",r.expectedTours===1?"1 tour aller + retour":`${r.expectedTours||1} tour${(r.expectedTours||1)>1?"s":""}`]}),o.jsxs(yr,{style:a.infoRow,children:[o.jsx(yr,{style:a.label,children:"Code mission :"})," ",r.code]})]})})]}),o.jsxs(ua,{style:a.section,children:[o.jsx(yr,{style:a.sectionTitle,children:"Véhicule et remorque"}),o.jsxs(ua,{style:a.twoColumns,children:[o.jsxs(ua,{style:a.column,children:[o.jsx(yr,{style:a.label,children:"Véhicule :"}),r.vehicle?o.jsxs(o.Fragment,{children:[o.jsxs(yr,{style:a.infoRow,children:["Immatriculation : ",r.vehicle.immatriculation]}),(r.vehicle.marque||r.vehicle.modele)&&o.jsxs(yr,{style:a.infoRow,children:[r.vehicle.marque," ",r.vehicle.modele]}),r.vehicle.annee&&o.jsxs(yr,{style:a.infoRow,children:["Année : ",r.vehicle.annee]})]}):o.jsx(yr,{style:a.infoRow,children:"—"})]}),o.jsxs(ua,{style:a.column,children:[o.jsx(yr,{style:a.label,children:"Remorque :"}),r.trailer?o.jsxs(o.Fragment,{children:[o.jsxs(yr,{style:a.infoRow,children:["N° châssis : ",r.trailer.numeroChassis]}),o.jsxs(yr,{style:a.infoRow,children:["Type : ",r.trailer.type]}),r.trailer.capacite&&o.jsxs(yr,{style:a.infoRow,children:["Capacité : ",r.trailer.capacite," tonnes"]})]}):o.jsx(yr,{style:a.infoRow,children:"Sans remorque"})]})]})]}),o.jsxs(ua,{style:a.section,children:[o.jsx(yr,{style:a.sectionTitle,children:"Équipage"}),o.jsxs(ua,{style:a.twoColumns,children:[o.jsxs(ua,{style:a.column,children:[o.jsx(yr,{style:a.label,children:"Chauffeur principal :"}),r.mainDriver?o.jsxs(o.Fragment,{children:[o.jsxs(yr,{style:a.infoRow,children:[r.mainDriver.prenom," ",r.mainDriver.nom]}),r.mainDriver.telephone&&o.jsxs(yr,{style:a.infoRow,children:["Tél: ",r.mainDriver.telephone]})]}):o.jsx(yr,{style:a.infoRow,children:"—"})]}),o.jsxs(ua,{style:a.column,children:[o.jsx(yr,{style:a.label,children:"Autres membres d'équipage :"}),r.additionalCrew&&r.additionalCrew.length>0?o.jsx(o.Fragment,{children:r.additionalCrew.map(s=>o.jsxs(yr,{style:a.infoRow,children:["• ",s.prenom," ",s.nom," -"," ",s.role==="chauffeur"?"Chauffeur":s.role==="apprenti"?"Aide-chauffeur":"Apprenti"]},s.id))}):o.jsx(yr,{style:a.infoRow,children:"—"})]})]})]}),o.jsxs(ua,{style:[a.section,{marginBottom:i.sectionMarginBottom-2}],children:[o.jsx(yr,{style:a.sectionTitle,children:"Voyages prévus dans cette mission"}),n.length===0?o.jsx(yr,{style:[a.infoRow,{fontStyle:"italic",color:"#666",fontSize:i.fontSize-1}],children:"Aucun voyage encore créé pour cette mission. Cet ordre de mission reste valable pour les tours à venir."}):o.jsxs(ua,{style:a.table,children:[o.jsxs(ua,{style:[a.tableRow,a.tableHeader],children:[o.jsx(yr,{style:[a.tableCell,a.colNumber],children:"N°"}),o.jsx(yr,{style:[a.tableCell,a.colSens],children:"Sens"}),o.jsx(yr,{style:[a.tableCell,a.colDepart],children:"Date/heure départ"}),o.jsx(yr,{style:[a.tableCell,a.colArrivee],children:"Date/heure arrivée"}),o.jsx(yr,{style:[a.tableCell,a.colStatut],children:"Statut"})]}),n.map((s,l)=>o.jsxs(ua,{style:a.tableRow,children:[o.jsx(yr,{style:[a.tableCell,a.colNumber],children:l+1}),o.jsxs(yr,{style:[a.tableCell,a.colSens],children:[s.origine," → ",s.destination]}),o.jsx(yr,{style:[a.tableCell,a.colDepart],children:s.dateDepart?Kr(new Date(s.dateDepart),"dd/MM/yy HH:mm",{locale:tn}):"—"}),o.jsx(yr,{style:[a.tableCell,a.colArrivee],children:s.dateArrivee?Kr(new Date(s.dateArrivee),"dd/MM/yy HH:mm",{locale:tn}):"—"}),o.jsx(yr,{style:[a.tableCell,a.colStatut],children:S4t[s.status]||s.status})]},s.id))]})]}),r.description&&o.jsxs(ua,{style:[a.section,{marginBottom:i.sectionMarginBottom-2}],children:[o.jsx(yr,{style:a.sectionTitle,children:"Consignes particulières"}),o.jsx(yr,{style:[a.infoRow,{fontSize:i.fontSize-1}],children:r.description})]}),o.jsxs(ua,{style:a.signatures,children:[o.jsxs(ua,{style:a.signatureBox,children:[o.jsx(yr,{style:a.signatureLabel,children:"Signature et cachet de l'entreprise"}),o.jsx(ua,{style:a.signatureLine})]}),o.jsxs(ua,{style:a.signatureBox,children:[o.jsx(yr,{style:a.signatureLabel,children:"Signature du chauffeur"}),o.jsx(ua,{style:a.signatureLine})]})]})]})})}function _4t(){const[,e]=tP("/missions/:id/ordre-de-mission"),[,t]=Ic(),r=e?.id?parseInt(e.id):null,{data:n,isLoading:i,error:a}=Xje(r||0),[s,l]=w.useState(!1);return w.useEffect(()=>{n&&!s&&(l(!0),(async()=>{try{const u=await E4t(o.jsx(k4t,{data:n})).toBlob(),d=URL.createObjectURL(u),f=document.createElement("a");f.href=d,f.download=`ordre-de-mission-${n.mission.code}.pdf`,document.body.appendChild(f),f.click(),document.body.removeChild(f),URL.revokeObjectURL(d),setTimeout(()=>{t(`/missions/${r}`)},500)}catch(u){console.error("Erreur lors de la génération du PDF:",u),alert("Erreur lors de la génération du PDF. Veuillez réessayer."),l(!1)}})())},[n,r,t,s]),r?i||s?o.jsx("div",{className:"max-w-4xl mx-auto p-8",children:o.jsxs("div",{className:"flex flex-col justify-center items-center py-12 space-y-4",children:[o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"}),o.jsx("p",{className:"text-muted-foreground",children:i?"Chargement des données...":"Génération du PDF..."})]})}):a||!n?o.jsx("div",{className:"max-w-4xl mx-auto p-8",children:o.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[o.jsx("p",{className:"text-center text-destructive",children:a instanceof Error?a.message:"Erreur lors du chargement de l'ordre de mission"}),o.jsxs(Pe,{variant:"outline",onClick:()=>t(`/missions/${r}`),children:[o.jsx(P0,{className:"h-4 w-4 mr-2"}),"Retour à la mission"]})]})}):o.jsx("div",{className:"max-w-4xl mx-auto p-8",children:o.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[o.jsx("p",{className:"text-muted-foreground",children:"Génération du PDF en cours..."}),o.jsx(wr,{className:"h-6 w-6 animate-spin text-primary"})]})}):o.jsxs("div",{className:"max-w-4xl mx-auto p-8",children:[o.jsx("p",{className:"text-center text-muted-foreground",children:"ID de mission invalide"}),o.jsx("div",{className:"flex justify-center mt-4",children:o.jsxs(Pe,{variant:"outline",onClick:()=>t("/missions"),children:[o.jsx(P0,{className:"h-4 w-4 mr-2"}),"Retour aux missions"]})})]})}const j4t=k1("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),DM=w.forwardRef(({className:e,variant:t,...r},n)=>o.jsx("div",{ref:n,role:"alert",className:qt(j4t({variant:t}),e),...r}));DM.displayName="Alert";const Pve=w.forwardRef(({className:e,...t},r)=>o.jsx("h5",{ref:r,className:qt("mb-1 font-medium leading-none tracking-tight",e),...t}));Pve.displayName="AlertTitle";const TM=w.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:qt("text-sm [&_p]:leading-relaxed",e),...t}));TM.displayName="AlertDescription";function D4t({imageUrl:e,onImageChange:t,isLoading:r=!1}){const[n,i]=w.useState(!1),a=w.useRef(null),s=w.useRef(null),l=async f=>{if(f){if(!f.type.startsWith("image/")){alert("Veuillez sélectionner une image");return}if(f.size>5*1024*1024){alert("L'image est trop grande (maximum 5MB)");return}i(!0);try{const m=await y8e(f);t(m.url)}catch(m){console.error("Error uploading justificatif:",m),alert(m instanceof Error?m.message:"Erreur lors de l'upload du justificatif")}finally{i(!1)}}},c=()=>{s.current?.click()},u=()=>{a.current?.click()},d=()=>{t(null),a.current&&(a.current.value=""),s.current&&(s.current.value="")};return o.jsxs("div",{className:"space-y-3",children:[e?o.jsx(_t,{className:"p-4",children:o.jsxs("div",{className:"relative",children:[o.jsx("img",{src:e,alt:"Justificatif",className:"w-full h-auto max-h-64 object-contain rounded-lg border"}),o.jsx(Pe,{type:"button",variant:"destructive",size:"icon",className:"absolute top-2 right-2",onClick:d,disabled:n||r,children:o.jsx(G0,{className:"h-4 w-4"})})]})}):o.jsxs("div",{className:"flex gap-2",children:[o.jsxs(Pe,{type:"button",variant:"outline",onClick:c,disabled:n||r,className:"flex-1",children:[n?o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}):o.jsx(_u,{className:"h-4 w-4 mr-2"}),"Photo"]}),o.jsxs(Pe,{type:"button",variant:"outline",onClick:u,disabled:n||r,className:"flex-1",children:[n?o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}):o.jsx(lP,{className:"h-4 w-4 mr-2"}),"Galerie"]})]}),o.jsx("input",{ref:a,type:"file",accept:"image/*",className:"hidden",onChange:f=>l(f.target.files?.[0]||null)}),o.jsx("input",{ref:s,type:"file",accept:"image/*",capture:"environment",className:"hidden",onChange:f=>l(f.target.files?.[0]||null)})]})}function T4t({tripId:e,onAdd:t,trigger:r}){const[n,i]=w.useState(!1),[a,s]=w.useState({categorie:"carburant",montant:0,date:new Date().toISOString().split("T")[0],description:void 0,justificatifUrl:void 0}),l=c=>{c.preventDefault(),t?.({...a,tripId:e}),i(!1),s({categorie:"carburant",montant:0,date:new Date().toISOString().split("T")[0],description:void 0,justificatifUrl:void 0})};return o.jsxs(ci,{open:n,onOpenChange:i,children:[o.jsx(xg,{asChild:!0,children:r||o.jsxs(Pe,{"data-testid":"button-add-expense",className:"w-full md:w-auto",size:"sm",children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Ajouter une dépense"]})}),o.jsxs(Zn,{className:"sm:max-w-[500px] max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Ajouter une dépense"}),o.jsx(Ci,{children:"Enregistrez une dépense pour ce voyage."})]}),o.jsxs("form",{onSubmit:l,children:[o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"categorie",children:["Catégorie ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsxs(ui,{value:a.categorie,onValueChange:c=>s({...a,categorie:c}),required:!0,children:[o.jsx(ei,{id:"categorie","data-testid":"select-category",className:"h-12",children:o.jsx(di,{placeholder:"Sélectionner une catégorie"})}),o.jsx(ti,{children:VS.map(c=>o.jsx(Tr,{value:c,children:c.charAt(0).toUpperCase()+c.slice(1).replace("_"," ")},c))})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"montant",children:["Montant (FCFA) ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"montant",type:"number",step:"0.01",placeholder:"50000",value:a.montant,onChange:c=>s({...a,montant:parseFloat(c.target.value)||0}),required:!0,min:"0",className:"h-12","data-testid":"input-amount"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"date",children:["Date ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"date",type:"date",value:a.date,onChange:c=>s({...a,date:c.target.value}),required:!0,className:"h-12","data-testid":"input-date"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"description",children:"Description"}),o.jsx(Nw,{id:"description",placeholder:"Détails de la dépense...",value:a.description||"",onChange:c=>s({...a,description:c.target.value||void 0}),rows:3,"data-testid":"textarea-description"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{children:"Justificatif (photo du ticket)"}),o.jsx(D4t,{imageUrl:a.justificatifUrl,onImageChange:c=>s({...a,justificatifUrl:c||void 0})})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>i(!1),"data-testid":"button-cancel",className:"w-full sm:w-auto h-12",children:"Annuler"}),o.jsx(Pe,{type:"submit","data-testid":"button-submit",className:"w-full sm:w-auto h-12",children:"Ajouter"})]})]})]})]})}const f8=(e,t)=>{if(!e)return"—";try{const r=e instanceof Date?e:new Date(e);return isNaN(r.getTime())?"—":Kr(r,t,{locale:tn})}catch{return"—"}};function P4t(){const[,e]=tP("/trajets/:id"),[,t]=Ic(),r=e?.id?parseInt(e.id):null,{toast:n}=sn(),[i,a]=w.useState(null),{data:s,isLoading:l}=Ar({queryKey:["/api/trips",r],queryFn:HA({on401:"throw"}),enabled:!!r}),{data:c}=Ar({queryKey:["/api/vehicles",s?.vehicleId],queryFn:HA({on401:"throw"}),enabled:!!s?.vehicleId}),{data:u}=Ar({queryKey:["/api/trailers",s?.trailerId],queryFn:async()=>s?.trailerId?await(await fr("GET",`/api/trailers/${s.trailerId}`)).json():null,enabled:!!s?.trailerId}),{data:d=[]}=Ar({queryKey:["/api/trips",r,"crew"],queryFn:HA({on401:"throw"}),enabled:!!r}),{data:f=[],isLoading:m}=J8e(r||0),g=eDe(),A=tDe(),v=w.useMemo(()=>({totalExpenses:f.reduce((S,_)=>S+_.montant,0),totalRevenues:0}),[f]);if(!r)return o.jsxs("div",{className:"space-y-6 pb-8",children:[o.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>t("/trajets"),children:o.jsx(P0,{className:"h-5 w-5"})}),o.jsx(_t,{className:"p-8",children:o.jsx("p",{className:"text-center text-muted-foreground",children:"ID de voyage invalide"})})]});if(l)return o.jsxs("div",{className:"space-y-6 pb-8",children:[o.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>t("/trajets"),children:o.jsx(P0,{className:"h-5 w-5"})}),o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})})]});if(!s)return o.jsxs("div",{className:"space-y-6 pb-8",children:[o.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>t("/trajets"),children:o.jsx(P0,{className:"h-5 w-5"})}),o.jsx(_t,{className:"p-8",children:o.jsx("p",{className:"text-center text-destructive",children:"Voyage non trouvé"})})]});const b=I=>{g.mutate(I,{onSuccess:()=>{n({title:"Succès",description:"La dépense a été ajoutée avec succès"})}})},E=I=>{confirm("Êtes-vous sûr de vouloir supprimer cette dépense ?")&&A.mutate(I)};return o.jsxs("div",{className:"space-y-6 pb-8",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>t("/trajets"),children:o.jsx(P0,{className:"h-5 w-5"})}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[o.jsx("h1",{className:"text-2xl font-semibold",children:"Détails du voyage"}),o.jsx(_P,{status:s.status})]}),o.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:f8(s.dateDepart,"d MMMM yyyy 'à' HH:mm")})]})]}),o.jsxs(vg,{defaultValue:"info",className:"space-y-4",children:[o.jsxs(Bm,{className:"grid w-full grid-cols-4",children:[o.jsx(Ii,{value:"info",children:"Infos"}),o.jsxs(Ii,{value:"expenses",children:["Dépenses ",f.length>0&&`(${f.length})`]}),o.jsxs(Ii,{value:"tracking",className:"flex items-center gap-2",children:[o.jsx(jC,{className:"h-4 w-4"}),"Points GPS"]}),o.jsx(Ii,{value:"summary",children:"Résumé"})]}),o.jsxs(Ms,{value:"info",className:"space-y-4",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs(_t,{children:[o.jsx(Xr,{children:o.jsxs(cn,{className:"flex items-center gap-2",children:[o.jsx(Do,{className:"h-5 w-5"}),"Véhicule"]})}),o.jsx(ar,{children:c?o.jsxs("div",{className:"space-y-2",children:[o.jsx("p",{className:"font-mono font-semibold text-lg",children:c.immatriculation}),c.marque&&c.modele&&o.jsxs("p",{className:"text-sm text-muted-foreground",children:[c.marque," ",c.modele]})]}):o.jsx("p",{className:"text-muted-foreground",children:"Chargement..."})})]}),o.jsxs(_t,{children:[o.jsx(Xr,{children:o.jsxs(cn,{className:"flex items-center gap-2",children:[o.jsx(bx,{className:"h-5 w-5"}),"Remorque"]})}),o.jsx(ar,{children:u?o.jsxs("div",{className:"space-y-2",children:[o.jsx("p",{className:"font-mono font-semibold text-lg",children:u.immatriculation}),o.jsx("p",{className:"text-sm text-muted-foreground",children:u.type})]}):o.jsx("p",{className:"text-muted-foreground",children:"Aucune remorque"})})]})]}),o.jsxs(_t,{children:[o.jsx(Xr,{children:o.jsxs(cn,{className:"flex items-center gap-2",children:[o.jsx(rs,{className:"h-5 w-5"}),"Itinéraire"]})}),o.jsx(ar,{className:"space-y-4",children:o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Départ"}),o.jsx("p",{className:"font-semibold",children:s.origine}),o.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:f8(s.dateDepart,"d MMMM yyyy 'à' HH:mm")})]}),o.jsx("div",{className:"text-2xl",children:"→"}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Arrivée"}),o.jsx("p",{className:"font-semibold",children:s.destination}),s.dateArrivee&&o.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:f8(s.dateArrivee,"d MMMM yyyy 'à' HH:mm")})]})]})})]}),d.length>0&&o.jsxs(_t,{children:[o.jsx(Xr,{children:o.jsxs(cn,{className:"flex items-center gap-2",children:[o.jsx(Uf,{className:"h-5 w-5"}),"Équipage"]})}),o.jsx(ar,{children:o.jsx("div",{className:"flex flex-wrap gap-3",children:d.map(I=>o.jsxs("div",{className:"flex items-center gap-2",children:[I.photoUrl&&o.jsx("img",{src:hn(I.photoUrl)||void 0,alt:I.nom,className:"w-10 h-10 rounded-full object-cover border"}),o.jsxs("div",{children:[o.jsx("p",{className:"font-semibold",children:I.nom}),o.jsx("p",{className:"text-xs text-muted-foreground",children:I.role==="chauffeur"?"Chauffeur":"Aide-chauffeur"})]})]},I.id))})})]})]}),o.jsxs(Ms,{value:"expenses",className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl font-semibold",children:"Dépenses"}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Total: ",new Intl.NumberFormat("fr-FR",{style:"currency",currency:"XOF",minimumFractionDigits:0}).format(v.totalExpenses)]})]}),o.jsx(T4t,{tripId:r,onAdd:b})]}),m?o.jsx("div",{className:"flex justify-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):f.length===0?o.jsx(_t,{children:o.jsx(ar,{className:"py-12 text-center",children:o.jsx("p",{className:"text-muted-foreground",children:"Aucune dépense enregistrée"})})}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:f.map(I=>o.jsx(oT,{expense:I,onDelete:E,onViewJustificatif:S=>a(S)},I.id))})]}),o.jsx(Ms,{value:"tracking",className:"space-y-4",children:o.jsx(O4t,{tripId:r})}),o.jsx(Ms,{value:"summary",className:"space-y-4",children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl font-semibold",children:"Résumé financier"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Dépenses de ce voyage uniquement"})]}),s.missionId&&o.jsxs(DM,{children:[o.jsx(vbe,{className:"h-4 w-4"}),o.jsx(Pve,{children:"Revenu au niveau mission"}),o.jsxs(TM,{className:"flex items-center justify-between",children:[o.jsx("span",{children:"Le revenu est géré au niveau de la mission (tour complet), pas au niveau du voyage individuel."}),o.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>t(`/missions/${s.missionId}`),className:"ml-4",children:[o.jsx(Abe,{className:"h-4 w-4 mr-2"}),"Voir la mission"]})]})]}),o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Dépenses du voyage"}),o.jsx(Qi,{children:"Total des dépenses pour ce voyage uniquement"})]}),o.jsx(ar,{children:o.jsxs("div",{className:"text-center py-6",children:[o.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Total des dépenses"}),o.jsx("p",{className:"text-3xl font-bold text-red-600 dark:text-red-400",children:new Intl.NumberFormat("fr-FR",{style:"currency",currency:"XOF",minimumFractionDigits:0}).format(v.totalExpenses)})]})})]}),s.missionId&&o.jsxs(_t,{className:"border-blue-200 dark:border-blue-900",children:[o.jsx(Xr,{children:o.jsx(cn,{className:"text-sm",children:"Calcul du profit"})}),o.jsx(ar,{children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"Pour calculer le profit de cette mission (revenu - dépenses totales), consultez la page de la mission qui affiche le revenu et les dépenses de tous les voyages."})})]})]})})]}),o.jsx(ci,{open:!!i,onOpenChange:I=>!I&&a(null),children:o.jsxs(Zn,{className:"max-w-4xl",children:[o.jsx(Jn,{children:o.jsx(Xn,{children:"Justificatif"})}),i&&o.jsx("img",{src:i,alt:"Justificatif",className:"w-full h-auto rounded-lg"})]})})]})}function O4t({tripId:e}){const{data:t,isLoading:r}=gJe(e,5e3);if(!e)return o.jsx(_t,{children:o.jsx(ar,{className:"py-8 text-center text-muted-foreground",children:"ID de voyage invalide"})});if(r)return o.jsx(_t,{children:o.jsx(ar,{className:"py-12",children:o.jsx("div",{className:"flex justify-center items-center",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})})})});if(!t||t.points.length===0)return o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsxs(cn,{className:"flex items-center gap-2",children:[o.jsx(jC,{className:"h-5 w-5"}),"Points GPS Track-Detail"]}),o.jsx(Qi,{children:"Aucun point GPS disponible pour ce voyage"})]}),o.jsx(ar,{children:o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Importez un fichier Track-Detail pour ce véhicule dans"," ",o.jsx("a",{href:"/settings?tab=tracking&subtab=track-detail",className:"text-primary underline",children:"Paramètres > Tracking > Track-Detail"})]})})]});const{points:n,meta:i}=t;return o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsxs(cn,{className:"flex items-center gap-2",children:[o.jsx(jC,{className:"h-5 w-5"}),"Points GPS Track-Detail"]}),o.jsxs(Qi,{children:[n.length," point",n.length>1?"s":""," GPS",i.sourceFiles.length>0&&` depuis ${i.sourceFiles.length} fichier${i.sourceFiles.length>1?"s":""}`]})]}),o.jsxs(ar,{children:[o.jsx("div",{className:"overflow-x-auto max-h-[600px] overflow-y-auto",children:o.jsxs(O1,{children:[o.jsx(R1,{children:o.jsxs(xc,{children:[o.jsx(Pn,{children:"Date/Heure"}),o.jsx(Pn,{children:"Latitude"}),o.jsx(Pn,{children:"Longitude"}),o.jsx(Pn,{children:"Vitesse"}),o.jsx(Pn,{children:"Mouvement"}),o.jsx(Pn,{children:"Adresse"}),o.jsx(Pn,{children:"Source"})]})}),o.jsx(F1,{children:n.map(a=>o.jsxs(xc,{children:[o.jsx(kn,{children:o.jsxs("div",{className:"flex items-center gap-1 text-sm",children:[o.jsx(tc,{className:"h-3 w-3"}),Kr(new Date(a.ts),"dd/MM/yyyy HH:mm:ss",{locale:tn})]})}),o.jsx(kn,{className:"font-mono text-sm",children:a.lat.toFixed(6)}),o.jsx(kn,{className:"font-mono text-sm",children:a.lon.toFixed(6)}),o.jsx(kn,{children:a.speedKmh!==null?o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Qb,{className:"h-3 w-3"}),a.speedKmh.toFixed(1)," km/h"]}):o.jsx("span",{className:"text-muted-foreground",children:"—"})}),o.jsx(kn,{children:a.moving!==null&&a.moving!==void 0?o.jsx(ir,{variant:a.moving?"default":"secondary",children:a.moving?"MOVING":"STOPPED"}):a.speedKmh!==null?o.jsx(ir,{variant:a.speedKmh>3?"default":"secondary",children:a.speedKmh>3?"MOVING":"STOPPED"}):o.jsx("span",{className:"text-muted-foreground",children:"—"})}),o.jsx(kn,{children:a.raw&&typeof a.raw=="object"&&"Address"in a.raw?o.jsx("span",{className:"text-xs text-muted-foreground truncate max-w-[200px] block",children:String(a.raw.Address||"")}):o.jsx("span",{className:"text-muted-foreground",children:"—"})}),o.jsx(kn,{children:o.jsx("span",{className:"text-xs text-muted-foreground truncate max-w-[150px] block",children:a.sourceFile})})]},a.id))})]})}),n.length>=5e3&&o.jsx("div",{className:"mt-4 p-3 border-t text-sm text-muted-foreground text-center",children:"Affichage limité à 5000 points. Augmentez la limite pour voir plus."})]})]})}function R4t({open:e,onOpenChange:t,missionType:r}){const{data:n=[]}=GR(!0),i=OZe(),a=RZe(),[s,l]=w.useState({name:"",code:"",loadingType:"",defaultClientName:"",defaultLoadingLocationId:void 0,defaultUnloadingLocationId:void 0,expectedToursDefault:1,isActive:!0});w.useEffect(()=>{l(r?{name:r.name,code:r.code,loadingType:r.loadingType,defaultClientName:r.defaultClientName||"",defaultLoadingLocationId:r.defaultLoadingLocationId||void 0,defaultUnloadingLocationId:r.defaultUnloadingLocationId||void 0,expectedToursDefault:r.expectedToursDefault||1,isActive:r.isActive}:{name:"",code:"",loadingType:"",defaultClientName:"",defaultLoadingLocationId:void 0,defaultUnloadingLocationId:void 0,expectedToursDefault:1,isActive:!0})},[r,e]);const c=async d=>{if(d.preventDefault(),!(!s.name||!s.code||!s.loadingType))try{r?await a.mutateAsync({id:r.id,data:s}):await i.mutateAsync(s),t(!1)}catch{}},u=i.isPending||a.isPending;return o.jsx(ci,{open:e,onOpenChange:t,children:o.jsxs(Zn,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:r?"Modifier le type de mission":"Créer un type de mission"}),o.jsx(Ci,{children:r?"Modifiez les informations du type de mission.":"Créez un nouveau type de mission qui pourra être sélectionné lors de la création d'une mission."})]}),o.jsxs("form",{onSubmit:c,className:"space-y-4",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"name",children:["Nom ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"name",value:s.name,onChange:d=>l(f=>({...f,name:d.target.value})),placeholder:"Ex: CIMFASO — Clinker Lomé",required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"code",children:["Code ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"code",value:s.code,onChange:d=>l(f=>({...f,code:d.target.value.toUpperCase().replace(/\s+/g,"_")})),placeholder:"Ex: CIMFASO_CLINKER_LOME",required:!0}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Code unique (sera converti en majuscules)"})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"loadingType",children:["Type de chargement ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"loadingType",value:s.loadingType,onChange:d=>l(f=>({...f,loadingType:d.target.value})),placeholder:"Ex: Clinker",required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"defaultClientName",children:"Client par défaut"}),o.jsx(wt,{id:"defaultClientName",value:s.defaultClientName||"",onChange:d=>l(f=>({...f,defaultClientName:d.target.value||void 0})),placeholder:"Ex: CIMFASO"})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"defaultLoadingLocationId",children:"Lieu de chargement par défaut"}),o.jsxs(ui,{value:s.defaultLoadingLocationId?.toString()||"none",onValueChange:d=>l(f=>({...f,defaultLoadingLocationId:d&&d!=="none"?parseInt(d):void 0})),children:[o.jsx(ei,{children:o.jsx(di,{placeholder:"Sélectionner un lieu"})}),o.jsxs(ti,{children:[o.jsx(Tr,{value:"none",children:"Aucun"}),n.map(d=>o.jsx(Tr,{value:d.id.toString(),children:d.name},d.id))]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"defaultUnloadingLocationId",children:"Lieu de déchargement par défaut"}),o.jsxs(ui,{value:s.defaultUnloadingLocationId?.toString()||"none",onValueChange:d=>l(f=>({...f,defaultUnloadingLocationId:d&&d!=="none"?parseInt(d):void 0})),children:[o.jsx(ei,{children:o.jsx(di,{placeholder:"Sélectionner un lieu"})}),o.jsxs(ti,{children:[o.jsx(Tr,{value:"none",children:"Aucun"}),n.map(d=>o.jsx(Tr,{value:d.id.toString(),children:d.name},d.id))]})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"expectedToursDefault",children:"Nombre de tours par défaut"}),o.jsx(wt,{id:"expectedToursDefault",type:"number",min:"1",value:s.expectedToursDefault||1,onChange:d=>l(f=>({...f,expectedToursDefault:parseInt(d.target.value)||1}))}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"1 tour = un aller + un retour"})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(ew,{id:"isActive",checked:s.isActive,onCheckedChange:d=>l(f=>({...f,isActive:d}))}),o.jsx(Je,{htmlFor:"isActive",className:"cursor-pointer",children:"Type de mission actif (visible dans la liste)"})]}),o.jsxs(ji,{children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Annuler"}),o.jsxs(Pe,{type:"submit",disabled:u,children:[u&&o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),r?"Modifier":"Créer"]})]})]})]})})}function F4t(){const{data:e=[],isLoading:t}=whe(!1),r=FZe(),[n,i]=w.useState(null),[a,s]=w.useState(!1),[l,c]=w.useState(null),u=f=>{i(f),s(!0)},d=async f=>{try{await r.mutateAsync(f),c(null)}catch{}};return t?o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," type",e.length>1?"s":""," de mission"]}),o.jsxs(Pe,{onClick:()=>{i(null),s(!0)},children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Ajouter un type de mission"]})]}),e.length===0?o.jsx(_t,{className:"p-8 border-dashed",children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"text-muted-foreground mb-4",children:"Aucun type de mission défini"}),o.jsxs(Pe,{onClick:()=>{i(null),s(!0)},children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Créer le premier type de mission"]})]})}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map(f=>o.jsxs(_t,{className:"p-4",children:[o.jsxs("div",{className:"flex items-start justify-between gap-2 mb-3",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h3",{className:"font-semibold text-base truncate",children:f.name}),o.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Code: ",f.code]})]}),!f.isActive&&o.jsx(ir,{variant:"secondary",className:"text-xs",children:"Inactif"})]}),o.jsxs("div",{className:"space-y-2 mb-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ir,{variant:"outline",className:"text-xs",children:f.loadingType}),f.defaultClientName&&o.jsx(ir,{variant:"secondary",className:"text-xs",children:f.defaultClientName})]}),f.expectedToursDefault&&o.jsxs("p",{className:"text-xs text-muted-foreground",children:["Tours par défaut: ",f.expectedToursDefault]})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsxs(Pe,{variant:"outline",size:"sm",className:"flex-1",onClick:()=>u(f),children:[o.jsx(S3,{className:"h-3 w-3 mr-1"}),"Modifier"]}),o.jsxs(Pe,{variant:"outline",size:"sm",className:"flex-1 text-destructive hover:text-destructive",onClick:()=>c(f.id),children:[o.jsx(fo,{className:"h-3 w-3 mr-1"}),"Supprimer"]})]})]},f.id))}),o.jsx(R4t,{open:a,onOpenChange:f=>{s(f),f||i(null)},missionType:n}),o.jsx(PO,{open:l!==null,onOpenChange:f=>c(f?l:null),onConfirm:()=>l&&d(l),title:"Supprimer le type de mission",description:`Êtes-vous sûr de vouloir supprimer "${e.find(f=>f.id===l)?.name}" ? Cette action est irréversible.`,isLoading:r.isPending})]})}const M4t=[{value:"factory",label:"Usine",icon:"🏭"},{value:"port",label:"Port",icon:"⚓"},{value:"border",label:"Frontière",icon:"🚧"},{value:"warehouse",label:"Entrepôt",icon:"🏢"},{value:"city",label:"Ville",icon:"🏙️"}];function Q4t({open:e,onOpenChange:t,location:r}){const n=$Ze(),i=zZe(),[a,s]=w.useState({name:"",type:"city",country:"",latitude:void 0,longitude:void 0,imageUrl:void 0,isActive:!0});w.useEffect(()=>{s(r?{name:r.name,type:r.type,country:r.country||"",latitude:r.latitude||void 0,longitude:r.longitude||void 0,imageUrl:r.imageUrl||void 0,isActive:r.isActive}:{name:"",type:"city",country:"",latitude:void 0,longitude:void 0,imageUrl:void 0,isActive:!0})},[r,e]);const l=async u=>{if(u.preventDefault(),!(!a.name||!a.type))try{r?await i.mutateAsync({id:r.id,data:a}):await n.mutateAsync(a),t(!1)}catch{}},c=n.isPending||i.isPending;return o.jsx(ci,{open:e,onOpenChange:t,children:o.jsxs(Zn,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:r?"Modifier le lieu":"Créer un lieu"}),o.jsx(Ci,{children:r?"Modifiez les informations du lieu.":"Créez un nouveau lieu qui pourra être utilisé lors de la création de missions."})]}),o.jsxs("form",{onSubmit:l,className:"space-y-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"name",children:["Nom ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"name",value:a.name,onChange:u=>s(d=>({...d,name:u.target.value})),placeholder:"Ex: CIMFASO Ouagadougou",required:!0})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"type",children:["Type ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsxs(ui,{value:a.type,onValueChange:u=>s(d=>({...d,type:u})),children:[o.jsx(ei,{children:o.jsx(di,{placeholder:"Sélectionner un type"})}),o.jsx(ti,{children:M4t.map(u=>o.jsx(Tr,{value:u.value,children:o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx("span",{children:u.icon}),o.jsx("span",{children:u.label})]})},u.value))})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"country",children:"Pays"}),o.jsx(wt,{id:"country",value:a.country||"",onChange:u=>s(d=>({...d,country:u.target.value||void 0})),placeholder:"Ex: Burkina Faso"})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"latitude",children:"Latitude"}),o.jsx(wt,{id:"latitude",type:"number",step:"any",value:a.latitude||"",onChange:u=>s(d=>({...d,latitude:u.target.value?parseFloat(u.target.value):void 0})),placeholder:"Ex: 12.3657"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"longitude",children:"Longitude"}),o.jsx(wt,{id:"longitude",type:"number",step:"any",value:a.longitude||"",onChange:u=>s(d=>({...d,longitude:u.target.value?parseFloat(u.target.value):void 0})),placeholder:"Ex: -1.5339"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"imageUrl",children:"URL de l'image (optionnel)"}),o.jsx(wt,{id:"imageUrl",value:a.imageUrl||"",onChange:u=>s(d=>({...d,imageUrl:u.target.value||void 0})),placeholder:"https://..."})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(ew,{id:"isActive",checked:a.isActive,onCheckedChange:u=>s(d=>({...d,isActive:u}))}),o.jsx(Je,{htmlFor:"isActive",className:"cursor-pointer",children:"Lieu actif (visible dans la liste)"})]}),o.jsxs(ji,{children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Annuler"}),o.jsxs(Pe,{type:"submit",disabled:c,children:[c&&o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),r?"Modifier":"Créer"]})]})]})]})})}const L4t={factory:"🏭",port:"⚓",border:"🚧",warehouse:"🏢",city:"🏙️"},U4t={factory:"Usine",port:"Port",border:"Frontière",warehouse:"Entrepôt",city:"Ville"};function $4t(){const{data:e=[],isLoading:t}=GR(!1),r=HZe(),[n,i]=w.useState(null),[a,s]=w.useState(!1),[l,c]=w.useState(null),u=f=>{i(f),s(!0)},d=async f=>{try{await r.mutateAsync(f),c(null)}catch{}};return t?o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," lieu",e.length>1?"x":""]}),o.jsxs(Pe,{onClick:()=>{i(null),s(!0)},children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Ajouter un lieu"]})]}),e.length===0?o.jsx(_t,{className:"p-8 border-dashed",children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"text-muted-foreground mb-4",children:"Aucun lieu défini"}),o.jsxs(Pe,{onClick:()=>{i(null),s(!0)},children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Créer le premier lieu"]})]})}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map(f=>o.jsxs(_t,{className:"p-4",children:[o.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[o.jsx("span",{className:"text-3xl flex-shrink-0",children:L4t[f.type]||"📍"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h3",{className:"font-semibold text-base truncate",children:f.name}),o.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[o.jsx(ir,{variant:"secondary",className:"text-xs",children:U4t[f.type]||f.type}),!f.isActive&&o.jsx(ir,{variant:"outline",className:"text-xs",children:"Inactif"})]}),f.country&&o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:f.country})]})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsxs(Pe,{variant:"outline",size:"sm",className:"flex-1",onClick:()=>u(f),children:[o.jsx(S3,{className:"h-3 w-3 mr-1"}),"Modifier"]}),o.jsxs(Pe,{variant:"outline",size:"sm",className:"flex-1 text-destructive hover:text-destructive",onClick:()=>c(f.id),children:[o.jsx(fo,{className:"h-3 w-3 mr-1"}),"Supprimer"]})]})]},f.id))}),o.jsx(Q4t,{open:a,onOpenChange:f=>{s(f),f||i(null)},location:n}),o.jsx(PO,{open:l!==null,onOpenChange:f=>c(f?l:null),onConfirm:()=>l&&d(l),title:"Supprimer le lieu",description:`Êtes-vous sûr de vouloir supprimer "${e.find(f=>f.id===l)?.name}" ? Cette action est irréversible.`,isLoading:r.isPending})]})}async function z4t(){return await fr("/api/settings/organization")}async function H4t(e){return await fr("/api/settings/organization",{method:"PUT",body:e})}function Ove(){return Ar({queryKey:["/api/settings/organization"],queryFn:()=>z4t(),retry:1,onError:e=>{}})}function Rve(){const{toast:e}=sn();return qr({mutationFn:t=>H4t(t),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/settings/organization"]}),e({title:"Succès",description:"Informations de la société mises à jour avec succès"})},onError:t=>{e({variant:"destructive",title:"Erreur",description:t.message||"Impossible de mettre à jour les informations de la société"})}})}function W4t(){const{data:e,isLoading:t,error:r}=Ove(),n=Rve(),[i,a]=w.useState({companyName:"",legalName:"",addressLine:"",city:"",country:"",phone:"",email:"",website:"",taxId:"",logoUrl:"",cloudinaryCloudName:"",cloudinaryApiKey:"",cloudinaryApiSecret:""}),[s,l]=w.useState({});w.useEffect(()=>{e&&a({companyName:e.companyName||"",legalName:e.legalName||"",addressLine:e.addressLine||"",city:e.city||"",country:e.country||"",phone:e.phone||"",email:e.email||"",website:e.website||"",taxId:e.taxId||"",logoUrl:e.logoUrl||""})},[e]);const c=()=>{const m={};return(!i.companyName||i.companyName.trim()==="")&&(m.companyName="La dénomination commerciale est obligatoire"),i.email&&i.email.trim()!==""&&(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i.email)||(m.email="Format d'email invalide")),l(m),Object.keys(m).length===0},u=async m=>{if(m.preventDefault(),!c())return;const g={companyName:i.companyName||void 0,legalName:i.legalName||void 0,addressLine:i.addressLine||void 0,city:i.city||void 0,country:i.country||void 0,phone:i.phone||void 0,email:i.email||void 0,website:i.website||void 0,taxId:i.taxId||void 0,logoUrl:i.logoUrl||void 0};await n.mutateAsync(g)},d=()=>{e&&a({companyName:e.companyName||"",legalName:e.legalName||"",addressLine:e.addressLine||"",city:e.city||"",country:e.country||"",phone:e.phone||"",email:e.email||"",website:e.website||"",taxId:e.taxId||"",logoUrl:e.logoUrl||""}),l({})},f=(m,g)=>{a(A=>({...A,[m]:g})),s[m]&&l(A=>{const v={...A};return delete v[m],v})};return t?o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):r?(r instanceof Error&&r.message,o.jsxs("div",{className:"text-center py-12 space-y-2",children:[o.jsx("p",{className:"text-destructive font-medium",children:"Erreur lors du chargement des paramètres"}),!1,o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Vérifiez que la table ",o.jsx("code",{className:"bg-muted px-1 rounded",children:"organization_settings"})," existe dans la base de données."]})]})):o.jsxs("form",{onSubmit:u,className:"space-y-6",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"companyName",children:["Dénomination commerciale ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"companyName",value:i.companyName,onChange:m=>f("companyName",m.target.value),placeholder:"Ex: TRANSPORTS DIALLO",className:s.companyName?"border-destructive":""}),s.companyName&&o.jsx("p",{className:"text-sm text-destructive",children:s.companyName})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"legalName",children:"Raison sociale"}),o.jsx(wt,{id:"legalName",value:i.legalName,onChange:m=>f("legalName",m.target.value),placeholder:"Ex: TRANSPORTS DIALLO SARL"})]}),o.jsxs("div",{className:"space-y-2 md:col-span-2",children:[o.jsx(Je,{htmlFor:"addressLine",children:"Adresse"}),o.jsx(wt,{id:"addressLine",value:i.addressLine,onChange:m=>f("addressLine",m.target.value),placeholder:"Ex: Secteur 21, Karpala"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"city",children:"Ville"}),o.jsx(wt,{id:"city",value:i.city,onChange:m=>f("city",m.target.value),placeholder:"Ex: Ouagadougou"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"country",children:"Pays"}),o.jsx(wt,{id:"country",value:i.country,onChange:m=>f("country",m.target.value),placeholder:"Ex: Burkina Faso"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"phone",children:"Téléphone"}),o.jsx(wt,{id:"phone",value:i.phone,onChange:m=>f("phone",m.target.value),placeholder:"Ex: +226 70 00 00 00"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"email",children:"Email"}),o.jsx(wt,{id:"email",type:"email",value:i.email,onChange:m=>f("email",m.target.value),placeholder:"Ex: contact@transportsdiallo.com",className:s.email?"border-destructive":""}),s.email&&o.jsx("p",{className:"text-sm text-destructive",children:s.email})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"website",children:"Site web"}),o.jsx(wt,{id:"website",value:i.website,onChange:m=>f("website",m.target.value),placeholder:"Ex: https://www.transportsdiallo.com"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"taxId",children:"N° RCCM / IFU / N° contribuable"}),o.jsx(wt,{id:"taxId",value:i.taxId,onChange:m=>f("taxId",m.target.value),placeholder:"Ex: RCCM-OUAGA-2024-A-12345"})]}),o.jsxs("div",{className:"space-y-2 md:col-span-2",children:[o.jsx(Je,{children:"Logo de l'organisation"}),o.jsx(G4t,{logoUrl:i.logoUrl||null,onLogoChange:m=>f("logoUrl",m||"")})]})]}),o.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:d,disabled:n.isPending,children:"Annuler"}),o.jsxs(Pe,{type:"submit",disabled:n.isPending,children:[n.isPending&&o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Enregistrer"]})]})]})}function G4t({logoUrl:e,onLogoChange:t}){const[r,n]=w.useState(!1),i=w.useRef(null),a=w.useRef(null),s=async d=>{if(d){if(!d.type.startsWith("image/")){alert("Veuillez sélectionner une image");return}if(d.size>5*1024*1024){alert("L'image est trop grande (maximum 5MB)");return}n(!0);try{const f=await x8e(d);t(f.url)}catch(f){console.error("Error uploading logo:",f),alert(f instanceof Error?f.message:"Erreur lors de l'upload du logo")}finally{n(!1)}}},l=()=>{a.current?.click()},c=()=>{i.current?.click()},u=()=>{t(null),i.current&&(i.current.value=""),a.current&&(a.current.value="")};return o.jsx("div",{className:"space-y-3",children:e?o.jsxs(_t,{className:"p-4",children:[o.jsxs("div",{className:"relative inline-block",children:[o.jsx("img",{src:e,alt:"Logo de l'organisation",className:"h-24 w-auto max-w-full object-contain rounded-lg border"}),o.jsx(Pe,{type:"button",variant:"destructive",size:"icon",className:"absolute top-0 right-0",onClick:u,disabled:r,children:o.jsx(G0,{className:"h-4 w-4"})})]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Cliquez sur la croix pour supprimer le logo"})]}):o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[o.jsxs(Pe,{type:"button",variant:"outline",onClick:l,disabled:r,className:"flex-1",children:[r?o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}):o.jsx(_u,{className:"h-4 w-4 mr-2"}),"Prendre une photo"]}),o.jsxs(Pe,{type:"button",variant:"outline",onClick:c,disabled:r,className:"flex-1",children:[r?o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}):o.jsx(lP,{className:"h-4 w-4 mr-2"}),"Importer depuis la galerie"]})]}),o.jsx("input",{ref:a,type:"file",accept:"image/*",capture:"environment",className:"hidden",onChange:d=>s(d.target.files?.[0]||null)}),o.jsx("input",{ref:i,type:"file",accept:"image/*",className:"hidden",onChange:d=>s(d.target.files?.[0]||null)})]})})}function q4t(){const{data:e,isLoading:t,error:r}=Ove(),n=Rve(),{toast:i}=sn(),[a,s]=w.useState({cloudinaryCloudName:"",cloudinaryApiKey:"",cloudinaryApiSecret:""}),[l,c]=w.useState({}),[u,d]=w.useState(!1),[f,m]=w.useState(null);w.useEffect(()=>{e&&s({cloudinaryCloudName:e.cloudinaryCloudName||"",cloudinaryApiKey:e.cloudinaryApiKey||"",cloudinaryApiSecret:e.cloudinaryApiSecret||""})},[e]);const g=(E,I)=>{s(S=>({...S,[E]:I})),l[E]&&c(S=>({...S,[E]:void 0})),m(null)},A=()=>{const E={};return a.cloudinaryCloudName.trim()||(E.cloudinaryCloudName="Le Cloud Name est obligatoire"),a.cloudinaryApiKey.trim()||(E.cloudinaryApiKey="L'API Key est obligatoire"),a.cloudinaryApiSecret.trim()||(E.cloudinaryApiSecret="L'API Secret est obligatoire"),c(E),Object.keys(E).length===0},v=async()=>{if(A()){d(!0),m(null);try{const E=await fetch("/api/cloudinary/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cloudName:a.cloudinaryCloudName,apiKey:a.cloudinaryApiKey,apiSecret:a.cloudinaryApiSecret})});if(E.ok)m("success"),i({title:"Test réussi",description:"La connexion à Cloudinary fonctionne correctement."});else{const I=await E.json();m("error"),i({title:"Test échoué",description:I.message||"Impossible de se connecter à Cloudinary.",variant:"destructive"})}}catch{m("error"),i({title:"Erreur",description:"Une erreur est survenue lors du test de connexion.",variant:"destructive"})}finally{d(!1)}}},b=async E=>{if(E.preventDefault(),!A())return;const I={cloudinaryCloudName:a.cloudinaryCloudName.trim()||void 0,cloudinaryApiKey:a.cloudinaryApiKey.trim()||void 0,cloudinaryApiSecret:a.cloudinaryApiSecret.trim()||void 0};try{await n.mutateAsync(I),i({title:"Configuration enregistrée",description:"La configuration Cloudinary a été enregistrée avec succès."}),m(null)}catch(S){i({title:"Erreur",description:S instanceof Error?S.message:"Erreur lors de l'enregistrement.",variant:"destructive"})}};return t?o.jsx("div",{className:"flex items-center justify-center p-8",children:o.jsx(wr,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):r?o.jsx("div",{className:"p-4 text-center text-destructive",children:"Erreur lors du chargement de la configuration Cloudinary."}):o.jsx("form",{onSubmit:b,className:"space-y-6",children:o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsxs(cn,{className:"flex items-center gap-2",children:[o.jsx(XJ,{className:"h-5 w-5"}),"Configuration Cloudinary"]}),o.jsxs(Qi,{children:["Configurez vos identifiants Cloudinary pour le stockage persistant des images et fichiers audio. Ces identifiants peuvent être obtenus depuis votre"," ",o.jsx("a",{href:"https://cloudinary.com/console",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"dashboard Cloudinary"}),"."]})]}),o.jsxs(ar,{className:"space-y-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"cloudinaryCloudName",children:["Cloud Name ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"cloudinaryCloudName",type:"text",value:a.cloudinaryCloudName,onChange:E=>g("cloudinaryCloudName",E.target.value),placeholder:"Ex: dxyz123456",className:l.cloudinaryCloudName?"border-destructive":""}),l.cloudinaryCloudName&&o.jsx("p",{className:"text-sm text-destructive",children:l.cloudinaryCloudName}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Le Cloud Name se trouve dans votre dashboard Cloudinary (en haut à droite)."})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"cloudinaryApiKey",children:["API Key ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"cloudinaryApiKey",type:"text",value:a.cloudinaryApiKey,onChange:E=>g("cloudinaryApiKey",E.target.value),placeholder:"Ex: 123456789012345",className:l.cloudinaryApiKey?"border-destructive":""}),l.cloudinaryApiKey&&o.jsx("p",{className:"text-sm text-destructive",children:l.cloudinaryApiKey}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"L'API Key se trouve dans votre dashboard Cloudinary."})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(Je,{htmlFor:"cloudinaryApiSecret",children:["API Secret ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(wt,{id:"cloudinaryApiSecret",type:"password",value:a.cloudinaryApiSecret,onChange:E=>g("cloudinaryApiSecret",E.target.value),placeholder:"Ex: abcdefghijklmnopqrstuvwxyz123456",className:l.cloudinaryApiSecret?"border-destructive":""}),l.cloudinaryApiSecret&&o.jsx("p",{className:"text-sm text-destructive",children:l.cloudinaryApiSecret}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"L'API Secret se trouve dans votre dashboard Cloudinary. Gardez-le secret."})]}),f&&o.jsxs("div",{className:`flex items-center gap-2 p-3 rounded-md ${f==="success"?"bg-green-50 text-green-800 dark:bg-green-900/20 dark:text-green-400":"bg-red-50 text-red-800 dark:bg-red-900/20 dark:text-red-400"}`,children:[f==="success"?o.jsx(es,{className:"h-5 w-5"}):o.jsx(ay,{className:"h-5 w-5"}),o.jsx("span",{className:"text-sm font-medium",children:f==="success"?"Connexion à Cloudinary réussie":"Échec de la connexion à Cloudinary"})]}),!a.cloudinaryCloudName&&!a.cloudinaryApiKey&&!a.cloudinaryApiSecret&&o.jsxs("div",{className:"flex items-start gap-2 p-3 rounded-md bg-yellow-50 text-yellow-800 dark:bg-yellow-900/20 dark:text-yellow-400",children:[o.jsx(r1,{className:"h-5 w-5 mt-0.5"}),o.jsxs("div",{className:"text-sm",children:[o.jsx("p",{className:"font-medium",children:"Configuration requise"}),o.jsx("p",{children:"Les uploads d'images et fichiers audio ne fonctionneront pas correctement sans configuration Cloudinary."})]})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Pe,{type:"button",variant:"outline",onClick:v,disabled:u||n.isPending,children:u?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"mr-2 h-4 w-4 animate-spin"}),"Test en cours..."]}):"Tester la connexion"}),o.jsx(Pe,{type:"submit",disabled:n.isPending||u,children:n.isPending?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"mr-2 h-4 w-4 animate-spin"}),"Enregistrement..."]}):"Enregistrer"})]})]})]})})}async function K4t(e){const t=new FormData;t.append("file",e);const r=await fetch("/api/tracksolid/import",{method:"POST",body:t,credentials:"include"});if(!r.ok){const n=await r.text();let i=`${r.status}: ${n||r.statusText}`;try{i=JSON.parse(n).message||i}catch{}throw new Error(i)}return await r.json()}async function V4t(e=50){return await fr(`/api/tracksolid/imports?limit=${e}`)}async function Fve(e,t){const r=t?`/api/tracksolid/imports/${e}/trips?vehicleExternal=${encodeURIComponent(t)}`:`/api/tracksolid/imports/${e}/trips`;return await fr(r)}async function Y4t(e){return await fr("/api/tracksolid/vehicle-map",{method:"POST",body:e})}async function Z4t(){return await fr("/api/tracksolid/vehicle-maps")}function J4t(){const{toast:e}=sn();return qr({mutationFn:K4t,onSuccess:t=>{e({title:"Import réussi",description:`${t.stats.tripCount} trajets détectés dans ${t.stats.sheetCount} feuille(s)`}),br.invalidateQueries({queryKey:["/api/tracksolid/imports"]})},onError:t=>{e({title:"Erreur lors de l'import",description:t.message,variant:"destructive"})}})}function Mve(e=50){return Ar({queryKey:["/api/tracksolid/imports",e],queryFn:()=>V4t(e)})}function X4t(e,t){return Ar({queryKey:["/api/tracksolid/imports",e,"trips",t],queryFn:()=>Fve(e,t),enabled:!!e})}function eEt(){return Ar({queryKey:["/api/tracksolid/vehicle-maps"],queryFn:Z4t})}function tEt(){const{toast:e}=sn();return qr({mutationFn:Y4t,onSuccess:()=>{e({title:"Mapping enregistré",description:"Le mapping véhicule a été enregistré avec succès"}),br.invalidateQueries({queryKey:["/api/tracksolid/vehicle-maps"]})},onError:t=>{e({title:"Erreur",description:t.message,variant:"destructive"})}})}function rEt(){const[e,t]=w.useState(!1),[r,n]=w.useState(null),i=J4t(),{toast:a}=sn(),s=w.useCallback(f=>{f.preventDefault(),f.stopPropagation(),f.type==="dragenter"||f.type==="dragover"?t(!0):f.type==="dragleave"&&t(!1)},[]),l=w.useCallback(f=>{if(f.preventDefault(),f.stopPropagation(),t(!1),f.dataTransfer.files&&f.dataTransfer.files[0]){const m=f.dataTransfer.files[0];m.name.endsWith(".xls")||m.name.endsWith(".xlsx")?n(m):a({title:"Format invalide",description:"Seuls les fichiers .xls et .xlsx sont acceptés",variant:"destructive"})}},[a]),c=w.useCallback(f=>{if(f.target.files&&f.target.files[0]){const m=f.target.files[0];m.name.endsWith(".xls")||m.name.endsWith(".xlsx")?n(m):a({title:"Format invalide",description:"Seuls les fichiers .xls et .xlsx sont acceptés",variant:"destructive"})}},[a]),u=async()=>{if(r)try{const f=await i.mutateAsync(r);n(null)}catch{}},d=()=>{n(null)};return o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Importer un rapport XLS TrackSolid"}),o.jsx(Qi,{children:"Importez un fichier Excel exporté depuis TrackSolidPro. Le fichier sera analysé et les trajets seront extraits automatiquement."})]}),o.jsxs(ar,{className:"space-y-4",children:[r?o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-3 p-4 border rounded-lg",children:[o.jsx(S8,{className:"h-8 w-8 text-primary"}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"font-medium",children:r.name}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:[(r.size/1024/1024).toFixed(2)," MB"]})]})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Pe,{onClick:u,disabled:i.isPending,className:"flex-1",children:i.isPending?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Import en cours..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Pd,{className:"h-4 w-4 mr-2"}),"Importer"]})}),o.jsx(Pe,{onClick:d,variant:"outline",disabled:i.isPending,children:"Annuler"})]})]}):o.jsxs("div",{onDragEnter:s,onDragLeave:s,onDragOver:s,onDrop:l,className:` border-2 border-dashed rounded-lg p-12 text-center transition-colors ${e?"border-primary bg-primary/5":"border-muted-foreground/25"} hover:border-primary/50 cursor-pointer `,children:[o.jsx("input",{type:"file",id:"file-upload",accept:".xls,.xlsx",onChange:c,className:"hidden"}),o.jsxs("label",{htmlFor:"file-upload",className:"cursor-pointer",children:[o.jsx(S8,{className:"h-12 w-12 mx-auto mb-4 text-muted-foreground"}),o.jsx("p",{className:"text-lg font-medium mb-2",children:"Glissez-déposez un fichier XLS ici"}),o.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"ou cliquez pour sélectionner un fichier"}),o.jsxs(Pe,{type:"button",variant:"outline",children:[o.jsx(Pd,{className:"h-4 w-4 mr-2"}),"Sélectionner un fichier"]})]})]}),i.isSuccess&&i.data&&o.jsx("div",{className:"p-4 bg-green-50 dark:bg-green-950 border border-green-200 dark:border-green-800 rounded-lg",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx(es,{className:"h-5 w-5 text-green-600 dark:text-green-400 mt-0.5"}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"font-medium text-green-900 dark:text-green-100 mb-2",children:"Import réussi !"}),o.jsxs("div",{className:"space-y-1 text-sm text-green-800 dark:text-green-200",children:[o.jsxs("p",{children:[o.jsx("strong",{children:"Fichier :"})," ",i.data.import.fileName]}),o.jsxs("p",{children:[o.jsx("strong",{children:"Date d'import :"})," ",Kr(new Date(i.data.import.createdAt),"PPpp",{locale:tn})]}),o.jsxs("p",{children:[o.jsx("strong",{children:"Trajets détectés :"})," ",o.jsx(ir,{variant:"secondary",children:i.data.stats.tripCount})]}),o.jsxs("p",{children:[o.jsx("strong",{children:"Feuilles détectées :"})," ",o.jsx(ir,{variant:"secondary",children:i.data.stats.sheetCount})]}),i.data.stats.sheets.length>0&&o.jsxs("div",{className:"mt-2",children:[o.jsx("p",{className:"font-medium mb-1",children:"Feuilles :"}),o.jsx("div",{className:"flex flex-wrap gap-1",children:i.data.stats.sheets.map((f,m)=>o.jsxs(ir,{variant:"outline",children:[f.name," (",f.tripCount," trajets)"]},m))})]})]})]})]})}),i.isError&&o.jsx("div",{className:"p-4 bg-red-50 dark:bg-red-950 border border-red-200 dark:border-red-800 rounded-lg",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx(ay,{className:"h-5 w-5 text-red-600 dark:text-red-400 mt-0.5"}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"font-medium text-red-900 dark:text-red-100 mb-1",children:"Erreur lors de l'import"}),o.jsx("p",{className:"text-sm text-red-800 dark:text-red-200",children:i.error instanceof Error?i.error.message:"Une erreur est survenue"})]})]})})]})]})}function nEt(){const{data:e=[],isLoading:t}=Mve(),{data:r=[]}=Ar({queryKey:["/api/vehicles"]}),{data:n=[],isLoading:i}=eEt(),a=tEt(),{toast:s}=sn(),{data:l=[]}=Ar({queryKey:["/api/tracksolid/all-trips-for-mapping",e.map(E=>E.id)],queryFn:async()=>{if(e.length===0)return[];const E=e.map(S=>Fve(S.id));return(await Promise.all(E)).flat()},enabled:e.length>0}),c=Array.from(new Set(l.map(E=>E.vehicleExternalName))),[u,d]=w.useState({}),[f,m]=w.useState(!1);w.useEffect(()=>{if(!f&&c.length>0){const E={};c.forEach(I=>{E[I]=null}),n.forEach(I=>{E[I.externalName]=I.vehicleId??null}),d(E),m(!0)}else f&&d(E=>{const I={...E};let S=!1;return c.forEach(_=>{_ in I||(I[_]=null,S=!0)}),S?I:E})},[c.join(","),f]);const g=Array.from(new Set([...n.map(E=>E.externalName),...c])),A=(E,I)=>{const S=I==="none"?null:parseInt(I,10);d(_=>({..._,[E]:S}))},v=E=>{const I=u[E];return I==null?"none":String(I)},b=async()=>{try{await Promise.all(Object.entries(u).map(([E,I])=>a.mutateAsync({externalName:E,vehicleId:I}))),s({title:"Mappings enregistrés",description:"Les mappings ont été enregistrés avec succès"})}catch{}};return t||i?o.jsx(_t,{children:o.jsx(ar,{className:"py-12",children:o.jsx("div",{className:"flex justify-center items-center",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})})})}):g.length===0?o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Mapper les feuilles aux véhicules"}),o.jsx(Qi,{children:"Associez les identifiants TrackSolid aux véhicules de votre parc"})]}),o.jsx(ar,{children:o.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[o.jsx("p",{children:"Aucune feuille TrackSolid détectée."}),o.jsx("p",{className:"text-sm mt-2",children:"Importez d'abord un fichier XLS TrackSolid."})]})})]}):o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Mapper les feuilles aux véhicules"}),o.jsx(Qi,{children:"Associez les identifiants TrackSolid (noms de feuilles) aux véhicules de votre parc. Cela permettra de lier automatiquement les trajets TrackSolid aux voyages Parc'App."})]}),o.jsxs(ar,{className:"space-y-4",children:[o.jsx("div",{className:"space-y-3",children:g.map(E=>{const I=v(E);return o.jsxs("div",{className:"flex items-center gap-4 p-4 border rounded-lg",children:[o.jsx(Do,{className:"h-5 w-5 text-muted-foreground"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"font-medium truncate",children:E}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Identifiant TrackSolid"})]}),o.jsxs(ui,{value:I,onValueChange:S=>A(E,S),children:[o.jsx(ei,{className:"w-[250px]",children:o.jsx(di,{placeholder:"Sélectionner un véhicule"})}),o.jsxs(ti,{children:[o.jsx(Tr,{value:"none",children:"Aucun véhicule"}),r.map(S=>o.jsx(Tr,{value:S.id.toString(),children:o.jsxs("div",{className:"flex items-center gap-2",children:[S.photoUrl&&o.jsx("img",{src:hn(S.photoUrl)||void 0,alt:S.immatriculation,className:"h-6 w-6 rounded object-cover"}),o.jsx("span",{children:S.immatriculation}),S.nom&&o.jsx(ir,{variant:"outline",className:"text-xs",children:S.nom})]})},S.id))]})]},`select-${E}-${I}`)]},E)})}),o.jsx("div",{className:"flex justify-end pt-4 border-t",children:o.jsx(Pe,{onClick:b,disabled:a.isPending,children:a.isPending?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Enregistrement..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Nbe,{className:"h-4 w-4 mr-2"}),"Enregistrer le mapping"]})})})]})]})}function iEt(){const{data:e=[],isLoading:t}=Mve(),[r,n]=w.useState(e[0]?.id??null),[i,a]=w.useState("all"),{data:s=[],isLoading:l}=X4t(r,i!=="all"?i:void 0),c=Array.from(new Set(s.map(u=>u.vehicleExternalName)));return t?o.jsx(_t,{children:o.jsx(ar,{className:"py-12",children:o.jsx("div",{className:"flex justify-center items-center",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})})})}):e.length===0?o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Aperçu des trajets TrackSolid"}),o.jsx(Qi,{children:"Consultez les trajets importés depuis TrackSolidPro"})]}),o.jsx(ar,{children:o.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[o.jsx("p",{children:"Aucun import disponible."}),o.jsx("p",{className:"text-sm mt-2",children:"Importez d'abord un fichier XLS TrackSolid."})]})})]}):o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Aperçu des trajets TrackSolid"}),o.jsx(Qi,{children:"Consultez les trajets importés depuis TrackSolidPro. Vous pouvez filtrer par import et par véhicule."})]}),o.jsxs(ar,{className:"space-y-4",children:[o.jsxs("div",{className:"flex gap-4 flex-wrap",children:[o.jsxs("div",{className:"flex-1 min-w-[200px]",children:[o.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Import"}),o.jsxs(ui,{value:r?.toString()??"",onValueChange:u=>n(parseInt(u)),children:[o.jsx(ei,{children:o.jsx(di,{placeholder:"Sélectionner un import"})}),o.jsx(ti,{children:e.map(u=>o.jsxs(Tr,{value:u.id.toString(),children:[u.fileName," (",u.tripCount," trajets)"]},u.id))})]})]}),r&&c.length>0&&o.jsxs("div",{className:"flex-1 min-w-[200px]",children:[o.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Véhicule"}),o.jsxs(ui,{value:i,onValueChange:a,children:[o.jsx(ei,{children:o.jsx(di,{placeholder:"Tous les véhicules"})}),o.jsxs(ti,{children:[o.jsx(Tr,{value:"all",children:"Tous les véhicules"}),c.map(u=>o.jsx(Tr,{value:u,children:u},u))]})]})]})]}),l?o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):s.length===0?o.jsx("div",{className:"text-center py-8 text-muted-foreground",children:o.jsx("p",{children:"Aucun trajet trouvé pour cet import."})}):o.jsx("div",{className:"border rounded-lg overflow-hidden",children:o.jsxs(O1,{children:[o.jsx(R1,{children:o.jsxs(xc,{children:[o.jsx(Pn,{children:"Véhicule"}),o.jsx(Pn,{children:"Départ"}),o.jsx(Pn,{children:"Arrivée"}),o.jsx(Pn,{children:"Lieu départ"}),o.jsx(Pn,{children:"Lieu arrivée"}),o.jsx(Pn,{children:"Distance"}),o.jsx(Pn,{children:"Durée"}),o.jsx(Pn,{children:"Vitesse moy."})]})}),o.jsx(F1,{children:s.map(u=>o.jsxs(xc,{children:[o.jsx(kn,{children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ir,{variant:"outline",children:u.vehicleExternalName}),u.vehiclePlateGuess&&o.jsx(ir,{variant:"secondary",className:"text-xs",children:u.vehiclePlateGuess})]})}),o.jsx(kn,{children:u.startAt?o.jsxs("div",{className:"flex items-center gap-1 text-sm",children:[o.jsx(tc,{className:"h-3 w-3"}),Kr(new Date(u.startAt),"dd/MM/yyyy HH:mm",{locale:tn})]}):o.jsx("span",{className:"text-muted-foreground",children:"-"})}),o.jsx(kn,{children:u.endAt?o.jsxs("div",{className:"flex items-center gap-1 text-sm",children:[o.jsx(tc,{className:"h-3 w-3"}),Kr(new Date(u.endAt),"dd/MM/yyyy HH:mm",{locale:tn})]}):o.jsx("span",{className:"text-muted-foreground",children:"-"})}),o.jsx(kn,{children:u.startLocation?o.jsxs("div",{className:"flex items-center gap-1 text-sm",children:[o.jsx(rs,{className:"h-3 w-3"}),u.startLocation]}):o.jsx("span",{className:"text-muted-foreground",children:"-"})}),o.jsx(kn,{children:u.endLocation?o.jsxs("div",{className:"flex items-center gap-1 text-sm",children:[o.jsx(rs,{className:"h-3 w-3"}),u.endLocation]}):o.jsx("span",{className:"text-muted-foreground",children:"-"})}),o.jsx(kn,{children:u.distanceKm!==null?o.jsxs("span",{className:"font-medium",children:[u.distanceKm.toFixed(1)," km"]}):o.jsx("span",{className:"text-muted-foreground",children:"-"})}),o.jsx(kn,{children:u.durationMinutes!==null?o.jsxs("span",{className:"text-sm",children:[Math.floor(u.durationMinutes/60),"h",(u.durationMinutes%60).toString().padStart(2,"0")]}):o.jsx("span",{className:"text-muted-foreground",children:"-"})}),o.jsx(kn,{children:u.avgSpeedKmh!==null?o.jsxs("div",{className:"flex items-center gap-1 text-sm",children:[o.jsx(Qb,{className:"h-3 w-3"}),u.avgSpeedKmh.toFixed(0)," km/h"]}):o.jsx("span",{className:"text-muted-foreground",children:"-"})})]},u.id))})]})}),s.length>0&&o.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:[s.length," trajet",s.length>1?"s":""," affiché",s.length>1?"s":""]})]})]})}function aEt(){const[e,t]=w.useState(!1),[r,n]=w.useState(null),[i,a]=w.useState(null),[s,l]=w.useState(!1),[c,u]=w.useState(null),{toast:d}=sn(),{data:f=[],isLoading:m}=Ar({queryKey:["/api/vehicles"]}),g=w.useCallback(I=>{I.preventDefault(),I.stopPropagation(),I.type==="dragenter"||I.type==="dragover"?t(!0):I.type==="dragleave"&&t(!1)},[]),A=w.useCallback(I=>{if(I.preventDefault(),I.stopPropagation(),t(!1),I.dataTransfer.files&&I.dataTransfer.files[0]){const S=I.dataTransfer.files[0];S.name.endsWith(".xls")||S.name.endsWith(".xlsx")?n(S):d({title:"Format invalide",description:"Seuls les fichiers .xls et .xlsx sont acceptés",variant:"destructive"})}},[d]),v=w.useCallback(I=>{if(I.target.files&&I.target.files[0]){const S=I.target.files[0];S.name.endsWith(".xls")||S.name.endsWith(".xlsx")?n(S):d({title:"Format invalide",description:"Seuls les fichiers .xls et .xlsx sont acceptés",variant:"destructive"})}},[d]),b=async()=>{if(r){if(!i){d({title:"Véhicule requis",description:"Veuillez sélectionner un véhicule",variant:"destructive"});return}l(!0),u(null);try{const I=new FormData;I.append("file",r),I.append("vehicleId",String(i));const S=await fetch("/api/tracksolid/track-detail/import",{method:"POST",body:I});if(!S.ok){const B=await S.json();throw new Error(B.message||"Erreur lors de l'import")}const _=await S.json();u(_),n(null),a(null),d({title:"Import réussi",description:`${_.insertedRows} points GPS importés avec succès`,variant:"default"})}catch(I){console.error("Erreur import Track-Detail:",I),d({title:"Erreur d'import",description:I instanceof Error?I.message:"Une erreur est survenue",variant:"destructive"})}finally{l(!1)}}},E=()=>{n(null),a(null),u(null)};return o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsxs(cn,{className:"flex items-center gap-2",children:[o.jsx(rs,{className:"h-5 w-5"}),"Importer un fichier Track-Detail"]}),o.jsx(Qi,{children:"Importez un fichier Excel Track-Detail (un fichier par camion) contenant les points GPS détaillés. Les points seront associés au véhicule sélectionné."})]}),o.jsxs(ar,{className:"space-y-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Véhicule"}),o.jsxs(ui,{value:i?String(i):void 0,onValueChange:I=>a(parseInt(I)),disabled:m||s,children:[o.jsx(ei,{children:o.jsx(di,{placeholder:"Sélectionner un véhicule"})}),o.jsx(ti,{children:f.map(I=>o.jsxs(Tr,{value:String(I.id),children:[I.immatriculation," ",I.marque&&`- ${I.marque}`]},I.id))})]})]}),r?o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-3 p-4 border rounded-lg bg-muted/50",children:[o.jsx(S8,{className:"h-8 w-8 text-primary"}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"font-medium",children:r.name}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:[(r.size/1024).toFixed(2)," KB"]})]})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Pe,{onClick:b,disabled:!i||s,className:"flex-1",children:s?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Import en cours..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Pd,{className:"h-4 w-4 mr-2"}),"Importer"]})}),o.jsx(Pe,{variant:"outline",onClick:E,disabled:s,children:"Annuler"})]})]}):o.jsxs("div",{onDragEnter:g,onDragLeave:g,onDragOver:g,onDrop:A,className:` border-2 border-dashed rounded-lg p-12 text-center transition-colors ${e?"border-primary bg-primary/5":"border-muted-foreground/25"} hover:border-primary/50 cursor-pointer `,children:[o.jsx("input",{type:"file",id:"track-detail-file-input",accept:".xls,.xlsx",onChange:v,className:"hidden"}),o.jsxs("label",{htmlFor:"track-detail-file-input",className:"cursor-pointer",children:[o.jsx(Pd,{className:"h-12 w-12 mx-auto mb-4 text-muted-foreground"}),o.jsx("p",{className:"text-lg font-medium mb-2",children:"Glissez-déposez un fichier Track-Detail ici"}),o.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"ou cliquez pour sélectionner un fichier"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Formats acceptés: .xls, .xlsx"})]})]}),c&&o.jsxs("div",{className:"mt-6 p-4 border rounded-lg bg-muted/30 space-y-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(es,{className:"h-5 w-5 text-green-600"}),o.jsx("h3",{className:"font-semibold",children:"Import terminé"})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Véhicule:"}),o.jsx("p",{className:"font-medium",children:c.vehicleName})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Fichier:"}),o.jsx("p",{className:"font-medium truncate",children:c.sourceFile})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Feuille:"}),o.jsx("p",{className:"font-medium",children:c.sheetName})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Lignes totales:"}),o.jsx("p",{className:"font-medium",children:c.totalRows})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Lignes parsées:"}),o.jsx("p",{className:"font-medium",children:c.parsedRows})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Points insérés:"}),o.jsx(ir,{variant:"default",className:"ml-2",children:c.insertedRows})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Lignes ignorées:"}),o.jsx(ir,{variant:"secondary",className:"ml-2",children:c.skippedRows})]})]}),c.errors.length>0&&o.jsxs("div",{className:"mt-3",children:[o.jsxs("p",{className:"text-sm font-medium text-destructive mb-2",children:["Erreurs (",c.errors.length,"):"]}),o.jsx("div",{className:"max-h-32 overflow-y-auto space-y-1 text-xs",children:c.errors.map((I,S)=>o.jsxs("div",{className:"flex items-start gap-2 text-muted-foreground",children:[o.jsx(ay,{className:"h-3 w-3 mt-0.5 text-destructive"}),o.jsxs("span",{children:["Ligne ",I.row,": ",I.message]})]},S))})]})]})]})]})}async function sEt(e={}){const t=new URLSearchParams;e.vehicleId&&t.append("vehicleId",String(e.vehicleId)),e.startDate&&t.append("startDate",e.startDate),e.endDate&&t.append("endDate",e.endDate),e.limit&&t.append("limit",String(e.limit));const r=`/api/track-points${t.toString()?`?${t.toString()}`:""}`;return await fr(r)}function oEt(e={}){return Ar({queryKey:["/api/track-points",e],queryFn:()=>sEt(e),enabled:e.vehicleId!==void 0})}function lEt(){const[e,t]=w.useState(null),[r,n]=w.useState(""),[i,a]=w.useState(""),[s,l]=w.useState(1e3),{data:c=[],isLoading:u}=Ar({queryKey:["/api/vehicles"]}),{data:d=[],isLoading:f}=oEt({vehicleId:e??void 0,startDate:r||void 0,endDate:i||void 0,limit:s}),m={total:d.length,withSpeed:d.filter(g=>g.speedKmh!==null).length,moving:d.filter(g=>g.moving===!0?!0:g.moving===!1?!1:g.speedKmh!==null&&g.speedKmh>3).length,dateRange:d.length>0?{start:d[0]?.ts,end:d[d.length-1]?.ts}:null};return u?o.jsx(_t,{children:o.jsx(ar,{className:"py-12",children:o.jsx("div",{className:"flex justify-center items-center",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})})})}):c.length===0?o.jsx(_t,{children:o.jsx(ar,{className:"py-12 text-center",children:o.jsx("p",{className:"text-muted-foreground",children:"Aucun véhicule disponible"})})}):o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsxs(cn,{className:"flex items-center gap-2",children:[o.jsx(rs,{className:"h-5 w-5"}),"Points GPS Track-Detail"]}),o.jsx(Qi,{children:"Visualisez les points GPS importés depuis les fichiers Track-Detail"})]}),o.jsxs(ar,{className:"space-y-4",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Véhicule"}),o.jsxs(ui,{value:e?String(e):void 0,onValueChange:g=>t(g?parseInt(g):null),children:[o.jsx(ei,{children:o.jsx(di,{placeholder:"Sélectionner un véhicule"})}),o.jsx(ti,{children:c.map(g=>o.jsxs(Tr,{value:String(g.id),children:[g.immatriculation," ",g.marque&&`- ${g.marque}`]},g.id))})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Date début"}),o.jsx(wt,{type:"date",value:r,onChange:g=>n(g.target.value)})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Date fin"}),o.jsx(wt,{type:"date",value:i,onChange:g=>a(g.target.value)})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Limite"}),o.jsx(wt,{type:"number",value:s,onChange:g=>l(parseInt(g.target.value)||1e3),min:1,max:1e4})]})]}),e&&m.total>0&&o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:[o.jsx(_t,{children:o.jsxs(ar,{className:"p-4",children:[o.jsx("div",{className:"text-2xl font-bold",children:m.total}),o.jsx("div",{className:"text-sm text-muted-foreground",children:"Points total"})]})}),o.jsx(_t,{children:o.jsxs(ar,{className:"p-4",children:[o.jsx("div",{className:"text-2xl font-bold",children:m.withSpeed}),o.jsx("div",{className:"text-sm text-muted-foreground",children:"Avec vitesse"})]})}),o.jsx(_t,{children:o.jsxs(ar,{className:"p-4",children:[o.jsx("div",{className:"text-sm font-bold",children:m.dateRange?.start?Kr(new Date(m.dateRange.start),"dd/MM/yyyy",{locale:tn}):"-"}),o.jsx("div",{className:"text-xs text-muted-foreground",children:"Période"}),o.jsx("div",{className:"text-sm font-bold",children:m.dateRange?.end?Kr(new Date(m.dateRange.end),"dd/MM/yyyy",{locale:tn}):"-"})]})})]}),e?f?o.jsx(_t,{children:o.jsx(ar,{className:"py-12",children:o.jsx("div",{className:"flex justify-center items-center",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})})})}):d.length===0?o.jsx(_t,{children:o.jsx(ar,{className:"py-12 text-center",children:o.jsx("p",{className:"text-muted-foreground",children:"Aucun point GPS trouvé pour ce véhicule"})})}):o.jsxs("div",{className:"border rounded-lg",children:[o.jsx("div",{className:"overflow-x-auto max-h-[600px] overflow-y-auto",children:o.jsxs(O1,{children:[o.jsx(R1,{children:o.jsxs(xc,{children:[o.jsx(Pn,{children:"Date/Heure"}),o.jsx(Pn,{children:"Latitude"}),o.jsx(Pn,{children:"Longitude"}),o.jsx(Pn,{children:"Vitesse"}),o.jsx(Pn,{children:"Mouvement"}),o.jsx(Pn,{children:"Adresse"}),o.jsx(Pn,{children:"Source"})]})}),o.jsx(F1,{children:d.map(g=>o.jsxs(xc,{children:[o.jsx(kn,{children:o.jsxs("div",{className:"flex items-center gap-1 text-sm",children:[o.jsx(tc,{className:"h-3 w-3"}),Kr(new Date(g.ts),"dd/MM/yyyy HH:mm:ss",{locale:tn})]})}),o.jsx(kn,{className:"font-mono text-sm",children:g.lat.toFixed(6)}),o.jsx(kn,{className:"font-mono text-sm",children:g.lon.toFixed(6)}),o.jsx(kn,{children:g.speedKmh!==null?o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Qb,{className:"h-3 w-3"}),g.speedKmh.toFixed(1)," km/h"]}):o.jsx("span",{className:"text-muted-foreground",children:"-"})}),o.jsx(kn,{children:g.moving!==null&&g.moving!==void 0?o.jsx(ir,{variant:g.moving?"default":"secondary",children:g.moving?"MOVING":"STOPPED"}):g.speedKmh!==null?o.jsx(ir,{variant:g.speedKmh>3?"default":"secondary",children:g.speedKmh>3?"MOVING":"STOPPED"}):o.jsx("span",{className:"text-muted-foreground",children:"—"})}),o.jsx(kn,{children:g.raw&&typeof g.raw=="object"&&"Address"in g.raw?o.jsx("span",{className:"text-xs text-muted-foreground truncate max-w-[200px] block",children:String(g.raw.Address||"")}):o.jsx("span",{className:"text-muted-foreground",children:"—"})}),o.jsx(kn,{children:o.jsx("span",{className:"text-xs text-muted-foreground truncate max-w-[150px] block",children:g.sourceFile})})]},g.id))})]})}),d.length>=s&&o.jsxs("div",{className:"p-4 border-t text-sm text-muted-foreground text-center",children:["Affichage limité à ",s," points. Augmentez la limite pour voir plus."]})]}):o.jsx(_t,{children:o.jsx(ar,{className:"py-12 text-center",children:o.jsx("p",{className:"text-muted-foreground",children:"Sélectionnez un véhicule pour voir ses points GPS"})})})]})]})}function cEt(){return o.jsxs(vg,{defaultValue:"import",className:"space-y-6",children:[o.jsxs(Bm,{className:"grid w-full grid-cols-5",children:[o.jsxs(Ii,{value:"import",className:"flex items-center gap-2",children:[o.jsx(Pd,{className:"h-4 w-4"}),"Importer"]}),o.jsxs(Ii,{value:"track-detail",className:"flex items-center gap-2",children:[o.jsx(rs,{className:"h-4 w-4"}),"Track-Detail"]}),o.jsxs(Ii,{value:"points-viewer",className:"flex items-center gap-2",children:[o.jsx(ybe,{className:"h-4 w-4"}),"Points GPS"]}),o.jsxs(Ii,{value:"mapping",className:"flex items-center gap-2",children:[o.jsx(Lb,{className:"h-4 w-4"}),"Mapping"]}),o.jsxs(Ii,{value:"preview",className:"flex items-center gap-2",children:[o.jsx(oP,{className:"h-4 w-4"}),"Aperçu"]})]}),o.jsx(Ms,{value:"import",className:"space-y-4",children:o.jsx(rEt,{})}),o.jsx(Ms,{value:"track-detail",className:"space-y-4",children:o.jsx(aEt,{})}),o.jsx(Ms,{value:"points-viewer",className:"space-y-4",children:o.jsx(lEt,{})}),o.jsx(Ms,{value:"mapping",className:"space-y-4",children:o.jsx(nEt,{})}),o.jsx(Ms,{value:"preview",className:"space-y-4",children:o.jsx(iEt,{})})]})}function uEt(){return o.jsxs("div",{className:"space-y-6 pb-8",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(_1,{className:"h-8 w-8 text-primary"}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl font-semibold",children:"Paramètres"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Gérez les types de mission, les lieux et autres configurations"})]})]}),o.jsxs(vg,{defaultValue:"organization",className:"space-y-6",children:[o.jsxs(Bm,{className:"grid w-full grid-cols-5",children:[o.jsxs(Ii,{value:"organization",className:"flex items-center gap-2",children:[o.jsx(NC,{className:"h-4 w-4"}),"Organisation"]}),o.jsxs(Ii,{value:"cloudinary",className:"flex items-center gap-2",children:[o.jsx(XJ,{className:"h-4 w-4"}),"Cloudinary"]}),o.jsxs(Ii,{value:"mission-types",className:"flex items-center gap-2",children:[o.jsx(ng,{className:"h-4 w-4"}),"Types de mission"]}),o.jsxs(Ii,{value:"locations",className:"flex items-center gap-2",children:[o.jsx(rs,{className:"h-4 w-4"}),"Lieux"]}),o.jsxs(Ii,{value:"tracking",className:"flex items-center gap-2",children:[o.jsx(jC,{className:"h-4 w-4"}),"Tracking"]})]}),o.jsx(Ms,{value:"organization",className:"space-y-4",children:o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Informations de la société"}),o.jsx(Qi,{children:"Configurez les informations de votre organisation. Ces informations seront utilisées dans les documents (ordres de mission, impressions, etc.)."})]}),o.jsx(ar,{children:o.jsx(W4t,{})})]})}),o.jsx(Ms,{value:"cloudinary",className:"space-y-4",children:o.jsx(q4t,{})}),o.jsx(Ms,{value:"mission-types",className:"space-y-4",children:o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Types de mission"}),o.jsx(Qi,{children:"Gérez les types de mission prédéfinis. La sélection d'un type pré-remplit automatiquement les informations lors de la création d'une mission."})]}),o.jsx(ar,{children:o.jsx(F4t,{})})]})}),o.jsx(Ms,{value:"locations",className:"space-y-4",children:o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Lieux"}),o.jsx(Qi,{children:"Gérez les lieux pré-définis pour le chargement et le déchargement. Ces lieux peuvent être associés aux types de mission."})]}),o.jsx(ar,{children:o.jsx($4t,{})})]})}),o.jsx(Ms,{value:"tracking",className:"space-y-4",children:o.jsx(cEt,{})})]})]})}function dEt(e){return Ar({queryKey:["/api/driver/mission",e],queryFn:async()=>{try{const r=(await DO()).filter(n=>n.status==="in_progress"||n.status==="planned");for(const n of r){const i=await fetch(`/api/trips?missionId=${n.id}`);if(!i.ok)continue;const s=(await i.json()).filter(l=>l.status!=="completed"&&l.status!=="cancelled");if(s.length>0&&(!e||n.mainDriverId===e)){const l=await Ole(n.id);if(l)return{...l,trips:s}}}return null}catch(t){return console.error("Error fetching driver mission:",t),null}},refetchInterval:3e4})}async function fEt(e,t){return await fr(`/api/trips/${e}/driver/depart`,{method:"POST",body:t||{}})}async function hEt(e,t){return await fr(`/api/trips/${e}/driver/arrive`,{method:"POST",body:t||{}})}async function mEt(e,t){return await fr(`/api/trips/${e}/driver/loading-completed`,{method:"POST",body:t||{}})}async function pEt(e,t){return await fr(`/api/trips/${e}/driver/unloading-completed`,{method:"POST",body:t||{}})}async function gEt(e,t){return await fr(`/api/trips/${e}/driver/fuel`,{method:"PATCH",body:t})}function AEt(e){const{toast:t}=sn(),r=zu(),n=qr({mutationFn:c=>fEt(e,c),onSuccess:()=>{r.invalidateQueries({queryKey:["/api/trips"]}),r.invalidateQueries({queryKey:["/api/missions"]}),t({title:"Départ enregistré",description:"Le départ a été enregistré avec succès."})},onError:c=>{t({variant:"destructive",title:"Erreur",description:c.message||"Impossible d'enregistrer le départ"})}}),i=qr({mutationFn:c=>hEt(e,c),onSuccess:()=>{r.invalidateQueries({queryKey:["/api/trips"]}),r.invalidateQueries({queryKey:["/api/missions"]}),t({title:"Arrivée enregistrée",description:"L'arrivée a été enregistrée avec succès."})},onError:c=>{t({variant:"destructive",title:"Erreur",description:c.message||"Impossible d'enregistrer l'arrivée"})}}),a=qr({mutationFn:c=>mEt(e,c),onSuccess:()=>{r.invalidateQueries({queryKey:["/api/trips"]}),r.invalidateQueries({queryKey:["/api/missions"]}),r.invalidateQueries({queryKey:["/api/driver/mission"]}),t({title:"Chargement confirmé",description:"Le chargement a été confirmé avec succès."})},onError:c=>{t({variant:"destructive",title:"Erreur",description:c.message||"Impossible de confirmer le chargement"})}}),s=qr({mutationFn:c=>pEt(e,c),onSuccess:()=>{r.invalidateQueries({queryKey:["/api/trips"]}),r.invalidateQueries({queryKey:["/api/missions"]}),r.invalidateQueries({queryKey:["/api/driver/mission"]}),t({title:"Déchargement confirmé",description:"Le déchargement a été confirmé avec succès."})},onError:c=>{t({variant:"destructive",title:"Erreur",description:c.message||"Impossible de confirmer le déchargement"})}}),l=qr({mutationFn:c=>gEt(e,c),onSuccess:()=>{r.invalidateQueries({queryKey:["/api/trips"]}),r.invalidateQueries({queryKey:["/api/missions"]}),t({title:"Plein enregistré",description:"Les informations de carburant ont été enregistrées avec succès."})},onError:c=>{t({variant:"destructive",title:"Erreur",description:c.message||"Impossible d'enregistrer le plein"})}});return{depart:n.mutate,arrive:i.mutate,confirmLoading:a.mutate,confirmUnloading:s.mutate,updateFuel:l.mutate,isDeparting:n.isPending,isArriving:i.isPending,isConfirmingLoading:a.isPending,isConfirmingUnloading:s.isPending,isUpdatingFuel:l.isPending}}const h8=[{value:"moteur",label:"Moteur",icon:_1},{value:"frein",label:"Frein",icon:C3},{value:"pneu",label:"Pneu",icon:I3},{value:"electrique",label:"Électrique",icon:B3},{value:"autre",label:"Autre incident",icon:yx}];function vEt(){const{toast:e}=sn(),{data:t,isLoading:r,error:n}=dEt(),i=t?.trips?.[0]||null,a=AEt(i?.id||0),s=()=>navigator.mediaDevices&&navigator.mediaDevices.getUserMedia&&window.MediaRecorder&&(window.location.protocol==="https:"||window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),[l,c]=w.useState(!1),[u,d]=w.useState(!1),[f,m]=w.useState(null),[g,A]=w.useState(null),[v,b]=w.useState(""),[E,I]=w.useState(null),[S,_]=w.useState(null),[B,T]=w.useState(null),[P,O]=w.useState(null),[z,L]=w.useState(!1),[W,R]=w.useState(null),[$,X]=w.useState(null),[Z,K]=w.useState(0),[q,Y]=w.useState(null),[ne,ge]=w.useState(!1),[ae,pe]=w.useState(!1),[_e,we]=w.useState(!1),[xe,Me]=w.useState(""),[ye,Ee]=w.useState(""),[me,Se]=w.useState(""),[Ie,Be]=w.useState(""),[Xe,ke]=w.useState(null),[he,Le]=w.useState(!1),[Ye,Oe]=w.useState(""),[it,vt]=w.useState(!1),[mt,Qt]=w.useState(!1),[Ot,Wt]=w.useState(null),[Vt,xr]=w.useState(null),Ht=qr({mutationFn:async({tripId:Ne,data:St})=>await fr(`/api/trips/${Ne}`,{method:"PATCH",body:St}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/driver/mission"]}),br.invalidateQueries({queryKey:["/api/trips"]}),br.invalidateQueries({queryKey:["/api/missions"]}),e({title:"Succès",description:"Action enregistrée avec succès"})},onError:Ne=>{e({variant:"destructive",title:"Erreur",description:Ne.message||"Impossible d'enregistrer l'action"})}}),{data:Yt=[],isLoading:hr,refetch:pr}=Ar({queryKey:["/api/breakdowns",t?.vehicle?.id],queryFn:async()=>{if(!t?.vehicle?.id)return[];const Ne=`/api/breakdowns?vehicleId=${t.vehicle.id}`;return await fr(Ne)},enabled:!!t?.vehicle?.id,staleTime:0,refetchInterval:3e4,refetchOnWindowFocus:!0}),de=qr({mutationFn:async Ne=>{const St=await fetch("/api/breakdowns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ne),credentials:"include"});if(!St.ok){const un=await St.text();throw new Error(`Erreur ${St.status}: ${un}`)}return await St.json()},onSuccess:async Ne=>{c(!1),b(""),I(null),_(null),$&&(URL.revokeObjectURL($),X(null)),L(!1),R(null),t?.vehicle?.id&&(br.invalidateQueries({queryKey:["/api/breakdowns"],exact:!1}),await new Promise(St=>setTimeout(St,100)),await pr()),e({title:"Succès",description:"Problème signalé avec succès"}),c(!1),b(""),I(null),_(null),$&&(URL.revokeObjectURL($),X(null)),L(!1),R(null)},onError:Ne=>{e({variant:"destructive",title:"Erreur",description:Ne.message||"Impossible de signaler le problème"})}}),st=qr({mutationFn:async({id:Ne,breakdown:St})=>{const Zt=await fetch(`/api/breakdowns/${Ne}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(St),credentials:"include"});if(!Zt.ok){const Bn=await Zt.text();throw new Error(`Erreur ${Zt.status}: ${Bn}`)}return await Zt.json()},onSuccess:async()=>{d(!1),m(null),b(""),I(null),_(null),T(null),$&&(URL.revokeObjectURL($),X(null)),P&&(URL.revokeObjectURL(P),O(null)),L(!1),R(null),t?.vehicle?.id&&(br.invalidateQueries({queryKey:["/api/breakdowns"],exact:!1}),await new Promise(Ne=>setTimeout(Ne,100)),await pr()),e({title:"Succès",description:"Problème modifié avec succès"})},onError:Ne=>{e({variant:"destructive",title:"Erreur",description:Ne.message||"Impossible de modifier le problème"})}}),gt=qr({mutationFn:async Ne=>{const St=await fetch(`/api/breakdowns/${Ne}`,{method:"DELETE",credentials:"include"});if(!St.ok){const Zt=await St.text();throw new Error(`Erreur ${St.status}: ${Zt}`)}},onSuccess:async()=>{A(null),t?.vehicle?.id&&(br.invalidateQueries({queryKey:["/api/breakdowns"],exact:!1}),await new Promise(Ne=>setTimeout(Ne,100)),await pr()),e({title:"Succès",description:"Problème supprimé avec succès"})},onError:Ne=>{e({variant:"destructive",title:"Erreur",description:Ne.message||"Impossible de supprimer le problème"})}}),ve=()=>{if(!i)return;const Ne=xe?parseInt(xe):void 0;i&&a.depart({departureOdometerKm:Ne}),ge(!1),Me("")},ce=()=>{t?.vehicle&&(b(""),I(null),_(null),c(!0))},Ge=Ne=>{m(Ne),b(Ne.type),I(null),_(null),T(null),X(Ne.audioUrl||null),P&&(URL.revokeObjectURL(P),O(null)),d(!0)},ie=Ne=>{A(Ne)},at=async()=>{try{if(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia){e({variant:"destructive",title:"Erreur",description:"Votre navigateur ne supporte pas l'enregistrement audio. Veuillez utiliser un navigateur moderne (Chrome, Firefox, Edge)."});return}if(!window.MediaRecorder){e({variant:"destructive",title:"Erreur",description:"Votre navigateur ne supporte pas l'enregistrement audio. Veuillez utiliser un navigateur moderne."});return}const Ne=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),St=["audio/webm","audio/webm;codecs=opus","audio/ogg;codecs=opus","audio/mp4","audio/mpeg"];let Zt="";for(const Sr of St)if(MediaRecorder.isTypeSupported(Sr)){Zt=Sr;break}Zt||(Zt="");const un=Zt?{mimeType:Zt}:{},Bn=new MediaRecorder(Ne,un),dn=[];Bn.ondataavailable=Sr=>{Sr.data.size>0&&dn.push(Sr.data)},Bn.onstop=()=>{const Sr=new Blob(dn,{type:Bn.mimeType||"audio/webm"});_(Sr);const wn=URL.createObjectURL(Sr);X(wn),Ne.getTracks().forEach(qi=>qi.stop()),q&&(clearInterval(q),Y(null)),K(0)},Bn.onerror=Sr=>{console.error("MediaRecorder error:",Sr),e({variant:"destructive",title:"Erreur d'enregistrement",description:"Une erreur s'est produite pendant l'enregistrement. Veuillez réessayer."}),Ne.getTracks().forEach(wn=>wn.stop()),L(!1),R(null)},Bn.start(),R(Bn),L(!0),K(0);const Tn=setInterval(()=>{K(Sr=>Sr+1)},1e3);Y(Tn)}catch(Ne){console.error("Error starting recording:",Ne);let St="Impossible d'accéder au microphone";Ne.name==="NotAllowedError"||Ne.name==="PermissionDeniedError"?St="Permission refusée. Veuillez autoriser l'accès au microphone dans les paramètres de votre navigateur.":Ne.name==="NotFoundError"||Ne.name==="DevicesNotFoundError"?St="Aucun microphone trouvé. Veuillez connecter un microphone et réessayer.":Ne.name==="NotReadableError"||Ne.name==="TrackStartError"?St="Le microphone est déjà utilisé par une autre application. Veuillez fermer les autres applications et réessayer.":Ne.name==="OverconstrainedError"||Ne.name==="ConstraintNotSatisfiedError"?St="Les paramètres audio demandés ne sont pas supportés par votre microphone.":Ne.message&&(St=Ne.message),e({variant:"destructive",title:"Erreur d'accès au microphone",description:St})}},bt=()=>{W&&z&&(W.stop(),L(!1),R(null),q&&(clearInterval(q),Y(null)))},U=()=>{$&&(URL.revokeObjectURL($),X(null)),_(null),K(0),W&&z&&(W.stop(),L(!1),R(null)),q&&(clearInterval(q),Y(null))},Re=async Ne=>{const St=Ne.target.files?.[0];if(St){if(!St.type.startsWith("video/")){e({variant:"destructive",title:"Erreur",description:"Veuillez sélectionner un fichier vidéo"});return}if(St.size>20*1024*1024){e({variant:"destructive",title:"Erreur",description:"La vidéo est trop volumineuse (max 20MB)"});return}try{const Zt=document.createElement("video");Zt.preload="metadata",Zt.src=URL.createObjectURL(St),Zt.onloadedmetadata=()=>{window.URL.revokeObjectURL(Zt.src);const un=Zt.duration;if(un>15){e({variant:"destructive",title:"Erreur",description:`La vidéo est trop longue (${Math.ceil(un)}s). Durée maximum : 15 secondes`});return}if(Zt.videoWidth>1280||Zt.videoHeight>720){e({variant:"destructive",title:"Erreur",description:`La résolution est trop élevée (${Zt.videoWidth}x${Zt.videoHeight}). Maximum : 1280x720 (720p)`});return}T(St),O(URL.createObjectURL(St))},Zt.onerror=()=>{window.URL.revokeObjectURL(Zt.src),e({variant:"destructive",title:"Erreur",description:"Impossible de lire le fichier vidéo"})}}catch{e({variant:"destructive",title:"Erreur",description:"Erreur lors de la validation de la vidéo"})}}},He=()=>{T(null),P&&(URL.revokeObjectURL(P),O(null))},se=async()=>{if(!t?.vehicle||!v){e({variant:"destructive",title:"Erreur",description:"Veuillez sélectionner un type de problème"});return}let Ne,St,Zt,un,Bn,dn;try{if(E){const Sr=await AE(E);Ne=Sr.url,un=Sr.publicId}if(S){const Sr=new File([S],"recording.webm",{type:"audio/webm"}),wn=await KC(Sr);St=wn.url,Bn=wn.publicId}if(B){const Sr=await J8(B);Zt=Sr.url,dn=Sr.publicId}const Tn={vehicleId:t.vehicle.id,type:v,date:new Date().toISOString().split("T")[0],description:void 0,photoUrl:Ne,audioUrl:St,videoUrl:Zt,photoCloudinaryPublicId:un,audioCloudinaryPublicId:Bn,videoCloudinaryPublicId:dn,lieu:void 0};de.mutate(Tn)}catch(Tn){console.error("Error uploading files:",Tn),e({variant:"destructive",title:"Erreur",description:"Erreur lors de l'upload des fichiers"})}},be=async()=>{if(!f||!v){e({variant:"destructive",title:"Erreur",description:"Veuillez sélectionner un type de problème"});return}let Ne=f.photoUrl||void 0,St=f.audioUrl||void 0,Zt=f.videoUrl||void 0,un=f.photoCloudinaryPublicId||void 0,Bn=f.audioCloudinaryPublicId||void 0,dn=f.videoCloudinaryPublicId||void 0;try{if(E){const Sr=await AE(E);Ne=Sr.url,un=Sr.publicId}if(S){const Sr=new File([S],"recording.webm",{type:"audio/webm"}),wn=await KC(Sr);St=wn.url,Bn=wn.publicId}if(B){const Sr=await J8(B);Zt=Sr.url,dn=Sr.publicId}const Tn={type:v,photoUrl:Ne,audioUrl:St,videoUrl:Zt,photoCloudinaryPublicId:un,audioCloudinaryPublicId:Bn,videoCloudinaryPublicId:dn};st.mutate({id:f.id,breakdown:Tn})}catch(Tn){console.error("Error uploading files:",Tn),e({variant:"destructive",title:"Erreur",description:"Erreur lors de l'upload des fichiers"})}},We=()=>{if(!i)return;const Ne=ye?parseInt(ye):void 0;i&&a.arrive({arrivalOdometerKm:Ne}),pe(!1),Ee("")},er=async()=>{if(!i)return;let Ne;if(Xe)try{Ne=(await AE(Xe)).url}catch{e({variant:"destructive",title:"Erreur",description:"Impossible d'uploader la photo du reçu"});return}i&&a.updateFuel({fuelFillAmountL:me?parseFloat(me):null,fuelFillCostFcfa:Ie?parseInt(Ie):null,fuelReceiptUrl:Ne||null}),we(!1),Se(""),Be(""),ke(null)},zt=async()=>{if(!i||!Ye)return;const Ne=parseInt(Ye);if(isNaN(Ne)||Ne<=0){e({variant:"destructive",title:"Erreur",description:"Veuillez saisir un montant valide"});return}e({title:"Succès",description:`Avance de ${Ne.toLocaleString()} FCFA enregistrée`}),Le(!1),Oe("")},Te=async()=>{if(!i)return;let Ne=i.loadingWeighingTicketUrl||void 0;if(Ot)try{Ne=(await OO(Ot)).url}catch{e({variant:"destructive",title:"Erreur",description:"Impossible d'uploader le ticket de pesée"});return}i.loadingCompletedAt?Ht.mutate({tripId:i.id,data:{loadingWeighingTicketUrl:Ne||null}}):a.confirmLoading({loadingWeighingTicketUrl:Ne}),vt(!1),Wt(null)},jt=async()=>{if(!i)return;let Ne=i.unloadingWeighingTicketUrl||void 0;if(Vt)try{Ne=(await Qle(Vt)).url}catch{e({variant:"destructive",title:"Erreur",description:"Impossible d'uploader le ticket de pesée"});return}i.unloadingCompletedAt?Ht.mutate({tripId:i.id,data:{unloadingWeighingTicketUrl:Ne||null}}):a.confirmUnloading({unloadingWeighingTicketUrl:Ne}),Qt(!1),xr(null)};if(r)return o.jsx("div",{className:"flex items-center justify-center min-h-screen",children:o.jsx(wr,{className:"h-12 w-12 animate-spin text-primary"})});if(n||!t)return o.jsxs("div",{className:"flex flex-col items-center justify-center min-h-screen p-4 md:p-6 text-center",children:[o.jsx(Do,{className:"h-20 w-20 md:h-24 md:w-24 text-muted-foreground mb-4"}),o.jsx("h1",{className:"text-xl md:text-2xl font-bold mb-2",children:"Aucune mission active"}),o.jsx("p",{className:"text-sm md:text-base text-muted-foreground",children:"Vous n'avez pas de mission en cours pour le moment."})]});const $r=i?.dateDepart,Br=i?.dateArrivee,rr=Ne=>{const St=Math.floor(Ne/60),Zt=Ne%60;return`${St.toString().padStart(2,"0")}:${Zt.toString().padStart(2,"0")}`};return o.jsxs("div",{className:"min-h-screen bg-background pb-32 md:pb-40",children:[o.jsxs("div",{className:"bg-primary text-primary-foreground p-4 md:p-6 text-center",children:[o.jsx("h1",{className:"text-xl md:text-2xl font-bold mb-1",children:"Mission"}),o.jsx("p",{className:"text-sm md:text-base opacity-90",children:t.code})]}),o.jsxs("div",{className:"p-4 md:p-6 space-y-5 max-w-2xl mx-auto",children:[o.jsx(_t,{children:o.jsxs(ar,{className:"p-4 md:p-6",children:[t.mainDriver&&o.jsxs("div",{className:"flex flex-col items-center mb-4",children:[t.mainDriver.photoUrl?o.jsx("img",{src:hn(t.mainDriver.photoUrl)||void 0,alt:`${t.mainDriver.prenom} ${t.mainDriver.nom}`,className:"w-24 h-24 md:w-28 md:h-28 rounded-full object-cover border-4 border-primary/20 mb-3"}):o.jsx("div",{className:"w-24 h-24 md:w-28 md:h-28 rounded-full bg-muted flex items-center justify-center border-4 border-primary/20 mb-3",children:o.jsx(Uf,{className:"h-12 w-12 md:h-14 md:w-14 text-muted-foreground"})}),o.jsxs("p",{className:"font-bold text-lg md:text-xl mb-1",children:[t.mainDriver.prenom," ",t.mainDriver.nom]}),o.jsx(ir,{className:"bg-primary text-primary-foreground",children:"Chauffeur"})]}),t.additionalCrew&&t.additionalCrew.length>0&&o.jsx("div",{className:"border-t pt-4 space-y-3",children:t.additionalCrew.map(Ne=>o.jsxs("div",{className:"flex items-center gap-3",children:[Ne.photoUrl?o.jsx("img",{src:hn(Ne.photoUrl)||void 0,alt:`${Ne.prenom} ${Ne.nom}`,className:"w-14 h-14 rounded-full object-cover border-2"}):o.jsx("div",{className:"w-14 h-14 rounded-full bg-muted flex items-center justify-center border-2",children:o.jsx(Uf,{className:"h-7 w-7 text-muted-foreground"})}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("p",{className:"font-semibold text-base",children:[Ne.prenom," ",Ne.nom]}),o.jsx(ir,{variant:"outline",className:"text-xs",children:"Apprenti"})]})]},Ne.id))})]})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3 md:gap-4",children:[o.jsx(_t,{className:"overflow-hidden",children:o.jsxs(ar,{className:"p-0",children:[t.vehicle?.photoUrl?o.jsx("img",{src:hn(t.vehicle.photoUrl)||void 0,alt:t.vehicle.immatriculation,className:"w-full h-40 md:h-48 object-cover"}):o.jsxs("div",{className:"w-full h-40 md:h-48 bg-muted flex flex-col items-center justify-center",children:[o.jsx(Do,{className:"h-16 w-16 md:h-20 md:w-20 text-muted-foreground mb-2"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Véhicule"})]}),o.jsx("div",{className:"p-3 text-center bg-background",children:o.jsx("p",{className:"font-mono font-bold text-sm md:text-base",children:t.vehicle?.immatriculation||"—"})})]})}),t.trailer?o.jsx(_t,{className:"overflow-hidden",children:o.jsxs(ar,{className:"p-0",children:[t.trailer.photoUrl?o.jsx("img",{src:hn(t.trailer.photoUrl)||void 0,alt:t.trailer.numeroChassis,className:"w-full h-40 md:h-48 object-cover"}):o.jsxs("div",{className:"w-full h-40 md:h-48 bg-muted flex flex-col items-center justify-center",children:[o.jsx(uo,{className:"h-16 w-16 md:h-20 md:w-20 text-muted-foreground mb-2"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Remorque"})]}),o.jsx("div",{className:"p-3 text-center bg-background",children:o.jsx("p",{className:"font-mono font-bold text-sm md:text-base",children:t.trailer.numeroChassis})})]})}):o.jsx(_t,{className:"overflow-hidden",children:o.jsx(ar,{className:"p-0",children:o.jsxs("div",{className:"w-full h-40 md:h-48 bg-muted flex flex-col items-center justify-center",children:[o.jsx(uo,{className:"h-16 w-16 md:h-20 md:w-20 text-muted-foreground mb-2"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Pas de remorque"})]})})})]}),o.jsx(_t,{className:"bg-gradient-to-r from-primary/5 to-primary/10",children:o.jsx(ar,{className:"p-4 md:p-6",children:o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[o.jsx("div",{className:"flex-shrink-0 w-10 h-10 md:w-12 md:h-12 rounded-full bg-primary/20 flex items-center justify-center",children:o.jsx(rs,{className:"h-5 w-5 md:h-6 md:w-6 text-primary"})}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"font-bold text-sm md:text-base truncate",children:t.loadingSite}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Départ"})]})]}),o.jsx(BC,{className:"h-6 w-6 md:h-8 md:w-8 text-primary flex-shrink-0"}),o.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[o.jsx("div",{className:"flex-shrink-0 w-10 h-10 md:w-12 md:h-12 rounded-full bg-primary/20 flex items-center justify-center",children:o.jsx(rs,{className:"h-5 w-5 md:h-6 md:w-6 text-primary"})}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"font-bold text-sm md:text-base truncate",children:t.unloadingSite}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Arrivée"})]})]})]})})}),o.jsx(_t,{children:o.jsxs(ar,{className:"p-4 md:p-5 text-center",children:[o.jsx(uo,{className:"h-10 w-10 md:h-12 md:w-12 text-primary mx-auto mb-2"}),o.jsx("p",{className:"font-bold text-base md:text-lg",children:t.loadingType})]})}),t.loadingBonImageUrl?o.jsx(_t,{children:o.jsxs(ar,{className:"p-4",children:[o.jsxs("div",{className:"text-center mb-3",children:[o.jsx(ng,{className:"h-8 w-8 text-primary mx-auto mb-2"}),o.jsx("p",{className:"font-semibold",children:"Bon de chargement"}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:["N° ",t.loadingOrderNumber]})]}),o.jsxs("div",{className:"relative group",children:[o.jsx("img",{src:t.loadingBonImageUrl,alt:"Bon de chargement",className:"w-full h-auto rounded-lg border cursor-pointer hover:opacity-90 transition-opacity",onClick:()=>window.open(t.loadingBonImageUrl,"_blank")}),o.jsx(Pe,{variant:"ghost",size:"icon",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity bg-background/80",onClick:()=>window.open(t.loadingBonImageUrl,"_blank"),children:o.jsx(D0,{className:"h-4 w-4"})})]})]})}):o.jsx(_t,{children:o.jsxs(ar,{className:"p-4 text-center",children:[o.jsx(ng,{className:"h-8 w-8 text-muted-foreground mx-auto mb-2"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Bon de chargement non disponible"})]})}),i&&o.jsx(_t,{children:o.jsx(ar,{className:"p-4 md:p-6",children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(_C,{className:"h-6 w-6 md:h-7 md:w-7 text-primary"}),o.jsxs("div",{children:[o.jsx("p",{className:"font-bold text-base md:text-lg",children:"Carburant"}),i.departureOdometerKm&&i.arrivalOdometerKm&&o.jsxs("p",{className:"text-xs text-muted-foreground",children:[i.arrivalOdometerKm-i.departureOdometerKm," km parcourus"]})]})]}),o.jsxs(Pe,{variant:"outline",onClick:()=>we(!0),disabled:!i||a.isUpdatingFuel,children:[o.jsx(_C,{className:"h-4 w-4 mr-2"}),"J'ai fait le plein"]})]}),(i.fuelFillCostFcfa||i.fuelFillAmountL||i.fuelReceiptUrl||i.departureOdometerKm||i.arrivalOdometerKm)&&o.jsxs("div",{className:"border-t pt-4 space-y-2",children:[i.departureOdometerKm&&o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-muted-foreground",children:"Km départ:"}),o.jsxs("span",{className:"font-semibold",children:[i.departureOdometerKm," km"]})]}),i.arrivalOdometerKm&&o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-muted-foreground",children:"Km arrivée:"}),o.jsxs("span",{className:"font-semibold",children:[i.arrivalOdometerKm," km"]})]}),i.fuelFillCostFcfa&&o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-muted-foreground",children:"Coût:"}),o.jsxs("span",{className:"font-semibold",children:[i.fuelFillCostFcfa," FCFA"]})]}),i.fuelFillAmountL&&o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-muted-foreground",children:"Litres:"}),o.jsxs("span",{className:"font-semibold",children:[i.fuelFillAmountL," L"]})]}),i.fuelReceiptUrl&&o.jsx("div",{className:"mt-2",children:o.jsx("img",{src:i.fuelReceiptUrl,alt:"Reçu carburant",className:"w-full h-32 object-cover rounded-lg border cursor-pointer hover:opacity-90 transition-opacity",onClick:()=>window.open(i.fuelReceiptUrl,"_blank")})})]}),o.jsx("div",{className:"border-t pt-4",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(bx,{className:"h-6 w-6 md:h-7 md:w-7 text-primary"}),o.jsx("div",{children:o.jsx("p",{className:"font-bold text-base md:text-lg",children:"Frais de route"})})]}),o.jsxs(Pe,{variant:"outline",onClick:()=>Le(!0),disabled:!i,children:[o.jsx(bx,{className:"h-4 w-4 mr-2"}),"Renseigner l'avance"]})]})})]})})}),o.jsx(_t,{children:o.jsxs(ar,{className:"p-4 md:p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Vp,{className:"h-6 w-6 md:h-8 md:w-8 text-orange-600"}),o.jsx("p",{className:"font-semibold text-base md:text-lg",children:"Problèmes signalés"})]}),o.jsx(ir,{variant:"outline",className:"text-xs",children:Yt.length})]}),hr?o.jsx("div",{className:"flex justify-center py-8",children:o.jsx(wr,{className:"h-6 w-6 animate-spin text-primary"})}):Yt.length===0?o.jsxs("div",{className:"text-center py-8",children:[o.jsx(Vp,{className:"h-12 w-12 text-muted-foreground mx-auto mb-2 opacity-50"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Aucun problème signalé"})]}):o.jsx("div",{className:"space-y-4",children:Yt.filter(Ne=>Ne&&Ne.type).map(Ne=>{const St=h8.find(un=>un.value===Ne.type),Zt=St?.icon||yx;return o.jsx(_t,{className:"overflow-hidden border-2 border-orange-200 dark:border-orange-800",children:o.jsx(ar,{className:"p-4",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"flex-shrink-0",children:o.jsx("div",{className:"w-16 h-16 md:w-20 md:h-20 rounded-full bg-orange-100 dark:bg-orange-900/30 flex items-center justify-center",children:o.jsx(Zt,{className:"h-8 w-8 md:h-10 md:w-10 text-orange-600 dark:text-orange-400"})})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[o.jsx("p",{className:"font-bold text-base md:text-lg",children:St?.label||Ne.type}),Ne.status&&o.jsx(ir,{variant:"outline",className:Ne.status==="pending"?"border-orange-500 text-orange-600 bg-orange-50 dark:bg-orange-950":Ne.status==="in_progress"?"border-blue-500 text-blue-600 bg-blue-50 dark:bg-blue-950":"border-green-500 text-green-600 bg-green-50 dark:bg-green-950",children:Ne.status==="pending"?"En attente":Ne.status==="in_progress"?"En cours":"Pris en charge"})]}),Ne.date&&o.jsx("p",{className:"text-xs text-muted-foreground",children:Kr(new Date(Ne.date),"dd/MM/yyyy",{locale:tn})})]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Pe,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:()=>Ge(Ne),disabled:st.isPending||gt.isPending,children:o.jsx(Lf,{className:"h-4 w-4"})}),o.jsx(Pe,{variant:"ghost",size:"icon",className:"h-9 w-9 text-destructive hover:text-destructive",onClick:()=>ie(Ne.id),disabled:st.isPending||gt.isPending,children:o.jsx(fo,{className:"h-4 w-4"})})]})]}),Ne.responseAudioUrl&&o.jsxs("div",{className:"mt-3 p-3 bg-blue-50 dark:bg-blue-950/30 rounded-lg border border-blue-200 dark:border-blue-800",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(bd,{className:"h-4 w-4 text-blue-600 dark:text-blue-400"}),o.jsx("p",{className:"text-sm font-semibold text-blue-900 dark:text-blue-100",children:"Message du bureau"}),Ne.responseCreatedAt&&o.jsx("span",{className:"text-xs text-blue-600 dark:text-blue-400",children:Kr(new Date(Ne.responseCreatedAt),"dd/MM/yyyy HH:mm",{locale:tn})})]}),o.jsxs("audio",{controls:!0,className:"w-full h-10",children:[o.jsx("source",{src:Ne.responseAudioUrl,type:"audio/webm"}),o.jsx("source",{src:Ne.responseAudioUrl,type:"audio/mpeg"}),"Votre navigateur ne supporte pas l'élément audio."]})]}),Ne.photoUrl&&o.jsx("div",{className:"mt-3",children:o.jsx("img",{src:hn(Ne.photoUrl)||void 0,alt:"Photo du problème",className:"w-full h-32 md:h-40 object-cover rounded-lg border cursor-pointer hover:opacity-90 transition-opacity",onClick:()=>window.open(hn(Ne.photoUrl)||"","_blank")})}),Ne.videoUrl&&o.jsx("div",{className:"mt-3",children:o.jsxs("video",{controls:!0,className:"w-full h-32 md:h-40 object-cover rounded-lg border",children:[o.jsx("source",{src:Ne.videoUrl,type:"video/mp4"}),o.jsx("source",{src:Ne.videoUrl,type:"video/webm"}),o.jsx("source",{src:Ne.videoUrl,type:"video/quicktime"}),"Votre navigateur ne supporte pas l'élément vidéo."]})}),Ne.audioUrl&&o.jsx("div",{className:"mt-3",children:o.jsxs("audio",{controls:!0,className:"w-full h-10",children:[o.jsx("source",{src:Ne.audioUrl,type:"audio/webm"}),o.jsx("source",{src:Ne.audioUrl,type:"audio/mpeg"}),"Votre navigateur ne supporte pas l'élément audio."]})})]})]})})},Ne.id)})})]})}),i&&o.jsxs(o.Fragment,{children:[o.jsx(_t,{className:i.loadingCompletedAt?"border-green-500":"",children:o.jsxs(ar,{className:"p-4 md:p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"flex-shrink-0 w-12 h-12 md:w-14 md:h-14 rounded-full bg-primary/20 flex items-center justify-center",children:o.jsx(uo,{className:"h-6 w-6 md:h-7 md:w-7 text-primary"})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-bold text-base md:text-lg",children:"Chargement"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:t.loadingSite})]})]}),i.loadingCompletedAt?o.jsxs(ir,{className:"bg-green-600 text-white",children:[o.jsx(es,{className:"h-3 w-3 mr-1"}),"Ok – ",Kr(new Date(i.loadingCompletedAt),"HH:mm",{locale:tn})]}):o.jsxs(Pe,{onClick:()=>{Wt(null),vt(!0)},disabled:!i||a.isConfirmingLoading,className:"bg-purple-600 hover:bg-purple-700 text-white",children:[o.jsx(n4,{className:"h-4 w-4 mr-2"}),"Chargement terminé"]})]}),i.loadingWeighingTicketUrl&&o.jsxs("div",{className:"mt-3 space-y-2",children:[o.jsxs("div",{className:"relative group",children:[o.jsx("img",{src:i.loadingWeighingTicketUrl,alt:"Ticket de pesée de chargement",className:"w-full h-32 object-cover rounded-lg border cursor-pointer hover:opacity-90 transition-opacity",onClick:()=>window.open(i.loadingWeighingTicketUrl,"_blank")}),o.jsx(Pe,{variant:"ghost",size:"icon",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity bg-background/80",onClick:()=>window.open(i.loadingWeighingTicketUrl,"_blank"),children:o.jsx(D0,{className:"h-4 w-4"})})]}),o.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>{Wt(null),vt(!0)},className:"w-full",children:[o.jsx(Lf,{className:"h-4 w-4 mr-2"}),"Remplacer le ticket"]})]}),i.loadingCompletedAt&&!i.loadingWeighingTicketUrl&&o.jsx("div",{className:"mt-3",children:o.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>{Wt(null),vt(!0)},className:"w-full",children:[o.jsx(_u,{className:"h-4 w-4 mr-2"}),"Ajouter le ticket de pesée"]})})]})}),o.jsx(_t,{className:i.unloadingCompletedAt?"border-green-500":"",children:o.jsxs(ar,{className:"p-4 md:p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"flex-shrink-0 w-12 h-12 md:w-14 md:h-14 rounded-full bg-primary/20 flex items-center justify-center",children:o.jsx(uo,{className:"h-6 w-6 md:h-7 md:w-7 text-primary"})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-bold text-base md:text-lg",children:"Déchargement"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:t.unloadingSite})]})]}),i.unloadingCompletedAt?o.jsxs(ir,{className:"bg-green-600 text-white",children:[o.jsx(es,{className:"h-3 w-3 mr-1"}),"Ok – ",Kr(new Date(i.unloadingCompletedAt),"HH:mm",{locale:tn})]}):o.jsxs(Pe,{onClick:()=>{xr(null),Qt(!0)},disabled:!i||a.isConfirmingUnloading,className:"bg-purple-600 hover:bg-purple-700 text-white",children:[o.jsx(n4,{className:"h-4 w-4 mr-2"}),"Déchargement terminé"]})]}),i.unloadingWeighingTicketUrl&&o.jsxs("div",{className:"mt-3 space-y-2",children:[o.jsxs("div",{className:"relative group",children:[o.jsx("img",{src:i.unloadingWeighingTicketUrl,alt:"Ticket de pesée de déchargement",className:"w-full h-32 object-cover rounded-lg border cursor-pointer hover:opacity-90 transition-opacity",onClick:()=>window.open(i.unloadingWeighingTicketUrl,"_blank")}),o.jsx(Pe,{variant:"ghost",size:"icon",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity bg-background/80",onClick:()=>window.open(i.unloadingWeighingTicketUrl,"_blank"),children:o.jsx(D0,{className:"h-4 w-4"})})]}),o.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>{xr(null),Qt(!0)},className:"w-full",children:[o.jsx(Lf,{className:"h-4 w-4 mr-2"}),"Remplacer le ticket"]})]}),i.unloadingCompletedAt&&!i.unloadingWeighingTicketUrl&&o.jsx("div",{className:"mt-3",children:o.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>{xr(null),Qt(!0)},className:"w-full",children:[o.jsx(_u,{className:"h-4 w-4 mr-2"}),"Ajouter le ticket de pesée"]})})]})})]})]}),o.jsxs("div",{className:"fixed bottom-0 left-0 right-0 bg-background border-t p-4 md:p-6 space-y-3 z-50 shadow-lg",children:[i&&o.jsxs(Pe,{size:"lg",variant:"outline",className:"w-full h-14 md:h-16 text-base md:text-lg border-2 border-orange-500 text-orange-600 hover:bg-orange-50 dark:hover:bg-orange-950 font-semibold bg-white dark:bg-background",onClick:ce,disabled:de.isPending,children:[o.jsx(Vp,{className:"h-6 w-6 md:h-7 md:w-7 mr-2"}),"Signaler un problème"]}),i&&$r&&!Br&&o.jsxs(Pe,{size:"lg",className:"w-full h-14 md:h-16 text-base md:text-lg bg-blue-600 hover:bg-blue-700 text-white font-semibold",onClick:We,disabled:Ht.isPending,children:[o.jsx(n4,{className:"h-6 w-6 md:h-7 md:w-7 mr-2"}),"Arrivée effectuée"]})]}),o.jsx(ci,{open:l,onOpenChange:Ne=>{c(Ne),Ne||(b(""),I(null),_(null),T(null),K(0),$&&(URL.revokeObjectURL($),X(null)),P&&(URL.revokeObjectURL(P),O(null)),z&&W&&(W.stop(),L(!1),R(null)),q&&(clearInterval(q),Y(null)))},children:o.jsxs(Zn,{className:"sm:max-w-[500px] mx-4 max-h-[90vh] overflow-y-auto",children:[o.jsx(Jn,{children:o.jsx(Xn,{className:"text-xl md:text-2xl text-center",children:"Signaler un problème"})}),o.jsxs("div",{className:"space-y-6 py-4",children:[o.jsx("div",{children:o.jsx("div",{className:"grid grid-cols-2 gap-3 md:gap-4",children:h8.map(Ne=>{const St=Ne.icon,Zt=v===Ne.value;return o.jsxs(Pe,{type:"button",variant:Zt?"default":"outline",className:`h-24 md:h-28 flex-col gap-2 rounded-xl transition-all ${Zt?"ring-4 ring-primary/30 shadow-lg scale-105":"hover:scale-105"}`,onClick:()=>b(Ne.value),children:[o.jsx(St,{className:`h-8 w-8 md:h-10 md:w-10 ${Zt?"text-primary-foreground":"text-primary"}`}),o.jsx("span",{className:`text-xs md:text-sm font-semibold ${Zt?"text-primary-foreground":""}`,children:Ne.label})]},Ne.value)})})}),o.jsx("div",{children:E?o.jsxs("div",{className:"space-y-3",children:[o.jsx("img",{src:URL.createObjectURL(E),alt:"Aperçu",className:"w-full h-48 md:h-64 object-cover rounded-xl border-2"}),o.jsxs(Pe,{variant:"outline",size:"lg",onClick:()=>I(null),className:"w-full",children:[o.jsx(fo,{className:"h-4 w-4 mr-2"}),"Supprimer la photo"]})]}):o.jsxs("label",{htmlFor:"breakdown-photo",className:"block w-full border-2 border-dashed border-muted-foreground/30 rounded-xl p-8 md:p-12 text-center cursor-pointer hover:border-primary/50 transition-colors",children:[o.jsx(_u,{className:"h-12 w-12 md:h-16 md:w-16 text-muted-foreground mx-auto mb-3"}),o.jsx("p",{className:"text-sm md:text-base font-medium",children:"Prendre une photo"}),o.jsx(wt,{id:"breakdown-photo",type:"file",accept:"image/*",capture:"environment",onChange:Ne=>{const St=Ne.target.files?.[0];St&&I(St)},className:"hidden"})]})}),o.jsxs("div",{className:"space-y-4",children:[!$&&!z&&o.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[o.jsx("button",{type:"button",onClick:at,disabled:!s(),className:"w-24 h-24 md:w-28 md:h-28 rounded-full bg-white dark:bg-background border-4 border-primary/30 flex items-center justify-center cursor-pointer hover:border-primary/50 transition-all hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed animate-pulse",children:o.jsx(bd,{className:"h-10 w-10 md:h-12 md:w-12 text-primary"})}),o.jsx("p",{className:"text-sm md:text-base font-medium",children:"Appuie pour parler"}),!s()&&o.jsx("p",{className:"text-xs text-orange-600 dark:text-orange-400 text-center",children:"⚠️ HTTPS requis pour l'enregistrement"})]}),z&&o.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[o.jsx("button",{type:"button",onClick:bt,className:"w-28 h-28 md:w-32 md:h-32 rounded-full bg-red-600 flex items-center justify-center cursor-pointer hover:bg-red-700 transition-all hover:scale-105 active:scale-95 shadow-lg ring-4 ring-red-200 dark:ring-red-900/50 animate-pulse",children:o.jsx(uP,{className:"h-12 w-12 md:h-14 md:w-14 text-white"})}),o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"text-lg md:text-xl font-bold text-red-600 mb-1",children:rr(Z)}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Enregistrement en cours..."})]})]}),$&&!z&&o.jsxs("div",{className:"space-y-4",children:[o.jsx("div",{className:"bg-muted/50 rounded-xl p-4",children:o.jsxs("audio",{controls:!0,className:"w-full h-12",children:[o.jsx("source",{src:$,type:"audio/webm"}),o.jsx("source",{src:$,type:"audio/mpeg"})]})}),o.jsxs("div",{className:"flex gap-3",children:[o.jsxs(Pe,{variant:"outline",size:"lg",onClick:U,className:"flex-1",children:[o.jsx(fo,{className:"h-4 w-4 mr-2"}),"Supprimer"]}),o.jsxs(Pe,{variant:"outline",size:"lg",onClick:at,className:"flex-1",disabled:!s(),children:[o.jsx(bd,{className:"h-4 w-4 mr-2"}),"Réenregistrer"]})]})]})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium mb-2 text-center",children:"Vidéo (optionnel - max 15s, 720p)"}),B?o.jsxs("div",{className:"space-y-3",children:[o.jsx("video",{src:P||void 0,controls:!0,className:"w-full h-48 md:h-64 object-cover rounded-xl border-2"}),o.jsxs(Pe,{variant:"outline",size:"lg",onClick:He,className:"w-full",children:[o.jsx(fo,{className:"h-4 w-4 mr-2"}),"Supprimer la vidéo"]})]}):o.jsxs("label",{htmlFor:"breakdown-video",className:"block w-full border-2 border-dashed border-muted-foreground/30 rounded-xl p-8 md:p-12 text-center cursor-pointer hover:border-primary/50 transition-colors",children:[o.jsx(Q2,{className:"h-12 w-12 md:h-16 md:w-16 text-muted-foreground mx-auto mb-3"}),o.jsx("p",{className:"text-sm md:text-base font-medium",children:"Ajouter une vidéo"}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Max 15 secondes, résolution 720p"}),o.jsx(wt,{id:"breakdown-video",type:"file",accept:"video/*",capture:"environment",onChange:Re,className:"hidden"})]})]})]}),o.jsxs(ji,{className:"gap-3 flex-col sm:flex-row pt-4 border-t",children:[o.jsx(Pe,{variant:"outline",onClick:()=>c(!1),className:"w-full sm:w-auto h-12",children:"Annuler"}),o.jsx(Pe,{onClick:se,className:"bg-orange-600 hover:bg-orange-700 w-full sm:w-auto h-12 text-base font-semibold",disabled:!v||de.isPending,children:de.isPending?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Envoi..."]}):"Signaler"})]})]})}),o.jsx(ci,{open:u,onOpenChange:d,children:o.jsxs(Zn,{className:"sm:max-w-[500px] mx-4 max-h-[90vh] overflow-y-auto",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{className:"text-xl md:text-2xl text-center",children:"Modifier le problème"}),o.jsx(Ci,{className:"text-center text-sm md:text-base",children:"Modifiez les informations du problème signalé"})]}),o.jsxs("div",{className:"space-y-4 md:space-y-6 py-4",children:[o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm md:text-base mb-2 block",children:"Type de problème *"}),o.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2 md:gap-3",children:h8.map(Ne=>{const St=Ne.icon;return o.jsxs(Pe,{type:"button",variant:v===Ne.value?"default":"outline",onClick:()=>b(Ne.value),className:"h-auto py-3 md:py-4 flex flex-col items-center gap-2",children:[o.jsx(St,{className:"h-5 w-5 md:h-6 md:w-6"}),o.jsx("span",{className:"text-xs md:text-sm",children:Ne.label})]},Ne.value)})})]}),o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm md:text-base mb-2 block",children:"Photo (optionnel)"}),f?.photoUrl&&!E&&o.jsxs("div",{className:"mb-2",children:[o.jsx("img",{src:hn(f.photoUrl)||void 0,alt:"Photo actuelle",className:"max-w-full h-32 object-cover rounded-lg mx-auto"}),o.jsx("p",{className:"text-xs text-muted-foreground text-center mt-1",children:"Photo actuelle"})]}),o.jsx("input",{type:"file",accept:"image/*",capture:"environment",id:"edit-breakdown-photo",onChange:Ne=>{const St=Ne.target.files?.[0];St&&I(St)},className:"hidden"}),o.jsxs(Pe,{variant:"outline",onClick:()=>document.getElementById("edit-breakdown-photo")?.click(),className:"mt-2",children:[o.jsx(_u,{className:"h-4 w-4 mr-2"}),f?.photoUrl?"Remplacer la photo":"Prendre une photo"]}),E&&o.jsxs("div",{className:"mt-3",children:[o.jsx("img",{src:URL.createObjectURL(E),alt:"Aperçu",className:"max-w-full h-32 object-cover rounded-lg mx-auto"}),o.jsx(Pe,{variant:"ghost",size:"sm",onClick:()=>I(null),className:"mt-2 text-xs",children:"Supprimer la photo"})]})]}),o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm md:text-base mb-2 block",children:"Description audio (optionnel)"}),f?.audioUrl&&!$&&!S&&o.jsxs("div",{className:"mb-2",children:[o.jsx("audio",{src:f.audioUrl,controls:!0,className:"w-full"}),o.jsx("p",{className:"text-xs text-muted-foreground text-center mt-1",children:"Audio actuel"})]}),o.jsxs("div",{className:"border-2 border-dashed rounded-lg p-4 md:p-6 text-center space-y-3",children:[!$&&!z&&o.jsxs(o.Fragment,{children:[o.jsx(bd,{className:"h-10 w-10 md:h-12 md:w-12 text-muted-foreground mx-auto mb-2"}),o.jsx("p",{className:"text-xs md:text-sm text-muted-foreground mb-3",children:"Enregistrez une nouvelle description vocale"}),!s()&&o.jsx("p",{className:"text-xs text-orange-600 dark:text-orange-400 mb-2",children:"⚠️ L'enregistrement audio nécessite HTTPS ou localhost."}),o.jsxs(Pe,{variant:"outline",onClick:at,className:"w-full",disabled:!s(),children:[o.jsx(bd,{className:"h-4 w-4 mr-2"}),"Démarrer l'enregistrement"]})]}),z&&o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-center gap-2",children:[o.jsx("div",{className:"h-3 w-3 bg-red-600 rounded-full animate-pulse"}),o.jsx("p",{className:"text-sm font-semibold text-red-600",children:"Enregistrement en cours..."})]}),o.jsxs(Pe,{variant:"destructive",onClick:bt,className:"w-full",children:[o.jsx(C3,{className:"h-4 w-4 mr-2"}),"Arrêter l'enregistrement"]})]}),$&&!z&&o.jsxs("div",{className:"space-y-3",children:[o.jsx("audio",{src:$,controls:!0,className:"w-full"}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Pe,{variant:"outline",onClick:U,className:"flex-1",children:"Supprimer"}),o.jsx(Pe,{variant:"outline",onClick:at,className:"flex-1",children:"Réenregistrer"})]})]})]})]}),o.jsxs("div",{children:[o.jsx(Je,{className:"text-sm md:text-base mb-2 block",children:"Vidéo (optionnel - max 15s, 720p)"}),f?.videoUrl&&!B&&o.jsxs("div",{className:"mb-2",children:[o.jsx("video",{src:f.videoUrl,controls:!0,className:"max-w-full h-32 object-cover rounded-lg mx-auto"}),o.jsx("p",{className:"text-xs text-muted-foreground text-center mt-1",children:"Vidéo actuelle"})]}),o.jsx("input",{type:"file",accept:"video/*",capture:"environment",id:"edit-breakdown-video",onChange:Re,className:"hidden"}),o.jsxs(Pe,{variant:"outline",onClick:()=>document.getElementById("edit-breakdown-video")?.click(),className:"mt-2",children:[o.jsx(Q2,{className:"h-4 w-4 mr-2"}),f?.videoUrl?"Remplacer la vidéo":"Ajouter une vidéo"]}),B&&o.jsxs("div",{className:"mt-3",children:[o.jsx("video",{src:P||void 0,controls:!0,className:"max-w-full h-32 object-cover rounded-lg mx-auto"}),o.jsx(Pe,{variant:"ghost",size:"sm",onClick:He,className:"mt-2 text-xs",children:"Supprimer la vidéo"})]})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{variant:"outline",onClick:()=>{d(!1),m(null),b(""),I(null),_(null),T(null),$&&(URL.revokeObjectURL($),X(null)),P&&(URL.revokeObjectURL(P),O(null))},className:"w-full sm:w-auto",children:"Annuler"}),o.jsx(Pe,{onClick:be,className:"bg-orange-600 hover:bg-orange-700 w-full sm:w-auto",disabled:!v||st.isPending,children:st.isPending?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Modification..."]}):"Modifier"})]})]})}),o.jsx(ci,{open:ne,onOpenChange:ge,children:o.jsxs(Zn,{className:"sm:max-w-[400px] mx-4",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{className:"text-xl md:text-2xl text-center",children:"Départ"}),o.jsx(Ci,{className:"text-center text-sm md:text-base",children:"Enregistrez votre départ et le kilométrage"})]}),o.jsx("div",{className:"py-4 space-y-4",children:o.jsxs("div",{children:[o.jsx(Je,{htmlFor:"departure-odometer",className:"text-sm md:text-base",children:"Kilométrage départ (optionnel)"}),o.jsx(wt,{id:"departure-odometer",type:"number",placeholder:"Ex: 125000",value:xe,onChange:Ne=>Me(Ne.target.value),className:"mt-2"})]})}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{variant:"outline",onClick:()=>{ge(!1),Me("")},className:"w-full sm:w-auto",children:"Annuler"}),o.jsx(Pe,{onClick:ve,className:"bg-blue-600 hover:bg-blue-700 w-full sm:w-auto",disabled:!i||a.isDeparting,children:a.isDeparting?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Enregistrement..."]}):"Confirmer"})]})]})}),o.jsx(ci,{open:ae,onOpenChange:pe,children:o.jsxs(Zn,{className:"sm:max-w-[400px] mx-4",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{className:"text-xl md:text-2xl text-center",children:"Arrivée"}),o.jsx(Ci,{className:"text-center text-sm md:text-base",children:"Enregistrez votre arrivée et le kilométrage"})]}),o.jsx("div",{className:"py-4 space-y-4",children:o.jsxs("div",{children:[o.jsx(Je,{htmlFor:"arrival-odometer",className:"text-sm md:text-base",children:"Kilométrage arrivée (optionnel)"}),o.jsx(wt,{id:"arrival-odometer",type:"number",placeholder:"Ex: 125350",value:ye,onChange:Ne=>Ee(Ne.target.value),className:"mt-2"})]})}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{variant:"outline",onClick:()=>{pe(!1),Ee("")},className:"w-full sm:w-auto",children:"Annuler"}),o.jsx(Pe,{onClick:We,className:"bg-blue-600 hover:bg-blue-700 w-full sm:w-auto",disabled:!i||a.isArriving,children:a.isArriving?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Enregistrement..."]}):"Confirmer"})]})]})}),o.jsx(ci,{open:_e,onOpenChange:we,children:o.jsxs(Zn,{className:"sm:max-w-[400px] mx-4",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{className:"text-xl md:text-2xl text-center",children:"Plein de carburant"}),o.jsx(Ci,{className:"text-center text-sm md:text-base",children:"Enregistrez les informations de votre plein"})]}),o.jsxs("div",{className:"py-4 space-y-4",children:[o.jsxs("div",{children:[o.jsx(Je,{htmlFor:"fuel-cost",className:"text-sm md:text-base",children:"Montant (FCFA) *"}),o.jsx(wt,{id:"fuel-cost",type:"number",placeholder:"Ex: 50000",value:Ie,onChange:Ne=>Be(Ne.target.value),className:"mt-2"})]}),o.jsxs("div",{children:[o.jsx(Je,{htmlFor:"fuel-amount",className:"text-sm md:text-base",children:"Litres (optionnel)"}),o.jsx(wt,{id:"fuel-amount",type:"number",step:"0.1",placeholder:"Ex: 50.5",value:me,onChange:Ne=>Se(Ne.target.value),className:"mt-2"})]}),o.jsxs("div",{children:[o.jsx(Je,{htmlFor:"fuel-receipt",className:"text-sm md:text-base mb-2 block",children:"Photo du reçu (optionnel)"}),o.jsx("input",{type:"file",accept:"image/*",capture:"environment",id:"fuel-receipt",onChange:Ne=>{const St=Ne.target.files?.[0];St&&ke(St)},className:"hidden"}),Xe?o.jsxs("div",{className:"space-y-2",children:[o.jsx("img",{src:URL.createObjectURL(Xe),alt:"Reçu",className:"w-full h-32 object-cover rounded-lg border"}),o.jsx(Pe,{variant:"ghost",size:"sm",onClick:()=>ke(null),className:"w-full",children:"Supprimer la photo"})]}):o.jsxs(Pe,{variant:"outline",onClick:()=>document.getElementById("fuel-receipt")?.click(),className:"w-full",children:[o.jsx(_u,{className:"h-4 w-4 mr-2"}),"Prendre une photo du reçu"]})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{variant:"outline",onClick:()=>{we(!1),Se(""),Be(""),ke(null)},className:"w-full sm:w-auto",children:"Annuler"}),o.jsx(Pe,{onClick:er,className:"bg-blue-600 hover:bg-blue-700 w-full sm:w-auto",disabled:!i||a.isUpdatingFuel||!Ie,children:a.isUpdatingFuel?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Enregistrement..."]}):"Enregistrer"})]})]})}),o.jsx(ci,{open:he,onOpenChange:Le,children:o.jsxs(Zn,{className:"sm:max-w-[400px] mx-4",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{className:"text-xl md:text-2xl text-center",children:"Avance de frais de route"}),o.jsx(Ci,{className:"text-center text-sm md:text-base",children:"Enregistrez le montant de l'avance pris pour les frais de route"})]}),o.jsx("div",{className:"py-4 space-y-4",children:o.jsxs("div",{children:[o.jsx(Je,{htmlFor:"road-expenses-advance",className:"text-sm md:text-base",children:"Montant de l'avance (FCFA) *"}),o.jsx(wt,{id:"road-expenses-advance",type:"number",placeholder:"Ex: 50000",value:Ye,onChange:Ne=>Oe(Ne.target.value),className:"mt-2"})]})}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{variant:"outline",onClick:()=>Le(!1),className:"w-full sm:w-auto",children:"Annuler"}),o.jsxs(Pe,{onClick:zt,className:"bg-blue-600 hover:bg-blue-700 w-full sm:w-auto",disabled:!i||!Ye,children:[o.jsx(n4,{className:"h-4 w-4 mr-2"}),"Enregistrer"]})]})]})}),o.jsx(ci,{open:it,onOpenChange:vt,children:o.jsxs(Zn,{className:"sm:max-w-[400px] mx-4",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{className:"text-xl md:text-2xl text-center",children:"Confirmer le chargement"}),o.jsx(Ci,{className:"text-center text-sm md:text-base",children:"Téléversez le ticket de pesée de chargement pour valider le chargement"})]}),o.jsxs("div",{className:"py-4 space-y-4",children:[i?.loadingWeighingTicketUrl&&!Ot&&o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{className:"text-sm md:text-base",children:"Ticket actuel"}),o.jsxs("div",{className:"relative group",children:[o.jsx("img",{src:i.loadingWeighingTicketUrl,alt:"Ticket de pesée actuel",className:"w-full h-32 object-cover rounded-lg border cursor-pointer hover:opacity-90 transition-opacity",onClick:()=>window.open(i.loadingWeighingTicketUrl,"_blank")}),o.jsx(Pe,{variant:"ghost",size:"icon",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity bg-background/80",onClick:()=>window.open(i.loadingWeighingTicketUrl,"_blank"),children:o.jsx(D0,{className:"h-4 w-4"})})]}),o.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Cliquez sur l'image pour voir en grand"})]}),o.jsxs("div",{children:[o.jsx(Je,{htmlFor:"loading-weighing-ticket",className:"text-sm md:text-base mb-2 block",children:i?.loadingWeighingTicketUrl?"Nouveau ticket de pesée":"Ticket de pesée de chargement (optionnel)"}),o.jsx("input",{type:"file",accept:"image/*",capture:"environment",id:"loading-weighing-ticket",onChange:Ne=>{const St=Ne.target.files?.[0];St&&Wt(St)},className:"hidden"}),Ot?o.jsxs("div",{className:"space-y-2",children:[o.jsx("img",{src:URL.createObjectURL(Ot),alt:"Nouveau ticket de pesée",className:"w-full h-32 object-cover rounded-lg border"}),o.jsx(Pe,{variant:"ghost",size:"sm",onClick:()=>Wt(null),className:"w-full",children:"Supprimer la photo"})]}):o.jsxs(Pe,{variant:"outline",onClick:()=>document.getElementById("loading-weighing-ticket")?.click(),className:"w-full",children:[o.jsx(_u,{className:"h-4 w-4 mr-2"}),i?.loadingWeighingTicketUrl?"Prendre une nouvelle photo":"Prendre une photo du ticket"]})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{variant:"outline",onClick:()=>{vt(!1),Wt(null)},className:"w-full sm:w-auto",children:"Annuler"}),o.jsx(Pe,{onClick:Te,className:"bg-purple-600 hover:bg-purple-700 w-full sm:w-auto",disabled:!i||a.isConfirmingLoading&&!i.loadingCompletedAt||Ht.isPending,children:a.isConfirmingLoading||Ht.isPending?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Enregistrement..."]}):i?.loadingCompletedAt?"Enregistrer":"Confirmer"})]})]})}),o.jsx(ci,{open:mt,onOpenChange:Ne=>{Qt(Ne),Ne||xr(null)},children:o.jsxs(Zn,{className:"sm:max-w-[400px] mx-4",children:[o.jsxs(Jn,{children:[o.jsx(Xn,{className:"text-xl md:text-2xl text-center",children:i?.unloadingCompletedAt?"Modifier le ticket de pesée":"Confirmer le déchargement"}),o.jsx(Ci,{className:"text-center text-sm md:text-base",children:i?.unloadingCompletedAt?"Téléversez un nouveau ticket de pesée de déchargement pour remplacer l'ancien":"Téléversez le ticket de pesée de déchargement pour valider le déchargement"})]}),o.jsxs("div",{className:"py-4 space-y-4",children:[i?.unloadingWeighingTicketUrl&&!Vt&&o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{className:"text-sm md:text-base",children:"Ticket actuel"}),o.jsxs("div",{className:"relative group",children:[o.jsx("img",{src:i.unloadingWeighingTicketUrl,alt:"Ticket de pesée actuel",className:"w-full h-32 object-cover rounded-lg border cursor-pointer hover:opacity-90 transition-opacity",onClick:()=>window.open(i.unloadingWeighingTicketUrl,"_blank")}),o.jsx(Pe,{variant:"ghost",size:"icon",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity bg-background/80",onClick:()=>window.open(i.unloadingWeighingTicketUrl,"_blank"),children:o.jsx(D0,{className:"h-4 w-4"})})]}),o.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Cliquez sur l'image pour voir en grand"})]}),o.jsxs("div",{children:[o.jsx(Je,{htmlFor:"unloading-weighing-ticket",className:"text-sm md:text-base mb-2 block",children:i?.unloadingWeighingTicketUrl?"Nouveau ticket de pesée":"Ticket de pesée de déchargement (optionnel)"}),o.jsx("input",{type:"file",accept:"image/*",capture:"environment",id:"unloading-weighing-ticket",onChange:Ne=>{const St=Ne.target.files?.[0];St&&xr(St)},className:"hidden"}),Vt?o.jsxs("div",{className:"space-y-2",children:[o.jsx("img",{src:URL.createObjectURL(Vt),alt:"Nouveau ticket de pesée",className:"w-full h-32 object-cover rounded-lg border"}),o.jsx(Pe,{variant:"ghost",size:"sm",onClick:()=>xr(null),className:"w-full",children:"Supprimer la photo"})]}):o.jsxs(Pe,{variant:"outline",onClick:()=>document.getElementById("unloading-weighing-ticket")?.click(),className:"w-full",children:[o.jsx(_u,{className:"h-4 w-4 mr-2"}),i?.unloadingWeighingTicketUrl?"Prendre une nouvelle photo":"Prendre une photo du ticket"]})]})]}),o.jsxs(ji,{className:"gap-2 flex-col sm:flex-row",children:[o.jsx(Pe,{variant:"outline",onClick:()=>{Qt(!1),xr(null)},className:"w-full sm:w-auto",children:"Annuler"}),o.jsx(Pe,{onClick:jt,className:"bg-purple-600 hover:bg-purple-700 w-full sm:w-auto",disabled:!i||a.isConfirmingUnloading&&!i.unloadingCompletedAt||Ht.isPending,children:a.isConfirmingUnloading||Ht.isPending?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Enregistrement..."]}):i?.unloadingCompletedAt?"Enregistrer":"Confirmer"})]})]})}),o.jsx(pm,{open:g!==null,onOpenChange:Ne=>!Ne&&A(null),children:o.jsxs(qf,{children:[o.jsxs(Kf,{children:[o.jsx(Yf,{children:"Supprimer le problème"}),o.jsx(Zf,{children:"Êtes-vous sûr de vouloir supprimer ce problème signalé ? Cette action est irréversible."})]}),o.jsxs(Vf,{children:[o.jsx(Xf,{children:"Annuler"}),o.jsx(Jf,{onClick:()=>{g&>.mutate(g)},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",disabled:gt.isPending,children:gt.isPending?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Suppression..."]}):"Supprimer"})]})]})})]})}const hE={admin:"Administrateur",gestionnaire_parc:"Gestionnaire Parc",gestionnaire_mobile:"Gestionnaire Mobile",secretaire:"Secrétaire",comptable:"Comptable",atelier:"Atelier",chauffeur:"Chauffeur",apprenti:"Apprenti"};function xEt(){const[e,t]=w.useState(""),[r,n]=w.useState(!1),[i,a]=w.useState(null),[s,l]=w.useState(!1),[c,u]=w.useState(null),[d,f]=w.useState(null),[m,g]=w.useState(null),[A,v]=w.useState(!1),[b,E]=w.useState(null),{toast:I}=sn(),{data:S=[],isLoading:_}=Ar({queryKey:["/api/users"]}),{data:B=[]}=Ar({queryKey:["/api/crew-members"]}),[T,P]=w.useState({username:"",password:"",role:"apprenti"}),O=qr({mutationFn:async xe=>await fr("/api/users",{method:"POST",body:xe}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/users"]}),br.invalidateQueries({queryKey:["/api/crew-members"]}),I({title:"Succès",description:"L'utilisateur a été créé avec succès"}),n(!1),P({username:"",password:"",role:"apprenti"})},onError:xe=>{I({variant:"destructive",title:"Erreur",description:xe.message||"Impossible de créer l'utilisateur"})}}),z=qr({mutationFn:async({id:xe,data:Me})=>await fr(`/api/users/${xe}`,{method:"PATCH",body:Me}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/users"]}),I({title:"Succès",description:"L'utilisateur a été modifié avec succès"}),l(!1),a(null)},onError:xe=>{I({variant:"destructive",title:"Erreur",description:xe.message||"Impossible de modifier l'utilisateur"})}}),L=qr({mutationFn:async xe=>await fr(`/api/users/${xe}`,{method:"DELETE"}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/users"]}),br.invalidateQueries({queryKey:["/api/crew-members"]}),I({title:"Succès",description:"L'utilisateur a été supprimé avec succès"}),u(null)},onError:xe=>{I({variant:"destructive",title:"Erreur",description:xe.message||"Impossible de supprimer l'utilisateur"})}}),W=qr({mutationFn:async({userId:xe,crewMemberId:Me})=>await fr(`/api/crew-members/${Me}`,{method:"PATCH",body:{userId:xe}}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/users"]}),br.invalidateQueries({queryKey:["/api/crew-members"]}),I({title:"Succès",description:"L'utilisateur a été lié au membre d'équipage"}),f(null)},onError:xe=>{I({variant:"destructive",title:"Erreur",description:xe.message||"Impossible de lier l'utilisateur"})}}),R=qr({mutationFn:async xe=>await fr(`/api/crew-members/${xe}`,{method:"PATCH",body:{userId:null}}),onSuccess:()=>{br.invalidateQueries({queryKey:["/api/users"]}),br.invalidateQueries({queryKey:["/api/crew-members"]}),I({title:"Succès",description:"Le lien a été supprimé"}),E(null)},onError:xe=>{I({variant:"destructive",title:"Erreur",description:xe.message||"Impossible de supprimer le lien"})}}),$=S.filter(xe=>xe.username.toLowerCase().includes(e.toLowerCase())||hE[xe.role]?.toLowerCase().includes(e.toLowerCase())),X=()=>{O.mutate(T)},Z=xe=>{a(xe),P({username:xe.username,password:"",role:xe.role}),l(!0)},K=()=>{if(!i)return;const xe={role:T.role};T.password&&(xe.password=T.password),z.mutate({id:i.id,data:xe})},q=xe=>{u(xe)},Y=()=>{c&&L.mutate(c)},ne=xe=>{f(xe),g(null),v(!0)},ge=()=>{if(!d||!m){I({variant:"destructive",title:"Erreur",description:"Veuillez sélectionner un membre d'équipage"});return}const xe=S.find(ye=>ye.id===d),Me=B.find(ye=>ye.id===m);if(!xe||!Me){I({variant:"destructive",title:"Erreur",description:"Utilisateur ou membre d'équipage non trouvé"});return}if(Me.role!==xe.role){I({variant:"destructive",title:"Erreur",description:`Le rôle du membre d'équipage (${Me.role}) ne correspond pas au rôle de l'utilisateur (${xe.role})`});return}if(Me.userId){I({variant:"destructive",title:"Erreur",description:"Ce membre d'équipage est déjà lié à un compte utilisateur"});return}W.mutate({userId:d,crewMemberId:m}),v(!1),f(null),g(null)},ae=xe=>{E(xe)},pe=()=>{if(!b)return;const xe=B.find(Me=>Me.userId===b);if(!xe){I({variant:"destructive",title:"Erreur",description:"Aucun membre d'équipage associé trouvé"}),E(null);return}R.mutate(xe.id)},_e=xe=>B.find(Me=>Me.userId===xe),we=_;return o.jsxs("div",{className:"space-y-4 md:space-y-6 pb-20 md:pb-0",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl md:text-2xl font-semibold",children:"Utilisateurs"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Gérez les comptes utilisateurs et leurs liens avec les membres d'équipage"})]}),o.jsxs(Pe,{onClick:()=>n(!0),className:"h-12",children:[o.jsx(Ma,{className:"h-4 w-4 mr-2"}),"Ajouter un utilisateur"]})]}),o.jsx("div",{className:"flex items-center gap-3",children:o.jsxs("div",{className:"relative flex-1",children:[o.jsx(U0,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(wt,{placeholder:"Rechercher...",value:e,onChange:xe=>t(xe.target.value),className:"pl-9 h-12"})]})}),we?o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx(wr,{className:"h-8 w-8 animate-spin text-primary"})}):o.jsxs(_t,{children:[o.jsxs(Xr,{children:[o.jsx(cn,{children:"Liste des utilisateurs"}),o.jsxs(Qi,{children:[$.length," utilisateur",$.length>1?"s":""]})]}),o.jsx(ar,{children:o.jsxs(O1,{children:[o.jsx(R1,{children:o.jsxs(xc,{children:[o.jsx(Pn,{children:"Nom d'utilisateur"}),o.jsx(Pn,{children:"Rôle"}),o.jsx(Pn,{children:"Membre d'équipage"}),o.jsx(Pn,{className:"text-right",children:"Actions"})]})}),o.jsx(F1,{children:$.length===0?o.jsx(xc,{children:o.jsx(kn,{colSpan:4,className:"text-center text-muted-foreground",children:"Aucun utilisateur trouvé"})}):$.map(xe=>{const Me=_e(xe.id);return o.jsxs(xc,{children:[o.jsx(kn,{className:"font-medium",children:xe.username}),o.jsx(kn,{children:hE[xe.role]||xe.role}),o.jsx(kn,{children:Me?o.jsxs("span",{className:"text-sm",children:[Me.prenom," ",Me.nom]}):o.jsx("span",{className:"text-sm text-muted-foreground",children:"Non lié"})}),o.jsx(kn,{className:"text-right",children:o.jsxs("div",{className:"flex justify-end gap-2",children:[(xe.role==="chauffeur"||xe.role==="apprenti")&&(Me?o.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>ae(xe.id),children:[o.jsx(N8,{className:"h-4 w-4 mr-1"}),"Délier"]}):o.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>ne(xe.id),children:[o.jsx(Lb,{className:"h-4 w-4 mr-1"}),"Lier"]})),o.jsx(Pe,{variant:"outline",size:"sm",onClick:()=>Z(xe),children:o.jsx(S3,{className:"h-4 w-4"})}),o.jsx(Pe,{variant:"destructive",size:"sm",onClick:()=>q(xe.id),children:o.jsx(fo,{className:"h-4 w-4"})})]})})]},xe.id)})})]})})]}),o.jsx(ci,{open:r,onOpenChange:n,children:o.jsxs(Zn,{children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Ajouter un utilisateur"}),o.jsx(Ci,{children:`Créez un nouveau compte utilisateur. Si le rôle est "Chauffeur" ou "Apprenti", un membre d'équipage sera créé automatiquement.`})]}),o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"username",children:"Nom d'utilisateur"}),o.jsx(wt,{id:"username",value:T.username,onChange:xe=>P({...T,username:xe.target.value}),placeholder:"user@example.com",required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"password",children:"Mot de passe"}),o.jsx(wt,{id:"password",type:"password",value:T.password,onChange:xe=>P({...T,password:xe.target.value}),required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"role",children:"Rôle"}),o.jsxs(ui,{value:T.role,onValueChange:xe=>P({...T,role:xe}),children:[o.jsx(ei,{id:"role",children:o.jsx(di,{})}),o.jsx(ti,{children:Z8.map(xe=>o.jsx(Tr,{value:xe,children:hE[xe]||xe},xe))})]})]})]}),o.jsxs(ji,{children:[o.jsx(Pe,{variant:"outline",onClick:()=>n(!1),children:"Annuler"}),o.jsx(Pe,{onClick:X,children:"Créer"})]})]})}),o.jsx(ci,{open:s,onOpenChange:l,children:o.jsxs(Zn,{children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Modifier l'utilisateur"}),o.jsx(Ci,{children:"Modifiez les informations de l'utilisateur. Laissez le mot de passe vide pour ne pas le modifier."})]}),o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"edit-username",children:"Nom d'utilisateur"}),o.jsx(wt,{id:"edit-username",value:T.username,disabled:!0,className:"bg-muted"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Le nom d'utilisateur ne peut pas être modifié"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"edit-password",children:"Nouveau mot de passe (optionnel)"}),o.jsx(wt,{id:"edit-password",type:"password",value:T.password,onChange:xe=>P({...T,password:xe.target.value}),placeholder:"Laisser vide pour ne pas modifier"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"edit-role",children:"Rôle"}),o.jsxs(ui,{value:T.role,onValueChange:xe=>P({...T,role:xe}),children:[o.jsx(ei,{id:"edit-role",children:o.jsx(di,{})}),o.jsx(ti,{children:Z8.map(xe=>o.jsx(Tr,{value:xe,children:hE[xe]||xe},xe))})]})]})]}),o.jsxs(ji,{children:[o.jsx(Pe,{variant:"outline",onClick:()=>l(!1),children:"Annuler"}),o.jsx(Pe,{onClick:K,children:"Enregistrer"})]})]})}),o.jsx(pm,{open:c!==null,onOpenChange:()=>u(null),children:o.jsxs(qf,{children:[o.jsxs(Kf,{children:[o.jsx(Yf,{children:"Confirmer la suppression"}),o.jsx(Zf,{children:"Êtes-vous sûr de vouloir supprimer cet utilisateur ? Cette action est irréversible."})]}),o.jsxs(Vf,{children:[o.jsx(Xf,{children:"Annuler"}),o.jsx(Jf,{onClick:Y,children:"Supprimer"})]})]})}),o.jsx(ci,{open:A,onOpenChange:v,children:o.jsxs(Zn,{children:[o.jsxs(Jn,{children:[o.jsx(Xn,{children:"Lier l'utilisateur à un membre d'équipage"}),o.jsx(Ci,{children:"Sélectionnez le membre d'équipage à lier à cet utilisateur. Seuls les membres d'équipage avec le même rôle et non liés sont affichés."})]}),o.jsx("div",{className:"space-y-4 py-4",children:d&&(()=>{const xe=S.find(ye=>ye.id===d);if(!xe)return null;const Me=B.filter(ye=>!ye.userId&&ye.role===xe.role);return Me.length===0?o.jsx("div",{className:"text-center py-4",children:o.jsxs("p",{className:"text-muted-foreground",children:["Aucun membre d'équipage ",xe.role==="chauffeur"?"chauffeur":"apprenti"," disponible sans compte associé"]})}):o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"crew-member-select",children:"Membre d'équipage"}),o.jsxs(ui,{value:m?.toString()||"",onValueChange:ye=>g(parseInt(ye)),children:[o.jsx(ei,{id:"crew-member-select",children:o.jsx(di,{placeholder:"Sélectionner un membre d'équipage"})}),o.jsx(ti,{children:Me.map(ye=>o.jsxs(Tr,{value:ye.id.toString(),children:[ye.prenom," ",ye.nom," (",ye.role==="chauffeur"?"Chauffeur":"Apprenti",")"]},ye.id))})]})]})})()}),o.jsxs(ji,{children:[o.jsx(Pe,{variant:"outline",onClick:()=>{v(!1),f(null),g(null)},children:"Annuler"}),o.jsx(Pe,{onClick:ge,disabled:!m,children:"Lier"})]})]})}),o.jsx(pm,{open:b!==null,onOpenChange:()=>E(null),children:o.jsxs(qf,{children:[o.jsxs(Kf,{children:[o.jsx(Yf,{children:"Délier l'utilisateur"}),o.jsx(Zf,{children:"Le lien entre l'utilisateur et le membre d'équipage sera supprimé. L'utilisateur ne pourra plus voir ses voyages assignés. Voulez-vous continuer ?"})]}),o.jsxs(Vf,{children:[o.jsx(Xf,{children:"Annuler"}),o.jsx(Jf,{onClick:pe,children:"Délier"})]})]})})]})}function qZ(e){switch(e){case"admin":case"gestionnaire_parc":return"/";case"gestionnaire_mobile":case"secretaire":return"/missions";case"comptable":return"/missions";case"atelier":return"/pannes";case"chauffeur":case"apprenti":return"/driver";default:return"/"}}function Qve(){const[,e]=Ic(),{user:t,loginAsync:r,isLoggingIn:n}=H3(),[i,a]=w.useState(""),[s,l]=w.useState(""),[c,u]=w.useState(null);w.useEffect(()=>{if(t){const f=qZ(t.role);e(f)}},[t,e]);const d=async f=>{f.preventDefault(),u(null);try{const m=await r({email:i,password:s}),g=qZ(m.user.role);e(g)}catch(m){u(m.message||"Erreur lors de la connexion")}};return o.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center bg-gradient-to-br from-background to-muted p-4",children:[o.jsxs("div",{className:"flex flex-col items-center mb-8",children:[o.jsx("img",{src:"/logo-parc-app.png",alt:"Parc'App Logo",className:"h-16 md:h-20 w-auto mb-4"}),o.jsx("h1",{className:"text-2xl md:text-3xl font-bold",children:"Parc'App"}),o.jsx("p",{className:"text-sm md:text-base text-muted-foreground mt-1",children:"Application de gestion du transport"})]}),o.jsxs(_t,{className:"w-full max-w-md",children:[o.jsxs(Xr,{className:"space-y-1",children:[o.jsx(cn,{className:"text-2xl font-bold text-center",children:"Connexion"}),o.jsx(Qi,{className:"text-center",children:"Connectez-vous à votre compte Parc'App"})]}),o.jsx(ar,{children:o.jsxs("form",{onSubmit:d,className:"space-y-4",children:[c&&o.jsx(DM,{variant:"destructive",children:o.jsx(TM,{children:c})}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"username",children:"Nom d'utilisateur"}),o.jsx(wt,{id:"username",type:"text",placeholder:"Entrez votre nom d'utilisateur",value:i,onChange:f=>a(f.target.value),required:!0,disabled:n,autoComplete:"username"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Je,{htmlFor:"password",children:"Mot de passe"}),o.jsx(wt,{id:"password",type:"password",placeholder:"Entrez votre mot de passe",value:s,onChange:f=>l(f.target.value),required:!0,disabled:n,autoComplete:"current-password"})]}),o.jsx(Pe,{type:"submit",className:"w-full",disabled:n,children:n?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"mr-2 h-4 w-4 animate-spin"}),"Connexion..."]}):o.jsxs(o.Fragment,{children:[o.jsx(bbe,{className:"mr-2 h-4 w-4"}),"Se connecter"]})})]})})]})]})}function yEt(){return o.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:o.jsx(_t,{className:"w-full max-w-md mx-4",children:o.jsxs(ar,{className:"pt-6",children:[o.jsxs("div",{className:"flex mb-4 gap-2",children:[o.jsx(r1,{className:"h-8 w-8 text-red-500"}),o.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"404 Page Not Found"})]}),o.jsx("p",{className:"mt-4 text-sm text-gray-600",children:"Did you forget to add the page to the router?"})]})})})}function bEt(e){const t=wEt(e),r=w.forwardRef((n,i)=>{const{children:a,...s}=n,l=w.Children.toArray(a),c=l.find(CEt);if(c){const u=c.props.children,d=l.map(f=>f===c?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:f);return o.jsx(t,{...s,ref:i,children:w.isValidElement(u)?w.cloneElement(u,void 0,d):null})}return o.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function wEt(e){const t=w.forwardRef((r,n)=>{const{children:i,...a}=r;if(w.isValidElement(i)){const s=SEt(i),l=IEt(a,i.props);return i.type!==w.Fragment&&(l.ref=n?uh(n,s):s),w.cloneElement(i,l)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var EEt=Symbol("radix.slottable");function CEt(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===EEt}function IEt(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function SEt(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var WT=["Enter"," "],BEt=["ArrowDown","PageUp","Home"],Lve=["ArrowUp","PageDown","End"],NEt=[...BEt,...Lve],kEt={ltr:[...WT,"ArrowRight"],rtl:[...WT,"ArrowLeft"]},_Et={ltr:["ArrowLeft"],rtl:["ArrowRight"]},I5="Menu",[Ob,jEt,DEt]=b3(I5),[ev,Uve]=Hu(I5,[DEt,Ag,q3]),FB=Ag(),$ve=q3(),[TEt,tv]=ev(I5),[PEt,S5]=ev(I5),zve=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:i,onOpenChange:a,modal:s=!0}=e,l=FB(t),[c,u]=w.useState(null),d=w.useRef(!1),f=Yc(a),m=G3(i);return w.useEffect(()=>{const g=()=>{d.current=!0,document.addEventListener("pointerdown",A,{capture:!0,once:!0}),document.addEventListener("pointermove",A,{capture:!0,once:!0})},A=()=>d.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",A,{capture:!0}),document.removeEventListener("pointermove",A,{capture:!0})}},[]),o.jsx(D3,{...l,children:o.jsx(TEt,{scope:t,open:r,onOpenChange:f,content:c,onContentChange:u,children:o.jsx(PEt,{scope:t,onClose:w.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:m,modal:s,children:n})})})};zve.displayName=I5;var OEt="MenuAnchor",PM=w.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,i=FB(r);return o.jsx($b,{...i,...n,ref:t})});PM.displayName=OEt;var OM="MenuPortal",[REt,Hve]=ev(OM,{forceMount:void 0}),Wve=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:i}=e,a=tv(OM,t);return o.jsx(REt,{scope:t,forceMount:r,children:o.jsx(Jc,{present:r||a.open,children:o.jsx(iy,{asChild:!0,container:i,children:n})})})};Wve.displayName=OM;var L0="MenuContent",[FEt,RM]=ev(L0),Gve=w.forwardRef((e,t)=>{const r=Hve(L0,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,a=tv(L0,e.__scopeMenu),s=S5(L0,e.__scopeMenu);return o.jsx(Ob.Provider,{scope:e.__scopeMenu,children:o.jsx(Jc,{present:n||a.open,children:o.jsx(Ob.Slot,{scope:e.__scopeMenu,children:s.modal?o.jsx(MEt,{...i,ref:t}):o.jsx(QEt,{...i,ref:t})})})})}),MEt=w.forwardRef((e,t)=>{const r=tv(L0,e.__scopeMenu),n=w.useRef(null),i=qn(t,n);return w.useEffect(()=>{const a=n.current;if(a)return U3(a)},[]),o.jsx(FM,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:dr(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),QEt=w.forwardRef((e,t)=>{const r=tv(L0,e.__scopeMenu);return o.jsx(FM,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),LEt=bEt("MenuContent.ScrollLock"),FM=w.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:g,disableOutsideScroll:A,...v}=e,b=tv(L0,r),E=S5(L0,r),I=FB(r),S=$ve(r),_=jEt(r),[B,T]=w.useState(null),P=w.useRef(null),O=qn(t,P,b.onContentChange),z=w.useRef(0),L=w.useRef(""),W=w.useRef(0),R=w.useRef(null),$=w.useRef("right"),X=w.useRef(0),Z=A?Gb:w.Fragment,K=A?{as:LEt,allowPinchZoom:!0}:void 0,q=ne=>{const ge=L.current+ne,ae=_().filter(ye=>!ye.disabled),pe=document.activeElement,_e=ae.find(ye=>ye.ref.current===pe)?.textValue,we=ae.map(ye=>ye.textValue),xe=JEt(we,ge,_e),Me=ae.find(ye=>ye.textValue===xe)?.ref.current;(function ye(Ee){L.current=Ee,window.clearTimeout(z.current),Ee!==""&&(z.current=window.setTimeout(()=>ye(""),1e3))})(ge),Me&&setTimeout(()=>Me.focus())};w.useEffect(()=>()=>window.clearTimeout(z.current),[]),Q3();const Y=w.useCallback(ne=>$.current===R.current?.side&&eCt(ne,R.current?.area),[]);return o.jsx(FEt,{scope:r,searchRef:L,onItemEnter:w.useCallback(ne=>{Y(ne)&&ne.preventDefault()},[Y]),onItemLeave:w.useCallback(ne=>{Y(ne)||(P.current?.focus(),T(null))},[Y]),onTriggerLeave:w.useCallback(ne=>{Y(ne)&&ne.preventDefault()},[Y]),pointerGraceTimerRef:W,onPointerGraceIntentChange:w.useCallback(ne=>{R.current=ne},[]),children:o.jsx(Z,{...K,children:o.jsx(Wb,{asChild:!0,trapped:i,onMountAutoFocus:dr(a,ne=>{ne.preventDefault(),P.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:o.jsx(N1,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:g,children:o.jsx(qee,{asChild:!0,...S,dir:E.dir,orientation:"vertical",loop:n,currentTabStopId:B,onCurrentTabStopIdChange:T,onEntryFocus:dr(c,ne=>{E.isUsingKeyboardRef.current||ne.preventDefault()}),preventScrollOnEntryFocus:!0,children:o.jsx(T3,{role:"menu","aria-orientation":"vertical","data-state":lxe(b.open),"data-radix-menu-content":"",dir:E.dir,...I,...v,ref:O,style:{outline:"none",...v.style},onKeyDown:dr(v.onKeyDown,ne=>{const ae=ne.target.closest("[data-radix-menu-content]")===ne.currentTarget,pe=ne.ctrlKey||ne.altKey||ne.metaKey,_e=ne.key.length===1;ae&&(ne.key==="Tab"&&ne.preventDefault(),!pe&&_e&&q(ne.key));const we=P.current;if(ne.target!==we||!NEt.includes(ne.key))return;ne.preventDefault();const Me=_().filter(ye=>!ye.disabled).map(ye=>ye.ref.current);Lve.includes(ne.key)&&Me.reverse(),YEt(Me)}),onBlur:dr(e.onBlur,ne=>{ne.currentTarget.contains(ne.target)||(window.clearTimeout(z.current),L.current="")}),onPointerMove:dr(e.onPointerMove,Rb(ne=>{const ge=ne.target,ae=X.current!==ne.clientX;if(ne.currentTarget.contains(ge)&&ae){const pe=ne.clientX>X.current?"right":"left";$.current=pe,X.current=ne.clientX}}))})})})})})})});Gve.displayName=L0;var UEt="MenuGroup",MM=w.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx(mn.div,{role:"group",...n,ref:t})});MM.displayName=UEt;var $Et="MenuLabel",qve=w.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx(mn.div,{...n,ref:t})});qve.displayName=$Et;var v3="MenuItem",KZ="menu.itemSelect",MB=w.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...i}=e,a=w.useRef(null),s=S5(v3,e.__scopeMenu),l=RM(v3,e.__scopeMenu),c=qn(t,a),u=w.useRef(!1),d=()=>{const f=a.current;if(!r&&f){const m=new CustomEvent(KZ,{bubbles:!0,cancelable:!0});f.addEventListener(KZ,g=>n?.(g),{once:!0}),rP(f,m),m.defaultPrevented?u.current=!1:s.onClose()}};return o.jsx(Kve,{...i,ref:c,disabled:r,onClick:dr(e.onClick,d),onPointerDown:f=>{e.onPointerDown?.(f),u.current=!0},onPointerUp:dr(e.onPointerUp,f=>{u.current||f.currentTarget?.click()}),onKeyDown:dr(e.onKeyDown,f=>{const m=l.searchRef.current!=="";r||m&&f.key===" "||WT.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});MB.displayName=v3;var Kve=w.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...a}=e,s=RM(v3,r),l=$ve(r),c=w.useRef(null),u=qn(t,c),[d,f]=w.useState(!1),[m,g]=w.useState("");return w.useEffect(()=>{const A=c.current;A&&g((A.textContent??"").trim())},[a.children]),o.jsx(Ob.ItemSlot,{scope:r,disabled:n,textValue:i??m,children:o.jsx(Kee,{asChild:!0,...l,focusable:!n,children:o.jsx(mn.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:u,onPointerMove:dr(e.onPointerMove,Rb(A=>{n?s.onItemLeave(A):(s.onItemEnter(A),A.defaultPrevented||A.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:dr(e.onPointerLeave,Rb(A=>s.onItemLeave(A))),onFocus:dr(e.onFocus,()=>f(!0)),onBlur:dr(e.onBlur,()=>f(!1))})})})}),zEt="MenuCheckboxItem",Vve=w.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...i}=e;return o.jsx(exe,{scope:e.__scopeMenu,checked:r,children:o.jsx(MB,{role:"menuitemcheckbox","aria-checked":x3(r)?"mixed":r,...i,ref:t,"data-state":LM(r),onSelect:dr(i.onSelect,()=>n?.(x3(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Vve.displayName=zEt;var Yve="MenuRadioGroup",[HEt,WEt]=ev(Yve,{value:void 0,onValueChange:()=>{}}),Zve=w.forwardRef((e,t)=>{const{value:r,onValueChange:n,...i}=e,a=Yc(n);return o.jsx(HEt,{scope:e.__scopeMenu,value:r,onValueChange:a,children:o.jsx(MM,{...i,ref:t})})});Zve.displayName=Yve;var Jve="MenuRadioItem",Xve=w.forwardRef((e,t)=>{const{value:r,...n}=e,i=WEt(Jve,e.__scopeMenu),a=r===i.value;return o.jsx(exe,{scope:e.__scopeMenu,checked:a,children:o.jsx(MB,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":LM(a),onSelect:dr(n.onSelect,()=>i.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});Xve.displayName=Jve;var QM="MenuItemIndicator",[exe,GEt]=ev(QM,{checked:!1}),txe=w.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...i}=e,a=GEt(QM,r);return o.jsx(Jc,{present:n||x3(a.checked)||a.checked===!0,children:o.jsx(mn.span,{...i,ref:t,"data-state":LM(a.checked)})})});txe.displayName=QM;var qEt="MenuSeparator",rxe=w.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx(mn.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});rxe.displayName=qEt;var KEt="MenuArrow",nxe=w.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,i=FB(r);return o.jsx(P3,{...i,...n,ref:t})});nxe.displayName=KEt;var VEt="MenuSub",[EIt,ixe]=ev(VEt),w2="MenuSubTrigger",axe=w.forwardRef((e,t)=>{const r=tv(w2,e.__scopeMenu),n=S5(w2,e.__scopeMenu),i=ixe(w2,e.__scopeMenu),a=RM(w2,e.__scopeMenu),s=w.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},d=w.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return w.useEffect(()=>d,[d]),w.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),c(null)}},[l,c]),o.jsx(PM,{asChild:!0,...u,children:o.jsx(Kve,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":lxe(r.open),...e,ref:uh(t,i.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:dr(e.onPointerMove,Rb(f=>{a.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:dr(e.onPointerLeave,Rb(f=>{d();const m=r.content?.getBoundingClientRect();if(m){const g=r.content?.dataset.side,A=g==="right",v=A?-5:5,b=m[A?"left":"right"],E=m[A?"right":"left"];a.onPointerGraceIntentChange({area:[{x:f.clientX+v,y:f.clientY},{x:b,y:m.top},{x:E,y:m.top},{x:E,y:m.bottom},{x:b,y:m.bottom}],side:g}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(f),f.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:dr(e.onKeyDown,f=>{const m=a.searchRef.current!=="";e.disabled||m&&f.key===" "||kEt[n.dir].includes(f.key)&&(r.onOpenChange(!0),r.content?.focus(),f.preventDefault())})})})});axe.displayName=w2;var sxe="MenuSubContent",oxe=w.forwardRef((e,t)=>{const r=Hve(L0,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,a=tv(L0,e.__scopeMenu),s=S5(L0,e.__scopeMenu),l=ixe(sxe,e.__scopeMenu),c=w.useRef(null),u=qn(t,c);return o.jsx(Ob.Provider,{scope:e.__scopeMenu,children:o.jsx(Jc,{present:n||a.open,children:o.jsx(Ob.Slot,{scope:e.__scopeMenu,children:o.jsx(FM,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{s.isUsingKeyboardRef.current&&c.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:dr(e.onFocusOutside,d=>{d.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:dr(e.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:dr(e.onKeyDown,d=>{const f=d.currentTarget.contains(d.target),m=_Et[s.dir].includes(d.key);f&&m&&(a.onOpenChange(!1),l.trigger?.focus(),d.preventDefault())})})})})})});oxe.displayName=sxe;function lxe(e){return e?"open":"closed"}function x3(e){return e==="indeterminate"}function LM(e){return x3(e)?"indeterminate":e?"checked":"unchecked"}function YEt(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function ZEt(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function JEt(e,t,r){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let s=ZEt(e,Math.max(a,0));i.length===1&&(s=s.filter(u=>u!==r));const c=s.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function XEt(e,t){const{x:r,y:n}=e;let i=!1;for(let a=0,s=t.length-1;an!=m>n&&r<(f-u)*(n-d)/(m-d)+u&&(i=!i)}return i}function eCt(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return XEt(r,t)}function Rb(e){return t=>t.pointerType==="mouse"?e(t):void 0}var tCt=zve,rCt=PM,nCt=Wve,iCt=Gve,aCt=MM,sCt=qve,oCt=MB,lCt=Vve,cCt=Zve,uCt=Xve,dCt=txe,fCt=rxe,hCt=nxe,mCt=axe,pCt=oxe,QB="DropdownMenu",[gCt]=Hu(QB,[Uve]),kc=Uve(),[ACt,cxe]=gCt(QB),uxe=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:i,defaultOpen:a,onOpenChange:s,modal:l=!0}=e,c=kc(t),u=w.useRef(null),[d,f]=Hf({prop:i,defaultProp:a??!1,onChange:s,caller:QB});return o.jsx(ACt,{scope:t,triggerId:R0(),triggerRef:u,contentId:R0(),open:d,onOpenChange:f,onOpenToggle:w.useCallback(()=>f(m=>!m),[f]),modal:l,children:o.jsx(tCt,{...c,open:d,onOpenChange:f,dir:n,modal:l,children:r})})};uxe.displayName=QB;var dxe="DropdownMenuTrigger",fxe=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...i}=e,a=cxe(dxe,r),s=kc(r);return o.jsx(rCt,{asChild:!0,...s,children:o.jsx(mn.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...i,ref:uh(t,a.triggerRef),onPointerDown:dr(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:dr(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});fxe.displayName=dxe;var vCt="DropdownMenuPortal",hxe=e=>{const{__scopeDropdownMenu:t,...r}=e,n=kc(t);return o.jsx(nCt,{...n,...r})};hxe.displayName=vCt;var mxe="DropdownMenuContent",pxe=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=cxe(mxe,r),a=kc(r),s=w.useRef(!1);return o.jsx(iCt,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...n,ref:t,onCloseAutoFocus:dr(e.onCloseAutoFocus,l=>{s.current||i.triggerRef.current?.focus(),s.current=!1,l.preventDefault()}),onInteractOutside:dr(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!i.modal||d)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});pxe.displayName=mxe;var xCt="DropdownMenuGroup",yCt=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=kc(r);return o.jsx(aCt,{...i,...n,ref:t})});yCt.displayName=xCt;var bCt="DropdownMenuLabel",gxe=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=kc(r);return o.jsx(sCt,{...i,...n,ref:t})});gxe.displayName=bCt;var wCt="DropdownMenuItem",Axe=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=kc(r);return o.jsx(oCt,{...i,...n,ref:t})});Axe.displayName=wCt;var ECt="DropdownMenuCheckboxItem",vxe=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=kc(r);return o.jsx(lCt,{...i,...n,ref:t})});vxe.displayName=ECt;var CCt="DropdownMenuRadioGroup",ICt=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=kc(r);return o.jsx(cCt,{...i,...n,ref:t})});ICt.displayName=CCt;var SCt="DropdownMenuRadioItem",xxe=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=kc(r);return o.jsx(uCt,{...i,...n,ref:t})});xxe.displayName=SCt;var BCt="DropdownMenuItemIndicator",yxe=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=kc(r);return o.jsx(dCt,{...i,...n,ref:t})});yxe.displayName=BCt;var NCt="DropdownMenuSeparator",bxe=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=kc(r);return o.jsx(fCt,{...i,...n,ref:t})});bxe.displayName=NCt;var kCt="DropdownMenuArrow",_Ct=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=kc(r);return o.jsx(hCt,{...i,...n,ref:t})});_Ct.displayName=kCt;var jCt="DropdownMenuSubTrigger",wxe=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=kc(r);return o.jsx(mCt,{...i,...n,ref:t})});wxe.displayName=jCt;var DCt="DropdownMenuSubContent",Exe=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=kc(r);return o.jsx(pCt,{...i,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Exe.displayName=DCt;var TCt=uxe,PCt=fxe,OCt=hxe,Cxe=pxe,Ixe=gxe,Sxe=Axe,Bxe=vxe,Nxe=xxe,kxe=yxe,_xe=bxe,jxe=wxe,Dxe=Exe;const RCt=TCt,FCt=PCt,MCt=w.forwardRef(({className:e,inset:t,children:r,...n},i)=>o.jsxs(jxe,{ref:i,className:qt("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[r,o.jsx(JJ,{className:"ml-auto"})]}));MCt.displayName=jxe.displayName;const QCt=w.forwardRef(({className:e,...t},r)=>o.jsx(Dxe,{ref:r,className:qt("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));QCt.displayName=Dxe.displayName;const Txe=w.forwardRef(({className:e,sideOffset:t=4,...r},n)=>o.jsx(OCt,{children:o.jsx(Cxe,{ref:n,sideOffset:t,className:qt("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r})}));Txe.displayName=Cxe.displayName;const Pxe=w.forwardRef(({className:e,inset:t,...r},n)=>o.jsx(Sxe,{ref:n,className:qt("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r}));Pxe.displayName=Sxe.displayName;const LCt=w.forwardRef(({className:e,children:t,checked:r,...n},i)=>o.jsxs(Bxe,{ref:i,className:qt("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(kxe,{children:o.jsx(sP,{className:"h-4 w-4"})})}),t]}));LCt.displayName=Bxe.displayName;const UCt=w.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(Nxe,{ref:n,className:qt("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(kxe,{children:o.jsx(I3,{className:"h-2 w-2 fill-current"})})}),t]}));UCt.displayName=Nxe.displayName;const Oxe=w.forwardRef(({className:e,inset:t,...r},n)=>o.jsx(Ixe,{ref:n,className:qt("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Oxe.displayName=Ixe.displayName;const Rxe=w.forwardRef(({className:e,...t},r)=>o.jsx(_xe,{ref:r,className:qt("-mx-1 my-1 h-px bg-muted",e),...t}));Rxe.displayName=_xe.displayName;function $Ct(){const{data:e}=j1(),t=kP(),[r]=Ic(),n=()=>{t.mutate()};let i;return r==="/"||r.startsWith("/dashboard")?i=[["/api/vehicles"],["/api/trailers"],["/api/missions"],["/api/trips"],["/api/crew-members"],["/api/maintenances"],["/api/breakdowns"]]:r.startsWith("/vehicules")?i=[["/api/vehicles"]]:r.startsWith("/remorques")?i=[["/api/trailers"]]:r.startsWith("/missions")?i=[["/api/missions"]]:r.startsWith("/trajets")?i=[["/api/trips"],["/api/missions"]]:r.startsWith("/equipage")?i=[["/api/crew-members"]]:r.startsWith("/maintenances")?i=[["/api/maintenances"]]:r.startsWith("/pannes")?i=[["/api/breakdowns"]]:r.startsWith("/attelages")?i=[["/api/vehicles"],["/api/trailers"]]:r.startsWith("/finance")?i=[["/api/trips"],["/api/missions"],["/api/maintenances"],["/api/breakdowns"]]:i=void 0,o.jsxs("header",{className:"flex items-center justify-between gap-4 p-3 md:p-4 border-b",children:[o.jsx("div",{className:"hidden md:block",children:o.jsx(PEe,{"data-testid":"button-sidebar-toggle"})}),o.jsx("h1",{className:"text-base md:text-lg font-semibold flex-1 text-center md:hidden",children:"Parc'App"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Bee,{}),o.jsx(See,{queriesToInvalidate:i}),e&&o.jsxs(RCt,{children:[o.jsx(FCt,{asChild:!0,children:o.jsxs(Pe,{variant:"ghost",size:"sm",className:"gap-2",children:[o.jsx(sy,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:e.username})]})}),o.jsxs(Txe,{align:"end",children:[o.jsx(Oxe,{children:o.jsxs("div",{className:"flex flex-col space-y-1",children:[o.jsx("p",{className:"text-sm font-medium",children:e.username}),o.jsx("p",{className:"text-xs text-muted-foreground",children:e.role})]})}),o.jsx(Rxe,{}),o.jsxs(Pxe,{onClick:n,disabled:t.isPending,children:[o.jsx(cP,{className:"mr-2 h-4 w-4"}),o.jsx("span",{children:t.isPending?"Déconnexion...":"Se déconnecter"})]})]})]}),o.jsx(VEe,{})]})]})}function zCt(){return o.jsxs(o2e,{children:[o.jsx(So,{path:"/login",component:Qve}),o.jsx(So,{path:"/",children:o.jsx(kl,{children:o.jsx(d3e,{})})}),o.jsx(So,{path:"/vehicules",children:o.jsx(kl,{children:o.jsx(ASe,{})})}),o.jsx(So,{path:"/remorques",children:o.jsx(kl,{children:o.jsx(l8e,{})})}),o.jsx(So,{path:"/attelages",children:o.jsx(kl,{children:o.jsx(M8e,{})})}),o.jsx(So,{path:"/equipage",children:o.jsx(kl,{children:o.jsx(p8e,{})})}),o.jsx(So,{path:"/missions",children:o.jsx(kl,{children:o.jsx(_Ze,{})})}),o.jsx(So,{path:"/missions/new",children:o.jsx(kl,{children:o.jsx(KZe,{})})}),o.jsx(So,{path:"/missions/:id/ordre-de-mission",children:o.jsx(kl,{children:o.jsx(_4t,{})})}),o.jsx(So,{path:"/missions/:id",children:o.jsx(kl,{children:o.jsx(NJe,{})})}),o.jsx(So,{path:"/trajets/new",children:o.jsx(kl,{children:o.jsx(n8e,{})})}),o.jsx(So,{path:"/trajets/:id",children:o.jsx(kl,{children:o.jsx(P4t,{})})}),o.jsx(So,{path:"/trajets",children:o.jsx(kl,{children:o.jsx(Uje,{})})}),o.jsx(So,{path:"/maintenances",children:o.jsx(kl,{children:o.jsx(N8e,{})})}),o.jsx(So,{path:"/pannes",children:o.jsx(kl,{children:o.jsx(j8e,{})})}),o.jsx(So,{path:"/finance",children:o.jsx(kl,{children:o.jsx(BZe,{})})}),o.jsx(So,{path:"/utilisateurs",children:o.jsx(kl,{children:o.jsx(xEt,{})})}),o.jsx(So,{path:"/parametres",children:o.jsx(kl,{children:o.jsx(uEt,{})})}),o.jsx(So,{component:yEt})]})}function HCt(){const[e]=Ic();j1();const t=e.startsWith("/driver"),r=e==="/login",n={"--sidebar-width":"16rem"};return r?o.jsx(cm,{children:o.jsx(Qve,{})}):t?o.jsx(cm,{children:o.jsx(XEe,{children:o.jsx(vEt,{})})}):o.jsxs(cm,{children:[o.jsxs(DEe,{style:n,children:[o.jsxs("div",{className:"flex h-screen w-full",children:[o.jsx(KEe,{}),o.jsxs("div",{className:"flex flex-col flex-1 overflow-hidden",children:[o.jsx($Ct,{}),o.jsx("main",{className:"flex-1 overflow-auto p-4 md:p-8",children:o.jsx("div",{className:"max-w-7xl mx-auto",children:o.jsx(zCt,{})})})]})]}),o.jsx(JEe,{})]}),o.jsx(hX,{})]})}const WCt=window.fetch.bind(window);window.fetch=async(e,t)=>{const r=typeof e=="string"?e:e instanceof URL?e.toString():e.url;if(r.startsWith("/api/"))throw console.error("❌ RELATIVE API CALL DETECTED:",r),console.trace("STACK TRACE for relative API call"),new Error(`Relative API call blocked: ${r}`);return WCt(e,t)};const GCt=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(e,t,r,n,i){const a=typeof t=="string"?t:t.toString();return(a.startsWith("/api/")||a.startsWith("api/"))&&(console.error("❌ RELATIVE API CALL (XHR) DETECTED:",e,a),console.trace("STACK TRACE for XHR relative API call")),GCt.call(this,e,t,r,n,i)};cye.createRoot(document.getElementById("root")).render(o.jsx(Oye,{client:br,children:o.jsx(HCt,{})}));console.log("VITE_API_BASE_URL =","https://apiparcapp.jrbxsolutions.com");console.log("MODE =","production");