PageSourceSearch

https://glam-academy-flow.lovable.app/assets/index-CCW-rw52.js

js glam-academy-flow.lovable.app collected 2026-10-03 03:27:18 UTC 1,672,642 bytes, 924 lines download raw bytes

vendor: 5,861 bytes, lines 1-9
1var UF=Object.defineProperty;var G2=e=>{throw TypeError(e)};var WF=(e,t,r)=>t in e?UF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ve=(e,t,r)=>WF(e,typeof t!="symbol"?t+"":t,r),Dg=(e,t,r)=>t.has(e)||G2("Cannot "+r);var ge=(e,t,r)=>(Dg(e,t,"read from private field"),r?r.call(e):t.get(e)),Mt=(e,t,r)=>t.has(e)?G2("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),vt=(e,t,r,n)=>(Dg(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Rn=(e,t,r)=>(Dg(e,t,"access private method"),r);var C0=(e,t,r,n)=>({set _(s){vt(e,t,s,r)},get _(){return ge(e,t,n)}});function zF(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const a=Object.getOwnPropertyDescriptor(n,s);a&&Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>n[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(s){if(s.ep)return;s.ep=!0;const a=r(s);fetch(s.href,a)}})();function ME(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var LE={exports:{}},ox={},BE={exports:{}},jt={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var zh=Symbol.for("react.element"),HF=Symbol.for("react.portal"),VF=Symbol.for("react.fragment"),GF=Symbol.for("react.strict_mode"),qF=Symbol.for("react.profiler"),KF=Symbol.for("react.provider"),YF=Symbol.for("react.context"),XF=Symbol.for("react.forward_ref"),QF=Symbol.for("react.suspense"),JF=Symbol.for("react.memo"),ZF=Symbol.for("react.lazy"),q2=Symbol.iterator;function eM(e){return e===null||typeof e!="object"?null:(e=q2&&e[q2]||e["@@iterator"],typeof e=="function"?e:null)}var $E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},UE=Object.assign,WE={};function xd(e,t,r){this.props=e,this.context=t,this.refs=WE,this.updater=r||$E}xd.prototype.isReactComponent={};xd.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};xd.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function zE(){}zE.prototype=xd.prototype;function ww(e,t,r){this.props=e,this.context=t,this.refs=WE,this.updater=r||$E}var bw=ww.prototype=new zE;bw.constructor=ww;UE(bw,xd.prototype);bw.isPureReactComponent=!0;var K2=Array.isArray,HE=Object.prototype.hasOwnProperty,_w={current:null},VE={key:!0,ref:!0,__self:!0,__source:!0};function GE(e,t,r){var n,s={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)HE.call(t,n)&&!VE.hasOwnProperty(n)&&(s[n]=t[n]);var l=arguments.length-2;if(l===1)s.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)s[n]===void 0&&(s[n]=l[n]);return{$$typeof:zh,type:e,key:a,ref:o,props:s,_owner:_w.current}}function tM(e,t){return{$$typeof:zh,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Nw(e){return typeof e=="object"&&e!==null&&e.$$typeof===zh}function rM(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Y2=/\/+/g;function Ig(e,t){return typeof e=="object"&&e!==null&&e.key!=null?rM(""+e.key):t.toString(36)}function _m(e,t,r,n,s){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case zh:case HF:o=!0}}if(o)return o=e,s=s(o),e=n===""?"."+Ig(o,0):n,K2(s)?(r="",e!=null&&(r=e.replace(Y2,"$&/")+"/"),_m(s,t,r,"",function(u){return u})):s!=null&&(Nw(s)&&(s=tM(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Y2,"$&/")+"/")+e)),t.push(s)),1;if(o=0,n=n===""?".":n+":",K2(e))for(var l=0;l<e.length;l++){a=e[l];var c=n+Ig(a,l);o+=_m(a,t,r,c,s)}else if(c=eM(e),typeof c=="function")for(e=c.call(e),l=0;!(a=e.next()).done;)a=a.value,c=n+Ig(a,l++),o+=_m(a,t,r,c,s);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function T0(e,t,r){if(e==null)return e;var n=[],s=0;return _m(e,n,"","",function(a){return t.call(r,a,s++)}),n}function nM(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var rs={current:null},Nm={transition:null},sM={ReactCurrentDispatcher:rs,ReactCurrentBatchConfig:Nm,ReactCurrentOwner:_w};function qE(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 7,529 bytes, lines 9-25
9jt.Children={map:T0,forEach:function(e,t,r){T0(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return T0(e,function(){t++}),t},toArray:function(e){return T0(e,function(t){return t})||[]},only:function(e){if(!Nw(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};jt.Component=xd;jt.Fragment=VF;jt.Profiler=qF;jt.PureComponent=ww;jt.StrictMode=GF;jt.Suspense=QF;jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sM;jt.act=qE;jt.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=UE({},e.props),s=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=_w.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)HE.call(t,c)&&!VE.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];n.children=l}return{$$typeof:zh,type:e.type,key:s,ref:a,props:n,_owner:o}};jt.createContext=function(e){return e={$$typeof:YF,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:KF,_context:e},e.Consumer=e};jt.createElement=GE;jt.createFactory=function(e){var t=GE.bind(null,e);return t.type=e,t};jt.createRef=function(){return{current:null}};jt.forwardRef=function(e){return{$$typeof:XF,render:e}};jt.isValidElement=Nw;jt.lazy=function(e){return{$$typeof:ZF,_payload:{_status:-1,_result:e},_init:nM}};jt.memo=function(e,t){return{$$typeof:JF,type:e,compare:t===void 0?null:t}};jt.startTransition=function(e){var t=Nm.transition;Nm.transition={};try{e()}finally{Nm.transition=t}};jt.unstable_act=qE;jt.useCallback=function(e,t){return rs.current.useCallback(e,t)};jt.useContext=function(e){return rs.current.useContext(e)};jt.useDebugValue=function(){};jt.useDeferredValue=function(e){return rs.current.useDeferredValue(e)};jt.useEffect=function(e,t){return rs.current.useEffect(e,t)};jt.useId=function(){return rs.current.useId()};jt.useImperativeHandle=function(e,t,r){return rs.current.useImperativeHandle(e,t,r)};jt.useInsertionEffect=function(e,t){return rs.current.useInsertionEffect(e,t)};jt.useLayoutEffect=function(e,t){return rs.current.useLayoutEffect(e,t)};jt.useMemo=function(e,t){return rs.current.useMemo(e,t)};jt.useReducer=function(e,t,r){return rs.current.useReducer(e,t,r)};jt.useRef=function(e){return rs.current.useRef(e)};jt.useState=function(e){return rs.current.useState(e)};jt.useSyncExternalStore=function(e,t,r){return rs.current.useSyncExternalStore(e,t,r)};jt.useTransition=function(){return rs.current.useTransition()};jt.version="18.3.1";BE.exports=jt;var v=BE.exports;const ye=ME(v),Sw=zF({__proto__:null,default:ye},[v]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var aM=v,iM=Symbol.for("react.element"),oM=Symbol.for("react.fragment"),lM=Object.prototype.hasOwnProperty,cM=aM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uM={key:!0,ref:!0,__self:!0,__source:!0};function KE(e,t,r){var n,s={},a=null,o=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)lM.call(t,n)&&!uM.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:iM,type:e,key:a,ref:o,props:s,_owner:cM.current}}ox.Fragment=oM;ox.jsx=KE;ox.jsxs=KE;LE.exports=ox;var i=LE.exports,YE={exports:{}},Ks={},XE={exports:{}},QE={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(e){function t(F,C){var X=F.length;F.push(C);e:for(;0<X;){var se=X-1>>>1,A=F[se];if(0<s(A,C))F[se]=C,F[X]=A,X=se;else break e}}function r(F){return F.length===0?null:F[0]}function n(F){if(F.length===0)return null;var C=F[0],X=F.pop();if(X!==C){F[0]=X;e:for(var se=0,A=F.length,M=A>>>1;se<M;){var I=2*(se+1)-1,z=F[I],J=I+1,Z=F[J];if(0>s(z,X))J<A&&0>s(Z,z)?(F[se]=Z,F[J]=X,se=J):(F[se]=z,F[I]=X,se=I);else if(J<A&&0>s(Z,X))F[se]=Z,F[J]=X,se=J;else break e}}return C}function s(F,C){var X=F.sortIndex-C.sortIndex;return X!==0?X:F.id-C.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,f=null,h=3,m=!1,g=!1,p=!1,x=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(F){for(var C=r(u);C!==null;){if(C.callback===null)n(u);else if(C.startTime<=F)n(u),C.sortIndex=C.expirationTime,t(c,C);else break;C=r(u)}}function _(F){if(p=!1,y(F),!g)if(r(c)!==null)g=!0,Y(N);else{var C=r(u);C!==null&&V(_,C.startTime-F)}}function N(F,C){g=!1,p&&(p=!1,b(E),E=-1),m=!0;var X=h;try{for(y(C),f=r(c);f!==null&&(!(f.expirationTime>C)||F&&!R());){var se=f.callback;if(typeof se=="function"){f.callback=null,h=f.priorityLevel;var A=se(f.expirationTime<=C);C=e.unstable_now(),typeof A=="function"?f.callback=A:f===r(c)&&n(c),y(C)}else n(c);f=r(c)}if(f!==null)var M=!0;else{var I=r(u);I!==null&&V(_,I.startTime-C),M=!1}return M}finally{f=null,h=X,m=!1}}var k=!1,S=null,E=-1,j=5,T=-1;function R(){return!(e.unstable_now()-T<j)}function P(){if(S!==null){var F=e.unstable_now();T=F;var C=!0;try{C=S(!0,F)}finally{C?D():(k=!1,S=null)}}else k=!1}var D;if(typeof w=="function")D=function(){w(P)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,Q=U.port2;U.port1.onmessage=P,D=function(){Q.postMessage(null)}}else D=function(){x(P,0)};function Y(F){S=F,k||(k=!0,D())}function V(F,C){E=x(function(){F(e.unstable_now())},C)}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(F){F.callback=null},e.unstable_continueExecution=function(){g||m||(g=!0,Y(N))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(F){switch(h){case 1:case 2:case 3:var C=3;break;default:C=h}var X=h;h=C;try{return F()}finally{h=X}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,C){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var X=h;h=F;try{return C()}finally{h=X}},e.unstable_scheduleCallback=function(F,C,X){var se=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?se+X:se):X=se,F){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=X+A,F={id:d++,callback:C,priorityLevel:F,startTime:X,expirationTime:A,s
vendor: 4,537 bytes, lines 25-33
25ortIndex:-1},X>se?(F.sortIndex=X,t(u,F),r(c)===null&&F===r(u)&&(p?(b(E),E=-1):p=!0,V(_,X-se))):(F.sortIndex=A,t(c,F),g||m||(g=!0,Y(N))),F},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(F){var C=h;return function(){var X=h;h=C;try{return F.apply(this,arguments)}finally{h=X}}}})(QE);XE.exports=QE;var dM=XE.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var fM=v,zs=dM;function Ee(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var JE=new Set,Mf={};function _c(e,t){Gu(e,t),Gu(e+"Capture",t)}function Gu(e,t){for(Mf[e]=t,e=0;e<t.length;e++)JE.add(t[e])}var Gi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g1=Object.prototype.hasOwnProperty,hM=/^[: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]*$/,X2={},Q2={};function mM(e){return g1.call(Q2,e)?!0:g1.call(X2,e)?!1:hM.test(e)?Q2[e]=!0:(X2[e]=!0,!1)}function pM(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function xM(e,t,r,n){if(t===null||typeof t>"u"||pM(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ns(e,t,r,n,s,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var An={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){An[e]=new ns(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];An[t]=new ns(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){An[e]=new ns(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){An[e]=new ns(e,2,!1,e,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(e){An[e]=new ns(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){An[e]=new ns(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){An[e]=new ns(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){An[e]=new ns(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){An[e]=new ns(e,5,!1,e.toLowerCase(),null,!1,!1)});var kw=/[\-:]([a-z])/g;function jw(e){return e[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
33-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(e){var t=e.replace(kw,jw);An[t]=new ns(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(kw,jw);An[t]=new ns(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(kw,jw);An[t]=new ns(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){An[e]=new ns(e,1,!1,e.toLowerCase(),null,!1,!1)});An.xlinkHref=new ns("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){An[e]=new ns(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ew(e,t,r,n){var s=An.hasOwnProperty(t)?An[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(xM(t,r,s,n)&&(r=null),n||s===null?mM(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var ro=fM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,A0=Symbol.for("react.element"),iu=Symbol.for("react.portal"),ou=Symbol.for("react.fragment"),Cw=Symbol.for("react.strict_mode"),v1=Symbol.for("react.profiler"),ZE=Symbol.for("react.provider"),eC=Symbol.for("react.context"),Tw=Symbol.for("react.forward_ref"),y1=Symbol.for("react.suspense"),w1=Symbol.for("react.suspense_list"),Aw=Symbol.for("react.memo"),wo=Symbol.for("react.lazy"),tC=Symbol.for("react.offscreen"),J2=Symbol.iterator;function Wd(e){return e===null||typeof e!="object"?null:(e=J2&&e[J2]||e["@@iterator"],typeof e=="function"?e:null)}var Tr=Object.assign,Fg;function ef(e){if(Fg===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Fg=t&&t[1]||""}return`
34`+Fg+e}var Mg=!1;function Lg(e,t){if(!e||Mg)return"";Mg=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(`
35`),a=n.stack.split(`
36`),o=s.length-1,l=a.length-1;1<=o&&0<=l&&s[o]!==a[l];)l--;for(;1<=o&&0<=l;o--,l--)if(s[o]!==a[l]){if(o!==1||l!==1)do if(o--,l--,0>l||s[o]!==a[l]){var c=`
37`+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{Mg=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?ef(e):""}function gM(e){switch(e.tag){case 5:return ef(e.type);case 16:return ef("Lazy");case 13:return ef("Suspense");case 19:return ef("SuspenseList");case 0:case 2:case 15:return e=Lg(e.type,!1),e;case 11:return e=Lg(e.type.render,!1),e;case 1:return e=Lg(e.type,!0),e;default:return""}}function b1(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ou:return"Fragment";case iu:return"Portal";case v1:return"Profiler";case Cw:return"StrictMode";case y1:return"Suspense";case w1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case eC:return(e.displayName||"Context")+".Consumer";case ZE:return(e._context.displayName||"Context")+".Provider";case Tw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Aw:return t=e.displayName||null,t!==null?t:b1(e.type)||"Memo";case wo:t=e._payload,e=e._init;try{return b1(e(t))}catch{}}return null}function vM(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return b1(t);case 8:return t===Cw?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Zo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function rC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yM(e){var t=rC(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function P0(e){e._valueTracker||(e._valueTracker=yM(e))}function nC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=rC(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Hm(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function _1(e,t){var r=t.checked;return Tr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Z2(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Zo(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function sC(e,t){t=t.checked,t!=null&&Ew(e,"checked",t,!1)}function N1(e,t){sC(e,t);var r=Zo(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?S1(e,t.type,r):t.hasOwnProperty("defaultValue")&&S1(e,t.type,Zo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function eN(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function S1(e,t,r){(t!=="number"||Hm(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var tf=Array.isArray;function bu(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Zo(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function k1(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ee(91));return Tr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function tN(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(Ee(92));if(tf(r)){if(1<r.length)throw Error(Ee(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Zo(r)}}function aC(e,t){var r=Zo(t.value),n=Zo(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function rN(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function iC(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function j1(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?iC(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var R0,oC=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(R0=R0||document.createElement("div"),R0.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=R0.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Lf(e,t){if(t){var r=e.firstChild;
vendor: 7,371 bytes, line 37
37if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var hf={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},wM=["Webkit","ms","Moz","O"];Object.keys(hf).forEach(function(e){wM.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hf[t]=hf[e]})});function lC(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||hf.hasOwnProperty(e)&&hf[e]?(""+t).trim():t+"px"}function cC(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=lC(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var bM=Tr({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 E1(e,t){if(t){if(bM[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ee(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ee(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ee(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ee(62))}}function C1(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 T1=null;function Pw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var A1=null,_u=null,Nu=null;function nN(e){if(e=Gh(e)){if(typeof A1!="function")throw Error(Ee(280));var t=e.stateNode;t&&(t=fx(t),A1(e.stateNode,e.type,t))}}function uC(e){_u?Nu?Nu.push(e):Nu=[e]:_u=e}function dC(){if(_u){var e=_u,t=Nu;if(Nu=_u=null,nN(e),t)for(e=0;e<t.length;e++)nN(t[e])}}function fC(e,t){return e(t)}function hC(){}var Bg=!1;function mC(e,t,r){if(Bg)return e(t,r);Bg=!0;try{return fC(e,t,r)}finally{Bg=!1,(_u!==null||Nu!==null)&&(hC(),dC())}}function Bf(e,t){var r=e.stateNode;if(r===null)return null;var n=fx(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(Ee(231,t,typeof r));return r}var P1=!1;if(Gi)try{var zd={};Object.defineProperty(zd,"passive",{get:function(){P1=!0}}),window.addEventListener("test",zd,zd),window.removeEventListener("test",zd,zd)}catch{P1=!1}function _M(e,t,r,n,s,a,o,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var mf=!1,Vm=null,Gm=!1,R1=null,NM={onError:function(e){mf=!0,Vm=e}};function SM(e,t,r,n,s,a,o,l,c){mf=!1,Vm=null,_M.apply(NM,arguments)}function kM(e,t,r,n,s,a,o,l,c){if(SM.apply(this,arguments),mf){if(mf){var u=Vm;mf=!1,Vm=null}else throw Error(Ee(198));Gm||(Gm=!0,R1=u)}}function Nc(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function pC(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function sN(e){if(Nc(e)!==e)throw Error(Ee(188))}function jM(e){var t=e.alternate;if(!t){if(t=Nc(e),t===null)throw Error(Ee(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var a=s.alternate;if(a===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===a.child){for(a=s.child;a;){if(a===r)return sN(s),e;if(a===n)return sN(s),t;a=a.sibling}throw Error(Ee(188))}if(r.return!==n.return)r=s,n=a;else{for(var o=!1,l=s.child;l;){if(l===r){o=!0,r=s,n=a;break}if(l===n){o=!0,n=s,r=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===r){o=!0,r=a,n=s;break}if(l===n){o=!0,n=a,r=s;break}l=l.sibling}if(!o)throw Error(Ee(189))}}if(r.alternate!==n)throw Error(Ee(190))}if(r.tag!==3)throw Error(Ee(188));return r.stateNode.current===r?e:t}function xC(e){return e=jM(e),e!==null?gC(e):null}function gC(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=gC(e);if(t!==null)return t;e=e.sibling}return null}var vC=zs.unstable_scheduleCallback,aN=zs.unstable_cancelCallback,EM=zs.unstable_shouldYield,CM=zs.unstable_requestPaint,$r=zs.unstable_now,TM=zs.unstable_getCurrentPriorityLevel,Rw=zs.unstable_ImmediatePriority,yC=zs.unstable_UserBlockingPriority,qm=zs.unstable_NormalPriority,AM=zs.unstable_LowPriority,wC=zs.unstable_IdlePriority,lx=null,pi=null;function PM(e){if(pi&&typeof pi.onCommitFiberRoot=="function")try{pi.onCommitFiberRoot(lx,e,void 0,(e.current.flags&128)===128)}catch{}}var La=Math.clz32?Math.clz32:DM,RM=Math.log,OM=Math.LN2;function DM(e){return e>>>=0,e===0?32:31-(RM(e)/OM|0)|0}var O0=64,D0=4194304;function rf(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Km(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var l=o&~s;l!==0?n=rf(l):(a&=o,a!==0&&(n=rf(a)))}else o=r&~s,o!==0?n=rf(o):a!==0&&(n=rf(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,a=t&-t,s>=a||s===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-La(t),s=1<<r,n|=e[r],t&=~s;return n}function IM(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function FM(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-La(a),l=1<<o,c=s[o];c===-1?(!(l&r)||l&n)&&(s[o]=IM(l,t)):c<=t&&(e.expiredLanes|=l),a&=~l}}function O1(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function bC(){var e=O0;return O0<<=1,!(O0&4194240)&&(O0=64),e}function $g(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}
vendor: 4,087 bytes, line 37
37function Hh(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-La(t),e[t]=r}function MM(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-La(r),a=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~a}}function Ow(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-La(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var Zt=0;function _C(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var NC,Dw,SC,kC,jC,D1=!1,I0=[],Wo=null,zo=null,Ho=null,$f=new Map,Uf=new Map,ko=[],LM="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function iN(e,t){switch(e){case"focusin":case"focusout":Wo=null;break;case"dragenter":case"dragleave":zo=null;break;case"mouseover":case"mouseout":Ho=null;break;case"pointerover":case"pointerout":$f.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uf.delete(t.pointerId)}}function Hd(e,t,r,n,s,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[s]},t!==null&&(t=Gh(t),t!==null&&Dw(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function BM(e,t,r,n,s){switch(t){case"focusin":return Wo=Hd(Wo,e,t,r,n,s),!0;case"dragenter":return zo=Hd(zo,e,t,r,n,s),!0;case"mouseover":return Ho=Hd(Ho,e,t,r,n,s),!0;case"pointerover":var a=s.pointerId;return $f.set(a,Hd($f.get(a)||null,e,t,r,n,s)),!0;case"gotpointercapture":return a=s.pointerId,Uf.set(a,Hd(Uf.get(a)||null,e,t,r,n,s)),!0}return!1}function EC(e){var t=Ul(e.target);if(t!==null){var r=Nc(t);if(r!==null){if(t=r.tag,t===13){if(t=pC(r),t!==null){e.blockedOn=t,jC(e.priority,function(){SC(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Sm(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=I1(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);T1=n,r.target.dispatchEvent(n),T1=null}else return t=Gh(r),t!==null&&Dw(t),e.blockedOn=r,!1;t.shift()}return!0}function oN(e,t,r){Sm(e)&&r.delete(t)}function $M(){D1=!1,Wo!==null&&Sm(Wo)&&(Wo=null),zo!==null&&Sm(zo)&&(zo=null),Ho!==null&&Sm(Ho)&&(Ho=null),$f.forEach(oN),Uf.forEach(oN)}function Vd(e,t){e.blockedOn===t&&(e.blockedOn=null,D1||(D1=!0,zs.unstable_scheduleCallback(zs.unstable_NormalPriority,$M)))}function Wf(e){function t(s){return Vd(s,e)}if(0<I0.length){Vd(I0[0],e);for(var r=1;r<I0.length;r++){var n=I0[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Wo!==null&&Vd(Wo,e),zo!==null&&Vd(zo,e),Ho!==null&&Vd(Ho,e),$f.forEach(t),Uf.forEach(t),r=0;r<ko.length;r++)n=ko[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<ko.length&&(r=ko[0],r.blockedOn===null);)EC(r),r.blockedOn===null&&ko.shift()}var Su=ro.ReactCurrentBatchConfig,Ym=!0;function UM(e,t,r,n){var s=Zt,a=Su.transition;Su.transition=null;try{Zt=1,Iw(e,t,r,n)}finally{Zt=s,Su.transition=a}}function WM(e,t,r,n){var s=Zt,a=Su.transition;Su.transition=null;try{Zt=4,Iw(e,t,r,n)}finally{Zt=s,Su.transition=a}}function Iw(e,t,r,n){if(Ym){var s=I1(e,t,r,n);if(s===null)Xg(e,t,n,Xm,r),iN(e,n);else if(BM(s,e,t,r,n))n.stopPropagation();else if(iN(e,n),t&4&&-1<LM.indexOf(e)){for(;s!==null;){var a=Gh(s);if(a!==null&&NC(a),a=I1(e,t,r,n),a===null&&Xg(e,t,n,Xm,r),a===s)break;s=a}s!==null&&n.stopPropagation()}else Xg(e,t,n,null,r)}}var Xm=null;function I1(e,t,r,n){if(Xm=null,e=Pw(n),e=Ul(e),e!==null)if(t=Nc(e),t===null)e=null;else if(r=t.tag,r===13){if(e=pC(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Xm=e,null}
vendor: 10,401 bytes, line 37
37function CC(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(TM()){case Rw:return 1;case yC:return 4;case qm:case AM:return 16;case wC:return 536870912;default:return 16}default:return 16}}var Do=null,Fw=null,km=null;function TC(){if(km)return km;var e,t=Fw,r=t.length,n,s="value"in Do?Do.value:Do.textContent,a=s.length;for(e=0;e<r&&t[e]===s[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===s[a-n];n++);return km=s.slice(e,1<n?1-n:void 0)}function jm(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function F0(){return!0}function lN(){return!1}function Ys(e){function t(r,n,s,a,o){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(a):a[l]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?F0:lN,this.isPropagationStopped=lN,this}return Tr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=F0)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=F0)},persist:function(){},isPersistent:F0}),t}var gd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mw=Ys(gd),Vh=Tr({},gd,{view:0,detail:0}),zM=Ys(Vh),Ug,Wg,Gd,cx=Tr({},Vh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lw,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Gd&&(Gd&&e.type==="mousemove"?(Ug=e.screenX-Gd.screenX,Wg=e.screenY-Gd.screenY):Wg=Ug=0,Gd=e),Ug)},movementY:function(e){return"movementY"in e?e.movementY:Wg}}),cN=Ys(cx),HM=Tr({},cx,{dataTransfer:0}),VM=Ys(HM),GM=Tr({},Vh,{relatedTarget:0}),zg=Ys(GM),qM=Tr({},gd,{animationName:0,elapsedTime:0,pseudoElement:0}),KM=Ys(qM),YM=Tr({},gd,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),XM=Ys(YM),QM=Tr({},gd,{data:0}),uN=Ys(QM),JM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ZM={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},e6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function t6(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=e6[e])?!!t[e]:!1}function Lw(){return t6}var r6=Tr({},Vh,{key:function(e){if(e.key){var t=JM[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=jm(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ZM[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lw,charCode:function(e){return e.type==="keypress"?jm(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?jm(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),n6=Ys(r6),s6=Tr({},cx,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dN=Ys(s6),a6=Tr({},Vh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lw}),i6=Ys(a6),o6=Tr({},gd,{propertyName:0,elapsedTime:0,pseudoElement:0}),l6=Ys(o6),c6=Tr({},cx,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),u6=Ys(c6),d6=[9,13,27,32],Bw=Gi&&"CompositionEvent"in window,pf=null;Gi&&"documentMode"in document&&(pf=document.documentMode);var f6=Gi&&"TextEvent"in window&&!pf,AC=Gi&&(!Bw||pf&&8<pf&&11>=pf),fN=" ",hN=!1;function PC(e,t){switch(e){case"keyup":return d6.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function RC(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var lu=!1;function h6(e,t){switch(e){case"compositionend":return RC(t);case"keypress":return t.which!==32?null:(hN=!0,fN);case"textInput":return e=t.data,e===fN&&hN?null:e;default:return null}}function m6(e,t){if(lu)return e==="compositionend"||!Bw&&PC(e,t)?(e=TC(),km=Fw=Do=null,lu=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return AC&&t.locale!=="ko"?null:t.data;default:return null}}var p6={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function mN(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!p6[e.type]:t==="textarea"}function OC(e,t,r,n){uC(n),t=Qm(t,"onChange"),0<t.length&&(r=new Mw("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var xf=null,zf=null;function x6(e){HC(e,0)}function ux(e){var t=du(e);if(nC(t))return e}function g6(e,t){if(e==="change")return t}var DC=!1;if(Gi){var Hg;if(Gi){var Vg="oninput"in document;if(!Vg){var pN=document.createElement("div");pN.setAttribute("oninput","return;"),Vg=typeof pN.oninput=="function"}Hg=Vg}else Hg=!1;DC=Hg&&(!document.documentMode||9<document.documentMode)}function xN(){xf&&(xf.detachEvent("onpropertychange",IC),zf=xf=null)}function IC(e){if(e.propertyName==="value"&&ux(zf)){var t=[];OC(t,zf,e,Pw(e)),mC(x6,t)}}function v6(e,t,r){e==="focusin"?(xN(),xf=t,zf=r,xf.attachEvent("onpropertychange",IC)):e==="focusout"&&xN()}function y6(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ux(zf)}function w6(e,t){if(e==="click")return ux(t)}function b6(e,t){if(e==="input"||e==="change")return ux(t)}function _6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var za=typeof Object.is=="function"?Object.is:_6;function Hf(e,t){if(za(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!g1.call(t,s)||!za(e[s],t[s]))return!1}return!0}function gN(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vN(e,t){var r=gN(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=gN(r)}}function FC(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?FC(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function MC(){for(var e=window,t=Hm();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Hm(e.document)}return t}function $w(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function N6(e){var t=MC(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&FC(r.ownerDocument.documentElement,r)){if(n!==null&&$w(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,a=Math.min(n.start,s);n=n.end===void 0?a:Math.min(n.end,s),!e.extend&&a>n&&(s=n,n=a,a=s),s=vN(r,a);var o=vN(r,n);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var S6=Gi&&"documentMode"in document&&11>=document.documentMode,cu=null,F1=null,gf=null,M1=!1;function yN(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;M1||cu==null||cu!==Hm(n)||(n=cu,"selectionStart"in n&&$w(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),gf&&Hf(gf,n)||(gf=n,n=Qm(F1,"onSelect"),0<n.length&&(t=new Mw("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=cu)))}function M0(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var uu={animationend:M0("Animation","AnimationEnd"),animationiteration:M0("Animation","AnimationIteration"),animationstart:M0("Animation","AnimationStart"),transitionend:M0("Transition","TransitionEnd")},Gg={},LC={};Gi&&(LC=document.createElement("div").style,"AnimationEvent"in window||(delete uu.animationend.animation,delete uu.animationiteration.animation,delete uu.animationstart.animation),"TransitionEvent"in window||delete uu.transitionend.transition);function dx(e){if(Gg[e])return Gg[e];if(!uu[e])return e;var t=uu[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in LC)return Gg[e]=t[r];return e}var BC=dx("animationend"),$C=dx("animationiteration"),UC=dx("animationstart"),WC=dx("transitionend"),zC=new Map,wN="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ul(e,t){zC.set(e,t),_c(t,[e])}for(var qg=0;qg<wN.length;qg++){var Kg=wN[qg],k6=Kg.toLowerCase(),j6=Kg[0].toUpperCase()+Kg.slice(1);ul(k6,"on"+j6)}ul(BC,"onAnimationEnd");ul($C,"onAnimationIteration");ul(UC,"onAnimationStart");ul("dblclick","onDoubleClick");ul("focusin","onFocus");ul("focusout","onBlur");ul(WC,"onTransitionEnd");Gu("onMouseEnter",["mouseout","mouseover"]);Gu("onMouseLeave",["mouseout","mouseover"]);Gu("onPointerEnter",["pointerout","pointerover"]);Gu("onPointerLeave",["pointerout","pointerover"]);_c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));_c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));_c("onBeforeInput",["compositionend","keypress","textInput","paste"]);_c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));_c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));_c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var nf="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),E6=new Set("cancel close invalid load scroll toggle".split(" ").concat(nf));function bN(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,kM(n,t,void 0,e),e.currentTarget=null}function HC(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var o=n.length-1;0<=o;o--){var l=n[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==a&&s.isPropagationStopped())break e;bN(s,l,u),a=c}else for(o=0;o<n.length;o++){if(l=n[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==a&&s.isPropagationStopped())break e;bN(s,l,u),a=c}}}if(Gm)throw e=R1,Gm=!1,R1=null,e}function fr(e,t){var r=t[W1];r===void 0&&(r=t[W1]=new Set);var n=e+"__bubble";r.has(n)||(VC(t,e,2,!1),r.add(n))}function Yg(e,t,r){var n=0;t&&(n|=4),VC(r,e,n,t)}var L0="_reactListening"+Math.random().toString(36).slice(2);function Vf(e){if(!e[L0]){e[L0]=!0,JE.forEach(function(r){r!=="selectionchange"&&(E6.has(r)||Yg(r,!1,e),Yg(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[L0]||(t[L0]=!0,Yg("selectionchange",!1,t))}}function VC(e,t,r,n){switch(CC(t)){case 1:var s=UM;break;case 4:s=WM;break;default:s=Iw}r=s.bind(null,t,r,e),s=void 0,!P1||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function Xg(e,t,r,n,s){var a=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var l=n.stateNode.containerInfo;
vendor: 21,733 bytes, lines 37-38
37if(l===s||l.nodeType===8&&l.parentNode===s)break;if(o===4)for(o=n.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;o=o.return}for(;l!==null;){if(o=Ul(l),o===null)return;if(c=o.tag,c===5||c===6){n=a=o;continue e}l=l.parentNode}}n=n.return}mC(function(){var u=a,d=Pw(r),f=[];e:{var h=zC.get(e);if(h!==void 0){var m=Mw,g=e;switch(e){case"keypress":if(jm(r)===0)break e;case"keydown":case"keyup":m=n6;break;case"focusin":g="focus",m=zg;break;case"focusout":g="blur",m=zg;break;case"beforeblur":case"afterblur":m=zg;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=cN;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=VM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=i6;break;case BC:case $C:case UC:m=KM;break;case WC:m=l6;break;case"scroll":m=zM;break;case"wheel":m=u6;break;case"copy":case"cut":case"paste":m=XM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=dN}var p=(t&4)!==0,x=!p&&e==="scroll",b=p?h!==null?h+"Capture":null:h;p=[];for(var w=u,y;w!==null;){y=w;var _=y.stateNode;if(y.tag===5&&_!==null&&(y=_,b!==null&&(_=Bf(w,b),_!=null&&p.push(Gf(w,_,y)))),x)break;w=w.return}0<p.length&&(h=new m(h,g,null,r,d),f.push({event:h,listeners:p}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&r!==T1&&(g=r.relatedTarget||r.fromElement)&&(Ul(g)||g[qi]))break e;if((m||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,m?(g=r.relatedTarget||r.toElement,m=u,g=g?Ul(g):null,g!==null&&(x=Nc(g),g!==x||g.tag!==5&&g.tag!==6)&&(g=null)):(m=null,g=u),m!==g)){if(p=cN,_="onMouseLeave",b="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(p=dN,_="onPointerLeave",b="onPointerEnter",w="pointer"),x=m==null?h:du(m),y=g==null?h:du(g),h=new p(_,w+"leave",m,r,d),h.target=x,h.relatedTarget=y,_=null,Ul(d)===u&&(p=new p(b,w+"enter",g,r,d),p.target=y,p.relatedTarget=x,_=p),x=_,m&&g)t:{for(p=m,b=g,w=0,y=p;y;y=Lc(y))w++;for(y=0,_=b;_;_=Lc(_))y++;for(;0<w-y;)p=Lc(p),w--;for(;0<y-w;)b=Lc(b),y--;for(;w--;){if(p===b||b!==null&&p===b.alternate)break t;p=Lc(p),b=Lc(b)}p=null}else p=null;m!==null&&_N(f,h,m,p,!1),g!==null&&x!==null&&_N(f,x,g,p,!0)}}e:{if(h=u?du(u):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var N=g6;else if(mN(h))if(DC)N=b6;else{N=y6;var k=v6}else(m=h.nodeName)&&m.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(N=w6);if(N&&(N=N(e,u))){OC(f,N,r,d);break e}k&&k(e,h,u),e==="focusout"&&(k=h._wrapperState)&&k.controlled&&h.type==="number"&&S1(h,"number",h.value)}switch(k=u?du(u):window,e){case"focusin":(mN(k)||k.contentEditable==="true")&&(cu=k,F1=u,gf=null);break;case"focusout":gf=F1=cu=null;break;case"mousedown":M1=!0;break;case"contextmenu":case"mouseup":case"dragend":M1=!1,yN(f,r,d);break;case"selectionchange":if(S6)break;case"keydown":case"keyup":yN(f,r,d)}var S;if(Bw)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else lu?PC(e,r)&&(E="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(E="onCompositionStart");E&&(AC&&r.locale!=="ko"&&(lu||E!=="onCompositionStart"?E==="onCompositionEnd"&&lu&&(S=TC()):(Do=d,Fw="value"in Do?Do.value:Do.textContent,lu=!0)),k=Qm(u,E),0<k.length&&(E=new uN(E,e,null,r,d),f.push({event:E,listeners:k}),S?E.data=S:(S=RC(r),S!==null&&(E.data=S)))),(S=f6?h6(e,r):m6(e,r))&&(u=Qm(u,"onBeforeInput"),0<u.length&&(d=new uN("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:u}),d.data=S))}HC(f,t)})}function Gf(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Qm(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,a=s.stateNode;s.tag===5&&a!==null&&(s=a,a=Bf(e,r),a!=null&&n.unshift(Gf(e,a,s)),a=Bf(e,t),a!=null&&n.push(Gf(e,a,s))),e=e.return}return n}function Lc(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function _N(e,t,r,n,s){for(var a=t._reactName,o=[];r!==null&&r!==n;){var l=r,c=l.alternate,u=l.stateNode;if(c!==null&&c===n)break;l.tag===5&&u!==null&&(l=u,s?(c=Bf(r,a),c!=null&&o.unshift(Gf(r,c,l))):s||(c=Bf(r,a),c!=null&&o.push(Gf(r,c,l)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var C6=/\r\n?/g,T6=/\u0000|\uFFFD/g;function NN(e){return(typeof e=="string"?e:""+e).replace(C6,`
38`).replace(T6,"")}function B0(e,t,r){if(t=NN(t),NN(e)!==t&&r)throw Error(Ee(425))}function Jm(){}var L1=null,B1=null;function $1(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var U1=typeof setTimeout=="function"?setTimeout:void 0,A6=typeof clearTimeout=="function"?clearTimeout:void 0,SN=typeof Promise=="function"?Promise:void 0,P6=typeof queueMicrotask=="function"?queueMicrotask:typeof SN<"u"?function(e){return SN.resolve(null).then(e).catch(R6)}:U1;function R6(e){setTimeout(function(){throw e})}function Qg(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),Wf(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Wf(t)}function Vo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function kN(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var vd=Math.random().toString(36).slice(2),ii="__reactFiber$"+vd,qf="__reactProps$"+vd,qi="__reactContainer$"+vd,W1="__reactEvents$"+vd,O6="__reactListeners$"+vd,D6="__reactHandles$"+vd;function Ul(e){var t=e[ii];if(t)return t;for(var r=e.parentNode;r;){if(t=r[qi]||r[ii]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=kN(e);e!==null;){if(r=e[ii])return r;e=kN(e)}return t}e=r,r=e.parentNode}return null}function Gh(e){return e=e[ii]||e[qi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function du(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ee(33))}function fx(e){return e[qf]||null}var z1=[],fu=-1;function dl(e){return{current:e}}function mr(e){0>fu||(e.current=z1[fu],z1[fu]=null,fu--)}function lr(e,t){fu++,z1[fu]=e.current,e.current=t}var el={},zn=dl(el),us=dl(!1),ic=el;function qu(e,t){var r=e.type.contextTypes;if(!r)return el;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},a;for(a in r)s[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ds(e){return e=e.childContextTypes,e!=null}function Zm(){mr(us),mr(zn)}function jN(e,t,r){if(zn.current!==el)throw Error(Ee(168));lr(zn,t),lr(us,r)}function GC(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(Ee(108,vM(e)||"Unknown",s));return Tr({},r,n)}function ep(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||el,ic=zn.current,lr(zn,e),lr(us,us.current),!0}function EN(e,t,r){var n=e.stateNode;if(!n)throw Error(Ee(169));r?(e=GC(e,t,ic),n.__reactInternalMemoizedMergedChildContext=e,mr(us),mr(zn),lr(zn,e)):mr(us),lr(us,r)}var Fi=null,hx=!1,Jg=!1;function qC(e){Fi===null?Fi=[e]:Fi.push(e)}function I6(e){hx=!0,qC(e)}function fl(){if(!Jg&&Fi!==null){Jg=!0;var e=0,t=Zt;try{var r=Fi;for(Zt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Fi=null,hx=!1}catch(s){throw Fi!==null&&(Fi=Fi.slice(e+1)),vC(Rw,fl),s}finally{Zt=t,Jg=!1}}return null}var hu=[],mu=0,tp=null,rp=0,ia=[],oa=0,oc=null,Li=1,Bi="";function Dl(e,t){hu[mu++]=rp,hu[mu++]=tp,tp=e,rp=t}function KC(e,t,r){ia[oa++]=Li,ia[oa++]=Bi,ia[oa++]=oc,oc=e;var n=Li;e=Bi;var s=32-La(n)-1;n&=~(1<<s),r+=1;var a=32-La(t)+s;if(30<a){var o=s-s%5;a=(n&(1<<o)-1).toString(32),n>>=o,s-=o,Li=1<<32-La(t)+s|r<<s|n,Bi=a+e}else Li=1<<a|r<<s|n,Bi=e}function Uw(e){e.return!==null&&(Dl(e,1),KC(e,1,0))}function Ww(e){for(;e===tp;)tp=hu[--mu],hu[mu]=null,rp=hu[--mu],hu[mu]=null;for(;e===oc;)oc=ia[--oa],ia[oa]=null,Bi=ia[--oa],ia[oa]=null,Li=ia[--oa],ia[oa]=null}var $s=null,Ls=null,vr=!1,Da=null;function YC(e,t){var r=la(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function CN(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,$s=e,Ls=Vo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,$s=e,Ls=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=oc!==null?{id:Li,overflow:Bi}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=la(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,$s=e,Ls=null,!0):!1;default:return!1}}function H1(e){return(e.mode&1)!==0&&(e.flags&128)===0}function V1(e){if(vr){var t=Ls;if(t){var r=t;if(!CN(e,t)){if(H1(e))throw Error(Ee(418));t=Vo(r.nextSibling);var n=$s;t&&CN(e,t)?YC(n,r):(e.flags=e.flags&-4097|2,vr=!1,$s=e)}}else{if(H1(e))throw Error(Ee(418));e.flags=e.flags&-4097|2,vr=!1,$s=e}}}function TN(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;$s=e}function $0(e){if(e!==$s)return!1;if(!vr)return TN(e),vr=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!$1(e.type,e.memoizedProps)),t&&(t=Ls)){if(H1(e))throw XC(),Error(Ee(418));for(;t;)YC(e,t),t=Vo(t.nextSibling)}if(TN(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ee(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Ls=Vo(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Ls=null}}else Ls=$s?Vo(e.stateNode.nextSibling):null;return!0}function XC(){for(var e=Ls;e;)e=Vo(e.nextSibling)}function Ku(){Ls=$s=null,vr=!1}function zw(e){Da===null?Da=[e]:Da.push(e)}var F6=ro.ReactCurrentBatchConfig;function qd(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(Ee(309));var n=r.stateNode}if(!n)throw Error(Ee(147,e));var s=n,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var l=s.refs;o===null?delete l[a]:l[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(Ee(284));if(!r._owner)throw Error(Ee(290,e))}return e}function U0(e,t){throw e=Object.prototype.toString.call(t),Error(Ee(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function AN(e){var t=e._init;return t(e._payload)}function QC(e){function t(b,w){if(e){var y=b.deletions;y===null?(b.deletions=[w],b.flags|=16):y.push(w)}}function r(b,w){if(!e)return null;for(;w!==null;)t(b,w),w=w.sibling;return null}function n(b,w){for(b=new Map;w!==null;)w.key!==null?b.set(w.key,w):b.set(w.index,w),w=w.sibling;return b}function s(b,w){return b=Yo(b,w),b.index=0,b.sibling=null,b}function a(b,w,y){return b.index=y,e?(y=b.alternate,y!==null?(y=y.index,y<w?(b.flags|=2,w):y):(b.flags|=2,w)):(b.flags|=1048576,w)}function o(b){return e&&b.alternate===null&&(b.flags|=2),b}function l(b,w,y,_){return w===null||w.tag!==6?(w=av(y,b.mode,_),w.return=b,w):(w=s(w,y),w.return=b,w)}function c(b,w,y,_){var N=y.type;return N===ou?d(b,w,y.props.children,_,y.key):w!==null&&(w.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===wo&&AN(N)===w.type)?(_=s(w,y.props),_.ref=qd(b,w,y),_.return=b,_):(_=Om(y.type,y.key,y.props,null,b.mode,_),_.ref=qd(b,w,y),_.return=b,_)}function u(b,w,y,_){return w===null||w.tag!==4||w.stateNode.containerInfo!==y.containerInfo||w.stateNode.implementation!==y.implementation?(w=iv(y,b.mode,_),w.return=b,w):(w=s(w,y.children||[]),w.return=b,w)}function d(b,w,y,_,N){return w===null||w.tag!==7?(w=ec(y,b.mode,_,N),w.return=b,w):(w=s(w,y),w.return=b,w)}function f(b,w,y){if(typeof w=="string"&&w!==""||typeof w=="number")return w=av(""+w,b.mode,y),w.return=b,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case A0:return y=Om(w.type,w.key,w.props,null,b.mode,y),y.ref=qd(b,null,w),y.return=b,y;case iu:return w=iv(w,b.mode,y),w.return=b,w;case wo:var _=w._init;return f(b,_(w._payload),y)}if(tf(w)||Wd(w))return w=ec(w,b.mode,y,null),w.return=b,w;U0(b,w)}return null}function h(b,w,y,_){var N=w!==null?w.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return N!==null?null:l(b,w,""+y,_);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case A0:return y.key===N?c(b,w,y,_):null;case iu:return y.key===N?u(b,w,y,_):null;case wo:return N=y._init,h(b,w,N(y._payload),_)}if(tf(y)||Wd(y))return N!==null?null:d(b,w,y,_,null);U0(b,y)}return null}function m(b,w,y,_,N){if(typeof _=="string"&&_!==""||typeof _=="number")return b=b.get(y)||null,l(w,b,""+_,N);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case A0:return b=b.get(_.key===null?y:_.key)||null,c(w,b,_,N);case iu:return b=b.get(_.key===null?y:_.key)||null,u(w,b,_,N);case wo:var k=_._init;return m(b,w,y,k(_._payload),N)}if(tf(_)||Wd(_))return b=b.get(y)||null,d(w,b,_,N,null);U0(w,_)}return null}function g(b,w,y,_){for(var N=null,k=null,S=w,E=w=0,j=null;S!==null&&E<y.length;E++){S.index>E?(j=S,S=null):j=S.sibling;var T=h(b,S,y[E],_);if(T===null){S===null&&(S=j);break}e&&S&&T.alternate===null&&t(b,S),w=a(T,w,E),k===null?N=T:k.sibling=T,k=T,S=j}if(E===y.length)return r(b,S),vr&&Dl(b,E),N;if(S===null){for(;E<y.length;E++)S=f(b,y[E],_),S!==null&&(w=a(S,w,E),k===null?N=S:k.sibling=S,k=S);return vr&&Dl(b,E),N}for(S=n(b,S);E<y.length;E++)j=m(S,b,E,y[E],_),j!==null&&(e&&j.alternate!==null&&S.delete(j.key===null?E:j.key),w=a(j,w,E),k===null?N=j:k.sibling=j,k=j);return e&&S.forEach(function(R){return t(b,R)}),vr&&Dl(b,E),N}function p(b,w,y,_){var N=Wd(y);if(typeof N!="function")throw Error(Ee(150));if(y=N.call(y),y==null)throw Error(Ee(151));for(var k=N=null,S=w,E=w=0,j=null,T=y.next();S!==null&&!T.done;E++,T=y.next()){S.index>E?(j=S,S=null):j=S.sibling;var R=h(b,S,T.value,_);if(R===null){S===null&&(S=j);break}e&&S&&R.alternate===null&&t(b,S),w=a(R,w,E),k===null?N=R:k.sibling=R,k=R,S=j}if(T.done)return r(b,S),vr&&Dl(b,E),N;if(S===null){for(;!T.done;E++,T=y.next())T=f(b,T.value,_),T!==null&&(w=a(T,w,E),k===null?N=T:k.sibling=T,k=T);return vr&&Dl(b,E),N}for(S=n(b,S);!T.done;E++,T=y.next())T=m(S,b,E,T.value,_),T!==null&&(e&&T.alternate!==null&&S.delete(T.key===null?E:T.key),w=a(T,w,E),k===null?N=T:k.sibling=T,k=T);return e&&S.forEach(function(P){return t(b,P)}),vr&&Dl(b,E),N}function x(b,w,y,_){if(typeof y=="object"&&y!==null&&y.type===ou&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case A0:e:{for(var N=y.key,k=w;k!==null;){if(k.key===N){if(N=y.type,N===ou){if(k.tag===7){r(b,k.sibling),w=s(k,y.props.children),w.return=b,b=w;break e}}else if(k.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===wo&&AN(N)===k.type){r(b,k.sibling),w=s(k,y.props),w.ref=qd(b,k,y),w.return=b,b=w;break e}r(b,k);break}else t(b,k);k=k.sibling}y.type===ou?(w=ec(y.props.children,b.mode,_,y.key),w.return=b,b=w):(_=Om(y.type,y.key,y.props,null,b.mode,_),_.ref=qd(b,w,y),_.return=b,b=_)}return o(b);case iu:e:{for(k=y.key;w!==null;){if(w.key===k)if(w.tag===4&&w.stateNode.containerInfo===y.containerInfo&&w.stateNode.implementation===y.implementation){r(b,w.sibling),w=s(w,y.children||[]),w.return=b,b=w;break e}else{r(b,w);break}else t(b,w);w=w.sibling}w=iv(y,b.mode,_),w.return=b,b=w}return o(b);case wo:return k=y._init,x(b,w,k(y._payload),_)}if(tf(y))return g(b,w,y,_);if(Wd(y))return p(b,w,y,_);U0(b,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,w!==null&&w.tag===6?(r(b,w.sibling),w=s(w,y),w.return=b,b=w):(r(b,w),w=av(y,b.mode,_),w.return=b,b=w),o(b)):r(b,w)}return x}var Yu=QC(!0),JC=QC(!1),np=dl(null),sp=null,pu=null,Hw=null;function Vw(){Hw=pu=sp=null}function Gw(e){var t=np.current;mr(np),e._currentValue=t}function G1(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function ku(e,t){sp=e,Hw=pu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(cs=!0),e.firstContext=null)}function ha(e){var t=e._currentValue;if(Hw!==e)if(e={context:e,memoizedValue:t,next:null},pu===null){if(sp===null)throw Error(Ee(308));pu=e,sp.dependencies={lanes:0,firstContext:e}}else pu=pu.next=e;return t}var Wl=null;function qw(e){Wl===null?Wl=[e]:Wl.push(e)}function ZC(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,qw(t)):(r.next=s.next,s.next=r),t.interleaved=r,Ki(e,n)}function Ki(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var bo=!1;function Kw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function eT(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ui(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Go(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Ot&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,Ki(e,r)}return s=n.interleaved,s===null?(t.next=t,qw(n)):(t.next=s.next,s.next=t),n.interleaved=t,Ki(e,r)}function Em(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Ow(e,r)}}function PN(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?s=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?s=a=t:a=a.next=t}else s=a=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function ap(e,t,r,n){var s=e.updateQueue;bo=!1;var a=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?a=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(a!==null){var f=s.baseState;o=0,d=u=c=null,l=a;do{var h=l.lane,m=l.eventTime;if((n&h)===h){d!==null&&(d=d.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,p=l;switch(h=t,m=r,p.tag){case 1:if(g=p.payload,typeof g=="function"){f=g.call(m,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=p.payload,h=typeof g=="function"?g.call(m,f,h):g,h==null)break e;f=Tr({},f,h);break e;case 2:bo=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[l]:h.push(l))}else m={eventTime:m,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=m,c=f):d=d.next=m,o|=h;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;h=l,l=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(d===null&&(c=f),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else a===null&&(s.shared.lanes=0);cc|=o,e.lanes=o,e.memoizedState=f}}function RN(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(Ee(191,s));s.call(n)}}}var qh={},xi=dl(qh),Kf=dl(qh),Yf=dl(qh);function zl(e){if(e===qh)throw Error(Ee(174));return e}function Yw(e,t){switch(lr(Yf,t),lr(Kf,e),lr(xi,qh),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:j1(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=j1(t,e)}mr(xi),lr(xi,t)}function Xu(){mr(xi),mr(Kf),mr(Yf)}function tT(e){zl(Yf.current);var t=zl(xi.current),r=j1(t,e.type);t!==r&&(lr(Kf,e),lr(xi,r))}function Xw(e){Kf.current===e&&(mr(xi),mr(Kf))}var Nr=dl(0);function ip(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Zg=[];function Qw(){for(var e=0;e<Zg.length;e++)Zg[e]._workInProgressVersionPrimary=null;Zg.length=0}var Cm=ro.ReactCurrentDispatcher,ev=ro.ReactCurrentBatchConfig,lc=0,Er=null,an=null,pn=null,op=!1,vf=!1,Xf=0,M6=0;function On(){throw Error(Ee(321))}function Jw(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!za(e[r],t[r]))return!1;return!0}function Zw(e,t,r,n,s,a){if(lc=a,Er=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Cm.current=e===null||e.memoizedState===null?U6:W6,e=r(n,s),vf){a=0;
vendor: 4,514 bytes, line 38
38do{if(vf=!1,Xf=0,25<=a)throw Error(Ee(301));a+=1,pn=an=null,t.updateQueue=null,Cm.current=z6,e=r(n,s)}while(vf)}if(Cm.current=lp,t=an!==null&&an.next!==null,lc=0,pn=an=Er=null,op=!1,t)throw Error(Ee(300));return e}function eb(){var e=Xf!==0;return Xf=0,e}function ri(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pn===null?Er.memoizedState=pn=e:pn=pn.next=e,pn}function ma(){if(an===null){var e=Er.alternate;e=e!==null?e.memoizedState:null}else e=an.next;var t=pn===null?Er.memoizedState:pn.next;if(t!==null)pn=t,an=e;else{if(e===null)throw Error(Ee(310));an=e,e={memoizedState:an.memoizedState,baseState:an.baseState,baseQueue:an.baseQueue,queue:an.queue,next:null},pn===null?Er.memoizedState=pn=e:pn=pn.next=e}return pn}function Qf(e,t){return typeof t=="function"?t(e):t}function tv(e){var t=ma(),r=t.queue;if(r===null)throw Error(Ee(311));r.lastRenderedReducer=e;var n=an,s=n.baseQueue,a=r.pending;if(a!==null){if(s!==null){var o=s.next;s.next=a.next,a.next=o}n.baseQueue=s=a,r.pending=null}if(s!==null){a=s.next,n=n.baseState;var l=o=null,c=null,u=a;do{var d=u.lane;if((lc&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=f,o=n):c=c.next=f,Er.lanes|=d,cc|=d}u=u.next}while(u!==null&&u!==a);c===null?o=n:c.next=l,za(n,t.memoizedState)||(cs=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do a=s.lane,Er.lanes|=a,cc|=a,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function rv(e){var t=ma(),r=t.queue;if(r===null)throw Error(Ee(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,a=t.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do a=e(a,o.action),o=o.next;while(o!==s);za(a,t.memoizedState)||(cs=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function rT(){}function nT(e,t){var r=Er,n=ma(),s=t(),a=!za(n.memoizedState,s);if(a&&(n.memoizedState=s,cs=!0),n=n.queue,tb(iT.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||pn!==null&&pn.memoizedState.tag&1){if(r.flags|=2048,Jf(9,aT.bind(null,r,n,s,t),void 0,null),yn===null)throw Error(Ee(349));lc&30||sT(r,t,s)}return s}function sT(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Er.updateQueue,t===null?(t={lastEffect:null,stores:null},Er.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function aT(e,t,r,n){t.value=r,t.getSnapshot=n,oT(t)&&lT(e)}function iT(e,t,r){return r(function(){oT(t)&&lT(e)})}function oT(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!za(e,r)}catch{return!0}}function lT(e){var t=Ki(e,1);t!==null&&Ba(t,e,1,-1)}function ON(e){var t=ri();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Qf,lastRenderedState:e},t.queue=e,e=e.dispatch=$6.bind(null,Er,e),[t.memoizedState,e]}function Jf(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Er.updateQueue,t===null?(t={lastEffect:null,stores:null},Er.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function cT(){return ma().memoizedState}function Tm(e,t,r,n){var s=ri();Er.flags|=e,s.memoizedState=Jf(1|t,r,void 0,n===void 0?null:n)}function mx(e,t,r,n){var s=ma();n=n===void 0?null:n;var a=void 0;if(an!==null){var o=an.memoizedState;if(a=o.destroy,n!==null&&Jw(n,o.deps)){s.memoizedState=Jf(t,r,a,n);return}}Er.flags|=e,s.memoizedState=Jf(1|t,r,a,n)}function DN(e,t){return Tm(8390656,8,e,t)}function tb(e,t){return mx(2048,8,e,t)}function uT(e,t){return mx(4,2,e,t)}function dT(e,t){return mx(4,4,e,t)}function fT(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function hT(e,t,r){return r=r!=null?r.concat([e]):null,mx(4,4,fT.bind(null,t,e),r)}function rb(){}function mT(e,t){var r=ma();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Jw(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function pT(e,t){var r=ma();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Jw(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function xT(e,t,r){return lc&21?(za(r,t)||(r=bC(),Er.lanes|=r,cc|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,
vendor: 9,517 bytes, lines 38-40
38cs=!0),e.memoizedState=r)}function L6(e,t){var r=Zt;Zt=r!==0&&4>r?r:4,e(!0);var n=ev.transition;ev.transition={};try{e(!1),t()}finally{Zt=r,ev.transition=n}}function gT(){return ma().memoizedState}function B6(e,t,r){var n=Ko(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},vT(e))yT(t,r);else if(r=ZC(e,t,r,n),r!==null){var s=Jn();Ba(r,e,n,s),wT(r,t,n)}}function $6(e,t,r){var n=Ko(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(vT(e))yT(t,s);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,l=a(o,r);if(s.hasEagerState=!0,s.eagerState=l,za(l,o)){var c=t.interleaved;c===null?(s.next=s,qw(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}r=ZC(e,t,s,n),r!==null&&(s=Jn(),Ba(r,e,n,s),wT(r,t,n))}}function vT(e){var t=e.alternate;return e===Er||t!==null&&t===Er}function yT(e,t){vf=op=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function wT(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Ow(e,r)}}var lp={readContext:ha,useCallback:On,useContext:On,useEffect:On,useImperativeHandle:On,useInsertionEffect:On,useLayoutEffect:On,useMemo:On,useReducer:On,useRef:On,useState:On,useDebugValue:On,useDeferredValue:On,useTransition:On,useMutableSource:On,useSyncExternalStore:On,useId:On,unstable_isNewReconciler:!1},U6={readContext:ha,useCallback:function(e,t){return ri().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:DN,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Tm(4194308,4,fT.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Tm(4194308,4,e,t)},useInsertionEffect:function(e,t){return Tm(4,2,e,t)},useMemo:function(e,t){var r=ri();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=ri();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=B6.bind(null,Er,e),[n.memoizedState,e]},useRef:function(e){var t=ri();return e={current:e},t.memoizedState=e},useState:ON,useDebugValue:rb,useDeferredValue:function(e){return ri().memoizedState=e},useTransition:function(){var e=ON(!1),t=e[0];return e=L6.bind(null,e[1]),ri().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Er,s=ri();if(vr){if(r===void 0)throw Error(Ee(407));r=r()}else{if(r=t(),yn===null)throw Error(Ee(349));lc&30||sT(n,t,r)}s.memoizedState=r;var a={value:r,getSnapshot:t};return s.queue=a,DN(iT.bind(null,n,a,e),[e]),n.flags|=2048,Jf(9,aT.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=ri(),t=yn.identifierPrefix;if(vr){var r=Bi,n=Li;r=(n&~(1<<32-La(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Xf++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=M6++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},W6={readContext:ha,useCallback:mT,useContext:ha,useEffect:tb,useImperativeHandle:hT,useInsertionEffect:uT,useLayoutEffect:dT,useMemo:pT,useReducer:tv,useRef:cT,useState:function(){return tv(Qf)},useDebugValue:rb,useDeferredValue:function(e){var t=ma();return xT(t,an.memoizedState,e)},useTransition:function(){var e=tv(Qf)[0],t=ma().memoizedState;return[e,t]},useMutableSource:rT,useSyncExternalStore:nT,useId:gT,unstable_isNewReconciler:!1},z6={readContext:ha,useCallback:mT,useContext:ha,useEffect:tb,useImperativeHandle:hT,useInsertionEffect:uT,useLayoutEffect:dT,useMemo:pT,useReducer:rv,useRef:cT,useState:function(){return rv(Qf)},useDebugValue:rb,useDeferredValue:function(e){var t=ma();return an===null?t.memoizedState=e:xT(t,an.memoizedState,e)},useTransition:function(){var e=rv(Qf)[0],t=ma().memoizedState;return[e,t]},useMutableSource:rT,useSyncExternalStore:nT,useId:gT,unstable_isNewReconciler:!1};function Ea(e,t){if(e&&e.defaultProps){t=Tr({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function q1(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Tr({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var px={isMounted:function(e){return(e=e._reactInternals)?Nc(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Jn(),s=Ko(e),a=Ui(n,s);a.payload=t,r!=null&&(a.callback=r),t=Go(e,a,s),t!==null&&(Ba(t,e,s,n),Em(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Jn(),s=Ko(e),a=Ui(n,s);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=Go(e,a,s),t!==null&&(Ba(t,e,s,n),Em(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Jn(),n=Ko(e),s=Ui(r,n);s.tag=2,t!=null&&(s.callback=t),t=Go(e,s,n),t!==null&&(Ba(t,e,n,r),Em(t,e,n))}};function IN(e,t,r,n,s,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,o):t.prototype&&t.prototype.isPureReactComponent?!Hf(r,n)||!Hf(s,a):!0}function bT(e,t,r){var n=!1,s=el,a=t.contextType;return typeof a=="object"&&a!==null?a=ha(a):(s=ds(t)?ic:zn.current,n=t.contextTypes,a=(n=n!=null)?qu(e,s):el),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=px,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=a),t}function FN(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&px.enqueueReplaceState(t,t.state,null)}function K1(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Kw(e);var a=t.contextType;typeof a=="object"&&a!==null?s.context=ha(a):(a=ds(t)?ic:zn.current,s.context=qu(e,a)),s.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(q1(e,t,a,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&px.enqueueReplaceState(s,s.state,null),ap(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Qu(e,t){try{var r="",n=t;do r+=gM(n),n=n.return;while(n);var s=r}catch(a){s=`
39Error generating stack: `+a.message+`
40`+a.stack}return{value:e,source:t,stack:s,digest:null}}function nv(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Y1(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var H6=typeof WeakMap=="function"?WeakMap:Map;function _T(e,t,r){r=Ui(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){up||(up=!0,ay=n),Y1(e,t)},r}function NT(e,t,r){r=Ui(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){Y1(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Y1(e,t),typeof n!="function"&&(qo===null?qo=new Set([this]):qo.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function MN(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new H6;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=s8.bind(null,e,t,r),t.then(e,e))}function LN(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function BN(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Ui(-1,1),t.tag=2,Go(r,t,1))),r.lanes|=1),e)}var V6=ro.ReactCurrentOwner,cs=!1;function Kn(e,t,r,n){t.child=e===null?JC(t,null,r,n):Yu(t,e.child,r,n)}function $N(e,t,r,n,s){r=r.render;var a=t.ref;return ku(t,s),n=Zw(e,t,r,n,a,s),r=eb(),e!==null&&!cs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Yi(e,t,s)):(vr&&r&&Uw(t),t.flags|=1,Kn(e,t,n,s),t.child)}function UN(e,t,r,n,s){if(e===null){var a=r.type;return typeof a=="function"&&!ub(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,ST(e,t,a,n,s)):(e=Om(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&s)){var o=a.memoizedProps;if(r=r.compare,r=r!==null?r:Hf,r(o,n)&&e.ref===t.ref)return Yi(e,t,s)}return t.flags|=1,e=Yo(a,n),e.ref=t.ref,e.return=t,t.child=e}function ST(e,t,r,n,s){if(e!==null){var a=e.memoizedProps;if(Hf(a,n)&&e.ref===t.ref)if(cs=!1,t.pendingProps=n=a,(e.lanes&s)!==0)e.flags&131072&&(cs=!0);else return t.lanes=e.lanes,Yi(e,t,s)}return X1(e,t,r,n,s)}function kT(e,t,r){var n=t.pendingProps,s=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},lr(gu,As),As|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,lr(gu,As),As|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,lr(gu,As),As|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,lr(gu,As),As|=n;return Kn(e,t,s,r),t.child}function jT(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}
vendor: 4,711 bytes, line 40
40function X1(e,t,r,n,s){var a=ds(r)?ic:zn.current;return a=qu(t,a),ku(t,s),r=Zw(e,t,r,n,a,s),n=eb(),e!==null&&!cs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Yi(e,t,s)):(vr&&n&&Uw(t),t.flags|=1,Kn(e,t,r,s),t.child)}function WN(e,t,r,n,s){if(ds(r)){var a=!0;ep(t)}else a=!1;if(ku(t,s),t.stateNode===null)Am(e,t),bT(t,r,n),K1(t,r,n,s),n=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=ha(u):(u=ds(r)?ic:zn.current,u=qu(t,u));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==n||c!==u)&&FN(t,o,n,u),bo=!1;var h=t.memoizedState;o.state=h,ap(t,n,o,s),c=t.memoizedState,l!==n||h!==c||us.current||bo?(typeof d=="function"&&(q1(t,r,d,n),c=t.memoizedState),(l=bo||IN(t,r,l,n,h,c,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),o.props=n,o.state=c,o.context=u,n=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,eT(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Ea(t.type,l),o.props=u,f=t.pendingProps,h=o.context,c=r.contextType,typeof c=="object"&&c!==null?c=ha(c):(c=ds(r)?ic:zn.current,c=qu(t,c));var m=r.getDerivedStateFromProps;(d=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==f||h!==c)&&FN(t,o,n,c),bo=!1,h=t.memoizedState,o.state=h,ap(t,n,o,s);var g=t.memoizedState;l!==f||h!==g||us.current||bo?(typeof m=="function"&&(q1(t,r,m,n),g=t.memoizedState),(u=bo||IN(t,r,u,n,h,g,c)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,g,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,g,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=g),o.props=n,o.state=g,o.context=c,n=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return Q1(e,t,r,n,a,s)}function Q1(e,t,r,n,s,a){jT(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&EN(t,r,!1),Yi(e,t,a);n=t.stateNode,V6.current=t;var l=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=Yu(t,e.child,null,a),t.child=Yu(t,null,l,a)):Kn(e,t,l,a),t.memoizedState=n.state,s&&EN(t,r,!0),t.child}function ET(e){var t=e.stateNode;t.pendingContext?jN(e,t.pendingContext,t.pendingContext!==t.context):t.context&&jN(e,t.context,!1),Yw(e,t.containerInfo)}function zN(e,t,r,n,s){return Ku(),zw(s),t.flags|=256,Kn(e,t,r,n),t.child}var J1={dehydrated:null,treeContext:null,retryLane:0};function Z1(e){return{baseLanes:e,cachePool:null,transitions:null}}function CT(e,t,r){var n=t.pendingProps,s=Nr.current,a=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),lr(Nr,s&1),e===null)return V1(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=n.children,e=n.fallback,a?(n=t.mode,a=t.child,o={mode:"hidden",children:o},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=vx(o,n,0,null),e=ec(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Z1(r),t.memoizedState=J1,e):nb(t,o));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return G6(e,t,o,n,l,s,r);if(a){a=n.fallback,o=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:n.children};return!(o&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=Yo(s,c),n.subtreeFlags=s.subtreeFlags&14680064),l!==null?a=Yo(l,a):(a=ec(a,o,r,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,o=e.child.memoizedState,o=o===null?Z1(r):{base
vendor: 8,923 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~r,t.memoizedState=J1,n}return a=e.child,e=a.sibling,n=Yo(a,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function nb(e,t){return t=vx({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function W0(e,t,r,n){return n!==null&&zw(n),Yu(t,e.child,null,r),e=nb(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function G6(e,t,r,n,s,a,o){if(r)return t.flags&256?(t.flags&=-257,n=nv(Error(Ee(422))),W0(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,s=t.mode,n=vx({mode:"visible",children:n.children},s,0,null),a=ec(a,s,o,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,t.mode&1&&Yu(t,e.child,null,o),t.child.memoizedState=Z1(o),t.memoizedState=J1,a);if(!(t.mode&1))return W0(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var l=n.dgst;return n=l,a=Error(Ee(419)),n=nv(a,n,void 0),W0(e,t,o,n)}if(l=(o&e.childLanes)!==0,cs||l){if(n=yn,n!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|o)?0:s,s!==0&&s!==a.retryLane&&(a.retryLane=s,Ki(e,s),Ba(n,e,s,-1))}return cb(),n=nv(Error(Ee(421))),W0(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=a8.bind(null,e),s._reactRetry=t,null):(e=a.treeContext,Ls=Vo(s.nextSibling),$s=t,vr=!0,Da=null,e!==null&&(ia[oa++]=Li,ia[oa++]=Bi,ia[oa++]=oc,Li=e.id,Bi=e.overflow,oc=t),t=nb(t,n.children),t.flags|=4096,t)}function HN(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),G1(e.return,t,r)}function sv(e,t,r,n,s){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=s)}function TT(e,t,r){var n=t.pendingProps,s=n.revealOrder,a=n.tail;if(Kn(e,t,n.children,r),n=Nr.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&HN(e,r,t);else if(e.tag===19)HN(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(lr(Nr,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&ip(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),sv(t,!1,s,r,a);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&ip(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}sv(t,!0,r,null,a);break;case"together":sv(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Am(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Yi(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),cc|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Ee(153));if(t.child!==null){for(e=t.child,r=Yo(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Yo(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function q6(e,t,r){switch(t.tag){case 3:ET(t),Ku();break;case 5:tT(t);break;case 1:ds(t.type)&&ep(t);break;case 4:Yw(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;lr(np,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(lr(Nr,Nr.current&1),t.flags|=128,null):r&t.child.childLanes?CT(e,t,r):(lr(Nr,Nr.current&1),e=Yi(e,t,r),e!==null?e.sibling:null);lr(Nr,Nr.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return TT(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),lr(Nr,Nr.current),n)break;return null;case 22:case 23:return t.lanes=0,kT(e,t,r)}return Yi(e,t,r)}var AT,ey,PT,RT;AT=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};ey=function(){};PT=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,zl(xi.current);var a=null;switch(r){case"input":s=_1(e,s),n=_1(e,n),a=[];break;case"select":s=Tr({},s,{value:void 0}),n=Tr({},n,{value:void 0}),a=[];break;case"textarea":s=k1(e,s),n=k1(e,n),a=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Jm)}E1(r,n);var o;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(o in l)l.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Mf.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var c=n[u];if(l=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(r||(r={}),r[o]=c[o])}else r||(a||(a=[]),a.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(a=a||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Mf.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&fr("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}r&&(a=a||[]).push("style",r);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};RT=function(e,t,r,n){r!==n&&(t.flags|=4)};function Kd(e,t){if(!vr)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Dn(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function K6(e,t,r){var n=t.pendingProps;switch(Ww(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Dn(t),null;case 1:return ds(t.type)&&Zm(),Dn(t),null;case 3:return n=t.stateNode,Xu(),mr(us),mr(zn),Qw(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&($0(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Da!==null&&(ly(Da),Da=null))),ey(e,t),Dn(t),null;case 5:Xw(t);var s=zl(Yf.current);if(r=t.type,e!==null&&t.stateNode!=null)PT(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(Ee(166));return Dn(t),null}if(e=zl(xi.current),$0(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[ii]=t,n[qf]=a,e=(t.mode&1)!==0,r){case"dialog":fr("cancel",n),fr("close",n);break;case"iframe":case"object":case"embed":fr("load",n);break;case"video":case"audio":for(s=0;s<nf.length;s++)fr(nf[s],n);break;case"source":fr("error",n);break;case"img":case"image":case"link":fr("error",n),fr("load",n);break;case"details":fr("toggle",n);break;case"input":Z2(n,a),fr("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},fr("invalid",n);break;case"textarea":tN(n,a),fr("invalid",n)}E1(r,a),s=null;for(var o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="children"?typeof l=="string"?n.textContent!==l&&(a.suppressHydrationWarning!==!0&&B0(n.textContent,l,e),s=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(a.suppressHydrationWarning!==!0&&B0(n.textContent,l,e),s=["children",""+l]):Mf.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&fr("scroll",n)}switch(r){case"input":P0(n),eN(n,a,!0);break;case"textarea":P0(n),rN(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=Jm)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=iC(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>
40",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[ii]=t,e[qf]=n,AT(e,t,!1,!1),t.stateNode=e;e:{switch(o=C1(r,n),r){case"dialog":fr("cancel",e),fr("close",e),s=n;break;case"iframe":case"object":case"embed":fr("load",e),s=n;break;case"video":case"audio":for(s=0;s<nf.length;s++)fr(nf[s],e);s=n;break;case"source":fr("error",e),s=n;break;case"img":case"image":case"link":fr("error",e),fr("load",e),s=n;break;case"details":fr("toggle",e),s=n;break;case"input":Z2(e,n),s=_1(e,n),fr("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=Tr({},n,{value:void 0}),fr("invalid",e);break;case"textarea":tN(e,n),s=k1(e,n),fr("invalid",e);break;default:s=n}E1(r,s),l=s;for(a in l)if(l.hasOwnProperty(a)){var c=l[a];a==="style"?cC(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&oC(e,c)):a==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&Lf(e,c):typeof c=="number"&&Lf(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Mf.hasOwnProperty(a)?c!=null&&a==="onScroll"&&fr("scroll",e):c!=null&&Ew(e,a,c,o))}switch(r){case"input":P0(e),eN(e,n,!1);break;case"textarea":P0(e),rN(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Zo(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?bu(e,!!n.multiple,a,!1):n.defaultValue!=null&&bu(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Jm)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Dn(t),null;case 6:if(e&&t.stateNode!=null)RT(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(Ee(166));if(r=zl(Yf.current),zl(xi.current),$0(t)){if(n=t.stateNode,r=t.memoizedProps,n[ii]=t,(a=n.nodeValue!==r)&&(e=$s,e!==null))switch(e.tag){case 3:B0(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&B0(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[ii]=t,t.stateNode=n}return Dn(t),null;case 13:if(mr(Nr),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(vr&&Ls!==null&&t.mode&1&&!(t.flags&128))XC(),Ku(),t.flags|=98560,a=!1;else if(a=$0(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(Ee(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Ee(317));a[ii]=t}else Ku(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Dn(t),a=!1}else Da!==null&&(ly(Da),Da=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Nr.current&1?cn===0&&(cn=3):cb())),t.updateQueue!==null&&(t.flags|=4),Dn(t),null);case 4:return Xu(),ey(e,t),e===null&&Vf(t.stateNode.containerInfo),Dn(t),null;case 10:return Gw(t.type._context),Dn(t),null;case 17:return ds(t.type)&&Zm(),Dn(t),null;case 19:if(mr(Nr),a=t.memoizedState,a===null)return Dn(t),null;if(n=(t.flags&128)!==0,o=a.rendering,o===null)if(n)Kd(a,!1);else{if(cn!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ip(e),o!==null){for(t.flags|=128,Kd(a,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)a=r,e=n,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return lr(Nr,Nr.current&1|2),t.child}e=e.sibling}a.tail!==null&&$r()>Ju&&(t.flags|=128,n=!0,Kd(a,!1),t.lanes=4194304)}else{if(!n)if(e=ip(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Kd(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!vr)return Dn(t),null}else 2*$r()-a.renderingStartTime>Ju&&r!==1073741824&&(t.flags|=128,n=!0,Kd(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=$r(),t.sibling=null,r=Nr.current,lr(Nr,n?r&1|2:r&1),t):(Dn(t),null);case 22:case 23:return lb(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?As&1073741824&&(Dn(t),t.subtreeFlags&6&&(t.flags|=8192)):Dn(t),null;case 24:return null;case 25:return null}throw Error(Ee(156,t.tag))}function Y6(e,t){switch(Ww(t),t.tag){case 1:return ds(t.type)&&Zm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 26,970 bytes, line 40
40case 3:return Xu(),mr(us),mr(zn),Qw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Xw(t),null;case 13:if(mr(Nr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ee(340));Ku()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return mr(Nr),null;case 4:return Xu(),null;case 10:return Gw(t.type._context),null;case 22:case 23:return lb(),null;case 24:return null;default:return null}}var z0=!1,Bn=!1,X6=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function xu(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Dr(e,t,n)}else r.current=null}function ty(e,t,r){try{r()}catch(n){Dr(e,t,n)}}var VN=!1;function Q6(e,t){if(L1=Ym,e=MC(),$w(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,l=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var m;f!==r||s!==0&&f.nodeType!==3||(l=o+s),f!==a||n!==0&&f.nodeType!==3||(c=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===e)break t;if(h===r&&++u===s&&(l=o),h===a&&++d===n&&(c=o),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(B1={focusedElem:e,selectionRange:r},Ym=!1,Ke=t;Ke!==null;)if(t=Ke,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ke=e;else for(;Ke!==null;){t=Ke;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var p=g.memoizedProps,x=g.memoizedState,b=t.stateNode,w=b.getSnapshotBeforeUpdate(t.elementType===t.type?p:Ea(t.type,p),x);b.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ee(163))}}catch(_){Dr(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Ke=e;break}Ke=t.return}return g=VN,VN=!1,g}function yf(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var a=s.destroy;s.destroy=void 0,a!==void 0&&ty(t,r,a)}s=s.next}while(s!==n)}}function xx(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function ry(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function OT(e){var t=e.alternate;t!==null&&(e.alternate=null,OT(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ii],delete t[qf],delete t[W1],delete t[O6],delete t[D6])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function DT(e){return e.tag===5||e.tag===3||e.tag===4}function GN(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||DT(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ny(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Jm));else if(n!==4&&(e=e.child,e!==null))for(ny(e,t,r),e=e.sibling;e!==null;)ny(e,t,r),e=e.sibling}function sy(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(sy(e,t,r),e=e.sibling;e!==null;)sy(e,t,r),e=e.sibling}var Sn=null,Ra=!1;function fo(e,t,r){for(r=r.child;r!==null;)IT(e,t,r),r=r.sibling}function IT(e,t,r){if(pi&&typeof pi.onCommitFiberUnmount=="function")try{pi.onCommitFiberUnmount(lx,r)}catch{}switch(r.tag){case 5:Bn||xu(r,t);case 6:var n=Sn,s=Ra;Sn=null,fo(e,t,r),Sn=n,Ra=s,Sn!==null&&(Ra?(e=Sn,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Sn.removeChild(r.stateNode));break;case 18:Sn!==null&&(Ra?(e=Sn,r=r.stateNode,e.nodeType===8?Qg(e.parentNode,r):e.nodeType===1&&Qg(e,r),Wf(e)):Qg(Sn,r.stateNode));break;case 4:n=Sn,s=Ra,Sn=r.stateNode.containerInfo,Ra=!0,fo(e,t,r),Sn=n,Ra=s;break;case 0:case 11:case 14:case 15:if(!Bn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var a=s,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&ty(r,t,o),s=s.next}while(s!==n)}fo(e,t,r);break;case 1:if(!Bn&&(xu(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){Dr(r,t,l)}fo(e,t,r);break;case 21:fo(e,t,r);break;case 22:r.mode&1?(Bn=(n=Bn)||r.memoizedState!==null,fo(e,t,r),Bn=n):fo(e,t,r);break;default:fo(e,t,r)}}function qN(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new X6),t.forEach(function(n){var s=i8.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function _a(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var a=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:Sn=l.stateNode,Ra=!1;break e;case 3:Sn=l.stateNode.containerInfo,Ra=!0;break e;case 4:Sn=l.stateNode.containerInfo,Ra=!0;break e}l=l.return}if(Sn===null)throw Error(Ee(160));IT(a,o,s),Sn=null,Ra=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){Dr(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)FT(t,e),t=t.sibling}function FT(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(_a(t,e),Ja(e),n&4){try{yf(3,e,e.return),xx(3,e)}catch(p){Dr(e,e.return,p)}try{yf(5,e,e.return)}catch(p){Dr(e,e.return,p)}}break;case 1:_a(t,e),Ja(e),n&512&&r!==null&&xu(r,r.return);break;case 5:if(_a(t,e),Ja(e),n&512&&r!==null&&xu(r,r.return),e.flags&32){var s=e.stateNode;try{Lf(s,"")}catch(p){Dr(e,e.return,p)}}if(n&4&&(s=e.stateNode,s!=null)){var a=e.memoizedProps,o=r!==null?r.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&a.type==="radio"&&a.name!=null&&sC(s,a),C1(l,o);var u=C1(l,a);for(o=0;o<c.length;o+=2){var d=c[o],f=c[o+1];d==="style"?cC(s,f):d==="dangerouslySetInnerHTML"?oC(s,f):d==="children"?Lf(s,f):Ew(s,d,f,u)}switch(l){case"input":N1(s,a);break;case"textarea":aC(s,a);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!a.multiple;var m=a.value;m!=null?bu(s,!!a.multiple,m,!1):h!==!!a.multiple&&(a.defaultValue!=null?bu(s,!!a.multiple,a.defaultValue,!0):bu(s,!!a.multiple,a.multiple?[]:"",!1))}s[qf]=a}catch(p){Dr(e,e.return,p)}}break;case 6:if(_a(t,e),Ja(e),n&4){if(e.stateNode===null)throw Error(Ee(162));s=e.stateNode,a=e.memoizedProps;try{s.nodeValue=a}catch(p){Dr(e,e.return,p)}}break;case 3:if(_a(t,e),Ja(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Wf(t.containerInfo)}catch(p){Dr(e,e.return,p)}break;case 4:_a(t,e),Ja(e);break;case 13:_a(t,e),Ja(e),s=e.child,s.flags&8192&&(a=s.memoizedState!==null,s.stateNode.isHidden=a,!a||s.alternate!==null&&s.alternate.memoizedState!==null||(ib=$r())),n&4&&qN(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(Bn=(u=Bn)||d,_a(t,e),Bn=u):_a(t,e),Ja(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Ke=e,d=e.child;d!==null;){for(f=Ke=d;Ke!==null;){switch(h=Ke,m=h.child,h.tag){case 0:case 11:case 14:case 15:yf(4,h,h.return);break;case 1:xu(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(p){Dr(n,r,p)}}break;case 5:xu(h,h.return);break;case 22:if(h.memoizedState!==null){YN(f);continue}}m!==null?(m.return=h,Ke=m):YN(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,u?(a=s.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(l=f.stateNode,c=f.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=lC("display",o))}catch(p){Dr(e,e.return,p)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(p){Dr(e,e.return,p)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:_a(t,e),Ja(e),n&4&&qN(e);break;case 21:break;default:_a(t,e),Ja(e)}}function Ja(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(DT(r)){var n=r;break e}r=r.return}throw Error(Ee(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(Lf(s,""),n.flags&=-33);var a=GN(e);sy(e,a,s);break;case 3:case 4:var o=n.stateNode.containerInfo,l=GN(e);ny(e,l,o);break;default:throw Error(Ee(161))}}catch(c){Dr(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function J6(e,t,r){Ke=e,MT(e)}function MT(e,t,r){for(var n=(e.mode&1)!==0;Ke!==null;){var s=Ke,a=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||z0;if(!o){var l=s.alternate,c=l!==null&&l.memoizedState!==null||Bn;l=z0;var u=Bn;if(z0=o,(Bn=c)&&!u)for(Ke=s;Ke!==null;)o=Ke,c=o.child,o.tag===22&&o.memoizedState!==null?XN(s):c!==null?(c.return=o,Ke=c):XN(s);for(;a!==null;)Ke=a,MT(a),a=a.sibling;Ke=s,z0=l,Bn=u}KN(e)}else s.subtreeFlags&8772&&a!==null?(a.return=s,Ke=a):KN(e)}}function KN(e){for(;Ke!==null;){var t=Ke;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Bn||xx(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Bn)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:Ea(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&RN(t,a,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}RN(t,o,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Wf(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ee(163))}Bn||t.flags&512&&ry(t)}catch(h){Dr(t,t.return,h)}}if(t===e){Ke=null;break}if(r=t.sibling,r!==null){r.return=t.return,Ke=r;break}Ke=t.return}}function YN(e){for(;Ke!==null;){var t=Ke;if(t===e){Ke=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Ke=r;break}Ke=t.return}}function XN(e){for(;Ke!==null;){var t=Ke;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{xx(4,t)}catch(c){Dr(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(c){Dr(t,s,c)}}var a=t.return;try{ry(t)}catch(c){Dr(t,a,c)}break;case 5:var o=t.return;try{ry(t)}catch(c){Dr(t,o,c)}}}catch(c){Dr(t,t.return,c)}if(t===e){Ke=null;break}var l=t.sibling;if(l!==null){l.return=t.return,Ke=l;break}Ke=t.return}}var Z6=Math.ceil,cp=ro.ReactCurrentDispatcher,sb=ro.ReactCurrentOwner,ua=ro.ReactCurrentBatchConfig,Ot=0,yn=null,Zr=null,Cn=0,As=0,gu=dl(0),cn=0,Zf=null,cc=0,gx=0,ab=0,wf=null,os=null,ib=0,Ju=1/0,Di=null,up=!1,ay=null,qo=null,H0=!1,Io=null,dp=0,bf=0,iy=null,Pm=-1,Rm=0;function Jn(){return Ot&6?$r():Pm!==-1?Pm:Pm=$r()}function Ko(e){return e.mode&1?Ot&2&&Cn!==0?Cn&-Cn:F6.transition!==null?(Rm===0&&(Rm=bC()),Rm):(e=Zt,e!==0||(e=window.event,e=e===void 0?16:CC(e.type)),e):1}function Ba(e,t,r,n){if(50<bf)throw bf=0,iy=null,Error(Ee(185));Hh(e,r,n),(!(Ot&2)||e!==yn)&&(e===yn&&(!(Ot&2)&&(gx|=r),cn===4&&jo(e,Cn)),fs(e,n),r===1&&Ot===0&&!(t.mode&1)&&(Ju=$r()+500,hx&&fl()))}function fs(e,t){var r=e.callbackNode;FM(e,t);var n=Km(e,e===yn?Cn:0);if(n===0)r!==null&&aN(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&aN(r),t===1)e.tag===0?I6(QN.bind(null,e)):qC(QN.bind(null,e)),P6(function(){!(Ot&6)&&fl()}),r=null;else{switch(_C(n)){case 1:r=Rw;break;case 4:r=yC;break;case 16:r=qm;break;case 536870912:r=wC;break;default:r=qm}r=VT(r,LT.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function LT(e,t){if(Pm=-1,Rm=0,Ot&6)throw Error(Ee(327));var r=e.callbackNode;if(ju()&&e.callbackNode!==r)return null;var n=Km(e,e===yn?Cn:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=fp(e,n);else{t=n;var s=Ot;Ot|=2;var a=$T();(yn!==e||Cn!==t)&&(Di=null,Ju=$r()+500,Zl(e,t));do try{r8();break}catch(l){BT(e,l)}while(!0);Vw(),cp.current=a,Ot=s,Zr!==null?t=0:(yn=null,Cn=0,t=cn)}if(t!==0){if(t===2&&(s=O1(e),s!==0&&(n=s,t=oy(e,s))),t===1)throw r=Zf,Zl(e,0),jo(e,n),fs(e,$r()),r;if(t===6)jo(e,n);else{if(s=e.current.alternate,!(n&30)&&!e8(s)&&(t=fp(e,n),t===2&&(a=O1(e),a!==0&&(n=a,t=oy(e,a))),t===1))throw r=Zf,Zl(e,0),jo(e,n),fs(e,$r()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(Ee(345));case 2:Il(e,os,Di);break;case 3:if(jo(e,n),(n&130023424)===n&&(t=ib+500-$r(),10<t)){if(Km(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){Jn(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=U1(Il.bind(null,e,os,Di),t);break}Il(e,os,Di);break;case 4:if(jo(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var o=31-La(n);a=1<<o,o=t[o],o>s&&(s=o),n&=~a}if(n=s,n=$r()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Z6(n/1960))-n,10<n){e.timeoutHandle=U1(Il.bind(null,e,os,Di),n);break}Il(e,os,Di);break;case 5:Il(e,os,Di);break;default:throw Error(Ee(329))}}}return fs(e,$r()),e.callbackNode===r?LT.bind(null,e):null}function oy(e,t){var r=wf;return e.current.memoizedState.isDehydrated&&(Zl(e,t).flags|=256),e=fp(e,t),e!==2&&(t=os,os=r,t!==null&&ly(t)),e}function ly(e){os===null?os=e:os.push.apply(os,e)}function e8(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],a=s.getSnapshot;s=s.value;try{if(!za(a(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function jo(e,t){for(t&=~ab,t&=~gx,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-La(t),n=1<<r;e[r]=-1,t&=~n}}function QN(e){if(Ot&6)throw Error(Ee(327));ju();var t=Km(e,0);if(!(t&1))return fs(e,$r()),null;var r=fp(e,t);if(e.tag!==0&&r===2){var n=O1(e);n!==0&&(t=n,r=oy(e,n))}if(r===1)throw r=Zf,Zl(e,0),jo(e,t),fs(e,$r()),r;if(r===6)throw Error(Ee(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Il(e,os,Di),fs(e,$r()),null}function ob(e,t){var r=Ot;Ot|=1;try{return e(t)}finally{Ot=r,Ot===0&&(Ju=$r()+500,hx&&fl())}}function uc(e){Io!==null&&Io.tag===0&&!(Ot&6)&&ju();var t=Ot;Ot|=1;var r=ua.transition,n=Zt;try{if(ua.transition=null,Zt=1,e)return e()}finally{Zt=n,ua.transition=r,Ot=t,!(Ot&6)&&fl()}}function lb(){As=gu.current,mr(gu)}function Zl(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,A6(r)),Zr!==null)for(r=Zr.return;r!==null;){var n=r;switch(Ww(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Zm();break;case 3:Xu(),mr(us),mr(zn),Qw();break;case 5:Xw(n);break;case 4:Xu();break;case 13:mr(Nr);break;case 19:mr(Nr);break;case 10:Gw(n.type._context);break;case 22:case 23:lb()}r=r.return}if(yn=e,Zr=e=Yo(e.current,null),Cn=As=t,cn=0,Zf=null,ab=gx=cc=0,os=wf=null,Wl!==null){for(t=0;t<Wl.length;t++)if(r=Wl[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,a=r.pending;if(a!==null){var o=a.next;a.next=s,n.next=o}r.pending=n}Wl=null}return e}function BT(e,t){do{var r=Zr;try{if(Vw(),Cm.current=lp,op){for(var n=Er.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}op=!1}if(lc=0,pn=an=Er=null,vf=!1,Xf=0,sb.current=null,r===null||r.return===null){cn=1,Zf=t,Zr=null;break}e:{var a=e,o=r.return,l=r,c=t;if(t=Cn,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=LN(o);if(m!==null){m.flags&=-257,BN(m,o,l,a,t),m.mode&1&&MN(a,u,t),t=m,c=u;var g=t.updateQueue;if(g===null){var p=new Set;p.add(c),t.updateQueue=p}else g.add(c);break e}else{if(!(t&1)){MN(a,u,t),cb();break e}c=Error(Ee(426))}}else if(vr&&l.mode&1){var x=LN(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),BN(x,o,l,a,t),zw(Qu(c,l));break e}}a=c=Qu(c,l),cn!==4&&(cn=2),wf===null?wf=[a]:wf.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var b=_T(a,c,t);PN(a,b);break e;case 1:l=c;var w=a.type,y=a.stateNode;if(!(a.flags&128)&&(typeof w.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(qo===null||!qo.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t;var _=NT(a,l,t);PN(a,_);break e}}a=a.return}while(a!==null)}WT(r)}catch(N){t=N,Zr===r&&r!==null&&(Zr=r=r.return);continue}break}while(!0)}function $T(){var e=cp.current;return cp.current=lp,e===null?lp:e}function cb(){(cn===0||cn===3||cn===2)&&(cn=4),yn===null||!(cc&268435455)&&!(gx&268435455)||jo(yn,Cn)}function fp(e,t){var r=Ot;Ot|=2;var n=$T();(yn!==e||Cn!==t)&&(Di=null,Zl(e,t));do try{t8();break}catch(s){BT(e,s)}while(!0);if(Vw(),Ot=r,cp.current=n,Zr!==null)throw Error(Ee(261));return yn=null,Cn=0,cn}function t8(){for(;Zr!==null;)UT(Zr)}function r8(){for(;Zr!==null&&!EM();)UT(Zr)}function UT(e){var t=HT(e.alternate,e,As);e.memoizedProps=e.pendingProps,t===null?WT(e):Zr=t,sb.current=null}function WT(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Y6(r,t),r!==null){r.flags&=32767,Zr=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{cn=6,Zr=null;return}}else if(r=K6(r,t,As),r!==null){Zr=r;return}if(t=t.sibling,t!==null){Zr=t;return}Zr=t=e}while(t!==null);cn===0&&(cn=5)}function Il(e,t,r){var n=Zt,s=ua.transition;try{ua.transition=null,Zt=1,n8(e,t,r,n)}finally{ua.transition=s,Zt=n}return null}function n8(e,t,r,n){do ju();while(Io!==null);if(Ot&6)throw Error(Ee(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(Ee(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(MM(e,a),e===yn&&(Zr=yn=null,Cn=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||H0||(H0=!0,VT(qm,function(){return ju(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=ua.transition,ua.transition=null;var o=Zt;Zt=1;var l=Ot;Ot|=4,sb.current=null,Q6(e,r),FT(r,e),N6(B1),Ym=!!L1,B1=L1=null,e.current=r,J6(r),CM(),Ot=l,Zt=o,ua.transition=a}else e.current=r;if(H0&&(H0=!1,Io=e,dp=s),a=e.pendingLanes,a===0&&(qo=null),PM(r.stateNode),fs(e,$r()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(up)throw up=!1,e=ay,ay=null,e;return dp&1&&e.tag!==0&&ju(),a=e.pendingLanes,a&1?e===iy?bf++:(bf=0,iy=e):bf=0,fl(),null}function ju(){if(Io!==null){var e=_C(dp),t=ua.transition,r=Zt;try{if(ua.transition=null,Zt=16>e?16:e,Io===null)var n=!1;else{if(e=Io,Io=null,dp=0,Ot&6)throw Error(Ee(331));var s=Ot;for(Ot|=4,Ke=e.current;Ke!==null;){var a=Ke,o=a.child;if(Ke.flags&16){var l=a.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(Ke=u;Ke!==null;){var d=Ke;switch(d.tag){case 0:case 11:case 15:yf(8,d,a)}var f=d.child;if(f!==null)f.return=d,Ke=f;else for(;Ke!==null;){d=Ke;var h=d.sibling,m=d.return;if(OT(d),d===u){Ke=null;break}if(h!==null){h.return=m,Ke=h;break}Ke=m}}}var g=a.alternate;if(g!==null){var p=g.child;if(p!==null){g.child=null;do{var x=p.sibling;p.sibling=null,p=x}while(p!==null)}}Ke=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,Ke=o;else e:for(;Ke!==null;){if(a=Ke,a.flags&2048)switch(a.tag){case 0:case 11:case 15:yf(9,a,a.return)}var b=a.sibling;if(b!==null){b.return=a.return,Ke=b;break e}Ke=a.return}}var w=e.current;for(Ke=w;Ke!==null;){o=Ke;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,Ke=y;else e:for(o=w;Ke!==null;){if(l=Ke,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:xx(9,l)}}catch(N){Dr(l,l.return,N)}if(l===o){Ke=null;break e}var _=l.sibling;if(_!==null){_.return=l.return,Ke=_;break e}Ke=l.return}}if(Ot=s,fl(),pi&&typeof pi.onPostCommitFiberRoot=="function")try{pi.onPostCommitFiberRoot(lx,e)}catch{}n=!0}return n}finally{Zt=r,ua.transition=t}}return!1}function JN(e,t,r){t=Qu(r,t),t=_T(e,t,1),e=Go(e,t,1),t=Jn(),e!==null&&(Hh(e,1,t),fs(e,t))}function Dr(e,t,r){if(e.tag===3)JN(e,e,r);else for(;t!==null;){if(t.tag===3){JN(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(qo===null||!qo.has(n))){e=Qu(r,e),e=NT(t,e,1),t=Go(t,e,1),e=Jn(),t!==null&&(Hh(t,1,e),fs(t,e));break}}t=t.return}}function s8(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Jn(),e.pingedLanes|=e.suspendedLanes&r,yn===e&&(Cn&r)===r&&(cn===4||cn===3&&(Cn&130023424)===Cn&&500>$r()-ib?Zl(e,0):ab|=r),fs(e,t)}function zT(e,t){t===0&&(e.mode&1?(t=D0,D0<<=1,!(D0&130023424)&&(D0=4194304)):t=1);var r=Jn();e=Ki(e,t),e!==null&&(Hh(e,t,r),fs(e,r))}function a8(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),zT(e,r)}function i8(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Ee(314))}n!==null&&n.delete(t),zT(e,r)}var HT;HT=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||us.current)cs=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return cs=!1,q6(e,t,r);cs=!!(e.flags&131072)}else cs=!1,vr&&t.flags&1048576&&KC(t,rp,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Am(e,t),e=t.pendingProps;var s=qu(t,zn.current);ku(t,r),s=Zw(null,t,n,e,s,r);var a=eb();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ds(n)?(a=!0,ep(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Kw(t),s.updater=px,t.stateNode=s,s._reactInternals=t,K1(t,n,e,r),t=Q1(null,t,n,!0,a,r)):(t.tag=0,vr&&a&&Uw(t),Kn(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Am(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=l8(n),e=Ea(n,e),s){case 0:t=X1(null,t,n,e,r);break e;case 1:t=WN(null,t,n,e,r);break e;case 11:t=$N(null,t,n,e,r);break e;case 14:t=UN(null,t,n,Ea(n.type,e),r);break e}throw Error(Ee(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Ea(n,s),X1(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Ea(n,s),WN(e,t,n,s,r);case 3:e:{if(ET(t),e===null)throw Error(Ee(387));n=t.pendingProps,a=t.memoizedState,s=a.element,eT(e,t),ap(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){s=Qu(Error(Ee(423)),t),t=zN(e,t,n,r,s);break e}else if(n!==s){s=Qu(Error(Ee(424)),t),t=zN(e,t,n,r,s);break e}else for(Ls=Vo(t.stateNode.containerInfo.firstChild),$s=t,vr=!0,Da=null,r=JC(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ku(),n===s){t=Yi(e,t,r);break e}Kn(e,t,n,r)}t=t.child}return t;case 5:return tT(t),e===null&&V1(t),n=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,o=s.children,$1(n,s)?o=null:a!==null&&$1(n,a)&&(t.flags|=32),jT(e,t),Kn(e,t,o,r),t.child;case 6:return e===null&&V1(t),null;case 13:return CT(e,t,r);case 4:return Yw(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Yu(t,null,n,r):Kn(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Ea(n,s),$N(e,t,n,s,r);case 7:return Kn(e,t,t.pendingProps,r),t.child;case 8:return Kn(e,t,t.pendingProps.children,r),t.child;case 12:return Kn(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,a=t.memoizedProps,o=s.value,lr(np,n._currentValue),n._currentValue=o,a!==null)if(za(a.value,o)){if(a.children===s.children&&!us.current){t=Yi(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){o=a.child;for(var c=l.firstContext;c!==null;){if(c.context===n){if(a.tag===1){c=Ui(-1,r&-r),c.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=r,c=a.alternate,c!==null&&(c.lanes|=r),G1(a.return,r,t),l.lanes|=r;break}c=c.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(Ee(341));o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),G1(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Kn(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,ku(t,r),s=ha(s),n=n(s),t.flags|=1,Kn(e,t,n,r),t.child;case 14:return n=t.type,s=Ea(n,t.pendingProps),s=Ea(n.type,s),UN(e,t,n,s,r);case 15:return ST(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Ea(n,s),Am(e,t),t.tag=1,ds(n)?(e=!0,ep(t)):e=!1,ku(t,r),bT(t,n,s),K1(t,n,s,r),Q1(null,t,n,!0,e,r);case 19:return TT(e,t,r);case 22:return kT(e,t,r)}throw Error(Ee(156,t.tag))};function VT(e,t){return vC(e,t)}function o8(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function la(e,t,r,n){return new o8(e,t,r,n)}function ub(e){return e=e.prototype,!(!e||!e.isReactComponent)}function l8(e){if(typeof e=="function")return ub(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Tw)return 11;if(e===Aw)return 14}return 2}function Yo(e,t){var r=e.alternate;return r===null?(r=la(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.depen
vendor: 5,837 bytes, line 40
40dencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Om(e,t,r,n,s,a){var o=2;if(n=e,typeof e=="function")ub(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ou:return ec(r.children,s,a,t);case Cw:o=8,s|=8;break;case v1:return e=la(12,r,t,s|2),e.elementType=v1,e.lanes=a,e;case y1:return e=la(13,r,t,s),e.elementType=y1,e.lanes=a,e;case w1:return e=la(19,r,t,s),e.elementType=w1,e.lanes=a,e;case tC:return vx(r,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ZE:o=10;break e;case eC:o=9;break e;case Tw:o=11;break e;case Aw:o=14;break e;case wo:o=16,n=null;break e}throw Error(Ee(130,e==null?e:typeof e,""))}return t=la(o,r,t,s),t.elementType=e,t.type=n,t.lanes=a,t}function ec(e,t,r,n){return e=la(7,e,n,t),e.lanes=r,e}function vx(e,t,r,n){return e=la(22,e,n,t),e.elementType=tC,e.lanes=r,e.stateNode={isHidden:!1},e}function av(e,t,r){return e=la(6,e,null,t),e.lanes=r,e}function iv(e,t,r){return t=la(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function c8(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=$g(0),this.expirationTimes=$g(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$g(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function db(e,t,r,n,s,a,o,l,c){return e=new c8(e,t,r,l,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=la(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Kw(a),e}function u8(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:iu,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function GT(e){if(!e)return el;e=e._reactInternals;e:{if(Nc(e)!==e||e.tag!==1)throw Error(Ee(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ds(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Ee(171))}if(e.tag===1){var r=e.type;if(ds(r))return GC(e,r,t)}return t}function qT(e,t,r,n,s,a,o,l,c){return e=db(r,n,!0,e,s,a,o,l,c),e.context=GT(null),r=e.current,n=Jn(),s=Ko(r),a=Ui(n,s),a.callback=t??null,Go(r,a,s),e.current.lanes=s,Hh(e,s,n),fs(e,n),e}function yx(e,t,r,n){var s=t.current,a=Jn(),o=Ko(s);return r=GT(r),t.context===null?t.context=r:t.pendingContext=r,t=Ui(a,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Go(s,t,o),e!==null&&(Ba(e,s,o,a),Em(e,s,o)),o}function hp(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ZN(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function fb(e,t){ZN(e,t),(e=e.alternate)&&ZN(e,t)}function d8(){return null}var KT=typeof reportError=="function"?reportError:function(e){console.error(e)};function hb(e){this._internalRoot=e}wx.prototype.render=hb.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ee(409));yx(e,t,null,null)};wx.prototype.unmount=hb.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;uc(function(){yx(null,e,null,null)}),t[qi]=null}};function wx(e){this._internalRoot=e}wx.prototype.unstable_scheduleHydration=function(e){if(e){var t=kC();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ko.length&&t!==0&&t<ko[r].priority;r++);ko.splice(r,0,e),r===0&&EC(e)}};function mb(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function bx(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function eS(){}function f8(e,t,r,n,s){if(s){if(typeof n=="function"){var a=n;n=function(){var u=hp(o);a.call(u)}}var o=qT(t,n,e,0,null,!1,!1,"",eS);return e._reactRootContainer=o,e[qi]=o.current,Vf(e.nodeType===8?e.parentNode:e),uc(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var l=n;n=function(){var u=hp(c);l.call(u)}}var c=db(e,0,!1,null,null,!1,!1,"",eS);return e._reactRootContainer=c,e[qi]=c.current,Vf(e.nodeType===8?e.parentNode:e),uc(function(){yx(t,c,r,n)}),c}function _x(e,t,r,n,s){var a=r._reactRootContainer;if(a){var o=a;if(typeof s=="function"){var l=s;s=function(){var c=hp(o);l.call(c)}}yx(t,o,e,s)}else o=f8(r,t,e,s,n);return hp(o)}NC=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=rf(t.pendingLanes);r!==0&&(Ow(t,r|1),fs(t,$r()),!(Ot&6)&&(Ju=$r()+500,fl()))}break;case 13:uc(function(){var n=Ki(e,1);if(n!==null){var s=Jn();Ba(n,e,1,s)}}),fb(e,1)}};Dw=function(e){if(e.tag===13){var t=Ki(e,134217728);if(t!==null){var r=Jn();Ba(t,e,134217728,r)}fb(e,134217728)}};SC=function(e){if(e.tag===13){var t=Ko(e),r=Ki(e,t);if(r!==null){var n=Jn();Ba(r,e,t,n)}fb(e,t)}};kC=function(){return Zt};jC=function(e,t){var r=Zt;try{return Zt=e,t()}finally{Zt=r}};A1=function(e,t,r){switch(t){case"input":if(N1(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=fx(n);if(!s)throw Error(Ee(90));nC(n),N1(n,s)}}}break;case"textarea":aC(e,r);break;case"select":t=r.value,t!=null&&bu(e,!!r.multiple,t,!1)}};fC=ob;hC=uc;var h8={usingClientEntryPoint:!1,Events:[Gh,du,fx,uC,dC,ob]}
40,Yd={findFiberByHostInstance:Ul,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},m8={bundleType:Yd.bundleType,version:Yd.version,rendererPackageName:Yd.rendererPackageName,rendererConfig:Yd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ro.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=xC(e),e===null?null:e.stateNode},findFiberByHostInstance:Yd.findFiberByHostInstance||d8,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var V0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!V0.isDisabled&&V0.supportsFiber)try{lx=V0.inject(m8),pi=V0}catch{}}Ks.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=h8;Ks.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!mb(t))throw Error(Ee(200));return u8(e,t,null,r)};Ks.createRoot=function(e,t){if(!mb(e))throw Error(Ee(299));var r=!1,n="",s=KT;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=db(e,1,!1,null,null,r,!1,n,s),e[qi]=t.current,Vf(e.nodeType===8?e.parentNode:e),new hb(t)};Ks.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ee(188)):(e=Object.keys(e).join(","),Error(Ee(268,e)));return e=xC(t),e=e===null?null:e.stateNode,e};Ks.flushSync=function(e){return uc(e)};Ks.hydrate=function(e,t,r){if(!bx(t))throw Error(Ee(200));return _x(null,e,t,!0,r)};Ks.hydrateRoot=function(e,t,r){if(!mb(e))throw Error(Ee(405));var n=r!=null&&r.hydratedSources||null,s=!1,a="",o=KT;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=qT(t,null,e,1,r??null,s,!1,a,o),e[qi]=t.current,Vf(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new wx(t)};Ks.render=function(e,t,r){if(!bx(t))throw Error(Ee(200));return _x(null,e,t,!1,r)};Ks.unmountComponentAtNode=function(e){if(!bx(e))throw Error(Ee(40));return e._reactRootContainer?(uc(function(){_x(null,null,e,!1,function(){e._reactRootContainer=null,e[qi]=null})}),!0):!1};Ks.unstable_batchedUpdates=ob;Ks.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!bx(r))throw Error(Ee(200));if(e==null||e._reactInternals===void 0)throw Error(Ee(38));return _x(e,t,r,!1,n)};Ks.version="18.3.1-next-f1338f8080-20240426";function YT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(YT)}catch(e){console.error(e)}}YT(),YE.exports=Ks;var ca=YE.exports;const XT=ME(ca);var QT,tS=ca;QT=tS.createRoot,tS.hydrateRoot;const p8=1,x8=1e6;let ov=0;function g8(){return ov=(ov+1)%Number.MAX_SAFE_INTEGER,ov.toString()}const lv=new Map,rS=e=>{if(lv.has(e))return;const t=setTimeout(()=>{lv.delete(e),_f({type:"REMOVE_TOAST",toastId:e})},x8);lv.set(e,t)},v8=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,p8)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?rS(r):e.toasts.forEach(n=>{rS(n.id)}),{...e,toasts:e.toasts.map(n=>
vendor: 13,913 bytes, line 40
40n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Dm=[];let Im={toasts:[]};function _f(e){Im=v8(Im,e),Dm.forEach(t=>{t(Im)})}function Rt({...e}){const t=g8(),r=s=>_f({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>_f({type:"DISMISS_TOAST",toastId:t});return _f({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function Kh(){const[e,t]=v.useState(Im);return v.useEffect(()=>(Dm.push(t),()=>{const r=Dm.indexOf(t);r>-1&&Dm.splice(r,1)}),[e]),{...e,toast:Rt,dismiss:r=>_f({type:"DISMISS_TOAST",toastId:r})}}function ke(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function nS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nx(...e){return t=>{let r=!1;const n=e.map(s=>{const a=nS(s,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let s=0;s<n.length;s++){const a=n[s];typeof a=="function"?a():nS(e[s],null)}}}}function ot(...e){return v.useCallback(Nx(...e),e)}function y8(e,t){const r=v.createContext(t),n=a=>{const{children:o,...l}=a,c=v.useMemo(()=>l,Object.values(l));return i.jsx(r.Provider,{value:c,children:o})};n.displayName=e+"Provider";function s(a){const o=v.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,s]}function tn(e,t=[]){let r=[];function n(a,o){const l=v.createContext(o),c=r.length;r=[...r,o];const u=f=>{var b;const{scope:h,children:m,...g}=f,p=((b=h==null?void 0:h[e])==null?void 0:b[c])||l,x=v.useMemo(()=>g,Object.values(g));return i.jsx(p.Provider,{value:x,children:m})};u.displayName=a+"Provider";function d(f,h){var p;const m=((p=h==null?void 0:h[e])==null?void 0:p[c])||l,g=v.useContext(m);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[u,d]}const s=()=>{const a=r.map(o=>v.createContext(o));return function(l){const c=(l==null?void 0:l[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[n,w8(s,...t)]}function w8(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(a){const o=n.reduce((l,{useScope:c,scopeName:u})=>{const f=c(a)[`__scope${u}`];return{...l,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function tl(e){const t=_8(e),r=v.forwardRef((n,s)=>{const{children:a,...o}=n,l=v.Children.toArray(a),c=l.find(N8);if(c){const u=c.props.children,d=l.map(f=>f===c?v.Children.count(u)>1?v.Children.only(null):v.isValidElement(u)?u.props.children:null:f);return i.jsx(t,{...o,ref:s,children:v.isValidElement(u)?v.cloneElement(u,void 0,d):null})}return i.jsx(t,{...o,ref:s,children:a})});return r.displayName=`${e}.Slot`,r}var b8=tl("Slot");function _8(e){const t=v.forwardRef((r,n)=>{const{children:s,...a}=r;if(v.isValidElement(s)){const o=k8(s),l=S8(a,s.props);return s.type!==v.Fragment&&(l.ref=n?Nx(n,o):o),v.cloneElement(s,l)}return v.Children.count(s)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var JT=Symbol("radix.slottable");function ZT(e){const t=({children:r})=>i.jsx(i.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=JT,t}function N8(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===JT}function S8(e,t){const r={...t};for(const n in t){const s=e[n],a=t[n];/^on[A-Z]/.test(n)?s&&a?r[n]=(...l)=>{const c=a(...l);return s(...l),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...a}:n==="className"&&(r[n]=[s,a].filter(Boolean).join(" "))}return{...e,...r}}function k8(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Yh(e){const t=e+"CollectionProvider",[r,n]=tn(t),[s,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:x,children:b}=p,w=ye.useRef(null),y=ye.useRef(new Map).current;return i.jsx(s,{scope:x,itemMap:y,collectionRef:w,children:b})};o.displayName=t;const l=e+"CollectionSlot",c=tl(l),u=ye.forwardRef((p,x)=>{const{scope:b,children:w}=p,y=a(l,b),_=ot(x,y.collectionRef);return i.jsx(c,{ref:_,children:w})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=tl(d),m=ye.forwardRef((p,x)=>{const{scope:b,children:w,...y}=p,_=ye.useRef(null),N=ot(x,_),k=a(d,b);return ye.useEffect(()=>(k.itemMap.set(_,{ref:_,...y}),()=>void k.itemMap.delete(_))),i.jsx(h,{[f]:"",ref:N,children:w})});m.displayName=d;function g(p){const x=a(e+"CollectionConsumer",p);return ye.useCallback(()=>{const w=x.collectionRef.current;if(!w)return[];const y=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((k,S)=>y.indexOf(k.ref.current)-y.indexOf(S.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:u,ItemSlot:m},g,n]}var j8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],He=j8.reduce((e,t)=>{const r=tl(`Primitive.${t}`),n=v.forwardRef((s,a)=>{const{asChild:o,...l}=s,c=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function pb(e,t){e&&ca.flushSync(()=>e.dispatchEvent(t))}function Ur(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function E8(e,t=globalThis==null?void 0:globalThis.document){const r=Ur(e);v.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var C8="DismissableLayer",cy="dismissableLayer.update",T8="dismissableLayer.pointerDownOutside",A8="dismissableLayer.focusOutside",sS,e4=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sc=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:o,onDismiss:l,...c}=e,u=v.useContext(e4),[d,f]=v.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=v.useState({}),g=ot(t,S=>f(S)),p=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=p.indexOf(x),w=d?p.indexOf(d):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,_=w>=b,N=R8(S=>{const E=S.target,j=[...u.branches].some(T=>T.contains(E));!_||j||(s==null||s(S),o==null||o(S),S.defaultPrevented||l==null||l())},h),k=O8(S=>{const E=S.target;[...u.branches].some(T=>T.contains(E))||(a==null||a(S),o==null||o(S),S.defaultPrevented||l==null||l())},h);return E8(S=>{w===u.layers.size-1&&(n==null||n(S),!S.defaultPrevented&&l&&(S.preventDefault(),l()))},h),v.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(sS=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),aS(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=sS)}},[d,h,r,u]),v.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),aS())},[d,u]),v.useEffect(()=>{const S=()=>m({});return document.addEventListener(cy,S),()=>document.removeEventListener(cy,S)},[]),i.jsx(He.div,{...c,ref:g,style:{pointerEvents:y?_?"auto":"none":void 0,...e.style},onFocusCapture:ke(e.onFocusCapture,k.onFocusCapture),onBlurCapture:ke(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:ke(e.onPointerDownCapture,N.onPointerDownCapture)})});Sc.displayName=C8;var P8="DismissableLayerBranch",t4=v.forwardRef((e,t)=>{const r=v.useContext(e4),n=v.useRef(null),s=ot(t,n);return v.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),i.jsx(He.div,{...e,ref:s})});t4.displayName=P8;function R8(e,t=globalThis==null?void 0:globalThis.document){const r=Ur(e),n=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let c=function(){r4(T8,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function O8(e,t=globalThis==null?void 0:globalThis.document){const r=Ur(e),n=v.useRef(!1);return v.useEffect(()=>{const s=a=>{a.target&&!n.current&&r4(A8,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function aS(){const e=new CustomEvent(cy);document.dispatchEvent(e)}function r4(e,t,r,{discrete:n}){const s=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?pb(s,a):s.dispatchEvent(a)}var D8=Sc,I8=t4,un=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},F8="Portal",yd=v.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[s,a]=v.useState(!1);un(()=>a(!0),[]);const o=r||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?XT.createPortal(i.jsx(He.div,{...n,ref:t}),o):null});yd.displayName=F8;function M8(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var rn=e=>{const{present:t,children:r}=e,n=L8(t),s=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),a=ot(n.ref,B8(s));return typeof r=="function"||n.isPresent?v.cloneElement(s,{ref:a}):null};rn.displayName="Presence";function L8(e){const[t,r]=v.useState(),n=v.useRef(null),s=v.useRef(e),a=v.useRef("none"),o=e?"mounted":"unmounted",[l,c]=M8(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const u=G0(n.current);a.current=l==="mounted"?u:"none"},[l]),un(()=>{const u=n.current,d=s.current;if(d!==e){const h=a.current,m=G0(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),un(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=m=>{const p=G0(n.current).includes(m.animationName);if(m.target===t&&p&&(c("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=m=>{m.target===t&&(a.current=G0(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:v.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function G0(e){return(e==null?void 0:e.animationName)||"none"}function B8(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var $8=Sw[" useInsertionEffect ".trim().toString()]||un;function ps({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,a,o]=U8({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:s;{const d=v.useRef(e!==void 0);v.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=v.useCallback(d=>{var f;if(l){const h=W8(d)?d(e):d;h!==e&&((f=o.current)==null||f.call(o,h))}else a(d)},[l,e,a,o]);return[c,u]}function U8({defaultProp:e,onChange:t}){const[r,n]=v.useState(e),s=v.useRef(r),a=v.useRef(t);return $8(()=>{a.current=t},[t]),v.useEffect(()=>{var o;s.current!==r&&((o=a.current)==null||o.call(a,r),s.current=r)},[r,s]),[r,n,a]}function W8(e){return typeof e=="function"}var n4=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"}),z8="VisuallyHidden",Sx=v.forwardRef((e,t)=>i.jsx(He.span,{...e,ref:t,style:{...n4,...e.style}}));Sx.displayName=z8;var H8=Sx,xb="ToastProvider",[gb,V8,G8]=Yh("Toast"),[s4,z0e]=tn("Toast",[G8]),[q8,kx]=s4(xb),a4=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:a=50,children:o}=e,[l,c]=v.useState(null),[u,d]=v.useState(0),f=v.useRef(!1),h=v.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${xb}\`. Expected non-empty \`string\`.`),i.jsx(gb.Provider,{scope:t,children:i.jsx(q8,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:a,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:v.useCallback(()=>d(m=>m+1),[]),onToastRemove:v.useCallback(()=>d(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:o})})};a4.displayName=xb;var i4="ToastViewport",K8=["F8"],uy="toast.viewportPause",dy="toast.viewportResume",o4=v.forwardRef((e,t)=>
40{const{__scopeToast:r,hotkey:n=K8,label:s="Notifications ({hotkey})",...a}=e,o=kx(i4,r),l=V8(r),c=v.useRef(null),u=v.useRef(null),d=v.useRef(null),f=v.useRef(null),h=ot(t,f,o.onViewportChange),m=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=o.toastCount>0;v.useEffect(()=>{const x=b=>{var y;n.length!==0&&n.every(_=>b[_]||b.code===_)&&((y=f.current)==null||y.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),v.useEffect(()=>{const x=c.current,b=f.current;if(g&&x&&b){const w=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(uy);b.dispatchEvent(k),o.isClosePausedRef.current=!0}},y=()=>{if(o.isClosePausedRef.current){const k=new CustomEvent(dy);b.dispatchEvent(k),o.isClosePausedRef.current=!1}},_=k=>{!x.contains(k.relatedTarget)&&y()},N=()=>{x.contains(document.activeElement)||y()};return x.addEventListener("focusin",w),x.addEventListener("focusout",_),x.addEventListener("pointermove",w),x.addEventListener("pointerleave",N),window.addEventListener("blur",w),window.addEventListener("focus",y),()=>{x.removeEventListener("focusin",w),x.removeEventListener("focusout",_),x.removeEventListener("pointermove",w),x.removeEventListener("pointerleave",N),window.removeEventListener("blur",w),window.removeEventListener("focus",y)}}},[g,o.isClosePausedRef]);const p=v.useCallback(({tabbingDirection:x})=>{const w=l().map(y=>{const _=y.ref.current,N=[_,...oL(_)];return x==="forwards"?N:N.reverse()});return(x==="forwards"?w.reverse():w).flat()},[l]);return v.useEffect(()=>{const x=f.current;if(x){const b=w=>{var N,k,S;const y=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!y){const E=document.activeElement,j=w.shiftKey;if(w.target===x&&j){(N=u.current)==null||N.focus();return}const P=p({tabbingDirection:j?"backwards":"forwards"}),D=P.findIndex(U=>U===E);cv(P.slice(D+1))?w.preventDefault():j?(k=u.current)==null||k.focus():(S=d.current)==null||S.focus()}};return x.addEventListener("keydown",b),()=>x.removeEventListener("keydown",b)}},[l,p]),i.jsxs(I8,{ref:c,role:"region","aria-label":s.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&i.jsx(fy,{ref:u,onFocusFromOutsideViewport:()=>{const x=p({tabbingDirection:"forwards"});cv(x)}}),i.jsx(gb.Slot,{scope:r,children:i.jsx(He.ol,{tabIndex:-1,...a,ref:h})}),g&&i.jsx(fy,{ref:d,onFocusFromOutsideViewport:()=>{const x=p({tabbingDirection:"backwards"});cv(x)}})]})});o4.displayName=i4;var l4="ToastFocusProxy",fy=v.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,a=kx(l4,r);return i.jsx(Sx,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const l=o.relatedTarget;!((u=a.viewport)!=null&&u.contains(l))&&n()}})});fy.displayName=l4;var Xh="Toast",Y8="toast.swipeStart",X8="toast.swipeMove",Q8="toast.swipeCancel",J8="toast.swipeEnd",c4=v.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:a,...o}=e,[l,c]=ps({prop:n,defaultProp:s??!0,onChange:a,caller:Xh});return i.jsx(rn,{present:r||l,children:i.jsx(tL,{open:l,...o,ref:t,onClose:()=>c(!1),onPause:Ur(e.onPause),onResume:Ur(e.onResume),onSwipeStart:ke(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ke(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:ke(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:ke(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)})})})});c4.displayName=Xh;var[Z8,eL]=s4(Xh,{onClose(){}}),tL=v.forwardRef((e,t)=>
40{const{__scopeToast:r,type:n="foreground",duration:s,open:a,onClose:o,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:m,...g}=e,p=kx(Xh,r),[x,b]=v.useState(null),w=ot(t,U=>b(U)),y=v.useRef(null),_=v.useRef(null),N=s||p.duration,k=v.useRef(0),S=v.useRef(N),E=v.useRef(0),{onToastAdd:j,onToastRemove:T}=p,R=Ur(()=>{var Q;(x==null?void 0:x.contains(document.activeElement))&&((Q=p.viewport)==null||Q.focus()),o()}),P=v.useCallback(U=>{!U||U===1/0||(window.clearTimeout(E.current),k.current=new Date().getTime(),E.current=window.setTimeout(R,U))},[R]);v.useEffect(()=>{const U=p.viewport;if(U){const Q=()=>{P(S.current),u==null||u()},Y=()=>{const V=new Date().getTime()-k.current;S.current=S.current-V,window.clearTimeout(E.current),c==null||c()};return U.addEventListener(uy,Y),U.addEventListener(dy,Q),()=>{U.removeEventListener(uy,Y),U.removeEventListener(dy,Q)}}},[p.viewport,N,c,u,P]),v.useEffect(()=>{a&&!p.isClosePausedRef.current&&P(N)},[a,N,p.isClosePausedRef,P]),v.useEffect(()=>(j(),()=>T()),[j,T]);const D=v.useMemo(()=>x?x4(x):null,[x]);return p.viewport?i.jsxs(i.Fragment,{children:[D&&i.jsx(rL,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:D}),i.jsx(Z8,{scope:r,onClose:R,children:ca.createPortal(i.jsx(gb.ItemSlot,{scope:r,children:i.jsx(D8,{asChild:!0,onEscapeKeyDown:ke(l,()=>{p.isFocusedToastEscapeKeyDownRef.current||R(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:i.jsx(He.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":p.swipeDirection,...g,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ke(e.onKeyDown,U=>{U.key==="Escape"&&(l==null||l(U.nativeEvent),U.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:ke(e.onPointerDown,U=>{U.button===0&&(y.current={x:U.clientX,y:U.clientY})}),onPointerMove:ke(e.onPointerMove,U=>{if(!y.current)return;const Q=U.clientX-y.current.x,Y=U.clientY-y.current.y,V=!!_.current,F=["left","right"].includes(p.swipeDirection),C=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,X=F?C(0,Q):0,se=F?0:C(0,Y),A=U.pointerType==="touch"?10:2,M={x:X,y:se},I={originalEvent:U,delta:M};V?(_.current=M,q0(X8,f,I,{discrete:!1})):iS(M,p.swipeDirection,A)?(_.current=M,q0(Y8,d,I,{discrete:!1}),U.target.setPointerCapture(U.pointerId)):(Math.abs(Q)>A||Math.abs(Y)>A)&&(y.current=null)}),onPointerUp:ke(e.onPointerUp,U=>{const Q=_.current,Y=U.target;if(Y.hasPointerCapture(U.pointerId)&&Y.releasePointerCapture(U.pointerId),_.current=null,y.current=null,Q){const V=U.currentTarget,F={originalEvent:U,delta:Q};iS(Q,p.swipeDirection,p.swipeThreshold)?q0(J8,m,F,{discrete:!0}):q0(Q8,h,F,{discrete:!0}),V.addEventListener("click",C=>C.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),rL=e=>{const{__scopeToast:t,children:r,...n}=e,s=kx(Xh,t),[a,o]=v.useState(!1),[l,c]=v.useState(!1);return aL(()=>o(!0)),v.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:i.jsx(yd,{asChild:!0,children:i.jsx(Sx,{...n,children:a&&i.jsxs(i.Fragment,{children:[s.label," ",r]})})})},nL="ToastTitle",u4=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return i.jsx(He.div,{...n,ref:t})});u4.displayName=nL;var sL="ToastDescription",d4=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return i.jsx(He.div,{...n,ref:t})});d4.displayName=sL;var f4="ToastAction",h4=v.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?i.jsx(p4,{altText:r,asChild:!0,children:i.jsx(vb,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${f4}\`. Expected non-empty \`string\`.`),null)});h4.displayName=f4;var m4="ToastClose",vb=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=eL(m4,r);return i.jsx(p4,{asChild:!0,children:i.jsx(He.button,{type:"button",...n,ref:t,onClick:ke(e.onClick,s.onClose)})})});vb.displayName=m4;var p4=v.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return i.jsx(He.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function x4(e){const t=[];
vendor: 10,652 bytes, lines 40-169
40return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),iL(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",a=n.dataset.radixToastAnnounceExclude==="";if(!s)if(a){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...x4(n))}}),t}function q0(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?pb(s,a):s.dispatchEvent(a)}var iS=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),a=n>s;return t==="left"||t==="right"?a&&n>r:!a&&s>r};function aL(e=()=>{}){const t=Ur(e);un(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function iL(e){return e.nodeType===e.ELEMENT_NODE}function oL(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function cv(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var lL=a4,g4=o4,v4=c4,y4=u4,w4=d4,b4=h4,_4=vb;function N4(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=N4(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function S4(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=N4(e))&&(n&&(n+=" "),n+=t);return n}const oS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,lS=S4,jx=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return lS(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:a}=t,o=Object.keys(s).map(u=>{const d=r==null?void 0:r[u],f=a==null?void 0:a[u];if(d===null)return null;const h=oS(d)||oS(f);return s[u][h]}),l=r&&Object.entries(r).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:f,className:h,...m}=d;return Object.entries(m).every(g=>{let[p,x]=g;return Array.isArray(x)?x.includes({...a,...l}[p]):{...a,...l}[p]===x})?[...u,f,h]:u},[]);return lS(e,o,c,r==null?void 0:r.class,r==null?void 0:r.className)};/**
41 * @license lucide-react v0.462.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const cL=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),k4=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
46 * @license lucide-react v0.462.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var uL={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"};/**
51 * @license lucide-react v0.462.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const dL=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:a,iconNode:o,...l},c)=>v.createElement("svg",{ref:c,...uL,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:k4("lucide",s),...l},[...o.map(([u,d])=>v.createElement(u,d)),...Array.isArray(a)?a:[a]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const Fe=(e,t)=>{const r=v.forwardRef(({className:n,...s},a)=>v.createElement(dL,{ref:a,iconNode:t,className:k4(`lucide-${cL(e)}`,n),...s}));return r.displayName=`${e}`,r};/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const fL=Fe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
66 * @license lucide-react v0.462.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const j4=Fe("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
71 * @license lucide-react v0.462.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const Ex=Fe("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
76 * @license lucide-react v0.462.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const E4=Fe("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
81 * @license lucide-react v0.462.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const eh=Fe("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
86 * @license lucide-react v0.462.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const hL=Fe("BookPlus",[["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]);/**
91 * @license lucide-react v0.462.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const rr=Fe("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"}]]);/**
96 * @license lucide-react v0.462.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const Bs=Fe("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"}]]);/**
101 * @license lucide-react v0.462.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const hn=Fe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
106 * @license lucide-react v0.462.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const Cx=Fe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
111 * @license lucide-react v0.462.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const Xi=Fe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
116 * @license lucide-react v0.462.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const yi=Fe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
121 * @license lucide-react v0.462.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const C4=Fe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
126 * @license lucide-react v0.462.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const yb=Fe("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"}]]);/**
131 * @license lucide-react v0.462.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const mL=Fe("CircleArrowDown",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]]);/**
136 * @license lucide-react v0.462.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const pL=Fe("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/**
141 * @license lucide-react v0.462.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const Ha=Fe("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
146 * @license lucide-react v0.462.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const vu=Fe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
151 * @license lucide-react v0.462.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const Nf=Fe("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
156 * @license lucide-react v0.462.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const th=Fe("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"}]]);/**
161 * @license lucide-react v0.462.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const T4=Fe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
166 * @license lucide-react v0.462.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const Fo=Fe("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
171 * @license lucide-react v0.462.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const Hs=Fe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
176 * @license lucide-react v0.462.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const xL=Fe("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
181 * @license lucide-react v0.462.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const Cs=Fe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
186 * @license lucide-react v0.462.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const Zu=Fe("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
191 * @license lucide-react v0.462.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const A4=Fe("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"}]]);/**
196 * @license lucide-react v0.462.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const gL=Fe("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
201 * @license lucide-react v0.462.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const Hl=Fe("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"}]]);/**
206 * @license lucide-react v0.462.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const wb=Fe("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"}]]);/**
211 * @license lucide-react v0.462.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const cS=Fe("FileQuestion",[["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);/**
216 * @license lucide-react v0.462.0 - ISC
217 *
218 * This source code is licensed under the ISC license.
219 * See the LICENSE file in the root directory of this source tree.
220 */const P4=Fe("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"}]]);/**
221 * @license lucide-react v0.462.0 - ISC
222 *
223 * This source code is licensed under the ISC license.
224 * See the LICENSE file in the root directory of this source tree.
225 */const vL=Fe("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
226 * @license lucide-react v0.462.0 - ISC
227 *
228 * This source code is licensed under the ISC license.
229 * See the LICENSE file in the root directory of this source tree.
230 */const uv=Fe("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/**
231 * @license lucide-react v0.462.0 - ISC
232 *
233 * This source code is licensed under the ISC license.
234 * See the LICENSE file in the root directory of this source tree.
235 */const pa=Fe("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
236 * @license lucide-react v0.462.0 - ISC
237 *
238 * This source code is licensed under the ISC license.
239 * See the LICENSE file in the root directory of this source tree.
240 */const yL=Fe("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
241 * @license lucide-react v0.462.0 - ISC
242 *
243 * This source code is licensed under the ISC license.
244 * See the LICENSE file in the root directory of this source tree.
245 */const Wi=Fe("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"}]]);/**
246 * @license lucide-react v0.462.0 - ISC
247 *
248 * This source code is licensed under the ISC license.
249 * See the LICENSE file in the root directory of this source tree.
250 */const R4=Fe("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
251 * @license lucide-react v0.462.0 - ISC
252 *
253 * This source code is licensed under the ISC license.
254 * See the LICENSE file in the root directory of this source tree.
255 */const O4=Fe("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
256 * @license lucide-react v0.462.0 - ISC
257 *
258 * This source code is licensed under the ISC license.
259 * See the LICENSE file in the root directory of this source tree.
260 */const yr=Fe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
261 * @license lucide-react v0.462.0 - ISC
262 *
263 * This source code is licensed under the ISC license.
264 * See the LICENSE file in the root directory of this source tree.
265 */const wL=Fe("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
266 * @license lucide-react v0.462.0 - ISC
267 *
268 * This source code is licensed under the ISC license.
269 * See the LICENSE file in the root directory of this source tree.
270 */const bL=Fe("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"}]]);/**
271 * @license lucide-react v0.462.0 - ISC
272 *
273 * This source code is licensed under the ISC license.
274 * See the LICENSE file in the root directory of this source tree.
275 */const D4=Fe("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"}]]);/**
276 * @license lucide-react v0.462.0 - ISC
277 *
278 * This source code is licensed under the ISC license.
279 * See the LICENSE file in the root directory of this source tree.
280 */const I4=Fe("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
281 * @license lucide-react v0.462.0 - ISC
282 *
283 * This source code is licensed under the ISC license.
284 * See the LICENSE file in the root directory of this source tree.
285 */const ls=Fe("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"}]]);/**
286 * @license lucide-react v0.462.0 - ISC
287 *
288 * This source code is licensed under the ISC license.
289 * See the LICENSE file in the root directory of this source tree.
290 */const F4=Fe("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
291 * @license lucide-react v0.462.0 - ISC
292 *
293 * This source code is licensed under the ISC license.
294 * See the LICENSE file in the root directory of this source tree.
295 */const Qh=Fe("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
296 * @license lucide-react v0.462.0 - ISC
297 *
298 * This source code is licensed under the ISC license.
299 * See the LICENSE file in the root directory of this source tree.
300 */const M4=Fe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
301 * @license lucide-react v0.462.0 - ISC
302 *
303 * This source code is licensed under the ISC license.
304 * See the LICENSE file in the root directory of this source tree.
305 */const mp=Fe("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
306 * @license lucide-react v0.462.0 - ISC
307 *
308 * This source code is licensed under the ISC license.
309 * See the LICENSE file in the root directory of this source tree.
310 */const wd=Fe("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"}]]);/**
311 * @license lucide-react v0.462.0 - ISC
312 *
313 * This source code is licensed under the ISC license.
314 * See the LICENSE file in the root directory of this source tree.
315 */const Jh=Fe("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"}]]);/**
316 * @license lucide-react v0.462.0 - ISC
317 *
318 * This source code is licensed under the ISC license.
319 * See the LICENSE file in the root directory of this source tree.
320 */const L4=Fe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
321 * @license lucide-react v0.462.0 - ISC
322 *
323 * This source code is licensed under the ISC license.
324 * See the LICENSE file in the root directory of this source tree.
325 */const hs=Fe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
326 * @license lucide-react v0.462.0 - ISC
327 *
328 * This source code is licensed under the ISC license.
329 * See the LICENSE file in the root directory of this source tree.
330 */const B4=Fe("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
331 * @license lucide-react v0.462.0 - ISC
332 *
333 * This source code is licensed under the ISC license.
334 * See the LICENSE file in the root directory of this source tree.
335 */const bb=Fe("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"}]]);/**
336 * @license lucide-react v0.462.0 - ISC
337 *
338 * This source code is licensed under the ISC license.
339 * See the LICENSE file in the root directory of this source tree.
340 */const _L=Fe("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"}]]);/**
341 * @license lucide-react v0.462.0 - ISC
342 *
343 * This source code is licensed under the ISC license.
344 * See the LICENSE file in the root directory of this source tree.
345 */const NL=Fe("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
346 * @license lucide-react v0.462.0 - ISC
347 *
348 * This source code is licensed under the ISC license.
349 * See the LICENSE file in the root directory of this source tree.
350 */const SL=Fe("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"}]]);/**
351 * @license lucide-react v0.462.0 - ISC
352 *
353 * This source code is licensed under the ISC license.
354 * See the LICENSE file in the root directory of this source tree.
355 */const no=Fe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
356 * @license lucide-react v0.462.0 - ISC
357 *
358 * This source code is licensed under the ISC license.
359 * See the LICENSE file in the root directory of this source tree.
360 */const kL=Fe("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"}]]);/**
361 * @license lucide-react v0.462.0 - ISC
362 *
363 * This source code is licensed under the ISC license.
364 * See the LICENSE file in the root directory of this source tree.
365 */const uS=Fe("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
365y:"oel41y"}]]);/**
366 * @license lucide-react v0.462.0 - ISC
367 *
368 * This source code is licensed under the ISC license.
369 * See the LICENSE file in the root directory of this source tree.
370 */const $4=Fe("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/**
371 * @license lucide-react v0.462.0 - ISC
372 *
373 * This source code is licensed under the ISC license.
374 * See the LICENSE file in the root directory of this source tree.
375 */const wi=Fe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
376 * @license lucide-react v0.462.0 - ISC
377 *
378 * This source code is licensed under the ISC license.
379 * See the LICENSE file in the root directory of this source tree.
380 */const dv=Fe("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"}]]);/**
381 * @license lucide-react v0.462.0 - ISC
382 *
383 * This source code is licensed under the ISC license.
384 * See the LICENSE file in the root directory of this source tree.
385 */const hy=Fe("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);/**
386 * @license lucide-react v0.462.0 - ISC
387 *
388 * This source code is licensed under the ISC license.
389 * See the LICENSE file in the root directory of this source tree.
390 */const Ia=Fe("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"}]]);/**
391 * @license lucide-react v0.462.0 - ISC
392 *
393 * This source code is licensed under the ISC license.
394 * See the LICENSE file in the root directory of this source tree.
395 */const jL=Fe("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"}]]);/**
396 * @license lucide-react v0.462.0 - ISC
397 *
398 * This source code is licensed under the ISC license.
399 * See the LICENSE file in the root directory of this source tree.
400 */const my=Fe("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/**
401 * @license lucide-react v0.462.0 - ISC
402 *
403 * This source code is licensed under the ISC license.
404 * See the LICENSE file in the root directory of this source tree.
405 */const ed=Fe("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"}]]);/**
406 * @license lucide-react v0.462.0 - ISC
407 *
408 * This source code is licensed under the ISC license.
409 * See the LICENSE file in the root directory of this source tree.
410 */const EL=Fe("UserCheck",[["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"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/**
411 * @license lucide-react v0.462.0 - ISC
412 *
413 * This source code is licensed under the ISC license.
414 * See the LICENSE file in the root directory of this source tree.
415 */const dS=Fe("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/**
416 * @license lucide-react v0.462.0 - ISC
417 *
418 * This source code is licensed under the ISC license.
419 * See the LICENSE file in the root directory of this source tree.
420 */const _b=Fe("UserPlus",[["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"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
421 * @license lucide-react v0.462.0 - ISC
422 *
423 * This source code is licensed under the ISC license.
424 * See the LICENSE file in the root directory of this source tree.
425 */const CL=Fe("UserX",[["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"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]);/**
426 * @license lucide-react v0.462.0 - ISC
427 *
428 * This source code is licensed under the ISC license.
429 * See the LICENSE file in the root directory of this source tree.
430 */const Nb=Fe("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"}]]);/**
431 * @license lucide-react v0.462.0 - ISC
432 *
433 * This source code is licensed under the ISC license.
434 * See the LICENSE file in the root directory of this source tree.
435 */const xs=Fe("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"}]]);/**
436 * @license lucide-react v0.462.0 - ISC
437 *
438 * This source code is licensed under the ISC license.
439 * See the LICENSE file in the root directory of this source tree.
440 */const $a=Fe("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"}]]);/**
441 * @license lucide-react v0.462.0 - ISC
442 *
443 * This source code is licensed under the ISC license.
444 * See the LICENSE file in the root directory of this source tree.
445 */const hl=Fe("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"}]]);/**
446 * @license lucide-react v0.462.0 - ISC
447 *
448 * This source code is licensed under the ISC license.
449 * See the LICENSE file in the root directory of this source tree.
450 */const fS=Fe("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"}]]);/**
451 * @license lucide-react v0.462.0 - ISC
452 *
453 * This source code is licensed under the ISC license.
454 * See the LICENSE file in the root directory of this source tree.
455 */const es=Fe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 12,264 bytes, line 455
455],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Sb="-",TL=e=>{const t=PL(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const l=o.split(Sb);return l[0]===""&&l.length!==1&&l.shift(),U4(l,t)||AL(o)},getConflictingClassGroupIds:(o,l)=>{const c=r[o]||[];return l&&n[o]?[...c,...n[o]]:c}}},U4=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?U4(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const a=e.join(Sb);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},hS=/^\[(.+)\]$/,AL=e=>{if(hS.test(e)){const t=hS.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},PL=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return OL(Object.entries(e.classGroups),r).forEach(([a,o])=>{py(o,n,a,t)}),n},py=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const a=s===""?t:mS(t,s);a.classGroupId=r;return}if(typeof s=="function"){if(RL(s)){py(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([a,o])=>{py(o,mS(t,a),r,n)})})},mS=(e,t)=>{let r=e;return t.split(Sb).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},RL=e=>e.isThemeGetter,OL=(e,t)=>t?e.map(([r,n])=>{const s=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,l])=>[t+o,l])):a);return[r,s]}):e,DL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(a,o)=>{r.set(a,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let o=r.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return s(a,o),o},set(a,o){r.has(a)?r.set(a,o):s(a,o)}}},W4="!",IL=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],a=t.length,o=l=>{const c=[];let u=0,d=0,f;for(let x=0;x<l.length;x++){let b=l[x];if(u===0){if(b===s&&(n||l.slice(x,x+a)===t)){c.push(l.slice(d,x)),d=x+a;continue}if(b==="/"){f=x;continue}}b==="["?u++:b==="]"&&u--}const h=c.length===0?l:l.substring(d),m=h.startsWith(W4),g=m?h.substring(1):h,p=f&&f>d?f-d:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:p}};return r?l=>r({className:l,parseClassName:o}):o},FL=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},ML=e=>({cache:DL(e.cacheSize),parseClassName:IL(e),...TL(e)}),LL=/\s+/,BL=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,a=[],o=e.trim().split(LL);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:m}=r(u);let g=!!m,p=n(g?h.substring(0,m):h);if(!p){if(!g){l=u+(l.length>0?" "+l:l);continue}if(p=n(h),!p){l=u+(l.length>0?" "+l:l);continue}g=!1}const x=FL(d).join(":"),b=f?x+W4:x,w=b+p;if(a.includes(w))continue;a.push(w);const y=s(p,g);for(let _=0;_<y.length;++_){const N=y[_];a.push(b+N)}l=u+(l.length>0?" "+l:l)}return l};function $L(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=z4(t))&&(n&&(n+=" "),n+=r);return n}const z4=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=z4(e[n]))&&(r&&(r+=" "),r+=t);return r};function UL(e,...t){let r,n,s,a=o;function o(c){const u=t.reduce((d,f)=>f(d),e());return r=ML(u),n=r.cache.get,s=r.cache.set,a=l,l(c)}function l(c){const u=n(c);if(u)return u;const d=BL(c,r);return s(c,d),d}return function(){return a($L.apply(null,arguments))}}const dr=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},H4=/^\[(?:([a-z-]+):)?(.+)\]$/i,WL=/^\d+\/\d+$/,zL=new Set(["px","full","screen"]),HL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,VL=/\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$/,GL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,qL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ci=e=>Eu(e)||zL.has(e)||WL.test(e),ho=e=>bd(e,"length",r9),Eu=e=>!!e&&!Number.isNaN(Number(e)),fv=e=>bd(e,"number",Eu),Xd=e=>!!e&&Number.isInteger(Number(e)),YL=e=>e.endsWith("%")&&Eu(e.slice(0,-1)),wt=e=>H4.test(e),mo=e=>HL.test(e),XL=new Set(["length","size","percentage"]),QL=e=>bd(e,XL,V4),JL=e=>bd(e,"position",V4),ZL=new Set(["image","url"]),e9=e=>bd(e,ZL,s9),t9=e=>bd(e,"",n9),Qd=()=>!0,bd=(e,t,r)=>{const n=H4.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},r9=e=>VL.test(e)&&!GL.test(e),V4=()=>!1,n9=e=>qL.test(e),s9=e=>KL.test(e),a9=()=>{const e=dr("colors"),t=dr("spacing"),r=dr("blur"),n=dr("brightness"),s=dr("borderColor"),a=dr("borderRadius"),o=dr("borderSpacing"),l=dr("borderWidth"),c=dr("contrast"),u=dr("grayscale"),d=dr("hueRotate"),f=dr("invert"),h=dr("gap"),m=dr("gradientColorStops"),g=dr("gradientColorStopPositions"),p=dr("inset"),x=dr("margin"),b=dr("opacity"),w=dr("padding"),y=dr("saturate"),_=dr("scale"),N=dr("sepia"),k=dr("skew"),S=dr("space"),E=dr("translate"),j=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto",wt,t],P=()=>[wt,t],D=()=>["",Ci,ho],U=()=>["auto",Eu,wt],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Y=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],C=()=>["","0",wt],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],se=()=>[Eu,wt];return{cacheSize:500,separator:":",theme:{colors:[Qd],spacing:[Ci,ho],blur:["none","",mo,wt],brightness:se(),borderColor:[e],borderRadius:["none","","full",mo,wt],borderSpacing:P(),borderWidth:D(),contrast:se(),grayscale:C(),hueRotate:se(),invert:C(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[YL,ho],inset:R(),margin:R(),opacity:se(),padding:P(),saturate:se(),scale:se(),sepia:C(),skew:se(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",wt]}],container:["container"],columns:[{columns:[mo]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"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:[...Q(),wt]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Xd,wt]}],basis:[{basis:R()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",wt]}],grow:[{grow:C()}],shrink:[{shrink:C()}],order:[{order:["first","last","none",Xd,wt]}],"grid-cols":[{"grid-cols":[Qd]}],"col-start-end":[{col:["auto",{span:["full",Xd,wt]},wt]}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":[Qd]}],"row-start-end":[{row:["auto",{span:[Xd,wt]},wt]}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",wt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",wt]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",wt,t]}],"min-w":[{"min-w":[wt,t,"min","max","fit"]}],"max-w":[{"max-w":[wt,t,"none","full","min","max","fit","prose",{screen:[mo]},mo]}],h:[{h:[wt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[wt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[wt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[wt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",mo,ho]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",fv]}],"font-family":[{font:[Qd]}],"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",wt]}],"line-clamp":[{"line-clamp":["none",Eu,fv]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ci,wt]}],"list-image":[{"list-image":["none",wt]}],"list-style-type":[{list:["none","disc","decimal",wt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ci,ho]}],"underline-offset":[{"underline-offset":["auto",Ci,wt]}],"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:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",wt]}],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",wt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),JL]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",QL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},e9]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}
vendor: 5,182 bytes, line 455
455],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],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":[b]}],"border-style":[{border:[...Y(),"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":[b]}],"divide-style":[{divide:Y()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Y()]}],"outline-offset":[{"outline-offset":[Ci,wt]}],"outline-w":[{outline:[Ci,ho]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Ci,ho]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",mo,t9]}],"shadow-color":[{shadow:[Qd]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",mo,wt]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[y]}],sepia:[{sepia:[N]}],"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":[b]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",wt]}],duration:[{duration:se()}],ease:[{ease:["linear","in","out","in-out",wt]}],delay:[{delay:se()}],animate:[{animate:["none","spin","ping","pulse","bounce",wt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Xd,wt]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",wt]}],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",wt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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"]}
vendor: 4,647 bytes, line 455
455],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",wt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ci,ho,fv]}],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"]}}},i9=UL(a9);function xe(...e){return i9(S4(e))}const o9=lL,G4=v.forwardRef(({className:e,...t},r)=>i.jsx(g4,{ref:r,className:xe("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}));G4.displayName=g4.displayName;const l9=jx("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"}}),q4=v.forwardRef(({className:e,variant:t,...r},n)=>i.jsx(v4,{ref:n,className:xe(l9({variant:t}),e),...r}));q4.displayName=v4.displayName;const c9=v.forwardRef(({className:e,...t},r)=>i.jsx(b4,{ref:r,className:xe("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 group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));c9.displayName=b4.displayName;const K4=v.forwardRef(({className:e,...t},r)=>i.jsx(_4,{ref:r,className:xe("absolute right-2 top-2 rounded-md p-1 text-foreground
455/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:i.jsx(es,{className:"h-4 w-4"})}));K4.displayName=_4.displayName;const Y4=v.forwardRef(({className:e,...t},r)=>i.jsx(y4,{ref:r,className:xe("text-sm font-semibold",e),...t}));Y4.displayName=y4.displayName;const X4=v.forwardRef(({className:e,...t},r)=>i.jsx(w4,{ref:r,className:xe("text-sm opacity-90",e),...t}));X4.displayName=w4.displayName;function u9(){const{toasts:e}=Kh();return i.jsxs(o9,{children:[e.map(function({id:t,title:r,description:n,action:s,...a}){return i.jsxs(q4,{...a,children:[i.jsxs("div",{className:"grid gap-1",children:[r&&i.jsx(Y4,{children:r}),n&&i.jsx(X4,{children:n})]}),s,i.jsx(K4,{})]},t)}),i.jsx(G4,{})]})}var pS=["light","dark"],d9="(prefers-color-scheme: dark)",f9=v.createContext(void 0),h9={setTheme:e=>{},themes:[]},m9=()=>{var e;return(e=v.useContext(f9))!=null?e:h9};v.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:a,value:o,attrs:l,nonce:c})=>{let u=a==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(g=>`'${g}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,f=s?pS.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(g,p=!1,x=!0)=>{let b=o?o[g]:g,w=p?g+"|| ''":`'${b}'`,y="";return s&&x&&!p&&pS.includes(g)&&(y+=`d.style.colorScheme = '${g}';`),r==="class"?p||b?y+=`c.add(${w})`:y+="null":b&&(y+=`d[s](n,${w})`),y},m=e?`!function(){${d}${h(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${d9}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}${u?"":"else{"+h(a,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}else{${h(a,!1,!1)};}${f}}catch(t){}}();`;return v.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:m}})});var p9=e=>{switch(e){case"success":return v9;case"info":return w9;case"warning":return y9;case"error":return b9;default:return null}},x9=Array(12).fill(0),g9=({visible:e,className:t})=>ye.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ye.createElement("div",{className:"sonner-spinner"},x9.map((r,n)=>ye.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),v9=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),y9=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),w9=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),b9=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),_9=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ye.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ye.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),N9=()=>{let[e,t]=ye.useState(document.hidden);return ye.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e}
455,xy=1,S9=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:xy++,a=this.toasts.find(l=>l.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:r}),{...l,...e,id:s,dismissible:o,title:r}):l):this.addToast({title:r,...n,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
455this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,a,o=n.then(async c=>{if(a=["resolve",c],ye.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(j9(c)&&!c.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:r,type:"error",message:u,description:d})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"success",message:u,description:d})}}).catch(async c=>{if(a=["reject",c],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"error",message:u,description:d})}}).finally(()=>{var c;s&&(this.dismiss(r),r=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>o.then(()=>a[0]==="reject"?u(a[1]):c(a[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||xy++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},as=new S9,k9=(e,t)=>{let r=(t==null?void 0:t.id)||xy++;return as.addToast({title:e,...t,id:r}),r},j9=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",E9=k9,C9=()=>as.toasts,T9=()=>as.getActiveToasts(),K=Object.assign(E9,{success:as.success,info:as.info,warning:as.warning,error:as.error,custom:as.custom,message:as.message,promise:as.promise,dismiss:as.dismiss,loading:as.loading},{getHistory:C9,getToasts:T9});function A9(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}A9(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
455left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
455:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
455--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
456`);function K0(e){return e.label!==void 0}var P9=3,R9="32px",O9="16px",xS=4e3,D9=356,I9=14,F9=20,M9=200;function Na(...e){return e.filter(Boolean).join(" ")}function L9(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var B9=e=>{var t,r,n,s,a,o,l,c,u,d,f;let{invert:h,toast:m,unstyled:g,interacting:p,setHeights:x,visibleToasts:b,heights:w,index:y,toasts:_,expanded:N,removeToast:k,defaultRichColors:S,closeButton:E,style:j,cancelButtonStyle:T,actionButtonStyle:R,className:P="",descriptionClassName:D="",duration:U,position:Q,gap:Y,loadingIcon:V,expandByDefault:F,classNames:C,icons:X,closeButtonAriaLabel:se="Close toast",pauseWhenPageIsHidden:A}=e,[M,I]=ye.useState(null),[z,J]=ye.useState(null),[Z,re]=ye.useState(!1),[ae,ne]=ye.useState(!1),[Se,B]=ye.useState(!1),[qe,ue]=ye.useState(!1),[Re,Ce]=ye.useState(!1),[pe,fe]=ye.useState(0),[te,Ne]=ye.useState(0),be=ye.useRef(m.duration||U||xS),Qe=ye.useRef(null),nt=ye.useRef(null),Je=y===0,Le=y+1<=b,lt=m.type,_e=m.dismissible!==!1,Te=m.className||"",et=m.descriptionClassName||"",Be=ye.useMemo(()=>w.findIndex(rt=>rt.toastId===m.id)||0,[w,m.id]),ct=ye.useMemo(()=>{var rt;return(rt=m.closeButton)!=null?rt:E},[m.closeButton,E]),Gt=ye.useMemo(()=>m.duration||U||xS,[m.duration,U]),qt=ye.useRef(0),nn=ye.useRef(0),Es=ye.useRef(0),ba=ye.useRef(null),[Md,Sl]=Q.split("-"),kl=ye.useMemo(()=>w.reduce((rt,xt,_t)=>_t>=Be?rt:rt+xt.height,0),[w,Be]),jl=N9(),Ld=m.invert||h,Ar=lt==="loading";nn.current=ye.useMemo(()=>Be*Y+kl,[Be,kl]),ye.useEffect(()=>{be.current=Gt},[Gt]),ye.useEffect(()=>{re(!0)},[]),ye.useEffect(()=>{let rt=nt.current;if(rt){let xt=rt.getBoundingClientRect().height;return Ne(xt),x(_t=>[{toastId:m.id,height:xt,position:m.position},..._t]),()=>x(_t=>_t.filter(gr=>gr.toastId!==m.id))}},[x,m.id]),ye.useLayoutEffect(()=>{if(!Z)return;let rt=nt.current,xt=rt.style.height;rt.style.height="auto";let _t=rt.getBoundingClientRect().height;rt.style.height=xt,Ne(_t),x(gr=>gr.find(qr=>qr.toastId===m.id)?gr.map(qr=>qr.toastId===m.id?{...qr,height:_t}:qr):[{toastId:m.id,height:_t,position:m.position},...gr])},[Z,m.title,m.description,x,m.id]);let nr=ye.useCallback(()=>{ne(!0),fe(nn.current),x(rt=>rt.filter(xt=>xt.toastId!==m.id)),setTimeout(()=>{k(m)},M9)}
456,[m,k,x,nn]);ye.useEffect(()=>{if(m.promise&&lt==="loading"||m.duration===1/0||m.type==="loading")return;let rt;return N||p||A&&jl?(()=>{if(Es.current<qt.current){let xt=new Date().getTime()-qt.current;be.current=be.current-xt}Es.current=new Date().getTime()})():be.current!==1/0&&(qt.current=new Date().getTime(),rt=setTimeout(()=>{var xt;(xt=m.onAutoClose)==null||xt.call(m,m),nr()},be.current)),()=>clearTimeout(rt)},[N,p,m,lt,A,jl,nr]),ye.useEffect(()=>{m.delete&&nr()},[nr,m.delete]);function wn(){var rt,xt,_t;return X!=null&&X.loading?ye.createElement("div",{className:Na(C==null?void 0:C.loader,(rt=m==null?void 0:m.classNames)==null?void 0:rt.loader,"sonner-loader"),"data-visible":lt==="loading"},X.loading):V?ye.createElement("div",{className:Na(C==null?void 0:C.loader,(xt=m==null?void 0:m.classNames)==null?void 0:xt.loader,"sonner-loader"),"data-visible":lt==="loading"},V):ye.createElement(g9,{className:Na(C==null?void 0:C.loader,(_t=m==null?void 0:m.classNames)==null?void 0:_t.loader),visible:lt==="loading"})}return ye.createElement("li",{tabIndex:0,ref:nt,className:Na(P,Te,C==null?void 0:C.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,C==null?void 0:C.default,C==null?void 0:C[lt],(r=m==null?void 0:m.classNames)==null?void 0:r[lt]),"data-sonner-toast":"","data-rich-colors":(n=m.richColors)!=null?n:S,"data-styled":!(m.jsx||m.unstyled||g),"data-mounted":Z,"data-promise":!!m.promise,"data-swiped":Re,"data-removed":ae,"data-visible":Le,"data-y-position":Md,"data-x-position":Sl,"data-index":y,"data-front":Je,"data-swiping":Se,"data-dismissible":_e,"data-type":lt,"data-invert":Ld,"data-swipe-out":qe,"data-swipe-direction":z,"data-expanded":!!(N||F&&Z),style:{"--index":y,"--toasts-before":y,"--z-index":_.length-y,"--offset":`${ae?pe:nn.current}px`,"--initial-height":F?"auto":`${te}px`,...j,...m.style},onDragEnd:()=>{B(!1),I(null),ba.current=null},onPointerDown:rt=>{Ar||!_e||(Qe.current=new Date,fe(nn.current),rt.target.setPointerCapture(rt.pointerId),rt.target.tagName!=="BUTTON"&&(B(!0),ba.current={x:rt.clientX,y:rt.clientY}))},onPointerUp:()=>{var rt,xt,_t,gr;if(qe||!_e)return;ba.current=null;let qr=Number(((rt=nt.current)==null?void 0:rt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),er=Number(((xt=nt.current)==null?void 0:xt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),fn=new Date().getTime()-((_t=Qe.current)==null?void 0:_t.getTime()),ir=M==="x"?qr:er,Kr=Math.abs(ir)/fn;if(Math.abs(ir)>=F9||Kr>.11){fe(nn.current),(gr=m.onDismiss)==null||gr.call(m,m),J(M==="x"?qr>0?"right":"left":er>0?"down":"up"),nr(),ue(!0),Ce(!1);return}B(!1),I(null)},onPointerMove:rt=>{var xt,_t,gr,qr;if(!ba.current||!_e||((xt=window.getSelection())==null?void 0:xt.toString().length)>0)return;let er=rt.clientY-ba.current.y,fn=rt.clientX-ba.current.x,ir=(_t=e.swipeDirections)!=null?_t:L9(Q);!M&&(Math.abs(fn)>1||Math.abs(er)>1)&&I(Math.abs(fn)>Math.abs(er)?"x":"y");let Kr={x:0,y:0};M==="y"?(ir.includes("top")||ir.includes("bottom"))&&(ir.includes("top")&&er<0||ir.includes("bottom")&&er>0)&&(Kr.y=er):M==="x"&&(ir.includes("left")||ir.includes("right"))&&(ir.includes("left")&&fn<0||ir.includes("right")&&fn>0)&&(Kr.x=fn),(Math.abs(Kr.x)>0||Math.abs(Kr.y)>0)&&Ce(!0),(gr=nt.current)==null||gr.style.setProperty("--swipe-amount-x",`${Kr.x}px`),(qr=nt.current)==null||qr.style.setProperty("--swipe-amount-y",`${Kr.y}px`)}},ct&&!m.jsx?ye.createElement("button",{"aria-label":se,"data-disabled":Ar,"data-close-button":!0,onClick:Ar||!_e?()=>{}:()=>{var rt;nr(),(rt=m.onDismiss)==null||rt.call(m,m)},className:Na(C==null?void 0:C.closeButton,(s=m==null?void 0:m.classNames)==null?void 0:s.closeButton)},(a=X==null?void 0:X.close)!=null?a:_9):null,m.jsx||v.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:ye.createElement(ye.Fragment,null,lt||m.icon||m.promise?ye.createElement("div",{"data-icon":"",className:Na(C==null?void 0:C.icon,(o=m==null?void 0:m.classNames)==null?void 0:o.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||wn():null,m.type!=="loading"?m.
vendor: 4,769 bytes, line 456
456icon||(X==null?void 0:X[lt])||p9(lt):null):null,ye.createElement("div",{"data-content":"",className:Na(C==null?void 0:C.content,(l=m==null?void 0:m.classNames)==null?void 0:l.content)},ye.createElement("div",{"data-title":"",className:Na(C==null?void 0:C.title,(c=m==null?void 0:m.classNames)==null?void 0:c.title)},typeof m.title=="function"?m.title():m.title),m.description?ye.createElement("div",{"data-description":"",className:Na(D,et,C==null?void 0:C.description,(u=m==null?void 0:m.classNames)==null?void 0:u.description)},typeof m.description=="function"?m.description():m.description):null),v.isValidElement(m.cancel)?m.cancel:m.cancel&&K0(m.cancel)?ye.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||T,onClick:rt=>{var xt,_t;K0(m.cancel)&&_e&&((_t=(xt=m.cancel).onClick)==null||_t.call(xt,rt),nr())},className:Na(C==null?void 0:C.cancelButton,(d=m==null?void 0:m.classNames)==null?void 0:d.cancelButton)},m.cancel.label):null,v.isValidElement(m.action)?m.action:m.action&&K0(m.action)?ye.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||R,onClick:rt=>{var xt,_t;K0(m.action)&&((_t=(xt=m.action).onClick)==null||_t.call(xt,rt),!rt.defaultPrevented&&nr())},className:Na(C==null?void 0:C.actionButton,(f=m==null?void 0:m.classNames)==null?void 0:f.actionButton)},m.action.label):null))};function gS(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function $9(e,t){let r={};return[e,t].forEach((n,s)=>{let a=s===1,o=a?"--mobile-offset":"--offset",l=a?O9:R9;function c(u){["top","right","bottom","left"].forEach(d=>{r[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${o}-${u}`]=l:r[`${o}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):c(l)}),r}var U9=v.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:a,closeButton:o,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:f,duration:h,style:m,visibleToasts:g=P9,toastOptions:p,dir:x=gS(),gap:b=I9,loadingIcon:w,icons:y,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:N}=e,[k,S]=ye.useState([]),E=ye.useMemo(()=>Array.from(new Set([n].concat(k.filter(A=>A.position).map(A=>A.position)))),[k,n]),[j,T]=ye.useState([]),[R,P]=ye.useState(!1),[D,U]=ye.useState(!1),[Q,Y]=ye.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=ye.useRef(null),F=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),C=ye.useRef(null),X=ye.useRef(!1),se=ye.useCallback(A=>{S(M=>{var I;return(I=M.find(z=>z.id===A.id))!=null&&I.delete||as.dismiss(A.id),M.filter(({id:z})=>z!==A.id)})},[]);return ye.useEffect(()=>as.subscribe(A=>{if(A.dismiss){S(M=>M.map(I=>I.id===A.id?{...I,delete:!0}:I));return}setTimeout(()=>{XT.flushSync(()=>{S(M=>{let I=M.findIndex(z=>z.id===A.id);return I!==-1?[...M.slice(0,I),{...M[I],...A},...M.slice(I+1)]:[A,...M]})})})}),[]),ye.useEffect(()=>{if(d!=="system"){Y(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;let A=window.matchMedia("(prefers-color-scheme: dark)");try{A.addEventListener("change",({matches:M})=>{Y(M?"dark":"light")})}catch{A.addListener(({matches:I})=>{try{Y(I?"dark":"light")}catch(z){console.error(z)}})}},[d]),ye.useEffect(()=>{k.length<=1&&P(!1)},[k]),ye.useEffect(()=>{let A=M=>{var I,z;s.every(J=>M[J]||M.code===J)&&(P(!0),(I=V.current)==null||I.focus()),M.code==="Escape"&&(document.activeElement===V.current||(z=V.current)!=null&&z.contains(document.activeElement))&&P(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[s]),ye.useEffect(()=>{if(V.current)return()=>{C.current&&(C.current.focus({preventScroll:!0}),C.current=null,X.current=!1)}},[V.current]),ye.createElement("section",{ref:t,"aria-label":`${_} ${F}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((A,M)=>{var I;let[z,J]=A.split("-");return k.length?ye.createElement("ol",{key:A,dir:x==="auto"?gS():x,tabIndex:-1,ref:V,className:l,"data-sonner-toaster":!0,"data-theme":Q,"data-y-position":z,"data-lifted":R&&k.length>1&&!a,"data-x-position":J,style:{"--front-toast-height":`${((I=j[0])==null?void 0:I.height)||0}px`,"--width":`${D9}px`,"--gap":`${b}px`,...m,...$9(c,u)},onBlur:Z=>{X.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(X.current=!1,C.current&&(C.current.focus({preventScroll:!0}
vendor: 4,940 bytes, line 456
456),C.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||X.current||(X.current=!0,C.current=Z.relatedTarget)},onMouseEnter:()=>P(!0),onMouseMove:()=>P(!0),onMouseLeave:()=>{D||P(!1)},onDragEnd:()=>P(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||U(!0)},onPointerUp:()=>U(!1)},k.filter(Z=>!Z.position&&M===0||Z.position===A).map((Z,re)=>{var ae,ne;return ye.createElement(B9,{key:Z.id,icons:y,index:re,toast:Z,defaultRichColors:f,duration:(ae=p==null?void 0:p.duration)!=null?ae:h,className:p==null?void 0:p.className,descriptionClassName:p==null?void 0:p.descriptionClassName,invert:r,visibleToasts:g,closeButton:(ne=p==null?void 0:p.closeButton)!=null?ne:o,interacting:D,position:A,style:p==null?void 0:p.style,unstyled:p==null?void 0:p.unstyled,classNames:p==null?void 0:p.classNames,cancelButtonStyle:p==null?void 0:p.cancelButtonStyle,actionButtonStyle:p==null?void 0:p.actionButtonStyle,removeToast:se,toasts:k.filter(Se=>Se.position==Z.position),heights:j.filter(Se=>Se.position==Z.position),setHeights:T,expandByDefault:a,gap:b,loadingIcon:w,expanded:R,pauseWhenPageIsHidden:N,swipeDirections:e.swipeDirections})})):null}))});const W9=({...e})=>{const{theme:t="system"}=m9();return i.jsx(U9,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var z9=Sw[" useId ".trim().toString()]||(()=>{}),H9=0;function Us(e){const[t,r]=v.useState(z9());return un(()=>{r(n=>n??String(H9++))},[e]),t?`radix-${t}`:""}const V9=["top","right","bottom","left"],rl=Math.min,Ps=Math.max,pp=Math.round,Y0=Math.floor,gi=e=>({x:e,y:e}),G9={left:"right",right:"left",bottom:"top",top:"bottom"},q9={start:"end",end:"start"};function gy(e,t,r){return Ps(e,rl(t,r))}function Qi(e,t){return typeof e=="function"?e(t):e}function Ji(e){return e.split("-")[0]}function _d(e){return e.split("-")[1]}function kb(e){return e==="x"?"y":"x"}function jb(e){return e==="y"?"height":"width"}const K9=new Set(["top","bottom"]);function fi(e){return K9.has(Ji(e))?"y":"x"}function Eb(e){return kb(fi(e))}function Y9(e,t,r){r===void 0&&(r=!1);const n=_d(e),s=Eb(e),a=jb(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=xp(o)),[o,xp(o)]}function X9(e){const t=xp(e);return[vy(e),t,vy(t)]}function vy(e){return e.replace(/start|end/g,t=>q9[t])}const vS=["left","right"],yS=["right","left"],Q9=["top","bottom"],J9=["bottom","top"];function Z9(e,t,r){switch(e){case"top":case"bottom":return r?t?yS:vS:t?vS:yS;case"left":case"right":return t?Q9:J9;default:return[]}}function e7(e,t,r,n){const s=_d(e);let a=Z9(Ji(e),r==="start",n);return s&&(a=a.map(o=>o+"-"+s),t&&(a=a.concat(a.map(vy)))),a}function xp(e){return e.replace(/left|right|bottom|top/g,t=>G9[t])}function t7(e){return{top:0,right:0,bottom:0,left:0,...e}}function Q4(e){return typeof e!="number"?t7(e):{top:e,right:e,bottom:e,left:e}}function gp(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function wS(e,t,r){let{reference:n,floating:s}=e;const a=fi(t),o=Eb(t),l=jb(o),c=Ji(t),u=a==="y",d=n.x+n.width/2-s.width/2,f=n.y+n.height/2-s.height/2,h=n[l]/2-s[l]/2;let m;switch(c){case"top":m={x:d,y:n.y-s.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:f};break;case"left":m={x:n.x-s.width,y:f};break;default:m={x:n.x,y:n.y}}switch(_d(t)){case"start":m[o]-=h*(r&&u?-1:1);break;case"end":m[o]+=h*(r&&u?-1:1);break}return m}const r7=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:a=[],platform:o}=r,l=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=wS(u,n,c),h=n,m={},g=0;for(let p=0;p<l.length;p++){const{name:x,fn:b}=l[p],{x:w,y,data:_,reset:N}=await b({x:d,y:f,initialPlacement:n,placement:h,strategy:s,middlewareData:m,rects:u,platform:o,elements:{reference:e,floating:t}});d=w??d,f=y??f,m={...m,[x]:{...m[x],..._}},N&&g<=50&&(g++,typeof N=="object"&&(N.placement&&(h=N.placement),N.rects&&(u=N.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):N.rects),{x:d,y:f}=wS(u,h,c)),p=-1)}return{x:d,y:f,placement:h,strategy:s,middlewareData:m}};async function rh(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:a,rects:o,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=Qi(t,e),g=Q4(m),x=l[h?f==="floating"?"reference":"floating":f],b=gp(await a.getClippingRect
vendor: 6,647 bytes, line 456
456({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),w=f==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),_=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},N=gp(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:y,strategy:c}):w);return{top:(b.top-N.top+g.top)/_.y,bottom:(N.bottom-b.bottom+g.bottom)/_.y,left:(b.left-N.left+g.left)/_.x,right:(N.right-b.right+g.right)/_.x}}const n7=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:a,platform:o,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Qi(e,t)||{};if(u==null)return{};const f=Q4(d),h={x:r,y:n},m=Eb(s),g=jb(m),p=await o.getDimensions(u),x=m==="y",b=x?"top":"left",w=x?"bottom":"right",y=x?"clientHeight":"clientWidth",_=a.reference[g]+a.reference[m]-h[m]-a.floating[g],N=h[m]-a.reference[m],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let S=k?k[y]:0;(!S||!await(o.isElement==null?void 0:o.isElement(k)))&&(S=l.floating[y]||a.floating[g]);const E=_/2-N/2,j=S/2-p[g]/2-1,T=rl(f[b],j),R=rl(f[w],j),P=T,D=S-p[g]-R,U=S/2-p[g]/2+E,Q=gy(P,U,D),Y=!c.arrow&&_d(s)!=null&&U!==Q&&a.reference[g]/2-(U<P?T:R)-p[g]/2<0,V=Y?U<P?U-P:U-D:0;return{[m]:h[m]+V,data:{[m]:Q,centerOffset:U-Q-V,...Y&&{alignmentOffset:V}},reset:Y}}}),s7=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:a,rects:o,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...x}=Qi(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const b=Ji(s),w=fi(l),y=Ji(l)===l,_=await(c.isRTL==null?void 0:c.isRTL(u.floating)),N=h||(y||!p?[xp(l)]:X9(l)),k=g!=="none";!h&&k&&N.push(...e7(l,p,g,_));const S=[l,...N],E=await rh(t,x),j=[];let T=((n=a.flip)==null?void 0:n.overflows)||[];if(d&&j.push(E[b]),f){const U=Y9(s,o,_);j.push(E[U[0]],E[U[1]])}if(T=[...T,{placement:s,overflows:j}],!j.every(U=>U<=0)){var R,P;const U=(((R=a.flip)==null?void 0:R.index)||0)+1,Q=S[U];if(Q&&(!(f==="alignment"?w!==fi(Q):!1)||T.every(F=>F.overflows[0]>0&&fi(F.placement)===w)))return{data:{index:U,overflows:T},reset:{placement:Q}};let Y=(P=T.filter(V=>V.overflows[0]<=0).sort((V,F)=>V.overflows[1]-F.overflows[1])[0])==null?void 0:P.placement;if(!Y)switch(m){case"bestFit":{var D;const V=(D=T.filter(F=>{if(k){const C=fi(F.placement);return C===w||C==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(C=>C>0).reduce((C,X)=>C+X,0)]).sort((F,C)=>F[1]-C[1])[0])==null?void 0:D[0];V&&(Y=V);break}case"initialPlacement":Y=l;break}if(s!==Y)return{reset:{placement:Y}}}return{}}}};function bS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _S(e){return V9.some(t=>e[t]>=0)}const a7=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Qi(e,t);switch(n){case"referenceHidden":{const a=await rh(t,{...s,elementContext:"reference"}),o=bS(a,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:_S(o)}}}case"escaped":{const a=await rh(t,{...s,altBoundary:!0}),o=bS(a,r.floating);return{data:{escapedOffsets:o,escaped:_S(o)}}}default:return{}}}}},J4=new Set(["left","top"]);async function i7(e,t){const{placement:r,platform:n,elements:s}=e,a=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Ji(r),l=_d(r),c=fi(r)==="y",u=J4.has(o)?-1:1,d=a&&c?-1:1,f=Qi(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(m=l==="end"?g*-1:g),c?{x:m*d,y:h*u}:{x:h*u,y:m*d}}const o7=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:a,placement:o,middlewareData:l}=t,c=await i7(t,e);return o===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:a+c.y,data:{...c,placement:o}}}}},l7=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:x=>{let{x:b,y:w}=x;return{x:b,y:w}}},...c}=Qi(e,t),u={x:r,y:n},d=await rh(t,c),f=fi(Ji(s)),h=kb(f);let m=u[h],g=u[f];if(a){const x=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=m+d[x],y=m-d[b];m=gy(w,m,y)}if(o){const x=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=g+d[x],y=g-d[b];g=gy(w,g,y)}const p=l.fn({...t,[h]:m,[f]:g});return{...p,data:{x:p.x-r,y:p.y-n,enabled:{[h]:a,[f]:o}}}}}},c7=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:a,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Qi(e,t),d={x:r,y:n},f=fi(s),h=kb(f);let m=d[h],g=d[f];const p=Qi(l,t),x=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const y=h==="y"?"height":"width",_=a.reference[h]-a.floating[y]+x.mainAxis,N=a.reference[h]+a.reference[y]-x.mainAxis;m<_?m=_:m>N&&(m=N)}if(u){var b,w;const y=h==="y"?"width":"height",_=J4.has(Ji(s)),N=a.reference[f]-a.floating[y]+(_&&((b=o.offset)==null?void 0:b[f])||0)+(_?0:x.crossAxis),k=a.reference[f]+a.reference[y]+(_?0:((w=o.offset)==null?void 0:w[f])||0)-(_?x.crossAxis:0);g<N?g=N:g>k&&(g=k)}return{[h]:m,[f]:g}}}},u7=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:a,platform:o,elements:l}=t,{apply:c=()=>{},...u}=Qi(e,t),d=await rh(t,u),f=Ji(s),h=_d(s),m=fi(s)==="y",{width:g,height:p}=a.floating;let x,b;f==="top"||f==="bottom"?(x=f,b=h===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(b=f,x=h==="end"?"top":"bottom");const w=p-d.top-d.bottom,y=g-d.left-d.right,_=rl(p-d[x],w),N=rl(g-d[b],y),k=!t.middlewareData.shift;let S=_,E=N;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(E=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(S=w),k&&!h){const T=Ps(d.left,0),R=Ps(d.right,0),P=Ps(d.top,0),D=Ps(d.bottom,0);m?E=g-2*(T!==0||R!==0?T+R:Ps(d.left,d.right)):S=p-2*(P!==0||D!==0?P+D:Ps(d.top,d.bottom))}await c({...t,availableWidth:E,availableHeight:S});const j=await o.getDimensions(l.floating);return g!==j.width||p!==j.height?{reset:{rects:!0}}:{}}}};function Tx(){return typeof window<"u"}
vendor: 4,200 bytes, line 456
456function Nd(e){return Z4(e)?(e.nodeName||"").toLowerCase():"#document"}function Ws(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ni(e){var t;return(t=(Z4(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Z4(e){return Tx()?e instanceof Node||e instanceof Ws(e).Node:!1}function Va(e){return Tx()?e instanceof Element||e instanceof Ws(e).Element:!1}function bi(e){return Tx()?e instanceof HTMLElement||e instanceof Ws(e).HTMLElement:!1}function NS(e){return!Tx()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ws(e).ShadowRoot}const d7=new Set(["inline","contents"]);function Zh(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Ga(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!d7.has(s)}const f7=new Set(["table","td","th"]);function h7(e){return f7.has(Nd(e))}const m7=[":popover-open",":modal"];function Ax(e){return m7.some(t=>{try{return e.matches(t)}catch{return!1}})}const p7=["transform","translate","scale","rotate","perspective"],x7=["transform","translate","scale","rotate","perspective","filter"],g7=["paint","layout","strict","content"];function Cb(e){const t=Tb(),r=Va(e)?Ga(e):e;return p7.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)||x7.some(n=>(r.willChange||"").includes(n))||g7.some(n=>(r.contain||"").includes(n))}function v7(e){let t=nl(e);for(;bi(t)&&!td(t);){if(Cb(t))return t;if(Ax(t))return null;t=nl(t)}return null}function Tb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const y7=new Set(["html","body","#document"]);function td(e){return y7.has(Nd(e))}function Ga(e){return Ws(e).getComputedStyle(e)}function Px(e){return Va(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nl(e){if(Nd(e)==="html")return e;const t=e.assignedSlot||e.parentNode||NS(e)&&e.host||Ni(e);return NS(t)?t.host:t}function eA(e){const t=nl(e);return td(t)?e.ownerDocument?e.ownerDocument.body:e.body:bi(t)&&Zh(t)?t:eA(t)}function nh(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=eA(e),a=s===((n=e.ownerDocument)==null?void 0:n.body),o=Ws(s);if(a){const l=yy(o);return t.concat(o,o.visualViewport||[],Zh(s)?s:[],l&&r?nh(l):[])}return t.concat(s,nh(s,[],r))}function yy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tA(e){const t=Ga(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=bi(e),a=s?e.offsetWidth:r,o=s?e.offsetHeight:n,l=pp(r)!==a||pp(n)!==o;return l&&(r=a,n=o),{width:r,height:n,$:l}}function Ab(e){return Va(e)?e:e.contextElement}function Cu(e){const t=Ab(e);if(!bi(t))return gi(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:a}=tA(t);let o=(a?pp(r.width):r.width)/n,l=(a?pp(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const w7=gi(0);function rA(e){const t=Ws(e);return!Tb()||!t.visualViewport?w7:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function b7(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ws(e)?!1:t}function dc(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),a=Ab(e);let o=gi(1);t&&(n?Va(n)&&(o=Cu(n)):o=Cu(e));const l=b7(a,r,n)?rA(a):gi(0);let c=(s.left+l.x)/o.x,u=(s.top+l.y)/o.y,d=s.width/o.x,f=s.height/o.y;if(a){const h=Ws(a),m=n&&Va(n)?Ws(n):n;let g=h,p=yy(g);for(;p&&n&&m!==g;){const x=Cu(p),b=p.getBoundingClientRect(),w=Ga(p),y=b.left+(p.clientLeft+parseFloat(w.paddingLeft))*x.x,_=b.top+(p.clientTop+parseFloat(w.paddingTop))*x.y;c*=x.x,u*=x.y,d*=x.x,f*=x.y,c+=y,u+=_,g=Ws(p),p=yy(g)}}return gp({width:d,height:f,x:c,y:u})}function Pb(e,t){const r=Px(e).scrollLeft;return t?t.left+r:dc(Ni(e)).left+r}function nA(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:Pb(e,n)),a=n.top+t.scrollTop;return{x:s,y:a}}function _7(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const a=s==="fixed",o=Ni(n),l=t?Ax(t.floating):!1;if(n===o||l&&a)return r;let c={scrollLeft:0,scrollTop:0},u=gi(1);const d=gi(0),f=bi(n);
vendor: 5,509 bytes, line 456
456if((f||!f&&!a)&&((Nd(n)!=="body"||Zh(o))&&(c=Px(n)),bi(n))){const m=dc(n);u=Cu(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}const h=o&&!f&&!a?nA(o,c,!0):gi(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:r.y*u.y-c.scrollTop*u.y+d.y+h.y}}function N7(e){return Array.from(e.getClientRects())}function S7(e){const t=Ni(e),r=Px(e),n=e.ownerDocument.body,s=Ps(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=Ps(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Pb(e);const l=-r.scrollTop;return Ga(n).direction==="rtl"&&(o+=Ps(t.clientWidth,n.clientWidth)-s),{width:s,height:a,x:o,y:l}}function k7(e,t){const r=Ws(e),n=Ni(e),s=r.visualViewport;let a=n.clientWidth,o=n.clientHeight,l=0,c=0;if(s){a=s.width,o=s.height;const u=Tb();(!u||u&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:a,height:o,x:l,y:c}}const j7=new Set(["absolute","fixed"]);function E7(e,t){const r=dc(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,a=bi(e)?Cu(e):gi(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,c=s*a.x,u=n*a.y;return{width:o,height:l,x:c,y:u}}function SS(e,t,r){let n;if(t==="viewport")n=k7(e,r);else if(t==="document")n=S7(Ni(e));else if(Va(t))n=E7(t,r);else{const s=rA(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return gp(n)}function sA(e,t){const r=nl(e);return r===t||!Va(r)||td(r)?!1:Ga(r).position==="fixed"||sA(r,t)}function C7(e,t){const r=t.get(e);if(r)return r;let n=nh(e,[],!1).filter(l=>Va(l)&&Nd(l)!=="body"),s=null;const a=Ga(e).position==="fixed";let o=a?nl(e):e;for(;Va(o)&&!td(o);){const l=Ga(o),c=Cb(o);!c&&l.position==="fixed"&&(s=null),(a?!c&&!s:!c&&l.position==="static"&&!!s&&j7.has(s.position)||Zh(o)&&!c&&sA(e,o))?n=n.filter(d=>d!==o):s=l,o=nl(o)}return t.set(e,n),n}function T7(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?Ax(t)?[]:C7(t,this._c):[].concat(r),n],l=o[0],c=o.reduce((u,d)=>{const f=SS(t,d,s);return u.top=Ps(f.top,u.top),u.right=rl(f.right,u.right),u.bottom=rl(f.bottom,u.bottom),u.left=Ps(f.left,u.left),u},SS(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function A7(e){const{width:t,height:r}=tA(e);return{width:t,height:r}}function P7(e,t,r){const n=bi(t),s=Ni(t),a=r==="fixed",o=dc(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=gi(0);function u(){c.x=Pb(s)}if(n||!n&&!a)if((Nd(t)!=="body"||Zh(s))&&(l=Px(t)),n){const m=dc(t,!0,a,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else s&&u();a&&!n&&s&&u();const d=s&&!n&&!a?nA(s,l):gi(0),f=o.left+l.scrollLeft-c.x-d.x,h=o.top+l.scrollTop-c.y-d.y;return{x:f,y:h,width:o.width,height:o.height}}function hv(e){return Ga(e).position==="static"}function kS(e,t){if(!bi(e)||Ga(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ni(e)===r&&(r=r.ownerDocument.body),r}function aA(e,t){const r=Ws(e);if(Ax(e))return r;if(!bi(e)){let s=nl(e);for(;s&&!td(s);){if(Va(s)&&!hv(s))return s;s=nl(s)}return r}let n=kS(e,t);for(;n&&h7(n)&&hv(n);)n=kS(n,t);return n&&td(n)&&hv(n)&&!Cb(n)?r:n||v7(e)||r}const R7=async function(e){const t=this.getOffsetParent||aA,r=this.getDimensions,n=await r(e.floating);return{reference:P7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function O7(e){return Ga(e).direction==="rtl"}const D7={convertOffsetParentRelativeRectToViewportRelativeRect:_7,getDocumentElement:Ni,getClippingRect:T7,getOffsetParent:aA,getElementRects:R7,getClientRects:N7,getDimensions:A7,getScale:Cu,isElement:Va,isRTL:O7};function iA(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function I7(e,t){let r=null,n;const s=Ni(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:d,top:f,width:h,height:m}=u;if(l||t(),!h||!m)return;const g=Y0(f),p=Y0(s.clientWidth-(d+h)),x=Y0(s.clientHeight-(f+m)),b=Y0(d),y={rootMargin:-g+"px "+-p+"px "+-x+"px "+-b+"px",threshold:Ps(0,rl(1,c))||1};let _=!0;function N(k){const S=k[0].intersectionRatio;if(S!==c){if(!_)return o();S?o(!1,S):n=setTimeout(()=>{o(!1,1e-7)},1e3)}S===1&&!iA(u,e.getBoundingClientRect())&&o(),_=!1}try{r=new IntersectionObserver(N,{...y,root:s.ownerDocument})}catch{r=new IntersectionObserver(N,y)}r.observe(e)}return o(!0),a}function F7(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=Ab(e),d=s||a?[...u?nh(u):[],...nh(t)]:[];d.forEach(b=>{s&&b.addEventListener("scroll",r,{passive:!0}),a&&b.addEventListener("resize",r)});const f=u&&l?I7(u,r):null;let h=-1,m=null;o&&(m=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=m)==null||y.observe(t)})),r()}),u&&!c&&m.observe(u),m.observe(t));let g,p=c?dc(e):null;c&&x();function x(){const b=dc(e);p&&!iA(p,b)&&r(),p=b,g=requestAnimationFrame(x)}return r(),()=>{var b;d.forEach(w=>{s&&w.removeEventListener("scroll",r),a&&w.removeEventListener("resize",r)}),f==null||f(),(b=m)==null||b.disconnect(),m=null,c&&cancelAnimationFrame(g)}}const M7=o7,L7=l7,B7=s7,$7=u7,U7=a7,jS=n7,W7=c7,z7=(e,t,r)=>{const n=new Map,s={platform:D7,...r},a={...s.platform,_c:n};return r7(e,t,{...s,platform:a})};var H7=typeof document<"u",V7=function(){},Fm=H7?v.useLayoutEffect:V7;function vp(e,t){if(e===t)return!0;
vendor: 4,143 bytes, line 456
456if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;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(!vp(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const a=s[n];if(!(a==="_owner"&&e.$$typeof)&&!vp(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function oA(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ES(e,t){const r=oA(e);return Math.round(t*r)/r}function mv(e){const t=v.useRef(e);return Fm(()=>{t.current=e}),t}function G7(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=v.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=v.useState(n);vp(h,n)||m(n);const[g,p]=v.useState(null),[x,b]=v.useState(null),w=v.useCallback(F=>{F!==k.current&&(k.current=F,p(F))},[]),y=v.useCallback(F=>{F!==S.current&&(S.current=F,b(F))},[]),_=a||g,N=o||x,k=v.useRef(null),S=v.useRef(null),E=v.useRef(d),j=c!=null,T=mv(c),R=mv(s),P=mv(u),D=v.useCallback(()=>{if(!k.current||!S.current)return;const F={placement:t,strategy:r,middleware:h};R.current&&(F.platform=R.current),z7(k.current,S.current,F).then(C=>{const X={...C,isPositioned:P.current!==!1};U.current&&!vp(E.current,X)&&(E.current=X,ca.flushSync(()=>{f(X)}))})},[h,t,r,R,P]);Fm(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[u]);const U=v.useRef(!1);Fm(()=>(U.current=!0,()=>{U.current=!1}),[]),Fm(()=>{if(_&&(k.current=_),N&&(S.current=N),_&&N){if(T.current)return T.current(_,N,D);D()}},[_,N,D,T,j]);const Q=v.useMemo(()=>({reference:k,floating:S,setReference:w,setFloating:y}),[w,y]),Y=v.useMemo(()=>({reference:_,floating:N}),[_,N]),V=v.useMemo(()=>{const F={position:r,left:0,top:0};if(!Y.floating)return F;const C=ES(Y.floating,d.x),X=ES(Y.floating,d.y);return l?{...F,transform:"translate("+C+"px, "+X+"px)",...oA(Y.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:C,top:X}},[r,l,Y.floating,d.x,d.y]);return v.useMemo(()=>({...d,update:D,refs:Q,elements:Y,floatingStyles:V}),[d,D,Q,Y,V])}const q7=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?jS({element:n.current,padding:s}).fn(r):{}:n?jS({element:n,padding:s}).fn(r):{}}}},K7=(e,t)=>({...M7(e),options:[e,t]}),Y7=(e,t)=>({...L7(e),options:[e,t]}),X7=(e,t)=>({...W7(e),options:[e,t]}),Q7=(e,t)=>({...B7(e),options:[e,t]}),J7=(e,t)=>({...$7(e),options:[e,t]}),Z7=(e,t)=>({...U7(e),options:[e,t]}),eB=(e,t)=>({...q7(e),options:[e,t]});var tB="Arrow",lA=v.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...a}=e;return i.jsx(He.svg,{...a,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});lA.displayName=tB;var rB=lA;function Rx(e){const[t,r]=v.useState(void 0);return un(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let o,l;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,l=u.blockSize}else o=e.offsetWidth,l=e.offsetHeight;r({width:o,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Rb="Popper",[cA,ml]=tn(Rb),[nB,uA]=cA(Rb),dA=e=>{const{__scopePopper:t,children:r}=e,[n,s]=v.useState(null);return i.jsx(nB,{scope:t,anchor:n,onAnchorChange:s,children:r})};dA.displayName=Rb;var fA="PopperAnchor",hA=v.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,a=uA(fA,r),o=v.useRef(null),l=ot(t,o);return v.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:i.jsx(He.div,{...s,ref:l})});hA.displayName=fA;var Ob="PopperContent",[sB,aB]=cA(Ob),mA=v.forwardRef((e,t)=>
vendor: 4,209 bytes, line 456
456{var Z,re,ae,ne,Se,B;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:a="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:g,...p}=e,x=uA(Ob,r),[b,w]=v.useState(null),y=ot(t,qe=>w(qe)),[_,N]=v.useState(null),k=Rx(_),S=(k==null?void 0:k.width)??0,E=(k==null?void 0:k.height)??0,j=n+(a!=="center"?"-"+a:""),T=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},R=Array.isArray(u)?u:[u],P=R.length>0,D={padding:T,boundary:R.filter(oB),altBoundary:P},{refs:U,floatingStyles:Q,placement:Y,isPositioned:V,middlewareData:F}=G7({strategy:"fixed",placement:j,whileElementsMounted:(...qe)=>F7(...qe,{animationFrame:m==="always"}),elements:{reference:x.anchor},middleware:[K7({mainAxis:s+E,alignmentAxis:o}),c&&Y7({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?X7():void 0,...D}),c&&Q7({...D}),J7({...D,apply:({elements:qe,rects:ue,availableWidth:Re,availableHeight:Ce})=>{const{width:pe,height:fe}=ue.reference,te=qe.floating.style;te.setProperty("--radix-popper-available-width",`${Re}px`),te.setProperty("--radix-popper-available-height",`${Ce}px`),te.setProperty("--radix-popper-anchor-width",`${pe}px`),te.setProperty("--radix-popper-anchor-height",`${fe}px`)}}),_&&eB({element:_,padding:l}),lB({arrowWidth:S,arrowHeight:E}),h&&Z7({strategy:"referenceHidden",...D})]}),[C,X]=gA(Y),se=Ur(g);un(()=>{V&&(se==null||se())},[V,se]);const A=(Z=F.arrow)==null?void 0:Z.x,M=(re=F.arrow)==null?void 0:re.y,I=((ae=F.arrow)==null?void 0:ae.centerOffset)!==0,[z,J]=v.useState();return un(()=>{b&&J(window.getComputedStyle(b).zIndex)},[b]),i.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:V?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[(ne=F.transformOrigin)==null?void 0:ne.x,(Se=F.transformOrigin)==null?void 0:Se.y].join(" "),...((B=F.hide)==null?void 0:B.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(sB,{scope:r,placedSide:C,onArrowChange:N,arrowX:A,arrowY:M,shouldHideArrow:I,children:i.jsx(He.div,{"data-side":C,"data-align":X,...p,ref:y,style:{...p.style,animation:V?void 0:"none"}})})})});mA.displayName=Ob;var pA="PopperArrow",iB={top:"bottom",right:"left",bottom:"top",left:"right"},xA=v.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,a=aB(pA,n),o=iB[a.placedSide];return i.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]: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:i.jsx(rB,{...s,ref:r,style:{...s.style,display:"block"}})})});xA.displayName=pA;function oB(e){return e!==null}var lB=e=>({name:"transformOrigin",options:e,fn(t){var x,b,w;const{placement:r,rects:n,middlewareData:s}=t,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,d]=gA(r),f={start:"0%",center:"50%",end:"100%"}[d],h=(((b=s.arrow)==null?void 0:b.x)??0)+l/2,m=(((w=s.arrow)==null?void 0:w.y)??0)+c/2;let g="",p="";return u==="bottom"?(g=o?f:`${h}px`,p=`${-c}px`):u==="top"?(g=o?f:`${h}px`,p=`${n.floating.height+c}px`):u==="right"?(g=`${-c}px`,p=o?f:`${m}px`):u==="left"&&(g=`${n.floating.width+c}px`,p=o?f:`${m}px`),{data:{x:g,y:p}}}});function gA(e){const[t,r="center"]=e.split("-");return[t,r]}var Db=dA,e0=hA,Ox=mA,Dx=xA,[Ix,H0e]=tn("Tooltip",[ml]),Ib=ml(),vA="TooltipProvider",cB=700,CS="tooltip.open",[uB,yA]=Ix(vA),wA=e=>{const{__scopeTooltip:t,delayDuration:r=cB,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:a}=e,o=v.useRef(!0),l=v.useRef(!1),c=v.useRef(0);return v.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),i.jsx(uB,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:v.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>
vendor: 4,221 bytes, line 456
456o.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:v.useCallback(u=>{l.current=u},[]),disableHoverableContent:s,children:a})};wA.displayName=vA;var bA="Tooltip",[V0e,Fx]=Ix(bA),wy="TooltipTrigger",dB=v.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Fx(wy,r),a=yA(wy,r),o=Ib(r),l=v.useRef(null),c=ot(t,l,s.onTriggerChange),u=v.useRef(!1),d=v.useRef(!1),f=v.useCallback(()=>u.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),i.jsx(e0,{asChild:!0,...o,children:i.jsx(He.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:c,onPointerMove:ke(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ke(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ke(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ke(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ke(e.onBlur,s.onClose),onClick:ke(e.onClick,s.onClose)})})});dB.displayName=wy;var fB="TooltipPortal",[G0e,hB]=Ix(fB,{forceMount:void 0}),rd="TooltipContent",_A=v.forwardRef((e,t)=>{const r=hB(rd,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...a}=e,o=Fx(rd,e.__scopeTooltip);return i.jsx(rn,{present:n||o.open,children:o.disableHoverableContent?i.jsx(NA,{side:s,...a,ref:t}):i.jsx(mB,{side:s,...a,ref:t})})}),mB=v.forwardRef((e,t)=>{const r=Fx(rd,e.__scopeTooltip),n=yA(rd,e.__scopeTooltip),s=v.useRef(null),a=ot(t,s),[o,l]=v.useState(null),{trigger:c,onClose:u}=r,d=s.current,{onPointerInTransitChange:f}=n,h=v.useCallback(()=>{l(null),f(!1)},[f]),m=v.useCallback((g,p)=>{const x=g.currentTarget,b={x:g.clientX,y:g.clientY},w=yB(b,x.getBoundingClientRect()),y=wB(b,w),_=bB(p.getBoundingClientRect()),N=NB([...y,..._]);l(N),f(!0)},[f]);return v.useEffect(()=>()=>h(),[h]),v.useEffect(()=>{if(c&&d){const g=x=>m(x,d),p=x=>m(x,c);return c.addEventListener("pointerleave",g),d.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",p)}}},[c,d,m,h]),v.useEffect(()=>{if(o){const g=p=>{const x=p.target,b={x:p.clientX,y:p.clientY},w=(c==null?void 0:c.contains(x))||(d==null?void 0:d.contains(x)),y=!_B(b,o);w?h():y&&(h(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,d,o,u,h]),i.jsx(NA,{...e,ref:a})}),[pB,xB]=Ix(bA,{isInside:!1}),gB=ZT("TooltipContent"),NA=v.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:a,onPointerDownOutside:o,...l}=e,c=Fx(rd,r),u=Ib(r),{onClose:d}=c;return v.useEffect(()=>(document.addEventListener(CS,d),()=>document.removeEventListener(CS,d)),[d]),v.useEffect(()=>{if(c.trigger){const f=h=>{const m=h.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),i.jsx(Sc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:i.jsxs(Ox,{"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:[i.jsx(gB,{children:n}),i.jsx(pB,{scope:r,isInside:!0,children:i.jsx(H8,{id:c.contentId,role:"tooltip",children:s||n})})]})})});_A.displayName=rd;var SA="TooltipArrow",vB=v.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Ib(r);return xB(SA,r).isInside?null:i.jsx(Dx,{...s,...n,ref:t})});vB.displayName=SA;function yB(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,s,a)){case a:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function wB(e,t,r=5){const n=[];
456switch(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 bB(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function _B(e,t){const{x:r,y:n}=e;let s=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const l=t[a],c=t[o],u=l.x,d=l.y,f=c.x,h=c.y;d>n!=h>n&&r<(f-u)*(n-d)/(h-d)+u&&(s=!s)}return s}function NB(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),SB(t)}function SB(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(s.y-o.y)>=(a.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const a=r[r.length-1],o=r[r.length-2];if((a.x-o.x)*(s.y-o.y)>=(a.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}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 kB=wA,kA=_A;const jB=kB,EB=v.forwardRef(({className:e,sideOffset:t=4,...r},n)=>i.jsx(kA,{ref:n,sideOffset:t,className:xe("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",e),...r}));EB.displayName=kA.displayName;var Mx=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(){}},Lx=typeof window>"u"||"Deno"in globalThis;function Ca(){}function CB(e,t){return typeof e=="function"?e(t):e}function TB(e){return typeof e=="number"&&e>=0&&e!==1/0}function AB(e,t){return Math.max(e+(t||0)-Date.now(),0)}function by(e,t){return typeof e=="function"?e(t):e}function PB(e,t){return typeof e=="function"?e(t):e}function TS(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:a,queryKey:o,stale:l}=e;if(o){if(n){if(t.queryHash!==Fb(o,t.options))return!1}else if(!ah(t.queryKey,o))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||s&&s!==t.state.fetchStatus||a&&!a(t))}function AS(e,t){const{exact:r,status:n,predicate:s,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(sh(t.options.mutationKey)!==sh(a))return!1}else if(!ah(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function Fb(e,t){return((t==null?void 0:t.queryKeyHashFn)||sh)(e)}function sh(e){return JSON.stringify(e,(t,r)=>_y(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function ah(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>ah(e[r],t[r])):!1}function jA(e,t){if(e===t)return e;const r=PS(e)&&PS(t);if(r||_y(e)&&_y(t)){const n=r?e:Object.keys(e),s=n.length,a=r?t:Object.keys(t),o=a.length,l=r?[]:{},c=new Set(n);let u=0;for(let d=0;d<o;d++){const f=r?d:a[d];(!r&&c.has(f)||r)&&e[f]===void 0&&t[f]===void 0?(l[f]=void 0,u++):(l[f]=jA(e[f],t[f]),l[f]===e[f]&&e[f]!==void 0&&u++)}return s===o&&u===s?e:l}return t}function PS(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function _y(e){if(!RS(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!RS(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function RS(e){return Object.prototype.toString.call(e)==="[object Object]"}function RB(e){return new Promise(t=>{setTimeout(t,e)})}function OB(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?jA(e,t):t}function DB(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function IB(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Mb=Symbol();function EA(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Mb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ql,To,Lu,TE,FB=(TE=class extends Mx{constructor(){super();Mt(this,ql);Mt(this,To);Mt(this,Lu);vt(this,Lu,t=>{if(!Lx&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){ge(this,To)||this.setEventListener(ge(this,Lu))}onUnsubscribe(){var t;this.hasListeners()||((t=ge(this,To))==null||t.call(this),vt(this,To,void 0))}setEventListener(t){var r;vt(this,Lu,t),(r=ge(this,To))==null||r.call(this),vt(this,To,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){ge(this,ql)!==t&&(vt(this,ql,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 4,942 bytes, line 456
456this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof ge(this,ql)=="boolean"?ge(this,ql):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ql=new WeakMap,To=new WeakMap,Lu=new WeakMap,TE),CA=new FB,Bu,Ao,$u,AE,MB=(AE=class extends Mx{constructor(){super();Mt(this,Bu,!0);Mt(this,Ao);Mt(this,$u);vt(this,$u,t=>{if(!Lx&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){ge(this,Ao)||this.setEventListener(ge(this,$u))}onUnsubscribe(){var t;this.hasListeners()||((t=ge(this,Ao))==null||t.call(this),vt(this,Ao,void 0))}setEventListener(t){var r;vt(this,$u,t),(r=ge(this,Ao))==null||r.call(this),vt(this,Ao,t(this.setOnline.bind(this)))}setOnline(t){ge(this,Bu)!==t&&(vt(this,Bu,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return ge(this,Bu)}},Bu=new WeakMap,Ao=new WeakMap,$u=new WeakMap,AE),yp=new MB;function LB(){let e,t;const r=new Promise((s,a)=>{e=s,t=a});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function BB(e){return Math.min(1e3*2**e,3e4)}function TA(e){return(e??"online")==="online"?yp.isOnline():!0}var AA=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function pv(e){return e instanceof AA}function PA(e){let t=!1,r=0,n=!1,s;const a=LB(),o=p=>{var x;n||(h(new AA(p)),(x=e.abort)==null||x.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>CA.isFocused()&&(e.networkMode==="always"||yp.isOnline())&&e.canRun(),d=()=>TA(e.networkMode)&&e.canRun(),f=p=>{var x;n||(n=!0,(x=e.onSuccess)==null||x.call(e,p),s==null||s(),a.resolve(p))},h=p=>{var x;n||(n=!0,(x=e.onError)==null||x.call(e,p),s==null||s(),a.reject(p))},m=()=>new Promise(p=>{var x;s=b=>{(n||u())&&p(b)},(x=e.onPause)==null||x.call(e)}).then(()=>{var p;s=void 0,n||(p=e.onContinue)==null||p.call(e)}),g=()=>{if(n)return;let p;const x=r===0?e.initialPromise:void 0;try{p=x??e.fn()}catch(b){p=Promise.reject(b)}Promise.resolve(p).then(f).catch(b=>{var k;if(n)return;const w=e.retry??(Lx?0:3),y=e.retryDelay??BB,_=typeof y=="function"?y(r,b):y,N=w===!0||typeof w=="number"&&r<w||typeof w=="function"&&w(r,b);if(t||!N){h(b);return}r++,(k=e.onFail)==null||k.call(e,r,b),RB(_).then(()=>u()?void 0:m()).then(()=>{t?h(b):g()})})};return{promise:a,cancel:o,continue:()=>(s==null||s(),a),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?g():m().then(g),a)}}var $B=e=>setTimeout(e,0);function UB(){let e=[],t=0,r=l=>{l()},n=l=>{l()},s=$B;const a=l=>{t?e.push(l):s(()=>{r(l)})},o=()=>{const l=e;e=[],l.length&&s(()=>{n(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{a(()=>{l(...c)})},schedule:a,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{s=l}}}var Qn=UB(),Kl,PE,RA=(PE=class{constructor(){Mt(this,Kl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),TB(this.gcTime)&&vt(this,Kl,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Lx?1/0:5*60*1e3))}clearGcTimeout(){ge(this,Kl)&&(clearTimeout(ge(this,Kl)),vt(this,Kl,void 0))}},Kl=new WeakMap,PE),Uu,Yl,na,Xl,Fn,Uh,Ql,Aa,Ai,RE,WB=(RE=class extends RA{constructor(t){super();Mt(this,Aa);Mt(this,Uu);Mt(this,Yl);Mt(this,na);Mt(this,Xl);Mt(this,Fn);Mt(this,Uh);Mt(this,Ql);vt(this,Ql,!1),vt(this,Uh,t.defaultOptions),this.setOptions(t.options),this.observers=[],vt(this,Xl,t.client),vt(this,na,ge(this,Xl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,vt(this,Uu,HB(this.options)),this.state=t.state??ge(this,Uu),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=ge(this,Fn))==null?void 0:t.promise}setOptions(t){this.options={...ge(this,Uh),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ge(this,na).remove(this)}setData(t,r){const n=OB(this.state.data,t,this.options);return Rn(this,Aa,Ai).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Rn(this,Aa,Ai).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=ge(this,Fn))==null?void 0:n.promise;return(s=ge(this,Fn))==null||s.cancel(t),r?r.then(Ca).catch(Ca):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(ge(this,Uu))}isActive(){return this.observers.some(t=>PB(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Mb||this.state.dataUpdateCount+this.state.errorUpdate
456Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>by(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!AB(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=ge(this,Fn))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=ge(this,Fn))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ge(this,na).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(ge(this,Fn)&&(ge(this,Ql)?ge(this,Fn).cancel({revert:!0}):ge(this,Fn).cancelRetry()),this.scheduleGc()),ge(this,na).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Rn(this,Aa,Ai).call(this,{type:"invalidate"})}fetch(t,r){var u,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(ge(this,Fn))return ge(this,Fn).continueRetry(),ge(this,Fn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(m=>m.options.queryFn);h&&this.setOptions(h.options)}const n=new AbortController,s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(vt(this,Ql,!0),n.signal)})},a=()=>{const h=EA(this.options,r),g=(()=>{const p={client:ge(this,Xl),queryKey:this.queryKey,meta:this.meta};return s(p),p})();return vt(this,Ql,!1),this.options.persister?this.options.persister(h,g,this):h(g)},l=(()=>{const h={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:ge(this,Xl),state:this.state,fetchFn:a};return s(h),h})();(u=this.options.behavior)==null||u.onFetch(l,this),vt(this,Yl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&Rn(this,Aa,Ai).call(this,{type:"fetch",meta:(f=l.fetchOptions)==null?void 0:f.meta});const c=h=>{var m,g,p,x;pv(h)&&h.silent||Rn(this,Aa,Ai).call(this,{type:"error",error:h}),pv(h)||((g=(m=ge(this,na).config).onError)==null||g.call(m,h,this),(x=(p=ge(this,na).config).onSettled)==null||x.call(p,this.state.data,h,this)),this.scheduleGc()};return vt(this,Fn,PA({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,abort:n.abort.bind(n),onSuccess:h=>{var m,g,p,x;if(h===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(b){c(b);return}(g=(m=ge(this,na).config).onSuccess)==null||g.call(m,h,this),(x=(p=ge(this,na).config).onSettled)==null||x.call(p,h,this.state.error,this),this.scheduleGc()},onError:c,onFail:(h,m)=>{Rn(this,Aa,Ai).call(this,{type:"failed",failureCount:h,error:m})},onPause:()=>{Rn(this,Aa,Ai).call(this,{type:"pause"})},onContinue:()=>{Rn(this,Aa,Ai).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),ge(this,Fn).start()}},Uu=new WeakMap,Yl=new WeakMap,na=new WeakMap,Xl=new WeakMap,Fn=new WeakMap,Uh=new WeakMap,Ql=new WeakMap,Aa=new WeakSet,Ai=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...zB(n.data,this.options),fetchMeta:t.meta??null};case"success":return vt(this,Yl,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return pv(s)&&s.revert&&ge(this,Yl)?{...ge(this,Yl),fetchStatus:"idle"}
vendor: 4,738 bytes, line 456
456:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Qn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),ge(this,na).notify({query:this,type:"updated",action:t})})},RE);function zB(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:TA(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function HB(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 ni,OE,VB=(OE=class extends Mx{constructor(t={}){super();Mt(this,ni);this.config=t,vt(this,ni,new Map)}build(t,r,n){const s=r.queryKey,a=r.queryHash??Fb(s,r);let o=this.get(a);return o||(o=new WB({client:t,queryKey:s,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){ge(this,ni).has(t.queryHash)||(ge(this,ni).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=ge(this,ni).get(t.queryHash);r&&(t.destroy(),r===t&&ge(this,ni).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Qn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ge(this,ni).get(t)}getAll(){return[...ge(this,ni).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>TS(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>TS(t,n)):r}notify(t){Qn.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Qn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Qn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ni=new WeakMap,OE),si,qn,Jl,ai,vo,DE,GB=(DE=class extends RA{constructor(t){super();Mt(this,ai);Mt(this,si);Mt(this,qn);Mt(this,Jl);this.mutationId=t.mutationId,vt(this,qn,t.mutationCache),vt(this,si,[]),this.state=t.state||qB(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ge(this,si).includes(t)||(ge(this,si).push(t),this.clearGcTimeout(),ge(this,qn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){vt(this,si,ge(this,si).filter(r=>r!==t)),this.scheduleGc(),ge(this,qn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ge(this,si).length||(this.state.status==="pending"?this.scheduleGc():ge(this,qn).remove(this))}continue(){var t;return((t=ge(this,Jl))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,l,c,u,d,f,h,m,g,p,x,b,w,y,_,N,k,S,E;const r=()=>{Rn(this,ai,vo).call(this,{type:"continue"})};vt(this,Jl,PA({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(j,T)=>{Rn(this,ai,vo).call(this,{type:"failed",failureCount:j,error:T})},onPause:()=>{Rn(this,ai,vo).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ge(this,qn).canRun(this)}));const n=this.state.status==="pending",s=!ge(this,Jl).canStart();try{if(n)r();else{Rn(this,ai,vo).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(a=ge(this,qn).config).onMutate)==null?void 0:o.call(a,t,this));const T=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));T!==this.state.context&&Rn(this,ai,vo).call(this,{type:"pending",context:T,variables:t,isPaused:s})}const j=await ge(this,Jl).start();return await((d=(u=ge(this,qn).config).onSuccess)==null?void 0:d.call(u,j,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,j,t,this.state.context)),await((g=(m=ge(this,qn).config).onSettled)==null?void 0:g.call(m,j,null,this.state.variables,this.state.context,this)),await((x=(p=this.options).onSettled)==null?void 0:x.call(p,j,null,t,this.state.context)),Rn(this,ai,vo).call(this,{type:"success",data:j}),j}catch(j){try{throw await((w=(b=ge(this,qn).config).onError)==null?void 0:w.call(b,j,t,this.state.context,this)),await((_=(y=this.options).onError)==null?void 0:_.call(y,j,t,this.state.context)),await((k=(N=ge(this,qn).config).onSettled)==null?void 0:k.call(N,void 0,j,this.state.variables,this.state.context,this)),await((E=(S=this.options).onSettled)==null?void 0:E.
456call(S,void 0,j,t,this.state.context)),j}finally{Rn(this,ai,vo).call(this,{type:"error",error:j})}}finally{ge(this,qn).runNext(this)}}},si=new WeakMap,qn=new WeakMap,Jl=new WeakMap,ai=new WeakSet,vo=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Qn.batch(()=>{ge(this,si).forEach(n=>{n.onMutationUpdate(t)}),ge(this,qn).notify({mutation:this,type:"updated",action:t})})},DE);function qB(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mi,Pa,Wh,IE,KB=(IE=class extends Mx{constructor(t={}){super();Mt(this,Mi);Mt(this,Pa);Mt(this,Wh);this.config=t,vt(this,Mi,new Set),vt(this,Pa,new Map),vt(this,Wh,0)}build(t,r,n){const s=new GB({mutationCache:this,mutationId:++C0(this,Wh)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){ge(this,Mi).add(t);const r=X0(t);if(typeof r=="string"){const n=ge(this,Pa).get(r);n?n.push(t):ge(this,Pa).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(ge(this,Mi).delete(t)){const r=X0(t);if(typeof r=="string"){const n=ge(this,Pa).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&ge(this,Pa).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=X0(t);if(typeof r=="string"){const n=ge(this,Pa).get(r),s=n==null?void 0:n.find(a=>a.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=X0(t);if(typeof r=="string"){const s=(n=ge(this,Pa).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Qn.batch(()=>{ge(this,Mi).forEach(t=>{this.notify({type:"removed",mutation:t})}),ge(this,Mi).clear(),ge(this,Pa).clear()})}getAll(){return Array.from(ge(this,Mi))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>AS(r,n))}findAll(t={}){return this.getAll().filter(r=>AS(t,r))}notify(t){Qn.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 6,930 bytes, lines 456-465
456r.state.isPaused);return Qn.batch(()=>Promise.all(t.map(r=>r.continue().catch(Ca))))}},Mi=new WeakMap,Pa=new WeakMap,Wh=new WeakMap,IE);function X0(e){var t;return(t=e.options.scope)==null?void 0:t.id}function OS(e){return{onFetch:(t,r)=>{var d,f,h,m,g;const n=t.options,s=(h=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,a=((m=t.state.data)==null?void 0:m.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let p=!1;const x=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},b=EA(t.options,t.fetchOptions),w=async(y,_,N)=>{if(p)return Promise.reject();if(_==null&&y.pages.length)return Promise.resolve(y);const S=(()=>{const R={client:t.client,queryKey:t.queryKey,pageParam:_,direction:N?"backward":"forward",meta:t.options.meta};return x(R),R})(),E=await b(S),{maxPages:j}=t.options,T=N?IB:DB;return{pages:T(y.pages,E,j),pageParams:T(y.pageParams,_,j)}};if(s&&a.length){const y=s==="backward",_=y?YB:DS,N={pages:a,pageParams:o},k=_(n,N);l=await w(N,k,y)}else{const y=e??a.length;do{const _=c===0?o[0]??n.initialPageParam:DS(n,l);if(c>0&&_==null)break;l=await w(l,_),c++}while(c<y)}return l};t.options.persister?t.fetchFn=()=>{var p,x;return(x=(p=t.options).persister)==null?void 0:x.call(p,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function DS(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 YB(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Pr,Po,Ro,Wu,zu,Oo,Hu,Vu,FE,XB=(FE=class{constructor(e={}){Mt(this,Pr);Mt(this,Po);Mt(this,Ro);Mt(this,Wu);Mt(this,zu);Mt(this,Oo);Mt(this,Hu);Mt(this,Vu);vt(this,Pr,e.queryCache||new VB),vt(this,Po,e.mutationCache||new KB),vt(this,Ro,e.defaultOptions||{}),vt(this,Wu,new Map),vt(this,zu,new Map),vt(this,Oo,0)}mount(){C0(this,Oo)._++,ge(this,Oo)===1&&(vt(this,Hu,CA.subscribe(async e=>{e&&(await this.resumePausedMutations(),ge(this,Pr).onFocus())})),vt(this,Vu,yp.subscribe(async e=>{e&&(await this.resumePausedMutations(),ge(this,Pr).onOnline())})))}unmount(){var e,t;C0(this,Oo)._--,ge(this,Oo)===0&&((e=ge(this,Hu))==null||e.call(this),vt(this,Hu,void 0),(t=ge(this,Vu))==null||t.call(this),vt(this,Vu,void 0))}isFetching(e){return ge(this,Pr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ge(this,Po).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=ge(this,Pr).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=ge(this,Pr).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(by(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return ge(this,Pr).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=ge(this,Pr).get(n.queryHash),a=s==null?void 0:s.state.data,o=CB(t,a);if(o!==void 0)return ge(this,Pr).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Qn.batch(()=>ge(this,Pr).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=ge(this,Pr).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=ge(this,Pr);Qn.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=ge(this,Pr);return Qn.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Qn.batch(()=>ge(this,Pr).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Ca).catch(Ca)}invalidateQueries(e,t={}){return Qn.batch(()=>(ge(this,Pr).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Qn.batch(()=>ge(this,Pr).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let a=s.fetch(void 0,r);return r.throwOnError||(a=a.catch(Ca)),s.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Ca)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=ge(this,Pr).build(this,t);return r.isStaleByTime(by(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ca).catch(Ca)}fetchInfiniteQuery(e){return e.behavior=OS(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ca).catch(Ca)}ensureInfiniteQueryData(e){return e.behavior=OS(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return yp.isOnline()?ge(this,Po).resumePausedMutations():Promise.resolve()}getQueryCache(){return ge(this,Pr)}getMutationCache(){return ge(this,Po)}getDefaultOptions(){return ge(this,Ro)}setDefaultOptions(e){vt(this,Ro,e)}setQueryDefaults(e,t){ge(this,Wu).set(sh(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ge(this,Wu).values()],r={};return t.forEach(n=>{ah(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){ge(this,zu).set(sh(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ge(this,zu).values()],r={};return t.forEach(n=>{ah(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ge(this,Ro).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Fb(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===Mb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ge(this,Ro).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ge(this,Pr).clear(),ge(this,Po).clear()}},Pr=new WeakMap,Po=new WeakMap,Ro=new WeakMap,Wu=new WeakMap,zu=new WeakMap,Oo=new WeakMap,Hu=new WeakMap,Vu=new WeakMap,FE),QB=v.createContext(void 0),JB=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),i.jsx(QB.Provider,{value:e,children:t}));/**
457 * @remix-run/router v1.23.0
458 *
459 * Copyright (c) Remix Software Inc.
460 *
461 * This source code is licensed under the MIT license found in the
462 * LICENSE.md file in the root directory of this source tree.
463 *
464 * @license MIT
465 */function ih(){return ih=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 5,028 bytes, line 465
465for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ih.apply(this,arguments)}var Mo;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Mo||(Mo={}));const IS="popstate";function ZB(e){e===void 0&&(e={});function t(n,s){let{pathname:a,search:o,hash:l}=n.location;return Ny("",{pathname:a,search:o,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:wp(s)}return t$(t,r,null,e)}function Cr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function OA(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function e$(){return Math.random().toString(36).substr(2,8)}function FS(e,t){return{usr:e.state,key:e.key,idx:t}}function Ny(e,t,r,n){return r===void 0&&(r=null),ih({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Sd(t):t,{state:r,key:t&&t.key||n||e$()})}function wp(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Sd(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function t$(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:a=!1}=n,o=s.history,l=Mo.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(ih({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){l=Mo.Pop;let x=d(),b=x==null?null:x-u;u=x,c&&c({action:l,location:p.location,delta:b})}function h(x,b){l=Mo.Push;let w=Ny(p.location,x,b);u=d()+1;let y=FS(w,u),_=p.createHref(w);try{o.pushState(y,"",_)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;s.location.assign(_)}a&&c&&c({action:l,location:p.location,delta:1})}function m(x,b){l=Mo.Replace;let w=Ny(p.location,x,b);u=d();let y=FS(w,u),_=p.createHref(w);o.replaceState(y,"",_),a&&c&&c({action:l,location:p.location,delta:0})}function g(x){let b=s.location.origin!=="null"?s.location.origin:s.location.href,w=typeof x=="string"?x:wp(x);return w=w.replace(/ $/,"%20"),Cr(b,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,b)}let p={get action(){return l},get location(){return e(s,o)},listen(x){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(IS,f),c=x,()=>{s.removeEventListener(IS,f),c=null}},createHref(x){return t(s,x)},createURL:g,encodeLocation(x){let b=g(x);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:h,replace:m,go(x){return o.go(x)}};return p}var MS;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(MS||(MS={}));function r$(e,t,r){return r===void 0&&(r="/"),n$(e,t,r,!1)}function n$(e,t,r,n){let s=typeof t=="string"?Sd(t):t,a=nd(s.pathname||"/",r);if(a==null)return null;let o=DA(e);s$(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=p$(a);l=h$(o[c],u,n)}return l}function DA(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(a,o,l)=>{let c={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};c.relativePath.startsWith("/")&&(Cr(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let u=Xo([n,c.relativePath]),d=r.concat(c);a.children&&a.children.length>0&&(Cr(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),DA(a.children,t,d,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:d$(u,a.index),routesMeta:d})};return e.forEach((a,o)=>{var l;if(a.path===""||!((l=a.path)!=null&&l.includes("?")))s(a,o);else for(let c of IA(a.path))s(a,o,c)}),t}function IA(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return s?[a,""]:[a];let o=IA(n.join("/")),l=[];return l.push(...o.map(c=>c===""?a:[a,c].join("/"))),s&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function s$(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:f$(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const a$=/^:[\w-]+$/,i$=3,o$=2,l$=1,c$=10,u$=-2,LS=e=>e==="*";function d$(e,t){let r=e.split("/"),n=r.length;return r.some(LS)&&(n+=u$),t&&(n+=o$),r.filter(s=>!LS(s)).reduce((s,a)=>s+(a$.test(a)?i$:a===""?l$:c$),n)}function f$(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function h$(e,t,r){let{routesMeta:n}=e,s={},a="/",o=[];for(let l=0;l<n.length;++l){let c=n[l],u=l===n.length-1,d=a==="/"?t:t.slice(a.length)||"/",f=bp({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),h=c.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=bp({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!f)return null;
vendor: 9,412 bytes, lines 465-474
465Object.assign(s,f.params),o.push({params:s,pathname:Xo([a,f.pathname]),pathnameBase:y$(Xo([a,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(a=Xo([a,f.pathnameBase]))}return o}function bp(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=m$(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let a=s[0],o=a.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:n.reduce((u,d,f)=>{let{paramName:h,isOptional:m}=d;if(h==="*"){let p=l[f]||"";o=a.slice(0,a.length-p.length).replace(/(.)\/+$/,"$1")}const g=l[f];return m&&!g?u[h]=void 0:u[h]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function m$(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),OA(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(n.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function p$(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return OA(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function nd(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function x$(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Sd(e):e;return{pathname:r?r.startsWith("/")?r:g$(r,t):t,search:w$(n),hash:b$(s)}}function g$(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function xv(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function v$(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Lb(e,t){let r=v$(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Bb(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Sd(e):(s=ih({},e),Cr(!s.pathname||!s.pathname.includes("?"),xv("?","pathname","search",s)),Cr(!s.pathname||!s.pathname.includes("#"),xv("#","pathname","hash",s)),Cr(!s.search||!s.search.includes("#"),xv("#","search","hash",s)));let a=e===""||s.pathname==="",o=a?"/":s.pathname,l;if(o==null)l=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}l=f>=0?t[f]:"/"}let c=x$(s,l),u=o&&o!=="/"&&o.endsWith("/"),d=(a||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Xo=e=>e.join("/").replace(/\/\/+/g,"/"),y$=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),w$=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,b$=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function _$(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const FA=["post","put","patch","delete"];new Set(FA);const N$=["get",...FA];new Set(N$);/**
466 * React Router v6.30.1
467 *
468 * Copyright (c) Remix Software Inc.
469 *
470 * This source code is licensed under the MIT license found in the
471 * LICENSE.md file in the root directory of this source tree.
472 *
473 * @license MIT
474 */function oh(){return oh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},oh.apply(this,arguments)}const Bx=v.createContext(null),MA=v.createContext(null),so=v.createContext(null),$x=v.createContext(null),pl=v.createContext({outlet:null,matches:[],isDataRoute:!1}),LA=v.createContext(null);function S$(e,t){let{relative:r}=t===void 0?{}:t;kd()||Cr(!1);let{basename:n,navigator:s}=v.useContext(so),{hash:a,pathname:o,search:l}=Ux(e,{relative:r}),c=o;return n!=="/"&&(c=o==="/"?n:Xo([n,o])),s.createHref({pathname:c,search:l,hash:a})}function kd(){return v.useContext($x)!=null}function Ya(){return kd()||Cr(!1),v.useContext($x).location}function BA(e){v.useContext(so).static||v.useLayoutEffect(e)}function kc(){let{isDataRoute:e}=v.useContext(pl);return e?M$():k$()}function k$(){kd()||Cr(!1);let e=v.useContext(Bx),{basename:t,future:r,navigator:n}=v.useContext(so),{matches:s}=v.useContext(pl),{pathname:a}=Ya(),o=JSON.stringify(Lb(s,r.v7_relativeSplatPath)),l=v.useRef(!1);return BA(()=>{l.current=!0}),v.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){n.go(u);return}let f=Bb(u,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Xo([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,o,a,e])}function Ux(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=v.useContext(so),{matches:s}=v.useContext(pl),{pathname:a}=Ya(),o=JSON.stringify(Lb(s,n.v7_relativeSplatPath));return v.useMemo(()=>Bb(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function j$(e,t){return E$(e,t)}function E$(e,t,r,n){kd()||Cr(!1);let{navigator:s}=v.useContext(so),{matches:a}=v.useContext(pl),o=a[a.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=Ya(),d;if(t){var f;let x=typeof t=="string"?Sd(t):t;c==="/"||(f=x.pathname)!=null&&f.startsWith(c)||Cr(!1),d=x}else d=u;let h=d.pathname||"/",m=h;if(c!=="/"){let x=c.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(x.length).join("/")}let g=r$(e,{pathname:m}),p=R$(g&&g.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:Xo([c,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?c:Xo([c,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),a,r,n);return t&&p?v.createElement($x.Provider,{value:{location:oh({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Mo.Pop}},p):p}function C$(){let e=F$(),t=_$(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),r?v.createElement("pre",{style:s},r):null,null)}const T$=v.createElement(C$,null);class A$ extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?v.createElement(pl.Provider,{value:this.props.routeContext},v.createElement(LA.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function P$(e){let{routeContext:t,match:r,children:n}=e,s=v.useContext(Bx);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),v.createElement(pl.Provider,{value:t},n)}function R$(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,l=(s=r)==null?void 0:s.errors;if(l!=null){let d=o.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||Cr(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:h,errors:m}=r,g=f.route.loader&&h[f.route.id]===void 0&&(!m||m[f.route.id]===void 0);if(f.route.lazy||g){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,f,h)=>{let m,g=!1,p=null,x=null;r&&(m=l&&f.route.id?l[f.route.id]:void 0,p=f.route.errorElement||T$,c&&(u<0&&h===0?(g=!0,x=null):u===h&&(g=!0,x=f.route.hydrateFallbackElement||null)));let b=t.concat(o.slice(0,h+1)),w=()=>{let y;return m?y=p:g?y=x:f.route.Component?y=v.createElement(f.route.Component,null):f.route.element?y=f.route.element:y=d,v.createElement(P$,{match:f,routeContext:{outlet:d,matches:b,isDataRoute:r!=null},children:y})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?v.createElement(A$,{location:r.location,revalidation:r.revalidation,component:p,error:m,children:w(),routeC
474ontext:{outlet:null,matches:b,isDataRoute:!0}}):w()},null)}var $A=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}($A||{}),_p=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(_p||{});function O$(e){let t=v.useContext(Bx);return t||Cr(!1),t}function D$(e){let t=v.useContext(MA);return t||Cr(!1),t}function I$(e){let t=v.useContext(pl);return t||Cr(!1),t}function UA(e){let t=I$(),r=t.matches[t.matches.length-1];return r.route.id||Cr(!1),r.route.id}function F$(){var e;let t=v.useContext(LA),r=D$(_p.UseRouteError),n=UA(_p.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function M$(){let{router:e}=O$($A.UseNavigateStable),t=UA(_p.UseNavigateStable),r=v.useRef(!1);return BA(()=>{r.current=!0}),v.useCallback(function(s,a){a===void 0&&(a={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,oh({fromRouteId:t},a)))},[e,t])}function L$(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function B$(e){let{to:t,replace:r,state:n,relative:s}=e;kd()||Cr(!1);let{future:a,static:o}=v.useContext(so),{matches:l}=v.useContext(pl),{pathname:c}=Ya(),u=kc(),d=Bb(t,Lb(l,a.v7_relativeSplatPath),c,s==="path"),f=JSON.stringify(d);return v.useEffect(()=>u(JSON.parse(f),{replace:r,state:n,relative:s}),[u,f,s,r,n]),null}function Kt(e){Cr(!1)}function $$(e){let{basename:t="/",children:r=null,location:n,navigationType:s=Mo.Pop,navigator:a,static:o=!1,future:l}=e;kd()&&Cr(!1);let c=t.replace(/^\/*/,"/"),u=v.useMemo(()=>({basename:c,navigator:a,static:o,future:oh({v7_relativeSplatPath:!1},l)}),[c,l,a,o]);typeof n=="string"&&(n=Sd(n));let{pathname:d="/",search:f="",hash:h="",state:m=null,key:g="default"}=n,p=v.useMemo(()=>{let x=nd(d,c);return x==null?null:{location:{pathname:x,search:f,hash:h,state:m,key:g},navigationType:s}},[c,d,f,h,m,g,s]);return p==null?null:v.createElement(so.Provider,{value:u},v.createElement($x.Provider,{children:r,value:p}))}function U$(e){let{children:t,location:r}=e;return j$(Sy(t),r)}new Promise(()=>{});function Sy(e,t){t===void 0&&(t=[]);let r=[];return v.Children.forEach(e,(n,s)=>{if(!v.isValidElement(n))return;let a=[...t,s];if(n.type===v.Fragment){r.push.apply(r,Sy(n.props.children,a));return}n.type!==Kt&&Cr(!1),!n.props.index||!n.props.children||Cr(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Sy(n.props.children,a)),r.push(o)}),r}/**
475 * React Router DOM v6.30.1
476 *
477 * Copyright (c) Remix Software Inc.
478 *
479 * This source code is licensed under the MIT license found in the
480 * LICENSE.md file in the root directory of this source tree.
481 *
482 * @license MIT
483 */function Np(){return Np=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Np.apply(this,arguments)}function WA(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,a;for(a=0;a<n.length;a++)s=n[a],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function W$(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function z$(e,t){return e.button===0&&(!t||t==="_self")&&!W$(e)}function ky(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function H$(e,t){let r=ky(e);return t&&t.forEach((n,s)=>
483{r.has(s)||t.getAll(s).forEach(a=>{r.append(s,a)})}),r}const V$=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],G$=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],q$="6";try{window.__reactRouterVersion=q$}catch{}const K$=v.createContext({isTransitioning:!1}),Y$="startTransition",BS=Sw[Y$];function X$(e){let{basename:t,children:r,future:n,window:s}=e,a=v.useRef();a.current==null&&(a.current=ZB({window:s,v5Compat:!0}));let o=a.current,[l,c]=v.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},d=v.useCallback(f=>{u&&BS?BS(()=>c(f)):c(f)},[c,u]);return v.useLayoutEffect(()=>o.listen(d),[o,d]),v.useEffect(()=>L$(n),[n]),v.createElement($$,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:o,future:n})}const Q$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",J$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Z$=v.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:a,replace:o,state:l,target:c,to:u,preventScrollReset:d,viewTransition:f}=t,h=WA(t,V$),{basename:m}=v.useContext(so),g,p=!1;if(typeof u=="string"&&J$.test(u)&&(g=u,Q$))try{let y=new URL(window.location.href),_=u.startsWith("//")?new URL(y.protocol+u):new URL(u),N=nd(_.pathname,m);_.origin===y.origin&&N!=null?u=N+_.search+_.hash:p=!0}catch{}let x=S$(u,{relative:s}),b=tU(u,{replace:o,state:l,target:c,preventScrollReset:d,relative:s,viewTransition:f});function w(y){n&&n(y),y.defaultPrevented||b(y)}return v.createElement("a",Np({},h,{href:g||x,onClick:p||a?n:w,ref:r,target:c}))}),zA=v.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:s=!1,className:a="",end:o=!1,style:l,to:c,viewTransition:u,children:d}=t,f=WA(t,G$),h=Ux(c,{relative:f.relative}),m=Ya(),g=v.useContext(MA),{navigator:p,basename:x}=v.useContext(so),b=g!=null&&rU(h)&&u===!0,w=p.encodeLocation?p.encodeLocation(h).pathname:h.pathname,y=m.pathname,_=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;s||(y=y.toLowerCase(),_=_?_.toLowerCase():null,w=w.toLowerCase()),_&&x&&(_=nd(_,x)||_);const N=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let k=y===w||!o&&y.startsWith(w)&&y.charAt(N)==="/",S=_!=null&&(_===w||!o&&_.startsWith(w)&&_.charAt(w.length)==="/"),E={isActive:k,isPending:S,isTransitioning:b},j=k?n:void 0,T;typeof a=="function"?T=a(E):T=[a,k?"active":null,S?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let R=typeof l=="function"?l(E):l;return v.createElement(Z$,Np({},f,{"aria-current":j,className:T,ref:r,style:R,to:c,viewTransition:u}),typeof d=="function"?d(E):d)});var jy;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(jy||(jy={}));var $S;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})($S||($S={}));function eU(e){let t=v.useContext(Bx);return t||Cr(!1),t}function tU(e,t){let{target:r,replace:n,state:s,preventScrollReset:a,relative:o,viewTransition:l}=t===void 0?{}:t,c=kc(),u=Ya(),d=Ux(e,{relative:o});return v.useCallback(f=>{if(z$(f,r)){f.preventDefault();let h=n!==void 0?n:wp(u)===wp(d);c(e,{replace:h,state:s,preventScrollReset:a,relative:o,viewTransition:l})}},[u,c,d,n,s,r,e,a,o,l])}function t0(e){let t=v.useRef(ky(e)),r=v.useRef(!1),n=Ya(),s=v.useMemo(()=>H$(n.search,r.current?null:t.current),[n.search]),a=kc(),o=v.useCallback((l,c)=>{const u=ky(typeof l=="function"?l(s):l);r.current=!0,a("?"+u,c)},[a,s]);return[s,o]}function rU(e,t){t===void 0&&(t={});let r=v.useContext(K$);r==null&&Cr(!1);let{basename:n}=eU(jy.useViewTransitionState),s=Ux(e,{relative:t.relative});if(!r.isTransitioning)return!1;let a=nd(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=nd(r.nextLocation.pathname,n)||r.nextLocation.pathname;return bp(s.pathname,o)!=null||bp(s.pathname,a)!=null}var oi=function(){return oi=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},oi.apply(this,arguments)};
483function jd(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function nU(e,t,r,n){function s(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function l(d){try{u(n.next(d))}catch(f){o(f)}}function c(d){try{u(n.throw(d))}catch(f){o(f)}}function u(d){d.done?a(d.value):s(d.value).then(l,c)}u((n=n.apply(e,t||[])).next())})}function sU(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,a;n<s;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}const aU=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class $b extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class iU extends $b{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class US extends $b{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class WS extends $b{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Ey;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Ey||(Ey={}));class oU{constructor(t,{headers:r={},customFetch:n,region:s=Ey.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=aU(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return nU(this,arguments,void 0,function*(r,n={}){var s;let a,o;try{const{headers:l,method:c,body:u,signal:d,timeout:f}=n;let h={},{region:m}=n;m||(m=this.region);const g=new URL(`${this.url}/${r}`);m&&m!=="any"&&(h["x-region"]=m,g.searchParams.set("forceFunctionRegion",m));let p;u&&(l&&!Object.prototype.hasOwnProperty.call(l,"Content-Type")||!l)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(h["Content-Type"]="application/octet-stream",p=u):typeof u=="string"?(h["Content-Type"]="text/plain",p=u):typeof FormData<"u"&&u instanceof FormData?p=u:(h["Content-Type"]="application/json",p=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?p=JSON.stringify(u):p=u;let x=d;f&&(o=new AbortController,a=setTimeout(()=>o.abort(),f),d?(x=o.signal,d.addEventListener("abort",()=>o.abort())):x=o.signal);const b=yield this.fetch(g.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},h),this.headers),l),body:p,signal:x}).catch(N=>{throw new iU(N)}),w=b.headers.get("x-relay-error");if(w&&w==="true")throw new US(b);if(!b.ok)throw new WS(b);let y=((s=b.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),_;return y==="application/json"?_=yield b.json():y==="application/octet-stream"||y==="application/pdf"?_=yield b.blob():y==="text/event-stream"?_=b:y==="multipart/form-data"?_=yield b.formData():_=yield b.text(),{data:_,error:null,response:b}}catch(l){return{data:null,error:l,response:l instanceof WS||l instanceof US?l.context:void 0}}finally{a&&clearTimeout(a)}})}}var lU=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
483de=e.code}},cU=class{constructor(e){var t,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var r=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const n=this.fetch;let s=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async a=>{let o=null,l=null,c=null,u=a.status,d=a.statusText;if(a.ok){var f,h;if(r.method!=="HEAD"){var m;const b=await a.text();b===""||(r.headers.get("Accept")==="text/csv"||r.headers.get("Accept")&&(!((m=r.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text"))?l=b:l=JSON.parse(b))}const p=(f=r.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),x=(h=a.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");p&&x&&x.length>1&&(c=parseInt(x[1])),r.isMaybeSingle&&r.method==="GET"&&Array.isArray(l)&&(l.length>1?(o={code:"PGRST116",details:`Results contain ${l.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},l=null,c=null,u=406,d="Not Acceptable"):l.length===1?l=l[0]:l=null)}else{var g;const p=await a.text();try{o=JSON.parse(p),Array.isArray(o)&&a.status===404&&(l=[],o=null,u=200,d="OK")}catch{a.status===404&&p===""?(u=204,d="No Content"):o={message:p}}if(o&&r.isMaybeSingle&&(!(o==null||(g=o.details)===null||g===void 0)&&g.includes("0 rows"))&&(o=null,u=200,d="OK"),o&&r.shouldThrowOnError)throw new lU(o)}return{error:o,data:l,count:c,status:u,statusText:d}});return this.shouldThrowOnError||(s=s.catch(a=>{var o;let l="";const c=a==null?void 0:a.cause;if(c){var u,d,f,h;const g=(u=c==null?void 0:c.message)!==null&&u!==void 0?u:"",p=(d=c==null?void 0:c.code)!==null&&d!==void 0?d:"";l=`${(f=a==null?void 0:a.name)!==null&&f!==void 0?f:"FetchError"}: ${a==null?void 0:a.message}`,l+=`
484
485Caused by: ${(h=c==null?void 0:c.name)!==null&&h!==void 0?h:"Error"}: ${g}`,p&&(l+=` (${p})`),c!=null&&c.stack&&(l+=`
486${c.stack}`)}else{var m;l=(m=a==null?void 0:a.stack)!==null&&m!==void 0?m:""}return{error:{message:`${(o=a==null?void 0:a.name)!==null&&o!==void 0?o:"FetchError"}: ${a==null?void 0:a.message}`,details:l,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},uU=class extends cU{select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const a=s?`${s}.order`:"order",o=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,a=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(a,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
486explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:a="text"}={}){var o;const l=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${a}; for="${c}"; options=${l};`),a==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const zS=new RegExp("[,()]");var Zc=class extends uU{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&zS.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&zS.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const a=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${a}.${t}`),this}match(e){return Object.entries(e).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},dU=class{constructor(e,{headers:t={},schema:r,fetch:n}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let a=!1;const o=(e??"*").split("").map(u=>/\s/.test(u)&&!a?"":(u==='"'&&(a=!a),u)).join(""),{url:l,headers:c}=this.cloneRequestState();return l.searchParams.set("select",o),n&&c.append("Prefer",`count=${n}`),new Zc({method:s,url:l,headers:c,schema:this.schema,fetch:this.fetch})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST",{url:a,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),r||o.append("Prefer","missing=default"),Array.isArray(e)){const l=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(l.length>0){const c=[...new Set(l)].map(u=>`"${u}"`);a.searchParams.set("columns",c.join(","))}}return new Zc({method:s,url:a,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var a;const o="POST",{url:l,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&l.searchParams.set("on_conflict",t),n&&c.append("Prefer",`count=${n}`),s||c.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((d,f)=>d.concat(Object.keys(f)),[]);if(u.length>0){const d=[...new Set(u)].map(f=>`"${f}"`);l.searchParams.set("columns",d.join(","))}}return new Zc({method:o,url:l,headers:c,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:a}=this.cloneRequestState();return t&&a.append("Prefer",`count=${t}`),new Zc({method:n,url:s,headers:a,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new Zc({method:r,url:n,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch})}},fU=class HA{constructor(t,{headers:r={},schema:n,fetch:s}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.fetch=s}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new dU(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new HA(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,r={},{head:n=!1,get:s=!1,count:a}={}){var o;let l;const c=new URL(`${this.url}/rpc/${t}`);let u;const d=m=>m!==null&&typeof m=="object"&&(!Array.isArray(m)||m.some(d)),f=n&&Object.values(r).some(d);f?(l="POST",u=r):n||s?(l=n?"HEAD":"GET",Object.entries(r).filter(([m,g])=>g!==void 0).map(([m,g])=>[m,Array.isArray(g)?`{${g.join(",")}}`:`${g}
486`]).forEach(([m,g])=>{c.searchParams.append(m,g)})):(l="POST",u=r);const h=new Headers(this.headers);return f?h.set("Prefer",a?`count=${a},return=minimal`:"return=minimal"):a&&h.set("Prefer",`count=${a}`),new Zc({method:l,url:c,headers:h,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}};class hU{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const s=n.node,a=parseInt(s.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
487import ws from "ws"
488new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=`
489
490Suggested solution: ${t.workaround}`),new Error(r)}static createWebSocket(t,r){const n=this.getWebSocketConstructor();return new n(t,r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const mU="2.90.1",pU=`realtime-js/${mU}`,VA="1.0.0",xU="2.0.0",HS=VA,Cy=1e4,gU=1e3,vU=100;var _o;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(_o||(_o={}));var sn;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(sn||(sn={}));var Oa;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Oa||(Oa={}));var Ty;(function(e){e.websocket="websocket"})(Ty||(Ty={}));var Ll;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Ll||(Ll={}));class yU{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,r,n){var s,a;const o=t.topic,l=(s=t.ref)!==null&&s!==void 0?s:"",c=(a=t.join_ref)!==null&&a!==void 0?a:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},f=Object.keys(d).length===0?"":JSON.stringify(d);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`metadata length ${f.length} exceeds maximum of 255`);const h=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+l.length+o.length+u.length+f.length,m=new ArrayBuffer(this.HEADER_LENGTH+h);let g=new DataView(m),p=0;g.setUint8(p++,this.KINDS.userBroadcastPush),g.setUint8(p++,c.length),g.setUint8(p++,l.length),g.setUint8(p++,o.length),g.setUint8(p++,u.length),g.setUint8(p++,f.length),g.setUint8(p++,r),Array.from(c,b=>g.setUint8(p++,b.charCodeAt(0))),Array.from(l,b=>g.setUint8(p++,b.charCodeAt(0))),Array.from(o,b=>g.setUint8(p++,b.charCodeAt(0))),Array.from(u,b=>g.setUint8(p++,b.charCodeAt(0))),Array.from(f,b=>g.setUint8(p++,b.charCodeAt(0)));var x=new Uint8Array(m.byteLength+n.byteLength);return x.set(new Uint8Array(m),0),x.set(new Uint8Array(n),m.byteLength),x.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,a,o,l,c]=n;return r({join_ref:s,ref:a,topic:o,event:l,payload:c})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),a=r.getUint8(2),o=r.getUint8(3),l=r.getUint8(4);let c=this.HEADER_LENGTH+4;const u=n.decode(t.slice(c,c+s));c=c+s;const d=n.decode(t.slice(c,c+a));c=c+a;
490const f=n.decode(t.slice(c,c+o));c=c+o;const h=t.slice(c,t.byteLength),m=l===this.JSON_ENCODING?JSON.parse(n.decode(h)):h,g={type:this.BROADCAST_EVENT,event:d,payload:m};return o>0&&(g.meta=JSON.parse(f)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:g}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}class GA{constructor(t,r){this.callback=t,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var or;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(or||(or={}));const VS=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((a,o)=>(a[o]=wU(o,e,t,s),a),{}):{}},wU=(e,t,r,n)=>{const s=t.find(l=>
490l.name===e),a=s==null?void 0:s.type,o=r[e];return a&&!n.includes(a)?qA(a,o):Ay(o)},qA=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return SU(t,r)}switch(e){case or.bool:return bU(t);case or.float4:case or.float8:case or.int2:case or.int4:case or.int8:case or.numeric:case or.oid:return _U(t);case or.json:case or.jsonb:return NU(t);case or.timestamp:return kU(t);case or.abstime:case or.date:case or.daterange:case or.int4range:case or.int8range:case or.money:case or.reltime:case or.text:case or.time:case or.timestamptz:case or.timetz:case or.tsrange:case or.tstzrange:return Ay(t);default:return Ay(t)}},Ay=e=>e,bU=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},_U=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},NU=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},SU=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let a;const o=e.slice(1,r);try{a=JSON.parse("["+o+"]")}catch{a=o?o.split(","):[]}return a.map(l=>qA(t,l))}return e},kU=e=>typeof e=="string"?e.replace(" ","T"):e,KA=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class gv{constructor(t,r,n={},s=Cy){this.channel=t,this.event=r,this.payload=n,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,r){var n;return this._hasReceived(t)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:t,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(r))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var GS;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(GS||(GS={}));class Sf{constructor(t,r){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},s=>{const{onJoin:a,onLeave:o,onSync:l}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Sf.syncState(this.state,s,a,o),this.pendingDiffs.forEach(c=>{this.state=Sf.syncDiff(this.state,c,a,o)}),this.pendingDiffs=[],l()}),this.channel._on(n.diff,{},s=>{const{onJoin:a,onLeave:o,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Sf.syncDiff(this.state,s,a,o),l())}),this.onJoin((s,a,o)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:a,newPresences:o})}),this.onLeave((s,a,o)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:a,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,s){const a=this.cloneDeep(t),o=this.transformState(r),l={},c={};return this.map(a,(u,d)=>{o[u]||(c[u]=d)}),this.map(o,(u,d)=>{const f=a[u];if(f){const h=d.map(x=>x.presence_ref),m=f.map(x=>x.presence_ref),g=d.filter(x=>m.indexOf(x.presence_ref)<0),p=f.filter(x=>h.indexOf(x.presence_ref)<0);g.length>0&&(l[u]=g),p.length>0&&(c[u]=p)}else l[u]=d}),this.syncDiff(a,{joins:l,leaves:c},n,s)}static syncDiff(t,r,n,s){const{joins:a,leaves:o}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),s||(s=()=>{}),this.map(a,(l,c)=>{var u;
490const d=(u=t[l])!==null&&u!==void 0?u:[];if(t[l]=this.cloneDeep(c),d.length>0){const f=t[l].map(m=>m.presence_ref),h=d.filter(m=>f.indexOf(m.presence_ref)<0);t[l].unshift(...h)}n(l,d,c)}),this.map(o,(l,c)=>{let u=t[l];if(!u)return;const d=c.map(f=>f.presence_ref);u=u.filter(f=>d.indexOf(f.presence_ref)<0),t[l]=u,s(l,u,c),u.length===0&&delete t[l]}),t}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return"metas"in s?r[n]=s.metas.map(a=>(a.presence_ref=a.phx_ref,delete a.phx_ref,delete a.phx_ref_prev,a)):r[n]=s,r},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var qS;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(qS||(qS={}));var kf;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(kf||(kf={}));var Ii;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Ii||(Ii={}));class yu{constructor(t,r={config:{}},n){var s,a;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=sn.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new gv(this,Oa.join,this.params,this.timeout),this.rejoinTimer=new GA(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=sn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o=>o.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=sn.closed,this.socket._remove(this)}),this._onError(o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=sn.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=sn.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=sn.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Oa.reply,{},(o,l)=>{this._trigger(this._replyEventName(l),o)}),this.presence=new Sf(this),this.broadcastEndpointURL=KA(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((a=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||a===void 0)&&a.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,s,a;if(this.socket.isConnected()||this.socket.connect(),this.state==sn.closed){const{config:{broadcast:o,presence:l,private:c}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(m=>m.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[kf.PRESENCE]&&this.bindings[kf.PRESENCE].length>0||((a=this.params.config.presence)===null||a===void 0?void 0:a.enabled)===!0,f={},h={broadcast:o,presence:Object.assign(Object.assign({},l),{enabled:d}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(f.access_token=this.socket.accessTokenValue),this._onError(m=>t==null?void 0:t(Ii.CHANNEL_ERROR,m)),this._onClose(()=>t==null?void 0:t(Ii.CLOSED)),this.updateJoinPayload(Object.assign({config:h},f)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:m})=>{var g;if(this.socket._isManualToken()||this.socket.setAuth(),m===void 0){t==null||t(Ii.SUBSCRIBED);return}else{const p=this.bindings.postgres_changes,x=(g=p==null?void 0:p.length)!==null&&g!==void 0?g:0,b=[];for(let w=0;w<x;w++){const y=p[w],{filter:{event:_,schema:N,table:k,filter:S}}=y,E=m&&m[w];if(E&&E.event===_&&yu.isFilterValueEqual(E.schema,N)&&yu.isFilterValueEqual(E.table,k)&&yu.isFilterValueEqual(E.filter,S))b.push(Object.assign(Object.assign({},y),{id:E.id}));else{this.unsubscribe(),this.state=sn.errored,t==null||t(Ii.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=b,t&&t(Ii.SUBSCRIBED);return}}).receive("error",m=>{this.state=sn.errored,t==null||t(Ii.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(m).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Ii.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){return this.state===sn.joined&&t===kf.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject("Payload is required for httpSend()");const a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},l=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(l.status===202)return{success:!0};let c=l.statusText;
490try{const u=await l.json();c=u.error||u.message||c}catch{}return Promise.reject(new Error(c))}async send(t,r={}){var n,s;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:a,payload:o}=t,l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:l,body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var o,l,c;const u=this._push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(o=this.params)===null||o===void 0?void 0:o.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&a("ok"),u.receive("ok",()=>a("ok")),u.receive("error",()=>a("error")),u.receive("timeout",()=>a("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=sn.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Oa.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(s=>{n=new gv(this,Oa.leave,{},t),n.receive("ok",()=>{r(),s("ok")}).receive("timeout",()=>{r(),s("timed out")}).receive("error",()=>{s("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=sn.closed,this.bindings={}}async _fetchWithTimeout(t,r,n){const s=new AbortController,a=setTimeout(()=>s.abort(),n),o=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(a),o}_push(t,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new gv(this,t,r,n);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>vU){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(t,r,n){return r}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,r,n){var s,a;const o=t.toLocaleLowerCase(),{close:l,error:c,leave:u,join:d}=Oa;if(n&&[l,c,u,d].indexOf(o)>=0&&n!==this._joinRef())return;let h=this._onMessage(o,r,n);if(r&&!h)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(m=>{var g,p,x;return((g=m.filter)===null||g===void 0?void 0:g.event)==="*"||((x=(p=m.filter)===null||p===void 0?void 0:p.event)===null||x===void 0?void 0:x.toLocaleLowerCase())===o}).map(m=>m.callback(h,n)):(a=this.bindings[o])===null||a===void 0||a.filter(m=>{var g,p,x,b,w,y,_,N;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in m){const k=m.id,S=(g=m.filter)===null||g===void 0?void 0:g.event;return k&&((p=r.ids)===null||p===void 0?void 0:p.includes(k))&&(S==="*"||(S==null?void 0:S.toLocaleLowerCase())===((x=r.data)===null||x===void 0?void 0:x.type.toLocaleLowerCase()))&&(!(!((b=m.filter)===null||b===void 0)&&b.table)||m.filter.table===((w=r.data)===null||w===void 0?void 0:w.table))}else{const k=(_=(y=m==null?void 0:m.filter)===null||y===void 0?void 0:y.event)===null||_===void 0?void 0:_.toLocaleLowerCase();return k==="*"||k===((N=r==null?void 0:r.event)===null||N===void 0?void 0:N.toLocaleLowerCase())}else return m.type.toLocaleLowerCase()===o}).map(m=>{if(typeof h=="object"&&"ids"in h){const g=h.data,{schema:p,table:
490x,commit_timestamp:b,type:w,errors:y}=g;h=Object.assign(Object.assign({},{schema:p,table:x,commit_timestamp:b,eventType:w,new:{},old:{},errors:y}),this._getPayloadRecords(g))}m.callback(h,n)})}_isClosed(){return this.state===sn.closed}_isJoined(){return this.state===sn.joined}_isJoining(){return this.state===sn.joining}_isLeaving(){return this.state===sn.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const s=t.toLocaleLowerCase(),a={type:s,filter:r,callback:n};return this.bindings[s]?this.bindings[s].push(a):this.bindings[s]=[a],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(s=>{var a;return!(((a=s.type)===null||a===void 0?void 0:a.toLocaleLowerCase())===n&&yu.isEqual(s.filter,r))})),this}static isEqual(t,r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(const n in t)if(t[n]!==r[n])return!1;return!0}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Oa.close,{},t)}_onError(t){this._on(Oa.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=sn.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=VS(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=VS(t.columns,t.old_record)),r}}const vv=()=>{},Q0={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},jU=[1e3,2e3,5e3,1e4],EU=1e4,CU=`
491  addEventListener("message", (e) => {
492    if (e.data.event === "start") {
493      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
494    }
495  });`;class TU{constructor(t,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Cy,this.transport=null,this.heartbeatIntervalMs=Q0.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=vv,this.ref=0,this.reconnectTimer=null,this.vsn=HS,this.logger=vv,this.conn=null,this.sendBuffer=[],this.serializer=new yU,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=s=>s?(...a)=>s(...a):(...a)=>fetch(...a),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${t}/${Ty.websocket}`,this.httpEndpoint=KA(t),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=hU.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r}
496
497To use Realtime in Node.js, you need to provide a WebSocket implementation:
498
499Option 1: Use Node.js 22+ which has native WebSocket support
500Option 2: Install and provide the "ws" package:
501
502  npm install ws
503
504  import ws from "ws"
505  const client = new RealtimeClient(url, {
506    ...options,
507    transport: ws
508  })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")}
508,typeof this.conn.close=="function"&&(t?this.conn.close(t,r??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,r,n){this.logger(t,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case _o.connecting:return Ll.Connecting;case _o.open:return Ll.Open;case _o.closing:return Ll.Closing;default:return Ll.Closed}}isConnected(){return this.connectionState()===Ll.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(a=>a.topic===n);if(s)return s;{const a=new yu(`realtime:${t}`,r,this);return this.channels.push(a),a}}push(t){const{topic:r,event:n,payload:s,ref:a}=t,o=()=>{this.encode(t,l=>{var c;(c=this.conn)===null||c===void 0||c.send(l)})};this.log("push",`${r} ${n} (${a})`,s),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(gU,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
vendor: 3,886 bytes, line 508
508heduleTimeout()},Q0.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let r=this.channels.find(n=>n.topic===t&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${t}"`),r.unsubscribe())}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply"&&r.ref&&r.ref===this.pendingHeartbeatRef){const u=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error",u)}catch(d){this.log("error","error in heartbeat callback",d)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:n,event:s,payload:a,ref:o}=r,l=o?`(${o})`:"",c=a.status||"";this.log("receive",`${c} ${n} ${s} ${l}`.trim(),a),this.channels.filter(u=>u._isMember(n)).forEach(u=>u._trigger(s,a,o)),this._triggerStateCallbacks("message",r)})}_clearTimer(t){var r;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===_o.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===_o.open||this.conn.readyState===_o.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(r=>{this.log("error","error waiting for auth on connect",r),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(t){var r;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.sc
508heduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(Oa.error))}_appendParams(t,r){if(Object.keys(r).length===0)return t;const n=t.match(/\?/)?"&":"?",s=new URLSearchParams(r);return`${t}${n}${s}`}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([CU],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(t,r=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const a={access_token:r,version:pU};r&&s.updateJoinPayload(a),s.joinedOnce&&s._isJoined()&&s._push(Oa.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_triggerStateCallbacks(t,r){try{this.stateChangeCallbacks[t].forEach(n=>{try{n(r)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new GA(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Q0.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,s,a,o,l,c,u,d,f,h,m;switch(this.transport=(r=t==null?void 0:t.transport)!==null&&r!==void 0?r:null,this.timeout=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:Cy,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:Q0.HEARTBEAT_INTERVAL,this.worker=(a=t==null?void 0:t.worker)!==null&&a!==void 0?a:!1,this.accessToken=(o=t==null?void 0:t.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(l=t==null?void 0:t.heartbeatCallback)!==null&&l!==void 0?l:vv,this.vsn=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:HS,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:g=>jU[g-1]||EU,this.vsn){case VA:this.encode=(d=t==null?void 0:t.encode)!==null&&d!==void 0?d:(g,p)=>p(JSON.stringify(g)),this.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f:(g,p)=>p(JSON.parse(g));break;case xU:this.encode=(h=t==null?void 0:t.encode)!==null&&h!==void 0?h:this.serializer.encode.bind(this.serializer),this.decode=(m=t==null?void 0:t.decode)!==null&&m!==void 0?m:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var lh=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function AU(e,t,r){const n=new URL(t,e);if(r)for(const[s,a]of Object.entries(r))a!==void 0&&n.searchParams.set(s,a);return n.toString()}async function PU(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function RU(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:a,headers:o}){const l=AU(e.baseUrl,n,s),c=await PU(e.auth),u=await t(l,{method:r,headers:{...a?{"Content-Type":"application/json"}:{},...c,...o},body:a?JSON.stringify(a):void 0}),d=await u.text(),f=(u.headers.get("content-type")||"").includes("application/json"),h=f&&d?JSON.parse(d):d;if(!u.ok){const m=f?h:void 0,g=m==null?void 0:m.error;throw new lh((g==null?void 0:g.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:g==null?void 0:g.type,icebergCode:g==null?void 0:g.code,details:m})}return{status:u.status,headers:u.headers,data:h}}}}function J0(e){return e.join("�")}var OU=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:J0(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${J0(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${J0(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${J0(e.namespace)}`}),!0}catch(t){if(t instanceof lh&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof lh&&r.status===409)return;throw r}}};function Bc(e){return e.join("�")}var DU=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Bc(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Bc(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Bc(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Bc(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Bc(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Bc(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof lh&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof lh&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},IU=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=RU({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new OU(this.client,t),this.tableOps=new DU(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
508async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},Wx=class extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}};function _r(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var FU=class extends Wx{constructor(e,t,r){super(e),this.name="StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},Py=class extends Wx{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}};const Ub=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),MU=()=>Response,Ry=e=>{if(Array.isArray(e))return e.map(r=>Ry(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));t[s]=Ry(n)}),t},LU=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},BU=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function ch(e){"@babel/helpers - typeof";return ch=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ch(e)}function $U(e,t){if(ch(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ch(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UU(e){var t=$U(e,"string");return ch(t)=="symbol"?t:t+""}function WU(e,t,r){return(t=UU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KS(Object(r),!0).forEach(function(n){WU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const yv=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},zU=async(e,t,r)=>{e instanceof await MU()&&!(r!=null&&r.noResolveJson)?e.json().then(n=>{const s=e.status||500,a=(n==null?void 0:n.statusCode)||s+"";t(new FU(yv(n),s,a))}).catch(n=>{t(new Py(yv(n),n))}):t(new Py(yv(e),e))},HU=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!n?s:(LU(n)?(s.headers=at({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,t!=null&&t.duplex&&(s.duplex=t.duplex),at(at({},s),r))};async function r0(e,t,r,n,s,a){return new Promise((o,l)=>{e(r,HU(t,n,s,a)).then(c=>{if(!c.ok)throw c;return n!=null&&n.noResolveJson?c:c.json()}).then(c=>o(c)).catch(c=>zU(c,l,n))})}async function uh(e,t,r,n){return r0(e,"GET",t,r,n)}async function Ta(e,t,r,n,s){return r0(e,"POST",t,n,s,r)}async function Oy(e,t,r,n,s){return r0(e,"PUT",t,n,s,r)}async function VU(e,t,r,n){return r0(e,"HEAD",t,at(at({},r),{},{noResolveJson:!0}),n)}async function Wb(e,t,r,n,s){return r0(e,"DELETE",t,n,s,r)}var GU=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(_r(t))return{data:null,error:t};throw t}}};let YA;YA=Symbol.toStringTag;var qU=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[YA]="BlobDownloadBuilder",this.promise=null}asStream(){return new GU(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(_r(t))return{data:null,error:t};throw t}}};const KU={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},YS={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var YU=class{constructor(e,t={},r,n){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.bucketId=r,this.fetch=Ub(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async uploadOrUpdate(e,t,r,n){var s=this;try{let a;const o=at(at({},YS),n);let l=at(at({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const c=o.metadata;typeof Blob<"u"&&r instanceof Blob?(a=new FormData,a.append("cacheControl",o.cacheControl),c&&a.append("metadata",s.encodeMetadata(c)),a.append("",r)):typeof FormData<"u"&&r instanceof FormData?(a=r,a.has("cacheControl")||a.append("cacheControl",o.cacheControl),c&&!a.has("metadata")&&a.append("metadata",s.encodeMetadata(c))):(a=r,l["cache-control"]=`max-age=${o.cacheControl}`,l["content-type"]=o.contentType,c&&(l["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(typeof ReadableStream<"u"&&a 
508instanceof ReadableStream||a&&typeof a=="object"&&"pipe"in a&&typeof a.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers&&(l=at(at({},l),n.headers));const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),f=await(e=="PUT"?Oy:Ta)(s.fetch,`${s.url}/object/${d}`,a,at({headers:l},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:u,id:f.Id,fullPath:f.Key},error:null}}catch(a){if(s.shouldThrowOnError)throw a;if(_r(a))return{data:null,error:a};throw a}}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const a=s._removeEmptyFolders(e),o=s._getFinalPath(a),l=new URL(s.url+`/object/upload/sign/${o}`);l.searchParams.set("token",t);try{let c;const u=at({upsert:YS.upsert},n),d=at(at({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.append("cacheControl",u.cacheControl)):(c=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType),{data:{path:a,fullPath:(await Oy(s.fetch,l.toString(),c,{headers:d})).Key},error:null}}catch(c){if(s.shouldThrowOnError)throw c;if(_r(c))return{data:null,error:c};throw c}}async createSignedUploadUrl(e,t){var r=this;try{let n=r._getFinalPath(e);const s=at({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const a=await Ta(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),o=new URL(r.url+a.url),l=o.searchParams.get("token");if(!l)throw new Wx("No token returned by API");return{data:{signedUrl:o.toString(),path:e,token:l},error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(_r(n))return{data:null,error:n};throw n}}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;try{return{data:await Ta(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
508stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(_r(s))return{data:null,error:s};throw s}}async copy(e,t,r){var n=this;try{return{data:{path:(await Ta(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key},error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(_r(s))return{data:null,error:s};throw s}}async createSignedUrl(e,t,r){var n=this;try{let s=n._getFinalPath(e),a=await Ta(n.fetch,`${n.url}/object/sign/${s}`,at({expiresIn:t},r!=null&&r.transform?{transform:r.transform}:{}),{headers:n.headers});const o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return a={signedUrl:encodeURI(`${n.url}${a.signedURL}${o}`)},{data:a,error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(_r(s))return{data:null,error:s};throw s}}async createSignedUrls(e,t,r){var n=this;try{const s=await Ta(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(o=>at(at({},o),{},{signedUrl:o.signedURL?encodeURI(`${n.url}${o.signedURL}${a}`):null})),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(_r(s))return{data:null,error:s};throw s}}download(e,t){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",n=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),s=n?`?${n}`:"",a=this._getFinalPath(e),o=()=>uh(this.fetch,`${this.url}/${r}/${a}${s}`,{headers:this.headers,noResolveJson:!0});return new qU(o,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);try{return{data:Ry(await uh(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(_r(n))return{data:null,error:n};throw n}}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await VU(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(_r(n)&&n instanceof Py){const s=n.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:n}}throw n}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&n.push(s);const a=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",o=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});o!==""&&n.push(o);let l=n.join("&");return l!==""&&(l=`?${l}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}${l}`)}}}async remove(e){var t=this;try{return{data:await Wb(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(_r(r))return{data:null,error:r};throw r}}async list(e,t,r){var n=this;try{const s=at(at(at({},KU),t),{},{prefix:e||""});return{data:await Ta(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(_r(s))return{data:null,error:s};throw s}}async listV2(e,t){var r=this;try{const n=at({},e);return{data:await Ta(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(_r(n))return{data:null,error:n};throw n}}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const XA="2.90.1",QA={"X-Client-Info":`storage-js/${XA}`};var XU=class{constructor(e,t={},r,n){this.shouldThrowOnError=!1;const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase.")),this.url=s.href.replace(/\/$/,""),this.headers=at(at({},QA),t),this.fetch=Ub(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async listBuckets(e){var t=this;try{const r=t.listBucketOptionsToQueryString(e);return{data:await uh(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(_r(r))return{data:null,error:r};throw r}}async getBucket(e){var t=this;try{return{data:await uh(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(_r(r))return{data:null,error:r};throw r}}async createBucket(e,t={public:!1}){var r=this;try{return{data:await Ta(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(_r(n))return{data:null,error:n};throw n}}async updateBucket(e,t){var r=this;try{return{data:await Oy(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(_r(n))return{data:null,error:n};throw n}}async emptyBucket(e){var t=this;try{return{data:await Ta(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(_r(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await Wb(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(_r(r))return{data:null,error:r};throw r}}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},QU=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=at(at({},QA),t),this.fetch=Ub(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await Ta(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(_r(r))return{data:null,error:r};throw r}}async listBuckets(e){var t=this;
508try{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return{data:await uh(t.fetch,s,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(_r(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await Wb(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(_r(r))return{data:null,error:r};throw r}}from(e){var t=this;if(!BU(e))throw new Wx("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new IU({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,a){const o=s[a];return typeof o!="function"?o:async(...l)=>{try{return{data:await o.apply(s,l),error:null}}catch(c){if(n)throw c;return{data:null,error:c}}}}})}};const zb={"X-Client-Info":`storage-js/${XA}`,"Content-Type":"application/json"};var JA=class extends Error{constructor(e){super(e),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}};function Ds(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}var wv=class extends JA{constructor(e,t,r){super(e),this.name="StorageVectorsApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},JU=class extends JA{constructor(e,t){super(e),this.name="StorageVectorsUnknownError",this.originalError=t}};const Hb=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),ZU=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},XS=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),eW=async(e,t,r)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(r!=null&&r.noResolveJson)){const n=e.status||500,s=e;if(typeof s.json=="function")s.json().then(a=>{const o=(a==null?void 0:a.statusCode)||(a==null?void 0:a.code)||n+"";t(new wv(XS(a),n,o))}).catch(()=>{const a=n+"";t(new wv(s.statusText||`HTTP ${n} error`,n,a))});else{const a=n+"";t(new wv(s.statusText||`HTTP ${n} error`,n,a))}}else t(new JU(XS(e),e))},tW=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return n?(ZU(n)?(s.headers=at({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,at(at({},s),r)):s};async function rW(e,t,r,n,s,a){return new Promise((o,l)=>{e(r,tW(t,n,s,a)).then(c=>{if(!c.ok)throw c;if(n!=null&&n.noResolveJson)return c;const u=c.headers.get("content-type");return!u||!u.includes("application/json")?{}:c.json()}).then(c=>o(c)).catch(c=>eW(c,l,n))})}async function Is(e,t,r,n,s){return rW(e,"POST",t,n,s,r)}var nW=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=at(at({},zb),t),this.fetch=Hb(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createIndex(e){var t=this;try{return{data:await Is(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ds(r))return{data:null,error:r};throw r}}async getIndex(e,t){var r=this;try{return{data:await Is(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(Ds(n))return{data:null,error:n};throw n}}async listIndexes(e){var t=this;try{return{data:await Is(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ds(r))return{data:null,error:r};throw r}}async deleteIndex(e,t){var r=this;try{return{data:await Is(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{},error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(Ds(n))return{data:null,error:n};throw n}}},sW=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=at(at({},zb),t),this.fetch=Hb(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async putVectors(e){var t=this;try{if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:await Is(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ds(r))return{data:null,error:r};throw r}}async getVectors(e){var t=this;try{return{data:await Is(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ds(r))return{data:null,error:r};throw r}}async listVectors(e){var t=this;try{if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
508if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return{data:await Is(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ds(r))return{data:null,error:r};throw r}}async queryVectors(e){var t=this;try{return{data:await Is(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ds(r))return{data:null,error:r};throw r}}async deleteVectors(e){var t=this;try{if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:await Is(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ds(r))return{data:null,error:r};throw r}}},aW=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=at(at({},zb),t),this.fetch=Hb(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await Is(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ds(r))return{data:null,error:r};throw r}}async getBucket(e){var t=this;try{return{data:await Is(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ds(r))return{data:null,error:r};throw r}}async listBuckets(e={}){var t=this;try{return{data:await Is(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ds(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await Is(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ds(r))return{data:null,error:r};throw r}}},iW=class extends aW{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new oW(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},oW=class extends nW{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,at(at({},e),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,at(at({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new lW(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},lW=class extends sW{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,at(at({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,at(at({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,at(at({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,at(at({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,at(at({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},cW=class extends XU{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new YU(this.url,this.headers,e,this.fetch)}get vectors(){return new iW(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new QU(this.url+"/iceberg",this.headers,this.fetch)}};const ZA="2.90.1",eu=30*1e3,Dy=3,bv=Dy*eu,uW="http://localhost:9999",dW="supabase.auth.token",fW={"X-Client-Info":`gotrue-js/${ZA}`},Iy="X-Supabase-Api-Version",e3={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},hW=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,mW=10*60*1e3;
508class dh extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function Ze(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class pW extends dh{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function xW(e){return Ze(e)&&e.name==="AuthApiError"}class Bl extends dh{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class ao extends dh{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class Ts extends ao{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function gW(e){return Ze(e)&&e.name==="AuthSessionMissingError"}class $c extends ao{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Z0 extends ao{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class em extends ao{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function vW(e){return Ze(e)&&e.name==="AuthImplicitGrantRedirectError"}class QS extends ao{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class yW extends ao{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Fy extends ao{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function _v(e){return Ze(e)&&e.name==="AuthRetryableFetchError"}class JS extends ao{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class My extends ao{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Sp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),ZS=` 	
509\r=`.split(""),wW=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<ZS.length;t+=1)e[ZS[t].charCodeAt(0)]=-2;for(let t=0;t<Sp.length;t+=1)e[Sp[t].charCodeAt(0)]=t;return e})();function ek(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Sp[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Sp[n]),t.queuedBits-=6}}function t3(e,t,r){const n=wW[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function tk(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},a=o=>{NW(o,n,r)};for(let o=0;o<e.length;o+=1)t3(e.charCodeAt(o),s,a);return t.join("")}function bW(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function _W(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}bW(n,t)}}function NW(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function Tu(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;
509s+=1)t3(e.charCodeAt(s),r,n);return new Uint8Array(t)}function SW(e){const t=[];return _W(e,r=>t.push(r)),new Uint8Array(t)}function Vl(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>ek(s,r,n)),ek(null,r,n),t.join("")}function kW(e){return Math.round(Date.now()/1e3)+e}function jW(){return Symbol("auth-callback")}const _n=()=>typeof window<"u"&&typeof document<"u",Al={tested:!1,writable:!1},r3=()=>{if(!_n())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Al.tested)return Al.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Al.tested=!0,Al.writable=!0}catch{Al.tested=!0,Al.writable=!1}return Al.writable};function EW(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,a)=>{t[a]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const n3=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),CW=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",tu=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Pl=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},bn=async(e,t)=>{await e.removeItem(t)};class zx{constructor(){this.promise=new zx.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}zx.promiseConstructor=Promise;function Nv(e){const t=e.split(".");if(t.length!==3)throw new My("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!hW.test(t[n]))throw new My("JWT not in base64url format");return{header:JSON.parse(tk(t[0])),payload:JSON.parse(tk(t[1])),signature:Tu(t[2]),raw:{header:t[0],payload:t[1]}}}async function TW(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function AW(e,t){return new Promise((n,s)=>{(async()=>{for(let a=0;a<1/0;a++)try{const o=await e(a);if(!t(a,null,o)){n(o);return}}catch(o){if(!t(a,o)){s(o);return}}})()})}function PW(e){return("0"+e.toString(16)).substr(-2)}function RW(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let a=0;a<56;a++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,PW).join("")}async function OW(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(a=>String.fromCharCode(a)).join("")}async function DW(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await OW(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Uc(e,t,r=!1){const n=RW();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await tu(e,`${t}-code-verifier`,s);const a=await DW(n);return[a,n===a?"plain":"s256"]}const IW=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function FW(e){const t=e.headers.get(Iy);if(!t||!t.match(IW))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function MW(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function LW(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const BW=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Wc(e){if(!BW.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Sv(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function $W(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
509if(typeof n=="symbol"){const a=n.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)"||a==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function rk(e){return JSON.parse(JSON.stringify(e))}const Fl=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),UW=[502,503,504];async function nk(e){var t;if(!CW(e))throw new Fy(Fl(e),0);if(UW.includes(e.status))throw new Fy(Fl(e),e.status);let r;try{r=await e.json()}catch(a){throw new Bl(Fl(a),a)}let n;const s=FW(e);if(s&&s.getTime()>=e3["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new JS(Fl(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Ts}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((a,o)=>a&&typeof o=="string",!0))throw new JS(Fl(r),e.status,r.weak_password.reasons);throw new pW(Fl(r),e.status||500,n)}const WW=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function st(e,t,r,n){var s;const a=Object.assign({},n==null?void 0:n.headers);a[Iy]||(a[Iy]=e3["2024-01-01"].name),n!=null&&n.jwt&&(a.Authorization=`Bearer ${n.jwt}`);const o=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const l=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",c=await zW(e,t,r+l,{headers:a,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(c):{data:Object.assign({},c),error:null}}async function zW(e,t,r,n,s,a){const o=WW(t,n,s,a);let l;try{l=await e(r,Object.assign({},o))}catch(c){throw console.error(c),new Fy(Fl(c),0)}if(l.ok||await nk(l),n!=null&&n.noResolveJson)return l;try{return await l.json()}catch(c){await nk(c)}}function ka(e){var t;let r=null;GW(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=kW(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function sk(e){const t=ka(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Eo(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function HW(e){return{data:e,error:null}}function VW(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:a}=e,o=jd(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:a},c=Object.assign({},o);return{data:{properties:l,user:c},error:null}}function ak(e){return e}function GW(e){return e.access_token&&e.refresh_token&&e.expires_in}const kv=["global","local","others"];class qW{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=n3(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,r=kv[0]){if(kv.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${kv.join(", ")}`);try{return await st(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(Ze(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await st(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Eo})}catch(n){if(Ze(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=jd(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await st(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:VW,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(Ze(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await st(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Eo})}catch(r){if(Ze(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,a,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await st(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:""},xform:ak});if(d.error)throw d.error;const f=await d.json(),h=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,m=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return m.length>0&&(m.forEach(g=>{const p=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(g.split(";")[1].split("=")[1]);u[`${x}Page`]=p}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},f),u),error:null}}catch(u){if(Ze(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){Wc(t);try{return await st(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Eo})}catch(r){if(Ze(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){Wc(t);try{return await st(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Eo})}catch(n){if(Ze(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){Wc(t);
509try{return await st(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Eo})}catch(n){if(Ze(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){Wc(t.userId);try{const{data:r,error:n}=await st(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(Ze(r))return{data:null,error:r};throw r}}async _deleteFactor(t){Wc(t.userId),Wc(t.id);try{return{data:await st(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(Ze(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,a,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await st(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:""},xform:ak});if(d.error)throw d.error;const f=await d.json(),h=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,m=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return m.length>0&&(m.forEach(g=>{const p=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(g.split(";")[1].split("=")[1]);u[`${x}Page`]=p}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},f),u),error:null}}catch(u){if(Ze(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await st(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Ze(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await st(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Ze(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await st(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Ze(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await st(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(Ze(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await st(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Ze(r))return{data:null,error:r};throw r}}}function ik(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const zc={debug:!!(globalThis&&r3()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class s3 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class KW extends s3{}async function YW(e,t,r){zc.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort(),zc.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async s=>{if(s){zc.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await r()}finally{zc.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw zc.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new KW(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(zc.debug)try{const a=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null,"  "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}function XW(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function a3(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}
509" is invalid.`);return e.toLowerCase()}function QW(e){return parseInt(e,16)}function JW(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function ZW(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:a=new Date,nonce:o,notBefore:l,requestId:c,resources:u,scheme:d,uri:f,version:h}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!f)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(h!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${h}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
510`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const m=a3(e.address),g=d?`${d}://${n}`:n,p=e.statement?`${e.statement}
511`:"",x=`${g} wants you to sign in with your Ethereum account:
512${m}
513
514${p}`;let b=`URI: ${f}
515Version: ${h}
516Chain ID: ${r}${o?`
517Nonce: ${o}`:""}
518Issued At: ${a.toISOString()}`;if(s&&(b+=`
519Expiration Time: ${s.toISOString()}`),l&&(b+=`
520Not Before: ${l.toISOString()}`),c&&(b+=`
521Request ID: ${c}`),u){let w=`
522Resources:`;for(const y of u){if(!y||typeof y!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${y}`);w+=`
523- ${y}`}b+=w}return`${x}
524${b}`}class Jr extends Error{constructor({message:t,code:r,cause:n,name:s}){var a;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(a=s??(n instanceof Error?n.name:void 0))!==null&&a!==void 0?a:"Unknown Error",this.code=r}}class kp extends Jr{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function ez({error:e,options:t}){var r,n,s;const{publicKey:a}=t;if(!a)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Jr({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=a.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Jr({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=a.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Jr({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=a.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Jr({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Jr({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Jr({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return a.pubKeyCredParams.filter(l=>l.type==="public-key").length===0?new Jr({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Jr({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(i3(o)){if(a.rp.id!==o)return new Jr({message:`The RP ID "${a.rp.id}
524" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Jr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(a.user.id.byteLength<1||a.user.id.byteLength>64)return new Jr({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Jr({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Jr({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function tz({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Jr({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Jr({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(i3(n)){if(r.rpId!==n)return new Jr({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Jr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Jr({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Jr({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class rz{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const nz=new rz;function sz(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,s=jd(e,["challenge","user","excludeCredentials"]),a=Tu(t).buffer,o=Object.assign(Object.assign({},r),{id:Tu(r.id).buffer}),l=Object.assign(Object.assign({},s),{challenge:a,user:o});if(n&&n.length>0){l.excludeCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const u=n[c];l.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:Tu(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return l}function az(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=jd(e,["challenge","allowCredentials"]),s=Tu(t).buffer,a=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){a.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const l=r[o];a.allowCredentials[o]=Object.assign(Object.assign({},l),{id:Tu(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return a}function iz(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Vl(new Uint8Array(e.response.attestationObject)),clientDataJSON:Vl(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function oz(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Vl(new Uint8Array(s.authenticatorData)),clientDataJSON:Vl(new Uint8Array(s.clientDataJSON)),signature:Vl(new Uint8Array(s.signature)),userHandle:s.userHandle?Vl(ne
524w Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function i3(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function ok(){var e,t;return!!(_n()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function lz(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new kp("Browser returned unexpected credential type",t)}:{data:null,error:new kp("Empty credential response",t)}}catch(t){return{data:null,error:ez({error:t,options:e})}}}async function cz(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new kp("Browser returned unexpected credential type",t)}:{data:null,error:new kp("Empty credential response",t)}}catch(t){return{data:null,error:tz({error:t,options:e})}}}const uz={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},dz={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function jp(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const a in s){const o=s[a];if(o!==void 0)if(Array.isArray(o))n[a]=o;else if(r(o))n[a]=o;else if(t(o)){const l=n[a];t(l)?n[a]=jp(l,o):n[a]=jp(o)}else n[a]=o}return n}function fz(e,t){return jp(uz,e,t||{})}function hz(e,t){return jp(dz,e,t||{})}class mz{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},a){try{const{data:o,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!o)return{data:null,error:l};const c=s??nz.createNewAbortSignal();if(o.webauthn.type==="create"){const{user:u}=o.webauthn.credential_options.publicKey;u.name||(u.name=`${u.id}:${n}`),u.displayName||(u.displayName=u.name)}switch(o.webauthn.type){case"create":{const u=fz(o.webauthn.credential_options.publicKey,a==null?void 0:a.create),{data:d,error:f}=await lz({publicKey:u,signal:c});return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const u=hz(o.webauthn.credential_options.publicKey,a==null?void 0:a.request),{data:d,error:f}=await cz(Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(o){return Ze(o)?{data:null,error:o}:{data:null,error:new Bl("Unexpected error in challenge",o)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},a){if(!r)return{data:null,error:new dh("rpId is required for WebAuthn authentication")};try{if(!ok())return{data:null,error:new Bl("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:a});if(!o)return{data:null,error:l};const{webauthn:c}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:c.type,rpId:r,rpOrigins:n,credential_response:c.credential_response}})}catch(o){return Ze(o)?{data:null,error:o}:{data:null,error:new Bl("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},a){if(!r)return{data:null,error:new dh("rpId is required for WebAuthn registration")};try{if(!ok())return{data:null,error:new Bl("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(d=>{var f;return(f=d.data)===null||f===void 0?void 0:f.all.find(h=>h.factor_type==="webauthn"&&h.friendly_name===t&&h.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:l};const{data:c,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:a});return c?this._verify({factorId:o.id,challengeId:c.challengeId,webauthn:{rpId:r,rpOrigins:n,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(o){return Ze(o)?{data:null,error:o}:{data:null,error:new Bl("Unexpected error in register",o)}}}}XW();const pz={url:uW,storageKey:dW,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:fW,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4};async function lk(e,t,r){return await r()}const Hc={};class fh{get jwks(){var t,r;return(r=(t=Hc[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){Hc[this.storageKey]=Object.assign(Object.assign({},Hc[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=Hc[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Hc[this.storageKey]=Object.assign(Object.assign({},Hc[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const a=Object.assign(Object.assign({},pz),t);if(this.storageKey=a.storageKey,this.instanceID=(r=fh.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,fh.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!a.debug,typeof a.debug=="function"&&(this.logger=a.debug),this.instanceID>0&&_n()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=a.persistSession,this.autoRefreshToken=a.autoRefreshToken,this.admin=new qW({url:a.url,headers:a.headers,fetch:a.fetch}),this.url=a.url,this.headers=a.headers,this.fetch=n3(a.fetch),this.lock=a.lock||lk,this.detectSessionInUrl=a.detectSessionInUrl,this.flowType=a.flowType,this.hasCustomAuthorizationHeader=a.hasCustomAuthorizationHeader,this.throwOnError=a.throwOnError,this.lockAcquireTimeout=a.lockAcquireTimeout,a.lock?this.lock=a.lock:this.persistSession&&_n()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=YW:this.lock=lk,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new mz(this)}
524,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(a.storage?this.storage=a.storage:r3()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=ik(this.memoryStorage)),a.userStorage&&(this.userStorage=a.userStorage)):(this.memoryStorage={},this.storage=ik(this.memoryStorage)),_n()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${ZA}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(_n()&&(r=EW(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),_n()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:a}=await this._getSessionFromURL(r,n);if(a){if(this._debug("#_initialize()","error detecting session from URL",a),vW(a)){const c=(t=a.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:a}}return{error:a}}const{session:o,redirectType:l}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",l),await this._saveSession(o),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return Ze(r)?this._returnResult({error:r}):this._returnResult({error:new Bl("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const a=await st(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:ka}),{data:o,error:l}=a;if(l||!o)return this._returnResult({data:{user:null,session:null},error:l});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(a){if(Ze(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signUp(t){var r,n,s;try{let a;if("email"in t){const{email:d,password:f,options:h}=t;let m=null,g=null;this.flowType==="pkce"&&([m,g]=await Uc(this.storage,this.storageKey)),a=await st(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:d,password:f,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:m,code_challenge_method:g},xform:ka})}else if("phone"in t){const{phone:d,password:f,options:h}=t;a=await st(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:f,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},channel:(s=h==null?void 0:h.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:ka})}else throw new Z0("You must provide either an email or phone number and a password");const{data:o,error:l}=a;if(l||!o)return await bn(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(a){if(await bn(this.storage,`${this.storageKey}-code-verifier`),Ze(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithPassword(t){try{let r;if("email"in t){const{email:a,password:o,options:l}=t;r=await st(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:sk})}else if("phone"in t){const{phone:a,password:o,options:l}=t;r=await st(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:sk})}else throw new Z0("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const a=new $c;return this._returnResult({data:{user:null,session:null},error:a})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(Ze(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,a;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(a=t.o
524ptions)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,a,o,l,c,u,d,f,h;let m,g;if("message"in t)m=t.message,g=t.signature;else{const{chain:p,wallet:x,statement:b,options:w}=t;let y;if(_n())if(typeof x=="object")y=x;else{const j=window;if("ethereum"in j&&typeof j.ethereum=="object"&&"request"in j.ethereum&&typeof j.ethereum.request=="function")y=j.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");y=x}const _=new URL((r=w==null?void 0:w.url)!==null&&r!==void 0?r:window.location.href),N=await y.request({method:"eth_requestAccounts"}).then(j=>j).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!N||N.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=a3(N[0]);let S=(n=w==null?void 0:w.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!S){const j=await y.request({method:"eth_chainId"});S=QW(j)}const E={domain:_.host,address:k,statement:b,uri:_.href,version:"1",chainId:S,nonce:(s=w==null?void 0:w.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(a=w==null?void 0:w.signInWithEthereum)===null||a===void 0?void 0:a.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(l=w==null?void 0:w.signInWithEthereum)===null||l===void 0?void 0:l.expirationTime,notBefore:(c=w==null?void 0:w.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=w==null?void 0:w.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=w==null?void 0:w.signInWithEthereum)===null||d===void 0?void 0:d.resources};m=ZW(E),g=await y.request({method:"personal_sign",params:[JW(m),k]})}try{const{data:p,error:x}=await st(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:m,signature:g},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:ka});if(x)throw x;if(!p||!p.session||!p.user){const b=new $c;return this._returnResult({data:{user:null,session:null},error:b})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:Object.assign({},p),error:x})}catch(p){if(Ze(p))return this._returnResult({data:{user:null,session:null},error:p});throw p}}async signInWithSolana(t){var r,n,s,a,o,l,c,u,d,f,h,m;let g,p;if("message"in t)g=t.message,p=t.signature;else{const{chain:x,wallet:b,statement:w,options:y}=t;let _;if(_n())if(typeof b=="object")_=b;else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))_=k.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof b!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=b}const N=new URL((r=y==null?void 0:y.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in _&&_.signIn){const k=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},y==null?void 0:y.signInWithSolana),{version:"1",domain:N.host,uri:N.href}),w?{statement:w}:null));let S;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")S=k[0];
524else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)S=k;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in S&&"signature"in S&&(typeof S.signedMessage=="string"||S.signedMessage instanceof Uint8Array)&&S.signature instanceof Uint8Array)g=typeof S.signedMessage=="string"?S.signedMessage:new TextDecoder().decode(S.signedMessage),p=S.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");g=[`${N.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...w?["",w,""]:[""],"Version: 1",`URI: ${N.href}`,`Issued At: ${(s=(n=y==null?void 0:y.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((a=y==null?void 0:y.signInWithSolana)===null||a===void 0)&&a.notBefore?[`Not Before: ${y.signInWithSolana.notBefore}`]:[],...!((o=y==null?void 0:y.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${y.signInWithSolana.expirationTime}`]:[],...!((l=y==null?void 0:y.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${y.signInWithSolana.chainId}`]:[],...!((c=y==null?void 0:y.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${y.signInWithSolana.nonce}`]:[],...!((u=y==null?void 0:y.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${y.signInWithSolana.requestId}`]:[],...!((f=(d=y==null?void 0:y.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||f===void 0)&&f.length?["Resources",...y.signInWithSolana.resources.map(S=>`- ${S}`)]:[]].join(`
525`);const k=await _.signMessage(new TextEncoder().encode(g),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");p=k}}try{const{data:x,error:b}=await st(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:g,signature:Vl(p)},!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(m=t.options)===null||m===void 0?void 0:m.captchaToken}}:null),xform:ka});if(b)throw b;if(!x||!x.session||!x.user){const w=new $c;return this._returnResult({data:{user:null,session:null},error:w})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:b})}catch(x){if(Ze(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(t){const r=await Pl(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new yW;const{data:a,error:o}=await st(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:ka});if(await bn(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!a||!a.session||!a.user){const l=new $c;return this._returnResult({data:{user:null,session:null,redirectType:null},error:l})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:Object.assign(Object.assign({},a),{redirectType:s??null}),error:o})}catch(a){if(await bn(this.storage,`${this.storageKey}-code-verifier`),Ze(a))return this._returnResult({data:{user:null,session:null,redirectType:null},error:a});throw a}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:a,nonce:o}=t,l=await st(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:a,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:ka}),{data:c,error:u}=l;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const d=new $c;return this._returnResult({data:{user:null,session:null},error:d})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(r){if(Ze(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,a,o;try{if("email"in t){const{email:l,options:c}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await Uc(this.storage,this.storageKey));const{error:f}=await st(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(r=c==null?void 0:c.data)!==null&&r!==void 0?r:{},create_user:(n=c==null?void 0:c.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:f})}if("phone"in t){const{phone:l,options:c}=t,{data:u,error:d}=await st(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(a=c==null?void 0:c.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(o=c==null?void 0:c.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new Z0("You must provide either an email or phone number.")}catch(l){if(await bn(this.storage,`${this.storageKey}-code-verifier`),Ze(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(t){var r,n;try{let s,a;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,a=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:l}=await st(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:a}}),redirectTo:s,xform:ka});if(l)throw l;if(!o)throw new Error("An error occurred on token verification.");const c=o.session,u=o.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(s){if(Ze(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,a,o;try{let l=null,c=null;this.flowType==="pkce"&&([l,c]=await Uc(this.storage,this.storageKey));const u=await st(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:l,code_challenge_method:c}),headers:this.headers,xform:HW});return!((a=u.data)===null||a===void 0)&&a.url&&_n()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(l){if(await bn(this.storage,`${this.storageKey}-code-verifier`),Ze(l))return this._returnResult({data:null,error:l});throw l}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new Ts;const{error:s}=await st(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(Ze(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:a}=t,{error:o}=await st(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:n,type:s,options:a}=t,{data:o,error:l}=await st(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:l})}throw new Z0("You must provide either an email or phone number and a type")}catch(r){if(Ze(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await Pl(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
525id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<bv:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await Pl(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Sv()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=$W(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:a}=await this._callRefreshToken(t.refresh_token);return a?this._returnResult({data:{session:null},error:a}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await st(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Eo}):await this._useSession(async r=>{var n,s,a;const{data:o,error:l}=r;if(l)throw l;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Ts}:await st(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&a!==void 0?a:void 0,xform:Eo})})}catch(r){if(Ze(r))return gW(r)&&(await this._removeSession(),await bn(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:a}=n;if(a)throw a;if(!s.session)throw new Ts;const o=s.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c]=await Uc(this.storage,this.storageKey));const{data:u,error:d}=await st(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:o.access_token,xform:Eo});if(d)throw d;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await bn(this.storage,`${this.storageKey}-code-verifier`),Ze(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Ts;const r=Date.now()/1e3;let n=r,s=!0,a=null;const{payload:o}=Nv(t.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:l,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l)return{data:{user:null,session:null},error:null};a=l}else{const{data:l,error:c}=await this._getUser(t.access_token);if(c)throw c;a={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return this._returnResult({data:{user:a.user,session:a},error:null})}catch(r){if(Ze(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:o,error:l}=r;if(l)throw l;t=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new Ts;const{data:s,error:a}=await this._callRefreshToken(t.refresh_token);return a?this._returnResult({data:{user:null,session:null},error:a}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(Ze(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!_n())throw new em("No browser detected.");
525if(t.error||t.error_description||t.error_code)throw new em(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new QS("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new em("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new QS("No code detected.");const{data:w,error:y}=await this._exchangeCodeForSession(t.code);if(y)throw y;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:w.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:a,refresh_token:o,expires_in:l,expires_at:c,token_type:u}=t;if(!a||!l||!o||!u)throw new em("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(l);let h=d+f;c&&(h=parseInt(c));const m=h-d;m*1e3<=eu&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${m}s, should have been closer to ${f}s`);const g=h-f;d-g>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",g,h,d):d-g<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",g,h,d);const{data:p,error:x}=await this._getUser(a);if(x)throw x;const b={provider_token:n,provider_refresh_token:s,access_token:a,expires_in:f,expires_at:h,refresh_token:o,token_type:u,user:p.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:b,redirectType:t.type},error:null})}catch(n){if(Ze(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await Pl(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:a}=r;if(a)return this._returnResult({error:a});const o=(n=s.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:l}=await this.admin.signOut(o,t);if(l&&!(xW(l)&&(l.status===404||l.status===401||l.status===403)))return this._returnResult({error:l})}return t!=="others"&&(await this._removeSession(),await bn(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=jW(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:a},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",a)),this._debug("INITIAL_SESSION","callback id",t,"session",a)}catch(a){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",a),console.error(a)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Uc(this.storage,this.storageKey,!0));try{return await st(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(a){if(await bn(this.storage,`${this.storageKey}-code-verifier`),Ze(a))return this._returnResult({data:null,error:a});throw a}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(Ze(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async a=>{var o,l,c,u,d;const{data:f,error:h}=a;if(h)throw h;const m=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await st(this.fetch,"GET",m,{headers:this.headers,jwt:(d=(u=f.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return _n()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(Ze(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:a}}=r;if(s)throw s;const{options:o,provider:l,token:c,access_token:u,nonce:d}=t,f=await st(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=a==null?void 0:a.access_token)!==null&&n!==void 0?n:void 0,body:{provider:l,id_token:c,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:ka}),{data:h,error:m}=f;return m?this._returnResult({data:{user:null,session:null},error:m}):!h||!h.session||!h.user?this._returnResult({data:{user:null,session:null},error:new $c}):(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:m}))}catch(s){if(await bn(this.storage,`${this.storageKey}-code-verifier`),Ze(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:a,error:o}=r;if(o)throw o;
525return await st(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=a.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(Ze(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await AW(async s=>(s>0&&await TW(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await st(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:ka})),(s,a)=>{const o=200*Math.pow(2,s);return a&&_v(a)&&Date.now()+o-n<eu})}catch(n){if(this._debug(r,"error",n),Ze(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),_n()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await Pl(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Pl(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await tu(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Sv()}else if(s&&!s.user&&!s.user){const o=await Pl(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await bn(this.storage,this.storageKey+"-user"),await tu(this.storage,this.storageKey,s)):s.user=Sv()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const a=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<bv;if(this._debug(n,`session has${a?"":" not"} expired with margin of ${bv}s`),a){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),_v(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:l}=await this._getUser(s.access_token);!l&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new Ts;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new zx;const{data:a,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!a.session)throw new Ts;await this._saveSession(a.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",a.session);const l={data:a.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(a){if(this._debug(s,"error",a),Ze(a)){const o={data:null,error:a};return _v(a)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(a),a}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const a=[],o=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,r)}catch(c){a.push(c)}});if(await Promise.all(o),a.length>0){for(let l=0;l<a.length;l+=1)console.error(a[l]);throw a[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await bn(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await tu(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const a=rk(s);await tu(this.storage,this.storageKey,a)}else{const s=rk(r);await tu(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await bn(this.storage,this.storageKey),await bn(this.storage,this.storageKey+"-code-verifier"),await bn(this.storage,this.storageKey+"-user"),this.userStorage&&await bn(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&_n()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
525catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),eu);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/eu);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${eu}ms, refresh threshold is ${Dy} ticks`),s<=Dy&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof s3)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!_n()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[a,o]=await Uc(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(l.toString())}if(n!=null&&n.queryParams){const a=new URLSearchParams(n.queryParams);s.push(a.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:a}=r;return a?this._returnResult({data:null,error:a}):await st(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(Ze(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:a,error:o}=r;if(o)return this._returnResult({data:null,error:o});const l=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=await st(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&c.type==="totp"&&(!((s=c==null?void 0:c.totp)===null||s===void 0)&&s.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(r){if(Ze(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:a}=r;if(a)return this._returnResult({data:null,error:a});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?iz(t.webauthn.credential_response):oz(t.webauthn.credential_response)})}:{code:t.code}),{data:l,error:c}=await st(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:c}))})}catch(r){if(Ze(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:a}=r;if(a)return this._returnResult({data:null,error:a});const o=await st(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:l}=o;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:sz(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:az(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(Ze(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const a of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(a),a.status==="verified"&&s[a.factor_type].push(a);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(){var t,r;const{data:{session:n},error:s}
525=await this.getSession();if(s)return this._returnResult({data:null,error:s});if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:a}=Nv(n.access_token);let o=null;a.aal&&(o=a.aal);let l=o;((r=(t=n.user.factors)===null||t===void 0?void 0:t.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const u=a.amr||[];return{data:{currentLevel:o,nextLevel:l,currentAuthenticationMethods:u},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await st(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:a=>({data:a,error:null})}):this._returnResult({data:null,error:new Ts})})}catch(r){if(Ze(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new Ts});const o=await st(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&_n()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(Ze(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new Ts});const o=await st(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&_n()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(Ze(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await st(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Ts})})}catch(t){if(Ze(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await st(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Ts})})}catch(r){if(Ze(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(l=>l.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(l=>l.kid===t),n&&this.jwks_cached_at+mW>s)return n;const{data:a,error:o}=await st(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!a.keys||a.keys.length===0||(this.jwks=a,this.jwks_cached_at=s,n=a.keys.find(l=>l.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:m,error:g}
525=await this.getSession();if(g||!m.session)return this._returnResult({data:null,error:g});n=m.session.access_token}const{header:s,payload:a,signature:o,raw:{header:l,payload:c}}=Nv(n);r!=null&&r.allowExpired||MW(a.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:m}=await this.getUser(n);if(m)throw m;return{data:{claims:a,header:s,signature:o},error:null}}const d=LW(s.alg),f=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,f,o,SW(`${l}.${c}`)))throw new My("Invalid JWT signature");return{data:{claims:a,header:s,signature:o},error:null}}catch(n){if(Ze(n))return this._returnResult({data:null,error:n});throw n}}}fh.nextInstanceID={};const xz=fh,gz="2.90.1";let sf="";typeof Deno<"u"?sf="deno":typeof document<"u"?sf="web":typeof navigator<"u"&&navigator.product==="ReactNative"?sf="react-native":sf="node";const vz={"X-Client-Info":`supabase-js-${sf}/${gz}`},yz={headers:vz},wz={schema:"public"},bz={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},_z={};function hh(e){"@babel/helpers - typeof";return hh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hh(e)}function Nz(e,t){if(hh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(hh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sz(e){var t=Nz(e,"string");return hh(t)=="symbol"?t:t+""}function kz(e,t,r){return(t=Sz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ck(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Rr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ck(Object(r),!0).forEach(function(n){kz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ck(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const jz=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Ez=()=>Headers,Cz=(e,t,r)=>{const n=jz(r),s=Ez();return async(a,o)=>{var l;const c=(l=await t())!==null&&l!==void 0?l:e;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),n(a,Rr(Rr({},o),{},{headers:u}))}};function Tz(e){return e.endsWith("/")?e:e+"/"}function Az(e,t){var r,n;const{db:s,auth:a,realtime:o,global:l}=e,{db:c,auth:u,realtime:d,global:f}=t,h={db:Rr(Rr({},c),s),auth:Rr(Rr({},u),a),realtime:Rr(Rr({},d),o),storage:{},global:Rr(Rr(Rr({},f),l),{},{headers:Rr(Rr({},(r=f==null?void 0:f.headers)!==null&&r!==void 0?r:{}),(n=l==null?void 0:l.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?h.accessToken=e.accessToken:delete h.accessToken,h}function Pz(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(Tz(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var Rz=class extends xz{constructor(e){super(e)}},Oz=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const a=Pz(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const o=`sb-${a.hostname.split(".")[0]}-auth-token`,l={db:wz,realtime:_z,auth:Rr(Rr({},bz),{},{storageKey:o}),global:yz},c=Az(r??{},l);if(this.storageKey=(n=c.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=c.global.headers)!==null&&s!==void 0?s:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(d,f)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(f)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=c.auth)!==null&&u!==void 0?u:{},this.headers,c.global.fetch)}this.fetch=Cz(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Rr({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.accessToken&&this.accessToken().then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new fU(new URL("rest/v1",a).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this.storage=new cW(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new oU(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}
525channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:a,flowType:o,lock:l,debug:c,throwOnError:u},d,f){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Rz({url:this.authUrl.href,headers:Rr(Rr({},h),d),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:l,debug:c,throwOnError:u,fetch:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(m=>m.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new TU(this.realtimeUrl.href,Rr(Rr({},e),{},{params:Rr(Rr({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const Dz=(e,t,r)=>new Oz(e,t,r);function Iz(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}Iz()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function Fz(){var x,b;if(typeof window>"u")return;const e=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(w=>e===w||e.endsWith("."+w)),n="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=r?((x=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+n+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:x[1])??((b=e.match(new RegExp("^("+n+")(?=[.-])","i")))==null?void 0:b[1]):void 0,a=window.parent&&window.parent!==window;if(!s||!a)return localStorage;const o=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),l=o?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,c=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),u=c&&l.test(c)?[c]:o?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],d="lovable-preview-auth:result",f=2e3,h=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),m=(w,y,_)=>new Promise(N=>{const k=h();let S=!1,E;const j=P=>{S||(S=!0,clearTimeout(E),window.removeEventListener("message",T),N(P))},T=P=>{if(u.indexOf(P.origin)<0)return;const D=P.data;D&&D.type===d&&D.requestId===k&&j(D)};window.addEventListener("message",T);const R={type:w,requestId:k,projectId:s,key:y};_!==void 0&&(R.value=_);for(const P of u)window.parent.postMessage(R,P);E=setTimeout(()=>j(null),f)}
525);let g=!0;const p=250;return{getItem:async w=>{let y=await m("lovable-preview-auth:get",w);return!y&&g&&(await new Promise(_=>setTimeout(_,p)),y=await m("lovable-preview-auth:get",w)),g=!1,y&&y.ok&&typeof y.value=="string"?y.value===""?(localStorage.removeItem(w),null):y.value:localStorage.getItem(w)},setItem:(w,y)=>(localStorage.setItem(w,y),m("lovable-preview-auth:set",w,y).then(()=>{})),removeItem:w=>(localStorage.removeItem(w),m("lovable-preview-auth:remove",w).then(()=>{}))}}const Mz="https://bjohfezlhpohauqjxmzu.supabase.co",Lz="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJqb2hmZXpsaHBvaGF1cWp4bXp1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njg4MjA1NTgsImV4cCI6MjA4NDM5NjU1OH0.DV7gdWZ3Q5HIMMvhxfI4slXbUnO2UKU4vRS278fSe5U",de=Dz(Mz,Lz,{auth:{storage:Fz(),persistSession:!0,autoRefreshToken:!0}}),o3=v.createContext(void 0);function Bz({children:e}){const[t,r]=v.useState([]),[n,s]=v.useState(!0),a=t.filter(d=>d.status==="active");v.useEffect(()=>{const{data:{subscription:d}}=de.auth.onAuthStateChange((f,h)=>{h?o():(r([]),s(!1))});return de.auth.getSession().then(({data:{session:f}})=>{f?o():s(!1)}),()=>d.unsubscribe()},[]);const o=async()=>{try{const{data:d,error:f}=await de.from("courses").select("*").order("created_at",{ascending:!1});if(f)throw f;const h=(d||[]).map(m=>({id:m.id,name:m.name,type:m.type,status:m.status,crm_id:m.crm_id||void 0}));r(h)}catch(d){console.error("Error fetching courses:",d)}finally{s(!1)}},l=async d=>{try{const f={name:d.name,type:d.type,status:"active"};d.crm_id&&(f.crm_id=d.crm_id);const{data:h,error:m}=await de.from("courses").insert(f).select().single();if(m)throw m;const g={id:h.id,name:h.name,type:h.type,status:h.status,crm_id:h.crm_id||void 0};r(p=>[g,...p])}catch(f){throw console.error("Error adding course:",f),f}},c=async(d,f)=>{try{const{error:h}=await de.from("courses").update({status:f}).eq("id",d);if(h)throw h;r(m=>m.map(g=>g.id===d?{...g,status:f}:g))}catch(h){throw console.error("Error updating course status:",h),h}},u=async(d,f)=>{try{const{error:h}=await de.from("courses").update({crm_id:f}).eq("id",d);if(h)throw h;r(m=>m.map(g=>g.id===d?{...g,crm_id:f||void 0}:g))}catch(h){throw console.error("Error updating course CRM ID:",h),h}};return i.jsx(o3.Provider,{value:{courses:t,activeCourses:a,addCourse:l,updateCourseStatus:c,updateCourseCrmId:u,isLoading:n},children:e})}function xl(){const e=v.useContext(o3);if(!e)throw new Error("useCourses must be used within a CoursesProvider");return e}const l3=v.createContext(void 0);function $z({children:e}){const[t,r]=v.useState([]),[n,s]=v.useState(!0),a=g=>g.replace(/[-\s]/g,""),o=async()=>{try{let g=[],p=0;const x=1e3;let b=!0;for(;b;){const{data:_,error:N}=await de.from("students").select("*").order("created_at",{ascending:!1}).range(p,p+x-1);if(N){console.error("Error fetching students:",N);return}g=[...g,..._||[]],b=((_==null?void 0:_.length)||0)===x,p+=x}const y=(g||[]).map(_=>({id:_.id,name:_.name,idNumber:_.id_number,phone:_.phone,email:_.email||void 0,status:_.status,courses:_.courses||[],credits:_.credits||0,joinDate:new Date(_.join_date).toLocaleDateString("he-IL")}));r(y)}catch(g){console.error("Error in fetchStudents:",g)}finally{s(!1)}};v.useEffect(()=>{const{data:{subscription:g}}=de.auth.onAuthStateChange((p,x)=>{x?o():(r([]),s(!1))});return de.auth.getSession().then(({data:{session:p}})=>{p?o():s(!1)}),()=>g.unsubscribe()},[]);const l=async()=>{await o()},c=g=>t.find(p=>p.idNumber===g),u=g=>{const p=a(g);return t.find(x=>a(x.phone)===p)},d=async g=>{if(c(g.idNumber))return{success:!1,error:"duplicate_id"};if(u(g.phone))return{success:!1,error:"duplicate_phone"};try{const{data:p,error:x}=await de.from("students").insert({name:g.name,id_number:g.idNumber,phone:a(g.phone),email:g.email||null,courses:g.courses,status:"active",credits:0}).select().single();if(x){if(console.error("Error adding student:",x),x.code==="23505"){if(x.message.includes("id_number"))return{success:!1,error:"duplicate_id"};if(x.message.includes("phone"))return{success:!1,error:"duplicate_phone"}}return K.error("שגיאה בהוספת התלמיד"),{success:!1}}const b={id:p.id,name:p.name,idNumber:p.id_number,phone:p.phone,email:p.email||void 0,status:p.status,courses:p.courses||[],credits:p.credits||0,joinDate:new Date(p.join_date).toLocaleDateString("he-IL")};return r(w=>[b,...w]),{success:!0}}catch(p){return console.error("Error in addStudent:",p),K.error("שגיאה בהוספת התלמיד"),{success:!1}}},f=async(g,p)=>{try{const{error:x}=await de.from("students").update({status:p}).eq("id",g);if(x){console.error("Error updating student status:",x),K.error("שגיאה בעדכון סטטוס התלמיד");return}r(b=>b.map(w=>w.id===g?{...w,status:p}:w))}catch(x){console.error("Error in updateStudentStatus:",x),K.error("שגיאה בעדכון סטטוס התלמיד")}},h=async(g,p)=>{try{const{error:x}=await de.from("students").update({courses:p}).eq("id",g);if(x){console.error("Error updating student courses:",x),K.error("שגיאה בעדכון קורסים");return}r(b=>b.map(w=>w.id===g?{...w,courses:p}:w))}catch(x){console.error("Error in updateStudentCourses:",x),K.error("שגיאה בעדכון קורסים")}},m=async(g,p)=>{try{if(p.idNumber!==void 0&&t.find(y=>y.idNumber===p.idNumber&&y.id!==g))return{success:!1,error:"duplicate_id"};if(p.phone!==void 0){const w=a(p.phone);if(t.find(_=>a(_.phone)===w&&_.id!==g))return{success:!1,error:"duplicate_phone"}}const x={};p.name!==void 0&&(x.name=p.name),p.phone!==void 0&&(x.phone=a(p.phone)),p.email!==void 0&&(x.email=p.email||null),p.idNumber!==void 0&&(x.id_number=p.idNumber);const{error:b}=await de.from("students").update(x).eq("id",g);if(b){if(console.error("Error updating student details:",b),b.code==="23505"){if(b.message.includes("id_number"))return{success:!1,error:"duplicate_id"};if(b.message.includes("phone"))return{success:!1,error:"duplicate_phone"}}return K.error("שגיאה בעדכון פרטי התלמיד"),{success:!1}}return r(w=>w.map(y=>y.id===g?{...y,...p.name!==void 0&&{name:p.name},...p.phone!==void 0&&{phone:a(p.phone)},...p.email!==void 0&&{email:p.email||void 0},...p.idNumber!==void 0&&{idNumber:p.idNumber}}:y)),{success:!0}}catch(x){return console.error("Error in updateStudentDetails:",x),K.error("שגיאה בעדכון פרטי התלמיד"),{success:!1}}};return i.jsx(l3.Provider,{value:{students:t,isLoading:n,addStudent:d,findStudentByIdNumber:c,findStudentByPhone:u,updateStudentStatus:f,updateStudentCourses:h,updateStudentDetails:m,refreshStudents:l},children:e})}function Hx(){const e=v.useContext(l3);if(!e)throw new Error("useStudents must be used within a StudentsProvider");return e}const uk=e=>e==="credit"?hl:wb,dk=e=>e==="credit"?"bg-emerald-100 text-emerald-700":"bg-blue-100 text-blue-700",c3=v.createContext(void 0);function Uz({children:e}){const[t,r]=v.useState([]),[n,s]=v.useState(!0);v.useEffect(()=>{const{data:{subscription:c}}=de.auth.onAuthStateChange((u,d)=>{d?a():(r([]),s(!1))});return de.auth.getSession().then(({data:{session:u}})=>{u?a():s(!1)}),()=>c.unsubscribe()},[]);const a=async()=>{try{const{data:c,error:u}=await de.from("entitlement_types").select(`
526          *,
527          courses (name)
528        `).order("created_at",{ascending:!1});if(u)throw u;const d=(c||[]).map(f=>{var h;return{id:f.id,name:f.name,description:f.description,category:f.category,lessonCount:f.lesson_count||void 0,courseId:f.course_id||void 0,courseName:((h=f.courses)==null?void 0:h.name)||void 0,icon:uk(f.category),color:dk(f.category)}});r(d)}catch(c){console.error("Error fetching entitlement types:",c)}finally{s(!1)}},o=async c=>{var u;try{const{data:d,error:f}=await de.from("entitlement_types").insert({name:c.name,description:c.description,category:c.category,lesson_count:c.lessonCount||null,course_id:c.courseId||null}).select(`
529          *,
530          courses (name)
531        `).single();if(f)throw f;const h={id:d.id,name:d.name,description:d.description,category:d.category,lessonCount:d.lesson_count||void 0,courseId:d.c
531ourse_id||void 0,courseName:((u=d.courses)==null?void 0:u.name)||c.courseName,icon:uk(d.category),color:dk(d.category)};r(m=>[h,...m])}catch(d){throw console.error("Error adding entitlement type:",d),d}},l=async c=>{try{const{error:u}=await de.from("entitlement_types").delete().eq("id",c);if(u)throw u;r(d=>d.filter(f=>f.id!==c))}catch(u){throw console.error("Error deleting entitlement type:",u),u}};return i.jsx(c3.Provider,{value:{entitlementTypes:t,addEntitlementType:o,deleteEntitlementType:l,isLoading:n},children:e})}function u3(){const e=v.useContext(c3);if(!e)throw new Error("useEntitlementTypes must be used within a EntitlementTypesProvider");return e}const d3=v.createContext(void 0);function Wz({children:e}){const[t,r]=v.useState([]),[n,s]=v.useState(!0),a=t.filter(g=>g.status==="active");v.useEffect(()=>{const{data:{subscription:g}}=de.auth.onAuthStateChange((p,x)=>{x?o():(r([]),s(!1))});return de.auth.getSession().then(({data:{session:p}})=>{p?o():s(!1)}),()=>g.unsubscribe()},[]);const o=async()=>{try{const{data:g,error:p}=await de.from("lessons").select(`
532          *,
533          courses (name)
534        `).order("order_index",{ascending:!0});if(p)throw p;const x=(g||[]).map(b=>{var w;return{id:b.id,title:b.title,courseId:b.course_id||"",courseName:((w=b.courses)==null?void 0:w.name)||"",type:b.video_url?"online_recorded":"onsite",status:"active",videoUrl:b.video_url||void 0,duration:b.duration||void 0}});r(x)}catch(g){console.error("Error fetching lessons:",g)}finally{s(!1)}},l=async g=>{var p;try{const{data:x,error:b}=await de.from("lessons").insert({title:g.title,course_id:g.courseId,video_url:g.videoUrl||null,duration:g.duration||null,description:null,order_index:t.length}).select(`
535          *,
536          courses (name)
537        `).single();if(b)throw b;const w={id:x.id,title:x.title,courseId:x.course_id||"",courseName:((p=x.courses)==null?void 0:p.name)||g.courseName,type:x.video_url?"online_recorded":"onsite",status:"active",videoUrl:x.video_url||void 0,duration:x.duration||void 0};r(y=>[...y,w])}catch(x){throw console.error("Error adding lesson:",x),x}},c=(g,p)=>{r(x=>x.map(b=>b.id===g?{...b,status:p}:b))},u=async(g,p)=>{try{const{error:x}=await de.from("lessons").update({title:p}).eq("id",g);if(x)throw x;r(b=>b.map(w=>w.id===g?{...w,title:p}:w))}catch(x){throw console.error("Error updating lesson title:",x),x}},d=async g=>{try{const{error:p}=await de.from("lessons").delete().eq("id",g);if(p)throw p;r(x=>x.filter(b=>b.id!==g))}catch(p){throw console.error("Error deleting lesson:",p),p}},f=async g=>{try{const p=g.map((x,b)=>de.from("lessons").update({order_index:b}).eq("id",x));await Promise.all(p),r(x=>g.map(w=>x.find(y=>y.id===w)).filter(Boolean))}catch(p){throw console.error("Error reordering lessons:",p),p}},h=g=>a.filter(p=>g.includes(p.courseId)),m=g=>a.filter(p=>g.includes(p.courseId)&&p.type==="online_recorded");return i.jsx(d3.Provider,{value:{lessons:t,activeLessons:a,addLesson:l,updateLessonStatus:c,updateLessonTitle:u,deleteLesson:d,reorderLessons:f,getLessonsByCourseIds:h,getOnlineLessonsByCourseIds:m,isLoading:n},children:e})}function f3(){const e=v.useContext(d3);if(!e)throw new Error("useLessons must be used within a LessonsProvider");return e}const h3=v.createContext(void 0);function zz({children:e}){const[t,r]=v.useState([]),[n,s]=v.useState(!0);v.useEffect(()=>{const{data:{subscription:d}}=de.auth.onAuthStateChange((f,h)=>{h?a():(r([]),s(!1))});return de.auth.getSession().then(({data:{session:f}})=>{f?a():s(!1)}),()=>d.unsubscribe()},[]);const a=async()=>{try{const d=[];let f=0;const h=1e3;let m=!0;for(;m;){const{data:x,error:b}=await de.from("wallet_transactions").select(`
538            *,
539            students (name)
540          `).order("created_at",{ascending:!1}).range(f,f+h-1);if(b)throw b;x&&x.length>0?(d.push(...x),f+=h,m=x.length===h):m=!1}const p=(d||[]).map(x=>{var b;return{id:x.id,studentId:x.student_id,studentName:((b=x.students)==null?void 0:b.name)||"",amount:x.amount,lessonCount:x.lesson_count||void 0,type:x.type,category:x.category,courseName:x.course_name||void 0,entitlementTypeId:x.entitlement_type_id||void 0,entitlementTypeName:x.entitlement_type_name||void 0,date:new Date(x.created_at).toLocaleDateString("he-IL"),expirationDate:x.expiration_date?new Date(x.expiration_date).toLocaleDateString("he-IL"):void 0,balance:x.balance}});r(p)}catch(d){console.error("Error fetching transactions:",d)}finally{s(!1)}},o=async d=>{var f;try{let h=null;const m=d.expirationDate;if(m!=null)if(typeof m=="string"){const b=m.split("/");if(b.length===3){const[w,y,_]=b,N=new Date(parseInt(_),parseInt(y)-1,parseInt(w));isNaN(N.getTime())||(h=N.toISOString())}else{const w=new Date(m);isNaN(w.getTime())||(h=w.toISOString())}}else{const b=m;isNaN(b.getTime())||(h=b.toISOString())}const{data:g,error:p}=await de.from("wallet_transactions").insert({student_id:d.studentId,amount:d.amount,lesson_count:d.lessonCount||null,type:d.type,category:d.category,course_name:d.courseName||null,entitlement_type_id:d.entitlementTypeId||null,entitlement_type_name:d.entitlementTypeName||null,expiration_date:h,balance:d.balance}).select(`
541          *,
542          students (name)
543        `).single();if(p)throw p;const x={id:g.id,studentId:g.student_id,studentName:((f=g.students)==null?void 0:f.name)||d.studentName,amount:g.amount,lessonCount:g.lesson_count||void 0,type:g.type,category:g.category,courseName:g.course_name||void 0,entitlementTypeId:g.entitlement_type_id||void 0,entitlementTypeName:g.entitlement_type_name||void 0,date:new Date(g.created_at).toLocaleDateString("he-IL"),expirationDate:g.expiration_date?new Date(g.expiration_date).toLocaleDateString("he-IL"):void 0,balance:g.balance};r(b=>[x,...b])}catch(h){throw console.error("Error adding transaction:",h),h}},l=async d=>{try{const{error:f}=await de.from("wallet_transactions").delete().eq("id",d);if(f)throw f;r(h=>h.filter(m=>m.id!==d))}catch(f){throw console.error("Error deleting transaction:",f),f}},c=d=>t.filter(f=>f.studentId===d),u=d=>{const f=c(d),h=f.filter(g=>g.category==="credit").reduce((g,p)=>p.type==="credit"?g+p.amount:g-p.amount,0),m=f.filter(g=>g.category==="online_view").reduce((g,p)=>p.type==="credit"?g+(p.lessonCount||0):g-(p.lessonCount||0),0);return{moneyCredit:h,onlineViewLessons:m}};return i.jsx(h3.Provider,{value:{transactions:t,addTransaction:o,deleteTransaction:l,getTransactionsByStudentId:c,get
543StudentBalances:u,refreshTransactions:a,isLoading:n},children:e})}function m3(){const e=v.useContext(h3);if(e===void 0)throw new Error("useWallet must be used within a WalletProvider");return e}const p3=v.createContext(void 0);function Hz({children:e}){const[t,r]=v.useState(null),[n,s]=v.useState(null),[a,o]=v.useState(null),[l,c]=v.useState(null),[u,d]=v.useState(!0),f=async b=>{try{const{data:w}=await de.from("profiles").select("*").eq("user_id",b).maybeSingle();o(w??null);const{data:y}=await de.from("user_roles").select("role").eq("user_id",b).maybeSingle();c((y==null?void 0:y.role)??null)}catch(w){console.error("Error fetching user data:",w),o(null),c(null)}};v.useEffect(()=>{const{data:{subscription:b}}=de.auth.onAuthStateChange((w,y)=>{d(!0),s(y),r((y==null?void 0:y.user)??null),y!=null&&y.user?setTimeout(()=>{f(y.user.id).finally(()=>d(!1))},0):(o(null),c(null),d(!1))});return d(!0),de.auth.getSession().then(({data:{session:w}})=>{if(s(w),r((w==null?void 0:w.user)??null),w!=null&&w.user)return f(w.user.id)}).finally(()=>d(!1)),()=>b.unsubscribe()},[]);const h=async(b,w)=>{const{error:y}=await de.auth.signInWithPassword({email:b,password:w});return{error:y}},m=async()=>{await de.auth.signOut(),r(null),s(null),o(null),c(null)},g=l==="admin",p=l==="coordinator",x=l==="photographer";return i.jsx(p3.Provider,{value:{user:t,session:n,profile:a,role:l,isLoading:u,isAdmin:g,isCoordinator:p,isPhotographer:x,signIn:h,signOut:m},children:e})}function gl(){const e=v.useContext(p3);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}function Qs({children:e,requiredRole:t,adminOnly:r}){const{user:n,role:s,isLoading:a}=gl(),o=kc(),l=Ya();return v.useEffect(()=>{if(!a){if(!n){o("/login");return}if(!s){o("/login");return}if(s==="photographer"&&l.pathname!=="/photo-days"){o("/photo-days");return}if(r&&s!=="admin"){o(s==="photographer"?"/photo-days":"/students");return}if(t&&s!==t&&s!=="admin"){o(s==="photographer"?"/photo-days":"/students");return}}},[n,s,a,o,t,r,l.pathname]),a?i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):!n||!s||s==="photographer"&&l.pathname!=="/photo-days"||r&&s!=="admin"||t&&s!==t&&s!=="admin"?null:i.jsx(i.Fragment,{children:e})}const mh=jx("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 active:scale-[0.98]",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 active:scale-[0.98]",outline:"border-2 border-primary bg-transparent hover:bg-primary/10 active:scale-[0.98]",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 active:scale-[0.98]",ghost:"hover:bg-muted hover:text-foreground active:scale-[0.98]",link:"text-primary underline-offset-4 hover:underline",rose:"gradient-rose text-foreground hover:shadow-elevated hover:scale-[1.02] active:scale-[0.98]",gold:"gradient-gold text-foreground hover:shadow-elevated hover:scale-[1.02] active:scale-[0.98]",soft:"bg-rose-soft text-foreground hover:bg-primary/20 active:scale-[0.98]"},size:{default:"h-11 px-5 py-2",sm:"h-9 rounded-md px-3",lg:"h-12 rounded-lg px-8 text-base",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ee=v.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},a)=>{const o=n?b8:"button";return i.jsx(o,{className:xe(mh({variant:t,size:r,className:e})),ref:a,...s})});ee.displayName="Button";const Oe=v.forwardRef(({className:e,type:t,...r},n)=>i.jsx("input",{type:t,className:xe("flex h-10 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}));Oe.displayName="Input";var Vz="Label",x3=v.forwardRef((e,t)=>
vendor: 2,183 bytes, line 543
543i.jsx(He.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));x3.displayName=Vz;var g3=x3;const Gz=jx("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ve=v.forwardRef(({className:e,...t},r)=>i.jsx(g3,{ref:r,className:xe(Gz(),e),...t}));ve.displayName=g3.displayName;var Bt;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{const a={};for(const o of s)a[o]=o;return a},e.getValidEnumValues=s=>{const a=e.objectKeys(s).filter(l=>typeof s[s[l]]!="number"),o={};for(const l of a)o[l]=s[l];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(a){return s[a]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const a=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&a.push(o);return a},e.find=(s,a)=>{for(const o of s)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,a=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(Bt||(Bt={}));var fk;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(fk||(fk={}));const Ye=Bt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),No=e=>{switch(typeof e){case"undefined":return Ye.undefined;case"string":return Ye.string;case"number":return Number.isNaN(e)?Ye.nan:Ye.number;case"boolean":return Ye.boolean;case"function":return Ye.function;case"bigint":return Ye.bigint;case"symbol":return Ye.symbol;case"object":return Array.isArray(e)?Ye.array:e===null?Ye.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ye.promise:typeof Map<"u"&&e instanceof Map?Ye.map:typeof Set<"u"&&e instanceof Set?Ye.set:typeof Date<"u"&&e instanceof Date?Ye.date:Ye.object;default:return Ye.unknown}}
vendor: 4,379 bytes, line 543
543,Ae=Bt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Zi extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(a){return a.message},n={_errors:[]},s=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let l=n,c=0;for(;c<o.path.length;){const u=o.path[c];c===o.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(r(o))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return s(this),n}static assert(t){if(!(t instanceof Zi))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Bt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const s of this.issues)if(s.path.length>0){const a=s.path[0];r[a]=r[a]||[],r[a].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Zi.create=e=>new Zi(e);const Ly=(e,t)=>{let r;switch(e.code){case Ae.invalid_type:e.received===Ye.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Ae.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Bt.jsonStringifyReplacer)}`;break;case Ae.unrecognized_keys:r=`Unrecognized key(s) in object: ${Bt.joinValues(e.keys,", ")}`;break;case Ae.invalid_union:r="Invalid input";break;case Ae.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Bt.joinValues(e.options)}`;break;case Ae.invalid_enum_value:r=`Invalid enum value. Expected ${Bt.joinValues(e.options)}, received '${e.received}'`;break;case Ae.invalid_arguments:r="Invalid function arguments";break;case Ae.invalid_return_type:r="Invalid function return type";break;case Ae.invalid_date:r="Invalid date";break;case Ae.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Bt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Ae.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Ae.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Ae.custom:r="Invalid input";break;
vendor: 7,534 bytes, line 543
543case Ae.invalid_intersection_types:r="Intersection results could not be merged";break;case Ae.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Ae.not_finite:r="Number must be finite";break;default:r=t.defaultError,Bt.assertNever(e)}return{message:r}};let qz=Ly;function Kz(){return qz}const Yz=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,a=[...r,...s.path||[]],o={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let l="";const c=n.filter(u=>!!u).slice().reverse();for(const u of c)l=u(o,{data:t,defaultError:l}).message;return{...s,path:a,message:l}};function ze(e,t){const r=Kz(),n=Yz({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Ly?void 0:Ly].filter(s=>!!s)});e.common.issues.push(n)}class Vs{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const s of r){if(s.status==="aborted")return mt;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const s of r){const a=await s.key,o=await s.value;n.push({key:a,value:o})}return Vs.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:a,value:o}=s;if(a.status==="aborted"||o.status==="aborted")return mt;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[a.value]=o.value)}return{status:t.value,value:n}}}const mt=Object.freeze({status:"aborted"}),af=e=>({status:"dirty",value:e}),ga=e=>({status:"valid",value:e}),hk=e=>e.status==="aborted",mk=e=>e.status==="dirty",sd=e=>e.status==="valid",Ep=e=>typeof Promise<"u"&&e instanceof Promise;var Xe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Xe||(Xe={}));class sl{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const pk=(e,t)=>{if(sd(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Zi(e.common.issues);return this._error=r,this._error}}};function kt(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,l)=>{const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??l.defaultError}:typeof l.data>"u"?{message:c??n??l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:c??r??l.defaultError}},description:s}}class Ft{get description(){return this._def.description}_getType(t){return No(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:No(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Vs,ctx:{common:t.parent.common,data:t.data,parsedType:No(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Ep(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:No(t)},s=this._parseSync({data:t,path:n.path,parent:n});return pk(n,s)}"~validate"(t){var n,s;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:No(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:r});return sd(a)?{value:a.value}:{issues:r.common.issues}}catch(a){(s=(n=a==null?void 0:a.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(a=>sd(a)?{value:a.value}:{issues:r.common.issues})}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:No(t)},s=this._parse({data:t,path:n.path,parent:n}),a=await(Ep(s)?s:Promise.resolve(s));return pk(n,a)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,a)=>{const o=t(s),l=()=>a.addIssue({code:Ae.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new id({schema:this,typeName:pt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Qo.create(this,this._def)}nullable(){return od.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return vi.create(this)}promise(){return Pp.create(this,this._def)}or(t){return Tp.create([this,t],this._def)}and(t){return Ap.create(this,t,this._def)}transform(t){return new id({...kt(this._def),schema:this,typeName:pt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new $y({...kt(this._def),innerType:this,defaultValue:r,typeName:pt.ZodDefault})}brand(){return new vH({typeName:pt.ZodBranded,type:this,...kt(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Uy({...kt(this._def),innerType:this,catchValue:r,typeName:pt.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Vb.create(this,t)}readonly(){return Wy.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Xz=/^c[^\s-]{8,}
vendor: 4,618 bytes, line 543
543$/i,Qz=/^[0-9a-z]+$/,Jz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Zz=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,eH=/^[a-z0-9_-]{21}$/i,tH=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,rH=/^[-+]?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)?)??$/,nH=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,sH="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let jv;const aH=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,iH=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,oH=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,lH=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,cH=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,uH=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,v3="((\\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])))",dH=new RegExp(`^${v3}$`);function y3(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function fH(e){return new RegExp(`^${y3(e)}$`)}function hH(e){let t=`${v3}T${y3(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function mH(e,t){return!!((t==="v4"||!t)&&aH.test(e)||(t==="v6"||!t)&&oH.test(e))}function pH(e,t){if(!tH.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function xH(e,t){return!!((t==="v4"||!t)&&iH.test(e)||(t==="v6"||!t)&&lH.test(e))}class Lo extends Ft{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ye.string){const a=this._getOrReturnCtx(t);return ze(a,{code:Ae.invalid_type,expected:Ye.string,received:a.parsedType}),mt}const n=new Vs;let s;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(s=this._getOrReturnCtx(t,s),ze(s,{code:Ae.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")t.data.length>a.value&&(s=this._getOrReturnCtx(t,s),ze(s,{code:Ae.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,l=t.data.length<a.value;(o||l)&&(s=this._getOrReturnCtx(t,s),o?ze(s,{code:Ae.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):l&&ze(s,{code:Ae.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")nH.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"email",code:Ae.invali
vendor: 5,643 bytes, line 543
543d_string,message:a.message}),n.dirty());else if(a.kind==="emoji")jv||(jv=new RegExp(sH,"u")),jv.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"emoji",code:Ae.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")Zz.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"uuid",code:Ae.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")eH.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"nanoid",code:Ae.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")Xz.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"cuid",code:Ae.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")Qz.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"cuid2",code:Ae.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")Jz.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"ulid",code:Ae.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ze(s,{validation:"url",code:Ae.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"regex",code:Ae.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(t,s),ze(s,{code:Ae.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(s=this._getOrReturnCtx(t,s),ze(s,{code:Ae.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(s=this._getOrReturnCtx(t,s),ze(s,{code:Ae.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?hH(a).test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{code:Ae.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?dH.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{code:Ae.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?fH(a).test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{code:Ae.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?rH.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"duration",code:Ae.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?mH(t.data,a.version)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"ip",code:Ae.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?pH(t.data,a.alg)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"jwt",code:Ae.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?xH(t.data,a.version)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"cidr",code:Ae.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?cH.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"base64",code:Ae.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?uH.test(t.data)||(s=this._getOrReturnCtx(t,s),ze(s,{validation:"base64url",code:Ae.invalid_string,message:a.message}),n.dirty()):Bt.assertNever(a);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:Ae.invalid_string,...Xe.errToObj(n)})}_addCheck(t){return new Lo({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Xe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Xe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Xe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Xe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Xe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Xe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Xe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Xe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Xe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Xe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Xe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Xe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Xe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Xe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Xe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Xe.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Xe.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Xe.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Xe.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Xe.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Xe.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Xe.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Xe.errToObj(r)})}
vendor: 5,055 bytes, line 543
543nonempty(t){return this.min(1,Xe.errToObj(t))}trim(){return new Lo({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Lo({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Lo({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Lo.create=e=>new Lo({checks:[],typeName:pt.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...kt(e)});function gH(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,a=Number.parseInt(e.toFixed(s).replace(".","")),o=Number.parseInt(t.toFixed(s).replace(".",""));return a%o/10**s}class ph extends Ft{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ye.number){const a=this._getOrReturnCtx(t);return ze(a,{code:Ae.invalid_type,expected:Ye.number,received:a.parsedType}),mt}let n;const s=new Vs;for(const a of this._def.checks)a.kind==="int"?Bt.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),ze(n,{code:Ae.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),ze(n,{code:Ae.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),ze(n,{code:Ae.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?gH(t.data,a.value)!==0&&(n=this._getOrReturnCtx(t,n),ze(n,{code:Ae.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),ze(n,{code:Ae.not_finite,message:a.message}),s.dirty()):Bt.assertNever(a);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Xe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Xe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Xe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Xe.toString(r))}setLimit(t,r,n,s){return new ph({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Xe.toString(s)}]})}_addCheck(t){return new ph({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Xe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Xe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Xe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Xe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Xe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Xe.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Xe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Xe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Xe.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Bt.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}
vendor: 4,244 bytes, line 543
543}ph.create=e=>new ph({checks:[],typeName:pt.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...kt(e)});class xh extends Ft{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ye.bigint)return this._getInvalidInput(t);let n;const s=new Vs;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),ze(n,{code:Ae.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),ze(n,{code:Ae.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),ze(n,{code:Ae.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):Bt.assertNever(a);return{status:s.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return ze(r,{code:Ae.invalid_type,expected:Ye.bigint,received:r.parsedType}),mt}gte(t,r){return this.setLimit("min",t,!0,Xe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Xe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Xe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Xe.toString(r))}setLimit(t,r,n,s){return new xh({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Xe.toString(s)}]})}_addCheck(t){return new xh({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Xe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Xe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Xe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Xe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Xe.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}xh.create=e=>new xh({checks:[],typeName:pt.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...kt(e)});class xk extends Ft{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ye.boolean){const n=this._getOrReturnCtx(t);return ze(n,{code:Ae.invalid_type,expected:Ye.boolean,received:n.parsedType}),mt}return ga(t.data)}}xk.create=e=>new xk({typeName:pt.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...kt(e)});class Cp extends Ft{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ye.date){const a=this._getOrReturnCtx(t);return ze(a,{code:Ae.invalid_type,expected:Ye.date,received:a.parsedType}),mt}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return ze(a,{code:Ae.invalid_date}),mt}const n=new Vs;let s;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(s=this._getOrReturnCtx(t,s),ze(s,{code:Ae.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(s=this._getOrReturnCtx(t,s),ze(s,{code:Ae.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):Bt.assertNever(a);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Cp({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Xe.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Xe.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}Cp.create=e=>new Cp({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:pt.ZodDate,...kt(e)});class gk extends Ft{_parse(t){if(this._getType(t)!==Ye.symbol){const n=this._getOrReturnCtx(t);
vendor: 8,433 bytes, line 543
543return ze(n,{code:Ae.invalid_type,expected:Ye.symbol,received:n.parsedType}),mt}return ga(t.data)}}gk.create=e=>new gk({typeName:pt.ZodSymbol,...kt(e)});class vk extends Ft{_parse(t){if(this._getType(t)!==Ye.undefined){const n=this._getOrReturnCtx(t);return ze(n,{code:Ae.invalid_type,expected:Ye.undefined,received:n.parsedType}),mt}return ga(t.data)}}vk.create=e=>new vk({typeName:pt.ZodUndefined,...kt(e)});class yk extends Ft{_parse(t){if(this._getType(t)!==Ye.null){const n=this._getOrReturnCtx(t);return ze(n,{code:Ae.invalid_type,expected:Ye.null,received:n.parsedType}),mt}return ga(t.data)}}yk.create=e=>new yk({typeName:pt.ZodNull,...kt(e)});class wk extends Ft{constructor(){super(...arguments),this._any=!0}_parse(t){return ga(t.data)}}wk.create=e=>new wk({typeName:pt.ZodAny,...kt(e)});class bk extends Ft{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ga(t.data)}}bk.create=e=>new bk({typeName:pt.ZodUnknown,...kt(e)});class al extends Ft{_parse(t){const r=this._getOrReturnCtx(t);return ze(r,{code:Ae.invalid_type,expected:Ye.never,received:r.parsedType}),mt}}al.create=e=>new al({typeName:pt.ZodNever,...kt(e)});class _k extends Ft{_parse(t){if(this._getType(t)!==Ye.undefined){const n=this._getOrReturnCtx(t);return ze(n,{code:Ae.invalid_type,expected:Ye.void,received:n.parsedType}),mt}return ga(t.data)}}_k.create=e=>new _k({typeName:pt.ZodVoid,...kt(e)});class vi extends Ft{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==Ye.array)return ze(r,{code:Ae.invalid_type,expected:Ye.array,received:r.parsedType}),mt;if(s.exactLength!==null){const o=r.data.length>s.exactLength.value,l=r.data.length<s.exactLength.value;(o||l)&&(ze(r,{code:o?Ae.too_big:Ae.too_small,minimum:l?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(ze(r,{code:Ae.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(ze(r,{code:Ae.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,l)=>s.type._parseAsync(new sl(r,o,r.path,l)))).then(o=>Vs.mergeArray(n,o));const a=[...r.data].map((o,l)=>s.type._parseSync(new sl(r,o,r.path,l)));return Vs.mergeArray(n,a)}get element(){return this._def.type}min(t,r){return new vi({...this._def,minLength:{value:t,message:Xe.toString(r)}})}max(t,r){return new vi({...this._def,maxLength:{value:t,message:Xe.toString(r)}})}length(t,r){return new vi({...this._def,exactLength:{value:t,message:Xe.toString(r)}})}nonempty(t){return this.min(1,t)}}vi.create=(e,t)=>new vi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pt.ZodArray,...kt(t)});function ru(e){if(e instanceof Or){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Qo.create(ru(n))}return new Or({...e._def,shape:()=>t})}else return e instanceof vi?new vi({...e._def,type:ru(e.element)}):e instanceof Qo?Qo.create(ru(e.unwrap())):e instanceof od?od.create(ru(e.unwrap())):e instanceof fc?fc.create(e.items.map(t=>ru(t))):e}class Or extends Ft{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Bt.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==Ye.object){const u=this._getOrReturnCtx(t);return ze(u,{code:Ae.invalid_type,expected:Ye.object,received:u.parsedType}),mt}const{status:n,ctx:s}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof al&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||l.push(u);const c=[];for(const u of o){const d=a[u],f=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new sl(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof al){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of l)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")l.length>0&&(ze(s,{code:Ae.unrecognized_keys,keys:l}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of l){const f=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new sl(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const f=await d.key,h=await d.value;u.push({key:f,value:h,alwaysSet:d.alwaysSet})}return u}).then(u=>Vs.mergeObjectSync(n,u)):Vs.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return Xe.errToObj,new Or({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var a,o;const s=((o=(a=this._def).errorMap)==null?void 0:o.call(a,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:Xe.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new Or({...this._def,unknownKeys:"strip"})}passthrough(){return new Or({...this._def,unknownKeys:"passthrough"})}extend(t){return new Or({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Or({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:pt.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Or({...this._def,catchall:t})}pick(t){const r={};for(const n of Bt.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new Or({...this._def,shape:()=>r})}omit(t){const r={};for(const n of Bt.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new Or({...this._def,shape:()=>r})}deepPartial(){return ru(this)}partial(t){const r={};for(const n of Bt.objectKeys(this.shape)){const s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new Or({...this._def,shape:()=>r})}required(t){const r={};for(const n of Bt.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof Qo;)a=a._def.innerType;r[n]=a}return new Or({...this._def,shape:()=>r})}keyof(){return w3(Bt.objectKeys(this.shape))}}Or.create=(e,t)=>new Or({shape:()=>e,unknownKeys:"strip",catchall:al.create(),typeName:pt.ZodObject,...kt(t)});Or.strictCreate=(e,t)=>new Or({shape:()=>e,unknownKeys:"strict",catchall:al.create(),typeName:pt.ZodObject,...kt(t)});Or.lazycreate=(e,t)=>new Or({shape:e,unknownKeys:"strip",catchall:al.create(),typeName:pt.ZodObject,...kt(t)});class Tp extends Ft{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(a){for(const l of a)if(l.result.status==="valid")return l.result;for(const l of a)if(l.result.status==="dirty")return r.common.issues.push(...l.ctx.common.issues),l.result;const o=a.map(l=>new Zi(l.ctx.common.issues));return ze(r,{code:Ae.invalid_union,unionErrors:o}),mt}if(r.common.async)return Promise.all(n.map(async a=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let a;const o=[];for(const c of n){const u={...r,common:{...r.common,issues:[]},parent:null},d=c._parseSync({data:r.data,path:r.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!a&&(a={result:d,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const l=o.map(c=>new Zi(c));return ze(r,{code:Ae.invalid_union,unionErrors:l}),mt}}get options(){return this._def.options}}Tp.create=(e,t)=>new Tp({options:e,typeName:pt.ZodUnion,...kt(t)});function By(e,t){const r=No(e),n=No(t);if(e===t)return{valid:!0,data:e};if(r===Ye.object&&n===Ye.object){const s=Bt.objectKeys(t),a=Bt.objectKeys(e).filter(l=>s.indexOf(l)!==-1),o={...e,...t};for(const l of a){const c=By(e[l],t[l]);if(!c.valid)return{valid:!1};o[l]=c.data}return{valid:!0,data:o}}else if(r===Ye.array&&n===Ye.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let a=0;a<e.length;a++){const o=e[a],l=t[a],c=By(o,l);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===Ye.date&&n===Ye.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ap extends Ft{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=(a,o)=>
vendor: 1,893 bytes, line 543
543{if(hk(a)||hk(o))return mt;const l=By(a.value,o.value);return l.valid?((mk(a)||mk(o))&&r.dirty(),{status:r.value,value:l.data}):(ze(n,{code:Ae.invalid_intersection_types}),mt)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,o])=>s(a,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Ap.create=(e,t,r)=>new Ap({left:e,right:t,typeName:pt.ZodIntersection,...kt(r)});class fc extends Ft{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ye.array)return ze(n,{code:Ae.invalid_type,expected:Ye.array,received:n.parsedType}),mt;if(n.data.length<this._def.items.length)return ze(n,{code:Ae.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),mt;!this._def.rest&&n.data.length>this._def.items.length&&(ze(n,{code:Ae.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...n.data].map((o,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new sl(n,o,n.path,l)):null}).filter(o=>!!o);return n.common.async?Promise.all(a).then(o=>Vs.mergeArray(r,o)):Vs.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new fc({...this._def,rest:t})}}fc.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new fc({items:e,typeName:pt.ZodTuple,rest:null,...kt(t)})};class Nk extends Ft{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ye.map)return ze(n,{code:Ae.invalid_type,expected:Ye.map,received:n.parsedType}),mt;const s=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([l,c],u)=>
vendor: 4,124 bytes, line 543
543({key:s._parse(new sl(n,l,n.path,[u,"key"])),value:a._parse(new sl(n,c,n.path,[u,"value"]))}));if(n.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of o){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return mt;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),l.set(u.value,d.value)}return{status:r.value,value:l}})}else{const l=new Map;for(const c of o){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return mt;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),l.set(u.value,d.value)}return{status:r.value,value:l}}}}Nk.create=(e,t,r)=>new Nk({valueType:t,keyType:e,typeName:pt.ZodMap,...kt(r)});class gh extends Ft{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ye.set)return ze(n,{code:Ae.invalid_type,expected:Ye.set,received:n.parsedType}),mt;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(ze(n,{code:Ae.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(ze(n,{code:Ae.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const a=this._def.valueType;function o(c){const u=new Set;for(const d of c){if(d.status==="aborted")return mt;d.status==="dirty"&&r.dirty(),u.add(d.value)}return{status:r.value,value:u}}const l=[...n.data.values()].map((c,u)=>a._parse(new sl(n,c,n.path,u)));return n.common.async?Promise.all(l).then(c=>o(c)):o(l)}min(t,r){return new gh({...this._def,minSize:{value:t,message:Xe.toString(r)}})}max(t,r){return new gh({...this._def,maxSize:{value:t,message:Xe.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}gh.create=(e,t)=>new gh({valueType:e,minSize:null,maxSize:null,typeName:pt.ZodSet,...kt(t)});class Sk extends Ft{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Sk.create=(e,t)=>new Sk({getter:e,typeName:pt.ZodLazy,...kt(t)});class kk extends Ft{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return ze(r,{received:r.data,code:Ae.invalid_literal,expected:this._def.value}),mt}return{status:"valid",value:t.data}}get value(){return this._def.value}}kk.create=(e,t)=>new kk({value:e,typeName:pt.ZodLiteral,...kt(t)});function w3(e,t){return new ad({values:e,typeName:pt.ZodEnum,...kt(t)})}class ad extends Ft{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return ze(r,{expected:Bt.joinValues(n),received:r.parsedType,code:Ae.invalid_type}),mt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return ze(r,{received:r.data,code:Ae.invalid_enum_value,options:n}),mt}return ga(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return ad.create(t,{...this._def,...r})}exclude(t,r=this._def){return ad.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}ad.create=w3;class jk extends Ft{_parse(t){const r=Bt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==Ye.string&&n.parsedType!==Ye.number){const s=Bt.objectValues(r);return ze(n,{expected:Bt.joinValues(s),received:n.parsedType,code:Ae.invalid_type}),mt}if(this._cache||(this._cache=new Set(Bt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=Bt.objectValues(r);return ze(n,{received:n.data,code:Ae.invalid_enum_value,options:s}),mt}return ga(t.data)}get enum(){return this._def.values}}jk.create=(e,t)=>new jk({values:e,typeName:pt.ZodNativeEnum,...kt(t)});class Pp extends Ft{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ye.promise&&r.common.async===!1)return ze(r,{code:Ae.invali
vendor: 4,075 bytes, line 543
543d_type,expected:Ye.promise,received:r.parsedType}),mt;const n=r.parsedType===Ye.promise?r.data:Promise.resolve(r.data);return ga(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Pp.create=(e,t)=>new Pp({type:e,typeName:pt.ZodPromise,...kt(t)});class id extends Ft{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,a={addIssue:o=>{ze(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){const o=s.transform(n.data,a);if(n.common.async)return Promise.resolve(o).then(async l=>{if(r.value==="aborted")return mt;const c=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return c.status==="aborted"?mt:c.status==="dirty"||r.value==="dirty"?af(c.value):c});{if(r.value==="aborted")return mt;const l=this._def.schema._parseSync({data:o,path:n.path,parent:n});return l.status==="aborted"?mt:l.status==="dirty"||r.value==="dirty"?af(l.value):l}}if(s.type==="refinement"){const o=l=>{const c=s.refinement(l,a);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?mt:(l.status==="dirty"&&r.dirty(),o(l.value),{status:r.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?mt:(l.status==="dirty"&&r.dirty(),o(l.value).then(()=>({status:r.value,value:l.value}))))}if(s.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!sd(o))return mt;const l=s.transform(o.value,a);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>sd(o)?Promise.resolve(s.transform(o.value,a)).then(l=>({status:r.value,value:l})):mt);Bt.assertNever(s)}}id.create=(e,t,r)=>new id({schema:e,typeName:pt.ZodEffects,effect:t,...kt(r)});id.createWithPreprocess=(e,t,r)=>new id({schema:t,effect:{type:"preprocess",transform:e},typeName:pt.ZodEffects,...kt(r)});class Qo extends Ft{_parse(t){return this._getType(t)===Ye.undefined?ga(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Qo.create=(e,t)=>new Qo({innerType:e,typeName:pt.ZodOptional,...kt(t)});class od extends Ft{_parse(t){return this._getType(t)===Ye.null?ga(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}od.create=(e,t)=>new od({innerType:e,typeName:pt.ZodNullable,...kt(t)});class $y extends Ft{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===Ye.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}$y.create=(e,t)=>new $y({innerType:e,typeName:pt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...kt(t)});class Uy extends Ft{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ep(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Zi(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Zi(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Uy.create=(e,t)=>new Uy({innerType:e,typeName:pt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...kt(t)});class Ek extends Ft{_parse(t){if(this._getType(t)!==Ye.nan){const n=this._getOrReturnCtx(t);
543return ze(n,{code:Ae.invalid_type,expected:Ye.nan,received:n.parsedType}),mt}return{status:"valid",value:t.data}}}Ek.create=e=>new Ek({typeName:pt.ZodNaN,...kt(e)});class vH extends Ft{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Vb extends Ft{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?mt:a.status==="dirty"?(r.dirty(),af(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?mt:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new Vb({in:t,out:r,typeName:pt.ZodPipeline})}}class Wy extends Ft{_parse(t){const r=this._def.innerType._parse(t),n=s=>(sd(s)&&(s.value=Object.freeze(s.value)),s);return Ep(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}Wy.create=(e,t)=>new Wy({innerType:e,typeName:pt.ZodReadonly,...kt(t)});Or.lazycreate;var pt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(pt||(pt={}));const tc=Lo.create;al.create;vi.create;const Gb=Or.create;Or.strictCreate;Tp.create;Ap.create;fc.create;ad.create;Pp.create;Qo.create;od.create;const yH=Gb({email:tc().email("נא להזין כתובת אימייל תקינה"),password:tc().min(6,"סיסמה חייבת להכיל לפחות 6 תווים")});function wH(){const[e,t]=v.useState(""),[r,n]=v.useState(""),[s,a]=v.useState(!1),[o,l]=v.useState(!1),[c,u]=v.useState(""),[d,f]=v.useState(!1),{signIn:h,user:m,role:g,isLoading:p}=gl(),x=kc();v.useEffect(()=>{!p&&m&&g&&x(g==="photographer"?"/photo-days":"/students",{replace:!0})},[p,m,g,x]);const b=async y=>{y.preventDefault();const _=yH.safeParse({email:e,password:r});if(!_.success){K.error(_.error.errors[0].message);return}a(!0);try{const{error:N}=await h(e,r);if(N){N.message.includes("Invalid login credentials")?K.error("אימייל או סיסמה שגויים"):K.error("שגיאה בהתחברות, נסה שוב");return}K.success("התחברת בהצלחה!")}catch{K.error("שגיאה בהתחברות")}finally{a(!1)}},w=async y=>{if(y.preventDefault(),!c.trim()){K.error("נא להזין כתובת אימייל");return}f(!0);try{const{error:_}=await de.auth.resetPasswordForEmail(c.trim().toLowerCase(),{redirectTo:`${window.location.origin}/reset-password`});if(_)throw _;K.success("נשלח אימייל לאיפוס סיסמה! בדקי גם בתיקיית הספאם"),l(!1),u("")}catch(_){console.error("Error sending reset email:",_),K.error("שגיאה בשליחת אימייל לאיפוס סיסמה, נסי שוב מאוחר יותר")}finally{f(!1)}};return i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",dir:"rtl",children:i.jsx("div",{className:"w-full max-w-md",children:i.jsxs("div",{className:"bg-card rounded-2xl shadow-card border border-border p-8",children:[i.jsxs("div",{className:"flex flex-col items-center mb-8",children:[i.jsx("div",{className:"w-16 h-16 rounded-2xl gradient-rose flex items-center justify-center shadow-soft mb-4",children:i.jsx(wi,{className:"h-8 w-8 text-foreground"})}),i.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"YARIN SHAHAF"}),i.jsx("p",{className:"text-muted-foreground mt-1",children:o?"איפוס סיסמה":"כניסה למערכת הניהול"})]}),o?i.jsxs("form",{onSubmit:w,className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"forgot-email",children:"אימייל"}),i.jsx(Oe,{id:"forgot-email",type:"email",placeholder:"הזן את האימייל שלך",value:c,onChange:y=>u(y.target.value),className:"text-right",autoComplete:"email"})]}),i.jsx(ee,{type:"submit",variant:"rose",className:"w-full",disabled:d,children:d?"שולח...":"שלח לינק לאיפוס סיסמה"}),i.jsx(ee,{type:"button",variant:"ghost",className:"w-full",onClick:()=>l(!1),children:"חזרה להתחברות"})]}):i.jsxs("form",{onSubmit:b,className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"email",children:"אימייל"}),i.jsx(Oe,{id:"email",type:"email",placeholder:"הזן את האימייל שלך",value:e,onCh
543ange:y=>t(y.target.value),className:"text-right",autoComplete:"email"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"password",children:"סיסמה"}),i.jsx(Oe,{id:"password",type:"password",placeholder:"הזן את הסיסמה שלך",value:r,onChange:y=>n(y.target.value),className:"text-right",autoComplete:"current-password"})]}),i.jsx(ee,{type:"submit",variant:"rose",className:"w-full gap-2",disabled:s,children:s?"מתחבר...":i.jsxs(i.Fragment,{children:[i.jsx(bL,{className:"h-4 w-4"}),"התחבר"]})}),i.jsx(ee,{type:"button",variant:"link",className:"w-full text-muted-foreground",onClick:()=>l(!0),children:"שכחתי סיסמה"})]})]})})})}const bH=Gb({password:tc().min(6,"סיסמה חייבת להכיל לפחות 6 תווים"),confirmPassword:tc()}).refine(e=>e.password===e.confirmPassword,{message:"הסיסמאות לא תואמות",path:["confirmPassword"]});function _H(){const[e,t]=v.useState(""),[r,n]=v.useState(""),[s,a]=v.useState(!1),[o,l]=v.useState(!1),[c,u]=v.useState(!1),[d,f]=v.useState(!0),h=kc();v.useEffect(()=>{(async()=>{const{data:{session:p}}=await de.auth.getSession();if(p)u(!0);else{const x=new URLSearchParams(window.location.hash.substring(1)),b=x.get("access_token"),w=x.get("type");b&&w==="recovery"?u(!0):(K.error("לינק לא תקף או פג תוקף"),h("/login"))}f(!1)})()},[h]);const m=async g=>{g.preventDefault();const p=bH.safeParse({password:e,confirmPassword:r});if(!p.success){K.error(p.error.errors[0].message);return}a(!0);try{const{error:x}=await de.auth.updateUser({password:e});if(x)throw x;l(!0),K.success("הסיסמה עודכנה בהצלחה!"),setTimeout(async()=>{await de.auth.signOut(),h("/login")},2e3)}catch(x){console.error("Error resetting password:",x),K.error(x.message||"שגיאה בעדכון הסיסמה")}finally{a(!1)}};return d?i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",dir:"rtl",children:i.jsx("div",{className:"w-full max-w-md",children:i.jsxs("div",{className:"bg-card rounded-2xl shadow-card border border-border p-8",children:[i.jsxs("div",{className:"flex flex-col items-center mb-8",children:[i.jsx("div",{className:"w-16 h-16 rounded-2xl gradient-rose flex items-center justify-center shadow-soft mb-4",children:o?i.jsx(Ha,{className:"h-8 w-8 text-foreground"}):i.jsx(wi,{className:"h-8 w-8 text-foreground"})}),i.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"YARIN SHAHAF"}),i.jsx("p",{className:"text-muted-foreground mt-1",children:o?"הסיסמה עודכנה בהצלחה":"איפוס סיסמה"})]}),o?i.jsxs("div",{className:"text-center space-y-4",children:[i.jsx("p",{className:"text-muted-foreground",children:"מעביר אותך לדף ההתחברות..."}),i.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-primary mx-auto"})]}):i.jsxs("form",{onSubmit:m,className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"password",children:"סיסמה חדשה"}),i.jsx(Oe,{id:"password",type:"password",placeholder:"הזן סיסמה חדשה",value:e,onChange:g=>t(g.target.value),className:"text-right",autoComplete:"new-password"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"confirmPassword",children:"אימות סיסמה"}),i.jsx(Oe,{id:"confirmPassword",type:"password",placeholder:"הזן שוב את הסיסמה",value:r,onChange:g=>n(g.target.value),className:"text-right",autoComplete:"new-password"})]}),i.jsx(ee,{type:"submit",variant:"rose",className:"w-full gap-2",disabled:s,children:s?"מעדכן...":i.jsxs(i.Fragment,{children:[i.jsx(wL,{className:"h-4 w-4"}),"עדכן סיסמה"]})}),i.jsx(ee,{type:"button",variant:"ghost",className:"w-full",onClick:()=>h("/login"),children:"חזרה להתחברות"})]})]})})})}const NH=[{name:"ניהול תלמידים",href:"/students",icon:xs},{name:"ניהול קורסים",href:"/courses",icon:eh,adminOnly:!0},{name:"ניהול שיעורים",href:"/lessons",icon:rr,adminOnly:!0},{name:"ניהול משימות קורס",href:"/course-tasks",icon:Fo,adminOnly:!0},{name:"ניהול זכאויות",href:"/entitlements",icon:j4,adminOnly:!0},{name:"ניהול ימי צילום",href:"/photo-days",icon:Bs,photographerVisible:!0},{name:"ניהול תמונות ימי צילום",href:"/photo-day-images",icon:Wi},{name:"ניהול השתלמויות",href:"/workshops",icon:pa},{name:"ניהול סדנאות מעשיות",href:"/practical-workshops",icon:mp},{name:"ניהול ארנקים וקרדיטים",href:"/wallet",icon:Zu},{name:"בקשות מייקאפלנד",href:"/makeupland-requests",icon:$4},{name:"הגדרות",href:"/settings",icon:kL,adminOnly:!0}];function SH(){var f;const[e,t]=v.useState(!1),r=Ya(),{profile:n,role:s,signOut:a,isAdmin:o,isPhotographer:l}=gl(),c=NH.filter(h=>s?s==="photographer"?h.photographerVisible===!0:!(h.adminOnly&&s!=="admin"):!1),u=async()=>{await a()},d={admin:"אדמין",coordinator:"רכז קורסים",photographer:"צלם"};return i.jsxs(i.Fragment,{children:[i.jsx(ee,{variant:"ghost",size:"icon",className:"fixed top-4 right-4 z-50 lg:hidden",onClick:()=>t(!e),children:e?i.jsx(es,{className:"h-5 w-5"}):i.jsx(F4,{className:"h-5 w-5"})}
vendor: 9,339 bytes, line 543
543),e&&i.jsx("div",{className:"fixed inset-0 bg-foreground/20 backdrop-blur-sm z-40 lg:hidden",onClick:()=>t(!1)}),i.jsx("aside",{className:xe("fixed top-0 right-0 z-40 h-full w-72 bg-card border-l border-border shadow-card transition-transform duration-300 ease-in-out lg:translate-x-0",e?"translate-x-0":"translate-x-full lg:translate-x-0"),children:i.jsxs("div",{className:"flex flex-col h-full",dir:"rtl",children:[i.jsxs("div",{className:"flex items-center gap-3 px-6 py-6 border-b border-border",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl gradient-rose flex items-center justify-center shadow-soft",children:i.jsx(wi,{className:"h-5 w-5 text-foreground"})}),i.jsxs("div",{children:[i.jsx("h1",{className:"font-bold text-lg text-foreground",children:"YARIN SHAHAF"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"מערכת ניהול"})]})]}),i.jsx("nav",{className:"flex-1 px-4 py-6 space-y-1 overflow-y-auto",children:c.map(h=>{const m=r.pathname===h.href;return i.jsxs(zA,{to:h.href,onClick:()=>t(!1),className:xe("flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-medium transition-all duration-200",m?"gradient-rose text-foreground shadow-soft":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[i.jsx(h.icon,{className:"h-5 w-5"}),h.name]},h.name)})}),i.jsxs("div",{className:"p-4 border-t border-border space-y-3",children:[i.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 rounded-xl bg-muted",children:[i.jsx("div",{className:"w-9 h-9 rounded-full gradient-rose flex items-center justify-center",children:i.jsx("span",{className:"text-sm font-semibold text-foreground",children:((f=n==null?void 0:n.full_name)==null?void 0:f.charAt(0))||"מ"})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:(n==null?void 0:n.full_name)||"משתמש"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:s?d[s]:""})]})]}),i.jsxs(ee,{variant:"outline",className:"w-full gap-2",onClick:u,children:[i.jsx(D4,{className:"h-4 w-4"}),"התנתק"]})]})]})})]})}function Hn({children:e}){return i.jsxs("div",{className:"min-h-screen bg-background",dir:"rtl",children:[i.jsx(SH,{}),i.jsx("main",{className:"lg:mr-72 min-h-screen",children:i.jsx("div",{className:"p-6 lg:p-8 pt-16 lg:pt-8",children:e})})]})}const kH=jx("inline-flex items-center rounded-full 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",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function We({className:e,variant:t,...r}){return i.jsx("div",{className:xe(kH({variant:t}),e),...r})}var Ev="focusScope.autoFocusOnMount",Cv="focusScope.autoFocusOnUnmount",Ck={bubbles:!1,cancelable:!0},jH="FocusScope",n0=v.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...o}=e,[l,c]=v.useState(null),u=Ur(s),d=Ur(a),f=v.useRef(null),h=ot(t,p=>c(p)),m=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(n){let p=function(y){if(m.paused||!l)return;const _=y.target;l.contains(_)?f.current=_:yo(f.current,{select:!0})},x=function(y){if(m.paused||!l)return;const _=y.relatedTarget;_!==null&&(l.contains(_)||yo(f.current,{select:!0}))},b=function(y){if(document.activeElement===document.body)for(const N of y)N.removedNodes.length>0&&yo(l)};document.addEventListener("focusin",p),document.addEventListener("focusout",x);const w=new MutationObserver(b);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",x),w.disconnect()}}},[n,l,m.paused]),v.useEffect(()=>{if(l){Ak.add(m);const p=document.activeElement;if(!l.contains(p)){const b=new CustomEvent(Ev,Ck);l.addEventListener(Ev,u),l.dispatchEvent(b),b.defaultPrevented||(EH(RH(b3(l)),{select:!0}),document.activeElement===p&&yo(l))}return()=>{l.removeEventListener(Ev,u),setTimeout(()=>{const b=new CustomEvent(Cv,Ck);l.addEventListener(Cv,d),l.dispatchEvent(b),b.defaultPrevented||yo(p??document.body,{select:!0}),l.removeEventListener(Cv,d),Ak.remove(m)},0)}}},[l,u,d,m]);const g=v.useCallback(p=>{if(!r&&!n||m.paused)return;const x=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,b=document.activeElement;if(x&&b){const w=p.currentTarget,[y,_]=CH(w);y&&_?!p.shiftKey&&b===_?(p.preventDefault(),r&&yo(y,{select:!0})):p.shiftKey&&b===y&&(p.preventDefault(),r&&yo(_,{select:!0})):b===w&&p.preventDefault()}},[r,n,m.paused]);return i.jsx(He.div,{tabIndex:-1,...o,ref:h,onKeyDown:g})});n0.displayName=jH;function EH(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(yo(n,{select:t}),document.activeElement!==r)return}function CH(e){const t=b3(e),r=Tk(t,e),n=Tk(t.reverse(),e);return[r,n]}function b3(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Tk(e,t){for(const r of e)if(!TH(r,{upTo:t}))return r}function TH(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 AH(e){return e instanceof HTMLInputElement&&"select"in e}function yo(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&AH(e)&&t&&e.select()}}var Ak=PH();function PH(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Pk(e,t),e.unshift(t)},remove(t){var r;e=Pk(e,t),(r=e[0])==null||r.resume()}}}function Pk(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function RH(e){return e.filter(t=>t.tagName!=="A")}var Tv=0;function Vx(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Rk()),document.body.insertAdjacentElement("beforeend",e[1]??Rk()),Tv++,()=>{Tv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Tv--}},[])}function Rk(){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 Mm="right-scroll-bar-position",Lm="width-before-scroll-bar",OH="with-scroll-bars-hidden",DH="--removed-body-scroll-bar-size";function Av(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function IH(e,t){var r=v.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var FH=typeof window<"u"?v.useLayoutEffect:v.useEffect,Ok=new WeakMap;function MH(e,t){var r=IH(null,function(n){return e.forEach(function(s){return Av(s,n)})});return FH(function(){var n=Ok.get(r);if(n){var s=new Set(n),a=new Set(e),o=r.current;s.forEach(function(l){a.has(l)||Av(l,null)}),a.forEach(function(l){s.has(l)||Av(l,o)})}Ok.set(r,e)},[e]),r}function LH(e){return e}function BH(e,t){t===void 0&&(t=LH);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var o=t(a,n);return r.push(o),function(){r=r.filter(function(l){return l!==o})}},assignSyncMedium:function(a){for(n=!0;r.length;){var o=r;r=[],o.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var o=[];if(r.length){var l=r;r=[],l.forEach(a),o=r}var c=function(){var d=o;o=[],d.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),r}}}};return s}function $H(e){e===void 0&&(e={});var t=BH(null);return t.options=oi({async:!0,ssr:!1},e),t}var _3=function(e){var t=e.sideCar,r=jd(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return v.createElement(n,oi({},r))};_3.isSideCarExport=!0;function UH(e,t){return e.useMedium(t),_3}var N3=$H(),Pv=function(){},Gx=v.forwardRef(function(e,t){var r=v.useRef(null),n=v.useState({onScrollCapture:Pv,onWheelCapture:Pv,onTouchMoveCapture:Pv}),s=n[0],a=n[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,m=e.noRelative,g=e.noIsolation,p=e.inert,x=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,y=e.gapMode,_=jd(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=h,k=MH([r,t]),S=oi(oi({},_),s);return v.createElement(v.Fragment,null,d&&v.createElement(N,{sideCar:N3,removeScrollBar:u,shards:f,noRelative:m,n
vendor: 4,322 bytes, lines 543-580
543oIsolation:g,inert:p,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:y}),o?v.cloneElement(v.Children.only(l),oi(oi({},S),{ref:k})):v.createElement(w,oi({},S,{className:c,ref:k}),l))});Gx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Gx.classNames={fullWidth:Lm,zeroRight:Mm};var WH=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function zH(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=WH();return t&&e.setAttribute("nonce",t),e}function HH(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function VH(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var GH=function(){var e=0,t=null;return{add:function(r){e==0&&(t=zH())&&(HH(t,r),VH(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},qH=function(){var e=GH();return function(t,r){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},S3=function(){var e=qH(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},KH={left:0,top:0,right:0,gap:0},Rv=function(e){return parseInt(e||"",10)||0},YH=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Rv(r),Rv(n),Rv(s)]},XH=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return KH;var t=YH(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])}},QH=S3(),Au="data-scroll-locked",JH=function(e,t,r,n){var s=e.left,a=e.top,o=e.right,l=e.gap;return r===void 0&&(r="margin"),`
544  .`.concat(OH,` {
545   overflow: hidden `).concat(n,`;
546   padding-right: `).concat(l,"px ").concat(n,`;
547  }
548  body[`).concat(Au,`] {
549    overflow: hidden `).concat(n,`;
550    overscroll-behavior: contain;
551    `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
552    padding-left: `.concat(s,`px;
553    padding-top: `).concat(a,`px;
554    padding-right: `).concat(o,`px;
555    margin-left:0;
556    margin-top:0;
557    margin-right: `).concat(l,"px ").concat(n,`;
558    `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
559  }
560  
561  .`).concat(Mm,` {
562    right: `).concat(l,"px ").concat(n,`;
563  }
564  
565  .`).concat(Lm,` {
566    margin-right: `).concat(l,"px ").concat(n,`;
567  }
568  
569  .`).concat(Mm," .").concat(Mm,` {
570    right: 0 `).concat(n,`;
571  }
572  
573  .`).concat(Lm," .").concat(Lm,` {
574    margin-right: 0 `).concat(n,`;
575  }
576  
577  body[`).concat(Au,`] {
578    `).concat(DH,": ").concat(l,`px;
579  }
580`)},Dk=function(){var e=parseInt(document.body.getAttribute(Au)||"0",10);return isFinite(e)?e:0},ZH=function(){v.useEffect(function(){return document.body.setAttribute(Au,(Dk()+1).toString()),function(){var e=Dk()-1;e<=0?document.body.removeAttribute(Au):document.body.setAttribute(Au,e.toString())}},[])},eV=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;ZH();var a=v.useMemo(function(){return XH(s)},[s]);return v.createElement(QH,{styles:JH(a,!t,s,r?"":"!important")})},zy=!1;if(typeof window<"u")try{var tm=Object.defineProperty({},"passive",{get:function(){return zy=!0,!0}});window.addEventListener("test",tm,tm),window.removeEventListener("test",tm,tm)}catch{zy=!1}var Vc=zy?{passive:!1}:!1,tV=function(e){return e.tagName==="TEXTAREA"},k3=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!tV(e)&&r[t]==="visible")},rV=function(e){return k3(e,"overflowY")},nV=function(e){return k3(e,"overflowX")},Ik=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=j3(e,n);if(s){var a=E3(e,n),o=a[1],l=a[2];if(o>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},sV=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},aV=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},j3=function(e,t){return e==="v"?rV(t):nV(t)},E3=function(e,t){return e==="v"?sV(t):aV(t)},iV=function(e,t){return e==="h"&&t==="rtl"?-1:1},oV=function(e,t,r,n,s){var a=iV(e,window.getComputedStyle(t).direction),o=a*n,l=r.target,c=t.contains(l),u=!1,d=o>0,f=0,h=0;
vendor: 4,239 bytes, lines 580-583
580do{if(!l)break;var m=E3(e,l),g=m[0],p=m[1],x=m[2],b=p-x-a*g;(g||b)&&j3(e,l)&&(f+=b,h+=g);var w=l.parentNode;l=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(h)<1||!s))&&(u=!0),u},rm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Fk=function(e){return[e.deltaX,e.deltaY]},Mk=function(e){return e&&"current"in e?e.current:e},lV=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cV=function(e){return`
581  .block-interactivity-`.concat(e,` {pointer-events: none;}
582  .allow-interactivity-`).concat(e,` {pointer-events: all;}
583`)},uV=0,Gc=[];function dV(e){var t=v.useRef([]),r=v.useRef([0,0]),n=v.useRef(),s=v.useState(uV++)[0],a=v.useState(S3)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var p=sU([e.lockRef.current],(e.shards||[]).map(Mk),!0).filter(Boolean);return p.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),p.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=v.useCallback(function(p,x){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!o.current.allowPinchZoom;var b=rm(p),w=r.current,y="deltaX"in p?p.deltaX:w[0]-b[0],_="deltaY"in p?p.deltaY:w[1]-b[1],N,k=p.target,S=Math.abs(y)>Math.abs(_)?"h":"v";if("touches"in p&&S==="h"&&k.type==="range")return!1;var E=Ik(S,k);if(!E)return!0;if(E?N=S:(N=S==="v"?"h":"v",E=Ik(S,k)),!E)return!1;if(!n.current&&"changedTouches"in p&&(y||_)&&(n.current=N),!N)return!0;var j=n.current||N;return oV(j,x,p,j==="h"?y:_,!0)},[]),c=v.useCallback(function(p){var x=p;if(!(!Gc.length||Gc[Gc.length-1]!==a)){var b="deltaY"in x?Fk(x):rm(x),w=t.current.filter(function(N){return N.name===x.type&&(N.target===x.target||x.target===N.shadowParent)&&lV(N.delta,b)})[0];if(w&&w.should){x.cancelable&&x.preventDefault();return}if(!w){var y=(o.current.shards||[]).map(Mk).filter(Boolean).filter(function(N){return N.contains(x.target)}),_=y.length>0?l(x,y[0]):!o.current.noIsolation;_&&x.cancelable&&x.preventDefault()}}},[]),u=v.useCallback(function(p,x,b,w){var y={name:p,delta:x,target:b,should:w,shadowParent:fV(b)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(_){return _!==y})},1)},[]),d=v.useCallback(function(p){r.current=rm(p),n.current=void 0},[]),f=v.useCallback(function(p){u(p.type,Fk(p),p.target,l(p,e.lockRef.current))},[]),h=v.useCallback(function(p){u(p.type,rm(p),p.target,l(p,e.lockRef.current))},[]);v.useEffect(function(){return Gc.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Vc),document.addEventListener("touchmove",c,Vc),document.addEventListener("touchstart",d,Vc),function(){Gc=Gc.filter(function(p){return p!==a}),document.removeEventListener("wheel",c,Vc),document.removeEventListener("touchmove",c,Vc),document.removeEventListener("touchstart",d,Vc)}},[]);var m=e.removeScrollBar,g=e.inert;return v.createElement(v.Fragment,null,g?v.createElement(a,{styles:cV(s)}):null,m?v.createElement(eV,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function fV(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const hV=UH(N3,dV);var s0=v.forwardRef(function(e,t){return v.createElement(Gx,oi({},e,{ref:t,sideCar:hV}))});s0.classNames=Gx.classNames;var mV=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},qc=new WeakMap,nm=new WeakMap,sm={},Ov=0,C3=function(e){return e&&(e.host||C3(e.parentNode))},pV=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=C3(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})},xV=function(e,t,r,n){var s=pV(t,Array.isArray(e)?e:[e]);sm[r]||(sm[r]=new WeakMap);var a=sm[r],o=[],l=new Set,c=new Set(s),u=function(f){!f||l.has(f)||(l.add(f),u(f.parentNode))};
vendor: 6,946 bytes, lines 583-587
583s.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(l.has(h))d(h);else try{var m=h.getAttribute(n),g=m!==null&&m!=="false",p=(qc.get(h)||0)+1,x=(a.get(h)||0)+1;qc.set(h,p),a.set(h,x),o.push(h),p===1&&g&&nm.set(h,!0),x===1&&h.setAttribute(r,"true"),g||h.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",h,b)}})};return d(t),l.clear(),Ov++,function(){o.forEach(function(f){var h=qc.get(f)-1,m=a.get(f)-1;qc.set(f,h),a.set(f,m),h||(nm.has(f)||f.removeAttribute(n),nm.delete(f)),m||f.removeAttribute(r)}),Ov--,Ov||(qc=new WeakMap,qc=new WeakMap,nm=new WeakMap,sm={})}},qx=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=mV(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),xV(n,s,r,"aria-hidden")):function(){return null}},Kx="Dialog",[T3,A3]=tn(Kx),[gV,Xa]=T3(Kx),P3=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:a,modal:o=!0}=e,l=v.useRef(null),c=v.useRef(null),[u,d]=ps({prop:n,defaultProp:s??!1,onChange:a,caller:Kx});return i.jsx(gV,{scope:t,triggerRef:l,contentRef:c,contentId:Us(),titleId:Us(),descriptionId:Us(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(f=>!f),[d]),modal:o,children:r})};P3.displayName=Kx;var R3="DialogTrigger",O3=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Xa(R3,r),a=ot(t,s.triggerRef);return i.jsx(He.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Yb(s.open),...n,ref:a,onClick:ke(e.onClick,s.onOpenToggle)})});O3.displayName=R3;var qb="DialogPortal",[vV,D3]=T3(qb,{forceMount:void 0}),I3=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,a=Xa(qb,t);return i.jsx(vV,{scope:t,forceMount:r,children:v.Children.map(n,o=>i.jsx(rn,{present:r||a.open,children:i.jsx(yd,{asChild:!0,container:s,children:o})}))})};I3.displayName=qb;var Rp="DialogOverlay",F3=v.forwardRef((e,t)=>{const r=D3(Rp,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,a=Xa(Rp,e.__scopeDialog);return a.modal?i.jsx(rn,{present:n||a.open,children:i.jsx(wV,{...s,ref:t})}):null});F3.displayName=Rp;var yV=tl("DialogOverlay.RemoveScroll"),wV=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Xa(Rp,r);return i.jsx(s0,{as:yV,allowPinchZoom:!0,shards:[s.contentRef],children:i.jsx(He.div,{"data-state":Yb(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),hc="DialogContent",M3=v.forwardRef((e,t)=>{const r=D3(hc,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,a=Xa(hc,e.__scopeDialog);return i.jsx(rn,{present:n||a.open,children:a.modal?i.jsx(bV,{...s,ref:t}):i.jsx(_V,{...s,ref:t})})});M3.displayName=hc;var bV=v.forwardRef((e,t)=>{const r=Xa(hc,e.__scopeDialog),n=v.useRef(null),s=ot(t,r.contentRef,n);return v.useEffect(()=>{const a=n.current;if(a)return qx(a)},[]),i.jsx(L3,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ke(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ke(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&a.preventDefault()}),onFocusOutside:ke(e.onFocusOutside,a=>a.preventDefault())})}),_V=v.forwardRef((e,t)=>{const r=Xa(hc,e.__scopeDialog),n=v.useRef(!1),s=v.useRef(!1);return i.jsx(L3,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})}),L3=v.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:a,...o}=e,l=Xa(hc,r),c=v.useRef(null),u=ot(t,c);return Vx(),i.jsxs(i.Fragment,{children:[i.jsx(n0,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:a,children:i.jsx(Sc,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Yb(l.open),...o,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(SV,{titleId:l.titleId}),i.jsx(jV,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Kb="DialogTitle",B3=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Xa(Kb,r);return i.jsx(He.h2,{id:s.titleId,...n,ref:t})});B3.displayName=Kb;var $3="DialogDescription",U3=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Xa($3,r);return i.jsx(He.p,{id:s.descriptionId,...n,ref:t})});U3.displayName=$3;var W3="DialogClose",z3=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Xa(W3,r);return i.jsx(He.button,{type:"button",...n,ref:t,onClick:ke(e.onClick,()=>s.onOpenChange(!1))})});z3.displayName=W3;function Yb(e){return e?"open":"closed"}var H3="DialogTitleWarning",[NV,V3]=y8(H3,{contentName:hc,titleName:Kb,docsSlug:"dialog"}),SV=({titleId:e})=>{const t=V3(H3),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
584
585If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
586
587For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},kV="DialogDescriptionWarning",jV=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${V3(kV).contentName}}.`;return v.useEffect(()=>{var a;const s=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},G3=P3,q3=O3,K3=I3,Xb=F3,Qb=M3,Jb=B3,Zb=U3,e_=z3;const Ht=G3,va=q3,EV=K3,Y3=v.forwardRef(({className:e,...t},r)=>i.jsx(Xb,{ref:r,className:xe("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}));Y3.displayName=Xb.displayName;const Ut=v.forwardRef(({className:e,children:t,...r},n)=>i.jsxs(EV,{children:[i.jsx(Y3,{}),i.jsxs(Qb,{ref:n,className:xe("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,i.jsxs(e_,{className:"absolute right-4 top-4 roun
587ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[i.jsx(es,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ut.displayName=Qb.displayName;const Wt=({className:e,...t})=>i.jsx("div",{className:xe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Wt.displayName="DialogHeader";const Yx=({className:e,...t})=>i.jsx("div",{className:xe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Yx.displayName="DialogFooter";const zt=v.forwardRef(({className:e,...t},r)=>i.jsx(Jb,{ref:r,className:xe("text-lg font-semibold leading-none tracking-tight",e),...t}));zt.displayName=Jb.displayName;const a0=v.forwardRef(({className:e,...t},r)=>i.jsx(Zb,{ref:r,className:xe("text-sm text-muted-foreground",e),...t}));a0.displayName=Zb.displayName;function Xx(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Qx="Checkbox",[CV,q0e]=tn(Qx),[TV,t_]=CV(Qx);function AV(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:s,disabled:a,form:o,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:f}=e,[h,m]=ps({prop:r,defaultProp:s??!1,onChange:c,caller:Qx}),[g,p]=v.useState(null),[x,b]=v.useState(null),w=v.useRef(!1),y=g?!!o||!!g.closest("form"):!0,_={checked:h,disabled:a,setChecked:m,control:g,setControl:p,name:l,form:o,value:d,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:Jo(s)?!1:s,isFormControl:y,bubbleInput:x,setBubbleInput:b};return i.jsx(TV,{scope:t,..._,children:PV(f)?f(_):n})}var X3="CheckboxTrigger",Q3=v.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},s)=>{const{control:a,value:o,disabled:l,checked:c,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:m,bubbleInput:g}=t_(X3,e),p=ot(s,d),x=v.useRef(c);return v.useEffect(()=>{const b=a==null?void 0:a.form;if(b){const w=()=>f(x.current);return b.addEventListener("reset",w),()=>b.removeEventListener("reset",w)}},[a,f]),i.jsx(He.button,{type:"button",role:"checkbox","aria-checked":Jo(c)?"mixed":c,"aria-required":u,"data-state":rP(c),"data-disabled":l?"":void 0,disabled:l,value:o,...n,ref:p,onKeyDown:ke(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:ke(r,b=>{f(w=>Jo(w)?!0:!w),g&&m&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})})});Q3.displayName=X3;var r_=v.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:a,required:o,disabled:l,value:c,onCheckedChange:u,form:d,...f}=e;return i.jsx(AV,{__scopeCheckbox:r,checked:s,defaultChecked:a,disabled:l,required:o,onCheckedChange:u,name:n,form:d,value:c,internal_do_not_use_render:({isFormControl:h})=>i.jsxs(i.Fragment,{children:[i.jsx(Q3,{...f,ref:t,__scopeCheckbox:r}),h&&i.jsx(tP,{__scopeCheckbox:r})]})})});r_.displayName=Qx;var J3="CheckboxIndicator",Z3=v.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...s}=e,a=t_(J3,r);return i.jsx(rn,{present:n||Jo(a.checked)||a.checked===!0,children:i.jsx(He.span,{"data-state":rP(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});Z3.displayName=J3;var eP="CheckboxBubbleInput",tP=v.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:a,defaultChecked:o,required:l,disabled:c,name:u,value:d,form:f,bubbleInput:h,setBubbleInput:m}=t_(eP,e),g=ot(r,m),p=Xx(a),x=Rx(n);v.useEffect(()=>{const w=h;if(!w)return;const y=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(y,"checked").set,k=!s.current;if(p!==a&&N){const S=new Event("click",{bubbles:k});w.indeterminate=Jo(a),N.call(w,Jo(a)?!1:a),w.dispatchEvent(S)}},[h,p,a,s]);const b=v.useRef(Jo(a)?!1:a);return i.jsx(He.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??b.current,required:l,disabled:c,name:u,value:d,form:f,...t,tabIndex:-1,ref:g,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});tP.displayName=eP;function PV(e){return typeof e=="function"}function Jo(e){return e==="indeterminate"}function rP(e){return Jo(e)?"indeterminate":e?"checked":"unchecked"}const jc=v.forwardRef(({className:e,...t},r)=>i.jsx(r_,{ref:r,className:xe("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-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",e),...t,children:i.jsx(Z3,{className:xe("flex items-center justify-center text-current"),children:i.jsx(hn,{className:"h-4 w-4"})})}));jc.displayName=r_.displayName;function RV({onAddStudent:e}){const[t,r]=v.useState(!1),[n,s]=v.useState(""),[a,o]=v.useState(""),[l,c]=v.useState(""),[u,d]=v.useState(""),[f,h]=v.useState([]),[m,g]=v.useState(!1),{activeCourses:p}=xl(),x=y=>{const _=y.replace(/\D/g,"");return!(_.length<5||_.length>9)},b=y=>{h(_=>_.includes(y)?_.filter(N=>N!==y):[..._,y])},w=async y=>{if(y.preventDefault(),!n.trim()){K.error("נא להזין שם תלמיד");return}if(!a.trim()){K.error("נא להזין תעודת זהות");return}if(!x(a)){K.error("תעודת זהות לא תקינה");return}if(!l.trim()||!/^0\d{2}-?\d{7}$/.test(l.replace(/-/g,""))){K.error("נא להזין מספר טלפון תקי×
587Ÿ (לדוגמה: 050-1234567)");return}g(!0);try{const _=await e({name:n.trim(),idNumber:a.trim(),phone:l.trim(),email:u.trim()||void 0,courses:f});if(!_.success){_.error==="duplicate_id"?K.error("תעודת זהות זו כבר קיימת במערכת"):_.error==="duplicate_phone"&&K.error("מספר טלפון זה כבר קיים במערכת");return}K.success(`התלמיד ${n} נוסף בהצלחה!`),s(""),o(""),c(""),d(""),h([]),r(!1)}catch{K.error("שגיאה בהוספת התלמיד")}finally{g(!1)}};return i.jsxs(Ht,{open:t,onOpenChange:r,children:[i.jsx(va,{asChild:!0,children:i.jsxs(ee,{variant:"rose",className:"gap-2",children:[i.jsx(_b,{className:"h-4 w-4"}),"הוסף תלמיד"]})}),i.jsxs(Ut,{className:"sm:max-w-md",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"הוספת תלמיד חדש"})}),i.jsxs("form",{onSubmit:w,className:"space-y-4 mt-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"name",children:"שם מלא"}),i.jsx(Oe,{id:"name",placeholder:"הזן שם מלא",value:n,onChange:y=>s(y.target.value),className:"text-right"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"idNumber",children:"תעודת זהות"}),i.jsx(Oe,{id:"idNumber",placeholder:"123456789",value:a,onChange:y=>o(y.target.value.replace(/\D/g,"").slice(0,9)),className:"text-right",dir:"ltr",maxLength:9})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"phone",children:"מספר טלפון"}),i.jsx(Oe,{id:"phone",placeholder:"050-1234567",value:l,onChange:y=>c(y.target.value),className:"text-right",dir:"ltr"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"מספר הטלפון ישמש להתחברות למערכת"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"email",children:"אימייל (אופציונלי)"}),i.jsx(Oe,{id:"email",type:"email",placeholder:"[email protected]",value:u,onChange:y=>d(y.target.value),className:"text-right",dir:"ltr"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"שיוך לקורסים"}),i.jsx("div",{className:"border border-border rounded-lg p-3 max-h-40 overflow-y-auto space-y-2",children:p.length===0?i.jsx("p",{className:"text-sm text-muted-foreground text-center py-2",children:"אין קורסים זמינים"}):p.map(y=>i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(jc,{id:`course-${y.id}`,checked:f.includes(y.name),onCheckedChange:()=>b(y.name)}),i.jsx("label",{htmlFor:`course-${y.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:y.name})]},y.id))}),f.length>0&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:["נבחרו ",f.length," קורסים"]})]}),i.jsxs("div",{className:"flex gap-3 pt-4",children:[i.jsx(ee,{type:"submit",variant:"rose",className:"flex-1",disabled:m,children:m?"מוסיף...":"הוסף תלמיד"}),i.jsx(ee,{type:"button",variant:"outline",onClick:()=>r(!1),children:"ביטול"})]})]})]})]})}/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var Op={};Op.version="0.18.5";var nP=1252,OV=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],n_={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},s_=function(e){OV.indexOf(e)!=-1&&(nP=n_[0]=e)};function DV(){s_(1252)}var Fa=function(e){s_(e)};function a_(){Fa(1200),DV()}function Lk(e){for(var t=[],r=0,n=e.length;r<n;++r)t[r]=e.charCodeAt(r);return t}function IV(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r)+(e.charCodeAt(2*r+1)<<8));return t.join("")}function sP(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r+1)+(e.charCodeAt(2*r)<<8));return t.join("")}var of=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1);return t==255&&r==254?IV(e.slice(2)):t==254&&r==255?sP(e.slice(2)):t==65279?e.slice(1):e},am=function(t){return String.fromCharCode(t)},Bk=function(t){return String.fromCharCode(t)},Co,Bo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
587+/=";function vh(e){for(var t="",r=0,n=0,s=0,a=0,o=0,l=0,c=0,u=0;u<e.length;)r=e.charCodeAt(u++),a=r>>2,n=e.charCodeAt(u++),o=(r&3)<<4|n>>4,s=e.charCodeAt(u++),l=(n&15)<<2|s>>6,c=s&63,isNaN(n)?l=c=64:isNaN(s)&&(c=64),t+=Bo.charAt(a)+Bo.charAt(o)+Bo.charAt(l)+Bo.charAt(c);return t}function Gs(e){var t="",r=0,n=0,s=0,a=0,o=0,l=0,c=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var u=0;u<e.length;)a=Bo.indexOf(e.charAt(u++)),o=Bo.indexOf(e.charAt(u++)),r=a<<2|o>>4,t+=String.fromCharCode(r),l=Bo.indexOf(e.charAt(u++)),n=(o&15)<<4|l>>2,l!==64&&(t+=String.fromCharCode(n)),c=Bo.indexOf(e.charAt(u++)),s=(l&3)<<6|c,c!==64&&(t+=String.fromCharCode(s));return t}var Nt=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),io=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,r){return r?new Buffer(t,r):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}}();function il(e){return Nt?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function $k(e){return Nt?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var Fs=function(t){return Nt?io(t,"binary"):t.split("").map(function(r){return r.charCodeAt(0)&255})};function Jx(e){if(typeof ArrayBuffer>"u")return Fs(e);
587for(var t=new ArrayBuffer(e.length),r=new Uint8Array(t),n=0;n!=e.length;++n)r[n]=e.charCodeAt(n)&255;return t}function vl(e){if(Array.isArray(e))return e.map(function(n){return String.fromCharCode(n)}).join("");for(var t=[],r=0;r<e.length;++r)t[r]=String.fromCharCode(e[r]);return t.join("")}function FV(e){if(typeof Uint8Array>"u")throw new Error("Unsupported");return new Uint8Array(e)}function i_(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return i_(new Uint8Array(e));for(var t=new Array(e.length),r=0;r<e.length;++r)t[r]=e[r];return t}var gn=Nt?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:io(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,r=0;for(t=0;t<e.length;++t)r+=e[t].length;var n=new Uint8Array(r),s=0;for(t=0,r=0;t<e.length;r+=s,++t)if(s=e[t].length,e[t]instanceof Uint8Array)n.set(e[t],r);else{if(typeof e[t]=="string")throw"wtf";n.set(new Uint8Array(e[t]),r)}return n}return[].concat.apply([],e.map(function(a){return Array.isArray(a)?a:[].slice.call(a)}))};function MV(e){for(var t=[],r=0,n=e.length+250,s=il(e.length+255),a=0;a<e.length;++a){var o=e.charCodeAt(a);if(o<128)s[r++]=o;else if(o<2048)s[r++]=192|o>>6&31,s[r++]=128|o&63;else if(o>=55296&&o<57344){o=(o&1023)+64;var l=e.charCodeAt(++a)&1023;s[r++]=240|o>>8&7,s[r++]=128|o>>2&63,s[r++]=128|l>>6&15|(o&3)<<4,s[r++]=128|l&63}else s[r++]=224|o>>12&15,s[r++]=128|o>>6&63,s[r++]=128|o&63;r>n&&(t.push(s.slice(0,r)),r=0,s=il(65535),n=65530)}return t.push(s.slice(0,r)),gn(t)}var Zn=/\u0000/g,lf=/[\u0001-\u0006]/g;function Pu(e){for(var t="",r=e.length-1;r>=0;)t+=e.charAt(r--);return t}function Ma(e,t){var r=""+e;return r.length>=t?r:Ir("0",t-r.length)+r}function o_(e,t){var r=""+e;return r.length>=t?r:Ir(" ",t-r.length)+r}function Dp(e,t){var r=""+e;return r.length>=t?r:r+Ir(" ",t-r.length)}function LV(e,t){var r=""+Math.round(e);return r.length>=t?r:Ir("0",t-r.length)+r}function BV(e,t){var r=""+e;return r.length>=t?r:Ir("0",t-r.length)+r}var Uk=Math.pow(2,32);function Kc(e,t){if(e>Uk||e<-Uk)return LV(e,t);var r=Math.round(e);return BV(r,t)}function Ip(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var Wk=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],Dv=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function $V(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var it={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},zk={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},UV={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);
587_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function Fp(e,t,r){for(var n=e<0?-1:1,s=e*n,a=0,o=1,l=0,c=1,u=0,d=0,f=Math.floor(s);u<t&&(f=Math.floor(s),l=f*o+a,d=f*u+c,!(s-f<5e-8));)s=1/(s-f),a=o,o=l,c=u,u=d;if(d>t&&(u>t?(d=c,l=a):(d=u,l=o)),!r)return[0,n*l,d];var h=Math.floor(n*l/d);return[h,n*l-h*d,d]}function Gl(e,t,r){if(e>2958465||e<0)return null;var n=e|0,s=Math.floor(86400*(e-n)),a=0,o=[],l={D:n,T:s,u:86400*(e-n)-s,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(l.u)<1e-6&&(l.u=0),t&&t.date1904&&(n+=1462),l.u>.9999&&(l.u=0,++s==86400&&(l.T=s=0,++n,++l.D)),n===60)o=r?[1317,10,29]:[1900,2,29],a=3;else if(n===0)o=r?[1317,8,29]:[1900,1,0],a=6;else{n>60&&--n;var c=new Date(1900,0,1);c.setDate(c.getDate()+n-1),o=[c.getFullYear(),c.getMonth()+1,c.getDate()],a=c.getDay(),n<60&&(a=(a+6)%7),r&&(a=qV(c,o))}return l.y=o[0],l.m=o[1],l.d=o[2],l.S=s%60,s=Math.floor(s/60),l.M=s%60,s=Math.floor(s/60),l.H=s,l.q=a,l}var aP=new Date(1899,11,31,0,0,0),WV=aP.getTime(),zV=new Date(1900,2,1,0,0,0);function iP(e,t){var r=e.getTime();
vendor: 5,007 bytes, line 587
587return t?r-=1461*24*60*60*1e3:e>=zV&&(r+=24*60*60*1e3),(r-(WV+(e.getTimezoneOffset()-aP.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function l_(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function HV(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function VV(e){var t=e<0?12:11,r=l_(e.toFixed(12));return r.length<=t||(r=e.toPrecision(10),r.length<=t)?r:e.toExponential(5)}function GV(e){var t=l_(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function yh(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),r;return t>=-4&&t<=-1?r=e.toPrecision(10+t):Math.abs(t)<=9?r=VV(e):t===10?r=e.toFixed(10).substr(0,12):r=GV(e),l_(HV(r.toUpperCase()))}function mc(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):yh(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return xa(14,iP(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function qV(e,t){t[0]-=581;var r=e.getDay();return e<60&&(r=(r+6)%7),r}function KV(e,t,r,n){var s="",a=0,o=0,l=r.y,c,u=0;switch(e){case 98:l=r.y+543;case 121:switch(t.length){case 1:case 2:c=l%100,u=2;break;default:c=l%1e4,u=4;break}break;case 109:switch(t.length){case 1:case 2:c=r.m,u=t.length;break;case 3:return Dv[r.m-1][1];case 5:return Dv[r.m-1][0];default:return Dv[r.m-1][2]}break;case 100:switch(t.length){case 1:case 2:c=r.d,u=t.length;break;case 3:return Wk[r.q][0];default:return Wk[r.q][1]}break;case 104:switch(t.length){case 1:case 2:c=1+(r.H+11)%12,u=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:c=r.H,u=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:c=r.M,u=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return r.u===0&&(t=="s"||t=="ss")?Ma(r.S,t.length):(n>=2?o=n===3?1e3:100:o=n===1?10:1,a=Math.round(o*(r.S+r.u)),a>=60*o&&(a=0),t==="s"?a===0?"0":""+a/o:(s=Ma(a,2+n),t==="ss"?s.substr(0,2):"."+s.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":c=r.D*24+r.H;break;case"[m]":case"[mm]":c=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":c=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+t}u=t.length===3?1:2;break;case 101:c=l,u=1;break}var d=u>0?Ma(c,u):"";return d}function $o(e){var t=3;if(e.length<=t)return e;for(var r=e.length%t,n=e.substr(0,r);r!=e.length;r+=t)n+=(n.length>0?",":"")+e.substr(r,t);return n}var oP=/%/g;function YV(e,t,r){var n=t.replace(oP,""),s=t.length-n.length;return zi(e,n,r*Math.pow(10,2*s))+Ir("%",s)}function XV(e,t,r){for(var n=t.length-1;t.charCodeAt(n-1)===44;)--n;return zi(e,t.substr(0,n),r/Math.pow(10,3*(t.length-n)))}function lP(e,t){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+lP(e,-t);var s=e.indexOf(".");s===-1&&(s=e.indexOf("E"));var a=Math.floor(Math.log(t)*Math.LOG10E)%s;if(a<0&&(a+=s),r=(t/Math.pow(10,a)).toPrecision(n+1+(s+a)%s),r.indexOf("e")===-1){var o=Math.floor(Math.log(t)*Math.LOG10E);for(r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(o-r.length+a):r+="E+"+(o-a);r.substr(0,2)==="0.";)r=r.charAt(0)+r.substr(2,s)+"."+r.substr(2+s),r=r.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(l,c,u,d){return c+u+d.substr(0,(s+a)%s)+"."+d.substr(a)+"E"})}else r=t.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var cP=/# (\?+)( ?)\/( ?)(\d+)/;function QV(e,t,r){var n=parseInt(e[4],10),s=Math.round(t*n),a=Math.floor(s/n),o=s-a*n,l=n;return r+(a===0?"":""+a)+" "+(o===0?Ir(" ",e[1].length+1+e[4].length):o_(o,e[1].length)+e[2]+"/"+e[3]+Ma(l,e[4].length))}function JV(e,t,r){return r+(t===0?"":""+t)+Ir(" ",e[1].length+2+e[4].length)}var uP=/^#*0*\.([0#]+)/,dP=/\).*[0#]/,fP=/\(###\) ###\\?-####/;function Yn(e){for(var t="",r,n=0;n!=e.length;++n)switch(r=e.charCodeAt(n)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(r)}return t}function Hk(e,t){var r=Math.pow(10,t);return""+Math.round(e*r)/r}function Vk(e,t){var r=e-Math.floor(e),n=Math.pow(10,t);return t<(""+Math.round(r*n)).length?0:Math.round(r*n)}function ZV(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function eG(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function Zs(e,t,r){if(e.charCodeAt(0)===40&&!t.match(dP)){var n=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?Zs("n",n,r):"("+Zs("n",n,-r)+")"}if(t.charCodeAt(t.length-1)===44)return XV(e,t,r);if(t.indexOf("%")!==-1)return YV(e,t,r);if(t.indexOf("E")!==-1)return lP(t,r);
vendor: 3,365 bytes, line 587
587if(t.charCodeAt(0)===36)return"$"+Zs(e,t.substr(t.charAt(1)==" "?2:1),r);var s,a,o,l,c=Math.abs(r),u=r<0?"-":"";if(t.match(/^00+$/))return u+Kc(c,t.length);if(t.match(/^[#?]+$/))return s=Kc(r,0),s==="0"&&(s=""),s.length>t.length?s:Yn(t.substr(0,t.length-s.length))+s;if(a=t.match(cP))return QV(a,c,u);if(t.match(/^#+0+$/))return u+Kc(c,t.length-t.indexOf("0"));if(a=t.match(uP))return s=Hk(r,a[1].length).replace(/^([^\.]+)$/,"$1."+Yn(a[1])).replace(/\.$/,"."+Yn(a[1])).replace(/\.(\d*)$/,function(g,p){return"."+p+Ir("0",Yn(a[1]).length-p.length)}),t.indexOf("0.")!==-1?s:s.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),a=t.match(/^(0*)\.(#*)$/))return u+Hk(c,a[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,a[1].length?"0.":".");if(a=t.match(/^#{1,3},##0(\.?)$/))return u+$o(Kc(c,0));if(a=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+Zs(e,t,-r):$o(""+(Math.floor(r)+ZV(r,a[1].length)))+"."+Ma(Vk(r,a[1].length),a[1].length);if(a=t.match(/^#,#*,#0/))return Zs(e,t.replace(/^#,#*,/,""),r);if(a=t.match(/^([0#]+)(\\?-([0#]+))+$/))return s=Pu(Zs(e,t.replace(/[\\-]/g,""),r)),o=0,Pu(Pu(t.replace(/\\/g,"")).replace(/[0#]/g,function(g){return o<s.length?s.charAt(o++):g==="0"?"0":""}));if(t.match(fP))return s=Zs(e,"##########",r),"("+s.substr(0,3)+") "+s.substr(3,3)+"-"+s.substr(6);var d="";if(a=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(a[4].length,7),l=Fp(c,Math.pow(10,o)-1,!1),s=""+u,d=zi("n",a[1],l[1]),d.charAt(d.length-1)==" "&&(d=d.substr(0,d.length-1)+"0"),s+=d+a[2]+"/"+a[3],d=Dp(l[2],o),d.length<a[4].length&&(d=Yn(a[4].substr(a[4].length-d.length))+d),s+=d,s;if(a=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(Math.max(a[1].length,a[4].length),7),l=Fp(c,Math.pow(10,o)-1,!0),u+(l[0]||(l[1]?"":"0"))+" "+(l[1]?o_(l[1],o)+a[2]+"/"+a[3]+Dp(l[2],o):Ir(" ",2*o+1+a[2].length+a[3].length));if(a=t.match(/^[#0?]+$/))return s=Kc(r,0),t.length<=s.length?s:Yn(t.substr(0,t.length-s.length))+s;if(a=t.match(/^([#0?]+)\.([#0]+)$/)){s=""+r.toFixed(Math.min(a[2].length,10)).replace(/([^0])0+$/,"$1"),o=s.indexOf(".");var f=t.indexOf(".")-o,h=t.length-s.length-f;return Yn(t.substr(0,f)+s+t.substr(t.length-h))}if(a=t.match(/^00,000\.([#0]*0)$/))return o=Vk(r,a[1].length),r<0?"-"+Zs(e,t,-r):$o(eG(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(g){return"00,"+(g.length<3?Ma(0,3-g.length):"")+g})+"."+Ma(o,a[1].length);switch(t){case"###,##0.00":return Zs(e,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var m=$o(Kc(c,0));return m!=="0"?u+m:"";case"###,###.00":return Zs(e,"###,##0.00",r).replace(/^0\./,".");case"#,###.00":return Zs(e,"#,##0.00",r).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function tG(e,t,r){for(var n=t.length-1;t.charCodeAt(n-1)===44;)--n;return zi(e,t.substr(0,n),r/Math.pow(10,3*(t.length-n)))}function rG(e,t,r){var n=t.replace(oP,""),s=t.length-n.length;return zi(e,n,r*Math.pow(10,2*s))+Ir("%",s)}function hP(e,t){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+hP(e,-t);var s=e.indexOf(".");s===-1&&(s=e.indexOf("E"));var a=Math.floor(Math.log(t)*Math.LOG10E)%s;if(a<0&&(a+=s),r=(t/Math.pow(10,a)).toPrecision(n+1+(s+a)%s),!r.match(/[Ee]/)){var o=Math.floor(Math.log(t)*Math.LOG10E);r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(o-r.length+a):r+="E+"+(o-a),r
vendor: 6,201 bytes, line 587
587=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(l,c,u,d){return c+u+d.substr(0,(s+a)%s)+"."+d.substr(a)+"E"})}else r=t.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}function ei(e,t,r){if(e.charCodeAt(0)===40&&!t.match(dP)){var n=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?ei("n",n,r):"("+ei("n",n,-r)+")"}if(t.charCodeAt(t.length-1)===44)return tG(e,t,r);if(t.indexOf("%")!==-1)return rG(e,t,r);if(t.indexOf("E")!==-1)return hP(t,r);if(t.charCodeAt(0)===36)return"$"+ei(e,t.substr(t.charAt(1)==" "?2:1),r);var s,a,o,l,c=Math.abs(r),u=r<0?"-":"";if(t.match(/^00+$/))return u+Ma(c,t.length);if(t.match(/^[#?]+$/))return s=""+r,r===0&&(s=""),s.length>t.length?s:Yn(t.substr(0,t.length-s.length))+s;if(a=t.match(cP))return JV(a,c,u);if(t.match(/^#+0+$/))return u+Ma(c,t.length-t.indexOf("0"));if(a=t.match(uP))return s=(""+r).replace(/^([^\.]+)$/,"$1."+Yn(a[1])).replace(/\.$/,"."+Yn(a[1])),s=s.replace(/\.(\d*)$/,function(g,p){return"."+p+Ir("0",Yn(a[1]).length-p.length)}),t.indexOf("0.")!==-1?s:s.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),a=t.match(/^(0*)\.(#*)$/))return u+(""+c).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,a[1].length?"0.":".");if(a=t.match(/^#{1,3},##0(\.?)$/))return u+$o(""+c);if(a=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+ei(e,t,-r):$o(""+r)+"."+Ir("0",a[1].length);if(a=t.match(/^#,#*,#0/))return ei(e,t.replace(/^#,#*,/,""),r);if(a=t.match(/^([0#]+)(\\?-([0#]+))+$/))return s=Pu(ei(e,t.replace(/[\\-]/g,""),r)),o=0,Pu(Pu(t.replace(/\\/g,"")).replace(/[0#]/g,function(g){return o<s.length?s.charAt(o++):g==="0"?"0":""}));if(t.match(fP))return s=ei(e,"##########",r),"("+s.substr(0,3)+") "+s.substr(3,3)+"-"+s.substr(6);var d="";if(a=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(a[4].length,7),l=Fp(c,Math.pow(10,o)-1,!1),s=""+u,d=zi("n",a[1],l[1]),d.charAt(d.length-1)==" "&&(d=d.substr(0,d.length-1)+"0"),s+=d+a[2]+"/"+a[3],d=Dp(l[2],o),d.length<a[4].length&&(d=Yn(a[4].substr(a[4].length-d.length))+d),s+=d,s;if(a=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(Math.max(a[1].length,a[4].length),7),l=Fp(c,Math.pow(10,o)-1,!0),u+(l[0]||(l[1]?"":"0"))+" "+(l[1]?o_(l[1],o)+a[2]+"/"+a[3]+Dp(l[2],o):Ir(" ",2*o+1+a[2].length+a[3].length));if(a=t.match(/^[#0?]+$/))return s=""+r,t.length<=s.length?s:Yn(t.substr(0,t.length-s.length))+s;if(a=t.match(/^([#0]+)\.([#0]+)$/)){s=""+r.toFixed(Math.min(a[2].length,10)).replace(/([^0])0+$/,"$1"),o=s.indexOf(".");var f=t.indexOf(".")-o,h=t.length-s.length-f;return Yn(t.substr(0,f)+s+t.substr(t.length-h))}if(a=t.match(/^00,000\.([#0]*0)$/))return r<0?"-"+ei(e,t,-r):$o(""+r).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(g){return"00,"+(g.length<3?Ma(0,3-g.length):"")+g})+"."+Ma(0,a[1].length);switch(t){case"###,###":case"##,###":case"#,###":var m=$o(""+c);return m!=="0"?u+m:"";default:if(t.match(/\.[0#?]*$/))return ei(e,t.slice(0,t.lastIndexOf(".")),r)+Yn(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function zi(e,t,r){return(r|0)===r?ei(e,t,r):Zs(e,t,r)}function nG(e){for(var t=[],r=!1,n=0,s=0;n<e.length;++n)switch(e.charCodeAt(n)){case 34:r=!r;break;case 95:case 42:case 92:++n;break;case 59:t[t.length]=e.substr(s,n-s),s=n+1}if(t[t.length]=e.substr(s),r===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var mP=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function Ed(e){for(var t=0,r="",n="";t<e.length;)switch(r=e.charAt(t)){case"G":Ip(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="上午/下午")return!0;++t;break;case"[":for(n=r;e.charAt(t++)!=="]"&&t<e.length;)n+=e.charAt(t);if(n.match(mP))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(r=e.charAt(++t))>-1||r=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===r;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}function sG(e,t,r,n){for(var s=[],a="",o=0,l="",c="t",u,d,f,h="H";o<e.length;)switch(l=e.charAt(o)){case"G":if(!Ip(e,o))throw new Error("unrecognized character "+l+" in "+e);s[s.length]={t:"G",v:"General"},o+=7;break;case'"':for(a="";(f=e.charCodeAt(++o))!==34&&o<e.length;)a+=String.fromCharCode(f);s[s.length]={t:"t",v:a},++o;break;case"\\":var m=e.charAt(++o),g=m==="("||m===")"?m:"t";s[s.length]={t:g,v:m},++o;break;case"_":s[s.length]={t:"t",v:" "},o+=2;break;case"@":s[s.length]={t:"T",v:t},++o;break;case"B":case"b":if(e.charAt(o+1)==="1"||e.charAt(o+1)==="2"){if(u==null&&(u=Gl(t,r,e.charAt(o+1)==="2"),u==null))return"";s[s.length]={t:"X",v:e.substr(o,2)},c=l,o+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":l=l.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0||u==null&&(u=Gl(t,r),u==null))return"";for(a=l;++o<e.length&&e.charAt(o).toLowerCase()===l;)a+=l;l==="m"&&c.toLowerCase()==="h"&&(l="M"),l==="h"&&(l=h),s[s.length]={t:l,v:a},c=l;break;case"A":case"a":case"上":var p={t:l,v:l};if(u==null&&(u=Gl(t,r)),e.substr(o,3).toUpperCase()==="A/P"?(u!=null&&(p.v=u.H>=12?"P":"A"),p.t="T",h="h",o+=3):e.substr(o,5).toUpperCase()==="AM/PM"?(u!=null&&(p.v=u.H>=12?"PM":"AM"),p.t="T",o+=5,h="h"):e.substr(o,5).toUpperCase()==="上午/下午"?(u!=null&&(p.v=u.H>=12?"下午":"上午"),p.t="T",o+=5,h="h"):(p.t="t",++o),u==null&&p.t==="T")return"";s[s.length]=p,c=l;break;case"[":for(a=l;e.charAt(o++)!=="]"&&o<e.length;)a+=e.charAt(o);if(a.slice(-1)!=="]")throw'unterminated "[" block: |'+a+"|";
vendor: 6,635 bytes, line 587
587if(a.match(mP)){if(u==null&&(u=Gl(t,r),u==null))return"";s[s.length]={t:"Z",v:a.toLowerCase()},c=a.charAt(1)}else a.indexOf("$")>-1&&(a=(a.match(/\$([^-\[\]]*)/)||[])[1]||"$",Ed(e)||(s[s.length]={t:"t",v:a}));break;case".":if(u!=null){for(a=l;++o<e.length&&(l=e.charAt(o))==="0";)a+=l;s[s.length]={t:"s",v:a};break}case"0":case"#":for(a=l;++o<e.length&&"0#?.,E+-%".indexOf(l=e.charAt(o))>-1;)a+=l;s[s.length]={t:"n",v:a};break;case"?":for(a=l;e.charAt(++o)===l;)a+=l;s[s.length]={t:l,v:a},c=l;break;case"*":++o,(e.charAt(o)==" "||e.charAt(o)=="*")&&++o;break;case"(":case")":s[s.length]={t:n===1?"t":l,v:l},++o;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(a=l;o<e.length&&"0123456789".indexOf(e.charAt(++o))>-1;)a+=e.charAt(o);s[s.length]={t:"D",v:a};break;case" ":s[s.length]={t:l,v:l},++o;break;case"$":s[s.length]={t:"t",v:"$"},++o;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(l)===-1)throw new Error("unrecognized character "+l+" in "+e);s[s.length]={t:"t",v:l},++o;break}var x=0,b=0,w;for(o=s.length-1,c="t";o>=0;--o)switch(s[o].t){case"h":case"H":s[o].t=h,c="h",x<1&&(x=1);break;case"s":(w=s[o].v.match(/\.0+$/))&&(b=Math.max(b,w[0].length-1)),x<3&&(x=3);case"d":case"y":case"M":case"e":c=s[o].t;break;case"m":c==="s"&&(s[o].t="M",x<2&&(x=2));break;case"X":break;case"Z":x<1&&s[o].v.match(/[Hh]/)&&(x=1),x<2&&s[o].v.match(/[Mm]/)&&(x=2),x<3&&s[o].v.match(/[Ss]/)&&(x=3)}switch(x){case 0:break;case 1:u.u>=.5&&(u.u=0,++u.S),u.S>=60&&(u.S=0,++u.M),u.M>=60&&(u.M=0,++u.H);break;case 2:u.u>=.5&&(u.u=0,++u.S),u.S>=60&&(u.S=0,++u.M);break}var y="",_;for(o=0;o<s.length;++o)switch(s[o].t){case"t":case"T":case" ":case"D":break;case"X":s[o].v="",s[o].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":s[o].v=KV(s[o].t.charCodeAt(0),s[o].v,u,b),s[o].t="t";break;case"n":case"?":for(_=o+1;s[_]!=null&&((l=s[_].t)==="?"||l==="D"||(l===" "||l==="t")&&s[_+1]!=null&&(s[_+1].t==="?"||s[_+1].t==="t"&&s[_+1].v==="/")||s[o].t==="("&&(l===" "||l==="n"||l===")")||l==="t"&&(s[_].v==="/"||s[_].v===" "&&s[_+1]!=null&&s[_+1].t=="?"));)s[o].v+=s[_].v,s[_]={v:"",t:";"},++_;y+=s[o].v,o=_-1;break;case"G":s[o].t="t",s[o].v=mc(t,r);break}var N="",k,S;if(y.length>0){y.charCodeAt(0)==40?(k=t<0&&y.charCodeAt(0)===45?-t:t,S=zi("n",y,k)):(k=t<0&&n>1?-t:t,S=zi("n",y,k),k<0&&s[0]&&s[0].t=="t"&&(S=S.substr(1),s[0].v="-"+s[0].v)),_=S.length-1;var E=s.length;for(o=0;o<s.length;++o)if(s[o]!=null&&s[o].t!="t"&&s[o].v.indexOf(".")>-1){E=o;break}var j=s.length;if(E===s.length&&S.indexOf("E")===-1){for(o=s.length-1;o>=0;--o)s[o]==null||"n?".indexOf(s[o].t)===-1||(_>=s[o].v.length-1?(_-=s[o].v.length,s[o].v=S.substr(_+1,s[o].v.length)):_<0?s[o].v="":(s[o].v=S.substr(0,_+1),_=-1),s[o].t="t",j=o);_>=0&&j<s.length&&(s[j].v=S.substr(0,_+1)+s[j].v)}else if(E!==s.length&&S.indexOf("E")===-1){for(_=S.indexOf(".")-1,o=E;o>=0;--o)if(!(s[o]==null||"n?".indexOf(s[o].t)===-1)){for(d=s[o].v.indexOf(".")>-1&&o===E?s[o].v.indexOf(".")-1:s[o].v.length-1,N=s[o].v.substr(d+1);d>=0;--d)_>=0&&(s[o].v.charAt(d)==="0"||s[o].v.charAt(d)==="#")&&(N=S.charAt(_--)+N);s[o].v=N,s[o].t="t",j=o}for(_>=0&&j<s.length&&(s[j].v=S.substr(0,_+1)+s[j].v),_=S.indexOf(".")+1,o=E;o<s.length;++o)if(!(s[o]==null||"n?(".indexOf(s[o].t)===-1&&o!==E)){for(d=s[o].v.indexOf(".")>-1&&o===E?s[o].v.indexOf(".")+1:0,N=s[o].v.substr(0,d);d<s[o].v.length;++d)_<S.length&&(N+=S.charAt(_++));s[o].v=N,s[o].t="t",j=o}}}for(o=0;o<s.length;++o)s[o]!=null&&"n?".indexOf(s[o].t)>-1&&(k=n>1&&t<0&&o>0&&s[o-1].v==="-"?-t:t,s[o].v=zi(s[o].t,s[o].v,k),s[o].t="t");var T="";for(o=0;o!==s.length;++o)s[o]!=null&&(T+=s[o].v);return T}var Gk=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function qk(e,t){if(t==null)return!1;var r=parseFloat(t[2]);switch(t[1]){case"=":if(e==r)return!0;break;case">":if(e>r)return!0;break;case"<":if(e<r)return!0;break;case"<>":if(e!=r)return!0;break;case">=":if(e>=r)return!0;break;case"<=":if(e<=r)return!0;break}return!1}function aG(e,t){var r=nG(e),n=r.length,s=r[n-1].indexOf("@");if(n<4&&s>-1&&--n,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if(typeof t!="number")return[4,r.length===4||s>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=s>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=s>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=s>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"];break}var a=t>0?r[0]:t<0?r[1]:r[2];if(r[0].indexOf("[")===-1&&r[1].indexOf("[")===-1)return[n,a];if(r[0].match(/\[[=<>]/)!=null||r[1].match(/\[[=<>]/)!=null){var o=r[0].match(Gk),l=r[1].match(Gk);return qk(t,o)?[n,r[0]]:qk(t,l)?[n,r[1]]:[n,r[o!=null&&l!=null?2:1]]}return[n,a]}function xa(e,t,r){r==null&&(r={});var n="";switch(typeof e){case"string":e=="m/d/yy"&&r.dateNF?n=r.dateNF:n=e;break;case"number":e==14&&r.dateNF?n=r.dateNF:n=(r.table!=null?r.table:it)[e],n==null&&(n=r.table&&r.table[zk[e]]||it[zk[e]]),n==null&&(n=UV[e]||"General");break}if(Ip(n,0))return mc(t,r);t instanceof Date&&(t=iP(t,r.date1904));var s=aG(n,t);if(Ip(s[1]))return mc(t,r);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return sG(s[1],t,r,s[0])}function Hi(e,t){if(typeof t!="number"){t=+t||-1;for(var r=0;r<392;++r){if(it[r]==null){t<0&&(t=r);continue}if(it[r]==e){t=r;break}}t<0&&(t=391)}return it[t]=e,t}function Zx(e){for(var t=0;t!=392;++t)e[t]!==void 0&&Hi(e[t],t)}function Cd(){it=$V()}var iG={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},pP=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function oG(e){var t=typeof e=="number"?it[e]:e;return t=t.replace(pP,"(\\d+)"),new RegExp("^"+t+"$")}function lG(e,t,r){var n=-1,s=-1,a=-1,o=-1,l=-1,c=-1;
vendor: 25,998 bytes, lines 587-594
587(t.match(pP)||[]).forEach(function(f,h){var m=parseInt(r[h+1],10);switch(f.toLowerCase().charAt(0)){case"y":n=m;break;case"d":a=m;break;case"h":o=m;break;case"s":c=m;break;case"m":o>=0?l=m:s=m;break}}),c>=0&&l==-1&&s>=0&&(l=s,s=-1);var u=(""+(n>=0?n:new Date().getFullYear())).slice(-4)+"-"+("00"+(s>=1?s:1)).slice(-2)+"-"+("00"+(a>=1?a:1)).slice(-2);u.length==7&&(u="0"+u),u.length==8&&(u="20"+u);var d=("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2)+":"+("00"+(c>=0?c:0)).slice(-2);return o==-1&&l==-1&&c==-1?u:n==-1&&s==-1&&a==-1?d:u+"T"+d}var cG=function(){var e={};e.version="1.2.0";function t(){for(var S=0,E=new Array(256),j=0;j!=256;++j)S=j,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,E[j]=S;return typeof Int32Array<"u"?new Int32Array(E):E}var r=t();function n(S){var E=0,j=0,T=0,R=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(T=0;T!=256;++T)R[T]=S[T];for(T=0;T!=256;++T)for(j=S[T],E=256+T;E<4096;E+=256)j=R[E]=j>>>8^S[j&255];var P=[];for(T=1;T!=16;++T)P[T-1]=typeof Int32Array<"u"?R.subarray(T*256,T*256+256):R.slice(T*256,T*256+256);return P}var s=n(r),a=s[0],o=s[1],l=s[2],c=s[3],u=s[4],d=s[5],f=s[6],h=s[7],m=s[8],g=s[9],p=s[10],x=s[11],b=s[12],w=s[13],y=s[14];function _(S,E){for(var j=E^-1,T=0,R=S.length;T<R;)j=j>>>8^r[(j^S.charCodeAt(T++))&255];return~j}function N(S,E){for(var j=E^-1,T=S.length-15,R=0;R<T;)j=y[S[R++]^j&255]^w[S[R++]^j>>8&255]^b[S[R++]^j>>16&255]^x[S[R++]^j>>>24]^p[S[R++]]^g[S[R++]]^m[S[R++]]^h[S[R++]]^f[S[R++]]^d[S[R++]]^u[S[R++]]^c[S[R++]]^l[S[R++]]^o[S[R++]]^a[S[R++]]^r[S[R++]];for(T+=15;R<T;)j=j>>>8^r[(j^S[R++])&255];return~j}function k(S,E){for(var j=E^-1,T=0,R=S.length,P=0,D=0;T<R;)P=S.charCodeAt(T++),P<128?j=j>>>8^r[(j^P)&255]:P<2048?(j=j>>>8^r[(j^(192|P>>6&31))&255],j=j>>>8^r[(j^(128|P&63))&255]):P>=55296&&P<57344?(P=(P&1023)+64,D=S.charCodeAt(T++)&1023,j=j>>>8^r[(j^(240|P>>8&7))&255],j=j>>>8^r[(j^(128|P>>2&63))&255],j=j>>>8^r[(j^(128|D>>6&15|(P&3)<<4))&255],j=j>>>8^r[(j^(128|D&63))&255]):(j=j>>>8^r[(j^(224|P>>12&15))&255],j=j>>>8^r[(j^(128|P>>6&63))&255],j=j>>>8^r[(j^(128|P&63))&255]);return~j}return e.table=r,e.bstr=_,e.buf=N,e.str=k,e}(),tt=function(){var t={};t.version="1.2.1";function r(O,H){for(var L=O.split("/"),W=H.split("/"),G=0,q=0,oe=Math.min(L.length,W.length);G<oe;++G){if(q=L[G].length-W[G].length)return q;if(L[G]!=W[G])return L[G]<W[G]?-1:1}return L.length-W.length}function n(O){if(O.charAt(O.length-1)=="/")return O.slice(0,-1).indexOf("/")===-1?O:n(O.slice(0,-1));var H=O.lastIndexOf("/");return H===-1?O:O.slice(0,H+1)}function s(O){if(O.charAt(O.length-1)=="/")return s(O.slice(0,-1));var H=O.lastIndexOf("/");return H===-1?O:O.slice(H+1)}function a(O,H){typeof H=="string"&&(H=new Date(H));var L=H.getHours();L=L<<6|H.getMinutes(),L=L<<5|H.getSeconds()>>>1,O.write_shift(2,L);var W=H.getFullYear()-1980;W=W<<4|H.getMonth()+1,W=W<<5|H.getDate(),O.write_shift(2,W)}function o(O){var H=O.read_shift(2)&65535,L=O.read_shift(2)&65535,W=new Date,G=L&31;L>>>=5;var q=L&15;L>>>=4,W.setMilliseconds(0),W.setFullYear(L+1980),W.setMonth(q-1),W.setDate(G);var oe=H&31;H>>>=5;var me=H&63;return H>>>=6,W.setHours(H),W.setMinutes(me),W.setSeconds(oe<<1),W}function l(O){jn(O,0);for(var H={},L=0;O.l<=O.length-4;){var W=O.read_shift(2),G=O.read_shift(2),q=O.l+G,oe={};switch(W){case 21589:L=O.read_shift(1),L&1&&(oe.mtime=O.read_shift(4)),G>5&&(L&2&&(oe.atime=O.read_shift(4)),L&4&&(oe.ctime=O.read_shift(4))),oe.mtime&&(oe.mt=new Date(oe.mtime*1e3));break}O.l=q,H[W]=oe}return H}var c;function u(){return c||(c={})}function d(O,H){if(O[0]==80&&O[1]==75)return jl(O,H);if((O[0]|32)==109&&(O[1]|32)==105)return qr(O,H);if(O.length<512)throw new Error("CFB file size "+O.length+" < 512");var L=3,W=512,G=0,q=0,oe=0,me=0,ie=0,le=[],ce=O.slice(0,512);jn(ce,0);var je=f(ce);switch(L=je[0],L){case 3:W=512;break;case 4:W=4096;break;case 0:if(je[1]==0)return jl(O,H);default:throw new Error("Major Version: Expected 3 or 4 saw "+L)}W!==512&&(ce=O.slice(0,W),jn(ce,28));var Me=O.slice(0,W);h(ce,L);var Ge=ce.read_shift(4,"i");if(L===3&&Ge!==0)throw new Error("# Directory Sectors: Expected 0 saw "+Ge);ce.l+=4,oe=ce.read_shift(4,"i"),ce.l+=4,ce.chk("00100000","Mini Stream Cutoff Size: "),me=ce.read_shift(4,"i"),G=ce.read_shift(4,"i"),ie=ce.read_shift(4,"i"),q=ce.read_shift(4,"i");for(var Pe=-1,Ue=0;Ue<109&&(Pe=ce.read_shift(4,"i"),!(Pe<0));++Ue)le[Ue]=Pe;var gt=m(O,W);x(ie,q,gt,W,le);var wr=w(gt,oe,le,W);wr[oe].name="!Directory",G>0&&me!==D&&(wr[me].name="!MiniFAT"),wr[le[0]].name="!FAT",wr.fat_addrs=le,wr.ssz=W;var br={},Pn=[],Bd=[],$d=[];y(oe,wr,gt,Pn,G,br,Bd,me),g(Bd,$d,Pn),Pn.shift();var Ud={FileIndex:Bd,FullPaths:$d};return H&&H.raw&&(Ud.raw={header:Me,sectors:gt}),Ud}function f(O){if(O[O.l]==80&&O[O.l+1]==75)return[0,0];O.chk(U,"Header Signature: "),O.l+=16;var H=O.read_shift(2,"u");return[O.read_shift(2,"u"),H]}function h(O,H){var L=9;switch(O.l+=2,L=O.read_shift(2)){case 9:if(H!=3)throw new Error("Sector Shift: Expected 9 saw "+L);break;case 12:if(H!=4)throw new Error("Sector Shift: Expected 12 saw "+L);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+L)}O.chk("0600","Mini Sector Shift: "),O.chk("000000000000","Reserved: ")}function m(O,H){for(var L=Math.ceil(O.length/H)-1,W=[],G=1;G<L;++G)W[G-1]=O.slice(G*H,(G+1)*H);return W[L-1]=O.slice(L*H),W}function g(O,H,L){for(var W=0,G=0,q=0,oe=0,me=0,ie=L.length,le=[],ce=[];W<ie;++W)le[W]=ce[W]=W,H[W]=L[W];for(;me<ce.length;++me)W=ce[me],G=O[W].L,q=O[W].R,oe=O[W].C,le[W]===W&&(G!==-1&&le[G]!==G&&(le[W]=le[G]),q!==-1&&le[q]!==q&&(le[W]=le[q])),oe!==-1&&(le[oe]=W),G!==-1&&W!=le[W]&&(le[G]=le[W],ce.lastIndexOf(G)<me&&ce.push(G)),q!==-1&&W!=le[W]&&(le[q]=le[W],ce.lastIndexOf(q)<me&&ce.push(q));for(W=1;W<ie;++W)le[W]===W&&(q!==-1&&le[q]!==q?le[W]=le[q]:G!==-1&&le[G]!==G&&(le[W]=le[G]));for(W=1;W<ie;++W)if(O[W].type!==0){if(me=W,me!=le[me])do me=le[me],H[W]=H[me]+"/"+H[W];while(me!==0&&le[me]!==-1&&me!=le[me]);le[W]=-1}for(H[0]+="/",W=1;W<ie;++W)O[W].type!==2&&(H[W]+="/")}function p(O,H,L){for(var W=O.start,G=O.size,q=[],oe=W;L&&G>0&&oe>=0;)q.push(H.slice(oe*P,oe*P+P)),G-=P,oe=$l(L,oe*4);return q.length===0?he(0):gn(q).slice(0,O.size)}function x(O,H,L,W,G){var q=D;if(O===D){if(H!==0)throw new Error("DIFAT chain shorter than expected")}else if(O!==-1){var oe=L[O],me=(W>>>2)-1;if(!oe)return;for(var ie=0;ie<me&&(q=$l(oe,ie*4))!==D;++ie)G.push(q);x($l(oe,W-4),H-1,L,W,G)}}function b(O,H,L,W,G){var q=[],oe=[];G||(G=[]);var me=W-1,ie=0,le=0;for(ie=H;ie>=0;){G[ie]=!0,q[q.length]=ie,oe.push(O[ie]);var ce=L[Math.floor(ie*4/W)];if(le=ie*4&me,W<4+le)throw new Error("FAT boundary crossed: "+ie+" 4 "+W);if(!O[ce])break;ie=$l(O[ce],le)}return{nodes:q,data:aj([oe])}}function w(O,H,L,W){var G=O.length,q=[],oe=[],me=[],ie=[],le=W-1,ce=0,je=0,Me=0,Ge=0;for(ce=0;ce<G;++ce)if(me=[],Me=ce+H,Me>=G&&(Me-=G),!oe[Me]){ie=[];var Pe=[];for(je=Me;je>=0;){Pe[je]=!0,oe[je]=!0,me[me.length]=je,ie.push(O[je]);var Ue=L[Math.floor(je*4/W)];if(Ge=je*4&le,W<4+Ge)throw new Error("FAT boundary crossed: "+je+" 4 "+W);if(!O[Ue]||(je=$l(O[Ue],Ge),Pe[je]))break}q[Me]={nodes:me,data:aj([ie])}}return q}function y(O,H,L,W,G,q,oe,me){for(var ie=0,le=W.length?2:0,ce=H[O].data,je=0,Me=0,Ge;je<ce.length;je+=128){var Pe=ce.slice(je,je+128);jn(Pe,64),Me=Pe.read_shift(2),Ge=p_(Pe,0,Me-le),W.push(Ge);var Ue={name:Ge,type:Pe.read_shift(1),color:Pe.read_shift(1),L:Pe.read_shift(4,"i"),R:Pe.read_shift(4,"i"),C:Pe.read_shift(4,"i"),clsid:Pe.read_shift(16),state:Pe.read_shift(4,"i"),start:0,size:0},gt=Pe.read_shift(2)+Pe.read_shift(2)+Pe.read_shift(2)+Pe.read_shift(2);gt!==0&&(Ue.ct=_(Pe,Pe.l-8));var wr=Pe.read_shift(2)+Pe.read_shift(2)+Pe.read_shift(2)+Pe.read_shift(2);wr!==0&&(Ue.mt=_(Pe,Pe.l-8)),Ue.start=Pe.read_shift(4,"i"),Ue.size=Pe.read_shift(4,"i"),Ue.size<0&&Ue.start<0&&(Ue.size=Ue.type=0,Ue.start=D,Ue.name=""),Ue.type===5?(ie=Ue.start,G>0&&ie!==D&&(H[ie].name="!StreamData")):Ue.size>=4096?(Ue.storage="fat",H[Ue.start]===void 0&&(H[Ue.start]=b(L,Ue.start,H.fat_addrs,H.ssz)),H[Ue.start].name=Ue.name,Ue.content=H[Ue.start].data.slice(0,Ue.size)):(Ue.storage="minifat",Ue.size<0?Ue.size=0:ie!==D&&Ue.start!==D&&H[ie]&&(Ue.content=p(Ue,H[ie].data,(H[me]||{}).data))),Ue.content&&jn(Ue.content,0),q[Ge]=Ue,oe.push(Ue)}}function _(O,H){return new Date((Os(O,H+4)/1e7*Math.pow(2,32)+Os(O,H)/1e7-11644473600)*1e3)}function N(O,H){return u(),d(c.readFileSync(O),H)}function k(O,H){var L=H&&H.type;switch(L||Nt&&Buffer.isBuffer(O)&&(L="buffer"),L||"base64"){case"file":return N(O,H);case"base64":return d(Fs(Gs(O)),H);case"binary":return d(Fs(O),H)}return d(O,H)}function S(O,H){var L=H||{},W=L.root||"Root Entry";if(O.FullPaths||(O.FullPaths=[]),O.FileIndex||(O.FileIndex=[]),O.FullPaths.length!==O.FileIndex.length)throw new Error("inconsistent CFB structure");O.FullPaths.length===0&&(O.FullPaths[0]=W+"/",O.FileIndex[0]={name:W,type:5}),L.CLSID&&(O.FileIndex[0].clsid=L.CLSID),E(O)}function E(O){var H="�Sh33tJ5";if(!tt.find(O,"/"+H)){var L=he(4);L[0]=55,L[1]=L[3]=50,L[2]=54,O.FileIndex.push({name:H,type:2,content:L,size:4,L:69,R:69,C:69}),O.FullPaths.push(O.FullPaths[0]+H),j(O)}}function j(O,H){S(O);for(var L=!1,W=!1,G=O.FullPaths.length-1;G>=0;--G){var q=O.FileIndex[G];switch(q.type){case 0:W?L=!0:(O.FileIndex.pop(),O.FullPaths.pop());break;case 1:case 2:case 5:W=!0,isNaN(q.R*q.L*q.C)&&(L=!0),q.R>-1&&q.L>-1&&q.R==q.L&&(L=!0);break;default:L=!0;break}}if(!(!L&&!H)){var oe=new Date(1987,1,19),me=0,ie=Object.create?Object.create(null):{},le=[];for(G=0;G<O.FullPaths.length;++G)ie[O.FullPaths[G]]=!0,O.FileIndex[G].type!==0&&le.push([O.FullPaths[G],O.FileIndex[G]]);for(G=0;G<le.length;++G){var ce=n(le[G][0]);W=ie[ce],W||(le.push([ce,{name:s(ce).replace("/",""),type:1,clsid:Y,ct:oe,mt:oe,content:null}]),ie[ce]=!0)}for(le.sort(function(Ge,Pe){return r(Ge[0],Pe[0])}),O.FullPaths=[],O.FileIndex=[],G=0;G<le.length;++G)O.FullPaths[G]=le[G][0],O.FileIndex[G]=le[G][1];for(G=0;G<le.length;++G){var je=O.FileIndex[G],Me=O.FullPaths[G];if(je.name=s(Me).replace("/",""),je.L=je.R=je.C=-(je.color=1),je.size=je.content?je.content.length:0,je.start=0,je.clsid=je.clsid||Y,G===0)je.C=le.length>1?1:-1,je.size=0,je.type=5;else if(Me.slice(-1)=="/"){for(me=G+1;me<le.length&&n(O.FullPaths[me])!=Me;++me);for(je.C=me>=le.length?-1:me,me=G+1;me<le.length&&n(O.FullPaths[me])!=n(Me);++me);je.R=me>=le.length?-1:me,je.type=1}else n(O.FullPaths[G+1]||"")==n(Me)&&(je.R=G+1),je.type=2}}}function T(O,H){var L=H||{};if(L.fileType=="mad")return er(O,L);switch(j(O),L.fileType){case"zip":return Ar(O,L)}var W=function(Ge){for(var Pe=0,Ue=0,gt=0;gt<Ge.FileIndex.length;++gt){var wr=Ge.FileIndex[gt];if(wr.content){var br=wr.content.length;br>0&&(br<4096?Pe+=br+63>>6:Ue+=br+511>>9)}}for(var Pn=Ge.FullPaths.length+3>>2,Bd=Pe+7>>3,$d=Pe+127>>7,Ud=Bd+Ue+Pn+$d,Tl=Ud+127>>7,Og=Tl<=109?0:Math.ceil((Tl-109)/127);Ud+Tl+Og+127>>7>Tl;)Og=++Tl<=109?0:Math.ceil((Tl-109)/127);var Ei=[1,Og,Tl,$d,Pn,Ue,Pe,0];return Ge.FileIndex[0].size=Pe<<6,Ei[7]=(Ge.FileIndex[0].start=Ei[0]+Ei[1]+Ei[2]+Ei[3]+Ei[4]+Ei[5])+(Ei[6]+7>>3),Ei}(O),G=he(W[7]<<9),q=0,oe=0;{for(q=0;q<8;++q)G.write_shift(1,Q[q]);for(q=0;q<8;++q)G.write_shift(2,0);for(G.write_shift(2,62),G.write_shift(2,3),G.write_shift(2,65534),G.write_shift(2,9),G.write_shift(2,6),q=0;q<3;++q)G.write_shift(2,0);for(G.write_shift(4,0),G.write_shift(4,W[2]),G.write_shift(4,W[0]+W[1]+W[2]+W[3]-1),G.write_shift(4,0),G.write_shift(4,4096),G.write_shift(4,W[3]?W[0]+W[1]+W[2]-1:D),G.write_shift(4,W[3]),G.write_shift(-4,W[1]?W[0]-1:D),G.write_shift(4,W[1]),q=0;q<109;++q)G.write_shift(-4,q<W[2]?W[1]+q:-1)}if(W[1])for(oe=0;oe<W[1];++oe){for(;q<236+oe*127;++q)G.write_shift(-4,q<W[2]?W[1]+q:-1);G.write_shift(-4,oe===W[1]-1?D:oe+1)}var me=function(Ge){for(oe+=Ge;q<oe-1;++q)G.write_shift(-4,q+1);Ge&&(++q,G.write_shift(-4,D))};for(oe=q=0,oe+=W[1];q<oe;++q)G.write_shift(-4,V.DIFSECT);for(oe+=W[2];q<oe;++q)G.write_shift(-4,V.FATSECT);me(W[3]),me(W[4]);for(var ie=0,le=0,ce=O.FileIndex[0];ie<O.FileIndex.length;++ie)ce=O.FileIndex[ie],ce.content&&(le=ce.content.length,!(le<4096)&&(ce.start=oe,me(le+511>>9)));for(me(W[6]+7>>3);G.l&511;)G.write_shift(-4,V.ENDOFCHAIN);for(oe=q=0,ie=0;ie<O.FileIndex.length;++ie)ce=O.FileIndex[ie],ce.content&&(le=ce.content.length,!(!le||le>=4096)&&(ce.start=oe,me(le+63>>6)));for(;G.l&511;)G.write_shift(-4,V.ENDOFCHAIN);for(q=0;q<W[4]<<2;++q){var je=O.FullPaths[q];if(!je||je.length===0){for(ie=0;ie<17;++ie)G.write_shift(4,0);for(ie=0;ie<3;++ie)G.write_shift(4,-1);for(ie=0;ie<12;++ie)G.write_shift(4,0);continue}ce=O.FileIndex[q],q===0&&(ce.start=ce.size?ce.start-1:D);var Me=q===0&&L.root||ce.name;if(le=2*(Me.length+1),G.write_shift(64,Me,"utf16le"),G.write_shift(2,le),G.write_shift(1,ce.type),G.write_shift(1,ce.color),G.write_shift(-4,ce.L),G.write_shift(-4,ce.R),G.write_shift(-4,ce.C),ce.clsid)G.write_shift(16,ce.clsid,"hex");else for(ie=0;ie<4;++ie)G.write_shift(4,0);G.write_shift(4,ce.state||0),G.write_shift(4,0),G.write_shift(4,0),G.write_shift(4,0),G.write_shift(4,0),G.write_shift(4,ce.start),G.write_shift(4,ce.size),G.write_shift(4,0)}for(q=1;q<O.FileIndex.length;++q)if(ce=O.FileIndex[q],ce.size>=4096)if(G.l=ce.start+1<<9,Nt&&Buffer.isBuffer(ce.content))ce.content.copy(G,G.l,0,ce.size),G.l+=ce.size+511&-512;else{for(ie=0;ie<ce.size;++ie)G.write_shift(1,ce.content[ie]);for(;ie&511;++ie)G.write_shift(1,0)}for(q=1;q<O.FileIndex.length;++q)if(ce=O.FileIndex[q],ce.size>0&&ce.size<4096)if(Nt&&Buffer.isBuffer(ce.content))ce.content.copy(G,G.l,0,ce.size),G.l+=ce.size+63&-64;else{for(ie=0;ie<ce.size;++ie)G.write_shift(1,ce.content[ie]);for(;ie&63;++ie)G.write_shift(1,0)}if(Nt)G.l=G.length;else for(;G.l<G.length;)G.write_shift(1,0);return G}function R(O,H){var L=O.FullPaths.map(function(ie){return ie.toUpperCase()}),W=L.map(function(ie){var le=ie.split("/");return le[le.length-(ie.slice(-1)=="/"?2:1)]}),G=!1;H.charCodeAt(0)===47?(G=!0,H=L[0].slice(0,-1)+H):G=H.indexOf("/")!==-1;var q=H.toUpperCase(),oe=G===!0?L.indexOf(q):W.indexOf(q);if(oe!==-1)return O.FileIndex[oe];var me=!q.match(lf);for(q=q.replace(Zn,""),me&&(q=q.replace(lf,"!")),oe=0;oe<L.length;++oe)if((me?L[oe].replace(lf,"!"):L[oe]).replace(Zn,"")==q||(me?W[oe].replace(lf,"!"):W[oe]).replace(Zn,"")==q)return O.FileIndex[oe];return null}var P=64,D=-2,U="d0cf11e0a1b11ae1",Q=[208,207,17,224,161,177,26,225],Y="00000000000000000000000000000000",V={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:D,FREESECT:-1,HEADER_SIGNATURE:U,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:Y,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function F(O,H,L){u();var W=T(O,L);c.writeFileSync(H,W)}function C(O){for(var H=new Array(O.length),L=0;L<O.length;++L)H[L]=String.fromCharCode(O[L]);return H.join("")}function X(O,H){var L=T(O,H);switch(H&&H.type||"buffer"){case"file":return u(),c.writeFileSync(H.filename,L),L;case"binary":return typeof L=="string"?L:C(L);case"base64":return vh(typeof L=="string"?L:C(L));case"buffer":if(Nt)return Buffer.isBuffer(L)?L:io(L);case"array":return typeof L=="string"?Fs(L):L}return L}var se;function A(O){try{var H=O.InflateRaw,L=new H;if(L._processChunk(new Uint8Array([3,0]),L._finishFlushFlag),L.bytesRead)se=O;else throw new Error("zlib does not expose bytesRead")}catch(W){console.error("cannot use native zlib: "+(W.message||W))}}function M(O,H){if(!se)return Sl(O,H);var L=se.InflateRaw,W=new L,G=W._processChunk(O.slice(O.l),W._finishFlushFlag);return O.l+=W.bytesRead,G}function I(O){return se?se.deflateRawSync(O):Be(O)}var z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],J=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],Z=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function re(O){var H=(O<<1|O<<11)&139536|(O<<5|O<<15)&558144;return(H>>16|H>>8|H)&255}for(var ae=typeof Uint8Array<"u",ne=ae?new Uint8Array(256):[],Se=0;Se<256;++Se)ne[Se]=re(Se);function B(O,H){var L=ne[O&255];return H<=8?L>>>8-H:(L=L<<8|ne[O>>8&255],H<=16?L>>>16-H:(L=L<<8|ne[O>>16&255],L>>>24-H))}function qe(O,H){var L=H&7,W=H>>>3;return(O[W]|(L<=6?0:O[W+1]<<8))>>>L&3}function ue(O,H){var L=H&7,W=H>>>3;return(O[W]|(L<=5?0:O[W+1]<<8))>>>L&7}function Re(O,H){var L=H&7,W=H>>>3;return(O[W]|(L<=4?0:O[W+1]<<8))>>>L&15}function Ce(O,H){var L=H&7,W=H>>>3;return(O[W]|(L<=3?0:O[W+1]<<8))>>>L&31}function pe(O,H){var L=H&7,W=H>>>3;return(O[W]|(L<=1?0:O[W+1]<<8))>>>L&127}function fe(O,H,L){var W=H&7,G=H>>>3,q=(1<<L)-1,oe=O[G]>>>W;return L<8-W||(oe|=O[G+1]<<8-W,L<16-W)||(oe|=O[G+2]<<16-W,L<24-W)||(oe|=O[G+3]<<24-W),oe&q}function te(O,H,L){var W=H&7,G=H>>>3;return W<=5?O[G]|=(L&7)<<W:(O[G]|=L<<W&255,O[G+1]=(L&7)>>8-W),H+3}function Ne(O,H,L){var W=H&7,G=H>>>3;return L=(L&1)<<W,O[G]|=L,H+1}function be(O,H,L){var W=H&7,G=H>>>3;return L<<=W,O[G]|=L&255,L>>>=8,O[G+1]=L,H+8}function Qe(O,H,L){var W=H&7,G=H>>>3;return L<<=W,O[G]|=L&255,L>>>=8,O[G+1]=L&255,O[G+2]=L>>>8,H+16}function nt(O,H){var L=O.length,W=2*L>H?2*L:H+5,G=0;if(L>=H)return O;if(Nt){var q=$k(W);if(O.copy)O.copy(q);else for(;G<O.length;++G)q[G]=O[G];return q}else if(ae){var oe=new Uint8Array(W);if(oe.set)oe.set(O);else for(;G<L;++G)oe[G]=O[G];return oe}return O.length=W,O}function Je(O){for(var H=new Array(O),L=0;L<O;++L)H[L]=0;return H}function Le(O,H,L){var W=1,G=0,q=0,oe=0,me=0,ie=O.length,le=ae?new Uint16Array(32):Je(32);for(q=0;q<32;++q)le[q]=0;for(q=ie;q<L;++q)O[q]=0;ie=O.length;var ce=ae?new Uint16Array(ie):Je(ie);for(q=0;q<ie;++q)le[G=O[q]]++,W<G&&(W=G),ce[q]=0;for(le[0]=0,q=1;q<=W;++q)le[q+16]=me=me+le[q-1]<<1;for(q=0;q<ie;++q)me=O[q],me!=0&&(ce[q]=le[me+16]++);var je=0;for(q=0;q<ie;++q)if(je=O[q],je!=0)for(me=B(ce[q],W)>>W-je,oe=(1<<W+4-je)-1;oe>=0;--oe)H[me|oe<<je]=je&15|q<<4;return W}var lt=ae?new Uint16Array(512):Je(512),_e=ae?new Uint16Array(32):Je(32);if(!ae){for(var Te=0;Te<512;++Te)lt[Te]=0;for(Te=0;Te<32;++Te)_e[Te]=0}(function(){for(var O=[],H=0;H<32;H++)O.push(5);Le(O,_e,32);var L=[];for(H=0;H<=143;H++)L.push(8);for(;H<=255;H++)L.push(9);for(;H<=279;H++)L.push(7);for(;H<=287;H++)L.push(8);Le(L,lt,288)})();var et=function(){for(var H=ae?new Uint8Array(32768):[],L=0,W=0;L<Z.length-1;++L)for(;W<Z[L+1];++W)H[W]=L;for(;W<32768;++W)H[W]=29;var G=ae?new Uint8Array(259):[];for(L=0,W=0;L<J.length-1;++L)for(;W<J[L+1];++W)G[W]=L;function q(me,ie){for(var le=0;le<me.length;){var ce=Math.min(65535,me.length-le),je=le+ce==me.length;for(ie.write_shift(1,+je),ie.write_shift(2,ce),ie.write_shift(2,~ce&65535);ce-- >0;)ie[ie.l++]=me[le++]}return ie.l}function oe(me,ie){for(var le=0,ce=0,je=ae?new Uint16Array(32768):[];ce<me.length;){var Me=Math.min(65535,me.length-ce);if(Me<10){for(le=te(ie,le,+(ce+Me==me.length)),le&7&&(le+=8-(le&7)),ie.l=le/8|0,ie.write_shift(2,Me),ie.write_shift(2,~Me&65535);Me-- >0;)ie[ie.l++]=me[ce++];le=ie.l*8;continue}le=te(ie,le,+(ce+Me==me.length)+2);for(var Ge=0;Me-- >0;){var Pe=me[ce];Ge=(Ge<<5^Pe)&32767;var Ue=-1,gt=0;if((Ue=je[Ge])&&(Ue|=ce&-32768,Ue>ce&&(Ue-=32768),Ue<ce))for(;me[Ue+gt]==me[ce+gt]&&gt<250;)++gt;if(gt>2){Pe=G[gt],Pe<=22?le=be(ie,le,ne[Pe+1]>>1)-1:(be(ie,le,3),le+=5,be(ie,le,ne[Pe-23]>>5),le+=3);var wr=Pe<8?0:Pe-4>>2;wr>0&&(Qe(ie,le,gt-J[Pe]),le+=wr),Pe=H[ce-Ue],le=be(ie,le,ne[Pe]>>3),le-=3;var br=Pe<4?0:Pe-2>>1;br>0&&(Qe(ie,le,ce-Ue-Z[Pe]),le+=br);for(var Pn=0;Pn<gt;++Pn)je[Ge]=ce&32767,Ge=(Ge<<5^me[ce])&32767,++ce;Me-=gt-1}else Pe<=143?Pe=Pe+48:le=Ne(ie,le,1),le=be(ie,le,ne[Pe]),je[Ge]=ce&32767,++ce}le=be(ie,le,0)-1}return ie.l=(le+7)/8|0,ie.l}return function(ie,le){return ie.length<8?q(ie,le):oe(ie,le)}}();function Be(O){var H=he(50+Math.floor(O.length*1.1)),L=et(O,H);return H.slice(0,L)}var ct=ae?new Uint16Array(32768):Je(32768),Gt=ae?new Uint16Array(32768):Je(32768),qt=ae?new Uint16Array(128):Je(128),nn=1,Es=1;function ba(O,H){var L=Ce(O,H)+257;H+=5;var W=Ce(O,H)+1;H+=5;var G=Re(O,H)+4;H+=4;for(var q=0,oe=ae?new Uint8Array(19):Je(19),me=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ie=1,le=ae?new Uint8Array(8):Je(8),ce=ae?new Uint8Array(8):Je(8),je=oe.length,Me=0;Me<G;++Me)oe[z[Me]]=q=ue(O,H),ie<q&&(ie=q),le[q]++,H+=3;var Ge=0;for(le[0]=0,Me=1;Me<=ie;++Me)ce[Me]=Ge=Ge+le[Me-1]<<1;for(Me=0;Me<je;++Me)(Ge=oe[Me])!=0&&(me[Me]=ce[Ge]++);var Pe=0;for(Me=0;Me<je;++Me)if(Pe=oe[Me],Pe!=0){Ge=ne[me[Me]]>>8-Pe;for(var Ue=(1<<7-Pe)-1;Ue>=0;--Ue)qt[Ge|Ue<<Pe]=Pe&7|Me<<3}var gt=[];for(ie=1;gt.length<L+W;)switch(Ge=qt[pe(O,H)],H+=Ge&7,Ge>>>=3){case 16:for(q=3+qe(O,H),H+=2,Ge=gt[gt.length-1];q-- >0;)gt.push(Ge);break;case 17:for(q=3+ue(O,H),H+=3;q-- >0;)gt.push(0);break;case 18:for(q=11+pe(O,H),H+=7;q-- >0;)gt.push(0);break;default:gt.push(Ge),ie<Ge&&(ie=Ge);break}var wr=gt.slice(0,L),br=gt.slice(L);for(Me=L;Me<286;++Me)wr[Me]=0;for(Me=W;Me<30;++Me)br[Me]=0;return nn=Le(wr,ct,286),Es=Le(br,Gt,30),H}function Md(O,H){if(O[0]==3&&!(O[1]&3))return[il(H),2];for(var L=0,W=0,G=$k(H||1<<18),q=0,oe=G.length>>>0,me=0,ie=0;!(W&1);){if(W=ue(O,L),L+=3,W>>>1)W>>1==1?(me=9,ie=5):(L=ba(O,L),me=nn,ie=Es);else{L&7&&(L+=8-(L&7));var le=O[L>>>3]|O[(L>>>3)+1]<<8;if(L+=32,le>0)for(!H&&oe<q+le&&(G=nt(G,q+le),oe=G.length);le-- >0;)G[q++]=O[L>>>3],L+=8;continue}for(;;){!H&&oe<q+32767&&(G=nt(G,q+32767),oe=G.length);var ce=fe(O,L,me),je=W>>>1==1?lt[ce]:ct[ce];if(L+=je&15,je>>>=4,!(je>>>8&255))G[q++]=je;else{if(je==256)break;je-=257;var Me=je<8?0:je-4>>2;Me>5&&(Me=0);var Ge=q+J[je];Me>0&&(Ge+=fe(O,L,Me),L+=Me),ce=fe(O,L,ie),je=W>>>1==1?_e[ce]:Gt[ce],L+=je&15,je>>>=4;var Pe=je<4?0:je-2>>1,Ue=Z[je];for(Pe>0&&(Ue+=fe(O,L,Pe),L+=Pe),!H&&oe<Ge&&(G=nt(G,Ge+100),oe=G.length);q<Ge;)G[q]=G[q-Ue],++q}}}return H?[G,L+7>>>3]:[G.slice(0,q),L+7>>>3]}function Sl(O,H){var L=O.slice(O.l||0),W=Md(L,H);return O.l+=W[1],W[0]}function kl(O,H){if(O)typeof console<"u"&&console.error(H);else throw new Error(H)}function jl(O,H){var L=O;jn(L,0);var W=[],G=[],q={FileIndex:W,FullPaths:G};S(q,{root:H.root});for(var oe=L.length-4;(L[oe]!=80||L[oe+1]!=75||L[oe+2]!=5||L[oe+3]!=6)&&oe>=0;)--oe;L.l=oe+4,L.l+=4;var me=L.read_shift(2);L.l+=6;var ie=L.read_shift(4);for(L.l=ie,oe=0;oe<me;++oe){L.l+=20;var le=L.read_shift(4),ce=L.read_shift(4),je=L.read_shift(2),Me=L.read_shift(2),Ge=L.read_shift(2);L.l+=8;var Pe=L.read_shift(4),Ue=l(L.slice(L.l+je,L.l+je+Me));L.l+=je+Me+Ge;var gt=L.l;L.l=Pe+4,Ld(L,le,ce,q,Ue),L.l=gt}return q}function Ld(O,H,L,W,G){O.l+=2;var q=O.read_shift(2),oe=O.read_shift(2),me=o(O);if(q&8257)throw new Error("Unsupported ZIP encryption");for(var ie=O.read_shift(4),le=O.read_shift(4),ce=O.read_shift(4),je=O.read_shift(2),Me=O.read_shift(2),Ge="",Pe=0;Pe<je;++Pe)Ge+=String.fromCharCode(O[O.l++]);if(Me){var Ue=l(O.slice(O.l,O.l+Me));(Ue[21589]||{}).mt&&(me=Ue[21589].mt),((G||{})[21589]||{}).mt&&(me=G[21589].mt)}O.l+=Me;var gt=O.slice(O.l,O.l+le);switch(oe){case 8:gt=M(O,ce);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+oe)}var wr=!1;q&8&&(ie=O.read_shift(4),ie==134695760&&(ie=O.read_shift(4),wr=!0),le=O.read_shift(4),ce=O.read_shift(4)),le!=H&&kl(wr,"Bad compressed size: "+H+" != "+le),ce!=L&&kl(wr,"Bad uncompressed size: "+L+" != "+ce),ir(W,Ge,gt,{unsafe:!0,mt:me})}function Ar(O,H){var L=H||{},W=[],G=[],q=he(1),oe=L.compression?8:0,me=0,ie=0,le=0,ce=0,je=0,Me=O.FullPaths[0],Ge=Me,Pe=O.FileIndex[0],Ue=[],gt=0;for(ie=1;ie<O.FullPaths.length;++ie)if(Ge=O.FullPaths[ie].slice(Me.length),Pe=O.FileIndex[ie],!(!Pe.size||!Pe.content||Ge=="�Sh33tJ5")){var wr=ce,br=he(Ge.length);for(le=0;le<Ge.length;++le)br.write_shift(1,Ge.charCodeAt(le)&127);br=br.slice(0,br.l),Ue[je]=cG.buf(Pe.content,0);var Pn=Pe.content;oe==8&&(Pn=I(Pn)),q=he(30),q.write_shift(4,67324752),q.write_shift(2,20),q.write_shift(2,me),q.write_shift(2,oe),Pe.mt?a(q,Pe.mt):q.write_shift(4,0),q.write_shift(-4,Ue[je]),q.write_shift(4,Pn.length),q.write_shift(4,Pe.content.length),q.write_shift(2,br.length),q.write_shift(2,0),ce+=q.length,W.push(q),ce+=br.length,W.push(br),ce+=Pn.length,W.push(Pn),q=he(46),q.write_shift(4,33639248),q.write_shift(2,0),q.write_shift(2,20),q.write_shift(2,me),q.write_shift(2,oe),q.write_shift(4,0),q.write_shift(-4,Ue[je]),q.write_shift(4,Pn.length),q.write_shift(4,Pe.content.length),q.write_shift(2,br.length),q.write_shift(2,0),q.write_shift(2,0),q.write_shift(2,0),q.write_shift(2,0),q.write_shift(4,0),q.write_shift(4,wr),gt+=q.l,G.push(q),gt+=br.length,G.push(br),++je}return q=he(22),q.write_shift(4,101010256),q.write_shift(2,0),q.write_shift(2,0),q.write_shift(2,je),q.write_shift(2,je),q.write_shift(4,gt),q.write_shift(4,ce),q.write_shift(2,0),gn([gn(W),gn(G),q])}var nr={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function wn(O,H){if(O.ctype)return O.ctype;var L=O.name||"",W=L.match(/\.([^\.]+)$/);return W&&nr[W[1]]||H&&(W=(L=H).match(/[\.\\]([^\.\\])+$/),W&&nr[W[1]])?nr[W[1]]:"application/octet-stream"}function rt(O){for(var H=vh(O),L=[],W=0;W<H.length;W+=76)L.push(H.slice(W,W+76));return L.join(`\r
588`)+`\r
589`}function xt(O){var H=O.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(le){var ce=le.charCodeAt(0).toString(16).toUpperCase();return"="+(ce.length==1?"0"+ce:ce)});H=H.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),H.charAt(0)==`
590`&&(H="=0D"+H.slice(1)),H=H.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
591=0A`).replace(/([^\r\n])\n/mg,"$1=0A");for(var L=[],W=H.split(`\r
592`),G=0;G<W.length;++G){var q=W[G];if(q.length==0){L.push("");continue}for(var oe=0;oe<q.length;){var me=76,ie=q.slice(oe,oe+me);ie.charAt(me-1)=="="?me--:ie.charAt(me-2)=="="?me-=2:ie.charAt(me-3)=="="&&(me-=3),ie=q.slice(oe,oe+me),oe+=me,oe<q.length&&(ie+="="),L.push(ie)}}return L.join(`\r
593`)}function _t(O){for(var H=[],L=0;L<O.length;++L){for(var W=O[L];L<=O.length&&W.charAt(W.length-1)=="=";)W=W.slice(0,W.length-1)+O[++L];H.push(W)}for(var G=0;G<H.length;++G)H[G]=H[G].replace(/[=][0-9A-Fa-f]{2}/g,function(q){return String.fromCharCode(parseInt(q.slice(1),16))});return Fs(H.join(`\r
594`))}
vendor: 2,139 bytes, lines 594-595
594function gr(O,H,L){for(var W="",G="",q="",oe,me=0;me<10;++me){var ie=H[me];if(!ie||ie.match(/^\s*$/))break;var le=ie.match(/^(.*?):\s*([^\s].*)$/);if(le)switch(le[1].toLowerCase()){case"content-location":W=le[2].trim();break;case"content-type":q=le[2].trim();break;case"content-transfer-encoding":G=le[2].trim();break}}switch(++me,G.toLowerCase()){case"base64":oe=Fs(Gs(H.slice(me).join("")));break;case"quoted-printable":oe=_t(H.slice(me));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+G)}var ce=ir(O,W.slice(L.length),oe,{unsafe:!0});q&&(ce.ctype=q)}function qr(O,H){if(C(O.slice(0,13)).toLowerCase()!="mime-version:")throw new Error("Unsupported MAD header");var L=H&&H.root||"",W=(Nt&&Buffer.isBuffer(O)?O.toString("binary"):C(O)).split(`\r
595`),G=0,q="";for(G=0;G<W.length;++G)if(q=W[G],!!/^Content-Location:/i.test(q)&&(q=q.slice(q.indexOf("file")),L||(L=q.slice(0,q.lastIndexOf("/")+1)),q.slice(0,L.length)!=L))for(;L.length>0&&(L=L.slice(0,L.length-1),L=L.slice(0,L.lastIndexOf("/")+1),q.slice(0,L.length)!=L););var oe=(W[1]||"").match(/boundary="(.*?)"/);if(!oe)throw new Error("MAD cannot find boundary");var me="--"+(oe[1]||""),ie=[],le=[],ce={FileIndex:ie,FullPaths:le};S(ce);var je,Me=0;for(G=0;G<W.length;++G){var Ge=W[G];Ge!==me&&Ge!==me+"--"||(Me++&&gr(ce,W.slice(je,G),L),je=G)}return ce}function er(O,H){var L=H||{},W=L.boundary||"SheetJS";W="------="+W;for(var G=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+W.slice(2)+'"',"","",""],q=O.FullPaths[0],oe=q,me=O.FileIndex[0],ie=1;ie<O.FullPaths.length;++ie)if(oe=O.FullPaths[ie].slice(q.length),me=O.FileIndex[ie],!(!me.size||!me.content||oe=="�Sh33tJ5")){oe=oe.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(gt){return"_x"+gt.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(gt){return"_u"+gt.charCodeAt(0).toString(16)+"_"});for(var le=me.content,ce=Nt&&Buffer.isBuffer(le)?le.toString("binary"):C(le),je=0,Me=Math.min(1024,ce.length),Ge=0,Pe=0;Pe<=Me;++Pe)(Ge=ce.charCodeAt(Pe))>=32&&Ge<128&&++je;var Ue=je>=Me*4/5;G.push(W),G.push("Content-Location: "+(L.root||"file:///C:/SheetJS/")+oe),G.pu
595sh("Content-Transfer-Encoding: "+(Ue?"quoted-printable":"base64")),G.push("Content-Type: "+wn(me,oe)),G.push(""),G.push(Ue?xt(ce):rt(ce))}return G.push(W+`--\r
596`),G.join(`\r
597`)}function fn(O){var H={};return S(H,O),H}function ir(O,H,L,W){var G=W&&W.unsafe;G||S(O);var q=!G&&tt.find(O,H);if(!q){var oe=O.FullPaths[0];H.slice(0,oe.length)==oe?oe=H:(oe.slice(-1)!="/"&&(oe+="/"),oe=(oe+H).replace("//","/")),q={name:s(H),type:2},O.FileIndex.push(q),O.FullPaths.push(oe),G||tt.utils.cfb_gc(O)}return q.content=L,q.size=L?L.length:0,W&&(W.CLSID&&(q.clsid=W.CLSID),W.mt&&(q.mt=W.mt),W.ct&&(q.ct=W.ct)),q}function Kr(O,H){S(O);var L=tt.find(O,H);if(L){for(var W=0;W<O.FileIndex.length;++W)if(O.FileIndex[W]==L)return O.FileIndex.splice(W,1),O.FullPaths.splice(W,1),!0}return!1}function El(O,H,L){S(O);var W=tt.find(O,H);if(W){for(var G=0;G<O.FileIndex.length;++G)if(O.FileIndex[G]==W)return O.FileIndex[G].name=s(L),O.FullPaths[G]=L,!0}return!1}function Cl(O){j(O,!0)}return t.find=R,t.read=k,t.parse=d,t.write=X,t.writeFile=F,t.utils={cfb_new:fn,cfb_add:ir,cfb_del:Kr,cfb_mov:El,cfb_gc:Cl,ReadShift:jf,CheckField:MP,prep_blob:jn,bconcat:gn,use_zlib:A,_deflateRaw:Be,_inflateRaw:Sl,consts:V},t}();function uG(e){return typeof e=="string"?Jx(e):Array.isArray(e)?FV(e):e}function i0(e,t,r){if(typeof Deno<"u"){if(r&&typeof t=="string")switch(r){case"utf8":t=new TextEncoder(r).encode(t);break;case"binary":t=Jx(t);break;default:throw new Error("Unsupported encoding "+r)}return Deno.writeFileSync(e,t)}var n=r=="utf8"?hi(t):t;if(typeof IE_SaveFile<"u")return IE_SaveFile(n,e);if(typeof Blob<"u"){var s=new Blob([uG(n)],{type:"application/octet-stream"});if(typeof navigator<"u"&&navigator.msSaveBlob)return navigator.msSaveBlob(s,e);if(typeof saveAs<"u")return saveAs(s,e);if(typeof URL<"u"&&typeof document<"u"&&document.createElement&&URL.createObjectURL){var a=URL.createObjectURL(s);if(typeof chrome=="object"&&typeof(chrome.downloads||{}).download=="function")return URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(a)},6e4),chrome.downloads.download({url:a,filename:e,saveAs:!0});var o=document.createElement("a");if(o.download!=null)return o.download=e,o.href=a,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(a)},6e4),a}}if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var l=File(e);return l.open("w"),l.encoding="binary",Array.isArray(t)&&(t=vl(t)),l.write(t),l.close(),t}catch(c){if(!c.message||!c.message.match(/onstruct/))throw c}throw new Error("cannot save file "+e)}function dG(e){if(typeof Deno<"u")return Deno.readFileSync(e);if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var t=File(e);t.open("r"),t.encoding="binary";var r=t.read();return t.close(),r}catch(n){if(!n.message||!n.message.match(/onstruct/))throw n}throw new Error("Cannot access file "+e)}function Mr(e){for(var t=Object.keys(e),r=[],n=0;n<t.length;++n)Object.prototype.hasOwnProperty.call(e,t[n])&&r.push(t[n]);return r}function Kk(e,t){for(var r=[],n=Mr(e),s=0;s!==n.length;++s)r[e[n[s]][t]]==null&&(r[e[n[s]][t]]=n[s]);return r}function eg(e){for(var t=[],r=Mr(e),n=0;n!==r.length;++n)t[e[r[n]]]=r[n];return t}function tg(e){for(var t=[],r=Mr(e),n=0;n!==r.length;++n)t[e[r[n]]]=parseInt(r[n],10);return t}function fG(e){for(var t=[],r=Mr(e),n=0;n!==r.length;++n)t[e[r[n]]]==null&&(t[e[r[n]]]=[]),t[e[r[n]]].push(r[n]);return t}var Mp=new Date(1899,11,30,0,0,0);function dn(e,t){var r=e.getTime(),n=Mp.getTime()+(e.getTimezoneOffset()-Mp.getTimezoneOffset())*6e4;return(r-n)/(24*60*60*1e3)}var xP=new Date,hG=Mp.getTime()+(xP.getTimezoneOffset()-Mp.getTimezoneOffset())*6e4,Yk=xP.getTimezoneOffset();function rg(e){var t=new Date;return t.setTime(e*24*60*60*1e3+hG),t.getTimezoneOffset()!==Yk&&t.setTime(t.getTime()+(t.getTimezoneOffset()-Yk)*6e4),t}function mG(e){var t=0,r=0,n=!1,s=e.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);if(!s)throw new Error("|"+e+"| is not an ISO8601 Duration");for(var a=1;a!=s.length;++a)if(s[a]){switch(r=1,a>3&&(n=!0),s[a].slice(s[a].length-1)){case"Y":throw new Error("Unsupported ISO Duration Field: "+s[a].slice(s[a].length-1));case"D":r*=24;case"H":r*=60;case"M":if(n)r*=60;else throw new Error("Unsupported ISO Duration Field: M")}t+=r*parseInt(s[a],10)}return t}var Xk=new Date("2017-02-19T19:06:09.000Z"),gP=isNaN(Xk.getFullYear())?new Date("2/19/17"):Xk,pG=gP.getFullYear()==2017;function pr(e,t){var r=new Date(e);if(pG)return t>0?r.setTime(r.getTime()+r.getTimezoneOffset()*60*1e3):t<0&&r.setTime(r.getTime()-r.getTimezoneOffset()*60*1e3),r;if(e instanceof Date)return e;if(gP.getFullYear()==1917&&!isNaN(r.getFullYear())){var n=r.getFullYear();return e.indexOf(""+n)>-1||r.setFullYear(r.getFullYear()+100),r}var s=e.match(/\d+/g)||["2017","2","19","0","0","0"],a=new Date(+s[0],+s[1]-1,+s[2],+s[3]||0,+s[4]||0,+s[5]||0);return e.indexOf("Z")>-1&&(a=new Date(a.getTime()-a.getTimezoneOffset()*60*1e3)),a}function pc(e,t){if(Nt&&Buffer.isBuffer(e)){if(t){if(e[0]==255&&e[1]==254)return hi(e.slice(2).toString("utf16le"));if(e[1]==254&&e[2]==255)return hi(sP(e.slice(2).toString("binary")))}return e.toString("binary")}if(typeof TextDecoder<"u")try{if(t){if(e[0]==255&&e[1]==254)return hi(new TextDecoder("utf-16le").decode(e.slice(2)));if(e[0]==254&&e[1]==255)return hi(new TextDecoder("utf-16be").decode(e.slice(2)))}var r={"€":"€","‚":"‚",ƒ:"ƒ","„":"„","…":"…","†":"†","‡":"‡","ˆ":"ˆ","‰":"‰",Š:"Š","‹":"‹",Œ:"Œ",Ž:"Ž","‘":"‘","’":"’","“":"“","”":"”","•":"•","–":"–","—":"—","˜":"˜","™":"™",š:"š","›":"›",œ:"œ",ž:"ž",Ÿ:"Ÿ"};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(a){return r[a]||a})}catch{}for(var n=[],s=0;s!=e.length;++s)n.push(String.fromCharCode(e[s]));return n.join("")}function xr(e){if(typeof JSON<"u"&&!Array.isArray(e))return JSON.parse(JSON.stringify(e));if(typeof e!="object"||e==null)return e;if(e instanceof Date)return new Date(e.getTime());var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=xr(e[r]));return t}function Ir(e,t){for(var r="";r.length<t;)r+=e;return r}function Ua(e){var t=Number(e);if(!isNaN(t))return isFinite(t)?t:NaN;if(!/\d/.test(e))return t;var r=1,n=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){return r*=100,""});return!isNaN(t=Number(n))||(n=n.replace(/[(](.*)[)]/,function(s,a){return r=-r,a}),!isNaN(t=Number(n)))?t/r:t}var xG=["january","february","march","april","may","june","july","august","september","october","november","december"];function ld(e){var t=new Date(e),r=new Date(NaN),n=t.getYear(),s=t.getMonth(),a=t.getDate();if(isNaN(a))return r;var o=e.toLowerCase();if(o.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){if(o=o.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,""),o.length>3&&xG.indexOf(o)==-1)return r}else if(o.match(/[a-z]/))return r;return n<0||n>8099?r:(s>0||a>1)&&n!=101?t:e.match(/[^-0-9:,\/\\]/)?r:t}var gG=function(){var e="abacaba".split(/(:?b)/i).length==5;return function(r,n,s){if(e||typeof n=="string")return r.split(n);for(var a=r.split(n),o=[a[0]],l=1;l<a.length;++l)o.push(s),o.push(a[l]);return o}}();function vP(e){return e?e.content&&e.type?pc(e.content,!0):e.data?of(e.data):e.asNodeBuffer&&Nt?of(e.asNodeBuffer().toString("binary")):e.asBinary?of(e.asBinary()):e._data&&e._data.getContent?of(pc(Array.prototype.slice.call(e._data.getContent(),0))):null:null}function yP(e){if(!e)return null;if(e.data)return Lk(e.data);if(e.asNodeBuffer&&Nt)return e.asNodeBuffer();if(e._data&&e._data.getContent){var t=e._data.getContent();return typeof t=="string"?Lk(t):Array.prototype.slice.call(t)}return e.content&&e.type?e.content:null}function vG(e){return e&&e.name.slice(-4)===".bin"?yP(e):vP(e)}function ra(e,t){for(var r=e.FullPaths||Mr(e.files),n=t.toLowerCase().replace(/[\/]/g,"\\"),s=n.replace(/\\/g,"/"),a=0;a<r.length;++a){var o=r[a].replace(/^Root Entry[\/]/,"").toLowerCase();if(n==o||s==o)return e.files?e.files[r[a]]:e.FileIndex[a]}return null}function c_(e,t){var r=ra(e,t);if(r==null)throw new Error("Cannot find file "+t+" in zip");return r}function Xr(e,t,r){if(!r)return vG(c_(e,t));if(!t)return null;try{return Xr(e,t)}catch{return null}}function Ms(e,t,r){if(!r)return vP(c_(e,t));if(!t)return null;try{return Ms(e,t)}catch{return null}}function yG(e,t,r){return yP(c_(e,t))}
597function Qk(e){for(var t=e.FullPaths||Mr(e.files),r=[],n=0;n<t.length;++n)t[n].slice(-1)!="/"&&r.push(t[n].replace(/^Root Entry[\/]/,""));return r.sort()}function bt(e,t,r){if(e.FullPaths){if(typeof r=="string"){var n;return Nt?n=io(r):n=MV(r),tt.utils.cfb_add(e,t,n)}tt.utils.cfb_add(e,t,r)}else e.file(t,r)}function u_(){return tt.utils.cfb_new()}function wP(e,t){switch(t.type){case"base64":return tt.read(e,{type:"base64"});case"binary":return tt.read(e,{type:"binary"});case"buffer":case"array":return tt.read(e,{type:"buffer"})}throw new Error("Unrecognized type "+t.type)}function cf(e,t){if(e.charAt(0)=="/")return e.slice(1);var r=t.split("/");t.slice(-1)!="/"&&r.pop();for(var n=e.split("/");n.length!==0;){var s=n.shift();s===".."?r.pop():s!=="."&&r.push(s)}return r.join("/")}var Gr=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
598`,wG=/([^"\s?>\/]+)\s*=\s*((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g,Jk=/<[\/\?]?[a-zA-Z0-9:_-]+(?:\s+[^"\s?>\/]+\s*=\s*(?:"[^"]*"|'[^']*'|[^'">\s=]+))*\s*[\/\?]?>/mg,bG=/<[^>]*>/g,Gn=Gr.match(Jk)?Jk:bG,_G=/<\w*:/,NG=/<(\/?)\w+:/;function ft(e,t,r){for(var n={},s=0,a=0;s!==e.length&&!((a=e.charCodeAt(s))===32||a===10||a===13);++s);if(t||(n[0]=e.slice(0,s)),s===e.length)return n;var o=e.match(wG),l=0,c="",u=0,d="",f="",h=1;if(o)for(u=0;u!=o.length;++u){for(f=o[u],a=0;a!=f.length&&f.charCodeAt(a)!==61;++a);for(d=f.slice(0,a).trim();f.charCodeAt(a+1)==32;)++a;for(h=(s=f.charCodeAt(a+1))==34||s==39?1:0,c=f.slice(a+1+h,f.length-h),l=0;l!=d.length&&d.charCodeAt(l)!==58;++l);if(l===d.length)d.indexOf("_")>0&&(d=d.slice(0,d.indexOf("_"))),n[d]=c,n[d.toLowerCase()]=c;else{var m=(l===5&&d.slice(0,5)==="xmlns"?"xmlns":"")+d.slice(l+1);if(n[m]&&d.slice(l-3,l)=="ext")continue;n[m]=c,n[m.toLowerCase()]=c}}return n}function Si(e){return e.replace(NG,"<$1")}var bP={"&quot;":'"',"&apos;":"'","&gt;":">","&lt;":"<","&amp;":"&"},d_=eg(bP),Dt=function(){var e=/&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/ig,t=/_x([\da-fA-F]{4})_/ig;return function r(n){var s=n+"",a=s.indexOf("<![CDATA[");if(a==-1)return s.replace(e,function(l,c){return bP[l]||String.fromCharCode(parseInt(c,l.indexOf("x")>-1?16:10))||l}).replace(t,function(l,c){return String.fromCharCode(parseInt(c,16))});var o=s.indexOf("]]>");return r(s.slice(0,a))+s.slice(a+9,o)+r(s.slice(o+3))}}(),f_=/[&<>'"]/g,SG=/[\u0000-\u0008\u000b-\u001f]/g;function Jt(e){var t=e+"";return t.replace(f_,function(r){return d_[r]}).replace(SG,function(r){return"_x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+"_"})}function Zk(e){return Jt(e).replace(/ /g,"_x0020_")}var _P=/[\u0000-\u001f]/g;function h_(e){var t=e+"";return t.replace(f_,function(r){return d_[r]}).replace(/\n/g,"<br/>").replace(_P,function(r){return"&#x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+";"})}function kG(e){var t=e+"";return t.replace(f_,function(r){return d_[r]}).replace(_P,function(r){return"&#x"+r.charCodeAt(0).toString(16).toUpperCase()+";"})}var ej=function(){var e=/&#(\d+);/g;function t(r,n){return String.fromCharCode(parseInt(n,10))}return function(n){return n.replace(e,t)}}();function jG(e){return e.replace(/(\r\n|[\r\n])/g,"&#10;")}function hr(e){switch(e){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}function Iv(e){for(var t="",r=0,n=0,s=0,a=0,o=0,l=0;r<e.length;){if(n=e.charCodeAt(r++),n<128){t+=String.fromCharCode(n);continue}if(s=e.charCodeAt(r++),n>191&&n<224){o=(n&31)<<6,o|=s&63,t+=String.fromCharCode(o);continue}if(a=e.charCodeAt(r++),n<240){t+=String.fromCharCode((n&15)<<12|(s&63)<<6|a&63);continue}o=e.charCodeAt(r++),l=((n&7)<<18|(s&63)<<12|(a&63)<<6|o&63)-65536,t+=String.fromCharCode(55296+(l>>>10&1023)),t+=String.fromCharCode(56320+(l&1023))}return t}function tj(e){var t=il(2*e.length),r,n,s=1,a=0,o=0,l;for(n=0;n<e.length;n+=s)s=1,(l=e.charCodeAt(n))<128?r=l:l<224?(r=(l&31)*64+(e.charCodeAt(n+1)&63),s=2):l<240?(r=(l&15)*4096+(e.charCodeAt(n+1)&63)*64+(e.charCodeAt(n+2)&63),s=3):(s=4,r=(l&7)*262144+(e.charCodeAt(n+1)&63)*4096+(e.charCodeAt(n+2)&63)*64+(e.charCodeAt(n+3)&63),r-=65536,o=55296+(r>>>10&1023),r=56320+(r&1023)),o!==0&&(t[a++]=o&255,t[a++]=o>>>8,o=0),t[a++]=r%256,t[a++]=r>>>8;return t.slice(0,a).toString("ucs2")}function rj(e){return io(e,"binary").toString("utf8")}var im="foo bar baz☃🍣",tr=Nt&&(rj(im)==Iv(im)&&rj||tj(im)==Iv(im)&&tj)||Iv,hi=Nt?function(e){return io(e,"utf8").toString("binary")}:function(e){for(var t=[],r=0,n=0,s=0;r<e.length;)switch(n=e.charCodeAt(r++),!0){case n<128:t.push(String.fromCharCode(n));break;case n<2048:t.push(String.fromCharCode(192+(n>>6))),t.push(String.fromCharCode(128+(n&63)));break;case(n>=55296&&n<57344):n-=55296,s=e.charCodeAt(r++)-56320+(n<<10),t.push(String.fromCharCode(240+(s>>18&7))),t.push(String.fromCharCode(144+(s>>12&63))),t.push(String.fromCharCode(128+(s>>6&63))),t.push(String.fromCharCode(128+(s&63)));break;default:t.push(String.fromCharCode(224+(n>>12))),t.push(String.fromCharCode(128+(n>>6&63))),t.push(String.fromCharCode(128+(n&63)))}return t.join("")},wh=function(){var e={};return function(r,n){var s=r+"|"+(n||"");return e[s]?e[s]:e[s]=new RegExp("<(?:\\w+:)?"+r+'(?: xml:space="preserve")?(?:[^>]*)>([\\s\\S]*?)</(?:\\w+:)?'+r+">",n||"")}}(),NP=function(){var e=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(t){return[new RegExp("&"+t[0]+";","ig"),t[1]]});return function(r){for(var n=r.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,`
599`).replace(/<[^>]*>/g,""),s=0;s<e.length;++s)n=n.replace(e[s][0],e[s][1]);return n}}(),EG=function(){var e={};return function(r){return e[r]!==void 0?e[r]:e[r]=new RegExp("<(?:vt:)?"+r+">([\\s\\S]*?)</(?:vt:)?"+r+">","g")}}(),CG=/<\/?(?:vt:)?variant>/g,TG=/<(?:vt:)([^>]*)>([\s\S]*)</;function nj(e,t){var r=ft(e),n=e.match(EG(r.baseType))||[],s=[];if(n.length!=r.size){if(t.WTF)throw new Error("unexpected vector length "+n.length+" != "+r.size);return s}
vendor: 6,495 bytes, line 599
599return n.forEach(function(a){var o=a.replace(CG,"").match(TG);o&&s.push({v:tr(o[2]),t:o[1]})}),s}var SP=/(^\s|\s$|\n)/;function En(e,t){return"<"+e+(t.match(SP)?' xml:space="preserve"':"")+">"+t+"</"+e+">"}function bh(e){return Mr(e).map(function(t){return" "+t+'="'+e[t]+'"'}).join("")}function De(e,t,r){return"<"+e+(r!=null?bh(r):"")+(t!=null?(t.match(SP)?' xml:space="preserve"':"")+">"+t+"</"+e:"/")+">"}function Hy(e,t){try{return e.toISOString().replace(/\.\d*/,"")}catch(r){if(t)throw r}return""}function AG(e,t){switch(typeof e){case"string":var r=De("vt:lpwstr",Jt(e));return r=r.replace(/&quot;/g,"_x0022_"),r;case"number":return De((e|0)==e?"vt:i4":"vt:r8",Jt(String(e)));case"boolean":return De("vt:bool",e?"true":"false")}if(e instanceof Date)return De("vt:filetime",Hy(e));throw new Error("Unable to serialize "+e)}function m_(e){if(Nt&&Buffer.isBuffer(e))return e.toString("utf8");if(typeof e=="string")return e;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return tr(vl(i_(e)));throw new Error("Bad input format: expected Buffer or string")}var _h=/<(\/?)([^\s?><!\/:]*:|)([^\s?<>:\/]+)(?:[\s?:\/][^>]*)?>/mg,ln={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},Ec=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"],Rs={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"};function PG(e,t){for(var r=1-2*(e[t+7]>>>7),n=((e[t+7]&127)<<4)+(e[t+6]>>>4&15),s=e[t+6]&15,a=5;a>=0;--a)s=s*256+e[t+a];return n==2047?s==0?r*(1/0):NaN:(n==0?n=-1022:(n-=1023,s+=Math.pow(2,52)),r*Math.pow(2,n-52)*s)}function RG(e,t,r){var n=(t<0||1/t==-1/0?1:0)<<7,s=0,a=0,o=n?-t:t;isFinite(o)?o==0?s=a=0:(s=Math.floor(Math.log(o)/Math.LN2),a=o*Math.pow(2,52-s),s<=-1023&&(!isFinite(a)||a<Math.pow(2,52))?s=-1022:(a-=Math.pow(2,52),s+=1023)):(s=2047,a=isNaN(t)?26985:0);for(var l=0;l<=5;++l,a/=256)e[r+l]=a&255;e[r+6]=(s&15)<<4|a&15,e[r+7]=s>>4|n}var sj=function(e){for(var t=[],r=10240,n=0;n<e[0].length;++n)if(e[0][n])for(var s=0,a=e[0][n].length;s<a;s+=r)t.push.apply(t,e[0][n].slice(s,s+r));return t},aj=Nt?function(e){return e[0].length>0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map(function(t){return Buffer.isBuffer(t)?t:io(t)})):sj(e)}:sj,ij=function(e,t,r){for(var n=[],s=t;s<r;s+=2)n.push(String.fromCharCode($i(e,s)));return n.join("").replace(Zn,"")},p_=Nt?function(e,t,r){return Buffer.isBuffer(e)?e.toString("utf16le",t,r).replace(Zn,""):ij(e,t,r)}:ij,oj=function(e,t,r){for(var n=[],s=t;s<t+r;++s)n.push(("0"+e[s].toString(16)).slice(-2));return n.join("")},kP=Nt?function(e,t,r){return Buffer.isBuffer(e)?e.toString("hex",t,t+r):oj(e,t,r)}:oj,lj=function(e,t,r){for(var n=[],s=t;s<r;s++)n.push(String.fromCharCode(nu(e,s)));return n.join("")},o0=Nt?function(t,r,n){return Buffer.isBuffer(t)?t.toString("utf8",r,n):lj(t,r,n)}:lj,jP=function(e,t){var r=Os(e,t);return r>0?o0(e,t+4,t+4+r-1):""},EP=jP,CP=function(e,t){var r=Os(e,t);return r>0?o0(e,t+4,t+4+r-1):""},TP=CP,AP=function(e,t){var r=2*Os(e,t);return r>0?o0(e,t+4,t+4+r-1):""},PP=AP,RP=function(t,r){var n=Os(t,r);return n>0?p_(t,r+4,r+4+n):""},OP=RP,DP=function(e,t){var r=Os(e,t);return r>0?o0(e,t+4,t+4+r):""},IP=DP,FP=function(e,t){return PG(e,t)},Lp=FP,x_=function(t){return Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array};Nt&&(EP=function(t,r){if(!Buffer.isBuffer(t))return jP(t,r);var n=t.readUInt32LE(r);return n>0?t.toString("utf8",r+4,r+4+n-1):""},TP=function(t,r){if(!Buffer.isBuffer(t))return CP(t,r);var n=t.readUInt32LE(r);return n>0?t.toString("utf8",r+4,r+4+n-1):""},PP=function(t,r){if(!Buffer.isBuffer(t))return AP(t,r);var n=2*t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+n-1)},OP=function(t,r){if(!Buffer.isBuffer(t))return RP(t,r);var n=t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+n)},IP=function(t,r){if(!Buffer.isBuffer(t))return DP(t,r);var n=t.readUInt32LE(r);return t.toString("utf8",r+4,r+4+n)},Lp=function(t,r){return Buffer.isBuffer(t)?t.readDoubleLE(r):FP(t,r)},x_=function(t){return Buffer.isBuffer(t)||Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array});var nu=function(e,t){return e[t]},$i=function(e,t){return e[t+1]*256+e[t]},OG=function(e,t){var r=e[t+1]*256+e[t];return r<32768?r:(65535-r+1)*-1},Os=function(e,t){return e[t+3]*(1<<24)+(e[t+2]<<16)+(e[t+1]<<8)+e[t]},$l=function(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]},DG=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};function jf(e,t){var r="",n,s,a=[],o,l,c,u;switch(t){case"dbcs":if(u=this.l,Nt&&Buffer.isBuffer(this))r=this.slice(this.l,this.l+2*e).toString("utf16le");else for(c=0;c<e;++c)r+=String.fromCharCode($i(this,u)),u+=2;e*=2;break;case"utf8":r=o0(this,this.l,this.l+e);break;case"utf16le":e*=2,r=p_(this,this.l,this.l+e);break;case"wstr":return jf.call(this,e,"dbcs");case"lpstr-ansi":r=EP(this,this.l),e=4+Os(this,this.l);break;case"lpstr-cp":r=TP(this,this.l),e=4+Os(this,this.l);break;case"lpwstr":r=PP(this,this.l),e=4+2*Os(this,this.l);break;case"lpp4":e=4+Os(this,this.l),r=OP(this,this.l),e&2&&(e+=2);break;case"8lpp4":e=4+Os(this,this.l),r=IP(this,this.l),e&3&&(e+=4-(e&3));break;case"cstr":for(e=0,r="";(o=nu(this,this.l+e++))!==0;)a.push(am(o));r=a.join("");break;case"_wstr":for(e=0,r="";(o=$i(this,this.l+e))!==0;)a.push(am(o)),e+=2;
vendor: 4,215 bytes, line 599
599e+=2,r=a.join("");break;case"dbcs-cont":for(r="",u=this.l,c=0;c<e;++c){if(this.lens&&this.lens.indexOf(u)!==-1)return o=nu(this,u),this.l=u+1,l=jf.call(this,e-c,o?"dbcs-cont":"sbcs-cont"),a.join("")+l;a.push(am($i(this,u))),u+=2}r=a.join(""),e*=2;break;case"cpstr":case"sbcs-cont":for(r="",u=this.l,c=0;c!=e;++c){if(this.lens&&this.lens.indexOf(u)!==-1)return o=nu(this,u),this.l=u+1,l=jf.call(this,e-c,o?"dbcs-cont":"sbcs-cont"),a.join("")+l;a.push(am(nu(this,u))),u+=1}r=a.join("");break;default:switch(e){case 1:return n=nu(this,this.l),this.l++,n;case 2:return n=(t==="i"?OG:$i)(this,this.l),this.l+=2,n;case 4:case-4:return t==="i"||!(this[this.l+3]&128)?(n=(e>0?$l:DG)(this,this.l),this.l+=4,n):(s=Os(this,this.l),this.l+=4,s);case 8:case-8:if(t==="f")return e==8?s=Lp(this,this.l):s=Lp([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,s;e=8;case 16:r=kP(this,this.l,e);break}}return this.l+=e,r}var IG=function(e,t,r){e[r]=t&255,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24&255},FG=function(e,t,r){e[r]=t&255,e[r+1]=t>>8&255,e[r+2]=t>>16&255,e[r+3]=t>>24&255},MG=function(e,t,r){e[r]=t&255,e[r+1]=t>>>8&255};function LG(e,t,r){var n=0,s=0;if(r==="dbcs"){for(s=0;s!=t.length;++s)MG(this,t.charCodeAt(s),this.l+2*s);n=2*t.length}else if(r==="sbcs"){for(t=t.replace(/[^\x00-\x7F]/g,"_"),s=0;s!=t.length;++s)this[this.l+s]=t.charCodeAt(s)&255;n=t.length}else if(r==="hex"){for(;s<e;++s)this[this.l++]=parseInt(t.slice(2*s,2*s+2),16)||0;return this}else if(r==="utf16le"){var a=Math.min(this.l+e,this.length);for(s=0;s<Math.min(t.length,e);++s){var o=t.charCodeAt(s);this[this.l++]=o&255,this[this.l++]=o>>8}for(;this.l<a;)this[this.l++]=0;return this}else switch(e){case 1:n=1,this[this.l]=t&255;break;case 2:n=2,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255;break;case 3:n=3,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255,t>>>=8,this[this.l+2]=t&255;break;case 4:n=4,IG(this,t,this.l);break;case 8:if(n=8,r==="f"){RG(this,t,this.l);break}case 16:break;case-4:n=4,FG(this,t,this.l);break}return this.l+=n,this}function MP(e,t){var r=kP(this,this.l,e.length>>1);if(r!==e)throw new Error(t+"Expected "+e+" saw "+r);this.l+=e.length>>1}function jn(e,t){e.l=t,e.read_shift=jf,e.chk=MP,e.write_shift=LG}function Vn(e,t){e.l+=t}function he(e){var t=il(e);return jn(t,0),t}function oo(e,t,r){if(e){var n,s,a;jn(e,e.l||0);for(var o=e.length,l=0,c=0;e.l<o;){l=e.read_shift(1),l&128&&(l=(l&127)+((e.read_shift(1)&127)<<7));var u=Ch[l]||Ch[65535];for(n=e.read_shift(1),a=n&127,s=1;s<4&&n&128;++s)a+=((n=e.read_shift(1))&127)<<7*s;c=e.l+a;var d=u.f&&u.f(e,a,r);if(e.l=c,t(d,u,l))return}}}function ms(){var e=[],t=Nt?256:2048,r=function(u){var d=he(u);return jn(d,0),d},n=r(t),s=function(){n&&(n.length>n.l&&(n=n.slice(0,n.l),n.l=n.length),n.length>0&&e.push(n),n=null)},a=function(u){return n&&u<n.length-n.l?n:(s(),n=r(Math.max(u+1,t)))},o=function(){return s(),gn(e)},l=function(u){s(),n=u,n.l==null&&(n.l=n.length),a(t)};return{next:a,push:l,end:o,_bufs:e}}function we(e,t,r,n){var s=+t,a;if(!isNaN(s)){n||(n=Ch[s].p||(r||[]).length||0),a=1+(s>=128?1:0)+1,n>=128&&++a,n>=16384&&++a,n>=2097152&&++a;var o=e.next(a);s<=127?o.write_shift(1,s):(o.write_shift(1,(s&127)+128),o.write_shift(1,s>>7));for(var l=0;l!=4;++l)if(n>=128)o.write_shift(1,(n&127)+128),n>>=7;else{o.write_shift(1,n);break}n>0&&x_(r)&&e.push(r)}}function Ef(e,t,r){var n=xr(e);if(t.s?(n.cRel&&(n.c+=t.s.c),n.rRel&&(n.r+=t.s.r)):(n.cRel&&(n.c+=t.c),n.rRel&&(n.r+=t.r)),!r||r.biff<12){for(;n.c>=256;)n.c-=256;for(;n.r>=65536;)n.r-=65536}return n}function cj(e,t,r){var n=xr(e);return n.s=Ef(n.s,t.s,r),n.e=Ef(n.e,t.s,r),n}function Cf(e,t){if(e.cRel&&e.c<0)for(e=xr(e);e.c<0;)e.c+=t>8?16384:256;if(e.rRel&&e.r<0)for(e=xr(e);e.r<0;)e.r+=t>8?1048576:t>5?65536:16384;var r=ut(e);return!e.cRel&&e.cRel!=null&&(r=UG(r)),!e.rRel&&e.rRel!=null&&(r=BG(r)),r}function Fv(e,t){return e.s.r==0&&!e.s.rRel&&e.e.r==(t.biff>=12?1048575:t.biff>=8?65536:16384)&&!e.e.rRel?(e.s.cRel?"":"$")+kr(e.s.c)+":"+(e.e.cRel?"":"$")+kr(e.e.c):e.s.c==0&&!e.s.cRel&&e.e.c==(t.biff>=12?16383:255)&&!e.e.cRel?(e.s.rRel?"":"$")+Vr(e.s.r)+":"+(e.e.rRel?"":"$")+Vr(e.e.r):Cf(e.s,t.biff)+":"+Cf(e.e,t.b
vendor: 5,180 bytes, line 599
599iff)}function g_(e){return parseInt($G(e),10)-1}function Vr(e){return""+(e+1)}function BG(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}function $G(e){return e.replace(/\$(\d+)$/,"$1")}function v_(e){for(var t=WG(e),r=0,n=0;n!==t.length;++n)r=26*r+t.charCodeAt(n)-64;return r-1}function kr(e){if(e<0)throw new Error("invalid column "+e);var t="";for(++e;e;e=Math.floor((e-1)/26))t=String.fromCharCode((e-1)%26+65)+t;return t}function UG(e){return e.replace(/^([A-Z])/,"$$$1")}function WG(e){return e.replace(/^\$([A-Z])/,"$1")}function zG(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function jr(e){for(var t=0,r=0,n=0;n<e.length;++n){var s=e.charCodeAt(n);s>=48&&s<=57?t=10*t+(s-48):s>=65&&s<=90&&(r=26*r+(s-64))}return{c:r-1,r:t-1}}function ut(e){for(var t=e.c+1,r="";t;t=(t-1)/26|0)r=String.fromCharCode((t-1)%26+65)+r;return r+(e.r+1)}function gs(e){var t=e.indexOf(":");return t==-1?{s:jr(e),e:jr(e)}:{s:jr(e.slice(0,t)),e:jr(e.slice(t+1))}}function yt(e,t){return typeof t>"u"||typeof t=="number"?yt(e.s,e.e):(typeof e!="string"&&(e=ut(e)),typeof t!="string"&&(t=ut(t)),e==t?e:e+":"+t)}function It(e){var t={s:{c:0,r:0},e:{c:0,r:0}},r=0,n=0,s=0,a=e.length;for(r=0;n<a&&!((s=e.charCodeAt(n)-64)<1||s>26);++n)r=26*r+s;for(t.s.c=--r,r=0;n<a&&!((s=e.charCodeAt(n)-48)<0||s>9);++n)r=10*r+s;if(t.s.r=--r,n===a||s!=10)return t.e.c=t.s.c,t.e.r=t.s.r,t;for(++n,r=0;n!=a&&!((s=e.charCodeAt(n)-64)<1||s>26);++n)r=26*r+s;for(t.e.c=--r,r=0;n!=a&&!((s=e.charCodeAt(n)-48)<0||s>9);++n)r=10*r+s;return t.e.r=--r,t}function uj(e,t){var r=e.t=="d"&&t instanceof Date;if(e.z!=null)try{return e.w=xa(e.z,r?dn(t):t)}catch{}try{return e.w=xa((e.XF||{}).numFmtId||(r?14:0),r?dn(t):t)}catch{return""+t}}function eo(e,t,r){return e==null||e.t==null||e.t=="z"?"":e.w!==void 0?e.w:(e.t=="d"&&!e.z&&r&&r.dateNF&&(e.z=r.dateNF),e.t=="e"?lo[e.v]||e.v:t==null?uj(e,e.v):uj(e,t))}function yl(e,t){var r=t&&t.sheet?t.sheet:"Sheet1",n={};return n[r]=e,{SheetNames:[r],Sheets:n}}function LP(e,t,r){var n=r||{},s=e?Array.isArray(e):n.dense,a=e||(s?[]:{}),o=0,l=0;if(a&&n.origin!=null){if(typeof n.origin=="number")o=n.origin;else{var c=typeof n.origin=="string"?jr(n.origin):n.origin;o=c.r,l=c.c}a["!ref"]||(a["!ref"]="A1:A1")}var u={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(a["!ref"]){var d=It(a["!ref"]);u.s.c=d.s.c,u.s.r=d.s.r,u.e.c=Math.max(u.e.c,d.e.c),u.e.r=Math.max(u.e.r,d.e.r),o==-1&&(u.e.r=o=d.e.r+1)}for(var f=0;f!=t.length;++f)if(t[f]){if(!Array.isArray(t[f]))throw new Error("aoa_to_sheet expects an array of arrays");for(var h=0;h!=t[f].length;++h)if(!(typeof t[f][h]>"u")){var m={v:t[f][h]},g=o+f,p=l+h;if(u.s.r>g&&(u.s.r=g),u.s.c>p&&(u.s.c=p),u.e.r<g&&(u.e.r=g),u.e.c<p&&(u.e.c=p),t[f][h]&&typeof t[f][h]=="object"&&!Array.isArray(t[f][h])&&!(t[f][h]instanceof Date))m=t[f][h];else if(Array.isArray(m.v)&&(m.f=t[f][h][1],m.v=m.v[0]),m.v===null)if(m.f)m.t="n";else if(n.nullError)m.t="e",m.v=0;else if(n.sheetStubs)m.t="z";else continue;else typeof m.v=="number"?m.t="n":typeof m.v=="boolean"?m.t="b":m.v instanceof Date?(m.z=n.dateNF||it[14],n.cellDates?(m.t="d",m.w=xa(m.z,dn(m.v))):(m.t="n",m.v=dn(m.v),m.w=xa(m.z,m.v))):m.t="s";if(s)a[g]||(a[g]=[]),a[g][p]&&a[g][p].z&&(m.z=a[g][p].z),a[g][p]=m;else{var x=ut({c:p,r:g});a[x]&&a[x].z&&(m.z=a[x].z),a[x]=m}}}return u.s.c<1e7&&(a["!ref"]=yt(u)),a}function Td(e,t){return LP(null,e,t)}function HG(e){return e.read_shift(4,"i")}function Wa(e,t){return t||(t=he(4)),t.write_shift(4,e),t}function Wn(e){var t=e.read_shift(4);return t===0?"":e.read_shift(t,"dbcs")}function vn(e,t){var r=!1;return t==null&&(r=!0,t=he(4+2*e.length)),t.write_shift(4,e.length),e.length>0&&t.write_shift(0,e,"dbcs"),r?t.slice(0,t.l):t}function VG(e){return{ich:e.read_shift(2),ifnt:e.read_shift(2)}}function GG(e,t){return t||(t=he(4)),t.write_shift(2,0),t.write_shift(2,0),t}function y_(e,t){var r=e.l,n=e.read_shift(1),s=Wn(e),a=[],o={t:s,h:s};if(n&1){for(var l=e.read_shift(4),c=0;c!=l;++c)a.push(VG(e));o.r=a}else o.r=[{ich:0,ifnt:0}];return e.l=r+t,o}function qG(e,t){var r=!1;return t==null&&(r=!0,t=he(15+4*e.t.length)),t.write_shift(1,0),vn(e.t,t),r?t.slice(0,t.l):t}var KG=y_;function YG(e,t){var r=!1;return t==null&&(r=!0,t=he(23+4*e.t.length)),t.write_shift(1,1),vn(e.t,t),t.write_shift(4,1),GG({ich:0,ifnt:0},t),r?t.slice(0,t.l):t}function ya(e){var t=e.read_shift(4),r=e.read_shift(2);return r+=e.read_shift(1)<<16,e.l++,{c:t,iStyleRef:r}}function Cc(e,t){return t==null&&(t=he(8)),t.write_shift(-4,e.c),t.write_shift(3,e.iStyleRef||e.s),t.write_shift(1,0),t}function Tc(e){var t=e.read_shift(2);return t+=e.read_shift(1)<<16,e.l++,{c:-1,iStyleRef:t}}function Ac(e,t){return t==null&&(t=he(4)),t.write_shift(3,e.iStyleRef||e.s),t.write_shift(1,0),t}var XG=Wn,BP=vn;function w_(e){var t=e.read_shift(4);return t===0||t===4294967295?"":e.read_shift(t,"dbcs")}function Bp(e,t){var r=!1;return t==null&&(r=!0,t=he(127)),t.write_shift(4,e.length>0?e.length:4294967295),e.length>0&&t.write_shift(0,e,"dbcs"),r?t.slice(0,t.l):t}var QG=Wn,Vy=w_,b_=Bp;function __(e){var t=e.slice(e.l,e.l+4),r=t[0]&1,n=t[0]&2;e.l+=4;var s=n===0?Lp([0,0,0,0,t[0]&252,t[1],t[2],t[3]],0):$l(t,0)>>2;return r?s/100:s}function $P(e,t){t==null&&(t=he(4));var r=0,n=0,s=e*100;
599if(e==(e|0)&&e>=-(1<<29)&&e<1<<29?n=1:s==(s|0)&&s>=-(1<<29)&&s<1<<29&&(n=1,r=1),n)t.write_shift(-4,((r?s:e)<<2)+(r+2));else throw new Error("unsupported RkNumber "+e)}function UP(e){var t={s:{},e:{}};return t.s.r=e.read_shift(4),t.e.r=e.read_shift(4),t.s.c=e.read_shift(4),t.e.c=e.read_shift(4),t}function JG(e,t){return t||(t=he(16)),t.write_shift(4,e.s.r),t.write_shift(4,e.e.r),t.write_shift(4,e.s.c),t.write_shift(4,e.e.c),t}var Pc=UP,Ad=JG;function Un(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function xc(e,t){return(t||he(8)).write_shift(8,e,"f")}function ZG(e){var t={},r=e.read_shift(1),n=r>>>1,s=e.read_shift(1),a=e.read_shift(2,"i"),o=e.read_shift(1),l=e.read_shift(1),c=e.read_shift(1);switch(e.l++,n){case 0:t.auto=1;break;case 1:t.index=s;var u=rc[s];u&&(t.rgb=Sh(u));break;case 2:t.rgb=Sh([o,l,c]);break;case 3:t.theme=s;break}return a!=0&&(t.tint=a>0?a/32767:a/32768),t}function $p(e,t){if(t||(t=he(8)),!e||e.auto)return t.write_shift(4,0),t.write_shift(4,0),t;e.index!=null?(t.write_shift(1,2),t.write_shift(1,e.index)):e.theme!=null?(t.write_shift(1,6),t.write_shift(1,e.theme)):(t.write_shift(1,5),t.write_shift(1,0));var r=e.tint||0;if(r>0?r*=32767:r<0&&(r*=32768),t.write_shift(2,r),!e.rgb||e.theme!=null)t.write_shift(2,0),t.write_shift(1,0),t.write_shift(1,0);else{var n=e.rgb||"FFFFFF";typeof n=="number"&&(n=("000000"+n.toString(16)).slice(-6)),t.write_shift(1,parseInt(n.slice(0,2),16)),t.write_shift(1,parseInt(n.slice(2,4),16)),t.write_shift(1,parseInt(n.slice(4,6),16)),t.write_shift(1,255)}return t}function eq(e){var t=e.read_shift(1);e.l++;var r={fBold:t&1,fItalic:t&2,fUnderline:t&4,fStrikeout:t&8,fOutline:t&16,fShadow:t&32,fCondense:t&64,fExtend:t&128};return r}function tq(e,t){t||(t=he(2));var r=(e.italic?2:0)|(e.strike?8:0)|(e.outline?16:0)|(e.shadow?32:0)|(e.condense?64:0)|(e.extend?128:0);return t.write_shift(1,r),t.write_shift(1,0),t}function WP(e,t){var r={2:"BITMAP",3:"METAFILEPICT",8:"DIB",14:"ENHMETAFILE"},n=e.read_shift(4);switch(n){case 0:return"";case 4294967295:case 4294967294:return r[e.read_shift(4)]||""}if(n>400)throw new Error("Unsupported Clipboard: "+n.toString(16));return e.l-=4,e.read_shift(0,t==1?"lpstr":"lpwstr")}function rq(e){return WP(e,1)}function nq(e){return WP(e,2)}var N_=2,is=3,om=11,dj=12,Up=19,lm=64,sq=65,aq=71,iq=4108,oq=4126,mn=80,zP=81,lq=[mn,zP],Gy={1:{n:"CodePage",t:N_},2:{n:"Category",t:mn},3:{n:"PresentationFormat",t:mn},4:{n:"ByteCount",t:is},5:{n:"LineCount",t:is},6:{n:"ParagraphCount",t:is},7:{n:"SlideCount",t:is},8:{n:"NoteCount",t:is},9:{n:"HiddenCount",t:is},10:{n:"MultimediaClipCount",t:is},11:{n:"ScaleCrop",t:om},12:{n:"HeadingPairs",t:iq},13:{n:"TitlesOfParts",t:oq},14:{n:"Manager",t:mn},15:{n:"Company",t:mn},16:{n:"LinksUpToDate",t:om},17:{n:"CharacterCount",t:is},19:{n:"SharedDoc",t:om},22:{n:"HyperlinksChanged",t:om},23:{n:"AppVersion",t:is,p:"version"},24:{n:"DigSig",t:sq},26:{n:"ContentType",t:mn},27:{n:"ContentStatus",t:mn},28:{n:"Language",t:mn},29:{n:"Version",t:mn},255:{},2147483648:{n:"Locale",t:Up},2147483651:{n:"Behavior",t:Up},1919054434:{}},qy={1:{n:"CodePage",t:N_},2:{n:"Title",t:mn},3:{n:"Subject",t:mn},4:{n:"Author",t:mn},5:{n:"Keywords",t:mn},6:{n:"Comments",t:mn},7:{n:"Template",t:mn},8:{n:"LastAuthor",t:mn},9:{n:"RevNumber",t:mn},10:{n:"EditTime",t:lm},11:{n:"LastPrinted",t:lm},12:{n:"CreatedDate",t:lm},13:{n:"ModifiedDate",t:lm},14:{n:"PageCount",t:is},15:{n:"WordCount",t:is},16:{n:"CharCount",t:is},17:{n:"Thumbnail",t:aq},18:{n:"Application",t:mn},19:{n:"DocSecurity",t:is},255:{},2147483648:{n:"Locale",t:Up},2147483651:{n:"Behavior",t:Up},1919054434:{}},fj={1:"US",2:"CA",3:"",7:"RU",20:"EG",30:"GR",31:"NL",32:"BE",33:"FR",34:"ES",36:"HU",39:"IT",41:"CH",43:"AT",44:"GB",45:"DK",46:"SE",47:"NO",48:"PL",49:"DE",52:"MX",55:"BR",61:"AU",64:"NZ",66:"TH",81:"JP",82:"KR",84:"VN",86:"CN",90:"TR",105:"JS",213:"DZ",216:"MA",218:"LY",351:"PT",354:"IS",358:"FI",420:"CZ",886:"TW",961:"LB",962:"JO",963:"SY",964:"IQ",965:"KW",966:"SA",971:"AE",972:"IL",974:"QA",981:"IR",65535:"US"},cq=[null,"solid","mediumGray","darkGray","lightGray","darkHorizontal","dar
599kVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"];function uq(e){return e.map(function(t){return[t>>16&255,t>>8&255,t&255]})}var dq=uq([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),rc=xr(dq),lo={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},HP={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},Ky={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"},cm={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"}
vendor: 2,301 bytes, line 599
599,comments:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",xlsb:"application/vnd.ms-excel.comments"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},charts:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",xlsb:"application/vnd.ms-excel.chartsheet"},dialogs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",xlsb:"application/vnd.ms-excel.dialogsheet"},macros:{xlsx:"application/vnd.ms-excel.macrosheet+xml",xlsb:"application/vnd.ms-excel.macrosheet"},metadata:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",xlsb:"application/vnd.ms-excel.sheetMetadata"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};function S_(){return{workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""}}function fq(e){var t=S_();if(!e||!e.match)return t;var r={};if((e.match(Gn)||[]).forEach(function(n){var s=ft(n);switch(s[0].replace(_G,"<")){case"<?xml":break;case"<Types":t.xmlns=s["xmlns"+(s[0].match(/<(\w+):/)||["",""])[1]];break;case"<Default":r[s.Extension]=s.ContentType;break;case"<Override":t[Ky[s.ContentType]]!==void 0&&t[Ky[s.ContentType]].push(s.PartName);break}}),t.xmlns!==ln.CT)throw new Error("Unknown Namespace: "+t.xmlns);return t.calcchain=t.calcchains.length>0?t.calcchains[0]:"",t.sst=t.strs.length>0?t.strs[0]:"",t.style=t.styles.length>0?t.styles[0]:"",t.defaults=r,delete t.calcchains,t}function VP(e,t){var r=fG(Ky),n=[],s;n[n.length]=Gr,n[n.length]=De("Types",null,{xmlns:ln.CT,"xmlns:xsd":ln.xsd,"xmlns:xsi":ln.xsi}),n=n.concat([["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["t
599if","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels","application/vnd.openxmlformats-package.relationships+xml"]].map(function(c){return De("Default",null,{Extension:c[0],ContentType:c[1]})}));var a=function(c){e[c]&&e[c].length>0&&(s=e[c][0],n[n.length]=De("Override",null,{PartName:(s[0]=="/"?"":"/")+s,ContentType:cm[c][t.bookType]||cm[c].xlsx}))},o=function(c){(e[c]||[]).forEach(function(u){n[n.length]=De("Override",null,{PartName:(u[0]=="/"?"":"/")+u,ContentType:cm[c][t.bookType]||cm[c].xlsx})})},l=function(c){(e[c]||[]).forEach(function(u){n[n.length]=De("Override",null,{PartName:(u[0]=="/"?"":"/")+u,ContentType:r[c][0]})})};return a("workbooks"),o("sheets"),o("charts"),l("themes"),["strs","styles"].forEach(a),["coreprops","extprops","custprops"].forEach(l),l("vba"),l("comments"),l("threadedcomments"),l("drawings"),o("metadata"),l("people"),n.length>2&&(n[n.length]="</Types>",n[1]=n[1].replace("/>",">")),n.join("")}var St
vendor: 2,399 bytes, line 599
599={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",
vendor: 21,695 bytes, lines 599-609
599VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function Nh(e){var t=e.lastIndexOf("/");return e.slice(0,t+1)+"_rels/"+e.slice(t+1)+".rels"}function Tf(e,t){var r={"!id":{}};if(!e)return r;t.charAt(0)!=="/"&&(t="/"+t);var n={};return(e.match(Gn)||[]).forEach(function(s){var a=ft(s);if(a[0]==="<Relationship"){var o={};o.Type=a.Type,o.Target=a.Target,o.Id=a.Id,a.TargetMode&&(o.TargetMode=a.TargetMode);var l=a.TargetMode==="External"?a.Target:cf(a.Target,t);r[l]=o,n[a.Id]=o}}),r["!id"]=n,r}function Ru(e){var t=[Gr,De("Relationships",null,{xmlns:ln.RELS})];return Mr(e["!id"]).forEach(function(r){t[t.length]=De("Relationship",null,e["!id"][r])}),t.length>2&&(t[t.length]="</Relationships>",t[1]=t[1].replace("/>",">")),t.join("")}function Qt(e,t,r,n,s,a){if(s||(s={}),e["!id"]||(e["!id"]={}),e["!idx"]||(e["!idx"]=1),t<0)for(t=e["!idx"];e["!id"]["rId"+t];++t);if(e["!idx"]=t+1,s.Id="rId"+t,s.Type=n,s.Target=r,[St.HLINK,St.XPATH,St.XMISS].indexOf(s.Type)>-1&&(s.TargetMode="External"),e["!id"][s.Id])throw new Error("Cannot rewrite rId "+t);return e["!id"][s.Id]=s,e[("/"+s.Target).replace("//","/")]=s,t}var hq="application/vnd.oasis.opendocument.spreadsheet";function mq(e,t){for(var r=m_(e),n,s;n=_h.exec(r);)switch(n[3]){case"manifest":break;case"file-entry":if(s=ft(n[0],!1),s.path=="/"&&s.type!==hq)throw new Error("This OpenDocument is not a spreadsheet");break;case"encryption-data":case"algorithm":case"start-key-generation":case"key-derivation":throw new Error("Unsupported ODS Encryption");default:if(t&&t.WTF)throw n}}function pq(e){var t=[Gr];t.push(`<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.2">
600`),t.push(`  <manifest:file-entry manifest:full-path="/" manifest:version="1.2" manifest:media-type="application/vnd.oasis.opendocument.spreadsheet"/>
601`);for(var r=0;r<e.length;++r)t.push('  <manifest:file-entry manifest:full-path="'+e[r][0]+'" manifest:media-type="'+e[r][1]+`"/>
602`);return t.push("</manifest:manifest>"),t.join("")}function hj(e,t,r){return['  <rdf:Description rdf:about="'+e+`">
603`,'    <rdf:type rdf:resource="http://docs.oasis-open.org/ns/office/1.2/meta/'+(r||"odf")+"#"+t+`"/>
604`,`  </rdf:Description>
605`].join("")}function xq(e,t){return['  <rdf:Description rdf:about="'+e+`">
606`,'    <ns0:hasPart xmlns:ns0="http://docs.oasis-open.org/ns/office/1.2/meta/pkg#" rdf:resource="'+t+`"/>
607`,`  </rdf:Description>
608`].join("")}function gq(e){var t=[Gr];t.push(`<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
609`);for(var r=0;r!=e.length;++r)t.push(hj(e[r][0],e[r][1])),t.push(xq("",e[r][0]));return t.push(hj("","Document","pkg")),t.push("</rdf:RDF>"),t.join("")}function GP(){return'<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xlink="http://www.w3.org/1999/xlink" office:version="1.2"><office:meta><meta:generator>SheetJS '+Op.version+"</meta:generator></office:meta></office:document-meta>"}var da=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]],vq=function(){for(var e=new Array(da.length),t=0;t<da.length;++t){var r=da[t],n="(?:"+r[0].slice(0,r[0].indexOf(":"))+":)"+r[0].slice(r[0].indexOf(":")+1);e[t]=new RegExp("<"+n+"[^>]*>([\\s\\S]*?)</"+n+">")}return e}();function qP(e){var t={};e=tr(e);for(var r=0;r<da.length;++r){var n=da[r],s=e.match(vq[r]);s!=null&&s.length>0&&(t[n[1]]=Dt(s[1])),n[2]==="date"&&t[n[1]]&&(t[n[1]]=pr(t[n[1]]))}return t}function Mv(e,t,r,n,s){s[e]!=null||t==null||t===""||(s[e]=t,t=Jt(t),n[n.length]=r?De(e,t,r):En(e,t))}function KP(e,t){var r=t||{},n=[Gr,De("cp:coreProperties",null,{"xmlns:cp":ln.CORE_PROPS,"xmlns:dc":ln.dc,"xmlns:dcterms":ln.dcterms,"xmlns:dcmitype":ln.dcmitype,"xmlns:xsi":ln.xsi})],s={};if(!e&&!r.Props)return n.join("");e&&(e.CreatedDate!=null&&Mv("dcterms:created",typeof e.CreatedDate=="string"?e.CreatedDate:Hy(e.CreatedDate,r.WTF),{"xsi:type":"dcterms:W3CDTF"},n,s),e.ModifiedDate!=null&&Mv("dcterms:modified",typeof e.ModifiedDate=="string"?e.ModifiedDate:Hy(e.ModifiedDate,r.WTF),{"xsi:type":"dcterms:W3CDTF"},n,s));for(var a=0;a!=da.length;++a){var o=da[a],l=r.Props&&r.Props[o[1]]!=null?r.Props[o[1]]:e?e[o[1]]:null;l===!0?l="1":l===!1?l="0":typeof l=="number"&&(l=String(l)),l!=null&&Mv(o[0],l,null,n,s)}return n.length>2&&(n[n.length]="</cp:coreProperties>",n[1]=n[1].replace("/>",">")),n.join("")}var nc=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]],YP=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function XP(e,t,r,n){var s=[];if(typeof e=="string")s=nj(e,n);else for(var a=0;a<e.length;++a)s=s.concat(e[a].map(function(d){return{v:d}}));var o=typeof t=="string"?nj(t,n).map(function(d){return d.v}):t,l=0,c=0;if(o.length>0)for(var u=0;u!==s.length;u+=2){switch(c=+s[u+1].v,s[u].v){case"Worksheets":case"工作表":case"Листы":case"أوراق العمل":case"ワークシート":case"גליונות עבודה":case"Arbeitsblätter":case"Çalışma Sayfaları":case"Feuilles de calcul":case"Fogli di lavoro":case"Folhas de cálculo":case"Planilhas":case"Regneark":case"Hojas de cálculo":case"Werkbladen":r.Worksheets=c,r.SheetNames=o.slice(l,l+c);break;case"Named Ranges":case"Rangos con nombre":case"名前付き一覧":case"Benannte Bereiche":case"Navngivne områder":r.NamedRanges=c,r.DefinedNames=o.slice(l,l+c);break;case"Charts":case"Diagramme":r.Chartsheets=c,r.ChartNames=o.slice(l,l+c);break}l+=c}}function yq(e,t,r){var n={};return t||(t={}),e=tr(e),nc.forEach(function(s){var a=(e.match(wh(s[0]))||[])[1];switch(s[2]){case"string":a&&(t[s[1]]=Dt(a));break;case"bool":t[s[1]]=a==="true";break;case"raw":var o=e.match(new RegExp("<"+s[0]+"[^>]*>([\\s\\S]*?)</"+s[0]+">"));o&&o.length>0&&(n[s[1]]=o[1]);break}}),n.HeadingPairs&&n.TitlesOfParts&&XP(n.HeadingPairs,n.TitlesOfParts,t,r),t}function QP(e){var t=[],r=De;return e||(e={}),e.Application="SheetJS",t[t.length]=Gr,t[t.length]=De("Properties",null,{xmlns:ln.EXT_PROPS,"xmlns:vt":ln.vt}),nc.forEach(function(n){if(e[n[1]]!==void 0){var s;switch(n[2]){case"string":s=Jt(String(e[n[1]]));break;case"bool":s=e[n[1]]?"true":"false";break}s!==void 0&&(t[t.length]=r(n[0],s))}}),t[t.length]=r("HeadingPairs",r("vt:vector",r("vt:variant","<vt:lpstr>Worksheets</vt:lpstr>")+r("vt:variant",r("vt:i4",String(e.Worksheets))),{size:2,baseType:"variant"})),t[t.length]=r("TitlesOfParts",r("vt:vector",e.SheetNames.map(function(n){return"<vt:lpstr>"+Jt(n)+"</vt:lpstr>"}).join(""),{size:e.Worksheets,baseType:"lpstr"})),t.length>2&&(t[t.length]="</Properties>",t[1]=t[1].replace("/>",">")),t.join("")}var wq=/<[^>]+>[^<]*/g;function bq(e,t){var r={},n="",s=e.match(wq);if(s)for(var a=0;a!=s.length;++a){var o=s[a],l=ft(o);switch(l[0]){case"<?xml":break;case"<Properties":break;case"<property":n=Dt(l.name);break;case"</property>":n=null;break;default:if(o.indexOf("<vt:")===0){var c=o.split(">"),u=c[0].slice(4),d=c[1];switch(u){case"lpstr":case"bstr":case"lpwstr":r[n]=Dt(d);break;case"bool":r[n]=hr(d);break;case"i1":case"i2":case"i4":case"i8":case"int":case"uint":r[n]=parseInt(d,10);break;case"r4":case"r8":case"decimal":r[n]=parseFloat(d);break;case"filetime":case"date":r[n]=pr(d);break;case"cy":case"error":r[n]=Dt(d);break;default:if(u.slice(-1)=="/")break;t.WTF&&typeof console<"u"&&console.warn("Unexpected",o,u,c)}}else if(o.slice(0,2)!=="</"){if(t.WTF)throw new Error(o)}}}return r}function JP(e){var t=[Gr,De("Properties",null,{xmlns:ln.CUST_PROPS,"xmlns:vt":ln.vt})];if(!e)return t.join("");var r=1;return Mr(e).forEach(function(s){++r,t[t.length]=De("property",AG(e[s]),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:r,name:Jt(s)})}),t.length>2&&(t[t.length]="</Properties>",t[1]=t[1].replace("/>",">")),t.join("")}var Yy={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"},Lv;function _q(e,t,r){Lv||(Lv=eg(Yy)),t=Lv[t]||t,e[t]=r}function Nq(e,t){var r=[];return Mr(Yy).map(function(n){for(var s=0;s<da.length;++s)if(da[s][1]==n)return da[s];for(s=0;s<nc.length;++s)if(nc[s][1]==n)return nc[s];throw n}).forEach(function(n){if(e[n[1]]!=null){var s=t&&t.Props&&t.Props[n[1]]!=null?t.Props[n[1]]:e[n[1]];switch(n[2]){case"date":s=new Date(s).toISOString().replace(/\.\d*Z/,"Z");break}typeof s=="number"?s=String(s):s===!0||s===!1?s=s?"1":"0":s instanceof Date&&(s=new Date(s).toISOString().replace(/\.\d*Z/,"")),r.push(En(Yy[n[1]]||n[1],s))}}),De("DocumentProperties",r.join(""),{xmlns:Rs.o})}function Sq(e,t){var r=["Worksheets","SheetNames"],n="CustomDocumentProperties",s=[];return e&&Mr(e).forEach(function(a){if(Object.prototype.hasOwnProperty.call(e,a)){for(var o=0;o<da.length;++o)if(a==da[o][1])return;for(o=0;o<nc.length;++o)if(a==nc[o][1])return;for(o=0;o<r.length;++o)if(a==r[o])return;var l=e[a],c="string";typeof l=="number"?(c="float",l=String(l)):l===!0||l===!1?(c="boolean",l=l?"1":"0"):l=String(l),s.push(De(Zk(a),l,{"dt:dt":c}))}}),t&&Mr(t).forEach(function(a){if(Object.prototype.hasOwnProperty.call(t,a)&&!(e&&Object.prototype.hasOwnProperty.call(e,a))){var o=t[a],l="string";typeof o=="number"?(l="float",o=String(o)):o===!0||o===!1?(l="boolean",o=o?"1":"0"):o instanceof Date?(l="dateTime.tz",o=o.toISOString()):o=String(o),s.push(De(Zk(a),o,{"dt:dt":l}))}}),"<"+n+' xmlns="'+Rs.o+'">'+s.join("")+"</"+n+">"}function k_(e){var t=e.read_shift(4),r=e.read_shift(4);return new Date((r/1e7*Math.pow(2,32)+t/1e7-11644473600)*1e3).toISOString().replace(/\.000/,"")}function kq(e){var t=typeof e=="string"?new Date(Date.parse(e)):e,r=t.getTime()/1e3+11644473600,n=r%Math.pow(2,32),s=(r-n)/Math.pow(2,32);n*=1e7,s*=1e7;var a=n/Math.pow(2,32)|0;a>0&&(n=n%Math.pow(2,32),s+=a);var o=he(8);return o.write_shift(4,n),o.write_shift(4,s),o}function ZP(e,t,r){var n=e.l,s=e.read_shift(0,"lpstr-cp");if(r)for(;e.l-n&3;)++e.l;return s}function eR(e,t,r){var n=e.read_shift(0,"lpwstr");return n}function tR(e,t,r){return t===31?eR(e):ZP(e,t,r)}function Xy(e,t,r){return tR(e,t,r===!1?0:4)}function jq(e,t){if(!t)throw new Error("VtUnalignedString must have positive length");return tR(e,t,0)}function Eq(e){for(var t=e.read_shift(4),r=[],n=0;n!=t;++n){var s=e.l;r[n]=e.read_shift(0,"lpwstr").replace(Zn,""),e.l-s&2&&(e.l+=2)}return r}function Cq(e){for(var t=e.read_shift(4),r=[],n=0;n!=t;++n)r[n]=e.read_shift(0,"lpstr-cp").replace(Zn,"");return r}function Tq(e){var t=e.l,r=Wp(e,zP);e[e.l]==0&&e[e.l+1]==0&&e.l-t&2&&(e.l+=2);var n=Wp(e,is);return[r,n]}function Aq(e){for(var t=e.read_shift(4),r=[],n=0;n<t/2;++n)r.push(Tq(e));return r}function mj(e,t){for(var r=e.read_shift(4),n={},s=0;s!=r;++s){var a=e.read_shift(4),o=e.read_shift(4);n[a]=e.read_shift(o,t===1200?"utf16le":"utf8").replace(Zn,"").replace(lf,"!"),t===1200&&o%2&&(e.l+=2)}return e.l&3&&(e.l=e.l>>3<<2),n}function rR(e){var t=e.read_shift(4),r=e.slice(e.l,e.l+t);return e.l+=t,(t&3)>0&&(e.l+=4-(t&3)&3),r}function Pq(e){var t={};return t.Size=e.read_shift(4),e.l+=t.Size+3-(t.Size-1)%4,t}function Wp(e,t,r){var n=e.read_shift(2),s,a=r||{};if(e.l+=2,t!==dj&&n!==t&&lq.indexOf(t)===-1&&!((t&65534)==4126&&(n&65534)==4126))throw new Error("Expected type "+t+" saw "+n);switch(t===dj?n:t){case 2:return s=e.read_shift(2,"i"),a.raw||(e.l+=2),s;case 3:return s=e.read_shift(4,"i"),s;case 11:return e.read_shift(4)!==0;case 19:return s=e.read_shift(4),s;case 30:return ZP(e,n,4).replace(Zn,"");case 31:return eR(e);case 64:return k_(e);case 65:return rR(e);case 71:return Pq(e);case 80:return Xy(e,n,!a.raw).replace(Zn,"");case 81:return jq(e,n).replace(Zn,"");case 4108:return Aq(e);case 4126:case 4127:return n==4127?Eq(e):Cq(e);default:throw new Error("TypedPropertyValue unrecognized type "+t+" "+n)}}function pj(e,t){var r=he(4),n=he(4);switch(r.write_shift(4,e==80?31:e),e){case 3:n.write_shift(-4,t);break;case 5:n=he(8),n.write_shift(8,t,"f");break;case 11:n.write_shift(4,t?1:0);break;case 64:n=kq(t);break;case 31:case 80:for(n=he(4+2*(t.length+1)+(t.length%2?0:2)),n.write_shift(4,t.length+1),n.write_shift(0,t,"dbcs");n.l!=n.length;)n.write_shift(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+e+" "+t)}return gn([r,n])}function xj(e,t){var r=e.l,n=e.read_shift(4),s=e.read_shift(4),a=[],o=0,l=0,c=-1,u={};for(o=0;o!=s;++o){var d=e.read_shift(4),f=e.read_shift(4);a[o]=[d,f+r]}a.sort(function(w,y){return w[1]-y[1]});var h={};for(o=0;o!=s;++o){if(e.l!==a[o][1]){var m=!0;if(o>0&&t)switch(t[a[o-1][0]].t){case 2:e.l+2===a[o][1]&&(e.l+=2,m=!1);break;case 80:e.l<=a[o][1]&&(e.l=a[o][1],m=!1);break;case 4108:e.l<=a[o][1]&&(e.l=a[o][1],m=!1);break}if((!t||o==0)&&e.l<=a[o][1]&&(m=!1,e.l=a[o][1]),m)throw new Error("Read Error: Expected address "+a[o][1]+" at "+e.l+" :"+o)}if(t){var g=t[a[o][0]];if(h[g.n]=Wp(e,g.t,{raw:!0}),g.p==="version"&&(h[g.n]=String(h[g.n]>>16)+"."+("0000"+String(h[g.n]&65535)).slice(-4)),g.n=="CodePage")switch(h[g.n]){case 0:h[g.n]=1252;case 874:case 932:case 936:case 949:case 950:case 1250:case 1251:case 1253:case 1254:case 1255:case 1256:case 1257:case 1258:case 1e4:case 1200:case 1201:case 1252:case 65e3:case-536:case 65001:case-535:Fa(l=h[g.n]>>>0&65535);break;default:throw new Error("Unsupported CodePage: "+h[g.n])}}else if(a[o][0]===1){if(l=h.CodePage=Wp(e,N_),Fa(l),c!==-1){var p=e.l;e.l=a[c][1],u=mj(e,l),e.l=p}}else if(a[o][0]===0){if(l===0){c=o,e.l=a[o+1][1];continue}u=mj(e,l)}else{var x=u[a[o][0]],b;switch(e[e.l]){case 65:e.l+=4,b=rR(e);break;case 30:e.l+=4,b=Xy(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 31:e.l+=4,b=Xy(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 3:e.l+=4,b=e.read_shift(4,"i");break;case 19:e.l+=4,b=e.read_shift(4);break;case 5:e.l+=4,b=e.read_shift(8,"f");break;case 11:e.l+=4,b=Br(e,4);break;case 64:e.l+=4,b=pr(k_(e));break;default:throw new Error("unparsed value: "+e[e.l])}h[x]=b}}return e.l=r+n,h}var nR=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"];function Rq(e){switch(typeof e){case"boolean":return 11;case"number":return(e|0)==e?3:5;case"string":return 31;case"object":if(e instanceof Date)return 64;break}return-1}function gj(e,t,r){var n=he(8),s=[],a=[],o=8,l=0,c=he(8),u=he(8);if(c.write_shift(4,2),c.write_shift(4,1200),u.write_shift(4,1),a.push(c),s.push(u),o+=8+c.length,!t){u=he(8),u.write_shift(4,0),s.unshift(u);var d=[he(4)];for(d[0].write_shift(4,e.length),l=0;l<e.length;++l){var f=e[l][0];for(c=he(8+2*(f.length+1)+(f.length%2?0:2)),c.write_shift(4,l+2),c.write_shift(4,f.length+1),c.write_shift(0,f,"dbcs");c.l!=c.length;)c.write_shift(1,0);d.push(c)}c=gn(d),a.unshift(c),o+=8+c.length}for(l=0;l<e.length;++l)if(!(t&&!t[e[l][0]])&&!(nR.indexOf(e[l][0])>-1||YP.indexOf(e[l][0])>-1)&&e[l][1]!=null){var h=e[l][1],m=0;if(t){m=+t[e[l][0]];var g=r[m];if(g.p=="version"&&typeof h=="string"){var p=h.split(".");h=(+p[0]<<16)+(+p[1]||0)}c=pj(g.t,h)}else{var x=Rq(h);x==-1&&(x=31,h=String(h)),c=pj(x,h)}a.push(c),u=he(8),u.write_shift(4,t?m:2+l),s.push(u),o+=8+c.length}var b=8*(a.length+1);for(l=0;l<a.length;++l)s[l].write_shift(4,b),b+=a[l].length;return n.write_shift(4,o),n.write_shift(4,a.length),gn([n].concat(s).concat(a))}function vj(e,t,r){var n=e.content;if(!n)return{};jn(n,0);var s,a,o,l,c=0;n.chk("feff","Byte Order: "),n.read_shift(2);var u=n.read_shift(4),d=n.read_shift(16);if(d!==tt.utils.consts.HEADER_CLSID&&d!==r)throw new Error("Bad PropertySet CLSID "+d);if(s=n.read_shift(4),s!==1&&s!==2)throw new Error("Unrecognized #Sets: "+s);if(a=n.read_shift(16),l=n.read_shift(4),s===1&&l!==n.l)throw new Error("Length mismatch: "+l+" !== "+n.l);s===2&&(o=n.read_shift(16),c=n.read_shift(4));var f=xj(n,t),h={SystemIdentifier:u};for(var m in f)h[m]=f[m];if(h.FMTID=a,s===1)return h;if(c-n.l==2&&(n.l+=2),n.l!==c)throw new Error("Length mismatch 2: "+n.l+" !== "+c);var g;try{g=xj(n,null)}catch{}for(m in g)h[m]=g[m];return h.FMTID=[a,o],h}function yj(e,t,r,n,s,a){var o=he(s?68:48),l=[o];o.write_shift(2,65534),o.write_shift(2,0),o.write_shift(4,842412599),o.write_shift(16,tt.utils.consts.HEADER_CLSID,"hex"),o.write_shift(4,s?2:1),o.write_shift(16,t,"hex"),o.write_shift(4,s?68:48);var c=gj(e,r,n);if(l.push(c),s){var u=gj(s,null,null);o.write_shift(16,a,"hex"),o.write_shift(4,68+c.length),l.push(u)}return gn(l)}function po(e,t){return e.read_shift(t),null}function Oq(e,t){t||(t=he(e));for(var r=0;r<e;++r)t.write_shift(1,0);return t}function Dq(e,t,r){for(var n=[],s=e.l+t;e.l<s;)n.push(r(e,s-e.l));if(s!==e.l)throw new Error("Slurp error");return n}function Br(e,t){return e.read_shift(t)===1}function Xn(e,t){return t||(t=he(2)),t.write_shift(2,+!!e),t}function Qr(e){return e.read_shift(2,"u")}function sa(e,t){return t||(t=he(2)),t.write_shift(2,e),t}function sR(e,t){return Dq(e,t,Qr)}function Iq(e){var t=e.read_shift(1),r=e.read_shift(1);return r===1?t:t===1}function aR(e,t,r){return r||(r=he(2)),r.write_shift(1,t=="e"?+e:+!!e),r.write_shift(1,t=="e"?1:0),r}function l0(e,t,r){var n=e.read_shift(r&&r.biff>=12?2:1),s="sbcs-cont";if(r&&r.biff>=8,!r||r.biff==8){var a=e.read_shift(1);a&&(s="dbcs-cont")}else r.biff==12&&(s="wstr");r.biff>=2&&r.biff<=5&&(s="cpstr");var o=n?e.read_shift(n,s):"";return o}function Fq(e){var t=e.read_shift(2),r=e.read_shift(1),n=r&4,s=r&8,a=1+(r&1),o=0,l,c={};s&&(o=e.read_shift(2)),n&&(l=e.read_shift(4));var u=a==2?"dbcs-cont":"sbcs-cont",d=t===0?"":e.read_shift(t,u);return s&&(e.l+=4*o),n&&(e.l+=l),c.t=d,s||(c.raw="<t>"+c.t+"</t>",c.r=c.t),c}function Mq(e){var t=e.t||"",r=he(3);r.write_shift(2,t.length),r.write_shift(1,1);var n=he(2*t.length);n.write_shift(2*t.length,t,"utf16le");var s=[r,n];return gn(s)}function gc(e,t,r){var n;if(r){if(r.biff>=2&&r.biff<=5)return e.read_shift(t,"cpstr");if(r.biff>=12)return e.read_shift(t,"dbcs-cont")}var s=e.read_shift(1);return s===0?n=e.read_shift(t,"sbcs-cont"):n=e.read_shift(t,"dbcs-cont"),n}function c0(e,t,r){var n=e.read_shift(r&&r.biff==2?1:2);return n===0?(e.l++,""):gc(e,n,r)}function Rc(e,t,r){if(r.biff>5)return c0(e,t,r);var n=e.read_shift(1);return n===0?(e.l++,""):e.read_shift(n,r.biff<=4||!e.lens?"cpstr":"sbcs-cont")}function iR(e,t,r){return r||(r=he(3+2*e.length)),r.write_shift(2,e.length),r.write_shift(1,1),r.write_shift(31,e,"utf16le"),r}function Lq(e){var t=e.read_shift(1);e.l++;var r=e.read_shift(2);return e.l+=2,[t,r]}function Bq(e){var t=e.read_shift(4),r=e.l,n=!1;t>24&&(e.l+=t-24,e.read_shift(16)==="795881f43b1d7f48af2c825dc4852763"&&(n=!0),e.l=r);var s=e.read_shift((n?t-24:t)>>1,"utf16le").replace(Zn,"");return n&&(e.l+=24),s}function $q(e){for(var t=e.read_shift(2),r="";t-- >0;)r+="../";var n=e.read_shift(0,"lpstr-ansi");if(e.l+=2,e.read_shift(2)!=57005)throw new Error("Bad FileMoniker");var s=e.read_shift(4);if(s===0)return r+n.replace(/\\/g,"/");var a=e.read_shift(4);if(e.read_shift(2)!=3)throw new Error("Bad FileMoniker");var o=e.read_shift(a>>1,"utf16le").replace(Zn,"");return r+o}function Uq(e,t){var r=e.read_shift(16);switch(r){case"e0c9ea79f9bace118c8200aa004ba90b":return Bq(e);case"0303000000000000c000000000000046":return $q(e);default:throw new Error("Unsupported Moniker "+r)}}function um(e){var t=e.read_shift(4),r=t>0?e.read_shift(t,"utf16le").replace(Zn,""):"";return r}function wj(e,t){t||(t=he(6+e.length*2)),t.write_shift(4,1+e.length);for(var r=0;r<e.length;++r)t.write_shift(2,e.charCodeAt(r));return t.write_shift(2,0),t}function Wq(e,t){var r=e.l+t,n=e.read_shift(4);if(n!==2)throw new Error("Unrecognized streamVersion: "+n);var s=e.read_shift(2);e.l+=2;var a,o,l,c,u="",d,f;s&16&&(a=um(e,r-e.l)),s&128&&(o=um(e,r-e.l)),(s&257)===257&&(l=um(e,r-e.l)),(s&257)===1&&(c=Uq(e,r-e.l)),s&8&&(u=um(e,r-e.l)),s&32&&(d=e.read_shift(16)),s&64&&(f=k_(e)),e.l=r;var h=o||l||c||"";h&&u&&(h+="#"+u),h||(h="#"+u),s&2&&h.charAt(0)=="/"&&h.charAt(1)!="/"&&(h="file://"+h);var m={Target:h};return d&&(m.guid=d),f&&(m.time=f),a&&(m.Tooltip=a),m}function zq(e){var t=he(512),r=0,n=e.Target;n.slice(0,7)=="file://"&&(n=n.slice(7));var s=n.indexOf("#"),a=s>-1?31:23;switch(n.charAt(0)){case"#":a=28;break;case".":a&=-3;break}t.write_shift(4,2),t.write_shift(4,a);var o=[8,6815827,6619237,4849780,83];for(r=0;r<o.length;++r)t.write_shift(4,o[r]);if(a==28)n=n.slice(1),wj(n,t);else if(a&2){for(o="e0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),r=0;r<o.length;++r)t.write_shift(1,parseInt(o[r],16));var l=s>-1?n.slice(0,s):n;for(t.write_shift(4,2*(l.length+1)),r=0;r<l.length;++r)t.write_shift(2,l.charCodeAt(r));t.write_shift(2,0),a&8&&wj(s>-1?n.slice(s+1):"",t)}else{for(o="03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "),r=0;r<o.length;++r)t.write_shift(1,parseInt(o[r],16));for(var c=0;n.slice(c*3,c*3+3)=="../"||n.slice(c*3,c*3+3)=="..\\";)++c;for(t.write_shift(2,c),t.write_shift(4,n.length-3*c+1),r=0;r<n.length-3*c;
609++r)t.write_shift(1,n.charCodeAt(r+3*c)&255);for(t.write_shift(1,0),t.write_shift(2,65535),t.write_shift(2,57005),r=0;r<6;++r)t.write_shift(4,0)}return t.slice(0,t.l)}function oR(e){var t=e.read_shift(1),r=e.read_shift(1),n=e.read_shift(1),s=e.read_shift(1);return[t,r,n,s]}function lR(e,t){var r=oR(e);return r[3]=0,r}function ki(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2);return{r:t,c:r,ixfe:n}}function vc(e,t,r,n){return n||(n=he(6)),n.write_shift(2,e),n.write_shift(2,t),n.write_shift(2,r||0),n}function Hq(e){var t=e.read_shift(2),r=e.read_shift(2);return e.l+=8,{type:t,flags:r}}function Vq(e,t,r){return t===0?"":Rc(e,t,r)}function Gq(e,t,r){var n=r.biff>8?4:2,s=e.read_shift(n),a=e.read_shift(n,"i"),o=e.read_shift(n,"i");return[s,a,o]}function cR(e){var t=e.read_shift(2),r=__(e);return[t,r]}function qq(e,t,r){e.l+=4,t-=4;var n=e.l+t,s=l0(e,t,r),a=e.read_shift(2);if(n-=e.l,a!==n)throw new Error("Malformed AddinUdf: padding = "+n+" != "+a);return e.l+=a,s}function ng(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2),s=e.read_shift(2);return{s:{c:n,r:t},e:{c:s,r}}}function uR(e,t){return t||(t=he(8)),t.write_shift(2,e.s.r),t.write_shift(2,e.e.r),t.write_shift(2,e.s.c),t.write_shift(2,e.e.c),t}function dR(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(1),s=e.read_shift(1);return{s:{c:n,r:t},e:{c:s,r}}}var Kq=dR;function fR(e){e.l+=4;var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2);return e.l+=12,[r,t,n]}function Yq(e){var t={};return e.l+=4,e.l+=16,t.fSharedNote=e.read_shift(2),e.l+=4,t}function Xq(e){var t={};return e.l+=4,e.cf=e.read_shift(2),t}function In(e){e.l+=2,e.l+=e.read_shift(2)}var Qq={0:In,4:In,5:In,6:In,7:Xq,8:In,9:In,10:In,11:In,12:In,13:Yq,14:In,15:In,16:In,17:In,18:In,19:In,20:In,21:fR};function Jq(e,t){for(var r=e.l+t,n=[];e.l<r;){var s=e.read_shift(2);e.l-=2;try{n.push(Qq[s](e,r-e.l))}catch{return e.l=r,n}}return e.l!=r&&(e.l=r),n}function dm(e,t){var r={BIFFVer:0,dt:0};switch(r.BIFFVer=e.read_shift(2),t-=2,t>=2&&(r.dt=e.read_shift(2),e.l-=2),r.BIFFVer){case 1536:case 1280:case 1024:case 768:case 512:case 2:case 7:break;default:if(t>6)throw new Error("Unexpected BIFF Ver "+r.BIFFVer)}return e.read_shift(t),r}function j_(e,t,r){var n=1536,s=16;switch(r.bookType){case"biff8":break;case"biff5":n=1280,s=8;break;case"biff4":n=4,s=6;break;case"biff3":n=3,s=6;break;case"biff2":n=2,s=4;break;case"xla":break;default:throw new Error("unsupported BIFF version")}var a=he(s);return a.write_shift(2,n),a.write_shift(2,t),s>4&&a.write_shift(2,29282),s>6&&a.write_shift(2,1997),s>8&&(a.write_shift(2,49161),a.write_shift(2,1),a.write_shift(2,1798),a.write_shift(2,0)),a}function Zq(e,t){return t===0||e.read_shift(2),1200}function eK(e,t,r){if(r.enc)return e.l+=t,"";var n=e.l,s=Rc(e,0,r);return e.read_shift(t+n-e.l),s}function tK(e,t){var r=!t||t.biff==8,n=he(r?112:54);for(n.write_shift(t.biff==8?2:1,7),r&&n.write_shift(1,0),n.write_shift(4,859007059),n.write_shift(4,5458548|(r?0:536870912));n.l<n.length;)n.write_shift(1,r?0:32);return n}function rK(e,t,r){var n=r&&r.biff==8||t==2?e.read_shift(2):(e.l+=t,0);return{fDialog:n&16,fBelow:n&64,fRight:n&128}}function nK(e,t,r){var n=e.read_shift(4),s=e.read_shift(1)&3,a=e.read_shift(1);switch(a){case 0:a="Worksheet";break;case 1:a="Macrosheet";break;case 2:a="Chartsheet";break;case 6:a="VBAModule";break}var o=l0(e,0,r);return o.length===0&&(o="Sheet1"),{pos:n,hs:s,dt:a,name:o}}function sK(e,t){var r=!t||t.biff>=8?2:1,n=he(8+r*e.name.length);n.write_shift(4,e.pos),n.write_shift(1,e.hs||0),n.write_shift(1,e.dt),n.write_shift(1,e.name.length),t.biff>=8&&n.write_shift(1,1),n.write_shift(r*e.name.length,e.name,t.biff<8?"sbcs":"utf16le");var s=n.slice(0,n.l);
vendor: 11,122 bytes, line 609
609return s.l=n.l,s}function aK(e,t){for(var r=e.l+t,n=e.read_shift(4),s=e.read_shift(4),a=[],o=0;o!=s&&e.l<r;++o)a.push(Fq(e));return a.Count=n,a.Unique=s,a}function iK(e,t){var r=he(8);r.write_shift(4,e.Count),r.write_shift(4,e.Unique);for(var n=[],s=0;s<e.length;++s)n[s]=Mq(e[s]);var a=gn([r].concat(n));return a.parts=[r.length].concat(n.map(function(o){return o.length})),a}function oK(e,t){var r={};return r.dsst=e.read_shift(2),e.l+=t-2,r}function lK(e){var t={};t.r=e.read_shift(2),t.c=e.read_shift(2),t.cnt=e.read_shift(2)-t.c;var r=e.read_shift(2);e.l+=4;var n=e.read_shift(1);return e.l+=3,n&7&&(t.level=n&7),n&32&&(t.hidden=!0),n&64&&(t.hpt=r/20),t}function cK(e){var t=Hq(e);if(t.type!=2211)throw new Error("Invalid Future Record "+t.type);var r=e.read_shift(4);return r!==0}function uK(e){return e.read_shift(2),e.read_shift(4)}function bj(e,t,r){var n=0;r&&r.biff==2||(n=e.read_shift(2));var s=e.read_shift(2);r&&r.biff==2&&(n=1-(s>>15),s&=32767);var a={Unsynced:n&1,DyZero:(n&2)>>1,ExAsc:(n&4)>>2,ExDsc:(n&8)>>3};return[a,s]}function dK(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2),s=e.read_shift(2),a=e.read_shift(2),o=e.read_shift(2),l=e.read_shift(2),c=e.read_shift(2),u=e.read_shift(2);return{Pos:[t,r],Dim:[n,s],Flags:a,CurTab:o,FirstTab:l,Selected:c,TabRatio:u}}function fK(){var e=he(18);return e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,29280),e.write_shift(2,17600),e.write_shift(2,56),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,1),e.write_shift(2,500),e}function hK(e,t,r){if(r&&r.biff>=2&&r.biff<5)return{};var n=e.read_shift(2);return{RTL:n&64}}function mK(e){var t=he(18),r=1718;return e&&e.RTL&&(r|=64),t.write_shift(2,r),t.write_shift(4,0),t.write_shift(4,64),t.write_shift(4,0),t.write_shift(4,0),t}function pK(){}function xK(e,t,r){var n={dyHeight:e.read_shift(2),fl:e.read_shift(2)};switch(r&&r.biff||8){case 2:break;case 3:case 4:e.l+=2;break;default:e.l+=10;break}return n.name=l0(e,0,r),n}function gK(e,t){var r=e.name||"Arial",n=t&&t.biff==5,s=n?15+r.length:16+2*r.length,a=he(s);return a.write_shift(2,(e.sz||12)*20),a.write_shift(4,0),a.write_shift(2,400),a.write_shift(4,0),a.write_shift(2,0),a.write_shift(1,r.length),n||a.write_shift(1,1),a.write_shift((n?1:2)*r.length,r,n?"sbcs":"utf16le"),a}function vK(e){var t=ki(e);return t.isst=e.read_shift(4),t}function yK(e,t,r,n){var s=he(10);return vc(e,t,n,s),s.write_shift(4,r),s}function wK(e,t,r){r.biffguess&&r.biff==2&&(r.biff=5);var n=e.l+t,s=ki(e);r.biff==2&&e.l++;var a=c0(e,n-e.l,r);return s.val=a,s}function bK(e,t,r,n,s){var a=!s||s.biff==8,o=he(8+ +a+(1+a)*r.length);return vc(e,t,n,o),o.write_shift(2,r.length),a&&o.write_shift(1,1),o.write_shift((1+a)*r.length,r,a?"utf16le":"sbcs"),o}function _K(e,t,r){var n=e.read_shift(2),s=Rc(e,0,r);return[n,s]}function NK(e,t,r,n){var s=r&&r.biff==5;n||(n=he(s?3+t.length:5+2*t.length)),n.write_shift(2,e),n.write_shift(s?1:2,t.length),s||n.write_shift(1,1),n.write_shift((s?1:2)*t.length,t,s?"sbcs":"utf16le");var a=n.length>n.l?n.slice(0,n.l):n;return a.l==null&&(a.l=a.length),a}var SK=Rc;function _j(e,t,r){var n=e.l+t,s=r.biff==8||!r.biff?4:2,a=e.read_shift(s),o=e.read_shift(s),l=e.read_shift(2),c=e.read_shift(2);return e.l=n,{s:{r:a,c:l},e:{r:o,c}}}function kK(e,t){var r=t.biff==8||!t.biff?4:2,n=he(2*r+6);return n.write_shift(r,e.s.r),n.write_shift(r,e.e.r+1),n.write_shift(2,e.s.c),n.write_shift(2,e.e.c+1),n.write_shift(2,0),n}function jK(e){var t=e.read_shift(2),r=e.read_shift(2),n=cR(e);return{r:t,c:r,ixfe:n[0],rknum:n[1]}}function EK(e,t){for(var r=e.l+t-2,n=e.read_shift(2),s=e.read_shift(2),a=[];e.l<r;)a.push(cR(e));if(e.l!==r)throw new Error("MulRK read error");var o=e.read_shift(2);if(a.length!=o-s+1)throw new Error("MulRK length mismatch");return{r:n,c:s,C:o,rkrec:a}}function CK(e,t){for(var r=e.l+t-2,n=e.read_shift(2),s=e.read_shift(2),a=[];e.l<r;)a.push(e.read_shift(2));if(e.l!==r)throw new Error("MulBlank read error");var o=e.read_shift(2);if(a.length!=o-s+1)throw new Error("MulBlank length mismatch");return{r:n,c:s,C:o,ixfe:a}}function TK(e,t,r,n){var s={},a=e.read_shift(4),o=e.read_shift(4),l=e.read_shift(4),c=e.read_shift(2);return s.patternType=cq[l>>26],n.cellStyles&&(s.alc=a&7,s.fWrap=a>>3&1,s.alcV=a>>4&7,s.fJustLast=a>>7&1,s.trot=a>>8&255,s.cIndent=a>>16&15,s.fShrinkToFit=a>>20&1,s.iReadOrder=a>>22&2,s.fAtrNum=a>>26&1,s.fAtrFnt=a>>27&1,s.fAtrAlc=a>>28&1,s.fAtrBdr=a>>29&1,s.fAtrPat=a>>30&1,s.fAtrProt=a>>31&1,s.dgLeft=o&15,s.dgRight=o>>4&15,s.dgTop=o>>8&15,s.dgBottom=o>>12&15,s.icvLeft=o>>16&127,s.icvRight=o>>23&127,s.grbitDiag=o>>30&3,s.icvTop=l&127,s.icvBottom=l>>7&127,s.icvDiag=l>>14&127,s.dgDiag=l>>21&15,s.icvFore=c&127,s.icvBack=c>>7&127,s.fsxButton=c>>14&1),s}function AK(e,t,r){var n={};return n.ifnt=e.read_shift(2),n.numFmtId=e.read_shift(2),n.flags=e.read_shift(2),n.fStyle=n.flags>>2&1,t-=6,n.data=TK(e,t,n.fStyle,r),n}function Nj(e,t,r,n){var s=r&&r.biff==5;n||(n=he(s?16:20)),n.write_shift(2,0),e.style?(n.write_shift(2,e.numFmtId||0),n.write_shift(2,65524)):(n.write_shift(2,e.numFmtId||0),n.write_shift(2,t<<4));var a=0;return e.numFmtId>0&&s&&(a|=1024),n.write_shift(4,a),n.write_shift(4,0),s||n.write_shift(4,0),n.write_shift(2,0),n}function PK(e){e.l+=4;var t=[e.read_shift(2),e.read_shift(2)];if(t[0]!==0&&t[0]--,t[1]!==0&&t[1]--,t[0]>7||t[1]>7)throw new Error("Bad Gutters: "+t.join("|"));return t}function RK(e){var t=he(8);return t.write_shift(4,0),t.write_shift(2,0),t.write_shift(2,0),t}function Sj(e,t,r){var n=ki(e);(r.biff==2||t==9)&&++e.l;var s=Iq(e);return n.val=s,n.t=s===!0||s===!1?"b":"e",n}function OK(e,t,r,n,s,a){var o=he(8);return vc(e,t,n,o),aR(r,a,o),o}function DK(e,t,r){r.biffguess&&r.biff==2&&(r.biff=5);var n=ki(e),s=Un(e);return n.val=s,n}function IK(e,t,r,n){var s=he(14);return vc(e,t,n,s),xc(r,s),s}var kj=Vq;function FK(e,t,r){var n=e.l+t,s=e.read_shift(2),a=e.read_shift(2);if(r.sbcch=a,a==1025||a==14849)return[a,s];if(a<1||a>255)throw new Error("Unexpected SupBook type: "+a);for(var o=gc(e,a),l=[];n>e.l;)l.push(c0(e));return[a,s,o,l]}function jj(e,t,r){var n=e.read_shift(2),s,a={fBuiltIn:n&1,fWantAdvise:n>>>1&1,fWantPict:n>>>2&1,fOle:n>>>3&1,fOleLink:n>>>4&1,cf:n>>>5&1023,fIcon:n>>>15&1};return r.sbcch===14849&&(s=qq(e,t-2,r)),a.body=s||e.read_shift(t-2),typeof s=="string"&&(a.Name=s),a}var MK=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"];function Ej(e,t,r){var n=e.l+t,s=e.read_shift(2),a=e.read_shift(1),o=e.read_shift(1),l=e.read_shift(r&&r.biff==2?1:2),c=0;(!r||r.biff>=5)&&(r.biff!=5&&(e.l+=2),c=e.read_shift(2),r.biff==5&&(e.l+=2),e.l+=4);var u=gc(e,o,r);s&32&&(u=MK[u.charCodeAt(0)]);var d=n-e.l;r&&r.biff==2&&--d;var f=n==e.l||l===0||!(d>0)?[]:JJ(e,d,r,l);return{chKey:a,Name:u,itab:c,rgce:f}}function hR(e,t,r){if(r.biff<8)return LK(e,t,r);for(var n=[],s=e.l+t,a=e.read_shift(r.biff>8?4:2);a--!==0;)n.push(Gq(e,r.biff>8?12:6,r));if(e.l!=s)throw new Error("Bad ExternSheet: "+e.l+" != "+s);return n}function LK(e,t,r){e[e.l+1]==3&&e[e.l]++;var n=l0(e,t,r);return n.charCodeAt(0)==3?n.slice(1):n}function BK(e,t,r){if(r.biff<8){e.l+=t;return}var n=e.read_shift(2),s=e.read_shift(2),a=gc(e,n,r),o=gc(e,s,r);return[a,o]}function $K(e,t,r){var n=dR(e);e.l++;var s=e.read_shift(1);return t-=8,[ZJ(e,t,r),s,n]}function Cj(e,t,r){var n=Kq(e);switch(r.biff){case 2:e.l++,t-=7;break;case 3:case 4:e.l+=2,t-=8;break;default:e.l+=6,t-=12}return[n,XJ(e,t,r)]}function UK(e){var t=e.read_shift(4)!==0,r=e.read_shift(4)!==0,n=e.read_shift(4);return[t,r,n]}function WK(e,t,r){if(!(r.biff<8)){var n=e.read_shift(2),s=e.read_shift(2),a=e.read_shift(2),o=e.read_shift(2),l=Rc(e,0,r);return r.biff<8&&e.read_shift(1),[{r:n,c:s},l,o,a]}}function zK(e,t,r){return WK(e,t,r)}function HK(e,t){for(var r=[],n=e.read_shift(2);n--;)r.push(ng(e));return r}function VK(e){var t=he(2+e.length*8);t.write_shift(2,e.length);for(var r=0;r<e.length;++r)uR(e[r],t);return t}function GK(e,t,r){if(r&&r.biff<8)return KK(e,t,r);var n=fR(e),s=Jq(e,t-22,n[1]);return{cmo:n,ft:s}}var qK={8:function(e,t){var r=e.l+t;e.l+=10;var n=e.read_shift(2);e.l+=4,e.l+=2,e.l+=2,e.l+=2,e.l+=4;var s=e.read_shift(1);return e.l+=s,e.l=r,{fmt:n}}};function KK(e,t,r){e.l+=4;var n=e.read_shift(2),s=e.read_shift(2),a=e.read_shift(2);e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=6,t-=36;var o=[];return o.push((qK[n]||Vn)(e,t,r)),{cmo:[s,n,a],ft:o}}function YK(e,t,r){var n=e.l,s="";try{e.l+=4;var a=(r.lastobj||{cmo:[0,0]}).cmo[1],o;[0,5,7,11,12,14].indexOf(a)==-1?e.l+=6:o=Lq(e,6,r);var l=e.read_shift(2);e.read_shift(2),Qr(e,2);var c=e.read_shift(2);e.l+=c;for(var u=1;u<e.lens.length-1;++u){if(e.l-n!=e.lens[u])throw new Error("TxO: bad continue record");var d=e[e.l],f=gc(e,e.lens[u+1]-e.lens[u]-1);if(s+=f,s.length>=(d?l:2*l))break}if(s.length!==l&&s.length!==l*2)throw new Error("cchText: "+l+" != "+s.length);return e.l=n+t,{t:s}}catch{return e.l=n+t,{t:s}}}function XK(e,t){var r=ng(e);e.l+=16;var n=Wq(e,t-24);return[r,n]}function QK(e){var t=he(24),r=jr(e[0]);t.write_shift(2,r.r),t.write_shift(2,r.r),t.write_shift(2,r.c),t.write_shift(2,r.c);for(var n="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),s=0;s<16;++s)t.write_shift(1,parseInt(n[s],16));return gn([t,zq(e[1])])}function JK(e,t){e.read_shift(2);var r=ng(e),n=e.read_shift((t-10)/2,"dbcs-cont");return n=n.replace(Zn,""),[r,n]}function ZK(e){var t=e[1].Tooltip,r=he(10+2*(t.length+1));r.write_shift(2,2048);var n=jr(e[0]);r.write_shift(2,n.r),r.write_shift(2,n.r),r.write_shift(2,n.c),r.write_shift(2,n.c);for(var s=0;s<t.length;++s)r.write_shift(2,t.charCodeAt(s));return r.write_shift(2,0),r}function eY(e){var t=[0,0],r;return r=e.read_shift(2),t[0]=fj[r]||r,r=e.read_shift(2),t[1]=fj[r]||r,t}function tY(e){return e||(e=he(4)),e.write_shift(2,1),e.write_shift(2,1),e}function rY(e){for(var t=e.read_shift(2),r=[];t-- >0;)r.push(lR(e));return r}function nY(e){for(var t=e.read_shift(2),r=[];t-- >0;)r.push(lR(e));return r}function sY(e){e.l+=2;var t={cxfs:0,crc:0};return t.cxfs=e.read_shift(2),t.crc=e.read_shift(4),t}function mR(e,t,r){if(!r.cellStyles)return Vn(e,t);var n=r&&r.biff>=12?4:2,s=e.read_shift(n),a=e.read_shift(n),o=e.read_shift(n),l=e.read_shift(n),c=e.read_shift(2);n==2&&(e.l+=2);var u={s,e:a,w:o,ixfe:l,flags:c};return(r.biff>=5||!r.biff)&&(u.level=c>>8&7),u}function aY(e,t){var r=he(12);r.write_shift(2,t),r.write_shift(2,t),r.write_shift(2,e.width*256),r.write_shift(2,0);var n=0;return e.hidden&&(n|=1),r.write_shift(1,n),n=e.level||0,r.write_shift(1,n),r.write_shift(2,0),r}function iY(e,t){var r={};return t<32||(e.l+=16,r.header=Un(e),r.footer=Un(e),e.l+=2),r}function oY(e,t,r){var n={area:!1};if(r.biff!=5)return e.l+=t,n;var s=e.read_shift(1);return e.l+=3,s&16&&(n.area=!0),n}function lY(e){for(var t=he(2*e),r=0;r<e;++r)t.write_shift(2,r+1);return t}var cY=ki,uY=sR,dY=c0;function fY(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(4),s={fmt:t,env:r,len:n,data:e.slice(e.l,e.l+n)};return e.l+=n,s}
vendor: 7,650 bytes, line 609
609function hY(e,t,r){r.biffguess&&r.biff==5&&(r.biff=2);var n=ki(e);++e.l;var s=Rc(e,t-7,r);return n.t="str",n.val=s,n}function mY(e){var t=ki(e);++e.l;var r=Un(e);return t.t="n",t.val=r,t}function pY(e,t,r){var n=he(15);return h0(n,e,t),n.write_shift(8,r,"f"),n}function xY(e){var t=ki(e);++e.l;var r=e.read_shift(2);return t.t="n",t.val=r,t}function gY(e,t,r){var n=he(9);return h0(n,e,t),n.write_shift(2,r),n}function vY(e){var t=e.read_shift(1);return t===0?(e.l++,""):e.read_shift(t,"sbcs-cont")}function yY(e,t){e.l+=6,e.l+=2,e.l+=1,e.l+=3,e.l+=1,e.l+=t-13}function wY(e,t,r){var n=e.l+t,s=ki(e),a=e.read_shift(2),o=gc(e,a,r);return e.l=n,s.t="str",s.val=o,s}var bY=[2,3,48,49,131,139,140,245],Qy=function(){var e={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969},t=eg({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function r(l,c){var u=[],d=il(1);switch(c.type){case"base64":d=Fs(Gs(l));break;case"binary":d=Fs(l);break;case"buffer":case"array":d=l;break}jn(d,0);var f=d.read_shift(1),h=!!(f&136),m=!1,g=!1;switch(f){case 2:break;case 3:break;case 48:m=!0,h=!0;break;case 49:m=!0,h=!0;break;case 131:break;case 139:break;case 140:g=!0;break;case 245:break;default:throw new Error("DBF Unsupported Version: "+f.toString(16))}var p=0,x=521;f==2&&(p=d.read_shift(2)),d.l+=3,f!=2&&(p=d.read_shift(4)),p>1048576&&(p=1e6),f!=2&&(x=d.read_shift(2));var b=d.read_shift(2),w=c.codepage||1252;f!=2&&(d.l+=16,d.read_shift(1),d[d.l]!==0&&(w=e[d[d.l]]),d.l+=1,d.l+=2),g&&(d.l+=36);for(var y=[],_={},N=Math.min(d.length,f==2?521:x-10-(m?264:0)),k=g?32:11;d.l<N&&d[d.l]!=13;)switch(_={},_.name=Co.utils.decode(w,d.slice(d.l,d.l+k)).replace(/[\u0000\r\n].*$/g,""),d.l+=k,_.type=String.fromCharCode(d.read_shift(1)),f!=2&&!g&&(_.offset=d.read_shift(4)),_.len=d.read_shift(1),f==2&&(_.offset=d.read_shift(2)),_.dec=d.read_shift(1),_.name.length&&y.push(_),f!=2&&(d.l+=g?13:14),_.type){case"B":(!m||_.len!=8)&&c.WTF&&console.log("Skipping "+_.name+":"+_.type);break;case"G":case"P":c.WTF&&console.log("Skipping "+_.name+":"+_.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+_.type)}if(d[d.l]!==13&&(d.l=x-1),d.read_shift(1)!==13)throw new Error("DBF Terminator not found "+d.l+" "+d[d.l]);d.l=x;var S=0,E=0;for(u[0]=[],E=0;E!=y.length;++E)u[0][E]=y[E].name;for(;p-- >0;){if(d[d.l]===42){d.l+=b;continue}for(++d.l,u[++S]=[],E=0,E=0;E!=y.length;++E){var j=d.slice(d.l,d.l+y[E].len);d.l+=y[E].len,jn(j,0);var T=Co.utils.decode(w,j);switch(y[E].type){case"C":T.trim().length&&(u[S][E]=T.replace(/\s+$/,""));break;case"D":T.length===8?u[S][E]=new Date(+T.slice(0,4),+T.slice(4,6)-1,+T.slice(6,8)):u[S][E]=T;break;case"F":u[S][E]=parseFloat(T.trim());break;case"+":case"I":u[S][E]=g?j.read_shift(-4,"i")^2147483648:j.read_shift(4,"i");break;case"L":switch(T.trim().toUpperCase()){case"Y":case"T":u[S][E]=!0;break;case"N":case"F":u[S][E]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+T+"|")}break;case"M":if(!h)throw new Error("DBF Unexpected MEMO for type "+f.toString(16));u[S][E]="##MEMO##"+(g?parseInt(T.trim(),10):j.read_shift(4));break;case"N":T=T.replace(/\u0000/g,"").trim(),T&&T!="."&&(u[S][E]=+T||0);break;case"@":u[S][E]=new Date(j.read_shift(-8,"f")-621356832e5);break;case"T":u[S][E]=new Date((j.read_shift(4)-2440588)*864e5+j.read_shift(4));break;case"Y":u[S][E]=j.read_shift(4,"i")/1e4+j.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":u[S][E]=-j.read_shift(-8,"f");break;case"B":if(m&&y[E].len==8){u[S][E]=j.read_shift(8,"f");break}case"G":case"P":j.l+=y[E].len;break;case"0":if(y[E].name==="_NullFlags")break;default:throw new Error("DBF Unsupported data type "+y[E].type)}}}if(f!=2&&d.l<d.length&&d[d.l++]!=26)throw new Error("DBF EOF Marker missing "+(d.l-1)+" of "+d.length+" "+d[d.l-1].toString(16));return c&&c.sheetRows&&(u=u.slice(0,c.sheetRows)),c.DBF=y,u}function n(l,c){var u=c||{};u.dateNF||(u.dateNF="yyyymmdd");var d=Td(r(l,u),u);return d["!cols"]=u.DBF.map(function(f){return{wch:f.len,DBF:f}}),delete u.DBF,d}function s(l,c){try{return yl(n(l,c),c)}catch(u){if(c&&c.WTF)throw u}return{SheetNames:[],Sheets:{}}}var a={B:8,C:250,L:1,D:8,"?":0,"":0};function o(l,c){var u=c||{};if(+u.codepage>=0&&Fa(+u.codepage),u.type=="string")throw new Error("Cannot write DBF to JS string");var d=ms(),f=Gp(l,{header:1,raw:!0,cellDates:!0}),h=f[0],m=f.slice(1),g=l["!cols"]||[],p=0,x=0,b=0,w=1;for(p=0;p<h.length;++p){if(((g[p]||{}).DBF||{}).name){h[p]=g[p].DBF.name,++b;continue}if(h[p]!=null){if(++b,typeof h[p]=="number"&&(h[p]=h[p].toString(10)),typeof h[p]!="string")throw new Error("DBF Invalid column name "+h[p]+" |"+typeof h[p]+"|");if(h.indexOf(h[p])!==p){for(x=0;x<1024;++x)if(h.indexOf(h[p]+"_"+x)==-1){h[p]+="_"+x;break}}}}var y=It(l["!ref"]),_=[],N=[],k=[];for(p=0;p<=y.e.c-y.s.c;++p){var S="",E="",j=0,T=[];for(x=0;x<m.length;++x)m[x][p]!=null&&T.push(m[x][p]);if(T.length==0||h[p]==null){_[p]="?";continue}for(x=0;x<T.length;++x){switch(typeof T[x]){case"number":E="B";break;case"string":E="C";break;case"boolean":E="L";break;case"object":E=T[x]instanceof Date?"D":"C";break;default:E="C"}j=Math.max(j,String(T[x]).length),S=S&&S!=E?"C":E}j>250&&(j=250),E=((g[p]||{}).DBF||{}).type,E=="C"&&g[p].DBF.len>j&&(j=g[p].DBF.len),S=="B"&&E=="N"&&(S="N",k[p]=g[p].DBF.dec,j=g[p].DBF.len),N[p]=S=="C"||E=="N"?j:a[S]||0,w+=N[p],_[p]=S}var R=d.next(32);for(R.write_shift(4,318902576),R.write_shift(4,m.length),R.write_shift(2,296+32*b),R.write_shift(2,w),p=0;p<4;++p)R.write_shift(4,0);for(R.write_shift(4,0|(+t[nP]||3)<<8),p=0,x=0;p<h.length;++p)if(h[p]!=null){var P=d.next(32),D=(h[p].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);P.write_shift(1,D,"sbcs"),P.write_shift(1,_[p]=="?"?"C":_[p],"sbcs"),P.write_shift(4,x),P.write_shift(1,N[p]||a[_[p]]||0),P.write_shift(1,k[p]||0),P.write_shift(1,2),P.write_shift(4,0),P.write_shift(1,0),P.write_shift(4,0),P.write_shift(4,0),x+=N[p]||a[_[p]]||0}var U=d.next(264);for(U.write_shift(4,13),p=0;p<65;++p)U.write_shift(4,0);for(p=0;p<m.length;++p){var Q=d.next(w);for(Q.write_shift(1,0),x=0;x<h.length;++x)if(h[x]!=null)switch(_[x]){case"L":Q.write_shift(1,m[p][x]==null?63:m[p][x]?84:70);break;case"B":Q.write_shift(8,m[p][x]||0,"f");break;case"N":var Y="0";for(typeof m[p][x]=="number"&&(Y=m[p][x].toFixed(k[x]||0)),b=0;b<N[x]-Y.length;++b)Q.write_shift(1,32);Q.write_shift(1,Y,"sbcs");break;case"D":m[p][x]?(Q.write_shift(4,("0000"+m[p][x].getFullYear()).slice(-4),"sbcs"),Q.write_shift(2,("00"+(m[p][x].getMonth()+1)).slice(-2),"sbcs"),Q.write_shift(2,("00"+m[p][x].getDate()).slice(-2),"sbcs")):Q.write_shift(8,"00000000","sbcs");break;case"C":var V=String(m[p][x]!=null?m[p][x]:"").slice(0,N[x]);for(Q.write_shift(1,V,"sbcs"),b=0;b<N[x]-V.length;++b)Q.write_shift(1,32);break}}return d.next(1).write_shift(1,26),d.end()}return{to_workbook:s,to_sheet:n,from_sheet:o}}(),pR=function(){var e={AA:"À",BA:"Á",CA:"Â",DA:195,HA:"Ä",JA:197,AE:"È",BE:"É",CE:"Ê",HE:"Ë",AI:"Ì",BI:"Í",C
609I:"Î",HI:"Ï",AO:"Ò",BO:"Ó",CO:"Ô",DO:213,HO:"Ö",AU:"Ù",BU:"Ú",CU:"Û",HU:"Ü",Aa:"à",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"í",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ç",Kc:"ç",q:"æ",z:"œ",a:"Æ",j:"Œ",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223},t=new RegExp("\x1BN("+Mr(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),r=function(h,m){var g=e[m];return typeof g=="number"?Bk(g):g},n=function(h,m,g){var p=m.charCodeAt(0)-32<<4|g.charCodeAt(0)-48;return p==59?h:Bk(p)};e["|"]=254;function s(h,m){switch(m.type){case"base64":return a(Gs(h),m);case"binary":return a(h,m);case"buffer":return a(Nt&&Buffer.isBuffer(h)?h.toString("binary"):vl(h),m);case"array":return a(pc(h),m)}throw new Error("Unrecognized type "+m.type)}function a(h,m){var g=h.split(/[\n\r]+/),p=-1,x=-1,b=0,w=0,y=[],_=[],N=null,k={},S=[],E=[],j=[],T=0,R;for(+m.codepage>=0&&Fa(+m.codepage);b!==g.length;++b){T=0;
vendor: 9,819 bytes, lines 609-622
609var P=g[b].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,n).replace(t,r),D=P.replace(/;;/g,"\0").split(";").map(function(z){return z.replace(/\u0000/g,";")}),U=D[0],Q;if(P.length>0)switch(U){case"ID":break;case"E":break;case"B":break;case"O":break;case"W":break;case"P":D[1].charAt(0)=="P"&&_.push(P.slice(3).replace(/;;/g,";"));break;case"C":var Y=!1,V=!1,F=!1,C=!1,X=-1,se=-1;for(w=1;w<D.length;++w)switch(D[w].charAt(0)){case"A":break;case"X":x=parseInt(D[w].slice(1))-1,V=!0;break;case"Y":for(p=parseInt(D[w].slice(1))-1,V||(x=0),R=y.length;R<=p;++R)y[R]=[];break;case"K":Q=D[w].slice(1),Q.charAt(0)==='"'?Q=Q.slice(1,Q.length-1):Q==="TRUE"?Q=!0:Q==="FALSE"?Q=!1:isNaN(Ua(Q))?isNaN(ld(Q).getDate())||(Q=pr(Q)):(Q=Ua(Q),N!==null&&Ed(N)&&(Q=rg(Q))),Y=!0;break;case"E":C=!0;var A=Ou(D[w].slice(1),{r:p,c:x});y[p][x]=[y[p][x],A];break;case"S":F=!0,y[p][x]=[y[p][x],"S5S"];break;case"G":break;case"R":X=parseInt(D[w].slice(1))-1;break;case"C":se=parseInt(D[w].slice(1))-1;break;default:if(m&&m.WTF)throw new Error("SYLK bad record "+P)}if(Y&&(y[p][x]&&y[p][x].length==2?y[p][x][0]=Q:y[p][x]=Q,N=null),F){if(C)throw new Error("SYLK shared formula cannot have own formula");var M=X>-1&&y[X][se];if(!M||!M[1])throw new Error("SYLK shared formula cannot find base");y[p][x][1]=OR(M[1],{r:p-X,c:x-se})}break;case"F":var I=0;for(w=1;w<D.length;++w)switch(D[w].charAt(0)){case"X":x=parseInt(D[w].slice(1))-1,++I;break;case"Y":for(p=parseInt(D[w].slice(1))-1,R=y.length;R<=p;++R)y[R]=[];break;case"M":T=parseInt(D[w].slice(1))/20;break;case"F":break;case"G":break;case"P":N=_[parseInt(D[w].slice(1))];break;case"S":break;case"D":break;case"N":break;case"W":for(j=D[w].slice(1).split(" "),R=parseInt(j[0],10);R<=parseInt(j[1],10);++R)T=parseInt(j[2],10),E[R-1]=T===0?{hidden:!0}:{wch:T},ol(E[R-1]);break;case"C":x=parseInt(D[w].slice(1))-1,E[x]||(E[x]={});break;case"R":p=parseInt(D[w].slice(1))-1,S[p]||(S[p]={}),T>0?(S[p].hpt=T,S[p].hpx=ud(T)):T===0&&(S[p].hidden=!0);break;default:if(m&&m.WTF)throw new Error("SYLK bad record "+P)}I<1&&(N=null);break;default:if(m&&m.WTF)throw new Error("SYLK bad record "+P)}}return S.length>0&&(k["!rows"]=S),E.length>0&&(k["!cols"]=E),m&&m.sheetRows&&(y=y.slice(0,m.sheetRows)),[y,k]}function o(h,m){var g=s(h,m),p=g[0],x=g[1],b=Td(p,m);return Mr(x).forEach(function(w){b[w]=x[w]}),b}function l(h,m){return yl(o(h,m),m)}function c(h,m,g,p){var x="C;Y"+(g+1)+";X"+(p+1)+";K";switch(h.t){case"n":x+=h.v||0,h.f&&!h.F&&(x+=";E"+R_(h.f,{r:g,c:p}));break;case"b":x+=h.v?"TRUE":"FALSE";break;case"e":x+=h.w||h.v;break;case"d":x+='"'+(h.w||h.v)+'"';break;case"s":x+='"'+h.v.replace(/"/g,"").replace(/;/g,";;")+'"';break}return x}function u(h,m){m.forEach(function(g,p){var x="F;W"+(p+1)+" "+(p+1)+" ";g.hidden?x+="0":(typeof g.width=="number"&&!g.wpx&&(g.wpx=kh(g.width)),typeof g.wpx=="number"&&!g.wch&&(g.wch=jh(g.wpx)),typeof g.wch=="number"&&(x+=Math.round(g.wch))),x.charAt(x.length-1)!=" "&&h.push(x)})}function d(h,m){m.forEach(function(g,p){var x="F;";g.hidden?x+="M0;":g.hpt?x+="M"+20*g.hpt+";":g.hpx&&(x+="M"+20*Eh(g.hpx)+";"),x.length>2&&h.push(x+"R"+(p+1))})}function f(h,m){var g=["ID;PWXL;N;E"],p=[],x=It(h["!ref"]),b,w=Array.isArray(h),y=`\r
610`;g.push("P;PGeneral"),g.push("F;P0;DG0G8;M255"),h["!cols"]&&u(g,h["!cols"]),h["!rows"]&&d(g,h["!rows"]),g.push("B;Y"+(x.e.r-x.s.r+1)+";X"+(x.e.c-x.s.c+1)+";D"+[x.s.c,x.s.r,x.e.c,x.e.r].join(" "));for(var _=x.s.r;_<=x.e.r;++_)for(var N=x.s.c;N<=x.e.c;++N){var k=ut({r:_,c:N});b=w?(h[_]||[])[N]:h[k],!(!b||b.v==null&&(!b.f||b.F))&&p.push(c(b,h,_,N))}return g.join(y)+y+p.join(y)+y+"E"+y}return{to_workbook:l,to_sheet:o,from_sheet:f}}(),xR=function(){function e(a,o){switch(o.type){case"base64":return t(Gs(a),o);case"binary":return t(a,o);case"buffer":return t(Nt&&Buffer.isBuffer(a)?a.toString("binary"):vl(a),o);case"array":return t(pc(a),o)}throw new Error("Unrecognized type "+o.type)}function t(a,o){for(var l=a.split(`
611`),c=-1,u=-1,d=0,f=[];d!==l.length;++d){if(l[d].trim()==="BOT"){f[++c]=[],u=0;continue}if(!(c<0)){var h=l[d].trim().split(","),m=h[0],g=h[1];++d;for(var p=l[d]||"";(p.match(/["]/g)||[]).length&1&&d<l.length-1;)p+=`
612`+l[++d];switch(p=p.trim(),+m){case-1:if(p==="BOT"){f[++c]=[],u=0;continue}else if(p!=="EOD")throw new Error("Unrecognized DIF special command "+p);break;case 0:p==="TRUE"?f[c][u]=!0:p==="FALSE"?f[c][u]=!1:isNaN(Ua(g))?isNaN(ld(g).getDate())?f[c][u]=g:f[c][u]=pr(g):f[c][u]=Ua(g),++u;break;case 1:p=p.slice(1,p.length-1),p=p.replace(/""/g,'"'),p&&p.match(/^=".*"$/)&&(p=p.slice(2,-1)),f[c][u++]=p!==""?p:null;break}if(p==="EOD")break}}return o&&o.sheetRows&&(f=f.slice(0,o.sheetRows)),f}function r(a,o){return Td(e(a,o),o)}function n(a,o){return yl(r(a,o),o)}var s=function(){var a=function(c,u,d,f,h){c.push(u),c.push(d+","+f),c.push('"'+h.replace(/"/g,'""')+'"')},o=function(c,u,d,f){c.push(u+","+d),c.push(u==1?'"'+f.replace(/"/g,'""')+'"':f)};return function(c){var u=[],d=It(c["!ref"]),f,h=Array.isArray(c);a(u,"TABLE",0,1,"sheetjs"),a(u,"VECTORS",0,d.e.r-d.s.r+1,""),a(u,"TUPLES",0,d.e.c-d.s.c+1,""),a(u,"DATA",0,0,"");for(var m=d.s.r;m<=d.e.r;++m){o(u,-1,0,"BOT");for(var g=d.s.c;g<=d.e.c;++g){var p=ut({r:m,c:g});if(f=h?(c[m]||[])[g]:c[p],!f){o(u,1,0,"");continue}switch(f.t){case"n":var x=f.w;!x&&f.v!=null&&(x=f.v),x==null?f.f&&!f.F?o(u,1,0,"="+f.f):o(u,1,0,""):o(u,0,x,"V");break;case"b":o(u,0,f.v?1:0,f.v?"TRUE":"FALSE");break;case"s":o(u,1,0,isNaN(f.v)?f.v:'="'+f.v+'"');break;case"d":f.w||(f.w=xa(f.z||it[14],dn(pr(f.v)))),o(u,0,f.w,"V");break;default:o(u,1,0,"")}}}o(u,-1,0,"EOD");var b=`\r
613`,w=u.join(b);return w}}();return{to_workbook:n,to_sheet:r,from_sheet:s}}(),gR=function(){function e(f){return f.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,`
614`)}function t(f){return f.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function r(f,h){for(var m=f.split(`
615`),g=-1,p=-1,x=0,b=[];x!==m.length;++x){var w=m[x].trim().split(":");if(w[0]==="cell"){var y=jr(w[1]);if(b.length<=y.r)for(g=b.length;g<=y.r;++g)b[g]||(b[g]=[]);switch(g=y.r,p=y.c,w[2]){case"t":b[g][p]=e(w[3]);break;case"v":b[g][p]=+w[3];break;case"vtf":var _=w[w.length-1];case"vtc":switch(w[3]){case"nl":b[g][p]=!!+w[4];break;default:b[g][p]=+w[4];break}w[2]=="vtf"&&(b[g][p]=[b[g][p],_])}}}return h&&h.sheetRows&&(b=b.slice(0,h.sheetRows)),b}function n(f,h){return Td(r(f,h),h)}function s(f,h){return yl(n(f,h),h)}var a=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join(`
616`),o=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join(`
617`)+`
618`,l=["# SocialCalc Spreadsheet Control Save","part:sheet"].join(`
619`),c="--SocialCalcSpreadsheetControlSave--";function u(f){if(!f||!f["!ref"])return"";for(var h=[],m=[],g,p="",x=gs(f["!ref"]),b=Array.isArray(f),w=x.s.r;w<=x.e.r;++w)for(var y=x.s.c;y<=x.e.c;++y)if(p=ut({r:w,c:y}),g=b?(f[w]||[])[y]:f[p],!(!g||g.v==null||g.t==="z")){switch(m=["cell",p,"t"],g.t){case"s":case"str":m.push(t(g.v));break;case"n":g.f?(m[2]="vtf",m[3]="n",m[4]=g.v,m[5]=t(g.f)):(m[2]="v",m[3]=g.v);break;case"b":m[2]="vt"+(g.f?"f":"c"),m[3]="nl",m[4]=g.v?"1":"0",m[5]=t(g.f||(g.v?"TRUE":"FALSE"));break;case"d":var _=dn(pr(g.v));m[2]="vtc",m[3]="nd",m[4]=""+_,m[5]=g.w||xa(g.z||it[14],_);break;case"e":continue}h.push(m.join(":"))}return h.push("sheet:c:"+(x.e.c-x.s.c+1)+":r:"+(x.e.r-x.s.r+1)+":tvf:1"),h.push("valueformat:1:text-wiki"),h.join(`
620`)}function d(f){return[a,o,l,o,u(f),c].join(`
621`)}return{to_workbook:s,to_sheet:n,from_sheet:d}}(),cd=function(){function e(d,f,h,m,g){g.raw?f[h][m]=d:d===""||(d==="TRUE"?f[h][m]=!0:d==="FALSE"?f[h][m]=!1:isNaN(Ua(d))?isNaN(ld(d).getDate())?f[h][m]=d:f[h][m]=pr(d):f[h][m]=Ua(d))}function t(d,f){var h=f||{},m=[];if(!d||d.length===0)return m;for(var g=d.split(/[\r\n]/),p=g.length-1;p>=0&&g[p].length===0;)--p;for(var x=10,b=0,w=0;w<=p;++w)b=g[w].indexOf(" "),b==-1?b=g[w].length:b++,x=Math.max(x,b);for(w=0;w<=p;++w){m[w]=[];var y=0;for(e(g[w].slice(0,x).trim(),m,w,y,h),y=1;y<=(g[w].length-x)/10+1;++y)e(g[w].slice(x+(y-1)*10,x+y*10).trim(),m,w,y,h)}return h.sheetRows&&(m=m.slice(0,h.sheetRows)),m}var r={44:",",9:"	",59:";",124:"|"},n={44:3,9:2,59:1,124:0};function s(d){for(var f={},h=!1,m=0,g=0;m<d.length;++m)(g=d.charCodeAt(m))==34?h=!h:!h&&g in r&&(f[g]=(f[g]||0)+1);g=[];for(m in f)Object.prototype.hasOwnProperty.call(f,m)&&g.push([f[m],m]);if(!g.length){f=n;for(m in f)Object.prototype.hasOwnProperty.call(f,m)&&g.push([f[m],m])}return g.sort(function(p,x){return p[0]-x[0]||n[p[1]]-n[x[1]]}),r[g.pop()[1]]||44}function a(d,f){var h=f||{},m="",g=h.dense?[]:{},p={s:{c:0,r:0},e:{c:0,r:0}};d.slice(0,4)=="sep="?d.charCodeAt(5)==13&&d.charCodeAt(6)==10?(m=d.charAt(4),d=d.slice(7)):d.charCodeAt(5)==13||d.charCodeAt(5)==10?(m=d.charAt(4),d=d.slice(6)):m=s(d.slice(0,1024)):h&&h.FS?m=h.FS:m=s(d.slice(0,1024));var x=0,b=0,w=0,y=0,_=0,N=m.charCodeAt(0),k=!1,S=0,E=d.charCodeAt(0);d=d.replace(/\r\n/mg,`
622`);var j=h.dateNF!=null?oG(h.dateNF):null;function T(){var R=d.slice(y,_),P={};if(R.charAt(0)=='"'&&R.charAt(R.length-1)=='"'&&(R=R.slice(1,-1).replace(/""/g,'"')),R.length===0)P.t="z";else if(h.raw)P.t="s",P.v=R;else if(R.trim().length===0)P.t="s",P.v=R;else if(R.charCodeAt(0)==61)R.charCodeAt(1)==34&&R.charCodeAt(R.length-1)==34?(P.t="s",P.v=R.slice(2,-1).replace(/""/g,'"')):FQ(R)?(P.t="n",P.f=R.slice(1)):(P.t="s",P.v=R);else if(R=="TRUE")P.t="b",P.v=!0;else if(R=="FALSE")P.t="b",P.v=!1;else if(!isNaN(w=Ua(R)))P.t="n",h.cellText!==!1&&(P.w=R),P.v=w;else if(!isNaN(ld(R).getDate())||j&&R.match(j)){P.z=h.dateNF||it[14];var D=0;j&&R.match(j)&&(R=lG(R,h.dateNF,R.match(j)||[]),D=1),h.cellDates?(P.t="d",P.v=pr(R,D)):(P.t="n",P.v=dn(pr(R,D))),h.cellText!==!1&&(P.w=xa(P.z,P.v instanceof Date?dn(P.v):P.v)),h.cellNF||delete P.z}else P.t="s",P.v=R;if(P.t=="z"||(h.dense?(g[x]||(g[x]=[]),g[x][b]=P):g[ut({c:b,r:x}
vendor: 4,400 bytes, lines 622-623
622)]=P),y=_+1,E=d.charCodeAt(y),p.e.c<b&&(p.e.c=b),p.e.r<x&&(p.e.r=x),S==N)++b;else if(b=0,++x,h.sheetRows&&h.sheetRows<=x)return!0}e:for(;_<d.length;++_)switch(S=d.charCodeAt(_)){case 34:E===34&&(k=!k);break;case N:case 10:case 13:if(!k&&T())break e;break}return _-y>0&&T(),g["!ref"]=yt(p),g}function o(d,f){return!(f&&f.PRN)||f.FS||d.slice(0,4)=="sep="||d.indexOf("	")>=0||d.indexOf(",")>=0||d.indexOf(";")>=0?a(d,f):Td(t(d,f),f)}function l(d,f){var h="",m=f.type=="string"?[0,0,0,0]:$_(d,f);switch(f.type){case"base64":h=Gs(d);break;case"binary":h=d;break;case"buffer":f.codepage==65001?h=d.toString("utf8"):f.codepage&&typeof Co<"u"?h=Co.utils.decode(f.codepage,d):h=Nt&&Buffer.isBuffer(d)?d.toString("binary"):vl(d);break;case"array":h=pc(d);break;case"string":h=d;break;default:throw new Error("Unrecognized type "+f.type)}return m[0]==239&&m[1]==187&&m[2]==191?h=tr(h.slice(3)):f.type!="string"&&f.type!="buffer"&&f.codepage==65001?h=tr(h):f.type=="binary"&&typeof Co<"u"&&f.codepage&&(h=Co.utils.decode(f.codepage,Co.utils.encode(28591,h))),h.slice(0,19)=="socialcalc:version:"?gR.to_sheet(f.type=="string"?h:tr(h),f):o(h,f)}function c(d,f){return yl(l(d,f),f)}function u(d){for(var f=[],h=It(d["!ref"]),m,g=Array.isArray(d),p=h.s.r;p<=h.e.r;++p){for(var x=[],b=h.s.c;b<=h.e.c;++b){var w=ut({r:p,c:b});if(m=g?(d[p]||[])[b]:d[w],!m||m.v==null){x.push("          ");continue}for(var y=(m.w||(eo(m),m.w)||"").slice(0,10);y.length<10;)y+=" ";x.push(y+(b===0?" ":""))}f.push(x.join(""))}return f.join(`
623`)}return{to_workbook:c,to_sheet:l,from_sheet:u}}();function _Y(e,t){var r=t||{},n=!!r.WTF;r.WTF=!0;try{var s=pR.to_workbook(e,r);return r.WTF=n,s}catch(a){if(r.WTF=n,!a.message.match(/SYLK bad record ID/)&&n)throw a;return cd.to_workbook(e,t)}}var sc=function(){function e(A,M,I){if(A){jn(A,A.l||0);for(var z=I.Enum||X;A.l<A.length;){var J=A.read_shift(2),Z=z[J]||z[65535],re=A.read_shift(2),ae=A.l+re,ne=Z.f&&Z.f(A,re,I);if(A.l=ae,M(ne,Z,J))return}}}function t(A,M){switch(M.type){case"base64":return r(Fs(Gs(A)),M);case"binary":return r(Fs(A),M);case"buffer":case"array":return r(A,M)}throw"Unsupported type "+M.type}function r(A,M){if(!A)return A;var I=M||{},z=I.dense?[]:{},J="Sheet1",Z="",re=0,ae={},ne=[],Se=[],B={s:{r:0,c:0},e:{r:0,c:0}},qe=I.sheetRows||0;if(A[2]==0&&(A[3]==8||A[3]==9)&&A.length>=16&&A[14]==5&&A[15]===108)throw new Error("Unsupported Works 3 for Mac file");if(A[2]==2)I.Enum=X,e(A,function(pe,fe,te){switch(te){case 0:I.vers=pe,pe>=4096&&(I.qpro=!0);break;case 6:B=pe;break;case 204:pe&&(Z=pe);break;case 222:Z=pe;break;case 15:case 51:I.qpro||(pe[1].v=pe[1].v.slice(1));case 13:case 14:case 16:te==14&&(pe[2]&112)==112&&(pe[2]&15)>1&&(pe[2]&15)<15&&(pe[1].z=I.dateNF||it[14],I.cellDates&&(pe[1].t="d",pe[1].v=rg(pe[1].v))),I.qpro&&pe[3]>re&&(z["!ref"]=yt(B),ae[J]=z,ne.push(J),z=I.dense?[]:{},B={s:{r:0,c:0},e:{r:0,c:0}},re=pe[3],J=Z||"Sheet"+(re+1),Z="");var Ne=I.dense?(z[pe[0].r]||[])[pe[0].c]:z[ut(pe[0])];if(Ne){Ne.t=pe[1].t,Ne.v=pe[1].v,pe[1].z!=null&&(Ne.z=pe[1].z),pe[1].f!=null&&(Ne.f=pe[1].f);break}I.dense?(z[pe[0].r]||(z[pe[0].r]=[]),z[pe[0].r][pe[0].c]=pe[1]):z[ut(pe[0])]=pe[1];break}},I);else if(A[2]==26||A[2]==14)I.Enum=se,A[2]==14&&(I.qpro=!0,A.l=0),e(A,function(pe,fe,te){switch(te){case 204:J=pe;break;case 22:pe[1].v=pe[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(pe[3]>re&&(z["!ref"]=yt(B),ae[J]=z,ne.push(J),z=I.dense?[]:{},B={s:{r:0,c:0},e:{r:0,c:0}},re=pe[3],J="Sheet"+(re+1)),qe>0&&pe[0].r>=qe)break;I.dense?(z[pe[0].r]||(z[pe[0].r]=[]),z[pe[0].r][pe[0].c]=pe[1]):z[ut(pe[0])]=pe[1],B.e.c<pe[0].c&&(B.e.c=pe[0].c),B.e.r<pe[0].r&&(B.e.r=pe[0].r);break;case 27:pe[14e3]&&(Se[pe[14e3][0]]=pe[14e3][1]);break;case 1537:Se[pe[0]]=pe[1],pe[0]==re&&(J=pe[1]);break}},I);else throw new Error("Unrecognized LOTUS BOF "+A[2]);if(z["!ref"]=yt(B),ae[Z||J]=z,ne.push(Z||J),!Se.length)return{SheetNames:ne,Sheets:ae};for(var ue={},Re=[],Ce=0;Ce<Se.length;++Ce)ae[ne[Ce]]?(Re.push(Se[Ce]||ne[Ce]),ue[Se[Ce]]=ae[Se[Ce]]||ae[ne[Ce]]):(Re.push(Se[Ce]),ue[Se[Ce]]={"!ref":"A1"});return{SheetNames:Re,Sheets:ue}}function n(A,M){var I=M||{};if(+I.codepage>=0&&Fa(+I.codepage),I.type=="string")throw new Error("Cannot write WK1 to JS string");var z=ms(),J=It(A["!ref"]),Z=Array.isArray(A),re=[];Ie(z,0,a(1030)),Ie(z,6,c(J));for(var ae=Math.min(J.e.r,8191),ne=J.s.r;ne<=ae;++ne)for(var Se=Vr(ne),B=J.s.c;B<=J.e.c;++B){ne===J.s.r&&(re[B]=kr(B));
vendor: 1,202 bytes, line 623
623var qe=re[B]+Se,ue=Z?(A[ne]||[])[B]:A[qe];if(!(!ue||ue.t=="z"))if(ue.t=="n")(ue.v|0)==ue.v&&ue.v>=-32768&&ue.v<=32767?Ie(z,13,m(ne,B,ue.v)):Ie(z,14,p(ne,B,ue.v));else{var Re=eo(ue);Ie(z,15,f(ne,B,Re.slice(0,239)))}}return Ie(z,1),z.end()}function s(A,M){var I=M||{};if(+I.codepage>=0&&Fa(+I.codepage),I.type=="string")throw new Error("Cannot write WK3 to JS string");var z=ms();Ie(z,0,o(A));for(var J=0,Z=0;J<A.SheetNames.length;++J)(A.Sheets[A.SheetNames[J]]||{})["!ref"]&&Ie(z,27,C(A.SheetNames[J],Z++));var re=0;for(J=0;J<A.SheetNames.length;++J){var ae=A.Sheets[A.SheetNames[J]];if(!(!ae||!ae["!ref"])){for(var ne=It(ae["!ref"]),Se=Array.isArray(ae),B=[],qe=Math.min(ne.e.r,8191),ue=ne.s.r;ue<=qe;++ue)for(var Re=Vr(ue),Ce=ne.s.c;Ce<=ne.e.c;++Ce){ue===ne.s.r&&(B[Ce]=kr(Ce));var pe=B[Ce]+Re,fe=Se?(ae[ue]||[])[Ce]:ae[pe];if(!(!fe||fe.t=="z"))if(fe.t=="n")Ie(z,23,T(ue,Ce,re,fe.v));else{var te=eo(fe);Ie(z,22,S(ue,Ce,re,te.slice(0,239)))}}++re}}return Ie(z,1),z.end()}function a(A){var M=he(2);return M.write_shift(2,A),M}function o(A){var M=he(26);M.write_shift(2,4096),M.write_shift(2,4),M.write_shift(4,0);for(var I=0,z=0,J=0,Z=0;Z<A.SheetNames.length;++Z){var re=A.SheetNames[Z],ae=A.Sheets[re];
vendor: 4,456 bytes, line 623
623if(!(!ae||!ae["!ref"])){++J;var ne=gs(ae["!ref"]);I<ne.e.r&&(I=ne.e.r),z<ne.e.c&&(z=ne.e.c)}}return I>8191&&(I=8191),M.write_shift(2,I),M.write_shift(1,J),M.write_shift(1,z),M.write_shift(2,0),M.write_shift(2,0),M.write_shift(1,1),M.write_shift(1,2),M.write_shift(4,0),M.write_shift(4,0),M}function l(A,M,I){var z={s:{c:0,r:0},e:{c:0,r:0}};return M==8&&I.qpro?(z.s.c=A.read_shift(1),A.l++,z.s.r=A.read_shift(2),z.e.c=A.read_shift(1),A.l++,z.e.r=A.read_shift(2),z):(z.s.c=A.read_shift(2),z.s.r=A.read_shift(2),M==12&&I.qpro&&(A.l+=2),z.e.c=A.read_shift(2),z.e.r=A.read_shift(2),M==12&&I.qpro&&(A.l+=2),z.s.c==65535&&(z.s.c=z.e.c=z.s.r=z.e.r=0),z)}function c(A){var M=he(8);return M.write_shift(2,A.s.c),M.write_shift(2,A.s.r),M.write_shift(2,A.e.c),M.write_shift(2,A.e.r),M}function u(A,M,I){var z=[{c:0,r:0},{t:"n",v:0},0,0];return I.qpro&&I.vers!=20768?(z[0].c=A.read_shift(1),z[3]=A.read_shift(1),z[0].r=A.read_shift(2),A.l+=2):(z[2]=A.read_shift(1),z[0].c=A.read_shift(2),z[0].r=A.read_shift(2)),z}function d(A,M,I){var z=A.l+M,J=u(A,M,I);if(J[1].t="s",I.vers==20768){A.l++;var Z=A.read_shift(1);return J[1].v=A.read_shift(Z,"utf8"),J}return I.qpro&&A.l++,J[1].v=A.read_shift(z-A.l,"cstr"),J}function f(A,M,I){var z=he(7+I.length);z.write_shift(1,255),z.write_shift(2,M),z.write_shift(2,A),z.write_shift(1,39);for(var J=0;J<z.length;++J){var Z=I.charCodeAt(J);z.write_shift(1,Z>=128?95:Z)}return z.write_shift(1,0),z}function h(A,M,I){var z=u(A,M,I);return z[1].v=A.read_shift(2,"i"),z}function m(A,M,I){var z=he(7);return z.write_shift(1,255),z.write_shift(2,M),z.write_shift(2,A),z.write_shift(2,I,"i"),z}function g(A,M,I){var z=u(A,M,I);return z[1].v=A.read_shift(8,"f"),z}function p(A,M,I){var z=he(13);return z.write_shift(1,255),z.write_shift(2,M),z.write_shift(2,A),z.write_shift(8,I,"f"),z}function x(A,M,I){var z=A.l+M,J=u(A,M,I);if(J[1].v=A.read_shift(8,"f"),I.qpro)A.l=z;else{var Z=A.read_shift(2);_(A.slice(A.l,A.l+Z),J),A.l+=Z}return J}function b(A,M,I){var z=M&32768;return M&=-32769,M=(z?A:0)+(M>=8192?M-16384:M),(z?"":"$")+(I?kr(M):Vr(M))}var w={51:["FALSE",0],52:["TRUE",0],70:["LEN",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],111:["T",1]},y=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function _(A,M){jn(A,0);for(var I=[],z=0,J="",Z="",re="",ae="";A.l<A.length;){var ne=A[A.l++];switch(ne){case 0:I.push(A.read_shift(8,"f"));break;case 1:Z=b(M[0].c,A.read_shift(2),!0),J=b(M[0].r,A.read_shift(2),!1),I.push(Z+J);break;case 2:{var Se=b(M[0].c,A.read_shift(2),!0),B=b(M[0].r,A.read_shift(2),!1);Z=b(M[0].c,A.read_shift(2),!0),J=b(M[0].r,A.read_shift(2),!1),I.push(Se+B+":"+Z+J)}break;case 3:if(A.l<A.length){console.error("WK1 premature formula end");return}break;case 4:I.push("("+I.pop()+")");break;case 5:I.push(A.read_shift(2));break;case 6:{for(var qe="";ne=A[A.l++];)qe+=String.fromCharCode(ne);I.push('"'+qe.replace(/"/g,'""')+'"')}break;case 8:I.push("-"+I.pop());break;case 23:I.push("+"+I.pop());break;case 22:I.push("NOT("+I.pop()+")");break;case 20:case 21:ae=I.pop(),re=I.pop(),I.push(["AND","OR"][ne-20]+"("+re+","+ae+")");break;default:if(ne<32&&y[ne])ae=I.pop(),re=I.pop(),I.push(re+y[ne]+ae);else if(w[ne]){if(z=w[ne][1],z==69&&(z=A[A.l++]),z>I.length){console.error("WK1 bad formula parse 0x"+ne.toString(16)+":|"+I.join("|")+"|");return}var ue=I.slice(-z);I.length-=z,I.push(w[ne][0]+"("+ue.join(",")+")")}else return ne<=7?console.error("WK1 invalid opcode "+ne.toString(16)):ne<=24?console.error("WK1 unsupported op "+ne.toString(16)):ne<=30?console.error("WK1 invalid opcode "+ne.toString(16)):ne<=115?console.error("WK1 unsupported function opcode "+ne.toString(16)):console.error("WK1 unrecognized opcode "+ne.toString(16))}}I.length==1?M[1].f=""+I[0]:console.error("WK1 bad formula parse |"+I.join("|")+"|")}function N(A){var M=[{c:0,r:0},{t:"n",v:0},0];return M[0].r=A.read_shift(2),M[3]=A[A.l++],M[0].c=A[A.l++],M}function k(A,M){var I=N(A);return I[1].t="s",I[1].v=A.read_shift(M-4,"cstr"),I}function S(A,M,I,z){var J=he(6+z.length);J.write_shift(2,A),J.write_shift(1,I),J.write_shift(1,M),J.write_shift(1,39);for(var Z=0;Z<z.length;++Z){var re=z.charCodeAt(Z);J.write_shift(1,re>=128?95:re)}return J.write_shift(1,0),J}function E(A,M){var I=N(A);I[1].v=A.read_shift(2);var z=I[1].v>>1;if(I[1].v&1)switch(z&7){case 0:z=(z>>3)*5e3;break;case 1:z=(z>>3)*500;break;case 2:z=(z>>3)/20;break;case 3:z=(z>>
vendor: 4,361 bytes, line 623
6233)/200;break;case 4:z=(z>>3)/2e3;break;case 5:z=(z>>3)/2e4;break;case 6:z=(z>>3)/16;break;case 7:z=(z>>3)/64;break}return I[1].v=z,I}function j(A,M){var I=N(A),z=A.read_shift(4),J=A.read_shift(4),Z=A.read_shift(2);if(Z==65535)return z===0&&J===3221225472?(I[1].t="e",I[1].v=15):z===0&&J===3489660928?(I[1].t="e",I[1].v=42):I[1].v=0,I;var re=Z&32768;return Z=(Z&32767)-16446,I[1].v=(1-re*2)*(J*Math.pow(2,Z+32)+z*Math.pow(2,Z)),I}function T(A,M,I,z){var J=he(14);if(J.write_shift(2,A),J.write_shift(1,I),J.write_shift(1,M),z==0)return J.write_shift(4,0),J.write_shift(4,0),J.write_shift(2,65535),J;var Z=0,re=0,ae=0,ne=0;return z<0&&(Z=1,z=-z),re=Math.log2(z)|0,z/=Math.pow(2,re-31),ne=z>>>0,ne&2147483648||(z/=2,++re,ne=z>>>0),z-=ne,ne|=2147483648,ne>>>=0,z*=Math.pow(2,32),ae=z>>>0,J.write_shift(4,ae),J.write_shift(4,ne),re+=16383+(Z?32768:0),J.write_shift(2,re),J}function R(A,M){var I=j(A);return A.l+=M-14,I}function P(A,M){var I=N(A),z=A.read_shift(4);return I[1].v=z>>6,I}function D(A,M){var I=N(A),z=A.read_shift(8,"f");return I[1].v=z,I}function U(A,M){var I=D(A);return A.l+=M-10,I}function Q(A,M){return A[A.l+M-1]==0?A.read_shift(M,"cstr"):""}function Y(A,M){var I=A[A.l++];I>M-1&&(I=M-1);for(var z="";z.length<I;)z+=String.fromCharCode(A[A.l++]);return z}function V(A,M,I){if(!(!I.qpro||M<21)){var z=A.read_shift(1);A.l+=17,A.l+=1,A.l+=2;var J=A.read_shift(M-21,"cstr");return[z,J]}}function F(A,M){for(var I={},z=A.l+M;A.l<z;){var J=A.read_shift(2);if(J==14e3){for(I[J]=[0,""],I[J][0]=A.read_shift(2);A[A.l];)I[J][1]+=String.fromCharCode(A[A.l]),A.l++;A.l++}}return I}function C(A,M){var I=he(5+A.length);I.write_shift(2,14e3),I.write_shift(2,M);for(var z=0;z<A.length;++z){var J=A.charCodeAt(z);I[I.l++]=J>127?95:J}return I[I.l++]=0,I}var X={0:{n:"BOF",f:Qr},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:l},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:h},14:{n:"NUMBER",f:g},15:{n:"LABEL",f:d},16:{n:"FORMULA",f:x},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:d},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:Q},222:{n:"SHEETNAMELP",f:Y},65535:{n:""}},se={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:k},23:{n:"NUMBER17",f:j},24:{n:"NUMBER18",f:E},25:{n:"FORMULA19",f:R},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:F},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:P},38:{n:"??"},39:{n:"NUMBER27",f:D},40:{n:"FORMULA28",f:U},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:Q},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"}
vendor: 4,823 bytes, line 623
623,659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:V},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};return{sheet_to_wk1:n,book_to_wk3:s,to_workbook:t}}();function NY(e){var t={},r=e.match(Gn),n=0,s=!1;if(r)for(;n!=r.length;++n){var a=ft(r[n]);switch(a[0].replace(/\w*:/g,"")){case"<condense":break;case"<extend":break;case"<shadow":if(!a.val)break;case"<shadow>":case"<shadow/>":t.shadow=1;break;case"</shadow>":break;case"<charset":if(a.val=="1")break;t.cp=n_[parseInt(a.val,10)];break;case"<outline":if(!a.val)break;case"<outline>":case"<outline/>":t.outline=1;break;case"</outline>":break;case"<rFont":t.name=a.val;break;case"<sz":t.sz=a.val;break;case"<strike":if(!a.val)break;case"<strike>":case"<strike/>":t.strike=1;break;case"</strike>":break;case"<u":if(!a.val)break;switch(a.val){case"double":t.uval="double";break;case"singleAccounting":t.uval="single-accounting";break;case"doubleAccounting":t.uval="double-accounting";break}case"<u>":case"<u/>":t.u=1;break;case"</u>":break;case"<b":if(a.val=="0")break;case"<b>":case"<b/>":t.b=1;break;case"</b>":break;case"<i":if(a.val=="0")break;case"<i>":case"<i/>":t.i=1;break;case"</i>":break;case"<color":a.rgb&&(t.color=a.rgb.slice(2,8));break;case"<color>":case"<color/>":case"</color>":break;case"<family":t.family=a.val;break;case"<family>":case"<family/>":case"</family>":break;case"<vertAlign":t.valign=a.val;break;case"<vertAlign>":case"<vertAlign/>":case"</vertAlign>":break;case"<scheme":break;case"<scheme>":case"<scheme/>":case"</scheme>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":s=!0;break;case"</ext>":s=!1;break;default:if(a[0].charCodeAt(1)!==47&&!s)throw new Error("Unrecognized rich format "+a[0])}}return t}var SY=function(){var e=wh("t"),t=wh("rPr");function r(a){var o=a.match(e);if(!o)return{t:"s",v:""};var l={t:"s",v:Dt(o[1])},c=a.match(t);return c&&(l.s=NY(c[1])),l}var n=/<(?:\w+:)?r>/g,s=/<\/(?:\w+:)?r>/;return function(o){return o.replace(n,"").split(s).map(r).filter(function(l){return l.v})}}(),kY=function(){var t=/(\r\n|\n)/g;function r(s,a,o){var l=[];s.u&&l.push("text-decoration: underline;"),s.uval&&l.push("text-underline-style:"+s.uval+";"),s.sz&&l.push("font-size:"+s.sz+"pt;"),s.outline&&l.push("text-effect: outline;"),s.shadow&&l.push("text-shadow: auto;"),a.push('<span style="'+l.join("")+'">'),s.b&&(a.push("<b>"),o.push("</b>")),s.i&&(a.push("<i>"),o.push("</i>")),s.strike&&(a.push("<s>"),o.push("</s>"));var c=s.valign||"";return c=="superscript"||c=="super"?c="sup":c=="subscript"&&(c="sub"),c!=""&&(a.push("<"+c+">"),o.push("</"+c+">")),o.push("</span>"),s}function n(s){var a=[[],s.v,[]];return s.v?(s.s&&r(s.s,a[0],a[2]),a[0].join("")+a[1].replace(t,"<br/>")+a[2].join("")):""}return function(a){return a.map(n).join("")}}(),jY=/<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g,EY=/<(?:\w+:)?r>/,CY=/<(?:\w+:)?rPh.*?>([\s\S]*?)<\/(?:\w+:)?rPh>/g;function E_(e,t){var r=t?t.cellHTML:!0,n={};return e?(e.match(/^\s*<(?:\w+:)?t[^>]*>/)?(n.t=Dt(tr(e.slice(e.indexOf(">")+1).split(/<\/(?:\w+:)?t>/)[0]||"")),n.r=tr(e),r&&(n.h=h_(n.t))):e.match(EY)&&(n.r=tr(e),n.t=Dt(tr((e.replace(CY,"").match(jY)||[]).join("").replace(Gn,""))),r&&(n.h=kY(SY(n.r)))),n):{t:""}}var TY=/<(?:\w+:)?sst([^>]*)>([\s\S]*)<\/(?:\w+:)?sst>/,AY=/<(?:\w+:)?(?:si|sstItem)>/g,PY=/<\/(?:\w+:)?(?:si|sstItem)>/;function RY(e,t){var r=[],n="";if(!e)return r;var s=e.match(TY);if(s){n=s[2].replace(AY,"").split(PY);for(var a=0;a!=n.length;++a){var o=E_(n[a].trim(),t);o!=null&&(r[r.length]=o)}s=ft(s[1]),r.Count=s.count,r.Unique=s.uniqueCount}return r}var OY=/^\s|\s$|[\t\n\r]/;function vR(e,t){if(!t.bookSST)return"";var r=[Gr];r[r.length]=De("sst",null,{xmlns:Ec[0],count:e.Count,uniqueCount:e.Unique});for(var n=0;n!=e.length;++n)if(e[n]!=null){var s=e[n],a="<si>";s.r?a+=s.r:(a+="<t",s.t||(s.t=""),s.t.match(OY)&&(a+=' xml:space="preserve"'),a+=">"+Jt(s.t)+"</t>"),a+="</si>",r[r.length]=a}return r.length>2&&(r[r.length]="</sst>",r[1]=r[1].replace("/>",">")),r.join("")}function DY(e){return[e.read_shift(4),e.read_shift(4)]}function IY(e,t){var r=[],n=!1;return oo(e,function(a,o,l){switch(l){case 159:r.Count=a[0],r.Unique=a[1];break;case 19:r.push(a);break;case 160:return!0;case 35:n=!0;break;case 36:n=!1;break;default:if(o.T,!n||t.WTF)throw new Error("Unexpected record 0x"+l.toString(16))}}),r}function FY(e,t){return t||(t=he(8)),t.write_shift(4,e.Count),t.write_shift(4,e.Unique),t}var MY=qG;function LY(e){var t=ms();we(t,159,FY(e));for(var r=0;r<e.length;++r)we(t,19,MY(e[r]));return we(t,160),t.end()}function yR(e){for(var t=[],r=e.split(""),n=0;n<r.length;
vendor: 5,225 bytes, line 623
623++n)t[n]=r[n].charCodeAt(0);return t}function Vi(e,t){var r={};return r.Major=e.read_shift(2),r.Minor=e.read_shift(2),t>=4&&(e.l+=t-4),r}function BY(e){var t={};return t.id=e.read_shift(0,"lpp4"),t.R=Vi(e,4),t.U=Vi(e,4),t.W=Vi(e,4),t}function $Y(e){for(var t=e.read_shift(4),r=e.l+t-4,n={},s=e.read_shift(4),a=[];s-- >0;)a.push({t:e.read_shift(4),v:e.read_shift(0,"lpp4")});if(n.name=e.read_shift(0,"lpp4"),n.comps=a,e.l!=r)throw new Error("Bad DataSpaceMapEntry: "+e.l+" != "+r);return n}function UY(e){var t=[];e.l+=4;for(var r=e.read_shift(4);r-- >0;)t.push($Y(e));return t}function WY(e){var t=[];e.l+=4;for(var r=e.read_shift(4);r-- >0;)t.push(e.read_shift(0,"lpp4"));return t}function zY(e){var t={};return e.read_shift(4),e.l+=4,t.id=e.read_shift(0,"lpp4"),t.name=e.read_shift(0,"lpp4"),t.R=Vi(e,4),t.U=Vi(e,4),t.W=Vi(e,4),t}function HY(e){var t=zY(e);if(t.ename=e.read_shift(0,"8lpp4"),t.blksz=e.read_shift(4),t.cmode=e.read_shift(4),e.read_shift(4)!=4)throw new Error("Bad !Primary record");return t}function wR(e,t){var r=e.l+t,n={};n.Flags=e.read_shift(4)&63,e.l+=4,n.AlgID=e.read_shift(4);var s=!1;switch(n.AlgID){case 26126:case 26127:case 26128:s=n.Flags==36;break;case 26625:s=n.Flags==4;break;case 0:s=n.Flags==16||n.Flags==4||n.Flags==36;break;default:throw"Unrecognized encryption algorithm: "+n.AlgID}if(!s)throw new Error("Encryption Flags/AlgID mismatch");return n.AlgIDHash=e.read_shift(4),n.KeySize=e.read_shift(4),n.ProviderType=e.read_shift(4),e.l+=8,n.CSPName=e.read_shift(r-e.l>>1,"utf16le"),e.l=r,n}function bR(e,t){var r={},n=e.l+t;return e.l+=4,r.Salt=e.slice(e.l,e.l+16),e.l+=16,r.Verifier=e.slice(e.l,e.l+16),e.l+=16,e.read_shift(4),r.VerifierHash=e.slice(e.l,n),e.l=n,r}function VY(e){var t=Vi(e);switch(t.Minor){case 2:return[t.Minor,GY(e)];case 3:return[t.Minor,qY()];case 4:return[t.Minor,KY(e)]}throw new Error("ECMA-376 Encrypted file unrecognized Version: "+t.Minor)}function GY(e){var t=e.read_shift(4);if((t&63)!=36)throw new Error("EncryptionInfo mismatch");var r=e.read_shift(4),n=wR(e,r),s=bR(e,e.length-e.l);return{t:"Std",h:n,v:s}}function qY(){throw new Error("File is password-protected: ECMA-376 Extensible")}function KY(e){var t=["saltSize","blockSize","keyBits","hashSize","cipherAlgorithm","cipherChaining","hashAlgorithm","saltValue"];e.l+=4;var r=e.read_shift(e.length-e.l,"utf8"),n={};return r.replace(Gn,function(a){var o=ft(a);switch(Si(o[0])){case"<?xml":break;case"<encryption":case"</encryption>":break;case"<keyData":t.forEach(function(l){n[l]=o[l]});break;case"<dataIntegrity":n.encryptedHmacKey=o.encryptedHmacKey,n.encryptedHmacValue=o.encryptedHmacValue;break;case"<keyEncryptors>":case"<keyEncryptors":n.encs=[];break;case"</keyEncryptors>":break;case"<keyEncryptor":n.uri=o.uri;break;case"</keyEncryptor>":break;case"<encryptedKey":n.encs.push(o);break;default:throw o[0]}}),n}function YY(e,t){var r={},n=r.EncryptionVersionInfo=Vi(e,4);if(t-=4,n.Minor!=2)throw new Error("unrecognized minor version code: "+n.Minor);if(n.Major>4||n.Major<2)throw new Error("unrecognized major version code: "+n.Major);r.Flags=e.read_shift(4),t-=4;var s=e.read_shift(4);return t-=4,r.EncryptionHeader=wR(e,s),t-=s,r.EncryptionVerifier=bR(e,t),r}function XY(e){var t={},r=t.EncryptionVersionInfo=Vi(e,4);if(r.Major!=1||r.Minor!=1)throw"unrecognized version code "+r.Major+" : "+r.Minor;return t.Salt=e.read_shift(16),t.EncryptedVerifier=e.read_shift(16),t.EncryptedVerifierHash=e.read_shift(16),t}function C_(e){var t=0,r,n=yR(e),s=n.length+1,a,o,l,c,u;for(r=il(s),r[0]=n.length,a=1;a!=s;++a)r[a]=n[a-1];for(a=s-1;a>=0;--a)o=r[a],l=t&16384?1:0,c=t<<1&32767,u=l|c,t=u^o;return t^52811}var _R=function(){var e=[187,255,255,186,255,255,185,128,0,190,15,0,191,15,0],t=[57840,7439,52380,33984,4364,3600,61902,12606,6258,57657,54287,34041,10252,43370,20163],r=[44796,19929,39858,10053,20106,40212,10761,31585,63170,64933,60267,50935,40399,11199,17763,35526,1453,2906,5812,11624,23248,885,1770,3540,7080,14160,28320,56640,55369,41139,20807,41614,21821,43642,17621,28485,56970,44341,19019,38038,14605,29210,60195,50791,40175,10751,21502,43004,24537,18387,36774,3949,7898,15796,31592,63184,47201,24803,49606,37805,14203,28406,56812,17824,35648,1697,3394,6788,13576,27152,43601,17539,35078,557,1114,2228,4456,30388,60776,51953,34243,7079,14158,28316,14128,28256,56512,43425,17251,34502,7597,13105,26210,52420,35241,883,1766,3532,4129,8258,16516,33032,4657,9314,18628],n=function(o){return(o/2|o*128)&255},s=function(o,l){return n(o^l)},a=function(o){for(var l=t[o.length-1],c=104,u=o.length-1;u>=0;--u)for(var d=o[u],f=0;f!=7;++f)d&64&&(l^=r[c]),d*=2,--c;return l};return function(o){for(var l=yR(o),c=a(l),u=l.length,d=il(16),f=0;f!=16;++f)d[f]=0;var h,m,g;for((u&1)===1&&(h=c>>8,d[u]=s(e[0],h),--u,h=c&255,m=l[l.length-1],d[u]=s(m,h));u>0;)--u,h=c>>8,d[u]=s(l[u],h),--u,h=c&255,d[u]=s(l[u],h);for(u=15,g=15-l.length;g>0;)h=c>>8,d[u]=s(e[g],h),--u,--g,h=c&255,d[u]=s(l[u],h),--u,--g;return d}}(),QY=function(e,t,r,n,s){s||(s=t),n||(n=_R(e));var a,o;for(a=0;a!=t.length;++a)o=t[a],o^=n[r],o=(o>>5|o<<3)&255,s[a]=o,++r;return[s,r,n]},JY=function(e){var t=0,r=_R(e);return function(n){var s=QY("",n,t,r);return t=s[1],s[0]}};function ZY(e,t,r,n){var s={key:Qr(e),verificationBytes:Qr(e)};
623return r.password&&(s.verifier=C_(r.password)),n.valid=s.verificationBytes===s.verifier,n.valid&&(n.insitu=JY(r.password)),s}function eX(e,t,r){var n=r||{};return n.Info=e.read_shift(2),e.l-=2,n.Info===1?n.Data=XY(e):n.Data=YY(e,t),n}function tX(e,t,r){var n={Type:r.biff>=8?e.read_shift(2):0};return n.Type?eX(e,t-2,n):ZY(e,r.biff>=8?t:t-2,r,n),n}var NR=function(){function e(s,a){switch(a.type){case"base64":return t(Gs(s),a);case"binary":return t(s,a);case"buffer":return t(Nt&&Buffer.isBuffer(s)?s.toString("binary"):vl(s),a);case"array":return t(pc(s),a)}throw new Error("Unrecognized type "+a.type)}function t(s,a){var o=a||{},l=o.dense?[]:{},c=s.match(/\\trowd.*?\\row\b/g);if(!c.length)throw new Error("RTF missing table");var u={s:{c:0,r:0},e:{c:0,r:c.length-1}};return c.forEach(function(d,f){Array.isArray(l)&&(l[f]=[]);for(var h=/\\\w+\b/g,m=0,g,p=-1;g=h.exec(d);){switch(g[0]){case"\\cell":var x=d.slice(m,h.lastIndex-g[0].length);if(x[0]==" "&&(x=x.slice(1)),++p,x.length){var b={v:x,t:"s"};Array.isArray(l)?l[f][p]=b:l[ut({r:f,c:p})]=b}break}m=h.lastIndex}p>u.e.c&&(u.e.c=p)}),l["!ref"]=yt(u),l}function r(s,a){return yl(e(s,a),a)}function n(s){for(var a=["{\\rtf1\\ansi"],o=It(s["!ref"]),l,c=Array.isArray(s),u=o.s.r;u<=o.e.r;++u){a.push("\\trowd\\trautofit1");for(var d=o.s.c;d<=o.e.c;++d)a.push("\\cellx"+(d+1));for(a.push("\\pard\\intbl"),d=o.s.c;d<=o.e.c;++d){var f=ut({r:u,c:d});l=c?(s[u]||[])[d]:s[f],!(!l||l.v==null&&(!l.f||l.F))&&(a.push(" "+(l.w||(eo(l),l.w))),a.push("\\cell"))}a.push("\\pard\\intbl\\row")}return a.join("")+"}"}return{to_workbook:r,to_sheet:e,from_sheet:n}}();function rX(e){var t=e.slice(e[0]==="#"?1:0).slice(0,6);return[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]}function Sh(e){for(var t=0,r=1;t!=3;++t)r=r*256+(e[t]>255?255:e[t]<0?0:e[t]);return r.toString(16).toUpperCase().slice(1)}function nX(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.max(t,r,n),a=Math.min(t,r,n),o=s-a;if(o===0)return[0,0,t];var l=0,c=0,u=s+a;switch(c=o/(u>1?2-u:u),s){case t:l=((r-n)/o+6)%6;break;case r:l=(n-t)/o+2;break;case n:l=(t-r)/o+4;break}return[l/6,c,u/2]}function sX(e){var t=e[0],r=e[1],n=e[2],s=r*2*(n<.5?n:1-n),a=n-s/2,o=[a,a,a],l=6*t,c;if(r!==0)switch(l|0){case 0:case 6:c=s*l,o[0]+=s,o[1]+=c;break;case 1:c=s*(2-l),o[0]+=c,o[1]+=s;break;case 2:c=s*(l-2),o[1]+=s,o[2]+=c;break;case 3:c=s*(4-l),o[1]+=c,o[2]+=s;break;case 4:c=s*(l-4),o[2]+=s,o[0]+=c;break;case 5:c=s*(6-l),o[2]+=c,o[0]+=s;break}for(var u=0;u!=3;++u)o[u]=Math.round(o[u]*255);return o}function zp(e,t){if(t===0)return e;var r=nX(rX(e));return t<0?r[2]=r[2]*(1+t):r[2]=1-(1-r[2])*(1-t),Sh(sX(r))}var SR=6,aX=15,iX=1,$n=SR;function kh(e){return Math.floor((e+Math.round(128/$n)/256)*$n)}function jh(e){return Math.floor((e-5)/$n*100+.5)/100}function Hp(e){return Math.round((e*$n+5)/$n*256)/256}function Bv(e){return Hp(jh(kh(e)))}function T_(e){var t=Math.abs(e-Bv(e)),r=$n;if(t>.005)for($n=iX;$n<aX;++$n)Math.abs(e-Bv(e))<=t&&(t=Math.abs(e-Bv(e)),r=$n);$n=r}function ol(e){e.width?(e.wpx=kh(e.width),e.wch=jh(e.wpx),e.MDW=$n):e.wpx?(e.wch=jh(e.wpx),e.width=Hp(e.wch),e.MDW=$n):typeof e.wch=="number"&&(e.width=Hp(e.wch),e.wpx=kh(e.width),e.MDW=$n),e.customWidth&&delete e.customWidth}var oX=96,kR=oX;function Eh(e){return e*96/kR}function ud(e){return e*kR/96}var lX={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinHorzCross:"lightGrid"};function cX(e,t,r,n){t.Borders=[];var s={},a=!1;(e[0].match(Gn)||[]).forEach(function(o){var l=ft(o);switch(Si(l[0])){case"<borders":case"<borders>":case"</borders>":break;case"<border":case"<border>":case"<border/>":s={},l.diagonalUp&&(s.diagonalUp=hr(l.diagonalUp)),l.diagonalDown&&(s.diagonalDown=hr(l.diagonalDown)),t.Borders.push(s);break;case"</border>":break;case"<left/>":break;case"<left":case"<left>":break;case"</left>":break;case"<right/>":break;case"<right":case"<right>":break;case"</right>":break;case"<top/>":break;case"<top":case"<top>":break;case"</top>":break;case"<bottom/>":break;case"<bottom":case"<bottom>":break;case"</bottom>":break;case"<diagonal":case"<diagonal>":case"<diagonal/>":break;case"</diagonal>":break;case"<horizontal":case"<horizontal>":case"<horizontal/>":break;case"</horizontal>":break;case"<vertical":case"<vertical>":case"<vertical/>":break;case"</vertical>":break;case"<start":case"<start>":case"<start/>":break;case"</start>":break;case"<end":case"<end>":case"<end/>":break;case"</end>":break;case"<color":case"<color>":break;case"<color/>":case"</color>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":a=!0;break;case"</ext>":a=!1;break;default:if(n&&n.WTF&&!a)throw new Error("unrecognized "+l[0]+" in borders")}})}function uX(e,t,r,n){t.Fills=[];var s={},a=!1;
vendor: 8,820 bytes, line 623
623(e[0].match(Gn)||[]).forEach(function(o){var l=ft(o);switch(Si(l[0])){case"<fills":case"<fills>":case"</fills>":break;case"<fill>":case"<fill":case"<fill/>":s={},t.Fills.push(s);break;case"</fill>":break;case"<gradientFill>":break;case"<gradientFill":case"</gradientFill>":t.Fills.push(s),s={};break;case"<patternFill":case"<patternFill>":l.patternType&&(s.patternType=l.patternType);break;case"<patternFill/>":case"</patternFill>":break;case"<bgColor":s.bgColor||(s.bgColor={}),l.indexed&&(s.bgColor.indexed=parseInt(l.indexed,10)),l.theme&&(s.bgColor.theme=parseInt(l.theme,10)),l.tint&&(s.bgColor.tint=parseFloat(l.tint)),l.rgb&&(s.bgColor.rgb=l.rgb.slice(-6));break;case"<bgColor/>":case"</bgColor>":break;case"<fgColor":s.fgColor||(s.fgColor={}),l.theme&&(s.fgColor.theme=parseInt(l.theme,10)),l.tint&&(s.fgColor.tint=parseFloat(l.tint)),l.rgb!=null&&(s.fgColor.rgb=l.rgb.slice(-6));break;case"<fgColor/>":case"</fgColor>":break;case"<stop":case"<stop/>":break;case"</stop>":break;case"<color":case"<color/>":break;case"</color>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":a=!0;break;case"</ext>":a=!1;break;default:if(n&&n.WTF&&!a)throw new Error("unrecognized "+l[0]+" in fills")}})}function dX(e,t,r,n){t.Fonts=[];var s={},a=!1;(e[0].match(Gn)||[]).forEach(function(o){var l=ft(o);switch(Si(l[0])){case"<fonts":case"<fonts>":case"</fonts>":break;case"<font":case"<font>":break;case"</font>":case"<font/>":t.Fonts.push(s),s={};break;case"<name":l.val&&(s.name=tr(l.val));break;case"<name/>":case"</name>":break;case"<b":s.bold=l.val?hr(l.val):1;break;case"<b/>":s.bold=1;break;case"<i":s.italic=l.val?hr(l.val):1;break;case"<i/>":s.italic=1;break;case"<u":switch(l.val){case"none":s.underline=0;break;case"single":s.underline=1;break;case"double":s.underline=2;break;case"singleAccounting":s.underline=33;break;case"doubleAccounting":s.underline=34;break}break;case"<u/>":s.underline=1;break;case"<strike":s.strike=l.val?hr(l.val):1;break;case"<strike/>":s.strike=1;break;case"<outline":s.outline=l.val?hr(l.val):1;break;case"<outline/>":s.outline=1;break;case"<shadow":s.shadow=l.val?hr(l.val):1;break;case"<shadow/>":s.shadow=1;break;case"<condense":s.condense=l.val?hr(l.val):1;break;case"<condense/>":s.condense=1;break;case"<extend":s.extend=l.val?hr(l.val):1;break;case"<extend/>":s.extend=1;break;case"<sz":l.val&&(s.sz=+l.val);break;case"<sz/>":case"</sz>":break;case"<vertAlign":l.val&&(s.vertAlign=l.val);break;case"<vertAlign/>":case"</vertAlign>":break;case"<family":l.val&&(s.family=parseInt(l.val,10));break;case"<family/>":case"</family>":break;case"<scheme":l.val&&(s.scheme=l.val);break;case"<scheme/>":case"</scheme>":break;case"<charset":if(l.val=="1")break;l.codepage=n_[parseInt(l.val,10)];break;case"<color":if(s.color||(s.color={}),l.auto&&(s.color.auto=hr(l.auto)),l.rgb)s.color.rgb=l.rgb.slice(-6);else if(l.indexed){s.color.index=parseInt(l.indexed,10);var c=rc[s.color.index];s.color.index==81&&(c=rc[1]),c||(c=rc[1]),s.color.rgb=c[0].toString(16)+c[1].toString(16)+c[2].toString(16)}else l.theme&&(s.color.theme=parseInt(l.theme,10),l.tint&&(s.color.tint=parseFloat(l.tint)),l.theme&&r.themeElements&&r.themeElements.clrScheme&&(s.color.rgb=zp(r.themeElements.clrScheme[s.color.theme].rgb,s.color.tint||0)));break;case"<color/>":case"</color>":break;case"<AlternateContent":a=!0;break;case"</AlternateContent>":a=!1;break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":a=!0;break;case"</ext>":a=!1;break;default:if(n&&n.WTF&&!a)throw new Error("unrecognized "+l[0]+" in fonts")}})}function fX(e,t,r){t.NumberFmt=[];for(var n=Mr(it),s=0;s<n.length;++s)t.NumberFmt[n[s]]=it[n[s]];var a=e[0].match(Gn);if(a)for(s=0;s<a.length;++s){var o=ft(a[s]);switch(Si(o[0])){case"<numFmts":case"</numFmts>":case"<numFmts/>":case"<numFmts>":break;case"<numFmt":{var l=Dt(tr(o.formatCode)),c=parseInt(o.numFmtId,10);if(t.NumberFmt[c]=l,c>0){if(c>392){for(c=392;c>60&&t.NumberFmt[c]!=null;--c);t.NumberFmt[c]=l}Hi(l,c)}}break;case"</numFmt>":break;default:if(r.WTF)throw new Error("unrecognized "+o[0]+" in numFmts")}}}function hX(e){var t=["<numFmts>"];return[[5,8],[23,26],[41,44],[50,392]].forEach(function(r){for(var n=r[0];n<=r[1];++n)e[n]!=null&&(t[t.length]=De("numFmt",null,{numFmtId:n,formatCode:Jt(e[n])}))}),t.length===1?"":(t[t.length]="</numFmts>",t[0]=De("numFmts",null,{count:t.length-2}).replace("/>",">"),t.join(""))}var fm=["numFmtId","fillId","fontId","borderId","xfId"],hm=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"];function mX(e,t,r){t.CellXf=[];var n,s=!1;(e[0].match(Gn)||[]).forEach(function(a){var o=ft(a),l=0;switch(Si(o[0])){case"<cellXfs":case"<cellXfs>":case"<cellXfs/>":case"</cellXfs>":break;case"<xf":case"<xf/>":for(n=o,delete n[0],l=0;l<fm.length;++l)n[fm[l]]&&(n[fm[l]]=parseInt(n[fm[l]],10));for(l=0;l<hm.length;++l)n[hm[l]]&&(n[hm[l]]=hr(n[hm[l]]));if(t.NumberFmt&&n.numFmtId>392){for(l=392;l>60;--l)if(t.NumberFmt[n.numFmtId]==t.NumberFmt[l]){n.numFmtId=l;break}}t.CellXf.push(n);break;case"</xf>":break;case"<alignment":case"<alignment/>":var c={};o.vertical&&(c.vertical=o.vertical),o.horizontal&&(c.horizontal=o.horizontal),o.textRotation!=null&&(c.textRotation=o.textRotation),o.indent&&(c.indent=o.indent),o.wrapText&&(c.wrapText=hr(o.wrapText)),n.alignment=c;break;case"</alignment>":break;case"<protection":break;case"</protection>":case"<protection/>":break;case"<AlternateContent":s=!0;break;case"</AlternateContent>":s=!1;break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":s=!0;break;case"</ext>":s=!1;break;default:if(r&&r.WTF&&!s)throw new Error("unrecognized "+o[0]+" in cellXfs")}})}function pX(e){var t=[];return t[t.length]=De("cellXfs",null),e.forEach(function(r){t[t.length]=De("xf",null,r)}),t[t.length]="</cellXfs>",t.length===2?"":(t[0]=De("cellXfs",null,{count:t.length-2}).replace("/>",">"),t.join(""))}var xX=function(){var t=/<(?:\w+:)?numFmts([^>]*)>[\S\s]*?<\/(?:\w+:)?numFmts>/,r=/<(?:\w+:)?cellXfs([^>]*)>[\S\s]*?<\/(?:\w+:)?cellXfs>/,n=/<(?:\w+:)?fills([^>]*)>[\S\s]*?<\/(?:\w+:)?fills>/,s=/<(?:\w+:)?fonts([^>]*)>[\S\s]*?<\/(?:\w+:)?fonts>/,a=/<(?:\w+:)?borders([^>]*)>[\S\s]*?<\/(?:\w+:)?borders>/;return function(l,c,u){var d={};if(!l)return d;l=l.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");var f;return(f=l.match(t))&&fX(f,d,u),(f=l.match(s))&&dX(f,d,c,u),(f=l.match(n))&&uX(f,d,c,u),(f=l.match(a))&&cX(f,d,c,u),(f=l.match(r))&&mX(f,d,u),d}}();function jR(e,t){var r=[Gr,De("styleSheet",null,{xmlns:Ec[0],"xmlns:vt":ln.vt})],n;return e.SSF&&(n=hX(e.SSF))!=null&&(r[r.length]=n),r[r.length]='<fonts count="1"><font><sz val="12"/><color theme="1"/><name val="Calibri"/><family val="2"/><scheme val="minor"/></font></fonts>',r[r.length]='<fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills>',r[r.length]='<borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders>',r[r.length]='<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>',(n=pX(t.cellXfs))&&(r[r.length]=n),r[r.length]='<cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>',r[r.length]='<dxfs count="0"/>',r[r.length]='<tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4"/>',r.length>2&&(r[r.length]="</styleSheet>",r[1]=r[1].replace("/>",">")),r.join("")}function gX(e,t){var r=e.read_shift(2),n=Wn(e);return[r,n]}function vX(e,t,r){r||(r=he(6+4*t.length)),r.write_shift(2,e),vn(t,r);var n=r.length>r.l?r.slice(0,r.l):r;return r.l==null&&(r.l=r.length),n}function yX(e,t,r){var n={};n.sz=e.read_shift(2)/20;var s=eq(e);s.fItalic&&(n.italic=1),s.fCondense&&(n.condense=1),s.fExtend&&(n.extend=1),s.fShadow&&(n.shadow=1),s.fOutline&&(n.outline=1),s.fStrikeout&&(n.strike=1);var a=e.read_shift(2);switch(a===700&&(n.bold=1),e.read_shift(2)){case 1:n.vertAlign="superscript";break;case 2:n.vertAlign="subscript";break}var o=e.read_shift(1);o!=0&&(n.underline=o);var l=e.read_shift(1);l>0&&(n.family=l);var c=e.read_shift(1);switch(c>0&&(n.charset=c),e.l++,n.color=ZG(e),e.read_shift(1)){case 1:n.scheme="major";break;case 2:n.scheme="minor";break}return n.name=Wn(e),n}function wX(e,t){t||(t=he(25+4*32)),t.write_shift(2,e.sz*20),tq(e,t),t.write_shift(2,e.bold?700:400);var r=0;e.vertAlign=="superscript"?r=1:e.vertAlign=="subscript"&&(r=2),t.write_shift(2,r),t.write_shift(1,e.underline||0),t.write_shift(1,e.family||0),t.write_shift(1,e.charset||0),t.write_shift(1,0),$p(e.color,t);var n=0;return e.scheme=="major"&&(n=1),e.scheme=="minor"&&(n=2),t.write_shift(1,n),vn(e.name,t),t.length>t.l?t.slice(0,t.l):t}var bX=["none","solid","mediumGray","darkGray","lightGray","darkHorizontal","dar
623kVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"],$v,_X=Vn;function Tj(e,t){t||(t=he(4*3+8*7+16*1)),$v||($v=eg(bX));var r=$v[e.patternType];r==null&&(r=40),t.write_shift(4,r);var n=0;if(r!=40)for($p({auto:1},t),$p({auto:1},t);n<12;++n)t.write_shift(4,0);else{for(;n<4;++n)t.write_shift(4,0);for(;n<12;++n)t.write_shift(4,0)}return t.length>t.l?t.slice(0,t.l):t}function NX(e,t){var r=e.l+t,n=e.read_shift(2),s=e.read_shift(2);return e.l=r,{ixfe:n,numFmtId:s}}function ER(e,t,r){r||(r=he(16)),r.write_shift(2,t||0),r.write_shift(2,e.numFmtId||0),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(1,0),r.write_shift(1,0);var n=0;return r.write_shift(1,n),r.write_shift(1,0),r.write_shift(1,0),r.write_shift(1,0),r}function Jd(e,t){return t||(t=he(10)),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(4,0),t.write_shift(4,0),t}var SX=Vn;function kX(e,t){return t||(t=he(51)),t.write_shift(1,0),Jd(null,t),Jd(null,t),Jd(null,t),Jd(null,t),Jd(null,t),t.length>t.l?t.slice(0,t.l):t}function jX(e,t){return t||(t=he(12+4*10)),t.write_shift(4,e.xfId),t.write_shift(2,1),t.write_shift(1,+e.builtinId),t.write_shift(1,0),Bp(e.name||"",t),t.length>t.l?t.slice(0,t.l):t}function EX(e,t,r){var n=he(2052);return n.write_shift(4,e),Bp(t,n),Bp(r,n),n.length>n.l?n.slice(0,n.l):n}function CX(e,t,r){var n={};n.NumberFmt=[];for(var s in it)n.NumberFmt[s]=it[s];n.CellXf=[],n.Fonts=[];var a=[],o=!1;return oo(e,function(c,u,d){switch(d){case 44:n.NumberFmt[c[0]]=c[1],Hi(c[1],c[0]);break;case 43:n.Fonts.push(c),c.color.theme!=null&&t&&t.themeElements&&t.themeElements.clrScheme&&(c.color.rgb=zp(t.themeElements.clrScheme[c.color.theme].rgb,c.color.tint||0));break;case 1025:break;case 45:break;case 46:break;case 47:a[a.length-1]==617&&n.CellXf.push(c);break;case 48:case 507:case 572:case 475:break;case 1171:case 2102:case 1130:case 512:case 2095:case 3072:break;case 35:o=!0;break;case 36:o=!1;break;case 37:a.push(d),o=!0;break;case 38:a.pop(),o=!1;break;default:if(u.T>0)a.push(d);else if(u.T<0)a.pop();else if(!o||r.WTF&&a[a.length-1]!=37)throw new Error("Unexpected record 0x"+d.toString(16))}}),n}function TX(e,t){if(t){var r=0;[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var s=n[0];s<=n[1];++s)t[s]!=null&&++r}),r!=0&&(we(e,615,Wa(r)),[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var s=n[0];s<=n[1];++s)t[s]!=null&&we(e,44,vX(s,t[s]))}),we(e,616))}}function AX(e){var t=1;we(e,611,Wa(t)),we(e,43,wX({sz:12,color:{theme:1},name:"Calibri",family:2,scheme:"minor"})),we(e,612)}function PX(e){var t=2;we(e,603,Wa(t)),we(e,45,Tj({patternType:"none"})),we(e,45,Tj({patternType:"gray125"})),we(e,604)}function RX(e){var t=1;we(e,613,Wa(t)),we(e,46,kX()),we(e,614)}function OX(e){var t=1;we(e,626,Wa(t)),we(e,47,ER({numFmtId:0,fontId:0,fillId:0,borderId:0},65535)),we(e,627)}function DX(e,t){we(e,617,Wa(t.length)),t.forEach(function(r){we(e,47,ER(r,0))}),we(e,618)}function IX(e){var t=1;we(e,619,Wa(t)),we(e,48,jX({xfId:0,builtinId:0,name:"Normal"})),we(e,620)}function FX(e){var t=0;we(e,505,Wa(t)),we(e,506)}function MX(e){var t=0;we(e,508,EX(t,"TableStyleMedium9","PivotStyleMedium4")),we(e,509)}function LX(e,t){var r=ms();return we(r,278),TX(r,e.SSF),AX(r),PX(r),RX(r),OX(r),DX(r,t.cellXfs),IX(r),FX(r),MX(r),we(r,279),r.end()}var BX=["</a:lt1>","</a:dk1>","</a:lt2>","</a:dk2>","</a:accent1>","</a:accent2>","</a:accent3>","</a:accent4>","</a:accent5>","</a:accent6>","</a:hlink>","</a:folHlink>"];function $X(e,t,r){t.themeElements.clrScheme=[];var n={};(e[0].match(Gn)||[]).forEach(function(s){var a=ft(s);switch(a[0]){case"<a:clrScheme":case"</a:clrScheme>":break;case"<a:srgbClr":n.rgb=a.val;break;case"<a:sysClr":n.rgb=a.lastClr;break;case"<a:dk1>":case"</a:dk1>":case"<a:lt1>":case"</a:lt1>":case"<a:dk2>":case"</a:dk2>":case"<a:lt2>":case"</a:lt2>":case"<a:accent1>":case"</a:accent1>":case"<a:accent2>":case"</a:accent2>":case"<a:accent3>":case"</a:accent3>":case"<a:accent4>":case"</a:accent4>":case"<a:accent5>":case"</a:accent5>":case"<a:accent6>":case"</a:accent6>":case"<a:hlink>":case"</a:hlink>":case"<a:folHlink>":case"</a:folHlink>
623":a[0].charAt(1)==="/"?(t.themeElements.clrScheme[BX.indexOf(a[0])]=n,n={}):n.name=a[0].slice(3,a[0].length-1);break;default:if(r&&r.WTF)throw new Error("Unrecognized "+a[0]+" in clrScheme")}})}function UX(){}function WX(){}var zX=/<a:clrScheme([^>]*)>[\s\S]*<\/a:clrScheme>/,HX=/<a:fontScheme([^>]*)>[\s\S]*<\/a:fontScheme>/,VX=/<a:fmtScheme([^>]*)>[\s\S]*<\/a:fmtScheme>/;function GX(e,t,r){t.themeElements={};var n;[["clrScheme",zX,$X],["fontScheme",HX,UX],["fmtScheme",VX,WX]].forEach(function(s){if(!(n=e.match(s[1])))throw new Error(s[0]+" not found in themeElements");s[2](n,t,r)})}var qX=/<a:themeElements([^>]*)>[\s\S]*<\/a:themeElements>/;function CR(e,t){(!e||e.length===0)&&(e=A_());var r,n={};if(!(r=e.match(qX)))throw new Error("themeElements not found in theme");return GX(r[0],n,t),n.raw=e,n}function A_(e,t){if(t&&t.themeXLSX)return t.themeXLSX;if(e&&typeof e.raw=="string")return e.raw;var r=[Gr];return r[r.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">',r[r.length]="<a:themeElements>",r[r.length]='<a:clrScheme name="Office">',r[r.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>',r[r.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>',r[r.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>',r[r.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>',r[r.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>',r[r.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>',r[r.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>',r[r.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>',r[r.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>',r[r.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>',r[r.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>',r[r.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>',r[r.length]="</a:clrScheme>",r[r.length]='<a:fontScheme name="Office">',r[r.length]="<a:majorFont>",r[r.length]='<a:latin typeface="Cambria"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="MS Pゴシック"/>',r[r.length]='<a:font script="Hang" typeface="맑은 고딕"/>',r[r.length]='<a:font script="Hans" typeface="宋体"/>',r[r.length]='<a:font script="Hant" typeface="新細明體"/>',r[r.length]='<a:font script="Arab" typeface="Times New Roman"/>',r[r.length]='<a:font script="Hebr" typeface="Times New Roman"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="MoolBoran"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Times New Roman"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:majorFont>",r[r.length]="<a:minorFont>",r[r.length]='<a:latin typeface="Calibri"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="MS Pゴシック"/>
623',r[r.length]='<a:font script="Hang" typeface="맑은 고딕"/>',r[r.length]='<a:font script="Hans" typeface="宋体"/>',r[r.length]='<a:font script="Hant" typeface="新細明體"/>',r[r.length]='<a:font script="Arab" typeface="Arial"/>',r[r.length]='<a:font script="Hebr" typeface="Arial"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="DaunPenh"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Arial"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:minorFont>",r[r.length]="</a:fontScheme>",r[r.length]='<a:fmtScheme name="Office">',r[r.length]="<a:fillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="1"/>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="0"/>',r[r.length]="</a:gradFill>",r[r.length]="</a:fillStyleLst>",r[r.length]="<a:lnStyleLst>",r[r.length]='<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]="</a:lnStyleLst>",r[r.length]="<a:effectStyleLst>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>
623",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>',r[r.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>',r[r.length]="</a:effectStyle>",r[r.length]="</a:effectStyleLst>",r[r.length]="<a:bgFillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]="</a:bgFillStyleLst>",r[r.length]="</a:fmtScheme>",r[r.length]="</a:themeElements>",r[r.length]="<a:objectDefaults>",r[r.length]="<a:spDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>',r[r.length]="</a:spDef>",r[r.length]="<a:lnDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>',r[r.length]="</a:lnDef>",r[r.length]="</a:objectDefaults>",r[r.length]="<a:extraClrSchemeLst/>",r[r.length]="</a:theme>",r.join("")}function KX(e,t,r){var n=e.l+t,s=e.read_shift(4);if(s!==124226){if(!r.cellStyles){e.l=n;return}var a=e.slice(e.l);e.l=n;var o;try{o=wP(a,{type:"array"})}catch{return}var l=Ms(o,"theme/theme/theme1.xml",!0);if(l)return CR(l,r)}}function YX(e){return e.read_shift(4)}function XX(e){var t={};switch(t.xclrType=e.read_shift(2),t.nTintShade=e.read_shift(2),t.xclrType){case 0:e.l+=4;break;case 1:t.xclrValue=QX(e,4);break;case 2:t.xclrValue=oR(e);break;case 3:t.xclrValue=YX(e);break;case 4:e.l+=4;break}return e.l+=8,t}function QX(e,t){return Vn(e,t)}function JX(e,t){return Vn(e,t)}function ZX(e){var t=e.read_shift(2),r=e.read_shift(2)-4,n=[t];switch(t){case 4:case 5:case 7:case 8:case 9:case 10:case 11:case 13:n[1]=XX(e);break;case 6:n[1]=JX(e,r);break;case 14:case 15:n[1]=e.read_shift(r===1?1:2);break;default:throw new Error("Unrecognized ExtProp type: "+t+" "+r)}return n}function eQ(e,t){var r=e.l+t;e.l+=2;var n=e.read_shift(2);e.l+=2;for(var s=e.read_shift(2),a=[];s-- >0;)a.push(ZX(e,r-e.l));return{ixfe:n,ext:a}}function tQ(e,t){t.forEach(function(r){switch(r[0]){}})}function rQ(e,t){return{flags:e.read_shift(4),version:e.read_shift(4),name:Wn(e)}}function nQ(e){var t=he(12+2*e.name.length);return t.write_shift(4,e.flags),t.write_shift(4,e.version),vn(e.name,t),t.slice(0,t.l)}function sQ(e){for(var t=[],r=e.read_shift(4);r-- >0;)t.push([e.read_shift(4),e.read_shift(4)]);return t}function aQ(e){var t=he(4+8*e.length);t.write_shift(4,e.length);for(var r=0;r<e.length;++r)t.write_shift(4,e[r][0]),t.write_shift(4,e[r][1]);return t}function iQ(e,t){var r=he(8+2*t.length);return r.write_shift(4,e),vn(t,r),r.slice(0,r.l)}
vendor: 5,521 bytes, lines 623-641
623function oQ(e){return e.l+=4,e.read_shift(4)!=0}function lQ(e,t){var r=he(8);return r.write_shift(4,e),r.write_shift(4,1),r}function cQ(e,t,r){var n={Types:[],Cell:[],Value:[]},s=r||{},a=[],o=!1,l=2;return oo(e,function(c,u,d){switch(d){case 335:n.Types.push({name:c.name});break;case 51:c.forEach(function(f){l==1?n.Cell.push({type:n.Types[f[0]-1].name,index:f[1]}):l==0&&n.Value.push({type:n.Types[f[0]-1].name,index:f[1]})});break;case 337:l=c?1:0;break;case 338:l=2;break;case 35:a.push(d),o=!0;break;case 36:a.pop(),o=!1;break;default:if(!u.T){if(!o||s.WTF&&a[a.length-1]!=35)throw new Error("Unexpected record 0x"+d.toString(16))}}}),n}function uQ(){var e=ms();return we(e,332),we(e,334,Wa(1)),we(e,335,nQ({name:"XLDAPR",version:12e4,flags:3496657072})),we(e,336),we(e,339,iQ(1,"XLDAPR")),we(e,52),we(e,35,Wa(514)),we(e,4096,Wa(0)),we(e,4097,sa(1)),we(e,36),we(e,53),we(e,340),we(e,337,lQ(1)),we(e,51,aQ([[1,0]])),we(e,338),we(e,333),e.end()}function dQ(e,t,r){var n={Types:[],Cell:[],Value:[]};if(!e)return n;var s=!1,a=2,o;return e.replace(Gn,function(l){var c=ft(l);switch(Si(c[0])){case"<?xml":break;case"<metadata":case"</metadata>":break;case"<metadataTypes":case"</metadataTypes>":break;case"<metadataType":n.Types.push({name:c.name});break;case"</metadataType>":break;case"<futureMetadata":for(var u=0;u<n.Types.length;++u)n.Types[u].name==c.name&&(o=n.Types[u]);break;case"</futureMetadata>":break;case"<bk>":break;case"</bk>":break;case"<rc":a==1?n.Cell.push({type:n.Types[c.t-1].name,index:+c.v}):a==0&&n.Value.push({type:n.Types[c.t-1].name,index:+c.v});break;case"</rc>":break;case"<cellMetadata":a=1;break;case"</cellMetadata>":a=2;break;case"<valueMetadata":a=0;break;case"</valueMetadata>":a=2;break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":s=!0;break;case"</ext>":s=!1;break;case"<rvb":if(!o)break;o.offsets||(o.offsets=[]),o.offsets.push(+c.i);break;default:if(!s&&r.WTF)throw new Error("unrecognized "+c[0]+" in metadata")}return l}),n}function TR(){var e=[Gr];return e.push(`<metadata xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xlrd="http://schemas.microsoft.com/office/spreadsheetml/2017/richdata" xmlns:xda="http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray">
624  <metadataTypes count="1">
625    <metadataType name="XLDAPR" minSupportedVersion="120000" copy="1" pasteAll="1" pasteValues="1" merge="1" splitFirst="1" rowColShift="1" clearFormats="1" clearComments="1" assign="1" coerce="1" cellMeta="1"/>
626  </metadataTypes>
627  <futureMetadata name="XLDAPR" count="1">
628    <bk>
629      <extLst>
630        <ext uri="{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}">
631          <xda:dynamicArrayProperties fDynamic="1" fCollapsed="0"/>
632        </ext>
633      </extLst>
634    </bk>
635  </futureMetadata>
636  <cellMetadata count="1">
637    <bk>
638      <rc t="1" v="0"/>
639    </bk>
640  </cellMetadata>
641</metadata>`),e.join("")}function fQ(e){var t=[];if(!e)return t;var r=1;return(e.match(Gn)||[]).forEach(function(n){var s=ft(n);switch(s[0]){case"<?xml":break;case"<calcChain":case"<calcChain>":case"</calcChain>":break;case"<c":delete s[0],s.i?r=s.i:s.i=r,t.push(s);break}}),t}function hQ(e){var t={};t.i=e.read_shift(4);var r={};r.r=e.read_shift(4),r.c=e.read_shift(4),t.r=ut(r);var n=e.read_shift(1);return n&2&&(t.l="1"),n&8&&(t.a="1"),t}function mQ(e,t,r){var n=[];return oo(e,function(a,o,l){switch(l){case 63:n.push(a);break;default:if(!o.T)throw new Error("Unexpected record 0x"+l.toString(16))}}),n}function pQ(e,t,r,n){if(!e)return e;var s=n||{},a=!1;oo(e,function(l,c,u){switch(u){case 359:case 363:case 364:case 366:case 367:case 368:case 369:case 370:case 371:case 472:case 577:case 578:case 579:case 580:case 581:case 582:case 583:case 584:case 585:case 586:case 587:break;case 35:a=!0;break;case 36:a=!1;break;default:if(!c.T){if(!a||s.WTF)throw new Error("Unexpected record 0x"+u.toString(16))}}},s)}function xQ(e,t){if(!e)return"??";var r=(e.match(/<c:chart [^>]*r:id="([^"]*)"/)||["",""])[1];return t["!id"][r].Target}var wu=1024;function AR(e,t){for(var r=[21600,21600],n=["m0,0l0",r[1],r[0],r[1],r[0],"0xe"].join(","),s=[De("xml",null,{"xmlns:v":Rs.v,"xmlns:o":Rs.o,"xmlns:x":Rs.x,"xmlns:mv":Rs.mv}).replace(/\/>/,">"),De("o:shapelayout",De("o:idmap",null,{"v:ext":"edit",data:e}),{"v:ext":"edit"}),De("v:shapetype",[De("v:stroke",null,{joinstyle:"miter"}),De("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202","o:spt":202,coordsize:r.join(","),path:n})];wu<e*1e3;)wu+=1e3;return t.forEach(function(a){var o=jr(a[0]),l={color2:"#BEFF82",type:"gradient"};l.type=="gradient"&&(l.angle="-180");var c=l.type=="gradient"?De("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,u=De("v:fill",c,l),d={on:"t",obscured:"t"};++wu,s=s.concat(["<v:shape"+bh({id:"_x0000_s"+wu,type:"#_x0000_t202",style:"position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10"+(a[1].hidden?";visibility:hidden":""),fillcolor:"#ECFAD4",strokecolor:"#edeaa1"})+">",u,De("v:shadow",null,d),De("v:path",null,{"o:connecttype":"none"}),'<v:textbox><div style="text-align:left"></div></v:textbox>','<x:ClientData ObjectType="Note">',"<x:MoveWithCells/>","<x:SizeWithCells/>",En("x:Anchor",[o.c+1,0,o.r+1,0,o.c+3,20,o.r+5,20].join(",")),En("x:AutoFill","False"),En("x:Row",String(o.r)),En("x:Column",String(o.c)),a[1].hidden?"":"<x:Visible/>","</x:ClientData>","</v:shape>"])}),s.push("</xml>"),s.join("")}function Aj(e,t,r,n){var s=Array.isArray(e),a;t.forEach(function(o){var l=jr(o.ref);
vendor: 5,154 bytes, lines 641-649
641if(s?(e[l.r]||(e[l.r]=[]),a=e[l.r][l.c]):a=e[o.ref],!a){a={t:"z"},s?e[l.r][l.c]=a:e[o.ref]=a;var c=It(e["!ref"]||"BDWGO1000001:A1");c.s.r>l.r&&(c.s.r=l.r),c.e.r<l.r&&(c.e.r=l.r),c.s.c>l.c&&(c.s.c=l.c),c.e.c<l.c&&(c.e.c=l.c);var u=yt(c);u!==e["!ref"]&&(e["!ref"]=u)}a.c||(a.c=[]);var d={a:o.author,t:o.t,r:o.r,T:r};o.h&&(d.h=o.h);for(var f=a.c.length-1;f>=0;--f){if(!r&&a.c[f].T)return;r&&!a.c[f].T&&a.c.splice(f,1)}if(r&&n){for(f=0;f<n.length;++f)if(d.a==n[f].id){d.a=n[f].name||d.a;break}}a.c.push(d)})}function gQ(e,t){if(e.match(/<(?:\w+:)?comments *\/>/))return[];var r=[],n=[],s=e.match(/<(?:\w+:)?authors>([\s\S]*)<\/(?:\w+:)?authors>/);s&&s[1]&&s[1].split(/<\/\w*:?author>/).forEach(function(o){if(!(o===""||o.trim()==="")){var l=o.match(/<(?:\w+:)?author[^>]*>(.*)/);l&&r.push(l[1])}});var a=e.match(/<(?:\w+:)?commentList>([\s\S]*)<\/(?:\w+:)?commentList>/);return a&&a[1]&&a[1].split(/<\/\w*:?comment>/).forEach(function(o){if(!(o===""||o.trim()==="")){var l=o.match(/<(?:\w+:)?comment[^>]*>/);if(l){var c=ft(l[0]),u={author:c.authorId&&r[c.authorId]||"sheetjsghost",ref:c.ref,guid:c.guid},d=jr(c.ref);if(!(t.sheetRows&&t.sheetRows<=d.r)){var f=o.match(/<(?:\w+:)?text>([\s\S]*)<\/(?:\w+:)?text>/),h=!!f&&!!f[1]&&E_(f[1])||{r:"",t:"",h:""};u.r=h.r,h.r=="<t></t>"&&(h.t=h.h=""),u.t=(h.t||"").replace(/\r\n/g,`
642`).replace(/\r/g,`
643`),t.cellHTML&&(u.h=h.h),n.push(u)}}}}),n}function PR(e){var t=[Gr,De("comments",null,{xmlns:Ec[0]})],r=[];return t.push("<authors>"),e.forEach(function(n){n[1].forEach(function(s){var a=Jt(s.a);r.indexOf(a)==-1&&(r.push(a),t.push("<author>"+a+"</author>")),s.T&&s.ID&&r.indexOf("tc="+s.ID)==-1&&(r.push("tc="+s.ID),t.push("<author>tc="+s.ID+"</author>"))})}),r.length==0&&(r.push("SheetJ5"),t.push("<author>SheetJ5</author>")),t.push("</authors>"),t.push("<commentList>"),e.forEach(function(n){var s=0,a=[];if(n[1][0]&&n[1][0].T&&n[1][0].ID?s=r.indexOf("tc="+n[1][0].ID):n[1].forEach(function(c){c.a&&(s=r.indexOf(Jt(c.a))),a.push(c.t||"")}),t.push('<comment ref="'+n[0]+'" authorId="'+s+'"><text>'),a.length<=1)t.push(En("t",Jt(a[0]||"")));else{for(var o=`Comment:
644    `+a[0]+`
645`,l=1;l<a.length;++l)o+=`Reply:
646    `+a[l]+`
647`;t.push(En("t",Jt(o)))}t.push("</text></comment>")}),t.push("</commentList>"),t.length>2&&(t[t.length]="</comments>",t[1]=t[1].replace("/>",">")),t.join("")}function vQ(e,t){var r=[],n=!1,s={},a=0;return e.replace(Gn,function(l,c){var u=ft(l);switch(Si(u[0])){case"<?xml":break;case"<ThreadedComments":break;case"</ThreadedComments>":break;case"<threadedComment":s={author:u.personId,guid:u.id,ref:u.ref,T:1};break;case"</threadedComment>":s.t!=null&&r.push(s);break;case"<text>":case"<text":a=c+l.length;break;case"</text>":s.t=e.slice(a,c).replace(/\r\n/g,`
648`).replace(/\r/g,`
649`);break;case"<mentions":case"<mentions>":n=!0;break;case"</mentions>":n=!1;break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":n=!0;break;case"</ext>":n=!1;break;default:if(!n&&t.WTF)throw new Error("unrecognized "+u[0]+" in threaded comments")}return l}),r}function yQ(e,t,r){var n=[Gr,De("ThreadedComments",null,{xmlns:ln.TCMNT}).replace(/[\/]>/,">")];return e.forEach(function(s){var a="";(s[1]||[]).forEach(function(o,l){if(!o.T){delete o.ID;return}o.a&&t.indexOf(o.a)==-1&&t.push(o.a);var c={ref:s[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+r.tcid++).slice(-12)+"}"};l==0?a=c.id:c.parentId=a,o.ID=c.id,o.a&&(c.personId="{54EE7950-7262-4200-6969-"+("000000000000"+t.indexOf(o.a)).slice(-12)+"}"),n.push(De("threadedComment",En("text",o.t||""),c))})}),n.push("</ThreadedComments>"),n.join("")}function wQ(e,t){var r=[],n=!1;return e.replace(Gn,function(a){var o=ft(a);switch(Si(o[0])){case"<?xml":break;case"<personList":break;case"</personList>":break;case"<person":r.push({name:o.displayname,id:o.id});break;case"</person>":break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":n=!0;break;case"</ext>":n=!1;break;default:if(!n&&t.WTF)throw new Error("unrecognized "+o[0]+" in threaded comments")}return a}),r}function bQ(e){var t=[Gr,De("personList",null,{xmlns:ln.TCMNT,"xmlns:x":Ec[0]}).replace(/[\/]>/,">")];return e.forEach(function(r,n){t.push(De("person",null,{displayName:r,id:"{54EE7950-7262-4200-6969-"+("000000000000"+n).slice(-12)+"}",userId:r,providerId:"None"}))}),t.push("</personList>"),t.join("")}function _Q(e){var t={};t.iauthor=e.read_shift(4);var r=Pc(e);return t.rfx=r.s,t.ref=ut(r.s),e.l+=16,t}function NQ(e,t){return t==null&&(t=he(36)),t.write_shift(4,e[1].iauthor),Ad(e[0],t),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t}var SQ=Wn;function kQ(e){return vn(e.slice(0,54))}function jQ(e,t){var r=[],n=[],s={},a=!1;return oo(e,function(l,c,u){switch(u){case 632:n.push(l);break;case 635:s=l;break;case 637:s.t=l.t,s.h=l.h,s.r=l.r;break;case 636:if(s.author=n[s.iauthor],delete s.iauthor,t.sheetRows&&s.rfx&&t.sheetRows<=s.rfx.r)break;s.t||(s.t=""),delete s.rfx,r.push(s);break;case 3072:break;case 35:a=!0;break;case 36:a=!1;break;case 37:break;case 38:break;default:if(!c.T){if(!a||t.WTF)throw new Error("Unexpected record 0x"+u.toString(16))}}}),r}function EQ(e){var t=ms(),r=[];
649return we(t,628),we(t,630),e.forEach(function(n){n[1].forEach(function(s){r.indexOf(s.a)>-1||(r.push(s.a.slice(0,54)),we(t,632,kQ(s.a)))})}),we(t,631),we(t,633),e.forEach(function(n){n[1].forEach(function(s){s.iauthor=r.indexOf(s.a);var a={s:jr(n[0]),e:jr(n[0])};we(t,635,NQ([a,s])),s.t&&s.t.length>0&&we(t,637,YG(s)),we(t,636),delete s.iauthor})}),we(t,634),we(t,629),t.end()}var CQ="application/vnd.ms-office.vbaProject";function TQ(e){var t=tt.utils.cfb_new({root:"R"});return e.FullPaths.forEach(function(r,n){if(!(r.slice(-1)==="/"||!r.match(/_VBA_PROJECT_CUR/))){var s=r.replace(/^[^\/]*/,"R").replace(/\/_VBA_PROJECT_CUR\u0000*/,"");tt.utils.cfb_add(t,s,e.FileIndex[n].content)}}),tt.write(t)}function AQ(e,t){t.FullPaths.forEach(function(r,n){if(n!=0){var s=r.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");s.slice(-1)!=="/"&&tt.utils.cfb_add(e,s,t.FileIndex[n].content)}})}var RR=["xlsb","xlsm","xlam","biff8","xla"];function PQ(){return{"!type":"dialog"}}function RQ(){return{"!type":"dialog"}}function OQ(){return{"!type":"macro"}}function DQ(){return{"!type":"macro"}}var Ou=function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,t={r:0,c:0};function r(n,s,a,o){var l=!1,c=!1;a.length==0?c=!0:a.charAt(0)=="["&&(c=!0,a=a.slice(1,-1)),o.length==0?l=!0:o.charAt(0)=="["&&(l=!0,o=o.slice(1,-1));var u=a.length>0?parseInt(a,10)|0:0,d=o.length>0?parseInt(o,10)|0:0;return l?d+=t.c:--d,c?u+=t.r:--u,s+(l?"":"$")+kr(d)+(c?"":"$")+Vr(u)}return function(s,a){return t=a,s.replace(e,r)}}(),P_=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,R_=function(){return function(t,r){return t.replace(P_,function(n,s,a,o,l,c){var u=v_(o)-(a?0:r.c),d=g_(c)-(l?0:r.r),f=d==0?"":l?d+1:"["+d+"]",h=u==0?"":a?u+1:"["+u+"]";return s+"R"+f+"C"+h})}}();function OR(e,t){return e.replace(P_,function(r,n,s,a,o,l){return n+(s=="$"?s+a:kr(v_(a)+t.c))+(o=="$"?o+l:Vr(g_(l)+t.r))})}function IQ(e,t,r){var n=gs(t),s=n.s,a=jr(r),o={r:a.r-s.r,c:a.c-s.c};return OR(e,o)}function FQ(e){return e.length!=1}function Pj(e){return e.replace(/_xlfn\./g,"")}function Yr(e){e.l+=1}function ll(e,t){var r=e.read_shift(2);return[r&16383,r>>14&1,r>>15&1]}function DR(e,t,r){var n=2;if(r){if(r.biff>=2&&r.biff<=5)return IR(e);r.biff==12&&(n=4)}var s=e.read_shift(n),a=e.read_shift(n),o=ll(e),l=ll(e);return{s:{r:s,c:o[0],cRel:o[1],rRel:o[2]},e:{r:a,c:l[0],cRel:l[1],rRel:l[2]}}}function IR(e){var t=ll(e),r=ll(e),n=e.read_shift(1),s=e.read_shift(1);return{s:{r:t[0],c:n,cRel:t[1],rRel:t[2]},e:{r:r[0],c:s,cRel:r[1],rRel:r[2]}}}function MQ(e,t,r){if(r.biff<8)return IR(e);var n=e.read_shift(r.biff==12?4:2),s=e.read_shift(r.biff==12?4:2),a=ll(e),o=ll(e);return{s:{r:n,c:a[0],cRel:a[1],rRel:a[2]},e:{r:s,c:o[0],cRel:o[1],rRel:o[2]}}}function FR(e,t,r){if(r&&r.biff>=2&&r.biff<=5)return LQ(e);var n=e.read_shift(r&&r.biff==12?4:2),s=ll(e);return{r:n,c:s[0],cRel:s[1],rRel:s[2]}}function LQ(e){var t=ll(e),r=e.read_shift(1);return{r:t[0],c:r,cRel:t[1],rRel:t[2]}}function BQ(e){var t=e.read_shift(2),r=e.read_shift(2);return{r:t,c:r&255,fQuoted:!!(r&16384),cRel:r>>15,rRel:r>>15}}function $Q(e,t,r){var n=r&&r.biff?r.biff:8;if(n>=2&&n<=5)return UQ(e);var s=e.read_shift(n>=12?4:2),a=e.read_shift(2),o=(a&16384)>>14,l=(a&32768)>>15;if(a&=16383,l==1)for(;s>524287;)s-=1048576;if(o==1)for(;a>8191;)a=a-16384;return{r:s,c:a,cRel:o,rRel:l}}function UQ(e){var t=e.read_shift(2),r=e.read_shift(1),n=(t&32768)>>15,s=(t&16384)>>14;return t&=16383,n==1&&t>=8192&&(t=t-16384),s==1&&r>=128&&(r=r-256),{r:t,c:r,cRel:s,rRel:n}}function WQ(e,t,r){var n=(e[e.l++]&96)>>5,s=DR(e,r.biff>=2&&r.biff<=5?6:8,r);return[n,s]}function zQ(e,t,r){var n=(e[e.l++]&96)>>5,s=e.read_shift(2,"i"),a=8;if(r)switch(r.biff){case 5:e.l+=12,a=6;break;case 12:a=12;break}var o=DR(e,a,r);return[n,s,o]}function HQ(e,t,r){var n=(e[e.l++]&96)>>5;return e.l+=r&&r.biff>8?12:r.biff<8?6:8,[n]}function VQ(e,t,r){var n=(e[e.l++]&96)>>5,s=e.read_shift(2),a=8;if(r)switch(r.biff){case 5:e.l+=12,a=6;break;case 12:a=12;break}return e.l+=a,[n,s]}function GQ(e,t,r){var n=(e[e.l++]&96)>>5,s=MQ(e,t-1,r);return[n,s]}function qQ(e,t,r){var n=(e[e.l++]&96)>>5;return e.l+=r.biff==2?6:r.biff==12?14:7,[n]}function Rj(e){var t=e[e.l+1]&1,r=1;return e.l+=4,[t,r]}function KQ(e,t,r){e.l+=2;for(var n=e.read_shift(r&&r.biff==2?1:2),s=[],a=0;a<=n;++a)s.push(e.read_shift(r&&r.biff==2?1:2));return s}function YQ(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=2,[n,e.read_shift(r&&r.biff==2?1:2)]}function XQ(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=2,[n,e.read_shift(r&&r.biff==2?1:2)]}function QQ(e){var t=e[e.l+1]&255?1:0;return e.l+=2,[t,e.read_shift(2)]}function JQ(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=r&&r.biff==2?3:4,[n]}function MR(e){var t=e.read_shift(1),r=e.read_shift(1);return[t,r]}function ZQ(e){return e.read_shift(2),MR(e)}function eJ(e){return e.read_shift(2),MR(e)}function tJ(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var s=FR(e,0,r);return[n,s]}function rJ(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var s=$Q(e,0,r);return[n,s]}function nJ(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var s=e.read_shift(2);
649r&&r.biff==5&&(e.l+=12);var a=FR(e,0,r);return[n,s,a]}function sJ(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var s=e.read_shift(r&&r.biff<=3?1:2);return[oZ[s],$R[s],n]}function aJ(e,t,r){var n=e[e.l++],s=e.read_shift(1),a=r&&r.biff<=3?[n==88?-1:0,e.read_shift(1)]:iJ(e);return[s,(a[0]===0?$R:iZ)[a[1]]]}function iJ(e){return[e[e.l+1]>>7,e.read_shift(2)&32767]}function oJ(e,t,r){e.l+=r&&r.biff==2?3:4}function lJ(e,t,r){if(e.l++,r&&r.biff==12)return[e.read_shift(4,"i"),0];var n=e.read_shift(2),s=e.read_shift(r&&r.biff==2?1:2);return[n,s]}function cJ(e){return e.l++,lo[e.read_shift(1)]}function uJ(e){return e.l++,e.read_shift(2)}function dJ(e){return e.l++,e.read_shift(1)!==0}function fJ(e){return e.l++,Un(e)}function hJ(e,t,r){return e.l++,l0(e,t-1,r)}function mJ(e,t){var r=[e.read_shift(1)];if(t==12)switch(r[0]){case 2:r[0]=4;break;case 4:r[0]=16;break;case 0:r[0]=1;break;case 1:r[0]=2;break}switch(r[0]){case 4:r[1]=Br(e,1)?"TRUE":"FALSE",t!=12&&(e.l+=7);break;case 37:case 16:r[1]=lo[e[e.l]],e.l+=t==12?4:8;break;case 0:e.l+=8;break;case 1:r[1]=Un(e);break;case 2:r[1]=Rc(e,0,{biff:t>0&&t<8?2:t});break;default:throw new Error("Bad SerAr: "+r[0])}return r}function pJ(e,t,r){for(var n=e.read_shift(r.biff==12?4:2),s=[],a=0;a!=n;++a)s.push((r.biff==12?Pc:ng)(e));return s}function xJ(e,t,r){var n=0,s=0;r.biff==12?(n=e.read_shift(4),s=e.read_shift(4)):(s=1+e.read_shift(1),n=1+e.read_shift(2)),r.biff>=2&&r.biff<8&&(--n,--s==0&&(s=256));for(var a=0,o=[];a!=n&&(o[a]=[]);++a)for(var l=0;l!=s;++l)o[a][l]=mJ(e,r.biff);return o}function gJ(e,t,r){var n=e.read_shift(1)>>>5&3,s=!r||r.biff>=8?4:2,a=e.read_shift(s);switch(r.biff){case 2:e.l+=5;break;case 3:case 4:e.l+=8;break;case 5:e.l+=12;break}return[n,0,a]}function vJ(e,t,r){if(r.biff==5)return yJ(e);var n=e.read_shift(1)>>>5&3,s=e.read_shift(2),a=e.read_shift(4);return[n,s,a]}function yJ(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2,"i");e.l+=8;var n=e.read_shift(2);return e.l+=12,[t,r,n]}function wJ(e,t,r){var n=e.read_shift(1)>>>5&3;e.l+=r&&r.biff==2?3:4;var s=e.read_shift(r&&r.biff==2?1:2);return[n,s]}function bJ(e,t,r){var n=e.read_shift(1)>>>5&3,s=e.read_shift(r&&r.biff==2?1:2);return[n,s]}function _J(e,t,r){var n=e.read_shift(1)>>>5&3;return e.l+=4,r.biff<8&&e.l--,r.biff==12&&(e.l+=2),[n]}function NJ(e,t,r){var n=(e[e.l++]&96)>>5,s=e.read_shift(2),a=4;if(r)switch(r.biff){case 5:a=15;break;case 12:a=6;break}return e.l+=a,[n,s]}var SJ=Vn,kJ=Vn,jJ=Vn;function u0(e,t,r){return e.l+=2,[BQ(e)]}function O_(e){return e.l+=6,[]}var EJ=u0,CJ=O_,TJ=O_,AJ=u0;function LR(e){return e.l+=2,[Qr(e),e.read_shift(2)&1]}var PJ=u0,RJ=LR,OJ=O_,DJ=u0,IJ=u0,FJ=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];function MJ(e){e.l+=2;var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(4),s=e.read_shift(2),a=e.read_shift(2),o=FJ[r>>2&31];return{ixti:t,coltype:r&3,rt:o,idx:n,c:s,C:a}}function LJ(e){return e.l+=2,[e.read_shift(4)]}function BJ(e,t,r){return e.l+=5,e.l+=2,e.l+=r.biff==2?1:4,["PTGSHEET"]}function $J(e,t,r){return e.l+=r.biff==2?4:5,["PTGENDSHEET"]}function UJ(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2);return[t,r]}function WJ(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2);return[t,r]}function zJ(e){return e.l+=4,[0,0]}var Oj={1:{n:"PtgExp",f:lJ},2:{n:"PtgTbl",f:jJ},3:{n:"PtgAdd",f:Yr},4:{n:"PtgSub",f:Yr},5:{n:"PtgMul",f:Yr},6:{n:"PtgDiv",f:Yr},7:{n:"PtgPower",f:Yr},8:{n:"PtgConcat",f:Yr},9:{n:"PtgLt",f:Yr},10:{n:"PtgLe",f:Yr},11:{n:"PtgEq",f:Yr},12:{n:"PtgGe",f:Yr},13:{n:"PtgGt",f:Yr},14:{n:"PtgNe",f:Yr},15:{n:"PtgIsect",f:Yr},16:{n:"PtgUnion",f:Yr},17:{n:"PtgRange",f:Yr},18:{n:"PtgUplus",f:Yr},19:{n:"PtgUminus",f:Yr},20:{n:"PtgPercent",f:Yr},21:{n:"PtgParen",f:Yr},22:{n:"PtgMissArg",f:Yr},23:{n:"PtgStr",f:hJ},26:{n:"PtgSheet",f:BJ},27:{n:"PtgEndSheet",f:$J},28:{n:"PtgErr",f:cJ},29:{n:"PtgBool",f:dJ},30:{n:"PtgInt",f:uJ},31:{n:"PtgNum",f:fJ},32:{n:"PtgArray",f:qQ},33:{n:"PtgFunc",f:sJ},34:{n:"PtgFuncVar",f:aJ},35:{n:"PtgName",f:gJ},36:{n:"PtgRef",f:tJ},37:{n:"PtgArea",f:WQ},38:{n:"PtgMemArea",f:wJ},39:{n:"PtgMemErr",f:SJ},40:{n:"PtgMemNoMem",f:kJ},41:{n:"PtgMemFunc",f:bJ},42:{n:"PtgRefErr",f:_J},43:{n:"PtgAreaErr",f:HQ},44:{n:"PtgRefN",f:rJ},45:{n:"PtgAreaN",f:GQ},46:{n:"PtgMemAreaN",f:UJ},47:{n:"PtgMemNoMemN",f:WJ},57:{n:"PtgNameX",f:vJ},58:{n:"PtgRef3d",f:nJ}
vendor: 9,033 bytes, line 649
649,59:{n:"PtgArea3d",f:zQ},60:{n:"PtgRefErr3d",f:NJ},61:{n:"PtgAreaErr3d",f:VQ},255:{}},HJ={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},VJ={1:{n:"PtgElfLel",f:LR},2:{n:"PtgElfRw",f:DJ},3:{n:"PtgElfCol",f:EJ},6:{n:"PtgElfRwV",f:IJ},7:{n:"PtgElfColV",f:AJ},10:{n:"PtgElfRadical",f:PJ},11:{n:"PtgElfRadicalS",f:OJ},13:{n:"PtgElfColS",f:CJ},15:{n:"PtgElfColSV",f:TJ},16:{n:"PtgElfRadicalLel",f:RJ},25:{n:"PtgList",f:MJ},29:{n:"PtgSxName",f:LJ},255:{}},GJ={0:{n:"PtgAttrNoop",f:zJ},1:{n:"PtgAttrSemi",f:JQ},2:{n:"PtgAttrIf",f:XQ},4:{n:"PtgAttrChoose",f:KQ},8:{n:"PtgAttrGoto",f:YQ},16:{n:"PtgAttrSum",f:oJ},32:{n:"PtgAttrBaxcel",f:Rj},33:{n:"PtgAttrBaxcel",f:Rj},64:{n:"PtgAttrSpace",f:ZQ},65:{n:"PtgAttrSpaceSemi",f:eJ},128:{n:"PtgAttrIfError",f:QQ},255:{}};function d0(e,t,r,n){if(n.biff<8)return Vn(e,t);for(var s=e.l+t,a=[],o=0;o!==r.length;++o)switch(r[o][0]){case"PtgArray":r[o][1]=xJ(e,0,n),a.push(r[o][1]);break;case"PtgMemArea":r[o][2]=pJ(e,r[o][1],n),a.push(r[o][2]);break;case"PtgExp":n&&n.biff==12&&(r[o][1][1]=e.read_shift(4),a.push(r[o][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+r[o][0]}return t=s-e.l,t!==0&&a.push(Vn(e,t)),a}function f0(e,t,r){for(var n=e.l+t,s,a,o=[];n!=e.l;)t=n-e.l,a=e[e.l],s=Oj[a]||Oj[HJ[a]],(a===24||a===25)&&(s=(a===24?VJ:GJ)[e[e.l+1]]),!s||!s.f?Vn(e,t):o.push([s.n,s.f(e,t,r)]);return o}function qJ(e){for(var t=[],r=0;r<e.length;++r){for(var n=e[r],s=[],a=0;a<n.length;++a){var o=n[a];if(o)switch(o[0]){case 2:s.push('"'+o[1].replace(/"/g,'""')+'"');break;default:s.push(o[1])}else s.push("")}t.push(s.join(","))}return t.join(";")}var KJ={PtgAdd:"+",PtgConcat:"&",PtgDiv:"/",PtgEq:"=",PtgGe:">=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function YJ(e,t){if(!e&&!(t&&t.biff<=5&&t.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(e)?"'"+e+"'":e}function BR(e,t,r){if(!e)return"SH33TJSERR0";if(r.biff>8&&(!e.XTI||!e.XTI[t]))return e.SheetNames[t];if(!e.XTI)return"SH33TJSERR6";var n=e.XTI[t];if(r.biff<8)return t>1e4&&(t-=65536),t<0&&(t=-t),t==0?"":e.XTI[t-1];if(!n)return"SH33TJSERR1";var s="";if(r.biff>8)switch(e[n[0]][0]){case 357:return s=n[1]==-1?"#REF":e.SheetNames[n[1]],n[1]==n[2]?s:s+":"+e.SheetNames[n[2]];case 358:return r.SID!=null?e.SheetNames[r.SID]:"SH33TJSSAME"+e[n[0]][0];case 355:default:return"SH33TJSSRC"+e[n[0]][0]}switch(e[n[0]][0][0]){case 1025:return s=n[1]==-1?"#REF":e.SheetNames[n[1]]||"SH33TJSERR3",n[1]==n[2]?s:s+":"+e.SheetNames[n[2]];case 14849:return e[n[0]].slice(1).map(function(a){return a.Name}).join(";;");default:return e[n[0]][0][3]?(s=n[1]==-1?"#REF":e[n[0]][0][3][n[1]]||"SH33TJSERR4",n[1]==n[2]?s:s+":"+e[n[0]][0][3][n[2]]):"SH33TJSERR2"}}function Dj(e,t,r){var n=BR(e,t,r);return n=="#REF"?n:YJ(n,r)}function Ln(e,t,r,n,s){var a=s&&s.biff||8,o={s:{c:0,r:0},e:{c:0,r:0}},l=[],c,u,d,f=0,h=0,m,g="";if(!e[0]||!e[0][0])return"";for(var p=-1,x="",b=0,w=e[0].length;b<w;++b){var y=e[0][b];switch(y[0]){case"PtgUminus":l.push("-"+l.pop());break;case"PtgUplus":l.push("+"+l.pop());break;case"PtgPercent":l.push(l.pop()+"%");break;case"PtgAdd":case"PtgConcat":case"PtgDiv":case"PtgEq":case"PtgGe":case"PtgGt":case"PtgLe":case"PtgLt":case"PtgMul":case"PtgNe":case"PtgPower":case"PtgSub":if(c=l.pop(),u=l.pop(),p>=0){switch(e[0][p][1][0]){case 0:x=Ir(" ",e[0][p][1][1]);break;case 1:x=Ir("\r",e[0][p][1][1]);break;default:if(x="",s.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][p][1][0])}u=u+x,p=-1}l.push(u+KJ[y[0]]+c);break;case"PtgIsect":c=l.pop(),u=l.pop(),l.push(u+" "+c);break;case"PtgUnion":c=l.pop(),u=l.pop(),l.push(u+","+c);break;case"PtgRange":c=l.pop(),u=l.pop(),l.push(u+":"+c);break;case"PtgAttrChoose":break;case"PtgAttrGoto":break;case"PtgAttrIf":break;case"PtgAttrIfError":break;case"PtgRef":d=Ef(y[1][1],o,s),l.push(Cf(d,a));break;case"PtgRefN":d=r?Ef(y[1][1],r,s):y[1][1],l.push(Cf(d,a));break;case"PtgRef3d":f=y[1][1],d=Ef(y[1][2],o,s),g=Dj(n,f,s),l.push(g+"!"+Cf(d,a));break;case"PtgFunc":case"PtgFuncVar":var _=y[1][0],N=y[1][1];_||(_=0),_&=127;var k=_==0?[]:l.slice(-_);l.length-=_,N==="User"&&(N=k.shift()),l.push(N+"("+k.join(",")+")");break;case"PtgBool":l.push(y[1]?"TRUE":"FALSE");break;case"PtgInt":l.push(y[1]);break;case"PtgNum":l.push(String(y[1]));break;case"PtgStr":l.push('"'+y[1].replace(/"/g,'""')+'"');break;case"PtgErr":l.push(y[1]);break;case"PtgAreaN":m=cj(y[1][1],r?{s:r}:o,s),l.push(Fv(m,s));break;case"PtgArea":m=cj(y[1][1],o,s),l.push(Fv(m,s));break;case"PtgArea3d":f=y[1][1],m=y[1][2],g=Dj(n,f,s),l.push(g+"!"+Fv(m,s));break;case"PtgAttrSum":l.push("SUM("+l.pop()+")");break;case"PtgAttrBaxcel":case"PtgAttrSemi":break;case"PtgName":h=y[1][2];var S=(n.names||[])[h-1]||(n[0]||[])[h],E=S?S.Name:"SH33TJSNAME"+String(h);E&&E.slice(0,6)=="_xlfn."&&!s.xlfn&&(E=E.slice(6)),l.push(E);break;case"PtgNameX":var j=y[1][1];h=y[1][2];var T;if(s.biff<=5)j<0&&(j=-j),n[j]&&(T=n[j][h]);else{var R="";if(((n[j]||[])[0]||[])[0]==14849||(((n[j]||[])[0]||[])[0]==1025?n[j][h]&&n[j][h].itab>0&&(R=n.SheetNames[n[j][h].itab-1]+"!"):R=n.SheetNames[h-1]+"!"),n[j]&&n[j][h])R+=n[j][h].Name;else if(n[0]&&n[0][h])R+=n[0][h].Name;else{var P=(BR(n,j,s)||"").split(";;");P[h-1]?R=P[h-1]:R+="SH33TJSERRX"}l.push(R);break}T||(T={Name:"SH33TJSERRY"}),l.push(T.Name);break;case"PtgParen":var D="(",U=")";if(p>=0){switch(x="",e[0][p][1][0]){case 2:D=Ir(" ",e[0][p][1][1])+D;break;case 3:D=Ir("\r",e[0][p][1][1])+D;break;case 4:U=Ir(" ",e[0][p][1][1])+U;break;case 5:U=Ir("\r",e[0][p][1][1])+U;break;default:if(s.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][p][1][0])}p=-1}l.push(D+l.pop()+U);break;case"PtgRefErr":l.push("#REF!");break;case"PtgRefErr3d":l.push("#REF!");break;case"PtgExp":d={c:y[1][1],r:y[1][0]};var Q={c:r.c,r:r.r};if(n.sharedf[ut(d)]){var Y=n.sharedf[ut(d)];l.push(Ln(Y,o,Q,n,s))}else{var V=!1;for(c=0;c!=n.arrayf.length;++c)if(u=n.arrayf[c],!(d.c<u[0].s.c||d.c>u[0].e.c)&&!(d.r<u[0].s.r||d.r>u[0].e.r)){l.push(Ln(u[1],o,Q,n,s)),V=!0;break}V||l.push(y[1])}break;case"PtgArray":l.push("{"+qJ(y[1])+"}");break;case"PtgMemArea":break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":p=b;break;case"PtgTbl":break;case"PtgMemErr":break;case"PtgMissArg":l.push("");break;case"PtgAreaErr":l.push("#REF!");break;case"PtgAreaErr3d":l.push("#REF!");break;case"PtgList":l.push("Table"+y[1].idx+"[#"+y[1].rt+"]");break;case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":break;case"PtgMemFunc":break;case"PtgMemNoMem":break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");case"PtgSxName":throw new Error("Unrecognized Formula Token: "+String(y));default:throw new Error("Unrecognized Formula Token: "+String(y))}var F=["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"];if(s.biff!=3&&p>=0&&F.indexOf(e[0][b][0])==-1){y=e[0][p];var C=!0;switch(y[1][0]){case 4:C=!1;case 0:x=Ir(" ",y[1][1]);break;case 5:C=!1;case 1:x=Ir("\r",y[1][1]);break;default:if(x="",s.WTF)throw new Error("Unexpected PtgAttrSpaceType "+y[1][0])}l.push((C?x:"")+l.pop()+(C?"":x)),p=-1}}if(l.length>1&&s.WTF)throw new Error("bad formula stack");return l[0]}function XJ(e,t,r){var n=e.l+t,s=r.biff==2?1:2,a,o=e.read_shift(s);if(o==65535)return[[],Vn(e,t-2)];var l=f0(e,o,r);return t!==o+s&&(a=d0(e,t-o-s,l,r)),e.l=n,[l,a]}function QJ(e,t,r){var n=e.l+t,s=r.biff==2?1:2,a,o=e.read_shift(s);if(o==65535)return[[],Vn(e,t-2)];var l=f0(e,o,r);return t!==o+s&&(a=d0(e,t-o-s,l,r)),e.l=n,[l,a]}function JJ(e,t,r,n){var s=e.l+t,a=f0(e,n,r),o;return s!==e.l&&(o=d0(e,s-e.l,a,r)),[a,o]}function ZJ(e,t,r){var n=e.l+t,s,a=e.read_shift(2),o=f0(e,a,r);return a==65535?[[],Vn(e,t-2)]:(t!==a+2&&(s=d0(e,n-a-2,o,r)),[o,s])}function eZ(e){var t;if($i(e,e.l+6)!==65535)return[Un(e),"n"];switch(e[e.l]){case 0:return e.l+=8,["String","s"];case 1:return t=e[e.l+2]===1,e.l+=8,[t,"b"];case 2:return t=e[e.l+2],e.l+=8,[t,"e"];case 3:return e.l+=8,["","s"]}return[]}function tZ(e){if(e==null){var t=he(8);return t.write_shift(1,3),t.write_shift(1,0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,65535),t}else if(typeof e=="number")return xc(e);return xc(0)}function Uv(e,t,r){var n=e.l+t,s=ki(e);r.biff==2&&++e.l;var a=eZ(e),o=e.read_shift(1);r.biff!=2&&(e.read_shift(1),r.biff>=5&&e.read_shift(4));var l=QJ(e,n-e.l,r);return{cell:s,val:a[0],formula:l,shared:o>>3&1,tt:a[1]}}function rZ(e,t,r,n,s){var a=vc(t,r,s),o=tZ(e.v),l=he(6),c=33;l.write_shift(2,c),l.write_shift(4,0);for(var u=he(e.bf.length),d=0;d<e.bf.length;++d)u[d]=e.bf[d];var f=gn([a,o,l,u]);return f}function sg(e,t,r){var n=e.read_shift(4),s=f0(e,n,r),a=e.read_shift(4),o=a>0?d0(e,a,s,r):null;return[s,o]}var nZ=sg,ag=sg,sZ=sg,aZ=sg,iZ
vendor: 7,369 bytes, line 649
649={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"}
649,$R={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284
vendor: 10,211 bytes, line 649
649:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},oZ={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function Ij(e){return e.slice(0,3)=="of:"&&(e=e.slice(3)),e.charCodeAt(0)==61&&(e=e.slice(1),e.charCodeAt(0)==61&&(e=e.slice(1))),e=e.replace(/COM\.MICROSOFT\./g,""),e=e.replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g,function(t,r){return r.replace(/\./g,"")}),e=e.replace(/\[.(#[A-Z]*[?!])\]/g,"$1"),e.replace(/[;~]/g,",").replace(/\|/g,";")}function lZ(e){var t="of:="+e.replace(P_,"$1[.$2$3$4$5]").replace(/\]:\[/g,":");return t.replace(/;/g,"|").replace(/,/g,";")}function Wv(e){var t=e.split(":"),r=t[0].split(".")[0];return[r,t[0].split(".")[1]+(t.length>1?":"+(t[1].split(".")[1]||t[1].split(".")[0]):"")]}function cZ(e){return e.replace(/\./,"!")}var Af={},Du={},Pf=typeof Map<"u";function D_(e,t,r){var n=0,s=e.length;if(r){if(Pf?r.has(t):Object.prototype.hasOwnProperty.call(r,t)){for(var a=Pf?r.get(t):r[t];n<a.length;++n)if(e[a[n]].t===t)return e.Count++,a[n]}}else for(;n<s;++n)if(e[n].t===t)return e.Count++,n;return e[s]={t},e.Count++,e.Unique++,r&&(Pf?(r.has(t)||r.set(t,[]),r.get(t).push(s)):(Object.prototype.hasOwnProperty.call(r,t)||(r[t]=[]),r[t].push(s))),s}function ig(e,t){var r={min:e+1,max:e+1},n=-1;return t.MDW&&($n=t.MDW),t.width!=null?r.customWidth=1:t.wpx!=null?n=jh(t.wpx):t.wch!=null&&(n=t.wch),n>-1?(r.width=Hp(n),r.customWidth=1):t.width!=null&&(r.width=t.width),t.hidden&&(r.hidden=!0),t.level!=null&&(r.outlineLevel=r.level=t.level),r}function ac(e,t){if(e){var r=[.7,.7,.75,.75,.3,.3];t=="xlml"&&(r=[1,1,1,1,.5,.5]),e.left==null&&(e.left=r[0]),e.right==null&&(e.right=r[1]),e.top==null&&(e.top=r[2]),e.bottom==null&&(e.bottom=r[3]),e.header==null&&(e.header=r[4]),e.footer==null&&(e.footer=r[5])}}function wl(e,t,r){var n=r.revssf[t.z!=null?t.z:"General"],s=60,a=e.length;if(n==null&&r.ssf){for(;s<392;++s)if(r.ssf[s]==null){Hi(t.z,s),r.ssf[s]=t.z,r.revssf[t.z]=n=s;break}}for(s=0;s!=a;++s)if(e[s].numFmtId===n)return s;return e[a]={numFmtId:n,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1},a}function UR(e,t,r,n,s,a){try{n.cellNF&&(e.z=it[t])}catch(l){if(n.WTF)throw l}if(!(e.t==="z"&&!n.cellStyles)){if(e.t==="d"&&typeof e.v=="string"&&(e.v=pr(e.v)),(!n||n.cellText!==!1)&&e.t!=="z")try{if(it[t]==null&&Hi(iG[t]||"General",t),e.t==="e")e.w=e.w||lo[e.v];else if(t===0)if(e.t==="n")(e.v|0)===e.v?e.w=e.v.toString(10):e.w=yh(e.v);else if(e.t==="d"){var o=dn(e.v);(o|0)===o?e.w=o.toString(10):e.w=yh(o)}else{if(e.v===void 0)return"";e.w=mc(e.v,Du)}else e.t==="d"?e.w=xa(t,dn(e.v),Du):e.w=xa(t,e.v,Du)}catch(l){if(n.WTF)throw l}if(n.cellStyles&&r!=null)try{e.s=a.Fills[r],e.s.fgColor&&e.s.fgColor.theme&&!e.s.fgColor.rgb&&(e.s.fgColor.rgb=zp(s.themeElements.clrScheme[e.s.fgColor.theme].rgb,e.s.fgColor.tint||0),n.WTF&&(e.s.fgColor.raw_rgb=s.themeElements.clrScheme[e.s.fgColor.theme].rgb)),e.s.bgColor&&e.s.bgColor.theme&&(e.s.bgColor.rgb=zp(s.themeElements.clrScheme[e.s.bgColor.theme].rgb,e.s.bgColor.tint||0),n.WTF&&(e.s.bgColor.raw_rgb=s.themeElements.clrScheme[e.s.bgColor.theme].rgb))}catch(l){if(n.WTF&&a.Fills)throw l}}}function uZ(e,t,r){if(e&&e["!ref"]){var n=It(e["!ref"]);if(n.e.c<n.s.c||n.e.r<n.s.r)throw new Error("Bad range ("+r+"): "+e["!ref"])}}function dZ(e,t){var r=It(t);r.s.r<=r.e.r&&r.s.c<=r.e.c&&r.s.r>=0&&r.s.c>=0&&(e["!ref"]=yt(r))}var fZ=/<(?:\w:)?mergeCell ref="[A-Z0-9:]+"\s*[\/]?>/g,hZ=/<(?:\w+:)?sheetData[^>]*>([\s\S]*)<\/(?:\w+:)?sheetData>/,mZ=/<(?:\w:)?hyperlink [^>]*>/mg,pZ=/"(\w*:\w*)"/,xZ=/<(?:\w:)?col\b[^>]*[\/]?>/g,gZ=/<(?:\w:)?autoFilter[^>]*([\/]|>([\s\S]*)<\/(?:\w:)?autoFilter)>/g,vZ=/<(?:\w:)?pageMargins[^>]*\/>/g,WR=/<(?:\w:)?sheetPr\b(?:[^>a-z][^>]*)?\/>/,yZ=/<(?:\w:)?sheetPr[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetPr)>/,wZ=/<(?:\w:)?sheetViews[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetViews)>/;function bZ(e,t,r,n,s,a,o){if(!e)return e;n||(n={"!id":{}});var l=t.dense?[]:{},c={s:{r:2e6,c:2e6},e:{r:0,c:0}},u="",d="",f=e.match(hZ);f?(u=e.slice(0,f.index),d=e.slice(f.index+f[0].length)):u=d=e;var h=u.match(WR);h?I_(h[0],l,s,r):(h=u.match(yZ))&&NZ(h[0],h[1]||"",l,s,r);var m=(u.match(/<(?:\w*:)?dimension/)||{index:-1}).index;if(m>0){var g=u.slice(m,m+50).match(pZ);g&&dZ(l,g[1])}var p=u.match(wZ);p&&p[1]&&FZ(p[1],s);var x=[];if(t.cellStyles){var b=u.match(xZ);b&&PZ(x,b)}f&&BZ(f[1],l,t,c,a,o);var w=d.match(gZ);w&&(l["!autofilter"]=OZ(w[0]));var y=[],_=d.match(fZ);if(_)for(m=0;m!=_.length;++m)y[m]=It(_[m].slice(_[m].indexOf('"')+1));var N=d.match(mZ);N&&CZ(l,N,n);var k=d.match(vZ);if(k&&(l["!margins"]=TZ(ft(k[0]))),!l["!ref"]&&c.e.c>=c.s.c&&c.e.r>=c.s.r&&(l["!ref"]=yt(c)),t.sheetRows>0&&l["!ref"]){var S=It(l["!ref"]);t.sheetRows<=+S.e.r&&(S.e.r=t.sheetRows-1,S.e.r>c.e.r&&(S.e.r=c.e.r),S.e.r<S.s.r&&(S.s.r=S.e.r),S.e.c>c.e.c&&(S.e.c=c.e.c),S.e.c<S.s.c&&(S.s.c=S.e.c),l["!fullref"]=l["!ref"],l["!ref"]=yt(S))}return x.length>0&&(l["!cols"]=x),y.length>0&&(l["!merges"]=y),l}function _Z(e){if(e.length===0)return"";for(var t='<mergeCells count="'+e.length+'">',r=0;r!=e.length;++r)t+='<mergeCell ref="'+yt(e[r])+'"/>';return t+"</mergeCells>"}function I_(e,t,r,n){var s=ft(e);r.Sheets[n]||(r.Sheets[n]={}),s.codeName&&(r.Sheets[n].CodeName=Dt(tr(s.codeName)))}function NZ(e,t,r,n,s){I_(e.slice(0,e.indexOf(">")),r,n,s)}function SZ(e,t,r,n,s){var a=!1,o={},l=null;if(n.bookType!=="xlsx"&&t.vbaraw){var c=t.SheetNames[r];try{t.Workbook&&(c=t.Workbook.Sheets[r].CodeName||c)}catch{}a=!0,o.codeName=hi(Jt(c))}if(e&&e["!outline"]){var u={summaryBelow:1,summaryRight:1};e["!outline"].above&&(u.summaryBelow=0),e["!outline"].left&&(u.summaryRight=0),l=(l||"")+De("outlinePr",null,u)}!a&&!l||(s[s.length]=De("sheetPr",l,o))}var kZ=["objects","scenarios","selectLockedCells","selectUnlockedCells"],jZ=["formatColumns","formatRows","formatCells","insertColumns","insertRows","insertHyperlinks","deleteColumns","deleteRows","sort","autoFilter","pivotTables"];function EZ(e){var t={sheet:1};
vendor: 9,781 bytes, lines 649-650
649return kZ.forEach(function(r){e[r]!=null&&e[r]&&(t[r]="1")}),jZ.forEach(function(r){e[r]!=null&&!e[r]&&(t[r]="0")}),e.password&&(t.password=C_(e.password).toString(16).toUpperCase()),De("sheetProtection",null,t)}function CZ(e,t,r){for(var n=Array.isArray(e),s=0;s!=t.length;++s){var a=ft(tr(t[s]),!0);if(!a.ref)return;var o=((r||{})["!id"]||[])[a.id];o?(a.Target=o.Target,a.location&&(a.Target+="#"+Dt(a.location))):(a.Target="#"+Dt(a.location),o={Target:a.Target,TargetMode:"Internal"}),a.Rel=o,a.tooltip&&(a.Tooltip=a.tooltip,delete a.tooltip);for(var l=It(a.ref),c=l.s.r;c<=l.e.r;++c)for(var u=l.s.c;u<=l.e.c;++u){var d=ut({c:u,r:c});n?(e[c]||(e[c]=[]),e[c][u]||(e[c][u]={t:"z",v:void 0}),e[c][u].l=a):(e[d]||(e[d]={t:"z",v:void 0}),e[d].l=a)}}}function TZ(e){var t={};return["left","right","top","bottom","header","footer"].forEach(function(r){e[r]&&(t[r]=parseFloat(e[r]))}),t}function AZ(e){return ac(e),De("pageMargins",null,e)}function PZ(e,t){for(var r=!1,n=0;n!=t.length;++n){var s=ft(t[n],!0);s.hidden&&(s.hidden=hr(s.hidden));var a=parseInt(s.min,10)-1,o=parseInt(s.max,10)-1;for(s.outlineLevel&&(s.level=+s.outlineLevel||0),delete s.min,delete s.max,s.width=+s.width,!r&&s.width&&(r=!0,T_(s.width)),ol(s);a<=o;)e[a++]=xr(s)}}function RZ(e,t){for(var r=["<cols>"],n,s=0;s!=t.length;++s)(n=t[s])&&(r[r.length]=De("col",null,ig(s,n)));return r[r.length]="</cols>",r.join("")}function OZ(e){var t={ref:(e.match(/ref="([^"]*)"/)||[])[1]};return t}function DZ(e,t,r,n){var s=typeof e.ref=="string"?e.ref:yt(e.ref);r.Workbook||(r.Workbook={Sheets:[]}),r.Workbook.Names||(r.Workbook.Names=[]);var a=r.Workbook.Names,o=gs(s);o.s.r==o.e.r&&(o.e.r=gs(t["!ref"]).e.r,s=yt(o));for(var l=0;l<a.length;++l){var c=a[l];if(c.Name=="_xlnm._FilterDatabase"&&c.Sheet==n){c.Ref="'"+r.SheetNames[n]+"'!"+s;break}}return l==a.length&&a.push({Name:"_xlnm._FilterDatabase",Sheet:n,Ref:"'"+r.SheetNames[n]+"'!"+s}),De("autoFilter",null,{ref:s})}var IZ=/<(?:\w:)?sheetView(?:[^>a-z][^>]*)?\/?>/;function FZ(e,t){t.Views||(t.Views=[{}]),(e.match(IZ)||[]).forEach(function(r,n){var s=ft(r);t.Views[n]||(t.Views[n]={}),+s.zoomScale&&(t.Views[n].zoom=+s.zoomScale),hr(s.rightToLeft)&&(t.Views[n].RTL=!0)})}function MZ(e,t,r,n){var s={workbookViewId:"0"};return(((n||{}).Workbook||{}).Views||[])[0]&&(s.rightToLeft=n.Workbook.Views[0].RTL?"1":"0"),De("sheetViews",De("sheetView",null,s),{})}function LZ(e,t,r,n){if(e.c&&r["!comments"].push([t,e.c]),e.v===void 0&&typeof e.f!="string"||e.t==="z"&&!e.f)return"";var s="",a=e.t,o=e.v;if(e.t!=="z")switch(e.t){case"b":s=e.v?"1":"0";break;case"n":s=""+e.v;break;case"e":s=lo[e.v];break;case"d":n&&n.cellDates?s=pr(e.v,-1).toISOString():(e=xr(e),e.t="n",s=""+(e.v=dn(pr(e.v)))),typeof e.z>"u"&&(e.z=it[14]);break;default:s=e.v;break}var l=En("v",Jt(s)),c={r:t},u=wl(n.cellXfs,e,n);switch(u!==0&&(c.s=u),e.t){case"n":break;case"d":c.t="d";break;case"b":c.t="b";break;case"e":c.t="e";break;case"z":break;default:if(e.v==null){delete e.t;break}if(e.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(n&&n.bookSST){l=En("v",""+D_(n.Strings,e.v,n.revStrings)),c.t="s";break}c.t="str";break}if(e.t!=a&&(e.t=a,e.v=o),typeof e.f=="string"&&e.f){var d=e.F&&e.F.slice(0,t.length)==t?{t:"array",ref:e.F}:null;l=De("f",Jt(e.f),d)+(e.v!=null?l:"")}return e.l&&r["!links"].push([t,e.l]),e.D&&(c.cm=1),De("c",l,c)}var BZ=function(){var e=/<(?:\w+:)?c[ \/>]/,t=/<\/(?:\w+:)?row>/,r=/r=["']([^"']*)["']/,n=/<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/,s=/ref=["']([^"']*)["']/,a=wh("v"),o=wh("f");return function(c,u,d,f,h,m){for(var g=0,p="",x=[],b=[],w=0,y=0,_=0,N="",k,S,E=0,j=0,T,R,P=0,D=0,U=Array.isArray(m.CellXf),Q,Y=[],V=[],F=Array.isArray(u),C=[],X={},se=!1,A=!!d.sheetStubs,M=c.split(t),I=0,z=M.length;I!=z;++I){p=M[I].trim();var J=p.length;if(J!==0){var Z=0;e:for(g=0;g<J;++g)switch(p[g]){case">":if(p[g-1]!="/"){++g;break e}if(d&&d.cellStyles){if(S=ft(p.slice(Z,g),!0),E=S.r!=null?parseInt(S.r,10):E+1,j=-1,d.sheetRows&&d.sheetRows<E)continue;X={},se=!1,S.ht&&(se=!0,X.hpt=parseFloat(S.ht),X.hpx=ud(X.hpt)),S.hidden=="1"&&(se=!0,X.hidden=!0),S.outlineLevel!=null&&(se=!0,X.level=+S.outlineLevel),se&&(C[E-1]=X)}break;case"<":Z=g;break}if(Z>=g)break;if(S=ft(p.slice(Z,g),!0),E=S.r!=null?parseInt(S.r,10):E+1,j=-1,!(d.sheetRows&&d.sheetRows<E)){f.s.r>E-1&&(f.s.r=E-1),f.e.r<E-1&&(f.e.r=E-1),d&&d.cellStyles&&(X={},se=!1,S.ht&&(se=!0,X.hpt=parseFloat(S.ht),X.hpx=ud(X.hpt)),S.hidden=="1"&&(se=!0,X.hidden=!0),S.outlineLevel!=null&&(se=!0,X.level=+S.outlineLevel),se&&(C[E-1]=X)),x=p.slice(g).split(e);for(var re=0;re!=x.length&&x[re].trim().charAt(0)=="<";++re);for(x=x.slice(re),g=0;g!=x.length;++g)if(p=x[g].trim(),p.length!==0){if(b=p.match(r),w=g,y=0,_=0,p="<c "+(p.slice(0,1)=="<"?">":"")+p,b!=null&&b.length===2){for(w=0,N=b[1],y=0;y!=N.length&&!((_=N.charCodeAt(y)-64)<1||_>26);++y)w=26*w+_;--w,j=w}else++j;for(y=0;y!=p.length&&p.charCodeAt(y)!==62;++y);if(++y,S=ft(p.slice(0,y),!0),S.r||(S.r=ut({r:E-1,c:j})),N=p.slice(y),k={t:""},(b=N.match(a))!=null&&b[1]!==""&&(k.v=Dt(b[1])),d.cellFormula){if((b=N.match(o))!=null&&b[1]!==""){if(k.f=Dt(tr(b[1])).replace(/\r\n/g,`
650`),d.xlfn||(k.f=Pj(k.f)),b[0].indexOf('t="array"')>-1)k.F=(N.match(s)||[])[1],k.F.indexOf(":")>-1&&Y.push([It(k.F),k.F]);else if(b[0].indexOf('t="shared"')>-1){R=ft(b[0]);var ae=Dt(tr(b[1]));d.xlfn||(ae=Pj(ae)),V[parseInt(R.si,10)]=[R,ae,S.r]}}else(b=N.match(/<f[^>]*\/>/))&&(R=ft(b[0]),V[R.si]&&(k.f=IQ(V[R.si][1],V[R.si][2],S.r)));var ne=jr(S.r);for(y=0;y<Y.length;++y)ne.r>=Y[y][0].s.r&&ne.r<=Y[y][0].e.r&&ne.c>=Y[y][0].s.c&&ne.c<=Y[y][0].e.c&&(k.F=Y[y][1])}if(S.t==null&&k.v===void 0)if(k.f||k.F)k.v=0,k.t="n";else if(A)k.t="z";else continue;else k.t=S.t||"n";switch(f.s.c>j&&(f.s.c=j),f.e.c<j&&(f.e.c=j),k.t){case"n":if(k.v==""||k.v==null){if(!A)continue;k.t="z"}else k.v=parseFloat(k.v);break;case"s":if(typeof k.v>"u"){if(!A)continue;k.t="z"}else T=Af[parseInt(k.v,10)],k.v=T.t,k.r=T.r,d.cellHTML&&(k.h=T.h);break;case"str":k.t="s",k.v=k.v!=null?tr(k.v):"",d.cellHTML&&(k.h=h_(k.v));break;case"inlineStr":b=N.match(n),k.t="s",b!=null&&(T=E_(b[1]))?(k.v=T.t,d.cellHTML&&(k.h=T.h)):k.v="";break;case"b":k.v=hr(k.v);break;case"d":d.cellDates?k.v=pr(k.v,1):(k.v=dn(pr(k.v,1)),k.t="n");break;case"e":(!d||d.cellText!==!1)&&(k.w=k.v),k.v=HP[k.v];break}if(P=D=0,Q=null,U&&S.s!==void 0&&(Q=m.CellXf[S.s],Q!=null&&(Q.numFmtId!=null&&(P=Q.numFmtId),d.cellStyles&&Q.fillId!=null&&(D=Q.fillId))),UR(k,P,D,d,h,m),d.cellDates&&U&&k.t=="n"&&Ed(it[P])&&(k.t="d",k.v=rg(k.v)),S.cm&&d.xlmeta){var Se=(d.xlmeta.Cell||[])[+S.cm-1];Se&&Se.type=="XLDAPR"&&(k.D=!0)}if(F){var B=jr(S.r);u[B.r]||(u[B.r]=[]),u[B.r][B.c]=k}else u[S.r]=k}}}}C.length>0&&(u["!rows"]=C)}}();function $Z(e,t,r,n){var s=[],a=[],o=It(e["!ref"]),l="",c,u="",d=[],f=0,h=0,m=e["!rows"],g=Array.isArray(e),p={r:u},x,b=-1;for(h=o.s.c;h<=o.e.c;++h)d[h]=kr(h);for(f=o.s.r;f<=o.e.r;++f){for(a=[],u=Vr(f),h=o.s.c;h<=o.e.c;++h){c=d[h]+u;var w=g?(e[f]||[])[h]:e[c];w!==void 0&&(l=LZ(w,c,e,t))!=null&&a.push(l)}(a.length>0||m&&m[f])&&(p={r:u},m&&m[f]&&(x=m[f],x.hidden&&(p.hidden=1),b=-1,x.hpx?b=Eh(x.hpx):x.hpt&&(b=x.hpt),b>-1&&(p.ht=b,p.customHeight=1),x.level&&(p.outlineLevel=x.level)),s[s.length]=De("row",a.join(""),p))}if(m)for(;f<m.length;++f)m&&m[f]&&(p={r:f+1},x=m[f],x.hidden&&(p.hidden=1),b=-1,x.hpx?b=Eh(x.hpx):x.hpt&&(b=x.hpt),b>-1&&(p.ht=b,p.customHeight=1),x.level&&(p.outlineLevel=x.level),s[s.length]=De("row","",p));return s.join("")}function zR(e,t,r,n){var s=[Gr,De("worksheet",null,{xmlns:Ec[0],"xmlns:r":ln.r})],a=r.SheetNames[e],o=0,l="",c=r.Sheets[a];c==null&&(c={});var u=c["!ref"]||"A1",d=It(u);if(d.e.c>16383||d.e.r>1048575){if(t.WTF)throw new Error("Range "+u+" exceeds format limit A1:XFD1048576");d.e.c=Math.min(d.e.c,16383),d.e.r=Math.min(d.e.c,1048575),u=yt(d)}n||(n={}),c["!comments"]=[];var f=[];SZ(c,r,e,t,s),s[s.length]=De("dimension",null,{ref:u}),s[s.length]=MZ(c,t,e,r),t.sheetFormat&&(s[s.length]=De("sheetFormatPr",null,{defaultRowHeight:t.sheetFormat.defaultRowHeight||"16",baseColWidth:t.sheetFormat.baseColWidth||"10",outlineLevelRow:t.sheetFormat.outlineLevelRow||"7"})),c["!cols"]!=null&&c["!cols"].length>0&&(s[s.length]=RZ(c,c["!cols"])),s[o=s.length]="<sheetData/>",c["!links"]=[],c["!ref"]!=null&&(l=$Z(c,t),l.length>0&&(s[s.length]=l)),s.length>o+1&&(s[s.length]="</sheetData>",s[o]=s[o].replace("/>",">")),c["!protect"]&&(s[s.length]=EZ(c["!protect"])),c["!autofilter"]!=null&&(s[s.length]=DZ(c["!autofilter"],c,r,e)),c["!merges"]!=null&&c["!merges"].length>0&&(s[s.length]=_Z(c["!merges"]));var h=-1,m,g=-1;return c["!links"].length>0&&(s[s.length]="<hyperlinks>",c["!links"].forEach(function(p){p[1].Target&&(m={ref:p[0]},p[1].Target.charAt(0)!="#"&&(g=Qt(n,-1,Jt(p[1].Target).replace(/#.*$/,""),St.HLINK),m["r:id"]="rId"+g),(h=p[1].Target.indexOf("#"))>-1&&(m.location=Jt(p[1].Target.slice(h+1))),p[1].Tooltip&&(m.tooltip=Jt(p[1].Tooltip)),s[s.length]=De("hyperlink",null,m))}),s[s.length]="</hyperlinks>"),delete c["!links"],c["!margins"]!=null&&(s[s.length]=AZ(c["!margins"])),(!t||t.ignoreEC||t.ignoreEC==null)&&(s[s.length]=En("ignoredErrors",De("ignoredError",null,{numberStoredAsText:1,sqref:u}))),f.length>0&&(g=Qt(n,-1,"../drawings/drawing"+(e+1)+".xml",St.DRAW),s[s.length]=De("drawing",null,{"r:id":"rId"+g}),c["!drawing"]=f),c["!comments"].length>0&&(g=Qt(n,-1,"../drawings/vmlDrawing"+(e+1)+".vml",St.VML),s[s.length]=De("legacyDrawing",null,{"r:id":"rId"+g}),c["!legacy"]=g),s.length>1&&(s[s.length]="</worksheet>",s[1]=s[1].replace("/>",">")),s.join("")}function UZ(e,t){var r={},n=e.l+t;r.r=e.read_shift(4),e.l+=4;var s=e.read_shift(2);e.l+=1;var a=e.read_shift(1);return e.l=n,a&7&&(r.level=a&7),a&16&&(r.hidden=!0),a&32&&(r.hpt=s/20),r}function WZ(e,t,r){var n=he(145),s=(r["!rows"]||[])[e]||{};n.write_shift(4,e),n.write_shift(4,0);var a=320;
vendor: 4,699 bytes, line 650
650s.hpx?a=Eh(s.hpx)*20:s.hpt&&(a=s.hpt*20),n.write_shift(2,a),n.write_shift(1,0);var o=0;s.level&&(o|=s.level),s.hidden&&(o|=16),(s.hpx||s.hpt)&&(o|=32),n.write_shift(1,o),n.write_shift(1,0);var l=0,c=n.l;n.l+=4;for(var u={r:e,c:0},d=0;d<16;++d)if(!(t.s.c>d+1<<10||t.e.c<d<<10)){for(var f=-1,h=-1,m=d<<10;m<d+1<<10;++m){u.c=m;var g=Array.isArray(r)?(r[u.r]||[])[u.c]:r[ut(u)];g&&(f<0&&(f=m),h=m)}f<0||(++l,n.write_shift(4,f),n.write_shift(4,h))}var p=n.l;return n.l=c,n.write_shift(4,l),n.l=p,n.length>n.l?n.slice(0,n.l):n}function zZ(e,t,r,n){var s=WZ(n,r,t);(s.length>17||(t["!rows"]||[])[n])&&we(e,0,s)}var HZ=Pc,VZ=Ad;function GZ(){}function qZ(e,t){var r={},n=e[e.l];return++e.l,r.above=!(n&64),r.left=!(n&128),e.l+=18,r.name=XG(e),r}function KZ(e,t,r){r==null&&(r=he(84+4*e.length));var n=192;t&&(t.above&&(n&=-65),t.left&&(n&=-129)),r.write_shift(1,n);for(var s=1;s<3;++s)r.write_shift(1,0);return $p({auto:1},r),r.write_shift(-4,-1),r.write_shift(-4,-1),BP(e,r),r.slice(0,r.l)}function YZ(e){var t=ya(e);return[t]}function XZ(e,t,r){return r==null&&(r=he(8)),Cc(t,r)}function QZ(e){var t=Tc(e);return[t]}function JZ(e,t,r){return r==null&&(r=he(4)),Ac(t,r)}function ZZ(e){var t=ya(e),r=e.read_shift(1);return[t,r,"b"]}function eee(e,t,r){return r==null&&(r=he(9)),Cc(t,r),r.write_shift(1,e.v?1:0),r}function tee(e){var t=Tc(e),r=e.read_shift(1);return[t,r,"b"]}function ree(e,t,r){return r==null&&(r=he(5)),Ac(t,r),r.write_shift(1,e.v?1:0),r}function nee(e){var t=ya(e),r=e.read_shift(1);return[t,r,"e"]}function see(e,t,r){return r==null&&(r=he(9)),Cc(t,r),r.write_shift(1,e.v),r}function aee(e){var t=Tc(e),r=e.read_shift(1);return[t,r,"e"]}function iee(e,t,r){return r==null&&(r=he(8)),Ac(t,r),r.write_shift(1,e.v),r.write_shift(2,0),r.write_shift(1,0),r}function oee(e){var t=ya(e),r=e.read_shift(4);return[t,r,"s"]}function lee(e,t,r){return r==null&&(r=he(12)),Cc(t,r),r.write_shift(4,t.v),r}function cee(e){var t=Tc(e),r=e.read_shift(4);return[t,r,"s"]}function uee(e,t,r){return r==null&&(r=he(8)),Ac(t,r),r.write_shift(4,t.v),r}function dee(e){var t=ya(e),r=Un(e);return[t,r,"n"]}function fee(e,t,r){return r==null&&(r=he(16)),Cc(t,r),xc(e.v,r),r}function HR(e){var t=Tc(e),r=Un(e);return[t,r,"n"]}function hee(e,t,r){return r==null&&(r=he(12)),Ac(t,r),xc(e.v,r),r}function mee(e){var t=ya(e),r=__(e);return[t,r,"n"]}function pee(e,t,r){return r==null&&(r=he(12)),Cc(t,r),$P(e.v,r),r}function xee(e){var t=Tc(e),r=__(e);return[t,r,"n"]}function gee(e,t,r){return r==null&&(r=he(8)),Ac(t,r),$P(e.v,r),r}function vee(e){var t=ya(e),r=y_(e);return[t,r,"is"]}function yee(e){var t=ya(e),r=Wn(e);return[t,r,"str"]}function wee(e,t,r){return r==null&&(r=he(12+4*e.v.length)),Cc(t,r),vn(e.v,r),r.length>r.l?r.slice(0,r.l):r}function bee(e){var t=Tc(e),r=Wn(e);return[t,r,"str"]}function _ee(e,t,r){return r==null&&(r=he(8+4*e.v.length)),Ac(t,r),vn(e.v,r),r.length>r.l?r.slice(0,r.l):r}function Nee(e,t,r){var n=e.l+t,s=ya(e);s.r=r["!row"];var a=e.read_shift(1),o=[s,a,"b"];if(r.cellFormula){e.l+=2;var l=ag(e,n-e.l,r);o[3]=Ln(l,null,s,r.supbooks,r)}else e.l=n;return o}function See(e,t,r){var n=e.l+t,s=ya(e);s.r=r["!row"];var a=e.read_shift(1),o=[s,a,"e"];if(r.cellFormula){e.l+=2;var l=ag(e,n-e.l,r);o[3]=Ln(l,null,s,r.supbooks,r)}else e.l=n;return o}function kee(e,t,r){var n=e.l+t,s=ya(e);s.r=r["!row"];var a=Un(e),o=[s,a,"n"];if(r.cellFormula){e.l+=2;var l=ag(e,n-e.l,r);o[3]=Ln(l,null,s,r.supbooks,r)}else e.l=n;return o}function jee(e,t,r){var n=e.l+t,s=ya(e);s.r=r["!row"];var a=Wn(e),o=[s,a,"str"];if(r.cellFormula){e.l+=2;var l=ag(e,n-e.l,r);o[3]=Ln(l,null,s,r.supbooks,r)}else e.l=n;return o}var Eee=Pc,Cee=Ad;function Tee(e,t){return t==null&&(t=he(4)),t.write_shift(4,e),t}function Aee(e,t){var r=e.l+t,n=Pc(e),s=w_(e),a=Wn(e),o=Wn(e),l=Wn(e);e.l=r;var c={rfx:n,relId:s,loc:a,display:l};return o&&(c.Tooltip=o),c}function Pee(e,t){var r=he(50+4*(e[1].Target.length+(e[1].Tooltip||"").length));Ad({s:jr(e[0]),e:jr(e[0])},r),b_("rId"+t,r);var n=e[1].Target.indexOf("#"),s=n==-1?"":e[1].Target.slice(n+1);return vn(s||"",r),vn(e[1].Tooltip||"",r),vn("",r),r.slice(0,r.l)}function Ree(){}function Oee(e,t,r){var n=e.l+t,s=UP(e),a=e.read_shift(1),o=[s];if(o[2]=a,r.cellFormula){var l=nZ(e,n-e.l,r);o[1]=l}else e.l=n;return o}function Dee(e,t,r){var n=e.l+t,s=Pc(e),a=[s];if(r.cellFormula){var o=aZ(e,n-e.l,r);a[1]=o,e.l=n}else e.l=n;return a}function Iee(e,t,r){r==null&&(r=he(18));var n=ig(e,t);r.write_shift(-4,e),r.write_shift(-4,e),r.write_shift(4,(n.width||10)*256),r.write_shift(4,0);var s=0;return t.hidden&&(s|=1),typeof n.width=="number"&&(s|=2),t.level&&(s|=t.level<<8),r.write_shift(2,s),r}var VR=["left","right","top","bottom","header","footer"];function Fee(e){var t={};
vendor: 4,096 bytes, line 650
650return VR.forEach(function(r){t[r]=Un(e)}),t}function Mee(e,t){return t==null&&(t=he(6*8)),ac(e),VR.forEach(function(r){xc(e[r],t)}),t}function Lee(e){var t=e.read_shift(2);return e.l+=28,{RTL:t&32}}function Bee(e,t,r){r==null&&(r=he(30));var n=924;return(((t||{}).Views||[])[0]||{}).RTL&&(n|=32),r.write_shift(2,n),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(1,0),r.write_shift(1,0),r.write_shift(2,0),r.write_shift(2,100),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(4,0),r}function $ee(e){var t=he(24);return t.write_shift(4,4),t.write_shift(4,1),Ad(e,t),t}function Uee(e,t){return t==null&&(t=he(16*4+2)),t.write_shift(2,e.password?C_(e.password):0),t.write_shift(4,1),[["objects",!1],["scenarios",!1],["formatCells",!0],["formatColumns",!0],["formatRows",!0],["insertColumns",!0],["insertRows",!0],["insertHyperlinks",!0],["deleteColumns",!0],["deleteRows",!0],["selectLockedCells",!1],["sort",!0],["autoFilter",!0],["pivotTables",!0],["selectUnlockedCells",!1]].forEach(function(r){r[1]?t.write_shift(4,e[r[0]]!=null&&!e[r[0]]?1:0):t.write_shift(4,e[r[0]]!=null&&e[r[0]]?0:1)}),t}function Wee(){}function zee(){}function Hee(e,t,r,n,s,a,o){if(!e)return e;var l=t||{};n||(n={"!id":{}});var c=l.dense?[]:{},u,d={s:{r:2e6,c:2e6},e:{r:0,c:0}},f=!1,h=!1,m,g,p,x,b,w,y,_,N,k=[];l.biff=12,l["!row"]=0;var S=0,E=!1,j=[],T={},R=l.supbooks||s.supbooks||[[]];if(R.sharedf=T,R.arrayf=j,R.SheetNames=s.SheetNames||s.Sheets.map(function(F){return F.name}),!l.supbooks&&(l.supbooks=R,s.Names))for(var P=0;P<s.Names.length;++P)R[0][P+1]=s.Names[P];var D=[],U=[],Q=!1;Ch[16]={n:"BrtShortReal",f:HR};var Y;if(oo(e,function(C,X,se){if(!h)switch(se){case 148:u=C;break;case 0:m=C,l.sheetRows&&l.sheetRows<=m.r&&(h=!0),_=Vr(x=m.r),l["!row"]=m.r,(C.hidden||C.hpt||C.level!=null)&&(C.hpt&&(C.hpx=ud(C.hpt)),U[C.r]=C);break;case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 13:case 14:case 15:case 16:case 17:case 18:case 62:switch(g={t:C[2]},C[2]){case"n":g.v=C[1];break;case"s":y=Af[C[1]],g.v=y.t,g.r=y.r;break;case"b":g.v=!!C[1];break;case"e":g.v=C[1],l.cellText!==!1&&(g.w=lo[g.v]);break;case"str":g.t="s",g.v=C[1];break;case"is":g.t="s",g.v=C[1].t;break}if((p=o.CellXf[C[0].iStyleRef])&&UR(g,p.numFmtId,null,l,a,o),b=C[0].c==-1?b+1:C[0].c,l.dense?(c[x]||(c[x]=[]),c[x][b]=g):c[kr(b)+_]=g,l.cellFormula){for(E=!1,S=0;S<j.length;++S){var A=j[S];m.r>=A[0].s.r&&m.r<=A[0].e.r&&b>=A[0].s.c&&b<=A[0].e.c&&(g.F=yt(A[0]),E=!0)}!E&&C.length>3&&(g.f=C[3])}if(d.s.r>m.r&&(d.s.r=m.r),d.s.c>b&&(d.s.c=b),d.e.r<m.r&&(d.e.r=m.r),d.e.c<b&&(d.e.c=b),l.cellDates&&p&&g.t=="n"&&Ed(it[p.numFmtId])){var M=Gl(g.v);M&&(g.t="d",g.v=new Date(M.y,M.m-1,M.d,M.H,M.M,M.S,M.u))}Y&&(Y.type=="XLDAPR"&&(g.D=!0),Y=void 0);break;case 1:case 12:if(!l.sheetStubs||f)break;g={t:"z",v:void 0},b=C[0].c==-1?b+1:C[0].c,l.dense?(c[x]||(c[x]=[]),c[x][b]=g):c[kr(b)+_]=g,d.s.r>m.r&&(d.s.r=m.r),d.s.c>b&&(d.s.c=b),d.e.r<m.r&&(d.e.r=m.r),d.e.c<b&&(d.e.c=b),Y&&(Y.type=="XLDAPR"&&(g.D=!0),Y=void 0);break;case 176:k.push(C);break;case 49:Y=((l.xlmeta||{}).Cell||[])[C-1];break;case 494:var I=n["!id"][C.relId];for(I?(C.Target=I.Target,C.loc&&(C.Target+="#"+C.loc),C.Rel=I):C.relId==""&&(C.Target="#"+C.loc),x=C.rfx.s.r;x<=C.rfx.e.r;++x)for(b=C.rfx.s.c;b<=C.rfx.e.c;++b)l.dense?(c[x]||(c[x]=[]),c[x][b]||(c[x][b]={t:"z",v:void 0}),c[x][b].l=C):(w=ut({c:b,r:x}),c[w]||(c[w]={t:"z",v:void 0}),c[w].l=C);break;case 426:if(!l.cellFormula)break;j.push(C),N=l.dense?c[x][b]:c[kr(b)+_],N.f=Ln(C[1],d,{r:m.r,c:b},R,l),N.F=yt(C[0]);break;case 427:if(!l.cellFormula)break;T[ut(C[0].s)]=C[1],N=l.dense?c[x][b]:c[kr(b)+_],N.f=Ln(C[1],d,{r:m.r,c:b},R,l);break;case 60:if(!l.cellStyles)break;for(;C.e>=C.s;)D[C.e--]={width:C.w/256,hidden:!!(C.flags&1),level:C.level},Q||(Q=!0,T_(C.w/256)),ol(D[C.e+1]);break;case 161:c["!autofilter"]={ref:yt(C)};break;case 476:c["!margins"]=C;break;case 147:s.Sheets[r]||(s.Sheets[r]={}),C.name&&(s.Sheets[r].CodeName=C.name),(C.above||C.left)&&(c["!outline"]={above:C.above,left:C.left});break;case 137:s.Views||(s.Views=[{}]),s.Views[0]||(s.Views[0]={}
vendor: 2,154 bytes, line 650
650),C.RTL&&(s.Views[0].RTL=!0);break;case 485:break;case 64:case 1053:break;case 151:break;case 152:case 175:case 644:case 625:case 562:case 396:case 1112:case 1146:case 471:case 1050:case 649:case 1105:case 589:case 607:case 564:case 1055:case 168:case 174:case 1180:case 499:case 507:case 550:case 171:case 167:case 1177:case 169:case 1181:case 551:case 552:case 661:case 639:case 478:case 537:case 477:case 536:case 1103:case 680:case 1104:case 1024:case 663:case 535:case 678:case 504:case 1043:case 428:case 170:case 3072:case 50:case 2070:case 1045:break;case 35:f=!0;break;case 36:f=!1;break;case 37:f=!0;break;case 38:f=!1;break;default:if(!X.T){if(!f||l.WTF)throw new Error("Unexpected record 0x"+se.toString(16))}}},l),delete l.supbooks,delete l["!row"],!c["!ref"]&&(d.s.r<2e6||u&&(u.e.r>0||u.e.c>0||u.s.r>0||u.s.c>0))&&(c["!ref"]=yt(u||d)),l.sheetRows&&c["!ref"]){var V=It(c["!ref"]);l.sheetRows<=+V.e.r&&(V.e.r=l.sheetRows-1,V.e.r>d.e.r&&(V.e.r=d.e.r),V.e.r<V.s.r&&(V.s.r=V.e.r),V.e.c>d.e.c&&(V.e.c=d.e.c),V.e.c<V.s.c&&(V.s.c=V.e.c),c["!fullref"]=c["!ref"],c["!ref"]=yt(V))}return k.length>0&&(c["!merges"]=k),D.length>0&&(c["!cols"]=D),U.length>0&&(c["!rows"]=U),c}function Vee(e,t,r,n,s,a,o){if(t.v===void 0)return!1;var l="";switch(t.t){case"b":l=t.v?"1":"0";break;case"d":t=xr(t),t.z=t.z||it[14],t.v=dn(pr(t.v)),t.t="n";break;case"n":case"e":l=""+t.v;break;default:l=t.v;break}var c={r,c:n};switch(c.s=wl(s.cellXfs,t,s),t.l&&a["!links"].push([ut(c),t.l]),t.c&&a["!comments"].push([ut(c),t.c]),t.t){case"s":case"str":return s.bookSST?(l=D_(s.Strings,t.v,s.revStrings),c.t="s",c.v=l,o?we(e,18,uee(t,c)):we(e,7,lee(t,c))):(c.t="str",o?we(e,17,_ee(t,c)):we(e,6,wee(t,c))),!0;case"n":return t.v==(t.v|0)&&t.v>-1e3&&t.v<1e3?o?we(e,13,gee(t,c)):we(e,2,pee(t,c)):o?we(e,16,hee(t,c)):we(e,5,fee(t,c)),!0;case"b":return c.t="b",o?we(e,15,ree(t,c)):we(e,4,eee(t,c)),!0;case"e":return c.t="e",o?we(e,14,iee(t,c)):we(e,3,see(t,c)),!0}return o?we(e,12,JZ(t,c)):we(e,1,XZ(t,c)),!0}function Gee(e,t,r,n){var s=It(t["!ref"]||"A1"),a,o="",l=[];we(e,145);var c=Array.isArray(t),u=s.e.r;t["!rows"]&&(u=Math.max(s.e.r,t["!rows"].length-1));for(var d=s.s.r;d<=u;
650++d){o=Vr(d),zZ(e,t,s,d);var f=!1;if(d<=s.e.r)for(var h=s.s.c;h<=s.e.c;++h){d===s.s.r&&(l[h]=kr(h)),a=l[h]+o;var m=c?(t[d]||[])[h]:t[a];if(!m){f=!1;continue}f=Vee(e,m,d,h,n,t,f)}}we(e,146)}function qee(e,t){!t||!t["!merges"]||(we(e,177,Tee(t["!merges"].length)),t["!merges"].forEach(function(r){we(e,176,Cee(r))}),we(e,178))}function Kee(e,t){!t||!t["!cols"]||(we(e,390),t["!cols"].forEach(function(r,n){r&&we(e,60,Iee(n,r))}),we(e,391))}function Yee(e,t){!t||!t["!ref"]||(we(e,648),we(e,649,$ee(It(t["!ref"]))),we(e,650))}function Xee(e,t,r){t["!links"].forEach(function(n){if(n[1].Target){var s=Qt(r,-1,n[1].Target.replace(/#.*$/,""),St.HLINK);we(e,494,Pee(n,s))}}),delete t["!links"]}function Qee(e,t,r,n){if(t["!comments"].length>0){var s=Qt(n,-1,"../drawings/vmlDrawing"+(r+1)+".vml",St.VML);we(e,551,b_("rId"+s)),t["!legacy"]=s}}function Jee(e,t,r,n){if(t["!autofilter"]){var s=t["!autofilter"],a=typeof s.ref=="string"?s.ref:yt(s.ref);r.Workbook||(r.Workbook={Sheets:[]}),r.Workbook.Names||(r.Workbook.Names=[]);var o=r.Workbook.Names,l=gs(a);l.s.r==l.e.r&&(l.e.r=gs(t["!ref"]).e.r,a=yt(l));for(var c=0;c<o.length;++c){var u=o[c];if(u.Name=="_xlnm._FilterDatabase"&&u.Sheet==n){u.Ref="'"+r.SheetNames[n]+"'!"+a;break}}c==o.length&&o.push({Name:"_xlnm._FilterDatabase",Sheet:n,Ref:"'"+r.SheetNames[n]+"'!"+a}),we(e,161,Ad(It(a))),we(e,162)}}function Zee(e,t,r){we(e,133),we(e,137,Bee(t,r)),we(e,138),we(e,134)}function ete(e,t){t["!protect"]&&we(e,535,Uee(t["!protect"]))}function tte(e,t,r,n){var s=ms(),a=r.SheetNames[e],o=r.Sheets[a]||{},l=a;try{r&&r.Workbook&&(l=r.Workbook.Sheets[e].CodeName||l)}catch{}var c=It(o["!ref"]||"A1");if(c.e.c>16383||c.e.r>1048575){if(t.WTF)throw new Error("Range "+(o["!ref"]||"A1")+" exceeds format limit A1:XFD1048576");c.e.c=Math.min(c.e.c,16383),c.e.r=Math.min(c.e.c,1048575)}return o["!links"]=[],o["!comments"]=[],we(s,129),(r.vbaraw||o["!outline"])&&we(s,147,KZ(l,o["!outline"])),we(s,148,VZ(c)),Zee(s,o,r.Workbook),Kee(s,o),Gee(s,o,e,t),ete(s,o),Jee(s,o,r,e),qee(s,o),Xee(s,o,n),o["!margins"]&&we(s,476,Mee(o["!margins"])),(!t||t.ignoreEC||t.ignoreEC==null)&&Yee(s,o),Qee(s,o,e,n),we(s,130),s.end()}function rte(e){var t=[],r=e.match(/^<c:numCache>/),n;(e.match(/<c:pt idx="(\d*)">(.*?)<\/c:pt>/mg)||[]).forEach(function(a){var o=a.match(/<c:pt idx="(\d*?)"><c:v>(.*)<\/c:v><\/c:pt>/);o&&(t[+o[1]]=r?+o[2]:o[2])});var s=Dt((e.match(/<c:formatCode>([\s\S]*?)<\/c:formatCode>/)||["","General"])[1]);return(e.match(/<c:f>(.*?)<\/c:f>/mg)||[]).forEach(function(a){n=a.replace(/<.*?>/g,"")}),[t,s,n]}function nte(e,t,r,n,s,a){var o=a||{"!type":"chart"};if(!e)return a;var l=0,c=0,u="A",d={s:{r:2e6,c:2e6},e:{r:0,c:0}};return(e.match(/<c:numCache>[\s\S]*?<\/c:numCache>/gm)||[]).forEach(function(f){var h=rte(f);d.s.r=d.s.c=0,d.e.c=l,u=kr(l),h[0].forEach(function(m,g){o[u+Vr(g)]={t:"n",v:m,z:h[1]},c=g}),d.e.r<c&&(d.e.r=c),++l}),l>0&&(o["!ref"]=yt(d)),o}function ste(e,t,r,n,s){if(!e)return e;n||(n={"!id":{}});var a={"!type":"chart","!drawel":null,"!rel":""},o,l=e.match(WR);return l&&I_(l[0],a,s,r),(o=e.match(/drawing r:id="(.*?)"/))&&(a["!rel"]=o[1]),n["!id"][a["!rel"]]&&(a["!drawel"]=n["!id"][a["!rel"]]),a}function ate(e,t){e.l+=10;var r=Wn(e);return{name:r}}function ite(e,t,r,n,s){if(!e)return e;n||(n={"!id":{}});var a={"!type":"chart","!drawel":null,"!rel":""},o=!1;return oo(e,function(c,u,d){switch(d){case 550:a["!rel"]=c;break;case 651:s.Sheets[r]||(s.Sheets[r]={}),c.name&&(s.Sheets[r].CodeName=c.name);break;case 562:case 652:case 669:case 679:case 551:case 552:case 476:case 3072:break;case 35:o=!0;break;case 36:o=!1;break;case 37:break;case 38:break;default:if(!(u.T>0)){if(!(u.T<0)){if(!o||t.WTF)throw new Error("Unexpected record 0x"+d.toString(16))}}}},t),n["!id"][a["!rel"]]&&(a["!drawel"]=n["!id"][a["!rel"]]),a}var F_=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorder
650UnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],ote=[["activeTab",0,"int"],["autoFilterDateGrouping",!0,"bool"],["firstSheet",0,"int"],["minimized",!1,"bool"],["showHorizontalScroll",!0,"bool"],["showSheetTabs",!0,"bool"],["showVerticalScroll",!0,"bool"],["tabRatio",600,"int"],["visibility","visible"]],lte=[],cte=[["calcCompleted","true"],["calcMode","auto"],["calcOnSave","true"],["concurrentCalc","true"],["fullCalcOnLoad","false"],["fullPrecision","true"],["iterate","false"],["iterateCount","100"],["iterateDelta","0.001"],["refMode","A1"]];function Fj(e,t){for(var r=0;r!=e.length;++r)for(var n=e[r],s=0;s!=t.length;++s){var a=t[s];if(n[a[0]]==null)n[a[0]]=a[1];else switch(a[2]){case"bool":typeof n[a[0]]=="string"&&(n[a[0]]=hr(n[a[0]]));break;case"int":typeof n[a[0]]=="string"&&(n[a[0]]=parseInt(n[a[0]],10));break}}}function Mj(e,t){for(var r=0;r!=t.length;++r){var n=t[r];if(e[n[0]]==null)e[n[0]]=n[1];else switch(n[2]){case"bool":typeof e[n[0]]=="string"&&(e[n[0]]=hr(e[n[0]]));break;case"int":typeof e[n[0]]=="string"&&(e[n[0]]=parseInt(e[n[0]],10));break}}}function GR(e){Mj(e.WBProps,F_),Mj(e.CalcPr,cte),Fj(e.WBView,ote),Fj(e.Sheets,lte),Du.date1904=hr(e.WBProps.date1904)}function ute(e){return!e.Workbook||!e.Workbook.WBProps?"false":hr(e.Workbook.WBProps.date1904)?"true":"false"}var dte="][*?/\\".split("");function qR(e,t){if(e.length>31)throw new Error("Sheet names cannot exceed 31 chars");var r=!0;return dte.forEach(function(n){if(e.indexOf(n)!=-1)throw new Error("Sheet name cannot contain : \\ / ? * [ ]")}),r}function fte(e,t,r){e.forEach(function(n,s){qR(n);for(var a=0;a<s;++a)if(n==e[a])throw new Error("Duplicate Sheet Name: "+n);if(r){var o=t&&t[s]&&t[s].CodeName||n;
vendor: 4,494 bytes, line 650
650if(o.charCodeAt(0)==95&&o.length>22)throw new Error("Bad Code Name: Worksheet"+o)}})}function hte(e){if(!e||!e.SheetNames||!e.Sheets)throw new Error("Invalid Workbook");if(!e.SheetNames.length)throw new Error("Workbook is empty");var t=e.Workbook&&e.Workbook.Sheets||[];fte(e.SheetNames,t,!!e.vbaraw);for(var r=0;r<e.SheetNames.length;++r)uZ(e.Sheets[e.SheetNames[r]],e.SheetNames[r],r)}var mte=/<\w+:workbook/;function pte(e,t){if(!e)throw new Error("Could not find file");var r={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},Names:[],xmlns:""},n=!1,s="xmlns",a={},o=0;if(e.replace(Gn,function(c,u){var d=ft(c);switch(Si(d[0])){case"<?xml":break;case"<workbook":c.match(mte)&&(s="xmlns"+c.match(/<(\w+):/)[1]),r.xmlns=d[s];break;case"</workbook>":break;case"<fileVersion":delete d[0],r.AppVersion=d;break;case"<fileVersion/>":case"</fileVersion>":break;case"<fileSharing":break;case"<fileSharing/>":break;case"<workbookPr":case"<workbookPr/>":F_.forEach(function(f){if(d[f[0]]!=null)switch(f[2]){case"bool":r.WBProps[f[0]]=hr(d[f[0]]);break;case"int":r.WBProps[f[0]]=parseInt(d[f[0]],10);break;default:r.WBProps[f[0]]=d[f[0]]}}),d.codeName&&(r.WBProps.CodeName=tr(d.codeName));break;case"</workbookPr>":break;case"<workbookProtection":break;case"<workbookProtection/>":break;case"<bookViews":case"<bookViews>":case"</bookViews>":break;case"<workbookView":case"<workbookView/>":delete d[0],r.WBView.push(d);break;case"</workbookView>":break;case"<sheets":case"<sheets>":case"</sheets>":break;case"<sheet":switch(d.state){case"hidden":d.Hidden=1;break;case"veryHidden":d.Hidden=2;break;default:d.Hidden=0}delete d.state,d.name=Dt(tr(d.name)),delete d[0],r.Sheets.push(d);break;case"</sheet>":break;case"<functionGroups":case"<functionGroups/>":break;case"<functionGroup":break;case"<externalReferences":case"</externalReferences>":case"<externalReferences>":break;case"<externalReference":break;case"<definedNames/>":break;case"<definedNames>":case"<definedNames":n=!0;break;case"</definedNames>":n=!1;break;case"<definedName":a={},a.Name=tr(d.name),d.comment&&(a.Comment=d.comment),d.localSheetId&&(a.Sheet=+d.localSheetId),hr(d.hidden||"0")&&(a.Hidden=!0),o=u+c.length;break;case"</definedName>":a.Ref=Dt(tr(e.slice(o,u))),r.Names.push(a);break;case"<definedName/>":break;case"<calcPr":delete d[0],r.CalcPr=d;break;case"<calcPr/>":delete d[0],r.CalcPr=d;break;case"</calcPr>":break;case"<oleSize":break;case"<customWorkbookViews>":case"</customWorkbookViews>":case"<customWorkbookViews":break;case"<customWorkbookView":case"</customWorkbookView>":break;case"<pivotCaches>":case"</pivotCaches>":case"<pivotCaches":break;case"<pivotCache":break;case"<smartTagPr":case"<smartTagPr/>":break;case"<smartTagTypes":case"<smartTagTypes>":case"</smartTagTypes>":break;case"<smartTagType":break;case"<webPublishing":case"<webPublishing/>":break;case"<fileRecoveryPr":case"<fileRecoveryPr/>":break;case"<webPublishObjects>":case"<webPublishObjects":case"</webPublishObjects>":break;case"<webPublishObject":break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":n=!0;break;case"</ext>":n=!1;break;case"<ArchID":break;case"<AlternateContent":case"<AlternateContent>":n=!0;break;case"</AlternateContent>":n=!1;break;case"<revisionPtr":break;default:if(!n&&t.WTF)throw new Error("unrecognized "+d[0]+" in workbook")}return c}),Ec.indexOf(r.xmlns)===-1)throw new Error("Unknown Namespace: "+r.xmlns);return GR(r),r}function KR(e){var t=[Gr];t[t.length]=De("workbook",null,{xmlns:Ec[0],"xmlns:r":ln.r});var r=e.Workbook&&(e.Workbook.Names||[]).length>0,n={codeName:"ThisWorkbook"};e.Workbook&&e.Workbook.WBProps&&(F_.forEach(function(l){e.Workbook.WBProps[l[0]]!=null&&e.Workbook.WBProps[l[0]]!=l[1]&&(n[l[0]]=e.Workbook.WBProps[l[0]])}),e.Workbook.WBProps.CodeName&&(n.codeName=e.Workbook.WBProps.CodeName,delete n.CodeName)),t[t.length]=De("workbookPr",null,n);var s=e.Workbook&&e.Workbook.Sheets||[],a=0;if(s&&s[0]&&s[0].Hidden){for(t[t.length]="<bookViews>",a=0;a!=e.SheetNames.length&&!(!s[a]||!s[a].Hidden);++a);a==e.SheetNames.length&&(a=0),t[t.length]='<workbookView firstSheet="'+a+'" activeTab="'+a+'"/>',t[t.length]="</bookViews>"}for(t[t.length]="<sheets>",a=0;a!=e.SheetNames.length;++a){var o={name:Jt(e.SheetNames[a].slice(0,31))};if(o.sheetId=""+(a+1),o["r:id"]="rId"+(a+1),s[a])switch(s[a].Hidden){case 1:o.state="hidden";break;case 2:o.state="veryHidden";break}t[t.length]=De("sheet",null,o)}return t[t.length]="</sheets>",r&&(t[t.length]="<definedNames>
650",e.Workbook&&e.Workbook.Names&&e.Workbook.Names.forEach(function(l){var c={name:l.Name};l.Comment&&(c.comment=l.Comment),l.Sheet!=null&&(c.localSheetId=""+l.Sheet),l.Hidden&&(c.hidden="1"),l.Ref&&(t[t.length]=De("definedName",Jt(l.Ref),c))}),t[t.length]="</definedNames>"),t.length>2&&(t[t.length]="</workbook>",t[1]=t[1].replace("/>",">")),t.join("")}function xte(e,t){var r={};return r.Hidden=e.read_shift(4),r.iTabID=e.read_shift(4),r.strRelID=Vy(e),r.name=Wn(e),r}function gte(e,t){return t||(t=he(127)),t.write_shift(4,e.Hidden),t.write_shift(4,e.iTabID),b_(e.strRelID,t),vn(e.name.slice(0,31),t),t.length>t.l?t.slice(0,t.l):t}function vte(e,t){var r={},n=e.read_shift(4);r.defaultThemeVersion=e.read_shift(4);var s=t>8?Wn(e):"";return s.length>0&&(r.CodeName=s),r.autoCompressPictures=!!(n&65536),r.backupFile=!!(n&64),r.checkCompatibility=!!(n&4096),r.date1904=!!(n&1),r.filterPrivacy=!!(n&8),r.hidePivotFieldList=!!(n&1024),r.promptedSolutions=!!(n&16),r.publishItems=!!(n&2048),r.refreshAllConnections=!!(n&262144),r.saveExternalLinkValues=!!(n&128),r.showBorderUnselectedTables=!!(n&4),r.showInkAnnotation=!!(n&32),r.showObjects=["all","placeholders","none"][n>>13&3],r.showPivotChartFilter=!!(n&32768),r.updateLinks=["userSet","never","always"][n>>8&3],r}function yte(e,t){t||(t=he(72));var r=0;return e&&e.filterPrivacy&&(r|=8),t.write_shift(4,r),t.write_shift(4,0),BP(e&&e.CodeName||"ThisWorkbook",t),t.slice(0,t.l)}function wte(e,t){var r={};return e.read_shift(4),r.ArchID=e.read_shift(4),e.l+=t-8,r}function bte(e,t,r){var n=e.l+t;e.l+=4,e.l+=1;var s=e.read_shift(4),a=QG(e),o=sZ(e,0,r),l=w_(e);e.l=n;var c={Name:a,Ptg:o};return s<268435455&&(c.Sheet=s),l&&(c.Comment=l),c}function _te(e,t){var r={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},xmlns:""},n=[],s=!1;t||(t={}),t.biff=12;var a=[],o=[[]];return o.SheetNames=[],o.XTI=[],Ch[16]={n:"BrtFRTArchID$",f:wte},oo(e,function(c,u,d){switch(d){case 156:o.SheetNames.push(c.name),r.Sheets.push(c);break;case 153:r.WBProps=c;break;case 39:c.Sheet!=null&&(t.SID=c.Sheet),c.Ref=Ln(c.Ptg,null,null,o,t),delete t.SID,delete c.Ptg,a.push(c);break;case 1036:break;case 357:case 358:case 355:case 667:o[0].length?o.push([d,c]):o[0]=[d,c],o[o.length-1].XTI=[];break;case 362:o.length===0&&(o[0]=[],o[0].XTI=[]),o[o.length-1].XTI=o[o.length-1].XTI.concat(c),o.XTI=o.XTI.concat(c);break;case 361:break;case 2071:case 158:case 143:case 664:case 353:break;case 3072:case 3073:case 534:case 677:case 157:case 610:case 2050:case 155:case 548:case 676:case 128:case 665:case 2128:case 2125:case 549:case 2053:case 596:case 2076:case 2075:case 2082:case 397:case 154:case 1117:case 553:case 2091:break;case 35:n.push(d),s=!0;break;case 36:n.pop(),s=!1;break;case 37:n.push(d),s=!0;break;case 38:n.pop(),s=!1;break;case 16:break;default:if(!u.T){if(!s||t.WTF&&n[n.length-1]!=37&&n[n.length-1]!=35)throw new Error("Unexpected record 0x"+d.toString(16))}}},t),GR(r),r.Names=a,r.supbooks=o,r}function Nte(e,t){we(e,143);for(var r=0;r!=t.SheetNames.length;++r){var n=t.Workbook&&t.Workbook.Sheets&&t.Workbook.Sheets[r]&&t.Workbook.Sheets[r].Hidden||0,s={Hidden:n,iTabID:r+1,strRelID:"rId"+(r+1),name:t.SheetNames[r]};we(e,156,gte(s))}we(e,144)}function Ste(e,t){t||(t=he(127));for(var r=0;r!=4;++r)t.write_shift(4,0);return vn("SheetJS",t),vn(Op.version,t),vn(Op.version,t),vn("7262",t),t.length>t.l?t.slice(0,t.l):t}function kte(e,t){t||(t=he(29)),t.write_shift(-4,0),t.write_shift(-4,460),t.write_shift(4,28800),t.write_shift(4,17600),t.write_shift(4,500),t.write_shift(4,e),t.write_shift(4,e);var r=120;return t.write_shift(1,r),t.length>t.l?t.slice(0,t.l):t}function jte(e,t){if(!(!t.Workbook||!t.Workbook.Sheets)){for(var r=t.Workbook.Sheets,n=0,s=-1,a=-1;n<r.length;++n)!r[n]||!r[n].Hidden&&s==-1?s=n:r[n].Hidden==1&&a==-1&&(a=n);a>s||(we(e,135),we(e,158,kte(s)),we(e,136))}}function Ete(e,t){var r=ms();return we(r,131),we(r,128,Ste()),we(r,153,yte(e.Workbook&&e.Workbook.WBProps||null)),jte(r,e),Nte(r,e),we(r,132),r.end()}function Cte(e,t,r){return t.slice(-4)===".bin"?_te(e,r):pte(e,r)}
vendor: 4,754 bytes, lines 650-652
650function Tte(e,t,r,n,s,a,o,l){return t.slice(-4)===".bin"?Hee(e,n,r,s,a,o,l):bZ(e,n,r,s,a,o,l)}function Ate(e,t,r,n,s,a,o,l){return t.slice(-4)===".bin"?ite(e,n,r,s,a):ste(e,n,r,s,a)}function Pte(e,t,r,n,s,a,o,l){return t.slice(-4)===".bin"?OQ():DQ()}function Rte(e,t,r,n,s,a,o,l){return t.slice(-4)===".bin"?PQ():RQ()}function Ote(e,t,r,n){return t.slice(-4)===".bin"?CX(e,r,n):xX(e,r,n)}function Dte(e,t,r){return CR(e,r)}function Ite(e,t,r){return t.slice(-4)===".bin"?IY(e,r):RY(e,r)}function Fte(e,t,r){return t.slice(-4)===".bin"?jQ(e,r):gQ(e,r)}function Mte(e,t,r){return t.slice(-4)===".bin"?mQ(e):fQ(e)}function Lte(e,t,r,n){return r.slice(-4)===".bin"?pQ(e,t,r,n):void 0}function Bte(e,t,r){return t.slice(-4)===".bin"?cQ(e,t,r):dQ(e,t,r)}function $te(e,t,r){return(t.slice(-4)===".bin"?Ete:KR)(e)}function Ute(e,t,r,n,s){return(t.slice(-4)===".bin"?tte:zR)(e,r,n,s)}function Wte(e,t,r){return(t.slice(-4)===".bin"?LX:jR)(e,r)}function zte(e,t,r){return(t.slice(-4)===".bin"?LY:vR)(e,r)}function Hte(e,t,r){return(t.slice(-4)===".bin"?EQ:PR)(e)}function Vte(e){return(e.slice(-4)===".bin"?uQ:TR)()}var YR=/([\w:]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g,XR=/([\w:]+)=((?:")(?:[^"]*)(?:")|(?:')(?:[^']*)(?:'))/;function Sa(e,t){var r=e.split(/\s+/),n=[];if(n[0]=r[0],r.length===1)return n;var s=e.match(YR),a,o,l,c;if(s)for(c=0;c!=s.length;++c)a=s[c].match(XR),(o=a[1].indexOf(":"))===-1?n[a[1]]=a[2].slice(1,a[2].length-1):(a[1].slice(0,6)==="xmlns:"?l="xmlns"+a[1].slice(6):l=a[1].slice(o+1),n[l]=a[2].slice(1,a[2].length-1));return n}function Gte(e){var t=e.split(/\s+/),r={};if(t.length===1)return r;var n=e.match(YR),s,a,o,l;if(n)for(l=0;l!=n.length;++l)s=n[l].match(XR),(a=s[1].indexOf(":"))===-1?r[s[1]]=s[2].slice(1,s[2].length-1):(s[1].slice(0,6)==="xmlns:"?o="xmlns"+s[1].slice(6):o=s[1].slice(a+1),r[o]=s[2].slice(1,s[2].length-1));return r}var Rf;function qte(e,t){var r=Rf[e]||Dt(e);return r==="General"?mc(t):xa(r,t)}function Kte(e,t,r,n){var s=n;switch((r[0].match(/dt:dt="([\w.]+)"/)||["",""])[1]){case"boolean":s=hr(n);break;case"i2":case"int":s=parseInt(n,10);break;case"r4":case"float":s=parseFloat(n);break;case"date":case"dateTime.tz":s=pr(n);break;case"i8":case"string":case"fixed":case"uuid":case"bin.base64":break;default:throw new Error("bad custprop:"+r[0])}e[Dt(t)]=s}function Yte(e,t,r){if(e.t!=="z"){if(!r||r.cellText!==!1)try{e.t==="e"?e.w=e.w||lo[e.v]:t==="General"?e.t==="n"?(e.v|0)===e.v?e.w=e.v.toString(10):e.w=yh(e.v):e.w=mc(e.v):e.w=qte(t||"General",e.v)}catch(a){if(r.WTF)throw a}try{var n=Rf[t]||t||"General";if(r.cellNF&&(e.z=n),r.cellDates&&e.t=="n"&&Ed(n)){var s=Gl(e.v);s&&(e.t="d",e.v=new Date(s.y,s.m-1,s.d,s.H,s.M,s.S,s.u))}}catch(a){if(r.WTF)throw a}}}function Xte(e,t,r){if(r.cellStyles&&t.Interior){var n=t.Interior;n.Pattern&&(n.patternType=lX[n.Pattern]||n.Pattern)}e[t.ID]=t}function Qte(e,t,r,n,s,a,o,l,c,u){var d="General",f=n.StyleID,h={};u=u||{};var m=[],g=0;for(f===void 0&&l&&(f=l.StyleID),f===void 0&&o&&(f=o.StyleID);a[f]!==void 0&&(a[f].nf&&(d=a[f].nf),a[f].Interior&&m.push(a[f].Interior),!!a[f].Parent);)f=a[f].Parent;switch(r.Type){case"Boolean":n.t="b",n.v=hr(e);break;case"String":n.t="s",n.r=ej(Dt(e)),n.v=e.indexOf("<")>-1?Dt(t||e).replace(/<.*?>/g,""):n.r;break;case"DateTime":e.slice(-1)!="Z"&&(e+="Z"),n.v=(pr(e)-new Date(Date.UTC(1899,11,30)))/(24*60*60*1e3),n.v!==n.v?n.v=Dt(e):n.v<60&&(n.v=n.v-1),(!d||d=="General")&&(d="yyyy-mm-dd");case"Number":n.v===void 0&&(n.v=+e),n.t||(n.t="n");break;case"Error":n.t="e",n.v=HP[e],u.cellText!==!1&&(n.w=e);break;default:e==""&&t==""?n.t="z":(n.t="s",n.v=ej(t||e));break}if(Yte(n,d,u),u.cellFormula!==!1)if(n.Formula){var p=Dt(n.Formula);p.charCodeAt(0)==61&&(p=p.slice(1)),n.f=Ou(p,s),delete n.Formula,n.ArrayRange=="RC"?n.F=Ou("RC:RC",s):n.ArrayRange&&(n.F=Ou(n.ArrayRange,s),c.push([It(n.F),n.F]))}else for(g=0;g<c.length;++g)s.r>=c[g][0].s.r&&s.r<=c[g][0].e.r&&s.c>=c[g][0].s.c&&s.c<=c[g][0].e.c&&(n.F=c[g][1]);u.cellStyles&&(m.forEach(function(x){!h.patternType&&x.patternType&&(h.patternType=x.patternType)}),n.s=h),n.StyleID!==void 0&&(n.ixfe=n.StyleID)}function Jte(e){e.t=e.v||"",e.t=e.t.replace(/\r\n/g,`
651`).replace(/\r/g,`
652`),e.v=e.w=e.ixfe=void 0}function zv(e,t){var r=t||{};Cd();var n=of(m_(e));(r.type=="binary"||r.type=="array"||r.type=="base64")&&(n=tr(n));var s=n.slice(0,1024).toLowerCase(),a=!1;if(s=s.replace(/".*?"/g,""),(s.indexOf(">")&1023)>Math.min(s.indexOf(",")&1023,s.indexOf(";")&1023)){var o=xr(r);return o.type="string",cd.to_workbook(n,o)}if(s.indexOf("<?xml")==-1&&["html","table","head","meta","script","style","div"].forEach(function(fe){s.indexOf("<"+fe)>=0&&(a=!0)}),a)return Mre(n,r);Rf={"General Number":"General","General Date":it[22],"Long Date":"dddd, mmmm dd, yyyy","Medium Date":it[15],"
652Short Date":it[14],"Long Time":it[19],"Medium Time":it[18],"Short Time":it[20],Currency:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',Fixed:it[2],Standard:it[4],Percent:it[10],Scientific:it[11],"Yes/No":'"Yes";"Yes";"No";@',"True/False":'"True";"True";"False";@',"On/Off":'"Yes";"Yes";"No";@'};var l,c=[],u,d={},f=[],h=r.dense?[]:{},m="",g={},p={},x=Sa('<Data ss:Type="String">'),b=0,w=0,y=0,_={s:{r:2e6,c:2e6},e:{r:0,c:0}},N={},k={},S="",E=0,j=[],T={},R={},P=0,D=[],U=[],Q={},Y=[],V,F=!1,C=[],X=[],se={},A=0,M=0,I={Sheets:[],WBProps:{date1904:!1}},z={};_h.lastIndex=0,n=n.replace(/<!--([\s\S]*?)-->/mg,"");for(var J="";l=_h.exec(n);)switch(l[3]=(J=l[3]).toLowerCase()){case"data":if(J=="data"){if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else l[0].charAt(l[0].length-2)!=="/"&&c.push([l[3],!0]);break}if(c[c.length-1][1])break;l[1]==="/"?Qte(n.slice(b,l.index),S,x,c[c.length-1][0]=="comment"?Q:g,{c:w,r:y},N,Y[w],p,C,r):(S="",x=Sa(l[0]),b=l.index+l[0].length);break;case"cell":if(l[1]==="/")if(U.length>0&&(g.c=U),(!r.sheetRows||r.sheetRows>y)&&g.v!==void 0&&(r.dense?(h[y]||(h[y]=[]),h[y][w]=g):h[kr(w)+Vr(y)]=g),g.HRef&&(g.l={Target:Dt(g.HRef)},g.HRefScreenTip&&(g.l.Tooltip=g.HRefScreenTip),delete g.HRef,delete g.HRefScreenTip),(g.MergeAcross||g.MergeDown)&&(A=w+(parseInt(g.MergeAcross,10)|0),M=y+(parseInt(g.MergeDown,10)|0),j.push({s:{c:w,r:y},e:{c:A,r:M}})),!r.sheetStubs)g.MergeAcross?w=A+1:++w;else if(g.MergeAcross||g.MergeDown){for(var Z=w;Z<=A;++Z)for(var re=y;re<=M;++re)(Z>w||re>y)&&(r.dense?(h[re]||(h[re]=[]),h[re][Z]={t:"z"}):h[kr(Z)+Vr(re)]={t:"z"});w=A+1}else++w;else g=Gte(l[0]),g.Index&&(w=+g.Index-1),w<_.s.c&&(_.s.c=w),w>_.e.c&&(_.e.c=w),l[0].slice(-2)==="/>"&&++w,U=[];break;case"row":l[1]==="/"||l[0].slice(-2)==="/>"?(y<_.s.r&&(_.s.r=y),y>_.e.r&&(_.e.r=y),l[0].slice(-2)==="/>"&&(p=Sa(l[0]),p.Index&&(y=+p.Index-1)),w=0,++y):(p=Sa(l[0]),p.Index&&(y=+p.Index-1),se={},(p.AutoFitHeight=="0"||p.Height)&&(se.hpx=parseInt(p.Height,10),se.hpt=Eh(se.hpx),X[y]=se),p.Hidden=="1"&&(se.hidden=!0,X[y]=se));break;case"worksheet":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"));f.push(m),_.s.r<=_.e.r&&_.s.c<=_.e.c&&(h["!ref"]=yt(_),r.sheetRows&&r.sheetRows<=_.e.r&&(h["!fullref"]=h["!ref"],_.e.r=r.sheetRows-1,h["!ref"]=yt(_))),j.length&&(h["!merges"]=j),Y.length>0&&(h["!cols"]=Y),X.length>0&&(h["!rows"]=X),d[m]=h}else _={s:{r:2e6,c:2e6},e:{r:0,c:0}},y=w=0,c.push([l[3],!1]),u=Sa(l[0]),m=Dt(u.Name),h=r.dense?[]:{},j=[],C=[],X=[],z={name:m,Hidden:0},I.Sheets.push(z);break;case"table":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else{if(l[0].slice(-2)=="/>")break;c.push([l[3],!1]),Y=[],F=!1}break;case"style":l[1]==="/"?Xte(N,k,r):k=Sa(l[0]);break;case"numberformat":k.nf=Dt(Sa(l[0]).Format||"General"),Rf[k.nf]&&(k.nf=Rf[k.nf]);for(var ae=0;ae!=392&&it[ae]!=k.nf;++ae);if(ae==392){for(ae=57;ae!=392;++ae)if(it[ae]==null){Hi(k.nf,ae);break}}break;case"column":if(c[c.length-1][0]!=="table")break;if(V=Sa(l[0]),V.Hidden&&(V.hidden=!0,delete V.Hidden),V.Width&&(V.wpx=parseInt(V.Width,10)),!F&&V.wpx>10){F=!0,$n=SR;for(var ne=0;ne<Y.length;++ne)Y[ne]&&ol(Y[ne])}F&&ol(V),Y[V.Index-1||Y.length]=V;for(var Se=0;Se<+V.Span;++Se)Y[Y.length]=xr(V);break;case"namedrange":if(l[1]==="/")break;I.Names||(I.Names=[]);var B=ft(l[0]),qe={Name:B.Name,Ref:Ou(B.RefersTo.slice(1),{r:0,c:0})};I.Sheets.length>0&&(qe.Sheet=I.Sheets.length-1),I.Names.push(qe);break;case"namedcell":break;case"b":break;case"i":break;case"u":break;case"s":break;case"em":break;case"h2":break;case"h3":break;case"sub":break;case"sup":break;case"span":break;case"alignment":break;case"borders":break;case"border":break;case"font":if(l[0].slice(-2)==="/>")break;l[1]==="/"?S+=n.slice(E,l.index):E=l.index+l[0].length;break;case"interior":if(!r.cellStyles)break;k.Interior=Sa(l[0]);break;case"protection":break;case"author":case"title":case"description":case"created":case"keywords":case"subject":case"category":case"company":case"lastauthor":case"lastsaved":case"lastprinted":case"version":case"revision":case"totaltime":case"hyperlinkbase":case"manager":case"contentstatus":case"identifier":case"language":case"appname":if(l[0].slice(-2)==="/>")break;l[1]==="/"?_q(T,J,n.slice(P,l.index)):P=l.index+l[0].length;break;case"paragraphs":break;case"styles":case"workbook":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else c.push([l[3],!1]);break;case"comment":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"));
vendor: 5,362 bytes, line 652
652Jte(Q),U.push(Q)}else c.push([l[3],!1]),u=Sa(l[0]),Q={a:u.Author};break;case"autofilter":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else if(l[0].charAt(l[0].length-2)!=="/"){var ue=Sa(l[0]);h["!autofilter"]={ref:Ou(ue.Range).replace(/\$/g,"")},c.push([l[3],!0])}break;case"name":break;case"datavalidation":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else l[0].charAt(l[0].length-2)!=="/"&&c.push([l[3],!0]);break;case"pixelsperinch":break;case"componentoptions":case"documentproperties":case"customdocumentproperties":case"officedocumentsettings":case"pivottable":case"pivotcache":case"names":case"mapinfo":case"pagebreaks":case"querytable":case"sorting":case"schema":case"conditionalformatting":case"smarttagtype":case"smarttags":case"excelworkbook":case"workbookoptions":case"worksheetoptions":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else l[0].charAt(l[0].length-2)!=="/"&&c.push([l[3],!0]);break;case"null":break;default:if(c.length==0&&l[3]=="document"||c.length==0&&l[3]=="uof")return Wj(n,r);var Re=!0;switch(c[c.length-1][0]){case"officedocumentsettings":switch(l[3]){case"allowpng":break;case"removepersonalinformation":break;case"downloadcomponents":break;case"locationofcomponents":break;case"colors":break;case"color":break;case"index":break;case"rgb":break;case"targetscreensize":break;case"readonlyrecommended":break;default:Re=!1}break;case"componentoptions":switch(l[3]){case"toolbar":break;case"hideofficelogo":break;case"spreadsheetautofit":break;case"label":break;case"caption":break;case"maxheight":break;case"maxwidth":break;case"nextsheetnumber":break;default:Re=!1}break;case"excelworkbook":switch(l[3]){case"date1904":I.WBProps.date1904=!0;break;case"windowheight":break;case"windowwidth":break;case"windowtopx":break;case"windowtopy":break;case"tabratio":break;case"protectstructure":break;case"protectwindow":break;case"protectwindows":break;case"activesheet":break;case"displayinknotes":break;case"firstvisiblesheet":break;case"supbook":break;case"sheetname":break;case"sheetindex":break;case"sheetindexfirst":break;case"sheetindexlast":break;case"dll":break;case"acceptlabelsinformulas":break;case"donotsavelinkvalues":break;case"iteration":break;case"maxiterations":break;case"maxchange":break;case"path":break;case"xct":break;case"count":break;case"selectedsheets":break;case"calculation":break;case"uncalced":break;case"startupprompt":break;case"crn":break;case"externname":break;case"formula":break;case"colfirst":break;case"collast":break;case"wantadvise":break;case"boolean":break;case"error":break;case"text":break;case"ole":break;case"noautorecover":break;case"publishobjects":break;case"donotcalculatebeforesave":break;case"number":break;case"refmoder1c1":break;case"embedsavesmarttags":break;default:Re=!1}break;case"workbookoptions":switch(l[3]){case"owcversion":break;case"height":break;case"width":break;default:Re=!1}break;case"worksheetoptions":switch(l[3]){case"visible":if(l[0].slice(-2)!=="/>")if(l[1]==="/")switch(n.slice(P,l.index)){case"SheetHidden":z.Hidden=1;break;case"SheetVeryHidden":z.Hidden=2;break}else P=l.index+l[0].length;break;case"header":h["!margins"]||ac(h["!margins"]={},"xlml"),isNaN(+ft(l[0]).Margin)||(h["!margins"].header=+ft(l[0]).Margin);break;case"footer":h["!margins"]||ac(h["!margins"]={},"xlml"),isNaN(+ft(l[0]).Margin)||(h["!margins"].footer=+ft(l[0]).Margin);break;case"pagemargins":var Ce=ft(l[0]);h["!margins"]||ac(h["!margins"]={},"xlml"),isNaN(+Ce.Top)||(h["!margins"].top=+Ce.Top),isNaN(+Ce.Left)||(h["!margins"].left=+Ce.Left),isNaN(+Ce.Right)||(h["!margins"].right=+Ce.Right),isNaN(+Ce.Bottom)||(h["!margins"].bottom=+Ce.Bottom);break;case"displayrighttoleft":I.Views||(I.Views=[]),I.Views[0]||(I.Views[0]={}),I.Views[0].RTL=!0;break;case"freezepanes":break;case"frozennosplit":break;case"splithorizontal":case"splitvertical":break;case"donotdisplaygridlines":break;case"activerow":break;case"activecol":break;case"toprowbottompane":break;case"leftcolumnrightpane":break;case"unsynced":break;case"print":break;case"printerrors":break;case"panes":break;case"scale":break;case"pane":break;case"number":break;case"layout":break;case"pagesetup":break;case"selected":break;case"protectobjects":break;case"enableselection":break;case"protectscenarios":break;case"validprinterinfo":break;case"horizontalresolution":break;case"verticalresolution":break;case"numberofcopies":break;case"activepane":break;case"toprowvisible":break;case"leftcolumnvisible":break;case"fittopage":break;case"rangeselection":break;case"papersizeindex":break;case"pagelayoutzoom":break;case"pagebreakzoom":break;case"filteron":break;case"fitwidth":break;case"fitheight":break;case"commentslayout":break;case"zoom":break;case"lefttoright":break;case"gridlines":break;case"allowsort":break;case"allowfilter":break;case"allowinsertrows":break;case"allowdeleterows":break;case"allowinsertcols":break;case"allowdeletecols":break;case"allowinserthyperlinks":break;case"allowformatcells":break;case"allowsizecols":break;case"allowsizerows":break;case"nosummaryrowsbelowdetail":h["!outline"]||(h["!outline"]={}),h["!outline"].above=!0;break;case"tabcolorindex":break;case"donotdisplayheadings":break;case"showpagelayoutzoom":break;case"nosummarycolumnsrightdetail":h["!outline"]||(h["!outline"]={}
652),h["!outline"].left=!0;break;case"blackandwhite":break;case"donotdisplayzeros":break;case"displaypagebreak":break;case"rowcolheadings":break;case"donotdisplayoutline":break;case"noorientation":break;case"allowusepivottables":break;case"zeroheight":break;case"viewablerange":break;case"selection":break;case"protectcontents":break;default:Re=!1}break;case"pivottable":case"pivotcache":switch(l[3]){case"immediateitemsondrop":break;case"showpagemultipleitemlabel":break;case"compactrowindent":break;case"location":break;case"pivotfield":break;case"orientation":break;case"layoutform":break;case"layoutsubtotallocation":break;case"layoutcompactrow":break;case"position":break;case"pivotitem":break;case"datatype":break;case"datafield":break;case"sourcename":break;case"parentfield":break;case"ptlineitems":break;case"ptlineitem":break;case"countofsameitems":break;case"item":break;case"itemtype":break;case"ptsource":break;case"cacheindex":break;case"consolidationreference":break;case"filename":break;case"reference":break;case"nocolumngrand":break;case"norowgrand":break;case"blanklineafteritems":break;case"hidden":break;case"subtotal":break;case"basefield":break;case"mapchilditems":break;case"function":break;case"refreshonfileopen":break;case"printsettitles":break;case"mergelabels":break;case"defaultversion":break;case"refreshname":break;case"refreshdate":break;case"refreshdatecopy":break;case"versionlastrefresh":break;case"versionlastupdate":break;case"versionupdateablemin":break;case"versionrefreshablemin":break;case"calculation":break;default:Re=!1}break;case"pagebreaks":switch(l[3]){case"colbreaks":break;case"colbreak":break;case"rowbreaks":break;case"rowbreak":break;case"colstart":break;case"colend":break;case"rowend":break;default:Re=!1}break;case"autofilter":switch(l[3]){case"autofiltercolumn":break;case"autofiltercondition":break;case"autofilterand":break;case"autofilteror":break;default:Re=!1}break;case"querytable":switch(l[3]){case"id":break;case"autoformatfont":break;case"autoformatpattern":break;case"querysource":break;case"querytype":break;case"enableredirections":break;case"refreshedinxl9":break;case"urlstring":break;case"htmltables":break;case"connection":break;case"commandtext":break;case"refreshinfo":break;case"notitles":break;case"nextid":break;case"columninfo":break;case"overwritecells":break;case"donotpromptforfile":break;case"textwizardsettings":break;case"source":break;case"number":break;case"decimal":break;case"thousandseparator":break;case"trailingminusnumbers":break;case"formatsettings":break;case"fieldtype":break;case"delimiters":break;case"tab":break;case"comma":break;case"autoformatname":break;case"versionlastedit":break;case"versionlastrefresh":break;default:Re=!1}break;case"datavalidation":switch(l[3]){case"range":break;case"type":break;case"min":break;case"max":break;case"sort":break;case"descending":break;case"order":break;case"casesensitive":break;case"value":break;case"errorstyle":break;case"errormessage":break;case"errortitle":break;case"inputmessage":break;case"inputtitle":break;case"combohide":break;case"inputhide":break;case"condition":break;case"qualifier":break;case"useblank":break;case"value1":break;case"value2":break;case"format":break;case"cellrangelist":break;default:Re=!1}break;case"sorting":case"conditionalformatting":switch(l[3]){case"range":break;case"type":break;case"min":break;case"max":break;case"sort":break;case"descending":break;case"order":break;case"casesensitive":break;case"value":break;case"errorstyle":break;case"errormessage":break;case"errortitle":break;case"cellrangelist":break;case"inputmessage":break;case"inputtitle":break;case"combohide":break;case"inputhide":break;case"condition":break;case"qualifier":break;case"useblank":break;case"value1":break;case"value2":break;case"format":break;default:Re=!1}break;case"mapinfo":case"schema":case"data":switch(l[3]){case"map":break;case"entry":break;case"range":break;case"xpath":break;case"field":break;case"xsdtype":break;case"filteron":break;case"aggregate":break;case"elementtype":break;case"attributetype":break;case"schema":case"element":case"complextype":case"datatype":case"all":case"attribute":case"extends":break;case"row":break;default:Re=!1}break;case"smarttags":break;default:Re=!1;break}if(Re||l[3].match(/!\[CDATA/))break;if(!c[c.length-1][1])throw"Unrecognized tag: "+l[3]+"|"+c.join("|");if(c[c.length-1][0]==="customdocumentproperties"){if(l[0].slice(-2)==="/>")break;l[1]==="/"?Kte(R,J,D,n.slice(P,l.index)):(D=l,P=l.index+l[0].length);break}if(r.WTF)throw"Unrecognized tag: "+l[3]+"|"+c.join("|")}var pe={};return!r.bookSheets&&!r.bookProps&&(pe.Sheets=d),pe.SheetNames=f,pe.Workbook=I,pe.SSF=xr(it),pe.Props=T,pe.Custprops=R,pe}function Jy(e,t){switch(L_(t=t||{}),t.type||"base64"){case"base64":return zv(Gs(e),t);case"binary":case"buffer":case"file":return zv(e,t);case"array":return zv(vl(e),t)}}function Zte(e,t){var r=[];return e.Props&&r.push(Nq(e.Props,t)),e.Custprops&&r.push(Sq(e.Props,e.Custprops)),r.join("")}function ere(){return""}function tre(e,t){var r=['<Style ss:ID="Default" ss:Name="Normal"><NumberFormat/></Style>'];
vendor: 10,206 bytes, line 652
652return t.cellXfs.forEach(function(n,s){var a=[];a.push(De("NumberFormat",null,{"ss:Format":Jt(it[n.numFmtId])}));var o={"ss:ID":"s"+(21+s)};r.push(De("Style",a.join(""),o))}),De("Styles",r.join(""))}function QR(e){return De("NamedRange",null,{"ss:Name":e.Name,"ss:RefersTo":"="+R_(e.Ref,{r:0,c:0})})}function rre(e){if(!((e||{}).Workbook||{}).Names)return"";for(var t=e.Workbook.Names,r=[],n=0;n<t.length;++n){var s=t[n];s.Sheet==null&&(s.Name.match(/^_xlfn\./)||r.push(QR(s)))}return De("Names",r.join(""))}function nre(e,t,r,n){if(!e||!((n||{}).Workbook||{}).Names)return"";for(var s=n.Workbook.Names,a=[],o=0;o<s.length;++o){var l=s[o];l.Sheet==r&&(l.Name.match(/^_xlfn\./)||a.push(QR(l)))}return a.join("")}function sre(e,t,r,n){if(!e)return"";var s=[];if(e["!margins"]&&(s.push("<PageSetup>"),e["!margins"].header&&s.push(De("Header",null,{"x:Margin":e["!margins"].header})),e["!margins"].footer&&s.push(De("Footer",null,{"x:Margin":e["!margins"].footer})),s.push(De("PageMargins",null,{"x:Bottom":e["!margins"].bottom||"0.75","x:Left":e["!margins"].left||"0.7","x:Right":e["!margins"].right||"0.7","x:Top":e["!margins"].top||"0.75"})),s.push("</PageSetup>")),n&&n.Workbook&&n.Workbook.Sheets&&n.Workbook.Sheets[r])if(n.Workbook.Sheets[r].Hidden)s.push(De("Visible",n.Workbook.Sheets[r].Hidden==1?"SheetHidden":"SheetVeryHidden",{}));else{for(var a=0;a<r&&!(n.Workbook.Sheets[a]&&!n.Workbook.Sheets[a].Hidden);++a);a==r&&s.push("<Selected/>")}return((((n||{}).Workbook||{}).Views||[])[0]||{}).RTL&&s.push("<DisplayRightToLeft/>"),e["!protect"]&&(s.push(En("ProtectContents","True")),e["!protect"].objects&&s.push(En("ProtectObjects","True")),e["!protect"].scenarios&&s.push(En("ProtectScenarios","True")),e["!protect"].selectLockedCells!=null&&!e["!protect"].selectLockedCells?s.push(En("EnableSelection","NoSelection")):e["!protect"].selectUnlockedCells!=null&&!e["!protect"].selectUnlockedCells&&s.push(En("EnableSelection","UnlockedCells")),[["formatCells","AllowFormatCells"],["formatColumns","AllowSizeCols"],["formatRows","AllowSizeRows"],["insertColumns","AllowInsertCols"],["insertRows","AllowInsertRows"],["insertHyperlinks","AllowInsertHyperlinks"],["deleteColumns","AllowDeleteCols"],["deleteRows","AllowDeleteRows"],["sort","AllowSort"],["autoFilter","AllowFilter"],["pivotTables","AllowUsePivotTables"]].forEach(function(o){e["!protect"][o[0]]&&s.push("<"+o[1]+"/>")})),s.length==0?"":De("WorksheetOptions",s.join(""),{xmlns:Rs.x})}function are(e){return e.map(function(t){var r=jG(t.t||""),n=De("ss:Data",r,{xmlns:"http://www.w3.org/TR/REC-html40"});return De("Comment",n,{"ss:Author":t.a})}).join("")}function ire(e,t,r,n,s,a,o){if(!e||e.v==null&&e.f==null)return"";var l={};if(e.f&&(l["ss:Formula"]="="+Jt(R_(e.f,o))),e.F&&e.F.slice(0,t.length)==t){var c=jr(e.F.slice(t.length+1));l["ss:ArrayRange"]="RC:R"+(c.r==o.r?"":"["+(c.r-o.r)+"]")+"C"+(c.c==o.c?"":"["+(c.c-o.c)+"]")}if(e.l&&e.l.Target&&(l["ss:HRef"]=Jt(e.l.Target),e.l.Tooltip&&(l["x:HRefScreenTip"]=Jt(e.l.Tooltip))),r["!merges"])for(var u=r["!merges"],d=0;d!=u.length;++d)u[d].s.c!=o.c||u[d].s.r!=o.r||(u[d].e.c>u[d].s.c&&(l["ss:MergeAcross"]=u[d].e.c-u[d].s.c),u[d].e.r>u[d].s.r&&(l["ss:MergeDown"]=u[d].e.r-u[d].s.r));var f="",h="";switch(e.t){case"z":if(!n.sheetStubs)return"";break;case"n":f="Number",h=String(e.v);break;case"b":f="Boolean",h=e.v?"1":"0";break;case"e":f="Error",h=lo[e.v];break;case"d":f="DateTime",h=new Date(e.v).toISOString(),e.z==null&&(e.z=e.z||it[14]);break;case"s":f="String",h=kG(e.v||"");break}var m=wl(n.cellXfs,e,n);l["ss:StyleID"]="s"+(21+m),l["ss:Index"]=o.c+1;var g=e.v!=null?h:"",p=e.t=="z"?"":'<Data ss:Type="'+f+'">'+g+"</Data>";return(e.c||[]).length>0&&(p+=are(e.c)),De("Cell",p,l)}function ore(e,t){var r='<Row ss:Index="'+(e+1)+'"';return t&&(t.hpt&&!t.hpx&&(t.hpx=ud(t.hpt)),t.hpx&&(r+=' ss:AutoFitHeight="0" ss:Height="'+t.hpx+'"'),t.hidden&&(r+=' ss:Hidden="1"')),r+">"}function lre(e,t,r,n){if(!e["!ref"])return"";var s=It(e["!ref"]),a=e["!merges"]||[],o=0,l=[];e["!cols"]&&e["!cols"].forEach(function(x,b){ol(x);var w=!!x.width,y=ig(b,x),_={"ss:Index":b+1};w&&(_["ss:Width"]=kh(y.width)),x.hidden&&(_["ss:Hidden"]="1"),l.push(De("Column",null,_))});for(var c=Array.isArray(e),u=s.s.r;u<=s.e.r;++u){for(var d=[ore(u,(e["!rows"]||[])[u])],f=s.s.c;f<=s.e.c;++f){var h=!1;for(o=0;o!=a.length;++o)if(!(a[o].s.c>f)&&!(a[o].s.r>u)&&!(a[o].e.c<f)&&!(a[o].e.r<u)){(a[o].s.c!=f||a[o].s.r!=u)&&(h=!0);break}if(!h){var m={r:u,c:f},g=ut(m),p=c?(e[u]||[])[f]:e[g];d.push(ire(p,g,e,t,r,n,m))}}d.push("</Row>"),d.length>2&&l.push(d.join(""))}return l.join("")}function cre(e,t,r){var n=[],s=r.SheetNames[e],a=r.Sheets[s],o=a?nre(a,t,e,r):"";return o.length>0&&n.push("<Names>"+o+"</Names>"),o=a?lre(a,t,e,r):"",o.length>0&&n.push("<Table>"+o+"</Table>"),n.push(sre(a,t,e,r)),n.join("")}function ure(e,t){t||(t={}),e.SSF||(e.SSF=xr(it)),e.SSF&&(Cd(),Zx(e.SSF),t.revssf=tg(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF,t.cellXfs=[],wl(t.cellXfs,{},{revssf:{General:0}}));var r=[];r.push(Zte(e,t)),r.push(ere()),r.push(""),r.push("");for(var n=0;n<e.SheetNames.length;++n)r.push(De("Worksheet",cre(n,t,e),{"ss:Name":Jt(e.SheetNames[n])}));return r[2]=tre(e,t),r[3]=rre(e),Gr+De("Workbook",r.join(""),{xmlns:Rs.ss,"xmlns:o":Rs.o,"xmlns:x":Rs.x,"xmlns:ss":Rs.ss,"xmlns:dt":Rs.dt,"xmlns:html":Rs.html})}function dre(e){var t={},r=e.content;if(r.l=28,t.AnsiUserType=r.read_shift(0,"lpstr-ansi"),t.AnsiClipboardFormat=rq(r),r.length-r.l<=4)return t;var n=r.read_shift(4);if(n==0||n>40||(r.l-=4,t.Reserved1=r.read_shift(0,"lpstr-ansi"),r.length-r.l<=4)||(n=r.read_shift(4),n!==1907505652)||(t.UnicodeClipboardFormat=nq(r),n=r.read_shift(4),n==0||n>40))return t;r.l-=4,t.Reserved2=r.read_shift(0,"lpwstr")}var fre=[60,1084,2066,2165,2175];function hre(e,t,r,n,s){var a=n,o=[],l=r.slice(r.l,r.l+a);if(s&&s.enc&&s.enc.insitu&&l.length>0)switch(e){case 9:case 521:case 1033:case 2057:case 47:case 405:case 225:case 406:case 312:case 404:case 10:break;case 133:break;default:s.enc.insitu(l)}o.push(l),r.l+=a;for(var c=$i(r,r.l),u=Zy[c],d=0;u!=null&&fre.indexOf(c)>-1;)a=$i(r,r.l+2),d=r.l+4,c==2066?d+=4:(c==2165||c==2175)&&(d+=12),l=r.slice(d,r.l+4+a),o.push(l),r.l+=4+a,u=Zy[c=$i(r,r.l)];var f=gn(o);jn(f,0);var h=0;f.lens=[];for(var m=0;m<o.length;++m)f.lens.push(h),h+=o[m].length;if(f.length<n)throw"XLS Record 0x"+e.toString(16)+" Truncated: "+f.length+" < "+n;return t.f(f,f.length,s)}function Za(e,t,r){if(e.t!=="z"&&e.XF){var n=0;try{n=e.z||e.XF.numFmtId||0,t.cellNF&&(e.z=it[n])}catch(a){if(t.WTF)throw a}if(!t||t.cellText!==!1)try{e.t==="e"?e.w=e.w||lo[e.v]:n===0||n=="General"?e.t==="n"?(e.v|0)===e.v?e.w=e.v.toString(10):e.w=yh(e.v):e.w=mc(e.v):e.w=xa(n,e.v,{date1904:!!r,dateNF:t&&t.dateNF})}catch(a){if(t.WTF)throw a}if(t.cellDates&&n&&e.t=="n"&&Ed(it[n]||String(n))){var s=Gl(e.v);s&&(e.t="d",e.v=new Date(s.y,s.m-1,s.d,s.H,s.M,s.S,s.u))}}}function mm(e,t,r){return{v:e,ixfe:t,t:r}}function mre(e,t){var r={opts:{}},n={},s=t.dense?[]:{},a={},o={},l=null,c=[],u="",d={},f,h="",m,g,p,x,b={},w=[],y,_,N=[],k=[],S={Sheets:[],WBProps:{date1904:!1},Views:[{}]},E={},j=function(Be){return Be<8?rc[Be]:Be<64&&k[Be-8]||rc[Be]},T=function(Be,ct,Gt){var qt=ct.XF.data;if(!(!qt||!qt.patternType||!Gt||!Gt.cellStyles)){ct.s={},ct.s.patternType=qt.patternType;var nn;(nn=Sh(j(qt.icvFore)))&&(ct.s.fgColor={rgb:nn}),(nn=Sh(j(qt.icvBack)))&&(ct.s.bgColor={rgb:nn})}},R=function(Be,ct,Gt){if(!(se>1)&&!(Gt.sheetRows&&Be.r>=Gt.sheetRows)){if(Gt.cellStyles&&ct.XF&&ct.XF.data&&T(Be,ct,Gt),delete ct.ixfe,delete ct.XF,f=Be,h=ut(Be),(!o||!o.s||!o.e)&&(o={s:{r:0,c:0},e:{r:0,c:0}}),Be.r<o.s.r&&(o.s.r=Be.r),Be.c<o.s.c&&(o.s.c=Be.c),Be.r+1>o.e.r&&(o.e.r=Be.r+1),Be.c+1>o.e.c&&(o.e.c=Be.c+1),Gt.cellFormula&&ct.f){for(var qt=0;qt<w.length;++qt)if(!(w[qt][0].s.c>Be.c||w[qt][0].s.r>Be.r)&&!(w[qt][0].e.c<Be.c||w[qt][0].e.r<Be.r)){ct.F=yt(w[qt][0]),(w[qt][0].s.c!=Be.c||w[qt][0].s.r!=Be.r)&&delete ct.f,ct.f&&(ct.f=""+Ln(w[qt][1],o,Be,C,P));break}}Gt.dense?(s[Be.r]||(s[Be.r]=[]),s[Be.r][Be.c]=ct):s[h]=ct}},P={enc:!1,sbcch:0,snames:[],sharedf:b,arrayf:w,rrtabid:[],lastuser:"",biff:8,codepage:0,winlocked:0,cellStyles:!!t&&!!t.cellStyles,WTF:!!t&&!!t.wtf};t.password&&(P.password=t.password);var D,U=[],Q=[],Y=[],V=[],F=!1,C=[];C.SheetNames=P.snames,C.sharedf=P.sharedf,C.arrayf=P.arrayf,C.names=[],C.XTI=[];var X=0,se=0,A=0,M=[],I=[],z;P.codepage=1200,Fa(1200);for(var J=!1;e.l<e.length-1;){var Z=e.l,re=e.read_shift(2);if(re===0&&X===10)break;var ae=e.l===e.length?0:e.read_shift(2),ne=Zy[re];if(ne&&ne.f){if(t.bookSheets&&X===133&&re!==133)break;if(X=re,ne.r===2||ne.r==12){var Se=e.read_shift(2);if(ae-=2,!P.enc&&Se!==re&&((Se&255)<<8|Se>>8)!==re)throw new Error("rt mismatch: "+Se+"!="+re);ne.r==12&&(e.l+=10,ae-=10)}var B={};if(re===10?B=ne.f(e,ae,P):B=hre(re,ne,e,ae,P),se==0&&[9,521,1033,2057].indexOf(X)===-1)continue;switch(re){case 34:r.opts.Date1904=S.WBProps.date1904=B;break;case 134:r.opts.WriteProtect=!0;break;case 47:if(P.enc||(e.l=0),P.enc=B,!t.password)throw new Error("File is password-protected");if(B.valid==null)throw new Error("Encryption scheme unsupported");if(!B.valid)throw new Error("Password is incorrect");break;case 92:P.lastuser=B;break;case 66:var qe=Number(B);switch(qe){case 21010:qe=1200;break;case 32768:qe=1e4;break;case 32769:qe=1252;break}Fa(P.codepage=qe),J=!0;break;case 317:P.rrtabid=B;break;case 25:P.winlocked=B;break;case 439:r.opts.RefreshAll=B;break;case 12:r.opts.CalcCount=B;break;case 16:r.opts.CalcDelta=B;break;case 17:r.opts.CalcIter=B;break;case 13:r.opts.CalcMode=B;break;case 14:r.opts.CalcPrecision=B;break;case 95:r.opts.CalcSaveRecalc=B;break;case 15:P.CalcRefMode=B;break;case 2211:r.opts.FullCalc=B;break;case 129:B.fDialog&&(s["!type"]="dialog"),B.fBelow||((s["!outline"]||(s["!outline"]={})).above=!0),B.fRight||((s["!outline"]||(s["!outline"]={})).left=!0);break;case 224:N.push(B);break;case 430:C.push([B]),C[C.length-1].XTI=[];break;case 35:case 547:C[C.length-1].push(B);break;case 24:case 536:z={Name:B.Name,Ref:Ln(B.rgce,o,null,C,P)},B.itab>0&&(z.Sheet=B.itab-1),C.names.push(z),C[0]||(C[0]=[],C[0].XTI=[]),C[C.length-1].push(B),B.Name=="_xlnm._FilterDatabase"&&B.itab>0&&B.rgce&&B.rgce[0]&&B.rgce[0][0]&&B.rgce[0][0][0]=="PtgArea3d"&&(I[B.itab-1
vendor: 5,516 bytes, line 652
652]={ref:yt(B.rgce[0][0][1][2])});break;case 22:P.ExternCount=B;break;case 23:C.length==0&&(C[0]=[],C[0].XTI=[]),C[C.length-1].XTI=C[C.length-1].XTI.concat(B),C.XTI=C.XTI.concat(B);break;case 2196:if(P.biff<8)break;z!=null&&(z.Comment=B[1]);break;case 18:s["!protect"]=B;break;case 19:B!==0&&P.WTF&&console.error("Password verifier: "+B);break;case 133:a[B.pos]=B,P.snames.push(B.name);break;case 10:{if(--se)break;if(o.e){if(o.e.r>0&&o.e.c>0){if(o.e.r--,o.e.c--,s["!ref"]=yt(o),t.sheetRows&&t.sheetRows<=o.e.r){var ue=o.e.r;o.e.r=t.sheetRows-1,s["!fullref"]=s["!ref"],s["!ref"]=yt(o),o.e.r=ue}o.e.r++,o.e.c++}U.length>0&&(s["!merges"]=U),Q.length>0&&(s["!objects"]=Q),Y.length>0&&(s["!cols"]=Y),V.length>0&&(s["!rows"]=V),S.Sheets.push(E)}u===""?d=s:n[u]=s,s=t.dense?[]:{}}break;case 9:case 521:case 1033:case 2057:{if(P.biff===8&&(P.biff={9:2,521:3,1033:4}[re]||{512:2,768:3,1024:4,1280:5,1536:8,2:2,7:2}[B.BIFFVer]||8),P.biffguess=B.BIFFVer==0,B.BIFFVer==0&&B.dt==4096&&(P.biff=5,J=!0,Fa(P.codepage=28591)),P.biff==8&&B.BIFFVer==0&&B.dt==16&&(P.biff=2),se++)break;if(s=t.dense?[]:{},P.biff<8&&!J&&(J=!0,Fa(P.codepage=t.codepage||1252)),P.biff<5||B.BIFFVer==0&&B.dt==4096){u===""&&(u="Sheet1"),o={s:{r:0,c:0},e:{r:0,c:0}};var Re={pos:e.l-ae,name:u};a[Re.pos]=Re,P.snames.push(u)}else u=(a[Z]||{name:""}).name;B.dt==32&&(s["!type"]="chart"),B.dt==64&&(s["!type"]="macro"),U=[],Q=[],P.arrayf=w=[],Y=[],V=[],F=!1,E={Hidden:(a[Z]||{hs:0}).hs,name:u}}break;case 515:case 3:case 2:s["!type"]=="chart"&&(t.dense?(s[B.r]||[])[B.c]:s[ut({c:B.c,r:B.r})])&&++B.c,y={ixfe:B.ixfe,XF:N[B.ixfe]||{},v:B.val,t:"n"},A>0&&(y.z=M[y.ixfe>>8&63]),Za(y,t,r.opts.Date1904),R({c:B.c,r:B.r},y,t);break;case 5:case 517:y={ixfe:B.ixfe,XF:N[B.ixfe],v:B.val,t:B.t},A>0&&(y.z=M[y.ixfe>>8&63]),Za(y,t,r.opts.Date1904),R({c:B.c,r:B.r},y,t);break;case 638:y={ixfe:B.ixfe,XF:N[B.ixfe],v:B.rknum,t:"n"},A>0&&(y.z=M[y.ixfe>>8&63]),Za(y,t,r.opts.Date1904),R({c:B.c,r:B.r},y,t);break;case 189:for(var Ce=B.c;Ce<=B.C;++Ce){var pe=B.rkrec[Ce-B.c][0];y={ixfe:pe,XF:N[pe],v:B.rkrec[Ce-B.c][1],t:"n"},A>0&&(y.z=M[y.ixfe>>8&63]),Za(y,t,r.opts.Date1904),R({c:Ce,r:B.r},y,t)}break;case 6:case 518:case 1030:{if(B.val=="String"){l=B;break}if(y=mm(B.val,B.cell.ixfe,B.tt),y.XF=N[y.ixfe],t.cellFormula){var fe=B.formula;if(fe&&fe[0]&&fe[0][0]&&fe[0][0][0]=="PtgExp"){var te=fe[0][0][1][0],Ne=fe[0][0][1][1],be=ut({r:te,c:Ne});b[be]?y.f=""+Ln(B.formula,o,B.cell,C,P):y.F=((t.dense?(s[te]||[])[Ne]:s[be])||{}).F}else y.f=""+Ln(B.formula,o,B.cell,C,P)}A>0&&(y.z=M[y.ixfe>>8&63]),Za(y,t,r.opts.Date1904),R(B.cell,y,t),l=B}break;case 7:case 519:if(l)l.val=B,y=mm(B,l.cell.ixfe,"s"),y.XF=N[y.ixfe],t.cellFormula&&(y.f=""+Ln(l.formula,o,l.cell,C,P)),A>0&&(y.z=M[y.ixfe>>8&63]),Za(y,t,r.opts.Date1904),R(l.cell,y,t),l=null;else throw new Error("String record expects Formula");break;case 33:case 545:{w.push(B);var Qe=ut(B[0].s);if(m=t.dense?(s[B[0].s.r]||[])[B[0].s.c]:s[Qe],t.cellFormula&&m){if(!l||!Qe||!m)break;m.f=""+Ln(B[1],o,B[0],C,P),m.F=yt(B[0])}}break;case 1212:{if(!t.cellFormula)break;if(h){if(!l)break;b[ut(l.cell)]=B[0],m=t.dense?(s[l.cell.r]||[])[l.cell.c]:s[ut(l.cell)],(m||{}).f=""+Ln(B[0],o,f,C,P)}}break;case 253:y=mm(c[B.isst].t,B.ixfe,"s"),c[B.isst].h&&(y.h=c[B.isst].h),y.XF=N[y.ixfe],A>0&&(y.z=M[y.ixfe>>8&63]),Za(y,t,r.opts.Date1904),R({c:B.c,r:B.r},y,t);break;case 513:t.sheetStubs&&(y={ixfe:B.ixfe,XF:N[B.ixfe],t:"z"},A>0&&(y.z=M[y.ixfe>>8&63]),Za(y,t,r.opts.Date1904),R({c:B.c,r:B.r},y,t));break;case 190:if(t.sheetStubs)for(var nt=B.c;nt<=B.C;++nt){var Je=B.ixfe[nt-B.c];y={ixfe:Je,XF:N[Je],t:"z"},A>0&&(y.z=M[y.ixfe>>8&63]),Za(y,t,r.opts.Date1904),R({c:nt,r:B.r},y,t)}break;case 214:case 516:case 4:y=mm(B.val,B.ixfe,"s"),y.XF=N[y.ixfe],A>0&&(y.z=M[y.ixfe>>8&63]),Za(y,t,r.opts.Date1904),R({c:B.c,r:B.r},y,t);break;case 0:case 512:se===1&&(o=B);break;case 252:c=B;break;case 1054:if(P.biff==4){M[A++]=B[1];for(var Le=0;Le<A+163&&it[Le]!=B[1];++Le);Le>=163&&Hi(B[1],A+163)}else Hi(B[1],B[0]);break;case 30:{M[A++]=B;for(var lt=0;lt<A+163&&it[lt]!=B;++lt);lt>=163&&Hi(B,A+163)}break;case 229:U=U.concat(B);break;case 93:Q[B.cmo[0]]=P.lastobj=B;break;case 438:P.lastobj.TxO=B;break;case 127:P.lastobj.ImData=B;break;case 440:for(x=B[0].s.r;x<=B[0].e.r;++x)for(p=B[0].s.c;p<=B[0].e.c;++p)m=t.dense?(s[x]||[])[p]:s[ut({c:p,r:x})],m&&(m.l=B[1]);break;case 2048:for(x=B[0].s.r;x<=B[0].e.r;++x)for(p=B[0].s.c;p<=B[0].e.c;++p)m=t.dense?(s[x]||[])[p]:s[ut({c:p,r:x})],m&&m.l&&(m.l.Tooltip=B[1]);break;case 28:{if(P.biff<=5&&P.biff>=2)break;m=t.dense?(s[B[0].r]||[])[B[0].c]:s[ut(B[0])];var _e=Q[B[2]];m||(t.dense?(s[B[0].r]||(s[B[0].r]=[]),m=s[B[0].r][B[0].c]={t:"z"}):m=s[ut(B[0])]={t:"z"},o.e.r=Math.max(o.e.r,B[0].r),o.s.r=Math.min(o.s.r,B[0].r),o.e.c=Math.max(o.e.c,B[0].c),o.s.c=Math.min(o.s.c,B[0].c)),m.c||(m.c=[]),g={a:B[1],t:_e.TxO.t},m.c.push(g)}break;case 2173:tQ(N[B.ixfe],B.ext);break;case 125:{if(!P.cellStyles)break;for(;B.e>=B.s;)Y[B.e--]={width:B.w/256,level:B.level||0,hidden:!!(B.flags&1)},F||(F=!0,T_(B.w/256)),ol(Y[B.e+1])}break;case 520:{var Te={};B.level!=null&&(V[B.r]=Te,Te.level=B.level),B.hidden&&(V[B.r]=Te,Te.hidden=!0),B.hpt&&(V[B.r]=Te,Te.hpt=B.hpt,Te.hpx=ud(B.hpt))}break;case 38:case 39:case 40:case 41:s["!margins"]||ac(s["!margins"]={}),s["!margins"][{38:"left",39:"right",40:"top",41:"bottom"}[re]]=B;break;case 161:s["!margins"]||ac(s["!margins"]={}),s["!margins"].header=B.header,s["!margins"].footer=B.footer;break;case 574:B.RTL&&(S.Views[0].RTL=!0);break;case 146:k=B;break;case 2198:D=B;break;case 140:_=B;break;
652case 442:u?E.CodeName=B||E.name:S.WBProps.CodeName=B||"ThisWorkbook";break}}else ne||console.error("Missing Info for XLS Record 0x"+re.toString(16)),e.l+=ae}return r.SheetNames=Mr(a).sort(function(et,Be){return Number(et)-Number(Be)}).map(function(et){return a[et].name}),t.bookSheets||(r.Sheets=n),!r.SheetNames.length&&d["!ref"]?(r.SheetNames.push("Sheet1"),r.Sheets&&(r.Sheets.Sheet1=d)):r.Preamble=d,r.Sheets&&I.forEach(function(et,Be){r.Sheets[r.SheetNames[Be]]["!autofilter"]=et}),r.Strings=c,r.SSF=xr(it),P.enc&&(r.Encryption=P.enc),D&&(r.Themes=D),r.Metadata={},_!==void 0&&(r.Metadata.Country=_),C.names.length>0&&(S.Names=C.names),r.Workbook=S,r}var Of={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function pre(e,t,r){var n=tt.find(e,"/!DocumentSummaryInformation");if(n&&n.size>0)try{var s=vj(n,Gy,Of.DSI);for(var a in s)t[a]=s[a]}catch(u){if(r.WTF)throw u}var o=tt.find(e,"/!SummaryInformation");if(o&&o.size>0)try{var l=vj(o,qy,Of.SI);for(var c in l)t[c]==null&&(t[c]=l[c])}catch(u){if(r.WTF)throw u}t.HeadingPairs&&t.TitlesOfParts&&(XP(t.HeadingPairs,t.TitlesOfParts,t,r),delete t.HeadingPairs,delete t.TitlesOfParts)}function xre(e,t){var r=[],n=[],s=[],a=0,o,l=Kk(Gy,"n"),c=Kk(qy,"n");if(e.Props)for(o=Mr(e.Props),a=0;a<o.length;++a)(Object.prototype.hasOwnProperty.call(l,o[a])?r:Object.prototype.hasOwnProperty.call(c,o[a])?n:s).push([o[a],e.Props[o[a]]]);if(e.Custprops)for(o=Mr(e.Custprops),a=0;a<o.length;++a)Object.prototype.hasOwnProperty.call(e.Props||{},o[a])||(Object.prototype.hasOwnProperty.call(l,o[a])?r:Object.prototype.hasOwnProperty.call(c,o[a])?n:s).push([o[a],e.Custprops[o[a]]]);var u=[];for(a=0;a<s.length;++a)nR.indexOf(s[a][0])>-1||YP.indexOf(s[a][0])>-1||s[a][1]!=null&&u.push(s[a]);n.length&&tt.utils.cfb_add(t,"/�SummaryInformation",yj(n,Of.SI,c,qy)),(r.length||u.length)&&tt.utils.cfb_add(t,"/�DocumentSummaryInformation",yj(r,Of.DSI,l,Gy,u.length?u:null,Of.UDI))}function JR(e,t){t||(t={}),L_(t),a_(),t.codepage&&s_(t.codepage);var r,n;if(e.FullPaths){if(tt.find(e,"/encryption"))throw new Error("File is password-protected");r=tt.find(e,"!CompObj"),n=tt.find(e,"/Workbook")||tt.find(e,"/Book")}else{switch(t.type){case"base64":e=Fs(Gs(e));break;case"binary":e=Fs(e);break;case"buffer":break;case"array":Array.isArray(e)||(e=Array.prototype.slice.call(e));break}jn(e,0),n={content:e}}var s,a;if(r&&dre(r),t.bookProps&&!t.bookSheets)s={};else{var o=Nt?"buffer":"array";if(n&&n.content)s=mre(n.content,t);else if((a=tt.find(e,"PerfectOffice_MAIN"))&&a.content)s=sc.to_workbook(a.content,(t.type=o,t));else if((a=tt.find(e,"NativeContent_MAIN"))&&a.content)s=sc.to_workbook(a.content,(t.type=o,t));else throw(a=tt.find(e,"MN0"))&&a.content?new Error("Unsupported Works 4 for Mac file"):new Error("Cannot find Workbook stream");t.bookVBA&&e.FullPaths&&tt.find(e,"/_VBA_PROJECT_CUR/VBA/dir")&&(s.vbaraw=TQ(e))}var l={};return e.FullPaths&&pre(e,l,t),s.Props=s.Custprops=l,t.bookFiles&&(s.cfb=e),s}function gre(e,t){var r=t||{},n=tt.utils.cfb_new({root:"R"}),s="/Workbook";switch(r.bookType||"xls"){case"xls":r.bookType="biff8";case"xla":r.bookType||(r.bookType="xla");case"biff8":s="/Workbook",r.biff=8;break;case"biff5":s="/Book",r.biff=5;break;default:throw new Error("invalid type "+r.bookType+" for XLS CFB")}return tt.utils.cfb_add(n,s,ZR(e,r)),r.biff==8&&(e.Props||e.Custprops)&&xre(e,n),r.biff==8&&e.vbaraw&&AQ(n,tt.read(e.vbaraw,{type:typeof e.vbaraw=="string"?"binary":"buffer"})),n}var Ch={0:{f:UZ},1:{f:YZ},2:{f:mee},3:{f:nee},4:{f:ZZ},5:{f:dee},6:{f:yee},7:{f:oee},8:{f:jee},9:{f:kee},10:{f:Nee},11:{f:See},12:{f:QZ},13:{f:xee},14:{f:aee},15:{f:tee},16:{f:HR},17:{f:bee},18:{f:cee},19:{f:y_},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:bte},40:{},42:{},43:{f:yX},44:{f:gX},45:{f:_X},46:{f:SX},47:{f:NX},48:{},49:{f:HG},50:{},51:{f:sQ},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:mR},62:{f:vee},63:{f:hQ},64:{f:Wee},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:Vn,p:0}
vendor: 13,472 bytes, line 652
652,132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:Lee},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:qZ},148:{f:HZ,p:16},151:{f:Ree},152:{},153:{f:vte},154:{},155:{},156:{f:xte},157:{},158:{},159:{T:1,f:DY},160:{T:-1},161:{T:1,f:Pc},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:Eee},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:rQ},336:{T:-1},337:{f:oQ,T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:Vy},357:{},358:{},359:{},360:{T:1},361:{},362:{f:hR},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:Oee},427:{f:Dee},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:Fee},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:GZ},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:Aee},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:Vy},551:{},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:SQ},633:{T:1},634:{T:-1},635:{T:1,f:_Q},636:{T:-1},637:{f:KG},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:ate},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:zee},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}},Zy={6:{f:Uv},10:{f:po},12:{f:Qr},13:{f:Qr},14:{f:Br},15:{f:Br},16:{f:Un},17:{f:Br},18:{f:Br},19:{f:Qr},20:{f:kj},21:{f:kj},23:{f:hR},24:{f:Ej},25:{f:Br},26:{},27:{},28:{f:zK},29:{},34:{f:Br},35:{f:jj},38:{f:Un},39:{f:Un},40:{f:Un},41:{f:Un},42:{f:Br},43:{f:Br},47:{f:tX},49:{f:xK},51:{f:Qr},60:{},61:{f:dK},64:{f:Br},65:{f:pK},66:{f:Qr},77:{},80:{},81:{},82:{},85:{f:Qr},89:{},90:{},91:{},92:{f:eK},93:{f:GK},94:{},95:{f:Br},96:{},97:{},99:{f:Br},125:{f:mR},128:{f:PK},129:{f:rK},130:{f:Qr},131:{f:Br},132:{f:Br},133:{f:nK},134:{},140:{f:eY},141:{f:Qr},144:{},146:{f:nY},151:{},152:{},153:{},154:{},155:{},156:{f:Qr},157:{},158:{},160:{f:uY},161:{f:iY},174:{},175:{},176:{},177:{},178:{},180:{},181:{},182:{},184:{},185:{},189:{f:EK},190:{f:CK},193:{f:po},197:{},198:{},199:{},200:{},201:{},202:{f:Br},203:{},204:{},205:{},206:{},207:{},208:{},209:{},210:{},211:{},213:{},215:{},216:{},217:{},218:{f:Qr},220:{},221:{f:Br},222:{},224:{f:AK},225:{f:Zq},226:{f:po},227:{},229:{f:HK},233:{},235:{},236:{},237:{},239:{},240:{},241:{},242:{},244:{},245:{},246:{},247:{},248:{},249:{},251:{},252:{f:aK},253:{f:vK},255:{f:oK},256:{},259:{},290:{},311:{},312:{},315:{},317:{f:sR},318:{},319:{},320:{},330:{},331:{},333:{},334:{},335:{},336:{},337:{},338:{},339:{},340:{},351:{},352:{f:Br},353:{f:po},401:{},402:{},403:{},404:{},405:{},406:{},407:{},408:{},425:{},426:{},427:{},428:{},429:{},430:{f:FK},431:{f:Br},432:{},433:{},434:{},437:{},438:{f:YK},439:{f:Br},440:{f:XK},441:{},442:{f:c0},443:{},444:{f:Qr},445:{},446:{},448:{f:po},449:{f:uK,r:2},450:{f:po},512:{f:_j},513:{f:cY},515:{f:DK},516:{f:wK},517:{f:Sj},519:{f:dY},520:{f:lK},523:{},545:{f:Cj},549:{f:bj},566:{},574:{f:hK},638:{f:jK},659:{},1048:{},1054:{f:_K},1084:{},1212:{f:$K},2048:{f:JK},2049:{},2050:{},2051:{},2052:{},2053:{},2054:{},2055:{},2056:{},2057:{f:dm},2058:{},2059:{},2060:{},2061:{},2062:{},2063:{},2064:{},2066:{},2067:{},2128:{},2129:{},2130:{},2131:{},2132:{},2133:{},2134:{},2135:{},2136:{},2137:{},2138:{},2146:{},2147:{r:12},2148:{},2149:{},2150:{},2151:{f:po},2152:{},2154:{},2155:{},2156:{},2161:{},2162:{},2164:{},2165:{},2166:{},2167:{},2168:{},2169:{},2170:{},2171:{},2172:{f:sY,r:12},2173:{f:eQ,r:12},2174:{},2175:{},2180:{},2181:{},2182:{},2183:{},2184:{},2185:{},2186:{},2187:{},2188:{f:Br,r:12},2189:{},2190:{r:12},2191:{},2192:{},2194:{},2195:{},2196:{f:BK,r:12},2197:{},2198:{f:KX,r:12},2199:{},2200:{},2201:{},2202:{f:UK,r:12},2203:{f:po},2204:{},2205:{},2206:{},2207:{},2211:{f:cK},2212:{},2213:{},2214:{},2215:{},4097:{},4098:{},4099:{},4102:{},4103:{},4105:{},4106:{},4107:{},4108:{},4109:{},4116:{},4117:{},4118:{},4119:{},4120:{},4121:{},4122:{},4123:{},4124:{},4125:{},4126:{},4127:{},4128:{},4129:{},4130:{},4132:{},4133:{},4134:{f:Qr},4135:{},4146:{},4147:{},4148:{},4149:{},4154:{},4156:{},4157:{},4158:{},4159:{},4160:{},4161:{},4163:{},4164:{f:oY},4165:{},4166:{},4168:{},4170:{},4171:{},4174:{},4175:{},4176:{},4177:{},4187:{},4188:{f:rY},4189:{},4191:{},4192:{},4193:{},4194:{},4195:{},4196:{},4197:{},4198:{},4199:{},4200:{},0:{f:_j},1:{},2:{f:xY},3:{f:mY},4:{f:hY},5:{f:Sj},7:{f:vY},8:{},9:{f:dm},11:{},22:{f:Qr},30:{f:SK},31:{},32:{},33:{f:Cj},36:{},37:{f:bj},50:{f:yY},62:{},52:{},67:{},68:{f:Qr},69:{},86:{},126:{},127:{f:fY},135:{},136:{},137:{},145:{},148:{},149:{},150:{},169:{},171:{},188:{},191:{},192:{},194:{},195:{},214:{f:wY},223:{},234:{},354:{},421:{},518:{f:Uv},521:{f:dm},536:{f:Ej},547:{f:jj},561:{},579:{},1030:{f:Uv},1033:{f:dm},1091:{},2157:{},2163:{},2177:{},2240:{},2241:{},2242:{},2243:{},2244:{},2245:{},2246:{},2247:{},2248:{},2249:{},2250:{},2251:{},2262:{r:12},29282:{}};function Ie(e,t,r,n){var s=t;if(!isNaN(s)){var a=n||(r||[]).length||0,o=e.next(4);o.write_shift(2,s),o.write_shift(2,a),a>0&&x_(r)&&e.push(r)}}function vre(e,t,r,n){var s=(r||[]).length||0;if(s<=8224)return Ie(e,t,r,s);var a=t;if(!isNaN(a)){for(var o=r.parts||[],l=0,c=0,u=0;u+(o[l]||8224)<=8224;)u+=o[l]||8224,l++;var d=e.next(4);for(d.write_shift(2,a),d.write_shift(2,u),e.push(r.slice(c,c+u)),c+=u;c<s;){for(d=e.next(4),d.write_shift(2,60),u=0;u+(o[l]||8224)<=8224;)u+=o[l]||8224,l++;d.write_shift(2,u),e.push(r.slice(c,c+u)),c+=u}}}function h0(e,t,r){return e||(e=he(7)),e.write_shift(2,t),e.write_shift(2,r),e.write_shift(2,0),e.write_shift(1,0),e}function yre(e,t,r,n){var s=he(9);return h0(s,e,t),aR(r,n||"b",s),s}function wre(e,t,r){var n=he(8+2*r.length);return h0(n,e,t),n.write_shift(1,r.length),n.write_shift(r.length,r,"sbcs"),n.l<n.length?n.slice(0,n.l):n}function bre(e,t,r,n){if(t.v!=null)switch(t.t){case"d":case"n":var s=t.t=="d"?dn(pr(t.v)):t.v;s==(s|0)&&s>=0&&s<65536?Ie(e,2,gY(r,n,s)):Ie(e,3,pY(r,n,s));return;case"b":case"e":Ie(e,5,yre(r,n,t.v,t.t));return;case"s":case"str":Ie(e,4,wre(r,n,(t.v||"").slice(0,255)));return}Ie(e,1,h0(null,r,n))}function _re(e,t,r,n){var s=Array.isArray(t),a=It(t["!ref"]||"A1"),o,l="",c=[];if(a.e.c>255||a.e.r>16383){if(n.WTF)throw new Error("Range "+(t["!ref"]||"A1")+" exceeds format limit A1:IV16384");a.e.c=Math.min(a.e.c,255),a.e.r=Math.min(a.e.c,16383),o=yt(a)}for(var u=a.s.r;u<=a.e.r;++u){l=Vr(u);for(var d=a.s.c;d<=a.e.c;++d){u===a.s.r&&(c[d]=kr(d)),o=c[d]+l;var f=s?(t[u]||[])[d]:t[o];f&&bre(e,f,u,d)}}}function Nre(e,t){for(var r=t||{},n=ms(),s=0,a=0;a<e.SheetNames.length;++a)e.SheetNames[a]==r.sheet&&(s=a);if(s==0&&r.sheet&&e.SheetNames[0]!=r.sheet)throw new Error("Sheet not found: "+r.sheet);return Ie(n,r.biff==4?1033:r.biff==3?521:9,j_(e,16,r)),_re(n,e.Sheets[e.SheetNames[s]],s,r),Ie(n,10),n.end()}function Sre(e,t,r){Ie(e,49,gK({sz:12,color:{theme:1},name:"Arial",family:2,scheme:"minor"},r))}
vendor: 5,918 bytes, line 652
652function kre(e,t,r){t&&[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var s=n[0];s<=n[1];++s)t[s]!=null&&Ie(e,1054,NK(s,t[s],r))})}function jre(e,t){var r=he(19);r.write_shift(4,2151),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(2,3),r.write_shift(1,1),r.write_shift(4,0),Ie(e,2151,r),r=he(39),r.write_shift(4,2152),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(2,3),r.write_shift(1,0),r.write_shift(4,0),r.write_shift(2,1),r.write_shift(4,4),r.write_shift(2,0),uR(It(t["!ref"]||"A1"),r),r.write_shift(4,4),Ie(e,2152,r)}function Ere(e,t){for(var r=0;r<16;++r)Ie(e,224,Nj({numFmtId:0,style:!0},0,t));t.cellXfs.forEach(function(n){Ie(e,224,Nj(n,0,t))})}function Cre(e,t){for(var r=0;r<t["!links"].length;++r){var n=t["!links"][r];Ie(e,440,QK(n)),n[1].Tooltip&&Ie(e,2048,ZK(n))}delete t["!links"]}function Tre(e,t){if(t){var r=0;t.forEach(function(n,s){++r<=256&&n&&Ie(e,125,aY(ig(s,n),s))})}}function Are(e,t,r,n,s){var a=16+wl(s.cellXfs,t,s);if(t.v==null&&!t.bf){Ie(e,513,vc(r,n,a));return}if(t.bf)Ie(e,6,rZ(t,r,n,s,a));else switch(t.t){case"d":case"n":var o=t.t=="d"?dn(pr(t.v)):t.v;Ie(e,515,IK(r,n,o,a));break;case"b":case"e":Ie(e,517,OK(r,n,t.v,a,s,t.t));break;case"s":case"str":if(s.bookSST){var l=D_(s.Strings,t.v,s.revStrings);Ie(e,253,yK(r,n,l,a))}else Ie(e,516,bK(r,n,(t.v||"").slice(0,255),a,s));break;default:Ie(e,513,vc(r,n,a))}}function Pre(e,t,r){var n=ms(),s=r.SheetNames[e],a=r.Sheets[s]||{},o=(r||{}).Workbook||{},l=(o.Sheets||[])[e]||{},c=Array.isArray(a),u=t.biff==8,d,f="",h=[],m=It(a["!ref"]||"A1"),g=u?65536:16384;if(m.e.c>255||m.e.r>=g){if(t.WTF)throw new Error("Range "+(a["!ref"]||"A1")+" exceeds format limit A1:IV16384");m.e.c=Math.min(m.e.c,255),m.e.r=Math.min(m.e.c,g-1)}Ie(n,2057,j_(r,16,t)),Ie(n,13,sa(1)),Ie(n,12,sa(100)),Ie(n,15,Xn(!0)),Ie(n,17,Xn(!1)),Ie(n,16,xc(.001)),Ie(n,95,Xn(!0)),Ie(n,42,Xn(!1)),Ie(n,43,Xn(!1)),Ie(n,130,sa(1)),Ie(n,128,RK()),Ie(n,131,Xn(!1)),Ie(n,132,Xn(!1)),u&&Tre(n,a["!cols"]),Ie(n,512,kK(m,t)),u&&(a["!links"]=[]);for(var p=m.s.r;p<=m.e.r;++p){f=Vr(p);for(var x=m.s.c;x<=m.e.c;++x){p===m.s.r&&(h[x]=kr(x)),d=h[x]+f;var b=c?(a[p]||[])[x]:a[d];b&&(Are(n,b,p,x,t),u&&b.l&&a["!links"].push([d,b.l]))}}var w=l.CodeName||l.name||s;return u&&Ie(n,574,mK((o.Views||[])[0])),u&&(a["!merges"]||[]).length&&Ie(n,229,VK(a["!merges"])),u&&Cre(n,a),Ie(n,442,iR(w)),u&&jre(n,a),Ie(n,10),n.end()}function Rre(e,t,r){var n=ms(),s=(e||{}).Workbook||{},a=s.Sheets||[],o=s.WBProps||{},l=r.biff==8,c=r.biff==5;if(Ie(n,2057,j_(e,5,r)),r.bookType=="xla"&&Ie(n,135),Ie(n,225,l?sa(1200):null),Ie(n,193,Oq(2)),c&&Ie(n,191),c&&Ie(n,192),Ie(n,226),Ie(n,92,tK("SheetJS",r)),Ie(n,66,sa(l?1200:1252)),l&&Ie(n,353,sa(0)),l&&Ie(n,448),Ie(n,317,lY(e.SheetNames.length)),l&&e.vbaraw&&Ie(n,211),l&&e.vbaraw){var u=o.CodeName||"ThisWorkbook";Ie(n,442,iR(u))}Ie(n,156,sa(17)),Ie(n,25,Xn(!1)),Ie(n,18,Xn(!1)),Ie(n,19,sa(0)),l&&Ie(n,431,Xn(!1)),l&&Ie(n,444,sa(0)),Ie(n,61,fK()),Ie(n,64,Xn(!1)),Ie(n,141,sa(0)),Ie(n,34,Xn(ute(e)=="true")),Ie(n,14,Xn(!0)),l&&Ie(n,439,Xn(!1)),Ie(n,218,sa(0)),Sre(n,e,r),kre(n,e.SSF,r),Ere(n,r),l&&Ie(n,352,Xn(!1));var d=n.end(),f=ms();l&&Ie(f,140,tY()),l&&r.Strings&&vre(f,252,iK(r.Strings)),Ie(f,10);var h=f.end(),m=ms(),g=0,p=0;for(p=0;p<e.SheetNames.length;++p)g+=(l?12:11)+(l?2:1)*e.SheetNames[p].length;var x=d.length+g+h.length;for(p=0;p<e.SheetNames.length;++p){var b=a[p]||{};Ie(m,133,sK({pos:x,hs:b.Hidden||0,dt:0,name:e.SheetNames[p]},r)),x+=t[p].length}var w=m.end();if(g!=w.length)throw new Error("BS8 "+g+" != "+w.length);var y=[];return d.length&&y.push(d),w.length&&y.push(w),h.length&&y.push(h),gn(y)}function Ore(e,t){var r=t||{},n=[];e&&!e.SSF&&(e.SSF=xr(it)),e&&e.SSF&&(Cd(),Zx(e.SSF),r.revssf=tg(e.SSF),r.revssf[e.SSF[65535]]=0,r.ssf=e.SSF),r.Strings=[],r.Strings.Count=0,r.Strings.Unique=0,B_(r),r.cellXfs=[],wl(r.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={});for(var s=0;s<e.SheetNames.length;++s)n[n.length]=Pre(s,r,e);return n.unshift(Rre(e,n,r)),gn(n)}function ZR(e,t){for(var r=0;r<=e.SheetNames.length;++r){var n=e.Sheets[e.SheetNames[r]];if(!(!n||!n["!ref"])){var s=gs(n["!ref"]);s.e.c>255&&typeof console<"u"&&console.error&&console.error("Worksheet '"+e.SheetNames[r]+"' extends beyond column IV (255).  Data may be lost.")}}var a=t||{};switch(a.biff||2){case 8:case 5:return Ore(e,t);case 4:case 3:case 2:return Nre(e,t)}throw new Error("invalid type "+a.bookType+" for BIFF")}function Lj(e,t){var r=t||{},n=r.dense?[]:{};e=e.replace(/<!--.*?-->/g,"");var s=e.match(/<table/i);if(!s)throw new Error("Invalid HTML: could not find <table>");var a=e.match(/<\/table/i),o=s.index,l=a&&a.index||e.length,c=gG(e.slice(o,l),/(:?<tr[^>]*>)/i,"<tr>"),u=-1,d=0,f=0,h=0,m={s:{r:1e7,c:1e7},e:{r:0,c:0}},g=[];for(o=0;o<c.length;++o){var p=c[o].trim(),x=p.slice(0,3).toLowerCase();if(x=="<tr"){if(++u,r.sheetRows&&r.sheetRows<=u){--u;break}d=0;continue}if(!(x!="<td"&&x!="<th")){var b=p.split(/<\/t[dh]>/i);for(l=0;l<b.length;++l){var w=b[l].trim();if(w.match(/<t[dh]/i)){for(var y=w,_=0;y.charAt(0)=="<"&&(_=y.indexOf(">"))>-1;)y=y.slice(_+1);for(var N=0;N<g.length;++N){var k=g[N];k.s.c==d&&k.s.r<u&&u<=k.e.r&&(d=k.e.c+1,N=-1)}var S=ft(w.slice(0,w.indexOf(">")));h=S.colspan?+S.colspan:1,((f=+S.rowspan)>1||h>1)&&g.push({s:{r:u,c:d},e:{r:u+(f||1)-1,c:d+h-1}});var E=S.t||S["data-t"]||"";if(!y.length){d+=h;continue}if(y=NP(y),m.s.r>u&&(m.s.r=u),m.e.r<u&&(m.e.r=u),m.s.c>d&&(m.s.c=d),m.e.c<d&&(m.e.c=d),!y.length){d+=h;continue}var j={t:"s",v:y};r.raw||!y.trim().length||E=="s"||(y==="TRUE"?j={t:"b",v:!0}:y==="FALSE"?j={t:"b",v:!1}:isNaN(Ua(y))?isNaN(ld(y).getDate())||(j={t:"d",v:pr(y)},r.cellDates||(j={t:"n",v:dn(j.v)}),j.z=r.dateNF||it[14]):j={t:"n",v:Ua(y)}),r.dense?(n[u]||(n[u]=[]),n[u][d]=j):n[ut({r:u,c:d})]=j,d+=h}}}}return n["!ref"]=yt(m),g.length&&(n["!merges"]=g),n}function Dre(e,t,r,n){for(var s=e["!merges"]||[],a=[],o=t.s.c;o<=t.e.c;++o){for(var l=0,c=0,u=0;u<s.length;++u)if(!(s[u].s.r>r||s[u].s.c>
vendor: 14,609 bytes, lines 652-654
652o)&&!(s[u].e.r<r||s[u].e.c<o)){if(s[u].s.r<r||s[u].s.c<o){l=-1;break}l=s[u].e.r-s[u].s.r+1,c=s[u].e.c-s[u].s.c+1;break}if(!(l<0)){var d=ut({r,c:o}),f=n.dense?(e[r]||[])[o]:e[d],h=f&&f.v!=null&&(f.h||h_(f.w||(eo(f),f.w)||""))||"",m={};l>1&&(m.rowspan=l),c>1&&(m.colspan=c),n.editable?h='<span contenteditable="true">'+h+"</span>":f&&(m["data-t"]=f&&f.t||"z",f.v!=null&&(m["data-v"]=f.v),f.z!=null&&(m["data-z"]=f.z),f.l&&(f.l.Target||"#").charAt(0)!="#"&&(h='<a href="'+f.l.Target+'">'+h+"</a>")),m.id=(n.id||"sjs")+"-"+d,a.push(De("td",h,m))}}var g="<tr>";return g+a.join("")+"</tr>"}var Ire='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>',Fre="</body></html>";function Mre(e,t){var r=e.match(/<table[\s\S]*?>[\s\S]*?<\/table>/gi);if(!r||r.length==0)throw new Error("Invalid HTML: could not find <table>");if(r.length==1)return yl(Lj(r[0],t),t);var n=W_();return r.forEach(function(s,a){z_(n,Lj(s,t),"Sheet"+(a+1))}),n}function Lre(e,t,r){var n=[];return n.join("")+"<table"+(r&&r.id?' id="'+r.id+'"':"")+">"}function eO(e,t){var r=t||{},n=r.header!=null?r.header:Ire,s=r.footer!=null?r.footer:Fre,a=[n],o=gs(e["!ref"]);r.dense=Array.isArray(e),a.push(Lre(e,o,r));for(var l=o.s.r;l<=o.e.r;++l)a.push(Dre(e,o,l,r));return a.push("</table>"+s),a.join("")}function tO(e,t,r){var n=r||{},s=0,a=0;if(n.origin!=null)if(typeof n.origin=="number")s=n.origin;else{var o=typeof n.origin=="string"?jr(n.origin):n.origin;s=o.r,a=o.c}var l=t.getElementsByTagName("tr"),c=Math.min(n.sheetRows||1e7,l.length),u={s:{r:0,c:0},e:{r:s,c:a}};if(e["!ref"]){var d=gs(e["!ref"]);u.s.r=Math.min(u.s.r,d.s.r),u.s.c=Math.min(u.s.c,d.s.c),u.e.r=Math.max(u.e.r,d.e.r),u.e.c=Math.max(u.e.c,d.e.c),s==-1&&(u.e.r=s=d.e.r+1)}var f=[],h=0,m=e["!rows"]||(e["!rows"]=[]),g=0,p=0,x=0,b=0,w=0,y=0;for(e["!cols"]||(e["!cols"]=[]);g<l.length&&p<c;++g){var _=l[g];if(Bj(_)){if(n.display)continue;m[p]={hidden:!0}}var N=_.children;for(x=b=0;x<N.length;++x){var k=N[x];if(!(n.display&&Bj(k))){var S=k.hasAttribute("data-v")?k.getAttribute("data-v"):k.hasAttribute("v")?k.getAttribute("v"):NP(k.innerHTML),E=k.getAttribute("data-z")||k.getAttribute("z");for(h=0;h<f.length;++h){var j=f[h];j.s.c==b+a&&j.s.r<p+s&&p+s<=j.e.r&&(b=j.e.c+1-a,h=-1)}y=+k.getAttribute("colspan")||1,((w=+k.getAttribute("rowspan")||1)>1||y>1)&&f.push({s:{r:p+s,c:b+a},e:{r:p+s+(w||1)-1,c:b+a+(y||1)-1}});var T={t:"s",v:S},R=k.getAttribute("data-t")||k.getAttribute("t")||"";S!=null&&(S.length==0?T.t=R||"z":n.raw||S.trim().length==0||R=="s"||(S==="TRUE"?T={t:"b",v:!0}:S==="FALSE"?T={t:"b",v:!1}:isNaN(Ua(S))?isNaN(ld(S).getDate())||(T={t:"d",v:pr(S)},n.cellDates||(T={t:"n",v:dn(T.v)}),T.z=n.dateNF||it[14]):T={t:"n",v:Ua(S)})),T.z===void 0&&E!=null&&(T.z=E);var P="",D=k.getElementsByTagName("A");if(D&&D.length)for(var U=0;U<D.length&&!(D[U].hasAttribute("href")&&(P=D[U].getAttribute("href"),P.charAt(0)!="#"));++U);P&&P.charAt(0)!="#"&&(T.l={Target:P}),n.dense?(e[p+s]||(e[p+s]=[]),e[p+s][b+a]=T):e[ut({c:b+a,r:p+s})]=T,u.e.c<b+a&&(u.e.c=b+a),b+=y}}++p}return f.length&&(e["!merges"]=(e["!merges"]||[]).concat(f)),u.e.r=Math.max(u.e.r,p-1+s),e["!ref"]=yt(u),p>=c&&(e["!fullref"]=yt((u.e.r=l.length-g+p-1+s,u))),e}function rO(e,t){var r=t||{},n=r.dense?[]:{};return tO(n,e,t)}function Bre(e,t){return yl(rO(e,t),t)}function Bj(e){var t="",r=$re(e);return r&&(t=r(e).getPropertyValue("display")),t||(t=e.style&&e.style.display),t==="none"}function $re(e){return e.ownerDocument.defaultView&&typeof e.ownerDocument.defaultView.getComputedStyle=="function"?e.ownerDocument.defaultView.getComputedStyle:typeof getComputedStyle=="function"?getComputedStyle:null}function Ure(e){var t=e.replace(/[\t\r\n]/g," ").trim().replace(/ +/g," ").replace(/<text:s\/>/g," ").replace(/<text:s text:c="(\d+)"\/>/g,function(n,s){return Array(parseInt(s,10)+1).join(" ")}).replace(/<text:tab[^>]*\/>/g,"	").replace(/<text:line-break\/>/g,`
653`),r=Dt(t.replace(/<[^>]*>/g,""));return[r]}var $j={day:["d","dd"],month:["m","mm"],year:["y","yy"],hours:["h","hh"],minutes:["m","mm"],seconds:["s","ss"],"am-pm":["A/P","AM/PM"],"day-of-week":["ddd","dddd"],era:["e","ee"],quarter:["\\Qm",'m\\"th quarter"']};function nO(e,t){var r=t||{},n=m_(e),s=[],a,o,l={name:""},c="",u=0,d,f,h={},m=[],g=r.dense?[]:{},p,x,b={value:""},w="",y=0,_=[],N=-1,k=-1,S={s:{r:1e6,c:1e7},e:{r:0,c:0}},E=0,j={},T=[],R={},P=0,D=0,U=[],Q=1,Y=1,V=[],F={Names:[]},C={},X=["",""],se=[],A={},M="",I=0,z=!1,J=!1,Z=0;for(_h.lastIndex=0,n=n.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");p=_h.exec(n);)switch(p[3]=p[3].replace(/_.*$/,"")){case"table":case"工作表":p[1]==="/"?(S.e.c>=S.s.c&&S.e.r>=S.s.r?g["!ref"]=yt(S):g["!ref"]="A1:A1",r.sheetRows>0&&r.sheetRows<=S.e.r&&(g["!fullref"]=g["!ref"],S.e.r=r.sheetRows-1,g["!ref"]=yt(S)),T.length&&(g["!merges"]=T),U.length&&(g["!rows"]=U),d.name=d.名称||d.name,typeof JSON<"u"&&JSON.stringify(d),m.push(d.name),h[d.name]=g,J=!1):p[0].charAt(p[0].length-2)!=="/"&&(d=ft(p[0],!1),N=k=-1,S.s.r=S.s.c=1e7,S.e.r=S.e.c=0,g=r.dense?[]:{},T=[],U=[],J=!0);break;case"table-row-group":p[1]==="/"?--E:++E;break;case"table-row":case"行":if(p[1]==="/"){N+=Q,Q=1;break}if(f=ft(p[0],!1),f.行号?N=f.行号-1:N==-1&&(N=0),Q=+f["number-rows-repeated"]||1,Q<10)for(Z=0;Z<Q;++Z)E>0&&(U[N+Z]={level:E});k=-1;break;case"covered-table-cell":p[1]!=="/"&&++k,r.sheetStubs&&(r.dense?(g[N]||(g[N]=[]),g[N][k]={t:"z"}):g[ut({r:N,c:k})]={t:"z"}),w="",_=[];break;case"table-cell":case"数据":if(p[0].charAt(p[0].length-2)==="/")++k,b=ft(p[0],!1),Y=parseInt(b["number-columns-repeated"]||"1",10),x={t:"z",v:null},b.formula&&r.cellFormula!=!1&&(x.f=Ij(Dt(b.formula))),(b.数据类型||b["value-type"])=="string"&&(x.t="s",x.v=Dt(b["string-value"]||""),r.dense?(g[N]||(g[N]=[]),g[N][k]=x):g[ut({r:N,c:k})]=x),k+=Y-1;else if(p[1]!=="/"){++k,w="",y=0,_=[],Y=1;var re=Q?N+Q-1:N;if(k>S.e.c&&(S.e.c=k),k<S.s.c&&(S.s.c=k),N<S.s.r&&(S.s.r=N),re>S.e.r&&(S.e.r=re),b=ft(p[0],!1),se=[],A={},x={t:b.数据类型||b["value-type"],v:null},r.cellFormula)if(b.formula&&(b.formula=Dt(b.formula)),b["number-matrix-columns-spanned"]&&b["number-matrix-rows-spanned"]&&(P=parseInt(b["number-matrix-rows-spanned"],10)||0,D=parseInt(b["number-matrix-columns-spanned"],10)||0,R={s:{r:N,c:k},e:{r:N+P-1,c:k+D-1}},x.F=yt(R),V.push([R,x.F])),b.formula)x.f=Ij(b.formula);else for(Z=0;Z<V.length;++Z)N>=V[Z][0].s.r&&N<=V[Z][0].e.r&&k>=V[Z][0].s.c&&k<=V[Z][0].e.c&&(x.F=V[Z][1]);switch((b["number-columns-spanned"]||b["number-rows-spanned"])&&(P=parseInt(b["number-rows-spanned"],10)||0,D=parseInt(b["number-columns-spanned"],10)||0,R={s:{r:N,c:k},e:{r:N+P-1,c:k+D-1}},T.push(R)),b["number-columns-repeated"]&&(Y=parseInt(b["number-columns-repeated"],10)),x.t){case"boolean":x.t="b",x.v=hr(b["boolean-value"]);break;case"float":x.t="n",x.v=parseFloat(b.value);break;case"percentage":x.t="n",x.v=parseFloat(b.value);break;case"currency":x.t="n",x.v=parseFloat(b.value);break;case"date":x.t="d",x.v=pr(b["date-value"]),r.cellDates||(x.t="n",x.v=dn(x.v)),x.z="m/d/yy";break;case"time":x.t="n",x.v=mG(b["time-value"])/86400,r.cellDates&&(x.t="d",x.v=rg(x.v)),x.z="HH:MM:SS";break;case"number":x.t="n",x.v=parseFloat(b.数据数值);break;default:if(x.t==="string"||x.t==="text"||!x.t)x.t="s",b["string-value"]!=null&&(w=Dt(b["string-value"]),_=[]);else throw new Error("Unsupported value type "+x.t)}}else{if(z=!1,x.t==="s"&&(x.v=w||"",_.length&&(x.R=_),z=y==0),C.Target&&(x.l=C),se.length>0&&(x.c=se,se=[]),w&&r.cellText!==!1&&(x.w=w),z&&(x.t="z",delete x.v),(!z||r.sheetStubs)&&!(r.sheetRows&&r.sheetRows<=N))for(var ae=0;ae<Q;++ae){if(Y=parseInt(b["number-columns-repeated"]||"1",10),r.dense)for(g[N+ae]||(g[N+ae]=[]),g[N+ae][k]=ae==0?x:xr(x);--Y>0;)g[N+ae][k+Y]=xr(x);else for(g[ut({r:N+ae,c:k})]=x;--Y>0;)g[ut({r:N+ae,c:k+Y})]=xr(x);S.e.c<=k&&(S.e.c=k)}Y=parseInt(b["number-columns-repeated"]||"1",10),k+=Y-1,Y=0,x={},w="",_=[]}C={};break;case"document":case"document-content":case"电子表格文档":case"spreadsheet":case"主体":case"scripts":case"styles":case"font-face-decls":case"master-styles":if(p[1]==="/"){if((a=s.pop())[0]!==p[3])throw"Bad state: "+a}else p[0].charAt(p[0].length-2)!=="/"&&s.push([p[3],!0]);break;case"annotation":if(p[1]==="/"){if((a=s.pop())[0]!==p[3])throw"Bad state: "+a;A.t=w,_.length&&(A.R=_),A.a=M,se.push(A)}else p[0].charAt(p[0].length-2)!=="/"&&s.push([p[3],!1]);M="",I=0,w="",y=0,_=[];break;case"creator":p[1]==="/"?M=n.slice(I,p.index):I=p.index+p[0].length;break;case"meta":case"元数据":case"settings":case"config-item-set":case"config-item-map-indexed":case"config-item-map-entry":case"config-item-map-named":case"shapes":case"frame":case"text-box":case"image":case"data-pilot-tables":case"list-style":case"form":case"dde-links":case"event-listeners":case"chart":if(p[1]==="/"){if((a=s.pop())[0]!==p[3])throw"Bad state: "+a}else p[0].charAt(p[0].length-2)!=="/"&&s.push([p[3],!1]);w="",y=0,_=[];break;case"scientific-number":break;case"currency-symbol":break;case"currency-style":break;case"number-style":case"percentage-style":case"date-style":case"time-style":if(p[1]==="/"){if(j[l.name]=c,(a=s.pop())[0]!==p[3])throw"Bad state: "+a}else p[0].charAt(p[0].length-2)!=="/"&&(c="",l=ft(p[0],!1),s.push([p[3],!0]));break;case"script":break;case"libraries":break;case"automatic-styles":break;case"default-style":case"page-layout":break;case"style":break;case"map":break;case"font-face":break;case"paragraph-properties":break;case"table-properties":break;case"table-column-properties":break;case"table-row-properties":break;case"table-cell-properties":break;case"number":switch(s[s.length-1][0]){case"time-style":case"date-style":o=ft(p[0],!1),c+=$j[p[3]][o.style==="long"?1:0];break}break;case"fraction":break;case"day":case"month":case"year":case"era":case"day-of-week":case"week-of-year":case"quarter":case"hours":case"minutes":case"seconds":case"am-pm":switch(s[s.length-1][0]){case"time-style":case"date-style":o=ft(p[0],!1),c+=$j[p[3]][o.style==="long"?1:0];break}break;case"boolean-style":break;case"boolean":break;case"text-style":break;case"text":if(p[0].slice(-2)==="/>")break;if(p[1]==="/")switch(s[s.length-1][0]){case"number-style":case"date-style":case"time-style":c+=n.slice(u,p.index);break}else u=p.index+p[0].length;break;case"named-range":o=ft(p[0],!1),X=Wv(o["cell-range-address"]);var ne={Name:o.name,Ref:X[0]+"!"+X[1]};J&&(ne.Sheet=m.length),F.Names.push(ne);break;case"text-content":break;case"text-properties":break;case"embedded-text":break;case"body":case"电子表格":break;case"forms":break;case"table-column":break;case"table-header-rows":break;case"table-rows":break;case"table-column-group":break;case"table-header-columns":break;case"table-columns":break;case"null-date":break;case"graphic-properties":break;case"calculation-settings":break;case"named-expressions":break;case"label-range":break;case"label-ranges":break;case"named-expression":break;case"sort":break;case"sort-by":break;case"sort-groups":break;case"tab":break;case"line-break":break;case"span":break;case"p":case"文本串":if(["master-styles"].indexOf(s[s.length-1][0])>-1)break;if(p[1]==="/"&&(!b||!b["string-value"])){var Se=Ure(n.slice(y,p.index));w=(w.length>0?w+`
654`:"")+Se[0]}else ft(p[0],!1),y=p.index+p[0].length;break;case"s":break;case"database-range":if(p[1]==="/")break;try{X=Wv(ft(p[0])["target-range-address"]),h[X[0]]["!autofilter"]={ref:X[1]}}catch{}break;case"date":break;case"object":break;case"title":case"标题":break;case"desc":break;case"binary-data":break;case"table-source":break;case"scenario":break;case"iteration":break;case"content-validations":break;case"content-validation":break;case"help-message":break;case"error-message":break;case"database-ranges":break;case"filter":break;case"filter-and":break;case"filter-or":break;case"filter-condition":break;case"list-level-style-bullet":break;case"list-level-style-number":break;case"list-level-properties":break;case"sender-firstname":case"sender-lastname":case"sender-initials":case"sender-title":case"sender-position":case"sender-email":case"sender-phone-private":case"sender-fax":case"sender-company":case"sender-phone-work":case"sender-street":case"sender-city":case"sender-postal-code":case"sender-country":case"sender-state-or-province":case"author-name":case"author-initials":case"chapter":case"file-name":case"template-name":case"sheet-name":break;case"event-listener":break;case"initial-creator":case"creation-date":case"print-date":case"generator":case"document-statistic":case"user-defined":case"editing-duration":case"editing-cycles":break;case"config-item":break;case"page-number":break;case"page-count":break;case"time":break;case"cell-range-source":break;case"detective":break;case"operation":break;case"highlighted-range":break;case"data-pilot-table":case"source-cell-range":case"source-service":case"data-pilot-field":case"data-pilot-level":case"data-pilot-subtotals":case"data-pilot-subtotal":case"data-pilot-members":case"data-pilot-member":case"data-pilot-display-info":case"data-pilot-sort-info":case"data-pilot-layout-info":case"data-pilot-field-reference":case"data-pilot-groups":case"data-pilot-group":case"data-pilot-group-member":break;case"rect":break;case"dde-connection-decls":case"dde-connection-decl":case"dde-link":case"dde-source":break;case"properties":break;case"property":break;case"a":if(p[1]!=="/"){if(C=ft(p[0],!1),!C.href)break;C.Target=Dt(C.href),delete C.href,C.Target.charAt(0)=="#"&&C.Target.indexOf(".")>-1?(X=Wv(C.Target.slice(1)),C.Target="#"+X[0]+"!"+X[1]):C.Target.match(/^\.\.[\\\/]/)&&(C.Target=C.Target.slice(3))}break;case"table-protection":break;case"data-pilot-grand-total":break;case"office-document-common-attrs":break;default:switch(p[2]){case"dc:":case"calcext:":case"loext:":case"ooo:":case"chartooo:":case"draw:":case"style:":case"chart:":case"form:":case"uof:":case"表:":case"字:":break;default:if(r.WTF)throw new Error(p)}}var B={Sheets:h,SheetNames:m,Workbook:F};return r.bookSheets&&delete B.Sheets,B}function Uj(e,t){t=t||{},ra(e,"META-INF/manifest.xml")&&mq(Xr(e,"META-INF/manifest.xml"),t);var r=Ms(e,"content.xml");if(!r)throw new Error("Missing content.xml in ODS / UOF file");var n=nO(tr(r),t);return ra(e,"meta.xml")&&(n.Props=qP(Xr(e,"meta.xml"))),n}function Wj(e,t){return nO(e,t)}var Wre=function(){var e=["<office:master-styles>",'<style:master-page style:name="mp1" style:page-layout-name="mp1">',"<style:header/>",'<style:header-left style:display="false"/>',"<style:footer/>",'<style:footer-left style:display="false"/>',"</style:master-page>","</office:master-styles>"].join(""),t="<office:document-styles "+bh({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office
654:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","office:version":"1.2"})+">"+e+"</office:document-styles>";return function(){return Gr+t}}(),zj=function(){var e=function(a){return Jt(a).replace(/  +/g,function(o){return'<text:s text:c="'+o.length+'"/>'}).replace(/\t/g,"<text:tab/>").replace(/\n/g,"</text:p><text:p>").replace(/^ /,"<text:s/>").replace(/ $/,"<text:s/>")},t=`          <table:table-cell />
655`,r=`          <table:covered-table-cell/>
656`,n=function(a,o,l){var c=[];c.push('      <table:table table:name="'+Jt(o.SheetNames[l])+`" table:style-name="ta1">
657`);var u=0,d=0,f=gs(a["!ref"]||"A1"),h=a["!merges"]||[],m=0,g=Array.isArray(a);if(a["!cols"])for(d=0;d<=f.e.c;++d)c.push("        <table:table-column"+(a["!cols"][d]?' table:style-name="co'+a["!cols"][d].ods+'"':"")+`></table:table-column>
658`);var p="",x=a["!rows"]||[];for(u=0;u<f.s.r;++u)p=x[u]?' table:style-name="ro'+x[u].ods+'"':"",c.push("        <table:table-row"+p+`></table:table-row>
659`);for(;u<=f.e.r;++u){for(p=x[u]?' table:style-name="ro'+x[u].ods+'"':"",c.push("        <table:table-row"+p+`>
660`),d=0;d<f.s.c;++d)c.push(t);for(;d<=f.e.c;++d){var b=!1,w={},y="";for(m=0;m!=h.length;++m)if(!(h[m].s.c>d)&&!(h[m].s.r>u)&&!(h[m].e.c<d)&&!(h[m].e.r<u)){(h[m].s.c!=d||h[m].s.r!=u)&&(b=!0),w["table:number-columns-spanned"]=h[m].e.c-h[m].s.c+1,w["table:number-rows-spanned"]=h[m].e.r-h[m].s.r+1;break}if(b){c.push(r);continue}var _=ut({r:u,c:d}),N=g?(a[u]||[])[d]:a[_];if(N&&N.f&&(w["table:formula"]=Jt(lZ(N.f)),N.F&&N.F.slice(0,_.length)==_)){var k=gs(N.F);w["table:number-matrix-columns-spanned"]=k.e.c-k.s.c+1,w["table:number-matrix-rows-spanned"]=k.e.r-k.s.r+1}if(!N){c.push(t);continue}switch(N.t){case"b":y=N.v?"TRUE":"FALSE",w["office:value-type"]="boolean",w["office:boolean-value"]=N.v?"true":"false";break;case"n":y=N.w||String(N.v||0),w["office:value-type"]="float",w["office:value"]=N.v||0;break;case"s":case"str":y=N.v==null?"":N.v,w["office:value-type"]="string";break;case"d":y=N.w||pr(N.v).toISOString(),w["office:value-type"]="date",w["office:date-value"]=pr(N.v).toISOString(),w["table:style-name"]="ce1";break;default:c.push(t);continue}var S=e(y);if(N.l&&N.l.Target){var E=N.l.Target;E=E.charAt(0)=="#"?"#"+cZ(E.slice(1)):E,E.charAt(0)!="#"&&!E.match(/^\w+:/)&&(E="../"+E),S=De("text:a",S,{"xlink:href":E.replace(/&/g,"&amp;")})}c.push("          "+De("table:table-cell",De("text:p",S,{}),w)+`
661`)}c.push(`        </table:table-row>
662`)}return c.push(`      </table:table>
663`),c.join("")},s=function(a,o){a.push(` <office:automatic-styles>
664`),a.push(`  <number:date-style style:name="N37" number:automatic-order="true">
665`),a.push(`   <number:month number:style="long"/>
666`),a.push(`   <number:text>/</number:text>
667`),a.push(`   <number:day number:style="long"/>
668`),a.push(`   <number:text>/</number:text>
669`),a.push(`   <number:year/>
670`),a.push(`  </number:date-style>
671`);var l=0;o.SheetNames.map(function(u){return o.Sheets[u]}).forEach(function(u){if(u&&u["!cols"]){for(var d=0;d<u["!cols"].length;++d)if(u["!cols"][d]){var f=u["!cols"][d];if(f.width==null&&f.wpx==null&&f.wch==null)continue;ol(f),f.ods=l;var h=u["!cols"][d].wpx+"px";a.push('  <style:style style:name="co'+l+`" style:family="table-column">
672`),a.push('   <style:table-column-properties fo:break-before="auto" style:column-width="'+h+`"/>
673`),a.push(`  </style:style>
674`),++l}}});var c=0;o.SheetNames.map(function(u){return o.Sheets[u]}).forEach(function(u){if(u&&u["!rows"]){for(var d=0;d<u["!rows"].length;++d)if(u["!rows"][d]){u["!rows"][d].ods=c;var f=u["!rows"][d].hpx+"px";a.push('  <style:style style:name="ro'+c+`" style:family="table-row">
675`),a.push('   <style:table-row-properties fo:break-before="auto" style:row-height="'+f+`"/>
676`),a.push(`  </style:style>
677`),++c}}}),a.push(`  <style:style style:name="ta1" style:family="table" style:master-page-name="mp1">
678`),a.push(`   <style:table-properties table:display="true" style:writing-mode="lr-tb"/>
679`),a.push(`  </style:style>
680`),a.push(`  <style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N37"/>
681`),a.push(` </office:automatic-styles>
682`)};return function(o,l){var c=[Gr],u=bh({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office
682:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),d=bh({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});l.bookType=="fods"?(c.push("<office:document"+u+d+`>
683`),c.push(GP().replace(/office:document-meta/g,"office:meta"))):c.push("<office:document-content"+u+`>
684`),s(c,o),c.push(`  <office:body>
685`),c.push(`    <office:spreadsheet>
686`);for(var f=0;f!=o.SheetNames.length;++f)c.push(n(o.Sheets[o.SheetNames[f]],o,f));return c.push(`    </office:spreadsheet>
687`),c.push(`  </office:body>
688`),l.bookType=="fods"?c.push("</office:document>"):c.push("</office:document-content>"),c.join("")}}();function sO(e,t){if(t.bookType=="fods")return zj(e,t);var r=u_(),n="",s=[],a=[];return n="mimetype",bt(r,n,"application/vnd.oasis.opendocument.spreadsheet"),n="content.xml",bt(r,n,zj(e,t)),s.push([n,"text/xml"]),a.push([n,"ContentFile"]),n="styles.xml",bt(r,n,Wre(e,t)),s.push([n,"text/xml"]),a.push([n,"StylesFile"]),n="meta.xml",bt(r,n,Gr+GP()),s.push([n,"text/xml"]),a.push([n,"MetadataFile"]),n="manifest.rdf",bt(r,n,gq(a)),s.push([n,"application/rdf+xml"]),n="META-INF/manifest.xml",bt(r,n,pq(s)),r}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function yc(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ew(e){return typeof TextDecoder<"u"?new TextDecoder().decode(e):tr(vl(e))}function zre(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e):Fs(hi(e))}function Hre(e,t){e:for(var r=0;r<=e.length-t.length;++r){for(var n=0;n<t.length;++n)if(e[r+n]!=t[n])continue e;return!0}return!1}function cl(e){var t=e.reduce(function(s,a){return s+a.length},0),r=new Uint8Array(t),n=0;return e.forEach(function(s){r.set(s,n),n+=s.length}),r}function Hj(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>>24}function Vre(e,t){for(var r=(e[t+15]&127)<<7|e[t+14]>>1,n=e[t+14]&1,s=t+13;s>=t;--s)n=n*256+e[s];return(e[t+15]&128?-n:n)*Math.pow(10,r-6176)}function Gre(e,t,r){var n=Math.floor(r==0?0:Math.LOG10E*Math.log(Math.abs(r)))+6176-20,s=r/Math.pow(10,n-6176);e[t+15]|=n>>7,e[t+14]|=(n&127)<<1;for(var a=0;s>=1;++a,s/=256)e[t+a]=s&255;e[t+15]|=r>=0?0:128}function Th(e,t){var r=t?t[0]:0,n=e[r]&127;e:if(e[r++]>=128&&(n|=(e[r]&127)<<7,e[r++]<128||(n|=(e[r]&127)<<14,e[r++]<128)||(n|=(e[r]&127)<<21,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,28),++r,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,35),++r,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,42),++r,e[r++]<128)))break e;return t&&(t[0]=r),n}function Yt(e){var t=new Uint8Array(7);t[0]=e&127;var r=1;e:if(e>127){if(t[r-1]|=128,t[r]=e>>7&127,++r,e<=16383||(t[r-1]|=128,t[r]=e>>14&127,++r,e<=2097151)||(t[r-1]|=128,t[r]=e>>21&127,++r,e<=268435455)||(t[r-1]|=128,t[r]=e/256>>>21&127,++r,e<=34359738367)||(t[r-1]|=128,t[r]=e/65536>>>21&127,++r,e<=4398046511103))break e;t[r-1]|=128,t[r]=e/16777216>>>21&127,++r}return t.slice(0,r)}function Fr(e){var t=0,r=e[t]&127;e:if(e[t++]>=128){if(r|=(e[t]&127)<<7,e[t++]<128||(r|=(e[t]&127)<<14,e[t++]<128)||(r|=(e[t]&127)<<21,e[t++]<128))break e;r|=(e[t]&127)<<28}return r}function Lt(e){for(var t=[],r=[0];r[0]<e.length;){var n=r[0],s=Th(e,r),a=s&7;s=Math.floor(s/8);var o=0,l;if(s==0)break;switch(a){case 0:{for(var c=r[0];e[r[0]++]>=128;);l=e.slice(c,r[0])}break;case 5:o=4,l=e.slice(r[0],r[0]+o),r[0]+=o;break;case 1:o=8,l=e.slice(r[0],r[0]+o),r[0]+=o;break;case 2:o=Th(e,r),l=e.slice(r[0],r[0]+o),r[0]+=o;break;case 3:case 4:default:throw new Error("PB Type ".concat(a," for Field ").concat(s," at offset ").concat(n))}var u={data:l,type:a};t[s]==null?t[s]=[u]:t[s].push(u)}return t}function Nn(e){var t=[];return e.forEach(function(r,n){r.forEach(function(s){s.data&&(t.push(Yt(n*8+s.type)),s.type==2&&t.push(Yt(s.data.length)),t.push(s.data))})}),cl(t)}function M_(e,t){return(e==null?void 0:e.map(function(r){return t(r.data)}))||[]}function ea(e){for(var t,r=[],n=[0];n[0]<e.length;){var s=Th(e,n),a=Lt(e.slice(n[0],n[0]+s));n[0]+=s;var o={id:Fr(a[1][0].data),messages:[]};a[2].forEach(function(l){var c=Lt(l.data),u=Fr(c[3][0].data);o.messages.push({meta:c,data:e.slice(n[0],n[0]+u)}),n[0]+=u}),(t=a[3])!=null&&t[0]&&(o.merge=Fr(a[3][0].data)>>>0>0),r.push(o)}return r}function Yc(e){var t=[];return e.forEach(function(r){var n=[];n[1]=[{data:Yt(r.id),type:0}],n[2]=[],r.merge!=null&&(n[3]=[{data:Yt(+!!r.merge),type:0}]);var s=[];
vendor: 6,660 bytes, line 688
688r.messages.forEach(function(o){s.push(o.data),o.meta[3]=[{type:0,data:Yt(o.data.length)}],n[2].push({data:Nn(o.meta),type:2})});var a=Nn(n);t.push(Yt(a.length)),t.push(a),s.forEach(function(o){return t.push(o)})}),cl(t)}function qre(e,t){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var r=[0],n=Th(t,r),s=[];r[0]<t.length;){var a=t[r[0]]&3;if(a==0){var o=t[r[0]++]>>2;if(o<60)++o;else{var l=o-59;o=t[r[0]],l>1&&(o|=t[r[0]+1]<<8),l>2&&(o|=t[r[0]+2]<<16),l>3&&(o|=t[r[0]+3]<<24),o>>>=0,o++,r[0]+=l}s.push(t.slice(r[0],r[0]+o)),r[0]+=o;continue}else{var c=0,u=0;if(a==1?(u=(t[r[0]]>>2&7)+4,c=(t[r[0]++]&224)<<3,c|=t[r[0]++]):(u=(t[r[0]++]>>2)+1,a==2?(c=t[r[0]]|t[r[0]+1]<<8,r[0]+=2):(c=(t[r[0]]|t[r[0]+1]<<8|t[r[0]+2]<<16|t[r[0]+3]<<24)>>>0,r[0]+=4)),s=[cl(s)],c==0)throw new Error("Invalid offset 0");if(c>s[0].length)throw new Error("Invalid offset beyond length");if(u>=c)for(s.push(s[0].slice(-c)),u-=c;u>=s[s.length-1].length;)s.push(s[s.length-1]),u-=s[s.length-1].length;s.push(s[0].slice(-c,-c+u))}}var d=cl(s);if(d.length!=n)throw new Error("Unexpected length: ".concat(d.length," != ").concat(n));return d}function ta(e){for(var t=[],r=0;r<e.length;){var n=e[r++],s=e[r]|e[r+1]<<8|e[r+2]<<16;r+=3,t.push(qre(n,e.slice(r,r+s))),r+=s}if(r!==e.length)throw new Error("data is not a valid framed stream!");return cl(t)}function Xc(e){for(var t=[],r=0;r<e.length;){var n=Math.min(e.length-r,268435455),s=new Uint8Array(4);t.push(s);var a=Yt(n),o=a.length;t.push(a),n<=60?(o++,t.push(new Uint8Array([n-1<<2]))):n<=256?(o+=2,t.push(new Uint8Array([240,n-1&255]))):n<=65536?(o+=3,t.push(new Uint8Array([244,n-1&255,n-1>>8&255]))):n<=16777216?(o+=4,t.push(new Uint8Array([248,n-1&255,n-1>>8&255,n-1>>16&255]))):n<=4294967296&&(o+=5,t.push(new Uint8Array([252,n-1&255,n-1>>8&255,n-1>>16&255,n-1>>>24&255]))),t.push(e.slice(r,r+n)),o+=n,s[0]=0,s[1]=o&255,s[2]=o>>8&255,s[3]=o>>16&255,r+=n}return cl(t)}function Kre(e,t,r,n){var s=yc(e),a=s.getUint32(4,!0),o=(n>1?12:8)+Hj(a&(n>1?3470:398))*4,l=-1,c=-1,u=NaN,d=new Date(2001,0,1);a&512&&(l=s.getUint32(o,!0),o+=4),o+=Hj(a&(n>1?12288:4096))*4,a&16&&(c=s.getUint32(o,!0),o+=4),a&32&&(u=s.getFloat64(o,!0),o+=8),a&64&&(d.setTime(d.getTime()+s.getFloat64(o,!0)*1e3),o+=8);var f;switch(e[2]){case 0:break;case 2:f={t:"n",v:u};break;case 3:f={t:"s",v:t[c]};break;case 5:f={t:"d",v:d};break;case 6:f={t:"b",v:u>0};break;case 7:f={t:"n",v:u/86400};break;case 8:f={t:"e",v:0};break;case 9:if(l>-1)f={t:"s",v:r[l]};else if(c>-1)f={t:"s",v:t[c]};else if(!isNaN(u))f={t:"n",v:u};else throw new Error("Unsupported cell type ".concat(e.slice(0,4)));break;default:throw new Error("Unsupported cell type ".concat(e.slice(0,4)))}return f}function Yre(e,t,r){var n=yc(e),s=n.getUint32(8,!0),a=12,o=-1,l=-1,c=NaN,u=NaN,d=new Date(2001,0,1);s&1&&(c=Vre(e,a),a+=16),s&2&&(u=n.getFloat64(a,!0),a+=8),s&4&&(d.setTime(d.getTime()+n.getFloat64(a,!0)*1e3),a+=8),s&8&&(l=n.getUint32(a,!0),a+=4),s&16&&(o=n.getUint32(a,!0),a+=4);var f;switch(e[1]){case 0:break;case 2:f={t:"n",v:c};break;case 3:f={t:"s",v:t[l]};break;case 5:f={t:"d",v:d};break;case 6:f={t:"b",v:u>0};break;case 7:f={t:"n",v:u/86400};break;case 8:f={t:"e",v:0};break;case 9:if(o>-1)f={t:"s",v:r[o]};else throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(s&31," : ").concat(e.slice(0,4)));break;case 10:f={t:"n",v:c};break;default:throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(s&31," : ").concat(e.slice(0,4)))}return f}function Hv(e,t){var r=new Uint8Array(32),n=yc(r),s=12,a=0;switch(r[0]=5,e.t){case"n":r[1]=2,Gre(r,s,e.v),a|=1,s+=16;break;case"b":r[1]=6,n.setFloat64(s,e.v?1:0,!0),a|=2,s+=8;break;case"s":if(t.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));r[1]=3,n.setUint32(s,t.indexOf(e.v),!0),a|=8,s+=4;break;default:throw"unsupported cell type "+e.t}return n.setUint32(8,a,!0),r.slice(0,s)}function Vv(e,t){var r=new Uint8Array(32),n=yc(r),s=12,a=0;switch(r[0]=3,e.t){case"n":r[2]=2,n.setFloat64(s,e.v,!0),a|=32,s+=8;break;case"b":r[2]=6,n.setFloat64(s,e.v?1:0,!0),a|=32,s+=8;break;case"s":if(t.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));r[2]=3,n.setUint32(s,t.indexOf(e.v),!0),a|=16,s+=4;break;default:throw"unsupported cell type "+e.t}return n.setUint32(4,a,!0),r.slice(0,s)}function Xre(e,t,r){switch(e[0]){case 0:case 1:case 2:case 3:return Kre(e,t,r,e[0]);case 5:return Yre(e,t,r);default:throw new Error("Unsupported payload version ".concat(e[0]))}}function Mn(e){var t=Lt(e);return Th(t[1][0].data)}function Vj(e,t){var r=Lt(t.data),n=Fr(r[1][0].data),s=r[3],a=[];return(s||[]).forEach(function(o){var l=Lt(o.data),c=Fr(l[1][0].data)>>>0;switch(n){case 1:a[c]=ew(l[3][0].data);break;case 8:{var u=e[Mn(l[9][0].data)][0],d=Lt(u.data),f=e[Mn(d[1][0].data)][0],h=Fr(f.meta[1][0].data);if(h!=2001)throw new Error("2000 unexpected reference to ".concat(h));var m=Lt(f.data);a[c]=m[3].map(function(g){return ew(g.data)}).join("")}break}}),a}function Qre(e,t){var r,n,s,a,o,l,c,u,d,f,h,m,g,p,x=Lt(e),b=Fr(x[1][0].data)>>>0,w=Fr(x[2][0].data)>>>0,y=((n=(r=x[8])==null?void 0:r[0])==null?void 0:n.data)&&Fr(x[8][0].data)>0||!1,_,N;if((a=(s=x[7])==null?void 0:s[0])!=null&&a.data&&t!=0)_=(l=(o=x[7])==null?void 0:o[0])==null?void 0:l.data,N=(u=(c=x[6])==null?void 0:c[0])==null?void 0:u.data;else if((f=(d=x[4])==null?void 0:d[0])!=null&&f.data&&t!=1)_=(m=(h=x[4])==null?void 0:h[0])==null?void 0:m.data,N=(p=(g=x[3])==null?void 0:g[0])==null?void 0:p.data;else throw"NUMBERS Tile missing ".concat(t," cell storage");for(var k=y?4:1,S=yc(_),E=[],j=0;j<_.length/2;++j){var T=S.getUint16(j*2,!0);T<65535&&E.push([j,T])}if(E.length!=w)throw"Expected ".concat(w," cells, found ").concat(E.length);var R=[];for(j=0;j<E.length-1;++j)R[E[j][0]]=N.subarray(E[j][1]*k,E[j+1][1]*k);return E.length>=1&&(R[E[E.length-1][0]]=N.subarray(E[E.length-1][1]*k)),{R:b,cells:R}}function Jre(e,t){var r,n=Lt(t.data),s=(r=n==null?void 0:n[7])!=null&&r[0]?Fr(n[7][0].data)>>>0>0?1:0:-1,a=M_(n[5],function(o){return Qre(o,s)});return{nrows:Fr(n[4][0].data)>>>0,data:a.reduce(function(o,l){return o[l.R]||(o[l.R]=[]),l.cells.forEach(function(c,u){if(o[l.R][u])throw new Error("Duplicate cell r=".concat(l.R," c=").concat(u));o[l.R][u]=c}),o},[])}}function Zre(e,t,r){var n,s=Lt(t.data),a={s:{r:0,c:0},e:{r:0,c:0}};if(a.e.r=(Fr(s[6][0].data)>>>0)-1,a.e.r<0)throw new Error("Invalid row varint ".concat(s[6][0].data));if(a.e.c=(Fr(s[7][0].data)>>>0)-1,a.e.c<0)throw new Error("Invalid col varint ".concat(s[7][0].data));r["!ref"]=yt(a);var o=Lt(s[4][0].data),l=Vj(e,e[Mn(o[4][0].data)][0]),c=(n=o[17])!=null&&n[0]?Vj(e,e[Mn(o[17][0].data)][0]):[],u=Lt(o[3][0].data),d=0;
688u[1].forEach(function(f){var h=Lt(f.data),m=e[Mn(h[2][0].data)][0],g=Fr(m.meta[1][0].data);if(g!=6002)throw new Error("6001 unexpected reference to ".concat(g));var p=Jre(e,m);p.data.forEach(function(x,b){x.forEach(function(w,y){var _=ut({r:d+b,c:y}),N=Xre(w,l,c);N&&(r[_]=N)})}),d+=p.nrows})}function ene(e,t){var r=Lt(t.data),n={"!ref":"A1"},s=e[Mn(r[2][0].data)],a=Fr(s[0].meta[1][0].data);if(a!=6001)throw new Error("6000 unexpected reference to ".concat(a));return Zre(e,s[0],n),n}function tne(e,t){var r,n=Lt(t.data),s={name:(r=n[1])!=null&&r[0]?ew(n[1][0].data):"",sheets:[]},a=M_(n[2],Mn);return a.forEach(function(o){e[o].forEach(function(l){var c=Fr(l.meta[1][0].data);c==6e3&&s.sheets.push(ene(e,l))})}),s}function rne(e,t){var r=W_(),n=Lt(t.data),s=M_(n[1],Mn);if(s.forEach(function(a){e[a].forEach(function(o){var l=Fr(o.meta[1][0].data);if(l==2){var c=tne(e,o);c.sheets.forEach(function(u,d){z_(r,u,d==0?c.name:c.name+"_"+d,!0)})}})}),r.SheetNames.length==0)throw new Error("Empty NUMBERS file");return r}function Gv(e){var t,r,n,s,a={},o=[];if(e.FullPaths.forEach(function(c){if(c.match(/\.iwpv2/))throw new Error("Unsupported password protection")}),e.FileIndex.forEach(function(c){if(c.name.match(/\.iwa$/)){var u;try{u=ta(c.content)}catch(f){return console.log("?? "+c.content.length+" "+(f.message||f))}var d;try{d=ea(u)}catch(f){return console.log("## "+(f.message||f))}d.forEach(function(f){a[f.id]=f.messages,o.push(f.id)})}}),!o.length)throw new Error("File has no messages");var l=((s=(n=(r=(t=a==null?void 0:a[1])==null?void 0:t[0])==null?void 0:r.meta)==null?void 0:n[1])==null?void 0:s[0].data)&&Fr(a[1][0].meta[1][0].data)==1&&a[1][0];if(l||o.forEach(function(c){a[c].forEach(function(u){var d=Fr(u.meta[1][0].data)>>>0;if(d==1)if(!l)l=u;else throw new Error("Document has multiple roots")})}),!l)throw new Error("Cannot find Document root");return rne(a,l)}function nne(e,t,r){var n,s,a,o;if(!((n=e[6])!=null&&n[0])||!((s=e[7])!=null&&s[0]))throw"Mutation only works on post-BNC storages!";var l=((o=(a=e[8])==null?void 0:a[0])==null?void 0:o.data)&&Fr(e[8][0].data)>0||!1;if(l)throw"Math only works with normal offsets";for(var c=0,u=yc(e[7][0].data),d=0,f=[],h=yc(e[4][0].data),m=0,g=[],p=0;p<t.length;++p){if(t[p]==null){u.setUint16(p*2,65535,!0),h.setUint16(p*2,65535);continue}u.setUint16(p*2,d,!0),h.setUint16(p*2,m,!0);var x,b;switch(typeof t[p]){case"string":x=Hv({t:"s",v:t[p]},r),b=Vv({t:"s",v:t[p]},r);break;case"number":x=Hv({t:"n",v:t[p]},r),b=Vv({t:"n",v:t[p]},r);break;case"boolean":x=Hv({t:"b",v:t[p]},r),b=Vv({t:"b",v:t[p]},r);break;default:throw new Error("Unsupported value "+t[p])}f.push(x),d+=x.length,g.push(b),m+=b.length,++c}for(e[2][0].data=Yt(c);p<e[7][0].data.length/2;++p)u.setUint16(p*2,65535,!0),h.setUint16(p*2,65535,!0);return e[6][0].data=cl(f),e[3][0].data=cl(g),c}
688function sne(e,t){if(!t||!t.numbers)throw new Error("Must pass a `numbers` option -- check the README");var r=e.Sheets[e.SheetNames[0]];e.SheetNames.length>1&&console.error("The Numbers writer currently writes only the first table");var n=gs(r["!ref"]);n.s.r=n.s.c=0;var s=!1;n.e.c>9&&(s=!0,n.e.c=9),n.e.r>49&&(s=!0,n.e.r=49),s&&console.error("The Numbers writer is currently limited to ".concat(yt(n)));var a=Gp(r,{range:n,header:1}),o=["~Sh33tJ5~"];a.forEach(function(M){return M.forEach(function(I){typeof I=="string"&&o.push(I)})});var l={},c=[],u=tt.read(t.numbers,{type:"base64"});u.FileIndex.map(function(M,I){return[M,u.FullPaths[I]]}).forEach(function(M){var I=M[0],z=M[1];if(I.type==2&&I.name.match(/\.iwa/)){var J=I.content,Z=ta(J),re=ea(Z);re.forEach(function(ae){c.push(ae.id),l[ae.id]={deps:[],location:z,type:Fr(ae.messages[0].meta[1][0].data)}})}}),c.sort(function(M,I){return M-I});var d=c.filter(function(M){return M>1}).map(function(M){return[M,Yt(M)]});u.FileIndex.map(function(M,I){return[M,u.FullPaths[I]]}).forEach(function(M){var I=M[0];if(M[1],!!I.name.match(/\.iwa/)){var z=ea(ta(I.content));z.forEach(function(J){J.messages.forEach(function(Z){d.forEach(function(re){J.messages.some(function(ae){return Fr(ae.meta[1][0].data)!=11006&&Hre(ae.data,re[1])})&&l[re[0]].deps.push(J.id)})})})}});for(var f=tt.find(u,l[1].location),h=ea(ta(f.content)),m,g=0;g<h.length;++g){var p=h[g];p.id==1&&(m=p)}var x=Mn(Lt(m.messages[0].data)[1][0].data);for(f=tt.find(u,l[x].location),h=ea(ta(f.content)),g=0;g<h.length;++g)p=h[g],p.id==x&&(m=p);for(x=Mn(Lt(m.messages[0].data)[2][0].data),f=tt.find(u,l[x].location),h=ea(ta(f.content)),g=0;g<h.length;++g)p=h[g],p.id==x&&(m=p);for(x=Mn(Lt(m.messages[0].data)[2][0].data),f=tt.find(u,l[x].location),h=ea(ta(f.content)),g=0;g<h.length;++g)p=h[g],p.id==x&&(m=p);var b=Lt(m.messages[0].data);{b[6][0].data=Yt(n.e.r+1),b[7][0].data=Yt(n.e.c+1);var w=Mn(b[46][0].data),y=tt.find(u,l[w].location),_=ea(ta(y.content));{for(var N=0;N<_.length&&_[N].id!=w;++N);if(_[N].id!=w)throw"Bad ColumnRowUIDMapArchive";var k=Lt(_[N].messages[0].data);k[1]=[],k[2]=[],k[3]=[];for(var S=0;S<=n.e.c;++S){var E=[];E[1]=E[2]=[{type:0,data:Yt(S+420690)}],k[1].push({type:2,data:Nn(E)}),k[2].push({type:0,data:Yt(S)}),k[3].push({type:0,data:Yt(S)})}k[4]=[],k[5]=[],k[6]=[];for(var j=0;j<=n.e.r;++j)E=[],E[1]=E[2]=[{type:0,data:Yt(j+726270)}],k[4].push({type:2,data:Nn(E)}),k[5].push({type:0,data:Yt(j)}),k[6].push({type:0,data:Yt(j)});_[N].messages[0].data=Nn(k)}y.content=Xc(Yc(_)),y.size=y.content.length,delete b[46];var T=Lt(b[4][0].data);{T[7][0].data=Yt(n.e.r+1);var R=Lt(T[1][0].data),P=Mn(R[2][0].data);y=tt.find(u,l[P].location),_=ea(ta(y.content));{if(_[0].id!=P)throw"Bad HeaderStorageBucket";var D=Lt(_[0].messages[0].data);for(j=0;j<a.length;++j){var U=Lt(D[2][0].data);U[1][0].data=Yt(j),U[4][0].data=Yt(a[j].length),D[2][j]={type:D[2][0].type,data:Nn(U)}}_[0].messages[0].data=Nn(D)}y.content=Xc(Yc(_)),y.size=y.content.length;var Q=Mn(T[2][0].data);y=tt.find(u,l[Q].location),_=ea(ta(y.content));{if(_[0].id!=Q)throw"Bad HeaderStorageBucket";for(D=Lt(_[0].messages[0].data),S=0;S<=n.e.c;++S)U=Lt(D[2][0].data),U[1][0].data=Yt(S),U[4][0].data=Yt(n.e.r+1),D[2][S]={type:D[2][0].type,data:Nn(U)};_[0].messages[0].data=Nn(D)}y.content=Xc(Yc(_)),y.size=y.content.length;var Y=Mn(T[4][0].data);(function(){for(var M=tt.find(u,l[Y].location),I=ea(ta(M.content)),z,J=0;J<I.length;++J){var Z=I[J];Z.id==Y&&(z=Z)}var re=Lt(z.messages[0].data);{re[3]=[];var ae=[];o.forEach(function(B,qe){ae[1]=[{type:0,data:Yt(qe)}],ae[2]=[{type:0,data:Yt(1)}],ae[3]=[{type:2,data:zre(B)}],re[3].push({type:2,data:Nn(ae)})})}z.messages[0].data=Nn(re);var ne=Yc(I),Se=Xc(ne);M.content=Se,M.size=M.content.length})();var V=Lt(T[3][0].data);{var F=V[1][0];delete V[2];var C=Lt(F.data);{var X=Mn(C[2][0].data);(function(){for(var M=tt.find(u,l[X].location),I=ea(ta(M.content)),z,J=0;J<I.length;++J){var Z=I[J];Z.id==X&&(z=Z)}var re=Lt(z.messages[0].data);{delete re[6],delete V[7];var ae=new Uint8Array(re[5][0].data);re[5]=[];for(var ne=0,Se=0;Se<=n.e.r;++Se){var B=Lt(ae);ne+=nne(B,a[Se],o),B[1][0].data=Yt(Se),re[5].push({data:Nn(B),type:2})}re[1]=[{type:0,data:Yt(n.e.c+1)}],re[2]=[{type:0,data:Yt(n.e.r+1)}],re[3]=[{type:0,data:Yt(ne)}],re[4]=[{type:0,data:Yt(n.e.r+1)}]}z.messages[0].data=Nn(re);var qe=Yc(I),ue=Xc(qe);M.content=ue,M.size=M.content.length})()}F.data=Nn(C)}T[3][0].data=Nn(V)}b[4][0].data=Nn(T)}m.messages[0].data=Nn(b);var se=Yc(h),A=Xc(se);return f.content=A,f.size=f.content.length,u}function aO(e){return function(r){for(var n=0;n!=e.length;++n){var s=e[n];r[s[0]]===void 0&&(r[s[0]]=s[1]),s[2]==="n"&&(r[s[0]]=Number(r[s[0]]))}}}function L_(e){aO([["cellNF",!1],["cellHTML",!0],["cellFormula",!0],["cellStyles",!1],["cellText",!0
vendor: 12,387 bytes, line 688
688],["cellDates",!1],["sheetStubs",!1],["sheetRows",0,"n"],["bookDeps",!1],["bookSheets",!1],["bookProps",!1],["bookFiles",!1],["bookVBA",!1],["password",""],["WTF",!1]])(e)}function B_(e){aO([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]])(e)}function ane(e){return St.WS.indexOf(e)>-1?"sheet":e==St.CS?"chart":e==St.DS?"dialog":e==St.MS?"macro":e&&e.length?e:"sheet"}function ine(e,t){if(!e)return 0;try{e=t.map(function(n){return n.id||(n.id=n.strRelID),[n.name,e["!id"][n.id].Target,ane(e["!id"][n.id].Type)]})}catch{return null}return!e||e.length===0?null:e}function one(e,t,r,n,s,a,o,l,c,u,d,f){try{a[n]=Tf(Ms(e,r,!0),t);var h=Xr(e,t),m;switch(l){case"sheet":m=Tte(h,t,s,c,a[n],u,d,f);break;case"chart":if(m=Ate(h,t,s,c,a[n],u,d,f),!m||!m["!drawel"])break;var g=cf(m["!drawel"].Target,t),p=Nh(g),x=xQ(Ms(e,g,!0),Tf(Ms(e,p,!0),g)),b=cf(x,g),w=Nh(b);m=nte(Ms(e,b,!0),b,c,Tf(Ms(e,w,!0),b),u,m);break;case"macro":m=Pte(h,t,s,c,a[n],u,d,f);break;case"dialog":m=Rte(h,t,s,c,a[n],u,d,f);break;default:throw new Error("Unrecognized sheet type "+l)}o[n]=m;var y=[];a&&a[n]&&Mr(a[n]).forEach(function(_){var N="";if(a[n][_].Type==St.CMNT){N=cf(a[n][_].Target,t);var k=Fte(Xr(e,N,!0),N,c);if(!k||!k.length)return;Aj(m,k,!1)}a[n][_].Type==St.TCMNT&&(N=cf(a[n][_].Target,t),y=y.concat(vQ(Xr(e,N,!0),c)))}),y&&y.length&&Aj(m,y,!0,c.people||[])}catch(_){if(c.WTF)throw _}}function Js(e){return e.charAt(0)=="/"?e.slice(1):e}function lne(e,t){if(Cd(),t=t||{},L_(t),ra(e,"META-INF/manifest.xml")||ra(e,"objectdata.xml"))return Uj(e,t);if(ra(e,"Index/Document.iwa")){if(typeof Uint8Array>"u")throw new Error("NUMBERS file parsing requires Uint8Array support");if(typeof Gv<"u"){if(e.FileIndex)return Gv(e);var r=tt.utils.cfb_new();return Qk(e).forEach(function(U){bt(r,U,yG(e,U))}),Gv(r)}throw new Error("Unsupported NUMBERS file")}if(!ra(e,"[Content_Types].xml"))throw ra(e,"index.xml.gz")?new Error("Unsupported NUMBERS 08 file"):ra(e,"index.xml")?new Error("Unsupported NUMBERS 09 file"):new Error("Unsupported ZIP file");var n=Qk(e),s=fq(Ms(e,"[Content_Types].xml")),a=!1,o,l;if(s.workbooks.length===0&&(l="xl/workbook.xml",Xr(e,l,!0)&&s.workbooks.push(l)),s.workbooks.length===0){if(l="xl/workbook.bin",!Xr(e,l,!0))throw new Error("Could not find workbook");s.workbooks.push(l),a=!0}s.workbooks[0].slice(-3)=="bin"&&(a=!0);var c={},u={};if(!t.bookSheets&&!t.bookProps){if(Af=[],s.sst)try{Af=Ite(Xr(e,Js(s.sst)),s.sst,t)}catch(U){if(t.WTF)throw U}t.cellStyles&&s.themes.length&&(c=Dte(Ms(e,s.themes[0].replace(/^\//,""),!0)||"",s.themes[0],t)),s.style&&(u=Ote(Xr(e,Js(s.style)),s.style,c,t))}s.links.map(function(U){try{var Q=Tf(Ms(e,Nh(Js(U))),U);return Lte(Xr(e,Js(U)),Q,U,t)}catch{}});var d=Cte(Xr(e,Js(s.workbooks[0])),s.workbooks[0],t),f={},h="";s.coreprops.length&&(h=Xr(e,Js(s.coreprops[0]),!0),h&&(f=qP(h)),s.extprops.length!==0&&(h=Xr(e,Js(s.extprops[0]),!0),h&&yq(h,f,t)));var m={};(!t.bookSheets||t.bookProps)&&s.custprops.length!==0&&(h=Ms(e,Js(s.custprops[0]),!0),h&&(m=bq(h,t)));var g={};if((t.bookSheets||t.bookProps)&&(d.Sheets?o=d.Sheets.map(function(Q){return Q.name}):f.Worksheets&&f.SheetNames.length>0&&(o=f.SheetNames),t.bookProps&&(g.Props=f,g.Custprops=m),t.bookSheets&&typeof o<"u"&&(g.SheetNames=o),t.bookSheets?g.SheetNames:t.bookProps))return g;o={};var p={};t.bookDeps&&s.calcchain&&(p=Mte(Xr(e,Js(s.calcchain)),s.calcchain));var x=0,b={},w,y;{var _=d.Sheets;f.Worksheets=_.length,f.SheetNames=[];for(var N=0;N!=_.length;++N)f.SheetNames[N]=_[N].name}var k=a?"bin":"xml",S=s.workbooks[0].lastIndexOf("/"),E=(s.workbooks[0].slice(0,S+1)+"_rels/"+s.workbooks[0].slice(S+1)+".rels").replace(/^\//,"");ra(e,E)||(E="xl/_rels/workbook."+k+".rels");var j=Tf(Ms(e,E,!0),E.replace(/_rels.*/,"s5s"));(s.metadata||[]).length>=1&&(t.xlmeta=Bte(Xr(e,Js(s.metadata[0])),s.metadata[0],t)),(s.people||[]).length>=1&&(t.people=wQ(Xr(e,Js(s.people[0])),t)),j&&(j=ine(j,d.Sheets));var T=Xr(e,"xl/worksheets/sheet.xml",!0)?1:0;e:for(x=0;x!=f.Worksheets;++x){var R="sheet";if(j&&j[x]?(w="xl/"+j[x][1].replace(/[\/]?xl\//,""),ra(e,w)||(w=j[x][1]),ra(e,w)||(w=E.replace(/_rels\/.*$/,"")+j[x][1]),R=j[x][2]):(w="xl/worksheets/sheet"+(x+1-T)+"."+k,w=w.replace(/sheet0\./,"sheet.")),y=w.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels"),t&&t.sheets!=null)switch(typeof t.sheets){case"number":if(x!=t.sheets)continue e;break;case"string":if(f.SheetNames[x].toLowerCase()!=t.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(t.sheets)){for(var P=!1,D=0;D!=t.sheets.length;++D)typeof t.sheets[D]=="number"&&t.sheets[D]==x&&(P=1),typeof t.sheets[D]=="string"&&t.sheets[D].toLowerCase()==f.SheetNames[x].toLowerCase()&&(P=1);if(!P)continue e}}one(e,w,y,f.SheetNames[x],x,b,o,R,t,d,c,u)}return g={Directory:s,Workbook:d,Props:f,Custprops:m,Deps:p,Sheets:o,SheetNames:f.SheetNames,Strings:Af,Styles:u,Themes:c,SSF:xr(it)},t&&t.bookFiles&&(e.files?(g.keys=n,g.files=e.files):(g.keys=[],g.files={},e.FullPaths.forEach(function(U,Q){U=U.replace(/^Root Entry[\/]/,""),g.keys.push(U),g.files[U]=e.FileIndex[Q]}))),t&&t.bookVBA&&(s.vba.length>0?g.vbaraw=Xr(e,Js(s.vba[0]),!0):s.defaults&&s.defaults.bin===CQ&&(g.vbaraw=Xr(e,"xl/vbaProject.bin",!0))),g}function cne(e,t){var r=t||{},n="Workbook",s=tt.find(e,n);try{if(n="/!DataSpaces/Version",s=tt.find(e,n),!s||!s.content)throw new Error("ECMA-376 Encrypted file missing "+n);if(BY(s.content),n="/!DataSpaces/DataSpaceMap",s=tt.find(e,n),!s||!s.content)throw new Error("ECMA-376 Encrypted file missing "+n);var a=UY(s.content);if(a.length!==1||a[0].comps.length!==1||a[0].comps[0].t!==0||a[0].name!=="StrongEncryptionDataSpace"||a[0].comps[0].v!=="EncryptedPackage")throw new Error("ECMA-376 Encrypted file bad "+n);if(n="/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace",s=tt.find(e,n),!s||!s.content)throw new Error("ECMA-376 Encrypted file missing "+n);var o=WY(s.content);if(o.length!=1||o[0]!="StrongEncryptionTransform")throw new Error("ECMA-376 Encrypted file bad "+n);if(n="/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary",s=tt.find(e,n),!s||!s.content)throw new Error("ECMA-376 Encrypted file missing "+n);HY(s.content)}catch{}if(n="/EncryptionInfo",s=tt.find(e,n),!s||!s.content)throw new Error("ECMA-376 Encrypted file missing "+n);var l=VY(s.content);if(n="/EncryptedPackage",s=tt.find(e,n),!s||!s.content)throw new Error("ECMA-376 Encrypted file missing "+n);if(l[0]==4&&typeof decrypt_agile<"u")return decrypt_agile(l[1],s.content,r.password||"",r);if(l[0]==2&&typeof decrypt_std76<"u")return decrypt_std76(l[1],s.content,r.password||"",r);throw new Error("File is password-protected")}function une(e,t){return t.bookType=="ods"?sO(e,t):t.bookType=="numbers"?sne(e,t):t.bookType=="xlsb"?dne(e,t):fne(e,t)}function dne(e,t){wu=1024,e&&!e.SSF&&(e.SSF=xr(it)),e&&e.SSF&&(Cd(),Zx(e.SSF),t.revssf=tg(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,Pf?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var r=t.bookType=="xlsb"?"bin":"xml",n=RR.indexOf(t.bookType)>-1,s=S_();B_(t=t||{});var a=u_(),o="",l=0;if(t.cellXfs=[],wl(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),o="docProps/core.xml",bt(a,o,KP(e.Props,t)),s.coreprops.push(o),Qt(t.rels,2,o,St.CORE_PROPS),o="docProps/app.xml",!(e.Props&&e.Props.SheetNames))if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{for(var c=[],u=0;u<e.SheetNames.length;++u)(e.Workbook.Sheets[u]||{}).Hidden!=2&&c.push(e.SheetNames[u]);e.Props.SheetNames=c}for(e.Props.Worksheets=e.Props.SheetNames.length,bt(a,o,QP(e.Props)),s.extprops.push(o),Qt(t.rels,3,o,St.EXT_PROPS),e.Custprops!==e.Props&&Mr(e.Custprops||{}).length>0&&(o="docProps/custom.xml",bt(a,o,JP(e.Custprops)),s.custprops.push(o),Qt(t.rels,4,o,St.CUST_PROPS)),l=1;l<=e.SheetNames.length;++l){var d={"!id":{}},f=e.Sheets[e.SheetNames[l-1]],h=(f||{})["!type"]||"sheet";switch(h){case"chart":default:o="xl/worksheets/sheet"+l+"."+r,bt(a,o,Ute(l-1,o,t,e,d)),s.sheets.push(o),Qt(t.wbrels,-1,"worksheets/sheet"+l+"."+r,St.WS[0])}if(f){var m=f["!comments"],g=!1,p="";m&&m.length>0&&(p="xl/comments"+l+"."+r,bt(a,p,Hte(m,p)),s.comments.push(p),Qt(d,-1,"../comments"+l+"."+r,St.CMNT),g=!0),f["!legacy"]&&g&&bt(a,"xl/drawings/vmlDrawing"+l+".vml",AR(l,f["!comments"])),delete f["!comments"],delete f["!legacy"]}d["!id"].rId1&&bt(a,Nh(o),Ru(d))}return t.Strings!=null&&t.Strings.length>0&&(o="xl/sharedStrings."+r,bt(a,o,zte(t.Strings,o,t)),s.strs.push(o),Qt(t.wbrels,-1,"sharedStrings."+r,St.SST)),o="xl/workbook."+r,bt(a,o,$te(e,o)),s.workbooks.push(o),Qt(t.rels,1,o,St.WB),o="xl/theme/theme1.xml",bt(a,o,A_(e.Themes,t)),s.themes.push(o),Qt(t.wbrels,-1,"theme/theme1.xml",St.THEME),o="xl/styles."+r,bt(a,o,Wte(e,o,t)),s.styles.push(o),Qt(t.wbrels,-1,"styles."+r,St.STY),e.vbaraw&&n&&(o="xl/vbaProject.bin",bt(a,o,e.vbaraw),s.vba.push(o),Qt(t.wbrels,-1,"vbaProject.bin",St.VBA)),o="xl/metadata."+r,bt(a,o,Vte(o)),s.metadata.push(o),Qt(t.wbrels,-1,"metadata."+r,St.XLMETA),bt(a,"[Content_Types].xml",VP(s,t)),bt(a,"_rels/.rels",Ru(t.rels)),bt(a,"xl/_rels/workbook."+r+".rels",Ru(t.wbrels)),delete t.revssf,delete t.ssf,a}function fne(e,t){wu=1024,e&&!e.SSF&&(e.SSF=xr(it)),e&&e.SSF&&(Cd(),Zx(e.SSF),t.revssf=tg(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,Pf?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var r="xml",n=RR.indexOf(t.bookType)>-1,s=S_();B_(t=t||{});var a=u_(),o="",l=0;if(t.cellXfs=[],wl(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),o="docProps/core.xml",bt(a,o,KP(e.Props,t)),s.coreprops.push(o),Qt(t.rels,2,o,St.CORE_PROPS),o="docProps/app.xml",!(e.Props&&e.Props.SheetNames))if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{for(var c=[],u=0;u<e.SheetNames.length;++u)(e.Workbook.Sheets[u]||{}).Hidden!=2&&c.push(e.SheetNames[u]);e.Props.SheetNames=c}e.Props.Worksheets=e.Props.SheetNames.length,bt(a,o,QP(e.Props)),s.extprops.push(o),Qt(t.rels,3,o,St.EXT_PROPS),e.Custprops!==e.Props&&Mr(e.Custprops||{}).length>0&&(o="docProps/custom.xml",bt(a,o,JP(e.Custprops)),s.custprops.push(o),Qt(t.rels,4,o,St.CUST_PROPS));var d=["SheetJ5"];for(t.tcid=0,l=1;l<=e.SheetNames.length;++l){var f={"!id":{}},h=e.Sheets[e.SheetNames[l-1]],m=(h||{})["!type"]||"sheet";switch(m){case"chart":default:o="xl/worksheets/sheet"+l+"."+r,bt(a,o,zR(l-1,t,e,f)),s.sheets.push(o),Qt(t.wbrels,-1,"worksheets/sheet"+l+"."+r,St.WS[0])}if(h){var g=h["!comments"],p=!1,x="";if(g&&g.length>0){var b=!1;g.forEach(function(w){w[1].forEach(function(y){y.T==!0&&(b=!0)})}),b&&(x="xl/threadedComments/threadedComment"+l+"."+r,bt(a,x,yQ(g,d,t)),s.threadedcomments.push(x),Qt(f,-1,"../threadedComments/threadedComment"+l+"."+r,St.TCMNT)),x="xl/comments"+l+"."+r,bt(a,x,PR(g)),s.comments.push(x),Qt(f,-1,"../comments"+l+"."+r,St.CMNT),p=!0}h["!legacy"]&&p&&bt(a,"xl/drawings/vmlDrawing"+l+".vml",AR(l,h["!comments"])),delete h["!comments"],delete h["!legacy"]}f["!id"].rId1&&bt(a,Nh(o),Ru(f))}return t.Strings!=null&&t.Strings.length>0&&(o="xl/sharedStrings."+r,bt(a,o,vR(t.Strings,t)),s.strs.push(o),Qt(t.wbrels,-1,"sharedStrings."+r,St.SST)),o="xl/workbook."+r,bt(a,o,KR(e)),s.workbooks.push(o),Qt(t.rels,1,o,St.WB),o="xl/theme/theme1.xml",bt(a,o,A_(e.Themes,t)),s.themes.push(o),Qt(t.wbrels,-1,"theme/theme1.xml",St.THEME),o="xl/styles."+r,bt(a,o,jR(e,t)),s.styles.push(o),Qt(t.wbrels,-1,"styles."+r,St.STY),e.vbaraw&&n&&(o="xl/vbaProject.bin",bt(a,o,e.vbaraw),s.vba.push(o),Qt(t.wbrels,-1,"vbaProject.bin",St.VBA)),o="xl/metadata."+r,bt(a,o,TR()),s.metadata.push(o),Qt(t.wbrels,-1,"metadata."+r,St.XLMETA),d.length>1&&(o="xl/persons/person.xml",bt(a,o,bQ(d)),s.people.push(o),Qt(t.wbrels,-1,"persons/person.xml",St.PEOPLE)),bt(a,"[Content_Types].xml",VP(s,t)),bt(a,"_rels/.rels",Ru(t.rels)),bt(a,"xl/_rels/workbook."+r+".rels",Ru(t.wbrels)),delete t.revssf,delete t.ssf,a}function $_(e,t){var r="";switch((t||{}).type||"base64"){case"buffer":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":r=Gs(e.slice(0,12));break;case"binary":r=e;break;case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}return[r.charCodeAt(0),r.charCodeAt(1),r.charCodeAt(2),r.charCodeAt(3),r.charCodeAt(4),r.charCodeAt(5),r.charCodeAt(6),r.charCodeAt(7)]}
vendor: 4,340 bytes, line 688
688function hne(e,t){return tt.find(e,"EncryptedPackage")?cne(e,t):JR(e,t)}function mne(e,t){var r,n=e,s=t||{};return s.type||(s.type=Nt&&Buffer.isBuffer(e)?"buffer":"base64"),r=wP(n,s),lne(r,s)}function iO(e,t){var r=0;e:for(;r<e.length;)switch(e.charCodeAt(r)){case 10:case 13:case 32:++r;break;case 60:return Jy(e.slice(r),t);default:break e}return cd.to_workbook(e,t)}function pne(e,t){var r="",n=$_(e,t);switch(t.type){case"base64":r=Gs(e);break;case"binary":r=e;break;case"buffer":r=e.toString("binary");break;case"array":r=pc(e);break;default:throw new Error("Unrecognized type "+t.type)}return n[0]==239&&n[1]==187&&n[2]==191&&(r=tr(r)),t.type="binary",iO(r,t)}function xne(e,t){var r=e;return t.type=="base64"&&(r=Gs(r)),r=Co.utils.decode(1200,r.slice(2),"str"),t.type="binary",iO(r,t)}function gne(e){return e.match(/[^\x00-\x7F]/)?hi(e):e}function qv(e,t,r,n){return n?(r.type="string",cd.to_workbook(e,r)):cd.to_workbook(t,r)}function Vp(e,t){a_();var r=t||{};if(typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer)return Vp(new Uint8Array(e),(r=xr(r),r.type="array",r));typeof Uint8Array<"u"&&e instanceof Uint8Array&&!r.type&&(r.type=typeof Deno<"u"?"buffer":"array");var n=e,s=[0,0,0,0],a=!1;if(r.cellStyles&&(r.cellNF=!0,r.sheetStubs=!0),Du={},r.dateNF&&(Du.dateNF=r.dateNF),r.type||(r.type=Nt&&Buffer.isBuffer(e)?"buffer":"base64"),r.type=="file"&&(r.type=Nt?"buffer":"binary",n=dG(e),typeof Uint8Array<"u"&&!Nt&&(r.type="array")),r.type=="string"&&(a=!0,r.type="binary",r.codepage=65001,n=gne(e)),r.type=="array"&&typeof Uint8Array<"u"&&e instanceof Uint8Array&&typeof ArrayBuffer<"u"){var o=new ArrayBuffer(3),l=new Uint8Array(o);if(l.foo="bar",!l.foo)return r=xr(r),r.type="array",Vp(i_(n),r)}switch((s=$_(n,r))[0]){case 208:if(s[1]===207&&s[2]===17&&s[3]===224&&s[4]===161&&s[5]===177&&s[6]===26&&s[7]===225)return hne(tt.read(n,r),r);break;case 9:if(s[1]<=8)return JR(n,r);break;case 60:return Jy(n,r);case 73:if(s[1]===73&&s[2]===42&&s[3]===0)throw new Error("TIFF Image File is not a spreadsheet");if(s[1]===68)return _Y(n,r);break;case 84:if(s[1]===65&&s[2]===66&&s[3]===76)return xR.to_workbook(n,r);break;case 80:return s[1]===75&&s[2]<9&&s[3]<9?mne(n,r):qv(e,n,r,a);case 239:return s[3]===60?Jy(n,r):qv(e,n,r,a);case 255:if(s[1]===254)return xne(n,r);if(s[1]===0&&s[2]===2&&s[3]===0)return sc.to_workbook(n,r);break;case 0:if(s[1]===0&&(s[2]>=2&&s[3]===0||s[2]===0&&(s[3]===8||s[3]===9)))return sc.to_workbook(n,r);break;case 3:case 131:case 139:case 140:return Qy.to_workbook(n,r);case 123:if(s[1]===92&&s[2]===114&&s[3]===116)return NR.to_workbook(n,r);break;case 10:case 13:case 32:return pne(n,r);case 137:if(s[1]===80&&s[2]===78&&s[3]===71)throw new Error("PNG Image File is not a spreadsheet");break}return bY.indexOf(s[0])>-1&&s[2]<=12&&s[3]<=31?Qy.to_workbook(n,r):qv(e,n,r,a)}function oO(e,t){switch(t.type){case"base64":case"binary":break;case"buffer":case"array":t.type="";break;case"file":return i0(t.file,tt.write(e,{type:Nt?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");default:throw new Error("Unrecognized type "+t.type)}return tt.write(e,t)}function vne(e,t){var r=xr(t||{}),n=une(e,r);return yne(n,r)}function yne(e,t){var r={},n=Nt?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(t.compression&&(r.compression="DEFLATE"),t.password)r.type=n;else switch(t.type){case"base64":r.type="base64";break;case"binary":r.type="string";break;case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");case"buffer":case"file":r.type=n;break;default:throw new Error("Unrecognized type "+t.type)}var s=e.FullPaths?tt.write(e,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[r.type]||r.type,compression:!!t.compression}):e.generate(r);if(typeof Deno<"u"&&typeof s=="string"){if(t.type=="binary"||t.type=="base64")return s;s=new Uint8Array(Jx(s))}return t.password&&typeof encrypt_agile<"u"?oO(encrypt_agile(s,t.password),t):t.type==="file"?i0(t.file,s):t.type=="string"?tr(s):s}function wne(e,t){var r=t||{},n=gre(e,r);return oO(n,r)}function ti(e,t,r){r||(r="");var n=r+e;switch(t.type){case"base64":return vh(hi(n));case"binary":return hi(n);case"string":return e;case"file":return i0(t.file,n,"utf8");case"buffer":return Nt?io(n,"utf8"):typeof TextEncoder<"u"?new TextEncoder().encode(n):ti(n,{type:"binary"}
vendor: 4,593 bytes, line 688
688).split("").map(function(s){return s.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}function bne(e,t){switch(t.type){case"base64":return vh(e);case"binary":return e;case"string":return e;case"file":return i0(t.file,e,"binary");case"buffer":return Nt?io(e,"binary"):e.split("").map(function(r){return r.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}function pm(e,t){switch(t.type){case"string":case"base64":case"binary":for(var r="",n=0;n<e.length;++n)r+=String.fromCharCode(e[n]);return t.type=="base64"?vh(r):t.type=="string"?tr(r):r;case"file":return i0(t.file,e);case"buffer":return e;default:throw new Error("Unrecognized type "+t.type)}}function lO(e,t){a_(),hte(e);var r=xr(t||{});if(r.cellStyles&&(r.cellNF=!0,r.sheetStubs=!0),r.type=="array"){r.type="binary";var n=lO(e,r);return r.type="array",Jx(n)}var s=0;if(r.sheet&&(typeof r.sheet=="number"?s=r.sheet:s=e.SheetNames.indexOf(r.sheet),!e.SheetNames[s]))throw new Error("Sheet not found: "+r.sheet+" : "+typeof r.sheet);switch(r.bookType||"xlsb"){case"xml":case"xlml":return ti(ure(e,r),r);case"slk":case"sylk":return ti(pR.from_sheet(e.Sheets[e.SheetNames[s]],r),r);case"htm":case"html":return ti(eO(e.Sheets[e.SheetNames[s]],r),r);case"txt":return bne(uO(e.Sheets[e.SheetNames[s]],r),r);case"csv":return ti(U_(e.Sheets[e.SheetNames[s]],r),r,"\uFEFF");case"dif":return ti(xR.from_sheet(e.Sheets[e.SheetNames[s]],r),r);case"dbf":return pm(Qy.from_sheet(e.Sheets[e.SheetNames[s]],r),r);case"prn":return ti(cd.from_sheet(e.Sheets[e.SheetNames[s]],r),r);case"rtf":return ti(NR.from_sheet(e.Sheets[e.SheetNames[s]],r),r);case"eth":return ti(gR.from_sheet(e.Sheets[e.SheetNames[s]],r),r);case"fods":return ti(sO(e,r),r);case"wk1":return pm(sc.sheet_to_wk1(e.Sheets[e.SheetNames[s]],r),r);case"wk3":return pm(sc.book_to_wk3(e,r),r);case"biff2":r.biff||(r.biff=2);case"biff3":r.biff||(r.biff=3);case"biff4":return r.biff||(r.biff=4),pm(ZR(e,r),r);case"biff5":r.biff||(r.biff=5);case"biff8":case"xla":case"xls":return r.biff||(r.biff=8),wne(e,r);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return vne(e,r);default:throw new Error("Unrecognized bookType |"+r.bookType+"|")}}function _ne(e){if(!e.bookType){var t={xls:"biff8",htm:"html",slk:"sylk",socialcalc:"eth",Sh33tJS:"WTF"},r=e.file.slice(e.file.lastIndexOf(".")).toLowerCase();r.match(/^\.[a-z]+$/)&&(e.bookType=r.slice(1)),e.bookType=t[e.bookType]||e.bookType}}function cO(e,t,r){var n={};return n.type="file",n.file=t,_ne(n),lO(e,n)}function Nne(e,t,r,n,s,a,o,l){var c=Vr(r),u=l.defval,d=l.raw||!Object.prototype.hasOwnProperty.call(l,"raw"),f=!0,h=s===1?[]:{};if(s!==1)if(Object.defineProperty)try{Object.defineProperty(h,"__rowNum__",{value:r,enumerable:!1})}catch{h.__rowNum__=r}else h.__rowNum__=r;if(!o||e[r])for(var m=t.s.c;m<=t.e.c;++m){var g=o?e[r][m]:e[n[m]+c];if(g===void 0||g.t===void 0){if(u===void 0)continue;a[m]!=null&&(h[a[m]]=u);continue}var p=g.v;switch(g.t){case"z":if(p==null)break;continue;case"e":p=p==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+g.t)}if(a[m]!=null){if(p==null)if(g.t=="e"&&p===null)h[a[m]]=null;else if(u!==void 0)h[a[m]]=u;else if(d&&p===null)h[a[m]]=null;else continue;else h[a[m]]=d&&(g.t!=="n"||g.t==="n"&&l.rawNumbers!==!1)?p:eo(g,p,l);p!=null&&(f=!1)}}return{row:h,isempty:f}}function Gp(e,t){if(e==null||e["!ref"]==null)return[];var r={t:"n",v:0},n=0,s=1,a=[],o=0,l="",c={s:{r:0,c:0},e:{r:0,c:0}},u=t||{},d=u.range!=null?u.range:e["!ref"];switch(u.header===1?n=1:u.header==="A"?n=2:Array.isArray(u.header)?n=3:u.header==null&&(n=0),typeof d){case"string":c=It(d);break;case"number":c=It(e["!ref"]),c.s.r=d;break;default:c=d}n>0&&(s=0);var f=Vr(c.s.r),h=[],m=[],g=0,p=0,x=Array.isArray(e),b=c.s.r,w=0,y={};x&&!e[b]&&(e[b]=[]);var _=u.skipHidden&&e["!cols"]||[],N=u.skipHidden&&e["!rows"]||[];for(w=c.s.c;w<=c.e.c;++w)if(!(_[w]||{}).hidden)switch(h[w]=kr(w),r=x?e[b][w]:e[h[w]+f],n){case 1:a[w]=w-c.s.c;break;case 2:a[w]=h[w];break;case 3:a[w]=u.header[w-c.s.c];break;default:if(r==null&&(r={w:"__EMPTY",t:"s"}),l=o=eo(r,null,u),p=y[o]||0,!p)y[o]=1;else{do l=o+"_"+p++;while(y[l]);y[o]=p,y[l]=1}a[w]=l}for(b=c.s.r+s;b<=c.e.r;++b)if(!(N[b]||{}).hidden){var k=Nne(e,c,b,h,n,a,x,u);(k.isempty===!1||(n===1?u.blankrows!==!1:u.blankrows))&&(m[g++]=k.row)}return m.length=g,m}var Gj=/"/g;function Sne(e,t,r,n,s,a,o,l){for(var c=!0,u=[],d="",f=Vr(r),h=t.s.c;h<=t.e.c;++h)if(n[h]){var m=l.dense?(e[r]||[])[h]:e[n[h]+f];if(m==null)d="";else if(m.v!=null){c=!1,d=""+(l.rawNumbers&&m.t=="n"?m.v:eo(m,null,l));for(var g=0,p=0;g!==d.length;
688++g)if((p=d.charCodeAt(g))===s||p===a||p===34||l.forceQuotes){d='"'+d.replace(Gj,'""')+'"';break}d=="ID"&&(d='"ID"')}else m.f!=null&&!m.F?(c=!1,d="="+m.f,d.indexOf(",")>=0&&(d='"'+d.replace(Gj,'""')+'"')):d="";u.push(d)}return l.blankrows===!1&&c?null:u.join(o)}function U_(e,t){var r=[],n=t??{};if(e==null||e["!ref"]==null)return"";var s=It(e["!ref"]),a=n.FS!==void 0?n.FS:",",o=a.charCodeAt(0),l=n.RS!==void 0?n.RS:`
689`,c=l.charCodeAt(0),u=new RegExp((a=="|"?"\\|":a)+"+$"),d="",f=[];n.dense=Array.isArray(e);for(var h=n.skipHidden&&e["!cols"]||[],m=n.skipHidden&&e["!rows"]||[],g=s.s.c;g<=s.e.c;++g)(h[g]||{}).hidden||(f[g]=kr(g));for(var p=0,x=s.s.r;x<=s.e.r;++x)(m[x]||{}).hidden||(d=Sne(e,s,x,f,o,c,a,n),d!=null&&(n.strip&&(d=d.replace(u,"")),(d||n.blankrows!==!1)&&r.push((p++?l:"")+d)));return delete n.dense,r.join("")}function uO(e,t){t||(t={}),t.FS="	",t.RS=`
690`;var r=U_(e,t);return r}function kne(e){var t="",r,n="";if(e==null||e["!ref"]==null)return[];var s=It(e["!ref"]),a="",o=[],l,c=[],u=Array.isArray(e);for(l=s.s.c;l<=s.e.c;++l)o[l]=kr(l);for(var d=s.s.r;d<=s.e.r;++d)for(a=Vr(d),l=s.s.c;l<=s.e.c;++l)if(t=o[l]+a,r=u?(e[d]||[])[l]:e[t],n="",r!==void 0){if(r.F!=null){if(t=r.F,!r.f)continue;n=r.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(r.f!=null)n=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)n=""+r.v;else if(r.t=="b")n=r.v?"TRUE":"FALSE";else if(r.w!==void 0)n="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?n="'"+r.v:n=""+r.v}}c[c.length]=t+"="+n}return c}function dO(e,t,r){var n=r||{},s=+!n.skipHeader,a=e||{},o=0,l=0;if(a&&n.origin!=null)if(typeof n.origin=="number")o=n.origin;else{var c=typeof n.origin=="string"?jr(n.origin):n.origin;o=c.r,l=c.c}var u,d={s:{c:0,r:0},e:{c:l,r:o+t.length-1+s}};if(a["!ref"]){var f=It(a["!ref"]);d.e.c=Math.max(d.e.c,f.e.c),d.e.r=Math.max(d.e.r,f.e.r),o==-1&&(o=f.e.r+1,d.e.r=o+t.length-1+s)}else o==-1&&(o=0,d.e.r=t.length-1+s);var h=n.header||[],m=0;t.forEach(function(p,x){Mr(p).forEach(function(b){(m=h.indexOf(b))==-1&&(h[m=h.length]=b);var w=p[b],y="z",_="",N=ut({c:l+m,r:o+x+s});u=Ah(a,N),w&&typeof w=="object"&&!(w instanceof Date)?a[N]=w:(typeof w=="number"?y="n":typeof w=="boolean"?y="b":typeof w=="string"?y="s":w instanceof Date?(y="d",n.cellDates||(y="n",w=dn(w)),_=n.dateNF||it[14]):w===null&&n.nullError&&(y="e",w=0),u?(u.t=y,u.v=w,delete u.w,delete u.R,_&&(u.z=_)):a[N]=u={t:y,v:w},_&&(u.z=_))})}),d.e.c=Math.max(d.e.c,l+h.length-1);var g=Vr(o);if(s)for(m=0;m<h.length;++m)a[kr(m+l)+g]={t:"s",v:h[m]};return a["!ref"]=yt(d),a}function jne(e,t){return dO(null,e,t)}function Ah(e,t,r){if(typeof t=="string"){if(Array.isArray(e)){var n=jr(t);return e[n.r]||(e[n.r]=[]),e[n.r][n.c]||(e[n.r][n.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return typeof t!="number"?Ah(e,ut(t)):Ah(e,ut({r:t,c:r||0}))}function Ene(e,t){if(typeof t=="number"){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}else if(typeof t=="string"){var r=e.SheetNames.indexOf(t);if(r>-1)return r;throw new Error("Cannot find sheet name |"+t+"|")}else throw new Error("Cannot find sheet |"+t+"|")}function W_(){return{SheetNames:[],Sheets:{}}}function z_(e,t,r,n){var s=1;if(!r)for(;s<=65535&&e.SheetNames.indexOf(r="Sheet"+s)!=-1;++s,r=void 0);if(!r||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(n&&e.SheetNames.indexOf(r)>=0){var a=r.match(/(^.*?)(\d+)$/);s=a&&+a[2]||0;var o=a&&a[1]||r;for(++s;s<=65535&&e.SheetNames.indexOf(r=o+s)!=-1;++s);}if(qR(r),e.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return e.SheetNames.push(r),e.Sheets[r]=t,r}function Cne(e,t,r){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var n=Ene(e,t);switch(e.Workbook.Sheets[n]||(e.Workbook.Sheets[n]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}e.Workbook.Sheets[n].Hidden=r}function Tne(e,t){return e.z=t,e}function fO(e,t,r){return t?(e.l={Target:t},r&&(e.l.Tooltip=r)):delete e.l,e}function Ane(e,t,r){return fO(e,"#"+t,r)}function Pne(e,t,r){e.c||(e.c=[]),e.c.push({t,a:r||"SheetJS"})}function Rne(e,t,r,n){for(var s=typeof t!="string"?t:It(t),a=typeof t=="string"?t:yt(t),o=s.s.r;o<=s.e.r;++o)for(var l=s.s.c;l<=s.e.c;++l){var c=Ah(e,o,l);c.t="n",c.F=a,delete c.v,o==s.s.r&&l==s.s.c&&(c.f=r,n&&(c.D=!0))}return e}var Uo={encode_col:kr,encode_row:Vr,encode_cell:ut,encode_range:yt,decode_col:v_,decode_row:g_,split_cell:zG,decode_cell:jr,decode_range:gs,format_cell:eo,sheet_add_aoa:LP,sheet_add_json:dO,sheet_add_dom:tO,aoa_to_sheet:Td,json_to_sheet:jne,table_to_sheet:rO,table_to_book:Bre,sheet_to_csv:U_,sheet_to_txt:uO,sheet_to_json:Gp,sheet_to_html:eO,sheet_to_formulae:kne,sheet_to_row_object_array:Gp,sheet_get_cell:Ah,book_new:W_,book_append_sheet:z_,book_set_sheet_visibility:Cne,cell_set_number_format:Tne,cell_set_hyperlink:fO,cell_set_internal_link:Ane,cell_add_comment:Pne,sheet_set_array_formula:Rne,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function One({onImportComplete:e}){const[t,r]=v.useState(!1),[n,s]=v.useState(!1),[a,o]=v.useState(null),l=v.useRef(null),c=()=>{const f=[{"שם מלא":"דנה כהן",טלפון:"0501234567","תעודת זהות":"123456789",אימייל:"[email protected]",קורסים:"קורס איפור ביוטי"},{"שם מלא":"יעל לוי",טלפון:"0529876543","תעודת זהות":"987654321",אימייל:"[email protected]",קורסים:"קורס איפור ביוטי, קורס איפור כלה"},{"שם מלא":"מיכל אברהם",טלפון:"0541112233","תעודת זהות":"111222333",אימייל:"",קורסים:""}],h=Uo.json_to_sheet(f),m=Uo.book_new();Uo.book_append_sheet(m,h,"תלמידים"),h["!cols"]=[{wch:20},{wch:15},{wch:15},{wch:25},{wch:40}],cO(m,"תבנית_ייבוא_תלמידים.xlsx"),K.success("התבנית הורדה בהצלחה")},u=async f=>{var g;const h=(g=f.target.files)==null?void 0:g[0];if(!h)return;if(!["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel","text/csv"].includes(h.type)&&!h.name.endsWith(".xlsx")&&!h.name.endsWith(".xls")&&!h.name.endsWith(".csv")){K.error("יש להעלות קובץ אקסל (xlsx, xls) או CSV");return}s(!0),o(null);try{const p=await h.arrayBuffer(),x=Vp(p),b=x.SheetNames[0],w=x.Sheets[b],y=Uo.sheet_to_json(w);if(y.length===0){K.error("הקובץ ריק"),s(!1);return}let _=0,N=0;const k=[],{data:S}=await de.from("courses").select("id, name");for(const E of y){const j=E["שם מלא"]||E.name||E.שם,T=String(E.טלפון||E.phone||"").replace(/\D/g,""),R=String(E["תעודת זהות"]||E.id_number||E["ת.ז"]||E["ת״ז"]||"").replace(/\D/g,""),P=E.אימייל||E.email||E.מייל||null,D=E.קורסים||E.courses||"";if(!j){N++,k.push("שורה ללא שם");continue}if(!T||T.length<9){N++,k.push(`${j}
690: טלפון לא תקין`);continue}if(!R||R.length<5||R.length>9){N++,k.push(`${j}: תעודת זהות לא תקינה (נדרשות 5-9 ספרות)`);continue}const U=D?D.split(",").map(C=>C.trim()).filter(C=>C):[],Q=[];if(S)for(const C of U){const X=S.find(se=>se.name.toLowerCase()===C.toLowerCase());X&&Q.push(X.name)}const{data:Y}=await de.from("students").select("id").eq("phone",T).maybeSingle(),{data:V}=await de.from("students").select("id").eq("id_number",R).maybeSingle();if(Y||V){N++,k.push(`${j}: כבר קיים במערכת`);continue}const{error:F}=await de.from("students").insert({name:j,phone:T,id_number:R,email:P||null,courses:Q,status:"active"});F?(N++,k.push(`${j}: ${F.message}`)):_++}o({success:_,failed:N,errors:k.slice(0,10)}),_>0&&(K.success(`יובאו ${_} תלמידים בהצלחה`),e()),N>0&&_===0?K.error(`${N} תלמידים לא יובאו`):N>0&&K.warning(`${N} תלמידים לא יובאו`)}catch(p){console.error("Error importing students:",p),K.error("שגיאה בייבוא הקובץ")}finally{s(!1),l.current&&(l.current.value="")}},d=f=>{r(f),f||o(null)};return i.jsxs(Ht,{open:t,onOpenChange:d,children:[i.jsx(va,{asChild:!0,children:i.jsxs(ee,{variant:"outline",className:"gap-2",children:[i.jsx(ed,{className:"h-4 w-4"}),"ייבוא מאקסל"]})}),i.jsxs(Ut,{className:"sm:max-w-md",dir:"rtl",children:[i.jsxs(Wt,{children:[i.jsx(zt,{children:"ייבוא תלמידים מאקסל"}),i.jsx(a0,{children:"העלה קובץ אקסל עם פרטי תלמידים לייבוא מהיר"})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"bg-muted/50 rounded-lg p-4 space-y-3",children:[i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(P4,{className:"h-5 w-5 text-green-600 mt-0.5"}),i.jsxs("div",{className:"flex-1",children:[i.jsx("p",{className:"text-sm font-medium",children:"תבנית לדוגמה"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"הורד את התבנית ומלא אותה עם פרטי התלמידים"})]})]}),i.jsxs(ee,{variant:"outline",size:"sm",onClick:c,className:"w-full gap-2",children:[i.jsx(A4,{className:"h-4 w-4"}),"הורד תבנית לדוגמה"]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("input",{ref:l,type:"file",accept:".xlsx,.xls,.csv",onChange:u,className:"hidden",id:"excel-upload"}),i.jsx(ee,{variant:"default",className:"w-full gap-2",onClick:()=>{var f;return(f=l.current)==null?void 0:f.click()},disabled:n,children:n?i.jsxs(i.Fragment,{children:[i.jsx(yr,{className:"h-4 w-4 animate-spin"}),"מייבא..."]}):i.jsxs(i.Fragment,{children:[i.jsx(ed,{className:"h-4 w-4"}),"בחר קובץ להעלאה"]})}),i.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"קבצים נתמכים: xlsx, xls, csv"})]}),a&&i.jsxs("div",{className:"space-y-3 pt-2",children:[i.jsxs("div",{className:"flex gap-4 justify-center",children:[a.success>0&&i.jsxs("div",{className:"flex items-center gap-2 text-green-600",children:[i.jsx(Ha,{className:"h-5 w-5"}),i.jsxs("span",{className:"font-medium",children:[a.success," הצליחו"]})]}),a.failed>0&&i.jsxs("div",{className:"flex items-center gap-2 text-red-600",children:[i.jsx(yb,{className:"h-5 w-5"}),i.jsxs("span",{className:"font-medium",children:[a.failed," נכשלו"]})]})]}),a.errors.length>0&&i.jsxs("div",{className:"bg-red-50 dark:bg-red-950/20 rounded-lg p-3 max-h-32 overflow-y-auto",children:[i.jsx("p",{className:"text-xs font-medium text-red-700 dark:text-red-400 mb-1",children:"שגיאות:"}),i.jsx("ul",{className:"text-xs text-red-600 dark:text-red-400 space-y-1",children:a.errors.map((f,h)=>i.jsxs("li",{children:["• ",f]},h))})]})]}),i.jsxs("div",{className:"text-xs text-muted-foreground space-y-1 pt-2 border-t",children:[i.jsx("p",{className:"font-medium",children:"שדות נתמכים בקובץ:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-0.5",children:[i.jsxs("li",{children:[i.jsx("strong",{children:"שם מלא"})," - שדה חובה"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"טלפון"})," - שדה חובה (לפחות 9 ספרות)"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"תעודת זהות"})," - שדה חובה (5-9 ספרות)"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"אימייל"})," - אופציונלי"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"קורסים"})," - שמות קורסים מופרדים בפסיקים"]})]})]})]})]})]})}var Dne=v.createContext(void 0);function Oc(e){const t=v.useContext(Dne);return e||t||"ltr"}function tw(e,[t,r]){return Math.min(r,Math.max(t,e))}function Ine(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}
vendor: 6,856 bytes, line 690
690var H_="ScrollArea",[hO,K0e]=tn(H_),[Fne,wa]=hO(H_),mO=v.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:a=600,...o}=e,[l,c]=v.useState(null),[u,d]=v.useState(null),[f,h]=v.useState(null),[m,g]=v.useState(null),[p,x]=v.useState(null),[b,w]=v.useState(0),[y,_]=v.useState(0),[N,k]=v.useState(!1),[S,E]=v.useState(!1),j=ot(t,R=>c(R)),T=Oc(s);return i.jsx(Fne,{scope:r,type:n,dir:T,scrollHideDelay:a,scrollArea:l,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:m,onScrollbarXChange:g,scrollbarXEnabled:N,onScrollbarXEnabledChange:k,scrollbarY:p,onScrollbarYChange:x,scrollbarYEnabled:S,onScrollbarYEnabledChange:E,onCornerWidthChange:w,onCornerHeightChange:_,children:i.jsx(He.div,{dir:T,...o,ref:j,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});mO.displayName=H_;var pO="ScrollAreaViewport",xO=v.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:s,...a}=e,o=wa(pO,r),l=v.useRef(null),c=ot(t,l,o.onViewportChange);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),i.jsx(He.div,{"data-radix-scroll-area-viewport":"",...a,ref:c,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:i.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});xO.displayName=pO;var ji="ScrollAreaScrollbar",V_=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=wa(ji,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=s,l=e.orientation==="horizontal";return v.useEffect(()=>(l?a(!0):o(!0),()=>{l?a(!1):o(!1)}),[l,a,o]),s.type==="hover"?i.jsx(Mne,{...n,ref:t,forceMount:r}):s.type==="scroll"?i.jsx(Lne,{...n,ref:t,forceMount:r}):s.type==="auto"?i.jsx(gO,{...n,ref:t,forceMount:r}):s.type==="always"?i.jsx(G_,{...n,ref:t}):null});V_.displayName=ji;var Mne=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=wa(ji,e.__scopeScrollArea),[a,o]=v.useState(!1);return v.useEffect(()=>{const l=s.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),o(!0)},d=()=>{c=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),i.jsx(rn,{present:r||a,children:i.jsx(gO,{"data-state":a?"visible":"hidden",...n,ref:t})})}),Lne=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=wa(ji,e.__scopeScrollArea),a=e.orientation==="horizontal",o=lg(()=>c("SCROLL_END"),100),[l,c]=Ine("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return v.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,s.scrollHideDelay,c]),v.useEffect(()=>{const u=s.viewport,d=a?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const m=u[d];f!==m&&(c("SCROLL"),o()),f=m};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[s.viewport,a,c,o]),i.jsx(rn,{present:r||l!=="hidden",children:i.jsx(G_,{"data-state":l==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:ke(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ke(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),gO=v.forwardRef((e,t)=>{const r=wa(ji,e.__scopeScrollArea),{forceMount:n,...s}=e,[a,o]=v.useState(!1),l=e.orientation==="horizontal",c=lg(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;o(l?u:d)}},10);return dd(r.viewport,c),dd(r.content,c),i.jsx(rn,{present:n||a,children:i.jsx(G_,{"data-state":a?"visible":"hidden",...s,ref:t})})}),G_=v.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,s=wa(ji,e.__scopeScrollArea),a=v.useRef(null),o=v.useRef(0),[l,c]=v.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=_O(l.viewport,l.content),d={...n,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>a.current=h,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:h=>o.current=h};function f(h,m){return Hne(h,o.current,l,m)}return r==="horizontal"?i.jsx(Bne,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&a.current){const h=s.viewport.scrollLeft,m=qj(h,l,s.dir);a.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=f(h,s.dir))}}):r==="vertical"?i.jsx($ne,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&a.current){const h=s.viewport.scrollTop,m=qj(h,l);a.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=f(h))}}):null}),Bne=v.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,a=wa(ji,e.__scopeScrollArea),[o,l]=v.useState(),c=v.useRef(null),u=ot(t,c,a.onScrollbarXChange);return v.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),i.jsx(yO,{"data-orientation":"horizontal",...s,ref:u,sizes:r,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":og(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(a.viewport){const h=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),SO(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Kp(o.paddingLeft),paddingEnd:Kp(o.paddingRight)}})}})}),$ne=v.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,a=wa(ji,e.__scopeScrollArea),[o,l]=v.useState(),c=v.useRef(null),u=ot(t,c,a.onScrollbarYChange);return v.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),i.jsx(yO,{"data-orientation":"vertical",...s,ref:u,sizes:r,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":og(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(a.viewport){const h=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),SO(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&n({content:a.viewport.scrollHeight,viewport:
vendor: 5,619 bytes, line 690
690a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Kp(o.paddingTop),paddingEnd:Kp(o.paddingBottom)}})}})}),[Une,vO]=hO(ji),yO=v.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,m=wa(ji,r),[g,p]=v.useState(null),x=ot(t,j=>p(j)),b=v.useRef(null),w=v.useRef(""),y=m.viewport,_=n.content-n.viewport,N=Ur(d),k=Ur(c),S=lg(f,10);function E(j){if(b.current){const T=j.clientX-b.current.left,R=j.clientY-b.current.top;u({x:T,y:R})}}return v.useEffect(()=>{const j=T=>{const R=T.target;(g==null?void 0:g.contains(R))&&N(T,_)};return document.addEventListener("wheel",j,{passive:!1}),()=>document.removeEventListener("wheel",j,{passive:!1})},[y,g,_,N]),v.useEffect(k,[n,k]),dd(g,S),dd(m.content,S),i.jsx(Une,{scope:r,scrollbar:g,hasThumb:s,onThumbChange:Ur(a),onThumbPointerUp:Ur(o),onThumbPositionChange:k,onThumbPointerDown:Ur(l),children:i.jsx(He.div,{...h,ref:x,style:{position:"absolute",...h.style},onPointerDown:ke(e.onPointerDown,j=>{j.button===0&&(j.target.setPointerCapture(j.pointerId),b.current=g.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),E(j))}),onPointerMove:ke(e.onPointerMove,E),onPointerUp:ke(e.onPointerUp,j=>{const T=j.target;T.hasPointerCapture(j.pointerId)&&T.releasePointerCapture(j.pointerId),document.body.style.webkitUserSelect=w.current,m.viewport&&(m.viewport.style.scrollBehavior=""),b.current=null})})})}),qp="ScrollAreaThumb",wO=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=vO(qp,e.__scopeScrollArea);return i.jsx(rn,{present:r||s.hasThumb,children:i.jsx(Wne,{ref:t,...n})})}),Wne=v.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...s}=e,a=wa(qp,r),o=vO(qp,r),{onThumbPositionChange:l}=o,c=ot(t,f=>o.onThumbChange(f)),u=v.useRef(void 0),d=lg(()=>{u.current&&(u.current(),u.current=void 0)},100);return v.useEffect(()=>{const f=a.viewport;if(f){const h=()=>{if(d(),!u.current){const m=Vne(f,l);u.current=m,l()}};return l(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[a.viewport,d,l]),i.jsx(He.div,{"data-state":o.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:ke(e.onPointerDownCapture,f=>{const m=f.target.getBoundingClientRect(),g=f.clientX-m.left,p=f.clientY-m.top;o.onThumbPointerDown({x:g,y:p})}),onPointerUp:ke(e.onPointerUp,o.onThumbPointerUp)})});wO.displayName=qp;var q_="ScrollAreaCorner",bO=v.forwardRef((e,t)=>{const r=wa(q_,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?i.jsx(zne,{...e,ref:t}):null});bO.displayName=q_;var zne=v.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,s=wa(q_,r),[a,o]=v.useState(0),[l,c]=v.useState(0),u=!!(a&&l);return dd(s.scrollbarX,()=>{var f;const d=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(d),c(d)}),dd(s.scrollbarY,()=>{var f;const d=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(d),o(d)}),u?i.jsx(He.div,{...n,ref:t,style:{width:a,height:l,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Kp(e){return e?parseInt(e,10):0}function _O(e,t){const r=e/t;return isNaN(r)?0:r}function og(e){const t=_O(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Hne(e,t,r,n="ltr"){const s=og(r),a=s/2,o=t||a,l=s-o,c=r.scrollbar.paddingStart+o,u=r.scrollbar.size-r.scrollbar.paddingEnd-l,d=r.content-r.viewport,f=n==="ltr"?[0,d]:[d*-1,0];return NO([c,u],f)(e)}function qj(e,t,r="ltr"){const n=og(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-s,o=t.content-t.viewport,l=a-n,c=r==="ltr"?[0,o]:[o*-1,0],u=tw(e,c);return NO([0,o],[0,l])(u)}function NO(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function SO(e,t){return e>0&&e<t}var Vne=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function s(){const a={left:e.scrollLeft,top:e.scrollTop},o=r.left!==a.left,l=r.top!==a.top;(o||l)&&t(),r=a,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function lg(e,t){const r=Ur(e),n=v.useRef(0);return v.useEffect(()=>()=>window.clearTimeout(n.current),[]),v.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function dd(e,t){const r=Ur(t);un(()=>{let n=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return s.observe(e),()=>{window.cancelAnimationFrame(n),s.unobserve(e)}}},[e,r])}var kO=mO,Gne=xO,qne=bO;const Dc=v.forwardRef(({className:e,children:t,...r},n)=>i.jsxs(kO,{ref:n,className:xe("relative overflow-hidden",e),...r,children:[i.jsx(Gne,{className:"h-full w-full rounded-[inherit]",children:t}),i.jsx(jO,{}),i.jsx(qne,{})]}));Dc.displayName=kO.displayName;const jO=v.forwardRef(({className:e,orientation:t="vertical",...r},n)=>i.jsx(V_,{ref:n,orientation:t,className:xe("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:i.jsx(wO,{className:"relative flex-1 rounded-full bg-border"})}));jO.displayName=V_.displayName;var cg="Switch",[Kne,Y0e]=tn(cg),[Yne,Xne]=Kne(cg),EO=v.forwardRef((e,t)=>
690{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:a,required:o,disabled:l,value:c="on",onCheckedChange:u,form:d,...f}=e,[h,m]=v.useState(null),g=ot(t,y=>m(y)),p=v.useRef(!1),x=h?d||!!h.closest("form"):!0,[b,w]=ps({prop:s,defaultProp:a??!1,onChange:u,caller:cg});return i.jsxs(Yne,{scope:r,checked:b,disabled:l,children:[i.jsx(He.button,{type:"button",role:"switch","aria-checked":b,"aria-required":o,"data-state":PO(b),"data-disabled":l?"":void 0,disabled:l,value:c,...f,ref:g,onClick:ke(e.onClick,y=>{w(_=>!_),x&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})}),x&&i.jsx(AO,{control:h,bubbles:!p.current,name:n,value:c,checked:b,required:o,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});EO.displayName=cg;var CO="SwitchThumb",TO=v.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=Xne(CO,r);return i.jsx(He.span,{"data-state":PO(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});TO.displayName=CO;var Qne="SwitchBubbleInput",AO=v.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...s},a)=>{const o=v.useRef(null),l=ot(o,a),c=Xx(r),u=Rx(t);return v.useEffect(()=>{const d=o.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(c!==r&&m){const g=new Event("click",{bubbles:n});m.call(d,r),d.dispatchEvent(g)}},[c,r,n]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:l,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});AO.displayName=Qne;function PO(e){return e?"checked":"unchecked"}var RO=EO,Jne=TO;const m0=v.forwardRef(({className:e,...t},r)=>i.jsx(RO,{className:xe("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),dir:"ltr",...t,ref:r,children:i.jsx(Jne,{className:xe("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));m0.displayName=RO.displayName;function Zne({student:e,open:t,onOpenChange:r}){const{getTransactionsByStudentId:n,getStudentBalances:s}=m3(),{updateStudentStatus:a,updateStudentCourses:o,updateStudentDetails:l,students:c}=Hx(),{activeCourses:u,courses:d}=xl(),{isAdmin:f}=gl(),[h,m]=v.useState(!1),[g,p]=v.useState(""),[x,b]=v.useState(""),[w,y]=v.useState(""),[_,N]=v.useState(""),[k,S]=v.useState([]),[E,j]=v.useState(!1);if(v.useEffect(()=>{(async()=>{if(!(!t||!e)){j(!0);try{const{data:X,error:se}=await de.from("student_task_progress").select(`
691            task_id,
692            videos_watched,
693            quiz_score,
694            quiz_attempts,
695            quiz_passed,
696            completed_at
697          `).eq("student_id",e.id);if(se){console.error("Error fetching task progress:",se);return}if(!X||X.length===0){S([]);return}const A=X.map(re=>re.task_id),{data:M,error:I}=await de.from("course_tasks").select(`
698            id,
699            name,
700            course_id,
701            courses (name)
702          `).in("id",A);if(I){console.error("Error fetching tasks:",I);return}const{data:z}=await de.from("task_videos").select("task_id").in("task_id",A),J=new Map;z==null||z.forEach(re=>{J.set(re.task_id,(J.get(re.task_id)||0)+1)});const Z=X.map(re=>{var Se;const ae=M==null?void 0:M.find(B=>B.id===re.task_id),ne=Array.isArray(re.videos_watched)?re.videos_watched:[];return{taskId:re.task_id,taskName:(ae==null?void 0:ae.name)||"משימה לא ידועה",courseName:((Se=ae==null?void 0:ae.courses)==null?void 0:Se.name)||"קורס לא ידוע",quizPassed:re.quiz_passed,quizScore:re.quiz_score,quizAttempts:re.quiz_attempts,videosWatched:ne,totalVideos:J.get(re.task_id)||0,completedAt:re.completed_at}});S(Z)}catch(X){console.error("Error loading task progress:",X)}finally{j(!1)}}})()},[t,e==null?void 0:e.id]),!e)return null;const T=c.find(C=>C.id===e.id)||e,R=n(T.id),P=s(T.id),D=C=>{const X=d.find(se=>se.id===C);return X?X.name:C},U=C=>{const X=C?"active":"inactive";a(T.id,X),X==="inactive"?K.info(`התלמיד ${T.name} הפך ללא פעיל ולא יוכל להיכנס לאזור האישי`):K.success(`התלמיד ${T.name} הפך לפעיל`)},Q=C=>{var J;const X=T.courses,se=(J=d.find(Z=>Z.id===C))==null?void 0:J.name,M=X.includes(C)||!!se&&X.includes(se)?X.filter(Z=>Z!==C&&Z!==se):[...X,C];o(T.id,M);const I=d.find(Z=>Z.id===C),z=(I==null?void 0:I.name)||C;M.includes(C)?K.success(`הקורס "${z}" נוסף לתלמיד`):K.info(`הקורס "${z}" הוסר מהתלמיד`)},Y=()=>{p(T.name),b(T.phone),y(T.email||""),N(T.idNumber),m(!0)},V=()=>{m(!1)},F=async()=>
702{if(!g.trim()){K.error("נא להזין שם");return}if(!x.trim()||!/^0\d{8,9}$/.test(x.replace(/-/g,""))){K.error("נא להזין מספר טלפון תקין");return}const C=_.replace(/\D/g,"");if(!C||C.length<5||C.length>9){K.error("נא להזין תעודת זהות תקינה (5-9 ספרות)");return}const X=await l(T.id,{name:g.trim(),phone:x.trim(),email:w.trim(),idNumber:C});if(!X.success){X.error==="duplicate_id"?K.error("תעודת זהות זו כבר קיימת במערכת"):X.error==="duplicate_phone"&&K.error("מספר טלפון זה כבר קיים במערכת");return}m(!1),K.success("פרטי התלמיד עודכנו בהצלחה")};return i.jsx(Ht,{open:t,onOpenChange:r,children:i.jsxs(Ut,{className:"max-w-2xl max-h-[85vh] overflow-y-auto",children:[i.jsx(Wt,{children:i.jsxs(zt,{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl gradient-rose flex items-center justify-center",children:i.jsx("span",{className:"text-lg font-semibold text-foreground",children:T.name.charAt(0)})}),i.jsxs("div",{children:[h?i.jsx(Oe,{value:g,onChange:C=>p(C.target.value),className:"text-xl font-semibold h-8",dir:"rtl"}):i.jsx("span",{className:"text-xl",children:T.name}),i.jsxs("p",{className:"text-sm font-normal text-muted-foreground",children:["ת״ז: ",T.idNumber]}),T.email&&!h&&i.jsxs("p",{className:"text-sm font-normal text-muted-foreground flex items-center gap-1",children:[i.jsx(I4,{className:"h-3 w-3"}),T.email]})]})]}),f&&(h?i.jsxs("div",{className:"flex gap-1",children:[i.jsx(ee,{variant:"ghost",size:"icon",onClick:F,children:i.jsx(SL,{className:"h-4 w-4 text-green-600"})}),i.jsx(ee,{variant:"ghost",size:"icon",onClick:V,children:i.jsx(es,{className:"h-4 w-4 text-red-600"})})]}):i.jsx(ee,{variant:"ghost",size:"icon",onClick:Y,title:"עריכת פרטי תלמיד (אדמין בלבד)",children:i.jsx(wd,{className:"h-4 w-4"})}))]})}),i.jsxs("div",{className:"space-y-6",children:[h&&i.jsxs("div",{className:"p-4 bg-muted/50 rounded-xl border border-border space-y-3",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsx(ve,{htmlFor:"edit-id-number",children:"תעודת זהות"}),i.jsx(Oe,{id:"edit-id-number",value:_,onChange:C=>N(C.target.value),dir:"ltr",className:"text-right",maxLength:9})]}),i.jsxs("div",{className:"space-y-1",children:[i.jsx(ve,{htmlFor:"edit-phone",children:"מספר טלפון"}),i.jsx(Oe,{id:"edit-phone",value:x,onChange:C=>b(C.target.value),dir:"ltr",className:"text-right"})]}),i.jsxs("div",{className:"space-y-1",children:[i.jsx(ve,{htmlFor:"edit-email",children:"אימייל"}),i.jsx(Oe,{id:"edit-email",type:"email",value:w,onChange:C=>y(C.target.value),dir:"ltr",className:"text-right",placeholder:"[email protected]"})]})]}),i.jsxs("div",{className:"flex items-center justify-between p-4 bg-muted/50 rounded-xl border border-border",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[T.status==="active"?i.jsx(EL,{className:"h-5 w-5 text-green-600"}):i.jsx(CL,{className:"h-5 w-5 text-red-600"}),i.jsxs("div",{children:[i.jsx(ve,{htmlFor:"status-toggle",className:"text-sm font-medium",children:"סטטוס תלמיד"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:T.status==="active"?"התלמיד יכול להיכנס לאזור האישי":"התלמיד חסום מכניסה לאזור האישי"})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:xe("text-sm font-medium",T.status==="active"?"text-green-600":"text-red-600"),children:T.status==="active"?"פעיל":"לא פעיל"}),i.jsx(m0,{id:"status-toggle",checked:T.status==="active",onCheckedChange:U})]})]}),i.jsxs("div",{className:"p-4 bg-muted/50 rounded-xl border border-border",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[i.jsx(eh,{className:"h-5 w-5 text-primary"}),i.jsx(ve,{className:"text-sm font-medium",children:"שיוך לקורסים"})]}),i.jsx("div",{className:"grid grid-cols-2 gap-2 max-h-32 overflow-y-auto",children:u.length===0?i.jsx("p",{className:"text-sm text-muted-foreground col-span-2 text-center py-2",children:"אין קורסים זמינים"}):u.map(C=>i.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg hover:bg-background transition-colors",children:[i.jsx(jc,{id:`detail-course-${C.id}`,checked:T.courses.includes(C.id)||T.courses.includes(C.name),onCheckedChange:()=>Q(C.id)}),i.jsx("label",{htmlFor:`detail-course-${C.id}`,className:"text-sm cursor-pointer flex-1",children:C.name})]},C.id))}),T.courses.length>0&&i.jsx("div",{className:"flex flex-wrap gap-1.5 mt-3 pt-3 border-t border-border",children:T.courses.map(C=>i.jsx(We,{variant:"secondary",className:"text-xs",children:D(C)},C))})]}),k.length>0&&i.jsxs("div",{className:"p-4 bg-muted/50 rounded-xl border border-border",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[i.jsx(pa,{className:"h-5 w-5 text-primary"}),i.jsx(ve,{className:"text-sm font-medium",children:"ציוני משימות קורס"}),i.jsxs(We,{variant:"secondary",className:"mr-auto",children:[k.filter(C=>C.quizPassed).length,"/",k.length," הושלמו"]})]}),i.jsx("div",{className:"space-y-3 max-h-48 overflow-y-auto",children:k.map(C=>i.jsxs("div",{className:xe("p-3 rounded-lg border transition-colors",C.quizPassed?"bg-green-50 border-green-200":"bg-background border-border"),children:[i.jsxs("div",{className:"flex items-start justify-between gap-3",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[C.quizPassed?i.jsx(vu,{className:"h-4 w-4 text-green-600 shrink-0"}):C.quizAttempts>0?i.jsx(th,{className:"h-4 w-4 text-amber-500 shrink-0"}):i.jsx(Hs,{className:"h-4 w-4 text-muted-foreground shrink-0"}),i.jsx("span",{className:"font-medium text-sm truncate",children:C.taskName})]}),i.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 mr-6",children:C.courseName})]}),i.jsx("div",{className:"text-left shrink-0",children:C.quizScore!==null?i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx(my,{
702className:xe("h-4 w-4",C.quizPassed?"text-green-600":"text-amber-500")}),i.jsx("span",{className:xe("text-lg font-bold",C.quizPassed?"text-green-600":"text-amber-600"),children:C.quizScore})]}):i.jsx("span",{className:"text-xs text-muted-foreground",children:"לא נבחן"})})]}),i.jsxs("div",{className:"flex items-center gap-4 mt-2 mr-6 text-xs text-muted-foreground",children:[i.jsxs("span",{children:["סרטונים: ",C.videosWatched.length,"/",C.totalVideos]}),C.quizAttempts>0&&i.jsxs("span",{children:["ניסיונות: ",C.quizAttempts]}),C.completedAt&&i.jsxs("span",{children:["הושלם: ",new Date(C.completedAt).toLocaleDateString("he-IL")]})]})]},C.taskId))})]}),E&&i.jsx("div",{className:"p-4 bg-muted/50 rounded-xl border border-border",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(pa,{className:"h-5 w-5 text-muted-foreground animate-pulse"}),i.jsx("span",{className:"text-sm text-muted-foreground",children:"טוען ציוני משימות..."})]})}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"gradient-rose rounded-xl p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx(Zu,{className:"h-4 w-4 text-foreground"}),i.jsx("span",{className:"text-sm text-foreground/80",children:"קרדיט כספי"})]}),i.jsxs("p",{className:"text-2xl font-bold text-foreground",children:["₪",P.moneyCredit.toLocaleString()]})]}),i.jsxs("div",{className:"bg-blue-50 rounded-xl p-4 border border-blue-200",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx(wb,{className:"h-4 w-4 text-blue-600"}),i.jsx("span",{className:"text-sm text-blue-700",children:"צפייה אונליין"})]}),i.jsxs("p",{className:"text-2xl font-bold text-blue-700",children:[P.onlineViewLessons," שיעורים"]})]})]}),i.jsxs("div",{children:[i.jsxs("h4",{className:"font-semibold text-foreground mb-3 flex items-center gap-2",children:[i.jsx(rr,{className:"h-4 w-4"}),"היסטוריית קרדיטים"]}),R.length>0?i.jsx(Dc,{className:"h-[150px] rounded-xl border border-border",children:i.jsx("div",{className:"divide-y divide-border",children:R.map(C=>i.jsx(ese,{transaction:C},C.id))})}):i.jsxs("div",{className:"text-center py-6 text-muted-foreground bg-muted/30 rounded-xl",children:[i.jsx(Zu,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),i.jsx("p",{children:"אין תנועות קרדיט לתלמיד זה"})]})]})]})]})})}function ese({transaction:e}){const t=e.category==="online_view";return i.jsxs("div",{className:"flex items-center justify-between px-4 py-3 hover:bg-muted/30 transition-colors",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:xe("w-8 h-8 rounded-full flex items-center justify-center",e.type==="credit"?"bg-green-100":"bg-red-100"),children:e.type==="credit"?i.jsx(hs,{className:"h-4 w-4 text-green-600"}):i.jsx(M4,{className:"h-4 w-4 text-red-600"})}),i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("p",{className:"text-sm font-medium text-foreground",children:e.entitlementTypeName||e.courseName||"קרדיט"}),i.jsx(We,{className:xe("text-[10px] px-1.5 py-0",t?"bg-blue-100 text-blue-700":"bg-emerald-100 text-emerald-700"),children:t?"צפייה":"כספי"})]}),i.jsx("p",{className:"text-xs text-muted-foreground",children:e.date})]})]}),i.jsxs("div",{className:"text-left",children:[i.jsx("p",{className:xe("font-semibold",e.type==="credit"?"text-green-600":"text-red-600"),children:t?i.jsxs(i.Fragment,{children:[e.type==="credit"?"+":"-",e.lessonCount," שיעורים"]}):i.jsxs(i.Fragment,{children:[e.type==="credit"?"+":"-","₪",e.amount]})}),e.expirationDate&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:["תוקף: ",e.expirationDate]})]})]})}var Kv="rovingFocusGroup.onEntryFocus",tse={bubbles:!1,cancelable:!0},p0="RovingFocusGroup",[rw,OO,rse]=Yh(p0),[nse,Pd]=tn(p0,[rse]),[sse,ase]=nse(p0),DO=v.forwardRef((e,t)=>i.jsx(rw.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(rw.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(ise,{...e,ref:t})})}));DO.displayName=p0;var ise=v.forwardRef((e,t)=>
vendor: 17,147 bytes, line 702
702{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=v.useRef(null),m=ot(t,h),g=Oc(a),[p,x]=ps({prop:o,defaultProp:l??null,onChange:c,caller:p0}),[b,w]=v.useState(!1),y=Ur(u),_=OO(r),N=v.useRef(!1),[k,S]=v.useState(0);return v.useEffect(()=>{const E=h.current;if(E)return E.addEventListener(Kv,y),()=>E.removeEventListener(Kv,y)},[y]),i.jsx(sse,{scope:r,orientation:n,dir:g,loop:s,currentTabStopId:p,onItemFocus:v.useCallback(E=>x(E),[x]),onItemShiftTab:v.useCallback(()=>w(!0),[]),onFocusableItemAdd:v.useCallback(()=>S(E=>E+1),[]),onFocusableItemRemove:v.useCallback(()=>S(E=>E-1),[]),children:i.jsx(He.div,{tabIndex:b||k===0?-1:0,"data-orientation":n,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:ke(e.onMouseDown,()=>{N.current=!0}),onFocus:ke(e.onFocus,E=>{const j=!N.current;if(E.target===E.currentTarget&&j&&!b){const T=new CustomEvent(Kv,tse);if(E.currentTarget.dispatchEvent(T),!T.defaultPrevented){const R=_().filter(Y=>Y.focusable),P=R.find(Y=>Y.active),D=R.find(Y=>Y.id===p),Q=[P,D,...R].filter(Boolean).map(Y=>Y.ref.current);MO(Q,d)}}N.current=!1}),onBlur:ke(e.onBlur,()=>w(!1))})})}),IO="RovingFocusGroupItem",FO=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:a,children:o,...l}=e,c=Us(),u=a||c,d=ase(IO,r),f=d.currentTabStopId===u,h=OO(r),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:p}=d;return v.useEffect(()=>{if(n)return m(),()=>g()},[n,m,g]),i.jsx(rw.ItemSlot,{scope:r,id:u,focusable:n,active:s,children:i.jsx(He.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:ke(e.onMouseDown,x=>{n?d.onItemFocus(u):x.preventDefault()}),onFocus:ke(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:ke(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const b=cse(x,d.orientation,d.dir);if(b!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let y=h().filter(_=>_.focusable).map(_=>_.ref.current);if(b==="last")y.reverse();else if(b==="prev"||b==="next"){b==="prev"&&y.reverse();const _=y.indexOf(x.currentTarget);y=d.loop?use(y,_+1):y.slice(_+1)}setTimeout(()=>MO(y))}}),children:typeof o=="function"?o({isCurrentTabStop:f,hasTabStop:p!=null}):o})})});FO.displayName=IO;var ose={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function lse(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function cse(e,t,r){const n=lse(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return ose[n]}function MO(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function use(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var K_=DO,Y_=FO,nw=["Enter"," "],dse=["ArrowDown","PageUp","Home"],LO=["ArrowUp","PageDown","End"],fse=[...dse,...LO],hse={ltr:[...nw,"ArrowRight"],rtl:[...nw,"ArrowLeft"]},mse={ltr:["ArrowLeft"],rtl:["ArrowRight"]},x0="Menu",[Ph,pse,xse]=Yh(x0),[Ic,BO]=tn(x0,[xse,ml,Pd]),ug=ml(),$O=Pd(),[gse,Fc]=Ic(x0),[vse,g0]=Ic(x0),UO=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:s,onOpenChange:a,modal:o=!0}=e,l=ug(t),[c,u]=v.useState(null),d=v.useRef(!1),f=Ur(a),h=Oc(s);return v.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),i.jsx(Db,{...l,children:i.jsx(gse,{scope:t,open:r,onOpenChange:f,content:c,onContentChange:u,children:i.jsx(vse,{scope:t,onClose:v.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:o,children:n})})})};UO.displayName=x0;var yse="MenuAnchor",X_=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=ug(r);return i.jsx(e0,{...s,...n,ref:t})});X_.displayName=yse;var Q_="MenuPortal",[wse,WO]=Ic(Q_,{forceMount:void 0}),zO=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:s}=e,a=Fc(Q_,t);return i.jsx(wse,{scope:t,forceMount:r,children:i.jsx(rn,{present:r||a.open,children:i.jsx(yd,{asChild:!0,container:s,children:n})})})};zO.displayName=Q_;var fa="MenuContent",[bse,J_]=Ic(fa),HO=v.forwardRef((e,t)=>{const r=WO(fa,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,a=Fc(fa,e.__scopeMenu),o=g0(fa,e.__scopeMenu);return i.jsx(Ph.Provider,{scope:e.__scopeMenu,children:i.jsx(rn,{present:n||a.open,children:i.jsx(Ph.Slot,{scope:e.__scopeMenu,children:o.modal?i.jsx(_se,{...s,ref:t}):i.jsx(Nse,{...s,ref:t})})})})}),_se=v.forwardRef((e,t)=>{const r=Fc(fa,e.__scopeMenu),n=v.useRef(null),s=ot(t,n);return v.useEffect(()=>{const a=n.current;if(a)return qx(a)},[]),i.jsx(Z_,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ke(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Nse=v.forwardRef((e,t)=>{const r=Fc(fa,e.__scopeMenu);return i.jsx(Z_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Sse=tl("MenuContent.ScrollLock"),Z_=v.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:g,...p}=e,x=Fc(fa,r),b=g0(fa,r),w=ug(r),y=$O(r),_=pse(r),[N,k]=v.useState(null),S=v.useRef(null),E=ot(t,S,x.onContentChange),j=v.useRef(0),T=v.useRef(""),R=v.useRef(0),P=v.useRef(null),D=v.useRef("right"),U=v.useRef(0),Q=g?s0:v.Fragment,Y=g?{as:Sse,allowPinchZoom:!0}:void 0,V=C=>{var Z,re;const X=T.current+C,se=_().filter(ae=>!ae.disabled),A=document.activeElement,M=(Z=se.find(ae=>ae.ref.current===A))==null?void 0:Z.textValue,I=se.map(ae=>ae.textValue),z=Fse(I,X,M),J=(re=se.find(ae=>ae.textValue===z))==null?void 0:re.ref.current;(function ae(ne){T.current=ne,window.clearTimeout(j.current),ne!==""&&(j.current=window.setTimeout(()=>ae(""),1e3))})(X),J&&setTimeout(()=>J.focus())};v.useEffect(()=>()=>window.clearTimeout(j.current),[]),Vx();const F=v.useCallback(C=>{var se,A;return D.current===((se=P.current)==null?void 0:se.side)&&Lse(C,(A=P.current)==null?void 0:A.area)},[]);return i.jsx(bse,{scope:r,searchRef:T,onItemEnter:v.useCallback(C=>{F(C)&&C.preventDefault()},[F]),onItemLeave:v.useCallback(C=>{var X;F(C)||((X=S.current)==null||X.focus(),k(null))},[F]),onTriggerLeave:v.useCallback(C=>{F(C)&&C.preventDefault()},[F]),pointerGraceTimerRef:R,onPointerGraceIntentChange:v.useCallback(C=>{P.current=C},[]),children:i.jsx(Q,{...Y,children:i.jsx(n0,{asChild:!0,trapped:s,onMountAutoFocus:ke(a,C=>{var X;C.preventDefault(),(X=S.current)==null||X.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:i.jsx(Sc,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:i.jsx(K_,{asChild:!0,...y,dir:b.dir,orientation:"vertical",loop:n,currentTabStopId:N,onCurrentTabStopIdChange:k,onEntryFocus:ke(c,C=>{b.isUsingKeyboardRef.current||C.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(Ox,{role:"menu","aria-orientation":"vertical","data-state":iD(x.open),"data-radix-menu-content":"",dir:b.dir,...w,...p,ref:E,style:{outline:"none",...p.style},onKeyDown:ke(p.onKeyDown,C=>{const se=C.target.closest("[data-radix-menu-content]")===C.currentTarget,A=C.ctrlKey||C.altKey||C.metaKey,M=C.key.length===1;se&&(C.key==="Tab"&&C.preventDefault(),!A&&M&&V(C.key));const I=S.current;if(C.target!==I||!fse.includes(C.key))return;C.preventDefault();const J=_().filter(Z=>!Z.disabled).map(Z=>Z.ref.current);LO.includes(C.key)&&J.reverse(),Dse(J)}),onBlur:ke(e.onBlur,C=>{C.currentTarget.contains(C.target)||(window.clearTimeout(j.current),T.current="")}),onPointerMove:ke(e.onPointerMove,Rh(C=>{const X=C.target,se=U.current!==C.clientX;if(C.currentTarget.contains(X)&&se){const A=C.clientX>U.current?"right":"left";D.current=A,U.current=C.clientX}}))})})})})})})});HO.displayName=fa;var kse="MenuGroup",e2=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return i.jsx(He.div,{role:"group",...n,ref:t})});e2.displayName=kse;var jse="MenuLabel",VO=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return i.jsx(He.div,{...n,ref:t})});VO.displayName=jse;var Yp="MenuItem",Kj="menu.itemSelect",dg=v.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...s}=e,a=v.useRef(null),o=g0(Yp,e.__scopeMenu),l=J_(Yp,e.__scopeMenu),c=ot(t,a),u=v.useRef(!1),d=()=>{const f=a.current;if(!r&&f){const h=new CustomEvent(Kj,{bubbles:!0,cancelable:!0});f.addEventListener(Kj,m=>n==null?void 0:n(m),{once:!0}),pb(f,h),h.defaultPrevented?u.current=!1:o.onClose()}};return i.jsx(GO,{...s,ref:c,disabled:r,onClick:ke(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),u.current=!0},onPointerUp:ke(e.onPointerUp,f=>{var h;u.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:ke(e.onKeyDown,f=>{const h=l.searchRef.current!=="";r||h&&f.key===" "||nw.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});dg.displayName=Yp;var GO=v.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...a}=e,o=J_(Yp,r),l=$O(r),c=v.useRef(null),u=ot(t,c),[d,f]=v.useState(!1),[h,m]=v.useState("");return v.useEffect(()=>{const g=c.current;g&&m((g.textContent??"").trim())},[a.children]),i.jsx(Ph.ItemSlot,{scope:r,disabled:n,textValue:s??h,children:i.jsx(Y_,{asChild:!0,...l,focusable:!n,children:i.jsx(He.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:u,onPointerMove:ke(e.onPointerMove,Rh(g=>{n?o.onItemLeave(g):(o.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ke(e.onPointerLeave,Rh(g=>o.onItemLeave(g))),onFocus:ke(e.onFocus,()=>f(!0)),onBlur:ke(e.onBlur,()=>f(!1))})})})}),Ese="MenuCheckboxItem",qO=v.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...s}=e;return i.jsx(JO,{scope:e.__scopeMenu,checked:r,children:i.jsx(dg,{role:"menuitemcheckbox","aria-checked":Xp(r)?"mixed":r,...s,ref:t,"data-state":r2(r),onSelect:ke(s.onSelect,()=>n==null?void 0:n(Xp(r)?!0:!r),{checkForDefaultPrevented:!1})})})});qO.displayName=Ese;var KO="MenuRadioGroup",[Cse,Tse]=Ic(KO,{value:void 0,onValueChange:()=>{}}),YO=v.forwardRef((e,t)=>{const{value:r,onValueChange:n,...s}=e,a=Ur(n);return i.jsx(Cse,{scope:e.__scopeMenu,value:r,onValueChange:a,children:i.jsx(e2,{...s,ref:t})})});YO.displayName=KO;var XO="MenuRadioItem",QO=v.forwardRef((e,t)=>{const{value:r,...n}=e,s=Tse(XO,e.__scopeMenu),a=r===s.value;return i.jsx(JO,{scope:e.__scopeMenu,checked:a,children:i.jsx(dg,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":r2(a),onSelect:ke(n.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})})});QO.displayName=XO;var t2="MenuItemIndicator",[JO,Ase]=Ic(t2,{checked:!1}),ZO=v.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...s}=e,a=Ase(t2,r);return i.jsx(rn,{present:n||Xp(a.checked)||a.checked===!0,children:i.jsx(He.span,{...s,ref:t,"data-state":r2(a.checked)})})});ZO.displayName=t2;var Pse="MenuSeparator",eD=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return i.jsx(He.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});eD.displayName=Pse;var Rse="MenuArrow",tD=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=ug(r);return i.jsx(Dx,{...s,...n,ref:t})});tD.displayName=Rse;var Ose="MenuSub",[X0e,rD]=Ic(Ose),uf="MenuSubTrigger",nD=v.forwardRef((e,t)=>{const r=Fc(uf,e.__scopeMenu),n=g0(uf,e.__scopeMenu),s=rD(uf,e.__scopeMenu),a=J_(uf,e.__scopeMenu),o=v.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},d=v.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return v.useEffect(()=>d,[d]),v.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),c(null)}},[l,c]),i.jsx(X_,{asChild:!0,...u,children:i.jsx(GO,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":iD(r.open),...e,ref:Nx(t,s.onTriggerChange),onClick:f=>{var h;(h=e.onClick)==null||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:ke(e.onPointerMove,Rh(f=>{a.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:ke(e.onPointerLeave,Rh(f=>{var m,g;d();const h=(m=r.content)==null?void 0:m.getBoundingClientRect();if(h){const p=(g=r.content)==null?void 0:g.dataset.side,x=p==="right",b=x?-5:5,w=h[x?"left":"right"],y=h[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:f.clientX+b,y:f.clientY},{x:w,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x:w,y:h.bottom}],side:p}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(f),f.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:ke(e.onKeyDown,f=>{var m;const h=a.searchRef.current!=="";e.disabled||h&&f.key===" "||hse[n.dir].includes(f.key)&&(r.onOpenChange(!0),(m=r.content)==null||m.focus(),f.preventDefault())})})})});nD.displayName=uf;var sD="MenuSubContent",aD=v.forwardRef((e,t)=>{const r=WO(fa,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,a=Fc(fa,e.__scopeMenu),o=g0(fa,e.__scopeMenu),l=rD(sD,e.__scopeMenu),c=v.useRef(null),u=ot(t,c);return i.jsx(Ph.Provider,{scope:e.__scopeMenu,children:i.jsx(rn,{present:n||a.open,children:i.jsx(Ph.Slot,{scope:e.__scopeMenu,children:i.jsx(Z_,{id:l.contentId,"aria-labelledby":l.triggerId,...s,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;o.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ke(e.onFocusOutside,d=>{d.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:ke(e.onEscapeKeyDown,d=>{o.onClose(),d.preventDefault()}),onKeyDown:ke(e.onKeyDown,d=>{var m;const f=d.currentTarget.contains(d.target),h=mse[o.dir].includes(d.key);f&&h&&(a.onOpenChange(!1),(m=l.trigger)==null||m.focus(),d.preventDefault())})})})})})});aD.displayName=sD;function iD(e){return e?"open":"closed"}function Xp(e){return e==="indeterminate"}function r2(e){return Xp(e)?"indeterminate":e?"checked":"unchecked"}function Dse(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function Ise(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function Fse(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let o=Ise(e,Math.max(a,0));s.length===1&&(o=o.filter(u=>u!==r));const c=o.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function Mse(e,t){const{x:r,y:n}=e;let s=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const l=t[a],c=t[o],u=l.x,d=l.y,f=c.x,h=c.y;d>n!=h>n&&r<(f-u)*(n-d)/(h-d)+u&&(s=!s)}return s}function Lse(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return Mse(r,t)}function Rh(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Bse=UO,$se=X_,Use=zO,Wse=HO,zse=e2,Hse=VO,Vse=dg,Gse=qO,qse=YO,Kse=QO,Yse=ZO,Xse=eD,Qse=tD,Jse=nD,Zse=aD,fg="DropdownMenu",[eae,Q0e]=tn(fg,[BO]),ss=BO(),[tae,oD]=eae(fg),lD=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:s,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,c=ss(t),u=v.useRef(null),[d,f]=ps({prop:s,defaultProp:a??!1,onChange:o,caller:fg});return i.jsx(tae,{scope:t,triggerId:Us(),triggerRef:u,contentId:Us(),open:d,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(h=>!h),[f]),modal:l,children:i.jsx(Bse,{...c,open:d,onOpenChange:f,dir:n,modal:l,children:r})})};lD.displayName=fg;var cD="DropdownMenuTrigger",uD=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=e,a=oD(cD,r),o=ss(r);return i.jsx($se,{asChild:!0,...o,children:i.jsx(He.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,...s,ref:Nx(t,a.triggerRef),onPointerDown:ke(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:ke(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});uD.displayName=cD;var rae="DropdownMenuPortal",dD=e=>{const{__scopeDropdownMenu:t,...r}=e,n=ss(t);return i.jsx(Use,{...n,...r})};dD.displayName=rae;var fD="DropdownMenuContent",hD=v.forwardRef((e,t)=>
702{const{__scopeDropdownMenu:r,...n}=e,s=oD(fD,r),a=ss(r),o=v.useRef(!1);return i.jsx(Wse,{id:s.contentId,"aria-labelledby":s.triggerId,...a,...n,ref:t,onCloseAutoFocus:ke(e.onCloseAutoFocus,l=>{var c;o.current||(c=s.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:ke(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!s.modal||d)&&(o.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)"}})});hD.displayName=fD;var nae="DropdownMenuGroup",sae=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=ss(r);return i.jsx(zse,{...s,...n,ref:t})});sae.displayName=nae;var aae="DropdownMenuLabel",mD=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=ss(r);return i.jsx(Hse,{...s,...n,ref:t})});mD.displayName=aae;var iae="DropdownMenuItem",pD=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=ss(r);return i.jsx(Vse,{...s,...n,ref:t})});pD.displayName=iae;var oae="DropdownMenuCheckboxItem",xD=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=ss(r);return i.jsx(Gse,{...s,...n,ref:t})});xD.displayName=oae;var lae="DropdownMenuRadioGroup",cae=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=ss(r);return i.jsx(qse,{...s,...n,ref:t})});cae.displayName=lae;var uae="DropdownMenuRadioItem",gD=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=ss(r);return i.jsx(Kse,{...s,...n,ref:t})});gD.displayName=uae;var dae="DropdownMenuItemIndicator",vD=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=ss(r);return i.jsx(Yse,{...s,...n,ref:t})});vD.displayName=dae;var fae="DropdownMenuSeparator",yD=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=ss(r);return i.jsx(Xse,{...s,...n,ref:t})});yD.displayName=fae;var hae="DropdownMenuArrow",mae=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=ss(r);return i.jsx(Qse,{...s,...n,ref:t})});mae.displayName=hae;var pae="DropdownMenuSubTrigger",wD=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=ss(r);return i.jsx(Jse,{...s,...n,ref:t})});wD.displayName=pae;var xae="DropdownMenuSubContent",bD=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=ss(r);return i.jsx(Zse,{...s,...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)"}})});bD.displayName=xae;var gae=lD,vae=uD,yae=dD,_D=hD,ND=mD,SD=pD,kD=xD,jD=gD,ED=vD,CD=yD,TD=wD,AD=bD;const wae=gae,bae=vae,_ae=v.forwardRef(({className:e,inset:t,children:r,...n},s)=>i.jsxs(TD,{ref:s,className:xe("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...n,children:[r,i.jsx(yi,{className:"ml-auto h-4 w-4"})]}));_ae.displayName=TD.displayName;const Nae=v.forwardRef(({className:e,...t},r)=>i.jsx(AD,{ref:r,className:xe("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",e),...t}));Nae.displayName=AD.displayName;const PD=v.forwardRef(({className:e,sideOffset:t=4,...r},n)=>i.jsx(yae,{children:i.jsx(_D,{ref:n,sideOffset:t,className:xe("z-50 min-w-[8rem] overflow-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]:sli
702de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));PD.displayName=_D.displayName;const Bm=v.forwardRef(({className:e,inset:t,...r},n)=>i.jsx(SD,{ref:n,className:xe("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...r}));Bm.displayName=SD.displayName;const Sae=v.forwardRef(({className:e,children:t,checked:r,...n},s)=>i.jsxs(kD,{ref:s,className:xe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:r,...n,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(ED,{children:i.jsx(hn,{className:"h-4 w-4"})})}),t]}));Sae.displayName=kD.displayName;const kae=v.forwardRef(({className:e,children:t,...r},n)=>i.jsxs(jD,{ref:n,className:xe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(ED,{children:i.jsx(T4,{className:"h-2 w-2 fill-current"})})}),t]}));kae.displayName=jD.displayName;const jae=v.forwardRef(({className:e,inset:t,...r},n)=>i.jsx(ND,{ref:n,className:xe("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));jae.displayName=ND.displayName;const RD=v.forwardRef(({className:e,...t},r)=>i.jsx(CD,{ref:r,className:xe("-mx-1 my-1 h-px bg-muted",e),...t}));RD.displayName=CD.displayName;const Yv=30;function Eae(){xl();const{students:e,addStudent:t,isLoading:r,refreshStudents:n,updateStudentStatus:s}=Hx(),[a,o]=v.useState(""),[l,c]=v.useState(null),[u,d]=v.useState(!1),[f,h]=v.useState(1),m=y=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(y),g=v.useMemo(()=>e.filter(y=>y.name.includes(a)||y.phone.includes(a)||y.idNumber.includes(a)),[e,a]),p=y=>{o(y),h(1)},x=Math.ceil(g.length/Yv),b=v.useMemo(()=>{const y=(f-1)*Yv;return g.slice(y,y+Yv)},[g,f]),w=y=>{c(y),d(!0)};return i.jsxs(Hn,{children:[i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-foreground",children:"ניהול תלמידים"}),i.jsxs("p",{className:"text-muted-foreground mt-1",children:["ניהול כל התלמידים במערכת (",e.length," תלמידים)"]})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(One,{onImportComplete:n}),i.jsx(RV,{onAddStudent:t})]})]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx(no,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(Oe,{placeholder:"חיפוש לפי שם, טלפון או ת״ז...",className:"pr-10",value:a,onChange:y=>p(y.target.value)})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs(We,{variant:"secondary",className:"text-sm whitespace-nowrap",children:[g.length," תוצאות"]}),i.jsxs(ee,{variant:"outline",className:"gap-2",children:[i.jsx(vL,{className:"h-4 w-4"}),"סינון"]})]})]}),x>1&&i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("span",{className:"text-sm text-muted-foreground",children:["עמוד ",f," מתוך ",x]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs(ee,{variant:"outline",size:"sm",onClick:()=>h(y=>Math.max(1,y-1)),disabled:f===1,children:[i.jsx(yi,{className:"h-4 w-4"}),"הקודם"]}),i.jsxs(ee,{variant:"outline",size:"sm",onClick:()=>h(y=>Math.min(x,y+1)),disabled:f===x,children:["הבא",i.jsx(Xi,{className:"h-4 w-4"})]})]})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:b.map(y=>
702i.jsx(Cae,{student:y,isUUID:m,onClick:()=>w(y),onViewDetails:()=>w(y),onStatusChange:async _=>{await s(y.id,_),K.success(_==="active"?"סומן כפעילה":"סומן כלא פעילה")}},y.id))}),g.length===0&&i.jsx("div",{className:"text-center py-12",children:i.jsx("p",{className:"text-muted-foreground",children:"לא נמצאו תלמידים"})}),x>1&&i.jsxs("div",{className:"flex items-center justify-center gap-2",children:[i.jsx(ee,{variant:"outline",size:"sm",onClick:()=>h(y=>Math.max(1,y-1)),disabled:f===1,children:i.jsx(yi,{className:"h-4 w-4"})}),i.jsx("div",{className:"flex gap-1",children:Array.from({length:Math.min(5,x)},(y,_)=>{let N;return x<=5||f<=3?N=_+1:f>=x-2?N=x-4+_:N=f-2+_,i.jsx(ee,{variant:f===N?"default":"outline",size:"sm",className:"w-8 h-8 p-0",onClick:()=>h(N),children:N},N)})}),i.jsx(ee,{variant:"outline",size:"sm",onClick:()=>h(y=>Math.min(x,y+1)),disabled:f===x,children:i.jsx(Xi,{className:"h-4 w-4"})})]})]}),i.jsx(Zne,{student:l,open:u,onOpenChange:d})]})}function Cae({student:e,isUUID:t,onClick:r,onViewDetails:n,onStatusChange:s}){const{courses:a}=xl(),o=e.courses.map(l=>{if(t(l)){const c=a.find(u=>u.id===l);return(c==null?void 0:c.name)||null}return l}).filter(Boolean);return i.jsxs("div",{onClick:r,className:"bg-card rounded-2xl shadow-card border border-border p-5 hover:shadow-elevated hover:-translate-y-1 transition-all duration-300 cursor-pointer",children:[i.jsxs("div",{className:"flex items-start justify-between mb-4",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl gradient-rose flex items-center justify-center",children:i.jsx("span",{className:"text-lg font-semibold text-foreground",children:e.name.charAt(0)})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-semibold text-foreground",children:e.name}),i.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[i.jsx(Jh,{className:"h-3 w-3"}),e.phone]})]})]}),i.jsxs(wae,{children:[i.jsx(bae,{asChild:!0,children:i.jsx(ee,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:l=>l.stopPropagation(),"aria-label":"פעולות",children:i.jsx(gL,{className:"h-4 w-4"})})}),i.jsxs(PD,{align:"end",sideOffset:8,className:"w-44",onClick:l=>l.stopPropagation(),children:[i.jsx(Bm,{onSelect:l=>{l.stopPropagation(),n()},children:"צפייה בפרטים"}),i.jsx(RD,{}),e.status==="active"?i.jsx(Bm,{onSelect:l=>{l.stopPropagation(),s("inactive")},children:"סמן כלא פעילה"}):i.jsx(Bm,{onSelect:l=>{l.stopPropagation(),s("active")},children:"סמן כפעילה"})]})]})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsxs("p",{className:"text-xs text-muted-foreground",children:["ת״ז: ",e.idNumber]}),i.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.length>0?o.map((l,c)=>i.jsx("span",{className:"inline-flex items-center rounded-md bg-secondary px-2 py-1 text-xs font-medium text-secondary-foreground",children:l},c)):i.jsx("span",{className:"text-xs text-muted-foreground",children:"לא רשומה לקורסים"})}),i.jsx("div",{className:"flex items-center justify-end pt-3 border-t border-border",children:i.jsx("span",{className:xe("inline-flex items-center rounded-md px-2 py-1 text-xs font-medium",e.status==="active"?"bg-green-100 text-green-700":"bg-gray-100 text-gray-600"),children:e.status==="active"?"פעילה":"לא פעילה"})})]})]})}var Tae=[" ","Enter","ArrowUp","ArrowDown"],Aae=[" ","Enter"],wc="Select",[hg,mg,Pae]=Yh(wc),[Rd,J0e]=tn(wc,[Pae,ml]),pg=ml(),[Rae,bl]=Rd(wc),[Oae,Dae]=Rd(wc),OD=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:a,value:o,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:m,form:g}=e,p=pg(t),[x,b]=v.useState(null),[w,y]=v.useState(null),[_,N]=v.useState(!1),k=Oc(u),[S,E]=ps({prop:n,defaultProp:s??!1,onChange:a,caller:wc}),[j,T]=ps({prop:o,defaultProp:l,onChange:c,caller:wc}),R=v.useRef(null),P=x?g||!!x.closest("form"):!0,[D,U]=v.useState(new Set),Q=Array.from(D).map(Y=>Y.props.value).join(";");return i.jsx(Db,{...p,children:i.jsxs(Rae,{required:m,scope:t,trigger:x,onTriggerChange:b,valueNode:w,onValueNodeChange:y,valueNodeHasChildren:_,onValueNodeHasChildrenChange:N,contentId:Us(),value:j,onValueChange:T,open:S,onOpenChange:E,dir:k,triggerPointerDownPosRef:R,disabled:h,children:[i.jsx(hg.Provider,{scope:t,children:i.jsx(Oae,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(Y=>{U(V=>new Set(V).add(Y))},[]),onNativeOptionRemove:v.useCallback(Y=>{U(V=>{const F=new Set(V);return F.delete(Y),F})},[]),children:r})}),P?i.jsxs(nI,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:j,onChange:Y=>T(Y.target.value),disabled:h,form:g,children:[j===void 0?i.jsx("option",{value:""}):null,Array.from(D)]},Q):null]})})};OD.displayName=wc;var DD="SelectTrigger",ID=v.forwardRef((e,t)=>
vendor: 16,825 bytes, line 702
702{const{__scopeSelect:r,disabled:n=!1,...s}=e,a=pg(r),o=bl(DD,r),l=o.disabled||n,c=ot(t,o.onTriggerChange),u=mg(r),d=v.useRef("touch"),[f,h,m]=aI(p=>{const x=u().filter(y=>!y.disabled),b=x.find(y=>y.value===o.value),w=iI(x,p,b);w!==void 0&&o.onValueChange(w.value)}),g=p=>{l||(o.onOpenChange(!0),m()),p&&(o.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return i.jsx(e0,{asChild:!0,...a,children:i.jsx(He.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":sI(o.value)?"":void 0,...s,ref:c,onClick:ke(s.onClick,p=>{p.currentTarget.focus(),d.current!=="mouse"&&g(p)}),onPointerDown:ke(s.onPointerDown,p=>{d.current=p.pointerType;const x=p.target;x.hasPointerCapture(p.pointerId)&&x.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(g(p),p.preventDefault())}),onKeyDown:ke(s.onKeyDown,p=>{const x=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&h(p.key),!(x&&p.key===" ")&&Tae.includes(p.key)&&(g(),p.preventDefault())})})})});ID.displayName=DD;var FD="SelectValue",MD=v.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:a,placeholder:o="",...l}=e,c=bl(FD,r),{onValueNodeHasChildrenChange:u}=c,d=a!==void 0,f=ot(t,c.onValueNodeChange);return un(()=>{u(d)},[u,d]),i.jsx(He.span,{...l,ref:f,style:{pointerEvents:"none"},children:sI(c.value)?i.jsx(i.Fragment,{children:o}):a})});MD.displayName=FD;var Iae="SelectIcon",LD=v.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return i.jsx(He.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});LD.displayName=Iae;var Fae="SelectPortal",BD=e=>i.jsx(yd,{asChild:!0,...e});BD.displayName=Fae;var bc="SelectContent",$D=v.forwardRef((e,t)=>{const r=bl(bc,e.__scopeSelect),[n,s]=v.useState();if(un(()=>{s(new DocumentFragment)},[]),!r.open){const a=n;return a?ca.createPortal(i.jsx(UD,{scope:e.__scopeSelect,children:i.jsx(hg.Slot,{scope:e.__scopeSelect,children:i.jsx("div",{children:e.children})})}),a):null}return i.jsx(WD,{...e,ref:t})});$D.displayName=bc;var ja=10,[UD,_l]=Rd(bc),Mae="SelectContentImpl",Lae=tl("SelectContent.RemoveScroll"),WD=v.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:a,onPointerDownOutside:o,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:g,hideWhenDetached:p,avoidCollisions:x,...b}=e,w=bl(bc,r),[y,_]=v.useState(null),[N,k]=v.useState(null),S=ot(t,Z=>_(Z)),[E,j]=v.useState(null),[T,R]=v.useState(null),P=mg(r),[D,U]=v.useState(!1),Q=v.useRef(!1);v.useEffect(()=>{if(y)return qx(y)},[y]),Vx();const Y=v.useCallback(Z=>{const[re,...ae]=P().map(B=>B.ref.current),[ne]=ae.slice(-1),Se=document.activeElement;for(const B of Z)if(B===Se||(B==null||B.scrollIntoView({block:"nearest"}),B===re&&N&&(N.scrollTop=0),B===ne&&N&&(N.scrollTop=N.scrollHeight),B==null||B.focus(),document.activeElement!==Se))return},[P,N]),V=v.useCallback(()=>Y([E,y]),[Y,E,y]);v.useEffect(()=>{D&&V()},[D,V]);const{onOpenChange:F,triggerPointerDownPosRef:C}=w;v.useEffect(()=>{if(y){let Z={x:0,y:0};const re=ne=>{var Se,B;Z={x:Math.abs(Math.round(ne.pageX)-(((Se=C.current)==null?void 0:Se.x)??0)),y:Math.abs(Math.round(ne.pageY)-(((B=C.current)==null?void 0:B.y)??0))}},ae=ne=>{Z.x<=10&&Z.y<=10?ne.preventDefault():y.contains(ne.target)||F(!1),document.removeEventListener("pointermove",re),C.current=null};return C.current!==null&&(document.addEventListener("pointermove",re),document.addEventListener("pointerup",ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",re),document.removeEventListener("pointerup",ae,{capture:!0})}}},[y,F,C]),v.useEffect(()=>{const Z=()=>F(!1);return window.addEventListener("blur",Z),window.addEventListener("resize",Z),()=>{window.removeEventListener("blur",Z),window.removeEventListener("resize",Z)}},[F]);const[X,se]=aI(Z=>{const re=P().filter(Se=>!Se.disabled),ae=re.find(Se=>Se.ref.current===document.activeElement),ne=iI(re,Z,ae);ne&&setTimeout(()=>ne.ref.current.focus())}),A=v.useCallback((Z,re,ae)=>{const ne=!Q.current&&!ae;(w.value!==void 0&&w.value===re||ne)&&(j(Z),ne&&(Q.current=!0))},[w.value]),M=v.useCallback(()=>y==null?void 0:y.focus(),[y]),I=v.useCallback((Z,re,ae)=>{const ne=!Q.current&&!ae;(w.value!==void 0&&w.value===re||ne)&&R(Z)},[w.value]),z=n==="popper"?sw:zD,J=z===sw?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:g,hideWhenDetached:p,avoidCollisions:x}:{};return i.jsx(UD,{scope:r,content:y,viewport:N,onViewportChange:k,itemRefCallback:A,selectedItem:E,onItemLeave:M,itemTextRefCallback:I,focusSelectedItem:V,selectedItemText:T,position:n,isPositioned:D,searchRef:X,children:i.jsx(s0,{as:Lae,allowPinchZoom:!0,children:i.jsx(n0,{asChild:!0,trapped:w.open,onMountAutoFocus:Z=>{Z.preventDefault()},onUnmountAutoFocus:ke(s,Z=>{var re;(re=w.trigger)==null||re.focus({preventScroll:!0}),Z.preventDefault()}),children:i.jsx(Sc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:Z=>Z.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:i.jsx(z,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:Z=>Z.preventDefault(),...b,...J,onPlaced:()=>U(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:ke(b.onKeyDown,Z=>{const re=Z.ctrlKey||Z.altKey||Z.metaKey;if(Z.key==="Tab"&&Z.preventDefault(),!re&&Z.key.length===1&&se(Z.key),["ArrowUp","ArrowDown","Home","End"].includes(Z.key)){let ne=P().filter(Se=>!Se.disabled).map(Se=>Se.ref.current);if(["ArrowUp","End"].includes(Z.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(Z.key)){const Se=Z.target,B=ne.indexOf(Se);ne=ne.slice(B+1)}setTimeout(()=>Y(ne)),Z.preventDefault()}})})})})})})});WD.displayName=Mae;var Bae="SelectItemAlignedPosition",zD=v.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,a=bl(bc,r),o=_l(bc,r),[l,c]=v.useState(null),[u,d]=v.useState(null),f=ot(t,S=>d(S)),h=mg(r),m=v.useRef(!1),g=v.useRef(!0),{viewport:p,selectedItem:x,selectedItemText:b,focusSelectedItem:w}=o,y=v.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&u&&p&&x&&b){const S=a.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),j=a.valueNode.getBoundingClientRect(),T=b.getBoundingClientRect();if(a.dir!=="rtl"){const Se=T.left-E.left,B=j.left-Se,qe=S.left-B,ue=S.width+qe,Re=Math.max(ue,E.width),Ce=window.innerWidth-ja,pe=tw(B,[ja,Math.max(ja,Ce-Re)]);l.style.minWidth=ue+"px",l.style.left=pe+"px"}else{const Se=E.right-T.right,B=window.innerWidth-j.right-Se,qe=window.innerWidth-S.right-B,ue=S.width+qe,Re=Math.max(ue,E.width),Ce=window.innerWidth-ja,pe=tw(B,[ja,Math.max(ja,Ce-Re)]);l.style.minWidth=ue+"px",l.style.right=pe+"px"}const R=h(),P=window.innerHeight-ja*2,D=p.scrollHeight,U=window.getComputedStyle(u),Q=parseInt(U.borderTopWidth,10),Y=parseInt(U.paddingTop,10),V=parseInt(U.borderBottomWidth,10),F=parseInt(U.paddingBottom,10),C=Q+Y+D+F+V,X=Math.min(x.offsetHeight*5,C),se=window.getComputedStyle(p),A=parseInt(se.paddingTop,10),M=parseInt(se.paddingBottom,10),I=S.top+S.height/2-ja,z=P-I,J=x.offsetHeight/2,Z=x.offsetTop+J,re=Q+Y+Z,ae=C-re;if(re<=I){const Se=R.length>0&&x===R[R.length-1].ref.current;l.style.bottom="0px";const B=u.clientHeight-p.offsetTop-p.offsetHeight,qe=Math.max(z,J+(Se?M:0)+B+V),ue=re+qe;l.style.height=ue+"px"}else{const Se=R.length>0&&x===R[0].ref.current;l.style.top="0px";const qe=Math.max(I,Q+p.offsetTop+(Se?A:0)+J)+ae;l.style.height=qe+"px",p.scrollTop=re-I+p.offsetTop}l.style.margin=`${ja}px 0`,l.style.minHeight=X+"px",l.style.maxHeight=P+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[h,a.trigger,a.valueNode,l,u,p,x,b,a.dir,n]);un(()=>y(),[y]);const[_,N]=v.useState();un(()=>{u&&N(window.getComputedStyle(u).zIndex)},[u]);const k=v.useCallback(S=>{S&&g.current===!0&&(y(),w==null||w(),g.current=!1)},[y,w]);return i.jsx(Uae,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:k,children:i.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:i.jsx(He.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});zD.displayName=Bae;var $ae="SelectPopperPosition",sw=v.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=ja,...a}=e,o=pg(r);return i.jsx(Ox,{...o,...a,ref:t,align:n,collisionPadding:s,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)"}})});sw.displayName=$ae;var[Uae,n2]=Rd(bc,{}),aw="SelectViewport",HD=v.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,a=_l(aw,r),o=n2(aw,r),l=ot(t,a.onViewportChange),c=v.useRef(0);return i.jsxs(i.Fragment,{children:[i.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}),i.jsx(hg.Slot,{scope:r,children:i.jsx(He.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:ke(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=o;if(h!=null&&h.current&&f){const m=Math.abs(c.current-d.scrollTop);if(m>0){const g=window.innerHeight-ja*2,p=parseFloat(f.style.minHeight),x=parseFloat(f.style.height),b=Math.max(p,x);if(b<g){const w=b+m,y=Math.min(g,w),_=w-y;f.style.height=y+"px",f.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});HD.displayName=aw;var VD="SelectGroup",[Wae,zae]=Rd(VD),Hae=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Us();return i.jsx(Wae,{scope:r,id:s,children:i.jsx(He.div,{role:"group","aria-labelledby":s,...n,ref:t})})});Hae.displayName=VD;var GD="SelectLabel",qD=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=zae(GD,r);return i.jsx(He.div,{id:s.id,...n,ref:t})});qD.displayName=GD;var Qp="SelectItem",[Vae,KD]=Rd(Qp),YD=v.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:a,...o}=e,l=bl(Qp,r),c=_l(Qp,r),u=l.value===n,[d,f]=v.useState(a??""),[h,m]=v.useState(!1),g=ot(t,w=>{var y;return(y=c.itemRefCallback)==null?void 0:y.call(c,w,n,s)}),p=Us(),x=v.useRef("touch"),b=()=>{s||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return i.jsx(Vae,{scope:r,value:n,disabled:s,textId:p,isSelected:u,onItemTextChange:v.useCallback(w=>{f(y=>y||((w==null?void 0:w.textContent)??"").trim())},[]),children:i.jsx(hg.ItemSlot,{scope:r,value:n,disabled:s,textValue:d,children:i.jsx(He.div,{role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:g,onFocus:ke(o.onFocus,()=>m(!0)),onBlur:ke(o.onBlur,()=>m(!1)),onClick:ke(o.onClick,()=>{x.current!=="mouse"&&b()}),onPointerUp:ke(o.onPointerUp,()=>{x.current==="mouse"&&b()}),onPointerDown:ke(o.onPointerDown,w=>{x.current=w.pointerType}),onPointerMove:ke(o.onPointerMove,w=>{var y;x.current=w.pointerType,s?(y=c.onItemLeave)==null||y.call(c):x.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ke(o.onPointerLeave,w=>{var y;w.currentTarget===document.activeElement&&((y=c.onItemLeave)==null||y.call(c))}),onKeyDown:ke(o.onKeyDown,w=>{var _;((_=c.searchRef)==null?void 0:_.current)!==""&&w.key===" "||(Aae.includes(w.key)&&b(),w.key===" "&&w.preventDefault())})})})})});YD.displayName=Qp;var df="SelectItemText",XD=v.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...a}=e,o=bl(df,r),l=_l(df,r),c=KD(df,r),u=Dae(df,r),[d,f]=v.useState(null),h=ot(t,b=>f(b),c.onItemTextChange,b=>{var w;return(w=l.itemTextRefCallback)==null?void 0:w.call(l,b,c.value,c.disabled)}),m=d==null?void 0:d.textContent,g=v.useMemo(()=>i.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:p,onNativeOptionRemove:x}=u;return un(()=>(p(g),()=>x(g)),[p,x,g]),i.jsxs(i.Fragment,{children:[i.jsx(He.span,{id:c.textId,...a,ref:h}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?ca.createPortal(a.children,o.valueNode):null]})});XD.displayName=df;var QD="SelectItemIndicator",JD=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return KD(QD,r).isSelected?i.jsx(He.span,{"aria-hidden":!0,...n,ref:t}):null});JD.displayName=QD;var iw="SelectScrollUpButton",ZD=v.forwardRef((e,t)=>{const r=_l(iw,e.__scopeSelect),n=n2(iw,e.__scopeSelect),[s,a]=v.useState(!1),o=ot(t,n.onScrollButtonChange);return un(()=>{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]),s?i.jsx(tI,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});ZD.displayName=iw;var ow="SelectScrollDownButton",eI=v.forwardRef((e,t)=>{const r=_l(ow,e.__scopeSelect),n=n2(ow,e.__scopeSelect),[s,a]=v.useState(!1),o=ot(t,n.onScrollButtonChange);return un(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;a(d)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),s?i.jsx(tI,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});eI.displayName=ow;var tI=v.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,a=_l("SelectScrollButton",r),o=v.useRef(null),l=mg(r),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),un(()=>{var d;const u=l().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),i.jsx(He.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ke(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:ke(s.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:ke(s.onPointerLeave,()=>{c()})})}),Gae="SelectSeparator",rI=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return i.jsx(He.div,{"aria-hidden":!0,...n,ref:t})});rI.displayName=Gae;var lw="SelectArrow",qae=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=pg(r),a=bl(lw,r),o=_l(lw,r);return a.open&&o.position==="popper"?i.jsx(Dx,{...s,...n,ref:t}):null});qae.displayName=lw;var Kae="SelectBubbleInput",nI=v.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const s=v.useRef(null),a=ot(n,s),o=Xx(t);return v.useEffect(()=>{const l=s.current;if(!l)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&d){const f=new Event("change",{bubbles:!0});d.call(l,t),l.dispatchEvent(f)}},[o,t]),i.jsx(He.select,{...r,style:{...n4,...r.style},ref:a,defaultValue:t})});nI.displayName=Kae;function sI(e){return e===""||e===void 0}function aI(e){const t=Ur(e),r=v.useRef(""),n=v.useRef(0),s=v.useCallback(o=>{const l=r.current+o;t(l),function c(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),a=v.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,a]}function iI(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let o=Yae(e,Math.max(a,0));s.length===1&&(o=o.filter(u=>u!==r));const c=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function Yae(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Xae=OD,oI=ID,Qae=MD,Jae=LD,Zae=BD,lI=$D,eie=HD,cI=qD,uI=YD,tie=XD,rie=JD,dI=ZD,fI=eI,hI=rI;const At=Xae,Pt=Qae,Ct=v.forwardRef(({className:e,children:t,...r},n)=>i.jsxs(oI,{ref:n,className:xe("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
702ing-offset-background 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,i.jsx(Jae,{asChild:!0,children:i.jsx(Cx,{className:"h-4 w-4 opacity-50"})})]}));Ct.displayName=oI.displayName;const mI=v.forwardRef(({className:e,...t},r)=>i.jsx(dI,{ref:r,className:xe("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(C4,{className:"h-4 w-4"})}));mI.displayName=dI.displayName;const pI=v.forwardRef(({className:e,...t},r)=>i.jsx(fI,{ref:r,className:xe("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(Cx,{className:"h-4 w-4"})}));pI.displayName=fI.displayName;const Tt=v.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>i.jsx(Zae,{children:i.jsxs(lI,{ref:s,className:xe("relative z-50 max-h-96 min-w-[8rem] overflow-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",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:[i.jsx(mI,{}),i.jsx(eie,{className:xe("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),i.jsx(pI,{})]})}));Tt.displayName=lI.displayName;const nie=v.forwardRef(({className:e,...t},r)=>i.jsx(cI,{ref:r,className:xe("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));nie.displayName=cI.displayName;const $e=v.forwardRef(({className:e,children:t,...r},n)=>i.jsxs(uI,{ref:n,className:xe("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(rie,{children:i.jsx(hn,{className:"h-4 w-4"})})}),i.jsx(tie,{children:t})]}));$e.displayName=uI.displayName;const sie=v.forwardRef(({className:e,...t},r)=>i.jsx(hI,{ref:r,className:xe("-mx-1 my-1 h-px bg-muted",e),...t}));sie.displayName=hI.displayName;function aie({onAddCourse:e}){const[t,r]=v.useState(!1),[n,s]=v.useState(""),[a,o]=v.useState("hybrid"),[l,c]=v.useState(""),[u,d]=v.useState(!1),f=async h=>{if(h.preventDefault(),!n.trim()){K.error("נא להזין שם קורס");return}d(!0);try{e({name:n.trim(),type:a,crm_id:l.trim()||void 0}),K.success(`הקורס "${n}" נוצר בהצלחה!`),s(""),o("hybrid"),c(""),r(!1)}catch{K.error("שגיאה ביצירת הקורס")}finally{d(!1)}};return i.jsxs(Ht,{open:t,onOpenChange:r,children:[i.jsx(va,{asChild:!0,children:i.jsxs(ee,{variant:"rose",className:"gap-2",children:[i.jsx(hL,{className:"h-4 w-4"}),"צור קורס חדש"]})}),i.jsxs(Ut,{className:"sm:max-w-md",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"יצירת קורס חדש"})}),i.jsxs("form",{onSubmit:f,className:"space-y-4 mt-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"courseName",children:"שם הקורס"}),i.jsx(Oe,{id:"courseName",placeholder:"לדוגמה: איפור כלות מתקדם",value:n,onChange:h=>s(h.target.value),className:"text-right"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"courseType",children:"סוג הקורס"}),i.jsxs(At,{value:a,onValueChange:h=>o(h),children:[i.jsx(Ct,{className:"text-right",children:i.jsx(Pt,{placeholder:"בחרי סוג קורס"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"online",children:"אונליין"}),i.jsx($e,{value:"onsite",children:"פרונטלי"}),i.jsx($e,{value:"hybrid",children:"משולב"}),i.jsx($e,{value:"external_client",children:"לקוח חיצוני"})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"crmId",children:"מזהה CRM (אופציונלי)"}),i.jsx(Oe,{id:"crmId",placeholder:"מזהה קורס במערכת CRM",value:l,onCh
702ange:h=>c(h.target.value),className:"text-right font-mono text-sm",dir:"ltr"})]}),i.jsxs("div",{className:"flex gap-3 pt-4",children:[i.jsx(ee,{type:"submit",variant:"rose",className:"flex-1",disabled:u,children:u?"יוצר...":"צור קורס"}),i.jsx(ee,{type:"button",variant:"outline",onClick:()=>r(!1),children:"ביטול"})]})]})]})]})}function iie(){const{courses:e}=xl(),{students:t}=Hx(),{lessons:r}=f3();return{coursesWithCounts:e.map(s=>{const a=t.filter(l=>l.courses.includes(s.name)).length,o=r.filter(l=>l.courseId===s.id).length;return{...s,studentCount:a,lessonCount:o}})}}const oie={online:{label:"אונליין",icon:$a,color:"bg-blue-100 text-blue-700"},onsite:{label:"פרונטלי",icon:ls,color:"bg-green-100 text-green-700"},hybrid:{label:"משולב",icon:$a,color:"bg-purple-100 text-purple-700"},"external-client":{label:"לקוח חיצוני",icon:xs,color:"bg-amber-100 text-amber-700"}},lie={label:"לא מוגדר",icon:$a,color:"bg-gray-100 text-gray-700"};function cie(){const{addCourse:e,updateCourseStatus:t}=xl(),{coursesWithCounts:r}=iie(),n=a=>{e(a)},s=(a,o,l)=>{const c=o==="active"?"inactive":"active";t(a,c),K.success(c==="active"?`הקורס "${l}" הופעל`:`הקורס "${l}" הופסק`)};return i.jsx(Hn,{children:i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 animate-fade-in",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-foreground",children:"קורסים"}),i.jsxs("p",{className:"text-muted-foreground mt-1",children:["ניהול כל הקורסים בבית הספר (",r.length," קורסים)"]})]}),i.jsx(aie,{onAddCourse:n})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:r.map((a,o)=>{const l=oie[a.type]??lie,c=l.icon,u=a.status==="inactive";return i.jsxs("div",{className:xe("bg-card rounded-2xl shadow-card border border-border overflow-hidden hover:shadow-elevated transition-all duration-300 animate-scale-in",u&&"opacity-60"),style:{animationDelay:`${o*100}ms`},children:[i.jsx("div",{className:xe("h-3",u?"bg-gray-300":"gradient-rose")}),i.jsxs("div",{className:"p-6",children:[i.jsxs("div",{className:"flex items-start justify-between mb-4",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-bold text-lg text-foreground mb-1",children:a.name}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs(We,{className:xe(l.color,"gap-1"),children:[i.jsx(c,{className:"h-3 w-3"}),l.label]}),i.jsx(We,{className:xe(u?"bg-gray-100 text-gray-600":"bg-green-100 text-green-700"),children:u?"לא פעיל":"פעיל"})]})]}),i.jsx(ee,{variant:"ghost",size:"icon",onClick:()=>s(a.id,a.status,a.name),className:xe("h-8 w-8",u?"text-gray-400":"text-green-600"),title:u?"הפעל קורס":"השבת קורס",children:i.jsx(B4,{className:"h-4 w-4"})})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4 pt-4 border-t border-border",children:[i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"flex items-center justify-center gap-1 text-muted-foreground mb-1",children:i.jsx(xs,{className:"h-4 w-4"})}),i.jsx("p",{className:"font-bold text-foreground",children:a.studentCount}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"תלמידות"})]}),i.jsxs("div",{className:"text-center border-r border-border",children:[i.jsx("div",{className:"flex items-center justify-center gap-1 text-muted-foreground mb-1",children:i.jsx($a,{className:"h-4 w-4"})}),i.jsx("p",{className:"font-bold text-foreground",children:a.lessonCount}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"שיעורים"})]})]})]})]},a.id)})}),r.length===0&&i.jsx("div",{className:"text-center py-12",children:i.jsx("p",{className:"text-muted-foreground",children:"לא נמצאו קורסים"})})]})})}var xg="Tabs",[uie,Z0e]=tn(xg,[Pd]),xI=Pd(),[die,s2]=uie(xg),gI=v.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:a,orientation:o="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=Oc(l),[f,h]=ps({prop:n,onChange:s,defaultProp:a??"",caller:xg});return i.jsx(die,{scope:r,baseId:Us(),value:f,onValueChange:h,orientation:o,dir:d,activationMode:c,children:i.jsx(He.div,{dir:d,"data-orientation":o,...u,ref:t})})});gI.displayName=xg;var vI="TabsList",yI=v.forwardRef((e,t)=>
vendor: 2,778 bytes, line 702
702{const{__scopeTabs:r,loop:n=!0,...s}=e,a=s2(vI,r),o=xI(r);return i.jsx(K_,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:n,children:i.jsx(He.div,{role:"tablist","aria-orientation":a.orientation,...s,ref:t})})});yI.displayName=vI;var wI="TabsTrigger",bI=v.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...a}=e,o=s2(wI,r),l=xI(r),c=SI(o.baseId,n),u=kI(o.baseId,n),d=n===o.value;return i.jsx(Y_,{asChild:!0,...l,focusable:!s,active:d,children:i.jsx(He.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...a,ref:t,onMouseDown:ke(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?o.onValueChange(n):f.preventDefault()}),onKeyDown:ke(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(n)}),onFocus:ke(e.onFocus,()=>{const f=o.activationMode!=="manual";!d&&!s&&f&&o.onValueChange(n)})})})});bI.displayName=wI;var _I="TabsContent",NI=v.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:s,children:a,...o}=e,l=s2(_I,r),c=SI(l.baseId,n),u=kI(l.baseId,n),d=n===l.value,f=v.useRef(d);return v.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),i.jsx(rn,{present:s||d,children:({present:h})=>i.jsx(He.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&a})})});NI.displayName=_I;function SI(e,t){return`${e}-trigger-${t}`}function kI(e,t){return`${e}-content-${t}`}var fie=gI,jI=yI,EI=bI,CI=NI;const hie=fie,TI=v.forwardRef(({className:e,...t},r)=>i.jsx(jI,{ref:r,className:xe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));TI.displayName=jI.displayName;const $m=v.forwardRef(({className:e,...t},r)=>i.jsx(EI,{ref:r,className:xe("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));$m.displayName=EI.displayName;const Um=v.forwardRef(({className:e,...t},r)=>i.jsx(CI,{ref:r,className:xe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Um.displayName=CI.displayName;const Xs=v.forwardRef(({className:e,...t},r)=>i.jsx("textarea",{className:xe("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
702ing-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",e),ref:r,...t}));Xs.displayName="Textarea";function mie({onAddType:e}){const{activeCourses:t}=xl(),[r,n]=v.useState(!1),[s,a]=v.useState(""),[o,l]=v.useState(""),[c,u]=v.useState("credit"),[d,f]=v.useState(""),[h,m]=v.useState("global"),[g,p]=v.useState(!1),x=async w=>{if(w.preventDefault(),!s.trim()){K.error("נא להזין שם סוג זכאות");return}if(!o.trim()){K.error("נא להזין תיאור");return}p(!0);try{const y=h!=="global"?t.find(_=>_.id===h):null;e({name:s.trim(),description:o.trim(),category:c,lessonCount:c==="online_view"&&d?parseInt(d):void 0,courseId:h!=="global"?h:void 0,courseName:y==null?void 0:y.name}),K.success(`סוג זכאות "${s}" נוסף בהצלחה`),a(""),l(""),u("credit"),f(""),m("global"),n(!1)}catch{K.error("שגיאה בהוספת סוג זכאות")}finally{p(!1)}},b={credit:"קרדיט כספי",online_view:"צפייה אונליין"};return i.jsxs(Ht,{open:r,onOpenChange:n,children:[i.jsx(va,{asChild:!0,children:i.jsxs(ee,{variant:"rose",className:"gap-2",children:[i.jsx(hs,{className:"h-4 w-4"}),"הוסף סוג זכאות"]})}),i.jsxs(Ut,{className:"sm:max-w-md",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"הוספת סוג זכאות חדש"})}),i.jsxs("form",{onSubmit:x,className:"space-y-4 mt-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"name",children:"שם סוג הזכאות"}),i.jsx(Oe,{id:"name",placeholder:"לדוגמה: השתלמות מקצועית",value:s,onChange:w=>a(w.target.value),className:"text-right"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"description",children:"תיאור"}),i.jsx(Xs,{id:"description",placeholder:"תיאור קצר של סוג הזכאות...",value:o,onChange:w=>l(w.target.value),className:"text-right resize-none",rows:3})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"category",children:"קטגוריה"}),i.jsxs(At,{value:c,onValueChange:w=>u(w),children:[i.jsx(Ct,{className:"text-right",children:i.jsx(Pt,{placeholder:"בחרי קטגוריה"})}),i.jsx(Tt,{children:Object.entries(b).map(([w,y])=>i.jsx($e,{value:w,children:y},w))})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"course",children:"קישור לקורס"}),i.jsxs(At,{value:h,onValueChange:m,children:[i.jsx(Ct,{className:"text-right",children:i.jsx(Pt,{placeholder:"בחרי קורס"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"global",children:"ללא קישור לקורס (זכאות כללית)"}),t.map(w=>i.jsx($e,{value:w.id,children:w.name},w.id))]})]})]}),c==="online_view"&&i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"lessonCount",children:"מספר שיעורים"}),i.jsx(Oe,{id:"lessonCount",type:"number",placeholder:"1",value:d,onChange:w=>f(w.target.value),dir:"ltr",min:"1"})]}),i.jsxs("div",{className:"flex gap-3 pt-4",children:[i.jsx(ee,{type:"submit",variant:"rose",className:"flex-1",disabled:g,children:g?"מוסיף...":"הוסף סוג זכאות"}),i.jsx(ee,{type:"button",variant:"outline",onClick:()=>n(!1),children:"ביטול"})]})]})]})]})}const ar=v.forwardRef(({className:e,...t},r)=>i.jsx("div",{ref:r,className:xe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));ar.displayName="Card";const gg=v.forwardRef(({className:e,...t},r)=>i.jsx("div",{ref:r,className:xe("flex flex-col space-y-1.5 p-6",e),...t}));gg.displayName="CardHeader";const vg=v.forwardRef(({className:e,...t},r)=>i.jsx("h3",{ref:r,className:xe("text-2xl font-semibold leading-none tracking-tight",e),...t}));vg.displayName="CardTitle";const pie=v.forwardRef(({className:e,...t},r)=>i.jsx("p",{ref:r,className:xe("text-sm text-muted-foreground",e),...t}));pie.displayName="CardDescription";const cr=v.forwardRef(({className:e,...t},r)=>i.jsx("div",{ref:r,className:xe("p-6 pt-0",e),...t}));cr.displayName="CardContent";const xie=v.forwardRef(({className:e,...t},r)=>i.jsx("div",{ref:r,className:xe("flex items-center p-6 pt-0",e),...t}));
702xie.displayName="CardFooter";function xm({type:e,onEdit:t,onDelete:r}){const n=e.icon,s={credit:{label:"קרדיט כספי",className:"bg-emerald-100 text-emerald-700"},online_view:{label:"צפייה אונליין",className:"bg-blue-100 text-blue-700"}};return i.jsxs(ar,{className:"hover:shadow-md transition-shadow",children:[i.jsx(gg,{className:"pb-3",children:i.jsxs("div",{className:"flex items-start justify-between",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:xe("w-10 h-10 rounded-lg flex items-center justify-center",e.color),children:i.jsx(n,{className:"h-5 w-5"})}),i.jsxs("div",{children:[i.jsx(vg,{className:"text-lg",children:e.name}),i.jsx(We,{className:xe("mt-1",s[e.category].className),children:s[e.category].label})]})]}),i.jsxs("div",{className:"flex gap-1",children:[t&&i.jsx(ee,{variant:"ghost",size:"icon",onClick:()=>t(e),className:"h-8 w-8",children:i.jsx(wd,{className:"h-4 w-4"})}),r&&i.jsx(ee,{variant:"ghost",size:"icon",onClick:()=>r(e.id),className:"h-8 w-8 text-destructive",children:i.jsx(Ia,{className:"h-4 w-4"})})]})]})}),i.jsxs(cr,{className:"space-y-2",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:e.description}),i.jsx("div",{className:"flex flex-wrap gap-2 text-sm",children:e.courseName?i.jsxs("span",{className:"px-2 py-1 rounded-md bg-muted text-muted-foreground",children:["קורס: ",e.courseName]}):i.jsx("span",{className:"px-2 py-1 rounded-md bg-gray-100 text-gray-600",children:"זכאות כללית"})}),e.category==="online_view"&&e.lessonCount!==void 0&&i.jsxs("p",{className:"text-sm font-medium",children:["מספר שיעורים: ",e.lessonCount]})]})]})}function gie(){const{entitlementTypes:e,addEntitlementType:t,deleteEntitlementType:r}=u3(),[n,s]=v.useState("all"),a=e.filter(c=>n==="all"||c.category===n),o=a.filter(c=>c.category==="credit"),l=a.filter(c=>c.category==="online_view");return i.jsx(Hn,{children:i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 animate-fade-in",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-foreground",children:"ניהול זכאויות"}),i.jsxs("p",{className:"text-muted-foreground mt-1",children:["רשימת סוגי הזכאויות במערכת (",e.length," סוגים)"]})]}),i.jsx(mie,{onAddType:t})]}),i.jsxs(hie,{value:n,onValueChange:c=>s(c),className:"animate-scale-in",children:[i.jsx("div",{className:"w-full flex justify-end",children:i.jsxs(TI,{className:"grid w-fit max-w-md grid-cols-3",dir:"rtl",children:[i.jsxs($m,{value:"all",children:["הכל (",e.length,")"]}),i.jsxs($m,{value:"credit",children:["קרדיט כספי (",e.filter(c=>c.category==="credit").length,")"]}),i.jsxs($m,{value:"online_view",children:["צפייה אונליין (",e.filter(c=>c.category==="online_view").length,")"]})]})}),i.jsx(Um,{value:"all",className:"mt-6",children:a.length>0?i.jsxs("div",{className:"space-y-6",children:[o.length>0&&i.jsx("div",{children:i.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",dir:"rtl",children:o.map(c=>i.jsx(xm,{type:c,onDelete:r},c.id))})}),l.length>0&&i.jsx("div",{children:i.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",dir:"rtl",children:l.map(c=>i.jsx(xm,{type:c,onDelete:r},c.id))})})]}):i.jsx("div",{className:"text-center py-12 bg-card rounded-2xl border border-border",children:i.jsx("p",{className:"text-muted-foreground",children:"לא נמצאו סוגי זכאויות"})})}),i.jsx(Um,{value:"credit",className:"mt-6",children:o.length>0?i.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",dir:"rtl",children:o.map(c=>i.jsx(xm,{type:c,onDelete:r},c.id))}):i.jsx("div",{className:"text-center py-12 bg-card rounded-2xl border border-border",children:i.jsx("p",{className:"text-muted-foreground",children:"לא נמצאו זכאויות קרדיט כספי"})})}),i.jsx(Um,{value:"online_view",className:"mt-6",children:l.length>0?i.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",dir:"rtl",children:l.map(c=>i.jsx(xm,{type:c,onDelete:r},c.id))}):i.jsx("div",{className:"text-center py-12 bg-card rounded-2xl border border-border",children:i.jsx("p",{className:"text-muted-foreground",children:"לא נמצאו זכאויות צפייה אונליין"})})})]})]})})}var yg="Popover",[AI,eme]=tn(yg,[ml]),v0=ml(),[vie,Nl]=AI(yg),PI=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:s,onOpenChange:a,modal:o=!1}=e,l=v0(t),c=v.useRef(null),[u,d]=v.useState(!1),[f,h]=ps({prop:n,defaultProp:s??!1,onChange:a,caller:yg});return i.jsx(Db,{...l,children:i.jsx(vie,{scope:t,contentId:Us(),triggerRef:c,open:f,onOpenChange:h,onOpenToggle:v.useCallback(()=>h(m=>!m),[h]),hasCustomAnchor:u,onCustomAnchorAdd:v.useCallback(()=>d(!0),[]),onCustomAnchorRemove:v.useCallback(()=>d(!1),[]),modal:o,children:r})})};PI.displayName=yg;var RI="PopoverAnchor",yie=v.forwardRef((e,t)=>
vendor: 4,472 bytes, line 702
702{const{__scopePopover:r,...n}=e,s=Nl(RI,r),a=v0(r),{onCustomAnchorAdd:o,onCustomAnchorRemove:l}=s;return v.useEffect(()=>(o(),()=>l()),[o,l]),i.jsx(e0,{...a,...n,ref:t})});yie.displayName=RI;var OI="PopoverTrigger",DI=v.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=Nl(OI,r),a=v0(r),o=ot(t,s.triggerRef),l=i.jsx(He.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":BI(s.open),...n,ref:o,onClick:ke(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?l:i.jsx(e0,{asChild:!0,...a,children:l})});DI.displayName=OI;var a2="PopoverPortal",[wie,bie]=AI(a2,{forceMount:void 0}),II=e=>{const{__scopePopover:t,forceMount:r,children:n,container:s}=e,a=Nl(a2,t);return i.jsx(wie,{scope:t,forceMount:r,children:i.jsx(rn,{present:r||a.open,children:i.jsx(yd,{asChild:!0,container:s,children:n})})})};II.displayName=a2;var fd="PopoverContent",FI=v.forwardRef((e,t)=>{const r=bie(fd,e.__scopePopover),{forceMount:n=r.forceMount,...s}=e,a=Nl(fd,e.__scopePopover);return i.jsx(rn,{present:n||a.open,children:a.modal?i.jsx(Nie,{...s,ref:t}):i.jsx(Sie,{...s,ref:t})})});FI.displayName=fd;var _ie=tl("PopoverContent.RemoveScroll"),Nie=v.forwardRef((e,t)=>{const r=Nl(fd,e.__scopePopover),n=v.useRef(null),s=ot(t,n),a=v.useRef(!1);return v.useEffect(()=>{const o=n.current;if(o)return qx(o)},[]),i.jsx(s0,{as:_ie,allowPinchZoom:!0,children:i.jsx(MI,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ke(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),a.current||(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:ke(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:ke(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),Sie=v.forwardRef((e,t)=>{const r=Nl(fd,e.__scopePopover),n=v.useRef(!1),s=v.useRef(!1);return i.jsx(MI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})}),MI=v.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...f}=e,h=Nl(fd,r),m=v0(r);return Vx(),i.jsx(n0,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:a,children:i.jsx(Sc,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:i.jsx(Ox,{"data-state":BI(h.open),role:"dialog",id:h.contentId,...m,...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)"}})})})}),LI="PopoverClose",kie=v.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=Nl(LI,r);return i.jsx(He.button,{type:"button",...n,ref:t,onClick:ke(e.onClick,()=>s.onOpenChange(!1))})});kie.displayName=LI;var jie="PopoverArrow",Eie=v.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=v0(r);return i.jsx(Dx,{...s,...n,ref:t})});Eie.displayName=jie;function BI(e){return e?"open":"closed"}var Cie=PI,Tie=DI,Aie=II,$I=FI;const i2=Cie,o2=Tie,wg=v.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},s)=>i.jsx(Aie,{children:i.jsx($I,{ref:s,align:t,sideOffset:r,className:xe("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]:sli
702de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));wg.displayName=$I.displayName;function ht(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function sr(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function kn(e,t){const r=ht(e);return isNaN(t)?sr(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function ts(e,t){const r=ht(e);if(isNaN(t))return sr(e,NaN);if(!t)return r;const n=r.getDate(),s=sr(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const a=s.getDate();return n>=a?s:(r.setFullYear(s.getFullYear(),s.getMonth(),n),r)}const l2=6048e5,Pie=864e5,Rie=6e4,Oie=36e5,Die=1e3;let Iie={};function Mc(){return Iie}function vs(e,t){var l,c,u,d;const r=Mc(),n=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??r.weekStartsOn??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,s=ht(e),a=s.getDay(),o=(a<n?7:0)+a-n;return s.setDate(s.getDate()-o),s.setHours(0,0,0,0),s}function to(e){return vs(e,{weekStartsOn:1})}function UI(e){const t=ht(e),r=t.getFullYear(),n=sr(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const s=to(n),a=sr(e,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const o=to(a);return t.getTime()>=s.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function hd(e){const t=ht(e);return t.setHours(0,0,0,0),t}function md(e){const t=ht(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 mi(e,t){const r=hd(e),n=hd(t),s=+r-md(r),a=+n-md(n);return Math.round((s-a)/Pie)}function Fie(e){const t=UI(e),r=sr(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),to(r)}function Oh(e,t){const r=t*7;return kn(e,r)}function Mie(e,t){return ts(e,t*12)}function Lie(e){let t;return e.forEach(function(r){const n=ht(r);(t===void 0||t<n||isNaN(Number(n)))&&(t=n)}),t||new Date(NaN)}function Bie(e){let t;return e.forEach(r=>{const n=ht(r);(!t||t>n||isNaN(+n))&&(t=n)}),t||new Date(NaN)}function Wr(e,t){const r=hd(e),n=hd(t);return+r==+n}function c2(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function bg(e){if(!c2(e)&&typeof e!="number")return!1;const t=ht(e);return!isNaN(Number(t))}function Dh(e,t){const r=ht(e),n=ht(t),s=r.getFullYear()-n.getFullYear(),a=r.getMonth()-n.getMonth();return s*12+a}function $ie(e,t,r){const n=vs(e,r),s=vs(t,r),a=+n-md(n),o=+s-md(s);return Math.round((a-o)/l2)}function y0(e){const t=ht(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function u2(e,t){const r=ht(e.start),n=ht(e.end);let s=+r>+n;const a=s?+r:+n,o=s?n:r;o.setHours(0,0,0,0);let l=1;const c=[];for(;+o<=a;)c.push(ht(o)),o.setDate(o.getDate()+l),o.setHours(0,0,0,0);return s?c.reverse():c}function en(e){const t=ht(e);return t.setDate(1),t.setHours(0,0,0,0),t}function WI(e){const t=ht(e),r=sr(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function Ih(e,t){var l,c,u,d;const r=Mc(),n=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??r.weekStartsOn??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,s=ht(e),a=s.getDay(),o=(a<n?-7:0)+6-(a-n);return s.setDate(s.getDate()+o),s.setHours(23,59,59,999),s}function zI(e){return Ih(e,{weekStartsOn:1})}const Uie={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Wie=(e,t,r)=>{let n;const s=Uie[e];return typeof s=="string"?n=s:t===1?n=s.one:n=s.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Iu(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const zie={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"}
vendor: 12,464 bytes, line 702
702,Hie={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Vie={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Gie={date:Iu({formats:zie,defaultWidth:"full"}),time:Iu({formats:Hie,defaultWidth:"full"}),dateTime:Iu({formats:Vie,defaultWidth:"full"})},qie={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Kie=(e,t,r,n)=>qie[e];function li(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let s;if(n==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,l=r!=null&&r.width?String(r.width):o;s=e.formattingValues[l]||e.formattingValues[o]}else{const o=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;s=e.values[l]||e.values[o]}const a=e.argumentCallback?e.argumentCallback(t):t;return s[a]}}const Yie={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Xie={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Qie={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"]},Jie={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"]},Zie={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"}},eoe={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"}},toe=(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"},roe={ordinalNumber:toe,era:li({values:Yie,defaultWidth:"wide"}),quarter:li({values:Xie,defaultWidth:"wide",argumentCallback:e=>e-1}),month:li({values:Qie,defaultWidth:"wide"}),day:li({values:Jie,defaultWidth:"wide"}),dayPeriod:li({values:Zie,defaultWidth:"wide",formattingValues:eoe,defaultFormattingWidth:"wide"})};function ci(e){return(t,r={})=>{const n=r.width,s=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(s);if(!a)return null;const o=a[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?soe(l,f=>f.test(o)):noe(l,f=>f.test(o));let u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;const d=t.slice(o.length);return{value:u,rest:d}}}function noe(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function soe(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function HI(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const s=n[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;const l=t.slice(s.length);return{value:o,rest:l}}}const aoe=/^(\d+)(th|st|nd|rd)?/i,ioe=/\d+/i,ooe={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},loe={any:[/^b/i,/^(a|c)/i]},coe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},uoe={any:[/1/i,/2/i,/3/i,/4/i]},doe={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},foe={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]},hoe={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},moe={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]},poe={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},xoe={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}},goe={ordinalNumber:HI({matchPattern:aoe,parsePattern:ioe,valueCallback:e=>parseInt(e,10)}),era:ci({matchPatterns:ooe,defaultMatchWidth:"wide",parsePatterns:loe,defaultParseWidth:"any"}),quarter:ci({matchPatterns:coe,defaultMatchWidth:"wide",parsePatterns:uoe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ci({matchPatterns:doe,defaultMatchWidth:"wide",parsePatterns:foe,defaultParseWidth:"any"}),day:ci({matchPatterns:hoe,defaultMatchWidth:"wide",parsePatterns:moe,defaultParseWidth:"any"}),dayPeriod:ci({matchPatterns:poe,defaultMatchWidth:"any",parsePatterns:xoe,defaultParseWidth:"any"})},d2={code:"en-US",formatDistance:Wie,formatLong:Gie,formatRelative:Kie,localize:roe,match:goe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function voe(e){const t=ht(e);return mi(t,WI(t))+1}function f2(e){const t=ht(e),r=+to(t)-+Fie(t);return Math.round(r/l2)+1}function h2(e,t){var d,f,h,m;const r=ht(e),n=r.getFullYear(),s=Mc(),a=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??s.firstWeekContainsDate??((m=(h=s.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,o=sr(e,0);o.setFullYear(n+1,0,a),o.setHours(0,0,0,0);const l=vs(o,t),c=sr(e,0);c.setFullYear(n,0,a),c.setHours(0,0,0,0);const u=vs(c,t);return r.getTime()>=l.getTime()?n+1:r.getTime()>=u.getTime()?n:n-1}function yoe(e,t){var l,c,u,d;const r=Mc(),n=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=h2(e,t),a=sr(e,0);return a.setFullYear(s,0,n),a.setHours(0,0,0,0),vs(a,t)}function m2(e,t){const r=ht(e),n=+vs(r,t)-+yoe(r,t);return Math.round(n/l2)+1}function Xt(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const xo={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Xt(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Xt(r+1,2)},d(e,t){return Xt(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];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Xt(e.getHours()%12||12,t.length)},H(e,t){return Xt(e.getHours(),t.length)},m(e,t){return Xt(e.getMinutes(),t.length)},s(e,t){return Xt(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),s=Math.trunc(n*Math.pow(10,r-3));return Xt(s,t.length)}},Qc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Yj={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"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),s=n>0?n:1-n;return r.ordinalNumber(s,{unit:"year"})}return xo.y(e,t)},Y:function(e,t,r,n){const s=h2(e,n),a=s>0?s:1-s;if(t==="YY"){const o=a%100;return Xt(o,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):Xt(a,t.length)},R:function(e,t){const r=UI(e);return Xt(r,t.length)},u:function(e,t){const r=e.getFullYear();return Xt(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 Xt(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"});case"QQQQ":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 Xt(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"});case"qqqq":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 xo.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"});case"MMMM":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 Xt(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"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const s=m2(e,n);return t==="wo"?r.ordinalNumber(s,{unit:"week"}):Xt(s,t.length)},I:function(e,t,r){const n=f2(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Xt(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):xo.d(e,t)},D:function(e,t,r){const n=voe(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Xt(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"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const s=e.getDay(),a=(s-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Xt(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(s,{width:"short",context:"formatting"});case"eeee":default:return r.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const s=e.getDay(),a=(s-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Xt(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(s,{width:"narrow",context:"standalone"});case"cccccc":return r.day(s,{width:"short",context:"standalone"});case"cccc":default:return r.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),s=n===0?7:n;switch(t){case"i":return String(s);case"ii":return Xt(s,t.length);case"io":return r.ordinalNumber(s,{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"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let s;switch(n===12?s=Qc.noon:n===0?s=Qc.midnight:s=n/12>
vendor: 4,386 bytes, line 702
702=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let s;switch(n>=17?s=Qc.evening:n>=12?s=Qc.afternoon:n>=4?s=Qc.morning:s=Qc.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(s,{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 xo.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):xo.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Xt(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Xt(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):xo.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):xo.s(e,t)},S:function(e,t){return xo.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Qj(n);case"XXXX":case"XX":return Ml(n);case"XXXXX":case"XXX":default:return Ml(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Qj(n);case"xxxx":case"xx":return Ml(n);case"xxxxx":case"xxx":default:return Ml(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Xj(n,":");case"OOOO":default:return"GMT"+Ml(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Xj(n,":");case"zzzz":default:return"GMT"+Ml(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return Xt(n,t.length)},T:function(e,t,r){const n=e.getTime();return Xt(n,t.length)}};function Xj(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),s=Math.trunc(n/60),a=n%60;return a===0?r+String(s):r+String(s)+t+Xt(a,2)}function Qj(e,t){return e%60===0?(e>0?"-":"+")+Xt(Math.abs(e)/60,2):Ml(e,t)}function Ml(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),s=Xt(Math.trunc(n/60),2),a=Xt(n%60,2);return r+s+t+a}const Jj=(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"});case"PPPP":default:return t.date({width:"full"})}},VI=(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"});case"pppp":default:return t.time({width:"full"})}},woe=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],s=r[2];if(!s)return Jj(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;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Jj(n,t)).replace("{{time}}",VI(s,t))},cw={p:VI,P:woe},boe=/^D+$/,_oe=/^Y+$/,Noe=["D","DD","YY","YYYY"];function GI(e){return boe.test(e)}function qI(e){return _oe.test(e)}function uw(e,t,r){const n=Soe(e,t,r);if(console.warn(n),Noe.includes(e))throw new RangeError(n)}function Soe(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 koe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,joe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Eoe=/^'([^]*?)'?$/,Coe=/''/g,Toe=/[a-zA-Z]/;function $t(e,t,r){var d,f,h,m,g,p,x,b;const n=Mc(),s=(r==null?void 0:r.locale)??n.locale??d2,a=(r==null?void 0:r.firstWeekContainsDate)??((f=(d=r==null?void 0:r.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(h=n.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,o=(r==null?void 0:r.weekStartsOn)??((p=(g=r==null?void 0:r.locale)==null?void 0:g.options)==null?void 0:p.weekStartsOn)??n.weekStartsOn??((b=(x=n.locale)==null?void 0:x.options)==null?void 0:b.weekStartsOn)??0,l=ht(e);
vendor: 22,633 bytes, line 702
702if(!bg(l))throw new RangeError("Invalid time value");let c=t.match(joe).map(w=>{const y=w[0];if(y==="p"||y==="P"){const _=cw[y];return _(w,s.formatLong)}return w}).join("").match(koe).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const y=w[0];if(y==="'")return{isToken:!1,value:Aoe(w)};if(Yj[y])return{isToken:!0,value:w};if(y.match(Toe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:w}});s.localize.preprocessor&&(c=s.localize.preprocessor(l,c));const u={firstWeekContainsDate:a,weekStartsOn:o,locale:s};return c.map(w=>{if(!w.isToken)return w.value;const y=w.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&qI(y)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&GI(y))&&uw(y,t,String(e));const _=Yj[y[0]];return _(l,y,s.localize,u)}).join("")}function Aoe(e){const t=e.match(Eoe);return t?t[1].replace(Coe,"'"):e}function Poe(e){const t=ht(e),r=t.getFullYear(),n=t.getMonth(),s=sr(e,0);return s.setFullYear(r,n+1,0),s.setHours(0,0,0,0),s.getDate()}function Roe(){return Object.assign({},Mc())}function Ooe(e){let r=ht(e).getDay();return r===0&&(r=7),r}function dw(e){return ht(e).getMonth()}function Doe(e){return Math.trunc(+ht(e)/1e3)}function Ioe(e){const t=ht(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function Foe(e,t){return $ie(Ioe(e),en(e),t)+1}function KI(e){return ht(e).getFullYear()}function fw(e,t){const r=ht(e),n=ht(t);return r.getTime()>n.getTime()}function YI(e,t){const r=ht(e),n=ht(t);return+r<+n}function Moe(e,t){const r=t instanceof Date?sr(t,0):new t(0);return r.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),r.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),r}const Loe=10;class XI{constructor(){Ve(this,"subPriority",0)}validate(t,r){return!0}}class Boe extends XI{constructor(t,r,n,s,a){super(),this.value=t,this.validateValue=r,this.setValue=n,this.priority=s,a&&(this.subPriority=a)}validate(t,r){return this.validateValue(t,this.value,r)}set(t,r,n){return this.setValue(t,r,this.value,n)}}class $oe extends XI{constructor(){super(...arguments);Ve(this,"priority",Loe);Ve(this,"subPriority",-1)}set(r,n){return n.timestampIsSet?r:sr(r,Moe(r,Date))}}class Vt{run(t,r,n,s){const a=this.parse(t,r,n,s);return a?{setter:new Boe(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(t,r,n){return!0}}class Uoe extends Vt{constructor(){super(...arguments);Ve(this,"priority",140);Ve(this,"incompatibleTokens",["R","u","t","T"])}parse(r,n,s){switch(n){case"G":case"GG":case"GGG":return s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"});case"GGGGG":return s.era(r,{width:"narrow"});case"GGGG":default:return s.era(r,{width:"wide"})||s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"})}}set(r,n,s){return n.era=s,r.setFullYear(s,0,1),r.setHours(0,0,0,0),r}}const zr={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ui={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Hr(e,t){return e&&{value:t(e.value),rest:e.rest}}function Sr(e,t){const r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function di(e,t){const r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};const n=r[1]==="+"?1:-1,s=r[2]?parseInt(r[2],10):0,a=r[3]?parseInt(r[3],10):0,o=r[5]?parseInt(r[5],10):0;return{value:n*(s*Oie+a*Rie+o*Die),rest:t.slice(r[0].length)}}function QI(e){return Sr(zr.anyDigitsSigned,e)}function Lr(e,t){switch(e){case 1:return Sr(zr.singleDigit,t);case 2:return Sr(zr.twoDigits,t);case 3:return Sr(zr.threeDigits,t);case 4:return Sr(zr.fourDigits,t);default:return Sr(new RegExp("^\\d{1,"+e+"}"),t)}}function Jp(e,t){switch(e){case 1:return Sr(zr.singleDigitSigned,t);case 2:return Sr(zr.twoDigitsSigned,t);case 3:return Sr(zr.threeDigitsSigned,t);case 4:return Sr(zr.fourDigitsSigned,t);default:return Sr(new RegExp("^-?\\d{1,"+e+"}"),t)}}function p2(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function JI(e,t){const r=t>0,n=r?t:1-t;let s;if(n<=50)s=e||100;else{const a=n+50,o=Math.trunc(a/100)*100,l=e>=a%100;s=e+o-(l?100:0)}return r?s:1-s}function ZI(e){return e%400===0||e%4===0&&e%100!==0}class Woe extends Vt{constructor(){super(...arguments);Ve(this,"priority",130);Ve(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(r,n,s){const a=o=>({year:o,isTwoDigitYear:n==="yy"});switch(n){case"y":return Hr(Lr(4,r),a);case"yo":return Hr(s.ordinalNumber(r,{unit:"year"}),a);default:return Hr(Lr(n.length,r),a)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,s){const a=r.getFullYear();if(s.isTwoDigitYear){const l=JI(s.year,a);return r.setFullYear(l,0,1),r.setHours(0,0,0,0),r}const o=!("era"in n)||n.era===1?s.year:1-s.year;return r.setFullYear(o,0,1),r.setHours(0,0,0,0),r}}class zoe extends Vt{constructor(){super(...arguments);Ve(this,"priority",130);Ve(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(r,n,s){const a=o=>({year:o,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Hr(Lr(4,r),a);case"Yo":return Hr(s.ordinalNumber(r,{unit:"year"}),a);default:return Hr(Lr(n.length,r),a)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,s,a){const o=h2(r,a);if(s.isTwoDigitYear){const c=JI(s.year,o);return r.setFullYear(c,0,a.firstWeekContainsDate),r.setHours(0,0,0,0),vs(r,a)}const l=!("era"in n)||n.era===1?s.year:1-s.year;return r.setFullYear(l,0,a.firstWeekContainsDate),r.setHours(0,0,0,0),vs(r,a)}}class Hoe extends Vt{constructor(){super(...arguments);Ve(this,"priority",130);Ve(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(r,n){return Jp(n==="R"?4:n.length,r)}set(r,n,s){const a=sr(r,0);return a.setFullYear(s,0,4),a.setHours(0,0,0,0),to(a)}}class Voe extends Vt{constructor(){super(...arguments);Ve(this,"priority",130);Ve(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(r,n){return Jp(n==="u"?4:n.length,r)}set(r,n,s){return r.setFullYear(s,0,1),r.setHours(0,0,0,0),r}}class Goe extends Vt{constructor(){super(...arguments);Ve(this,"priority",120);Ve(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"Q":case"QQ":return Lr(n.length,r);case"Qo":return s.ordinalNumber(r,{unit:"quarter"});case"QQQ":return s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(r,{width:"wide",context:"formatting"})||s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=1&&n<=4}set(r,n,s){return r.setMonth((s-1)*3,1),r.setHours(0,0,0,0),r}}class qoe extends Vt{constructor(){super(...arguments);Ve(this,"priority",120);Ve(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"q":case"qq":return Lr(n.length,r);case"qo":return s.ordinalNumber(r,{unit:"quarter"});case"qqq":return s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(r,{width:"wide",context:"standalone"})||s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=1&&n<=4}set(r,n,s){return r.setMonth((s-1)*3,1),r.setHours(0,0,0,0),r}}class Koe extends Vt{constructor(){super(...arguments);Ve(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);Ve(this,"priority",110)}parse(r,n,s){const a=o=>o-1;switch(n){case"M":return Hr(Sr(zr.month,r),a);case"MM":return Hr(Lr(2,r),a);case"Mo":return Hr(s.ordinalNumber(r,{unit:"month"}),a);case"MMM":return s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(r,{width:"wide",context:"formatting"})||s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=11}set(r,n,s){return r.setMonth(s,1),r.setHours(0,0,0,0),r}}class Yoe extends Vt{constructor(){super(...arguments);Ve(this,"priority",110);Ve(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(r,n,s){const a=o=>o-1;switch(n){case"L":return Hr(Sr(zr.month,r),a);case"LL":return Hr(Lr(2,r),a);case"Lo":return Hr(s.ordinalNumber(r,{unit:"month"}),a);case"LLL":return s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(r,{width:"wide",context:"standalone"})||s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=11}set(r,n,s){return r.setMonth(s,1),r.setHours(0,0,0,0),r}}function Xoe(e,t,r){const n=ht(e),s=m2(n,r)-t;return n.setDate(n.getDate()-s*7),n}class Qoe extends Vt{constructor(){super(...arguments);Ve(this,"priority",100);Ve(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(r,n,s){switch(n){case"w":return Sr(zr.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return Lr(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,s,a){return vs(Xoe(r,s,a),a)}}function Joe(e,t){const r=ht(e),n=f2(r)-t;return r.setDate(r.getDate()-n*7),r}class Zoe extends Vt{constructor(){super(...arguments);Ve(this,"priority",100);Ve(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(r,n,s){switch(n){case"I":return Sr(zr.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return Lr(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,s){return to(Joe(r,s))}}const ele=[31,28,31,30,31,30,31,31,30,31,30,31],tle=[31,29,31,30,31,30,31,31,30,31,30,31];class rle extends Vt{constructor(){super(...arguments);Ve(this,"priority",90);Ve(this,"subPriority",1);Ve(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"d":return Sr(zr.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return Lr(n.length,r)}}validate(r,n){const s=r.getFullYear(),a=ZI(s),o=r.getMonth();return a?n>=1&&n<=tle[o]:n>=1&&n<=ele[o]}set(r,n,s){return r.setDate(s),r.setHours(0,0,0,0),r}}class nle extends Vt{constructor(){super(...arguments);Ve(this,"priority",90);Ve(this,"subpriority",1);Ve(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(r,n,s){switch(n){case"D":case"DD":return Sr(zr.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return Lr(n.length,r)}}validate(r,n){const s=r.getFullYear();return ZI(s)?n>=1&&n<=366:n>=1&&n<=365}set(r,n,s){return r.setMonth(0,s),r.setHours(0,0,0,0),r}}function x2(e,t,r){var f,h,m,g;const n=Mc(),s=(r==null?void 0:r.weekStartsOn)??((h=(f=r==null?void 0:r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??n.weekStartsOn??((g=(m=n.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??0,a=ht(e),o=a.getDay(),c=(t%7+7)%7,u=7-s,d=t<0||t>6?t-(o+u)%7:(c+u)%7-(o+u)%7;return kn(a,d)}class sle extends Vt{constructor(){super(...arguments);Ve(this,"priority",90);Ve(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"E":case"EE":case"EEE":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,s,a){return r=x2(r,s,a),r.setHours(0,0,0,0),r}}class ale extends Vt{constructor(){super(...arguments);Ve(this,"priority",90);Ve(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(r,n,s,a){const o=l=>{const c=Math.floor((l-1)/7)*7;return(l+a.weekStartsOn+6)%7+c};switch(n){case"e":case"ee":return Hr(Lr(n.length,r),o);case"eo":return Hr(s.ordinalNumber(r,{unit:"day"}),o);case"eee":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeeee":return s.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,s,a){return r=x2(r,s,a),r.setHours(0,0,0,0),r}}class ile extends Vt{constructor(){super(...arguments);Ve(this,"priority",90);Ve(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(r,n,s,a){const o=l=>{const c=Math.floor((l-1)/7)*7;return(l+a.weekStartsOn+6)%7+c};switch(n){case"c":case"cc":return Hr(Lr(n.length,r),o);case"co":return Hr(s.ordinalNumber(r,{unit:"day"}),o);case"ccc":return s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"ccccc":return s.day(r,{width:"narrow",context:"standalone"});case"cccccc":return s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(r,{width:"wide",context:"standalone"})||s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=6}set(r,n,s,a){return r=x2(r,s,a),r.setHours(0,0,0,0),r}}function ole(e,t){const r=ht(e),n=Ooe(r),s=t-n;return kn(r,s)}class lle extends Vt{constructor(){super(...arguments);Ve(this,"priority",90);Ve(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(r,n,s){const a=o=>o===0?7:o;switch(n){case"i":case"ii":return Lr(n.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return Hr(s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),a);case"iiiii":return Hr(s.day(r,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Hr(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Hr(s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),a)}}validate(r,n){return n>=1&&n<=7}set(r,n,s){return r=ole(r,s),r.setHours(0,0,0,0),r}}class cle extends Vt{constructor(){super(...arguments);Ve(this,"priority",80);Ve(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(r,n,s){switch(n){case"a":case"aa":case"aaa":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,s){return r.setHours(p2(s),0,0,0),r}}class ule extends Vt{constructor(){super(...arguments);Ve(this,"priority",80);Ve(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(r,n,s){switch(n){case"b":case"bb":case"bbb":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,s){return r.setHours(p2(s),0,0,0),r}}class dle extends Vt{constructor(){super(...arguments);Ve(this,"priority",80);Ve(this,"incompatibleTokens",["a","b","t","T"])}parse(r,n,s){switch(n){case"B":case"BB":case"BBB":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,s){return r.setHours(p2(s),0,0,0),r}}class fle extends Vt{constructor(){super(...arguments);Ve(this,"priority",70);Ve(this,"incompatibleTokens",["H","K","k","t","T"])}parse(r,n,s){switch(n){case"h":return Sr(zr.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return Lr(n.length,r)}}validate(r,n){return n>=1&&n<=12}set(r,n,s){const a=r.getHours()>=12;return a&&s<12?r.setHours(s+12,0,0,0):!a&&s===12?r.setHours(0,0,0,0):r.setHours(s,0,0,0),r}}class hle extends Vt{constructor(){super(...arguments);Ve(this,"priority",70);Ve(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(r,n,s){switch(n){case"H":return Sr(zr.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return Lr(n.length,r)}}validate(r,n){return n>=0&&n<=23}set(r,n,s){return r.setHours(s,0,0,0),r}}class mle extends Vt{constructor(){super(...arguments);Ve(this,"priority",70);Ve(this,"incompatibleTokens",["h","H","k","t","T"])}parse(r,n,s){switch(n){case"K":return Sr(zr.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return Lr(n.length,r)}}validate(r,n){return n>=0&&n<=11}set(r,n,s){return r.getHours()>=12&&s<12?r.setHours(s+12,0,0,0):r.setHours(s,0,0,0),r}}class ple extends Vt{constructor(){super(...arguments);Ve(this,"priority",70);Ve(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(r,n,s){switch(n){case"k":return Sr(zr.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return Lr(n.length,r)}}validate(r,n){return n>=1&&n<=24}set(r,n,s){const a=s<=24?s%24:s;return r.setHours(a,0,0,0),r}}class xle extends Vt{constructor(){super(...arguments);Ve(this,"priority",60);Ve(this,"incompatibleTokens",["t","T"])}parse(r,n,s){switch(n){case"m":return Sr(zr.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return Lr(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,s){return r.setMinutes(s,0,0),r}}class gle extends Vt{constructor(){super(...arguments);Ve(this,"priority",50);Ve(this,"incompatibleTokens",["t","T"])}parse(r,n,s){switch(n){case"s":return Sr(zr.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return Lr(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,s){return r.setSeconds(s,0),r}}class vle extends Vt{constructor(){super(...arguments);Ve(this,"priority",30);Ve(this,"incompatibleTokens",["t","T"])}parse(r,n){const s=a=>Math.trunc(a*Math.pow(10,-n.length+3));return Hr(Lr(n.length,r),s)}set(r,n,s){return r.setMilliseconds(s),r}}class yle extends Vt{constructor(){super(...arguments);Ve(this,"priority",10);Ve(this,"incompatibleTokens",["t","T","x"])}parse(r,n){switch(n){case"X":return di(ui.basicOptionalMinutes,r);case"XX":return di(ui.basic,r);case"XXXX":return di(ui.basicOptionalSeconds,r);case"XXXXX":return di(ui.extendedOptionalSeconds,r);case"XXX":default:return di(ui.extended,r)}}set(r,n,s){return n.timestampIsSet?r:sr(r,r.getTime()-md(r)-s)}}class wle extends Vt{constructor(){super(...arguments);Ve(this,"priority",10);Ve(this,"incompatibleTokens",["t","T","X"])}parse(r,n){switch(n){case"x":return di(ui.basicOptionalMinutes,r);case"xx":return di(ui.basic,r);case"xxxx":return di(ui.basicOptionalSeconds,r);case"xxxxx":return di(ui.extendedOptionalSeconds,r);case"xxx":default:return di(ui.extended,r)}}set(r,n,s){return n.timestampIsSet?r:sr(r,r.getTime()-md(r)-s)}}class ble extends Vt{constructor(){super(...arguments);Ve(this,"priority",40);Ve(this,"incompatibleTokens","*")}parse(r){return QI(r)}set(r,n,s){return[sr(r,s*1e3),{timestampIsSet:!0}]}}class _le extends Vt{constructor(){super(...arguments);Ve(this,"priority",20);Ve(this,"incompatibleTokens","*")}parse(r){return QI(r)}set(r,n,s){return[sr(r,s),{timestampIsSet:!0}]}}const Nle={G:new Uoe,y:new Woe,Y:new zoe,R:new Hoe,u:new Voe,Q:new Goe,q:new qoe,M:new Koe,L:new Yoe,w:new Qoe,I:new Zoe,d:new rle,D:new nle,E:new sle,e:new ale,c:new ile,i:new lle,a:new cle,b:new ule,B:new dle,h:new fle,H:new hle,K:new mle,k:new ple,m:new xle,s:new gle,S:new vle,X:new yle,x:new wle,t:new ble,T:new _le},Sle=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,kle=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,jle=/^'([^]*?)'?$/,Ele=/''/g,Cle=/\S/,Tle=/[a-zA-Z]/;function g2(e,t,r,n){var p,x,b,w;const s=Roe(),a=s.locale??d2,o=s.firstWeekContainsDate??((x=(p=s.locale)==null?void 0:p.options)==null?void 0:x.firstWeekContainsDate)??1,l=s.weekStartsOn??((w=(b=s.locale)==null?void 0:b.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?ht(r):sr(r,NaN);const c={firstWeekContainsDate:o,weekStartsOn:l,locale:a},u=[new $oe],d=t.match(kle).map(y=>{const _=y[0];if(_ in cw){const N=cw[_];return N(y,a.formatLong)}return y}).join("").match(Sle),f=[];for(let y of d){qI(y)&&uw(y,t,e),GI(y)&&uw(y,t,e);const _=y[0],N=Nle[_];if(N){const{incompatibleTokens:k}=N;if(Array.isArray(k)){const E=f.find(j=>k.includes(j.token)||j.token===_);
702if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${y}\` at the same time`)}else if(N.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${y}\` and any other token at the same time`);f.push({token:_,fullToken:y});const S=N.run(e,y,a.match,c);if(!S)return sr(r,NaN);u.push(S.setter),e=S.rest}else{if(_.match(Tle))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");if(y==="''"?y="'":_==="'"&&(y=Ale(y)),e.indexOf(y)===0)e=e.slice(y.length);else return sr(r,NaN)}}if(e.length>0&&Cle.test(e))return sr(r,NaN);const h=u.map(y=>y.priority).sort((y,_)=>_-y).filter((y,_,N)=>N.indexOf(y)===_).map(y=>u.filter(_=>_.priority===y).sort((_,N)=>N.subPriority-_.subPriority)).map(y=>y[0]);let m=ht(r);if(isNaN(m.getTime()))return sr(r,NaN);const g={};for(const y of h){if(!y.validate(m,c))return sr(r,NaN);const _=y.set(m,g,c);Array.isArray(_)?(m=_[0],Object.assign(g,_[1])):m=_}return sr(r,m)}function Ale(e){return e.match(jle)[1].replace(Ele,"'")}function Fh(e,t){const r=ht(e),n=ht(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function Ple(e,t){const r=ht(e),n=ht(t);return r.getFullYear()===n.getFullYear()}function Xv(e,t){return kn(e,-t)}function Qv(e,t){const r=ht(e),n=r.getFullYear(),s=r.getDate(),a=sr(e,0);a.setFullYear(n,t,15),a.setHours(0,0,0,0);const o=Poe(a);return r.setMonth(t,Math.min(s,o)),r}function Zj(e,t){const r=ht(e);return isNaN(+r)?sr(e,NaN):(r.setFullYear(t),r)}function v2(e,t){return ts(e,-t)}function Rle(e,t){return Oh(e,-t)}const Ole={lessThanXSeconds:{one:"פחות משנייה",two:"פחות משתי שניות",other:"פחות מ־{{count}} שניות"},xSeconds:{one:"שנייה",two:"שתי שניות",other:"{{count}} שניות"},halfAMinute:"חצי דקה",lessThanXMinutes:{one:"פחות מדקה",two:"פחות משתי דקות",other:"פחות מ־{{count}} דקות"},xMinutes:{one:"דקה",two:"שתי דקות",other:"{{count}} דקות"},aboutXHours:{one:"כשעה",two:"כשעתיים",other:"כ־{{count}} שעות"},xHours:{one:"שעה",two:"שעתיים",other:"{{count}} שעות"},xDays:{one:"יום",two:"יומיים",other:"{{count}} ימים"},aboutXWeeks:{one:"כשבוע",two:"כשבועיים",other:"כ־{{count}} שבועות"},xWeeks:{one:"שבוע",two:"שבועיים",other:"{{count}} שבועות"},aboutXMonths:{one:"כחודש",two:"כחודשיים",other:"כ־{{count}} חודשים"},xMonths:{one:"חודש",two:"חודשיים",other:"{{count}} חודשים"},aboutXYears:{one:"כשנה",two:"כשנתיים",other:"כ־{{count}} שנים"},xYears:{one:"שנה",two:"שנתיים",other:"{{count}} שנים"},overXYears:{one:"יותר משנה",two:"יותר משנתיים",other:"יותר מ־{{count}} שנים"},almostXYears:{one:"כמעט שנה",two:"כמעט שנתיים",other:"כמעט {{count}} שנים"}},Dle=(e,t,r)=>{if(e==="xDays"&&(r!=null&&r.addSuffix)&&t<=2)return r.comparison&&r.comparison>0?t===1?"מחר":"מחרתיים":t===1?"אתמול":"שלשום";let n;const s=Ole[e];return typeof s=="string"?n=s:t===1?n=s.one:t===2?n=s.two:n=s.other.replace("{{count}}",String(t)),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"בעוד "+n:"לפני "+n:n},Ile={full:"EEEE, d בMMMM y",long:"d בMMMM y",medium:"d בMMM y",short:"d.M.y"},Fle={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},Mle={full:"{{date}} 'בשעה' {{time}}",long:"{{date}} 'בשעה' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Lle={date:Iu({formats:Ile,defaultWidth:"full"}),time:Iu({formats:Fle,defaultWidth:"full"}),dateTime:Iu({formats:Mle,defaultWidth:"full"})},Ble={lastWeek:"eeee 'שעבר בשעה' p",yesterday:"'אתמול בשעה' p",today:"'היום בשעה' p",tomorrow:"'מחר בשעה' p",nextWeek:"eeee 'בשעה' p",other:"P"},$le=(e,t,r,n)=>Ble[e],Ule={narrow:["לפנה״ס","לספירה"],abbreviated:["לפנה״ס","לספירה"],wide:["לפני הספירה","לספירה"]},Wle={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["רבעון 1","רבעון 2","רבעון 3","רבעון 4"]},zle={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["ינו׳","פבר׳","מרץ","אפר׳","מאי","יוני","יולי","אוג׳","ספט׳","אוק׳","נוב׳","דצמ׳"],wide:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"]},Hle={narrow:["א׳","ב׳","ג׳","ד׳","ה׳","ו׳","ש׳"],short:["א׳","ב׳","ג׳","ד׳","ה׳","ו׳","ש׳"],abbreviated:["יום א׳","יום ב׳","יום ג׳","יום ד׳","יום ה׳","יום ו׳","שבת"],wide:["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","יום שבת"]},Vle={narrow:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בוקר",afternoon:"אחר הצהריים",evening:"ערב",night:"לילה"},abbreviated:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בוקר",afternoon:"אחר הצהריים",evening:"ערב",night:"לילה"},wide:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בוקר",afternoon:"אחר הצהריים",evening:"ערב",night:"לילה"}},Gle={narrow:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בבוקר",afternoon:"בצהריים",evening:"בערב",night:"בלילה"},abbreviated:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בבוקר",afternoon:"אחר הצהריים",evening:"בערב",night:"בלילה"},wide:{am:"לפנה״צ",pm:"אחה״צ",midnight:"חצות",noon:"צהריים",morning:"בבוקר",afternoon:"אחר הצהריים",evening:"בערב",night:"בלילה"}},qle=(e,t)=>
702{const r=Number(e);if(r<=0||r>10)return String(r);const n=String(t==null?void 0:t.unit),s=["year","hour","minute","second"].indexOf(n)>=0,a=["ראשון","שני","שלישי","רביעי","חמישי","שישי","שביעי","שמיני","תשיעי","עשירי"],o=["ראשונה","שנייה","שלישית","רביעית","חמישית","שישית","שביעית","שמינית","תשיעית","עשירית"],l=r-1;return s?o[l]:a[l]},Kle={ordinalNumber:qle,era:li({values:Ule,defaultWidth:"wide"}),quarter:li({values:Wle,defaultWidth:"wide",argumentCallback:e=>e-1}),month:li({values:zle,defaultWidth:"wide"}),day:li({values:Hle,defaultWidth:"wide"}),dayPeriod:li({values:Vle,defaultWidth:"wide",formattingValues:Gle,defaultFormattingWidth:"wide"})},Yle=/^(\d+|(ראשון|שני|שלישי|רביעי|חמישי|שישי|שביעי|שמיני|תשיעי|עשירי|ראשונה|שנייה|שלישית|רביעית|חמישית|שישית|שביעית|שמינית|תשיעית|עשירית))/i,Xle=/^(\d+|רא|שנ|של|רב|ח|שי|שב|שמ|ת|ע)/i,Qle={narrow:/^ל(ספירה|פנה״ס)/i,abbreviated:/^ל(ספירה|פנה״ס)/i,wide:/^ל(פני ה)?ספירה/i},Jle={any:[/^לפ/i,/^לס/i]},Zle={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^רבעון [1234]/i},ece={any:[/1/i,/2/i,/3/i,/4/i]},tce={narrow:/^\d+/i,abbreviated:/^(ינו|פבר|מרץ|אפר|מאי|יוני|יולי|אוג|ספט|אוק|נוב|דצמ)׳?/i,wide:/^(ינואר|פברואר|מרץ|אפריל|מאי|יוני|יולי|אוגוסט|ספטמבר|אוקטובר|נובמבר|דצמבר)/i},rce={narrow:[/^1$/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^7/i,/^8/i,/^9/i,/^10/i,/^11/i,/^12/i],any:[/^ינ/i,/^פ/i,/^מר/i,/^אפ/i,/^מא/i,/^יונ/i,/^יול/i,/^אוג/i,/^ס/i,/^אוק/i,/^נ/i,/^ד/i]},nce={narrow:/^[אבגדהוש]׳/i,short:/^[אבגדהוש]׳/i,abbreviated:/^(שבת|יום (א|ב|ג|ד|ה|ו)׳)/i,wide:/^יום (ראשון|שני|שלישי|רביעי|חמישי|שישי|שבת)/i},sce={abbreviated:[/א׳$/i,/ב׳$/i,/ג׳$/i,/ד׳$/i,/ה׳$/i,/ו׳$/i,/^ש/i],wide:[/ן$/i,/ני$/i,/לישי$/i,/עי$/i,/מישי$/i,/שישי$/i,/ת$/i],any:[/^א/i,/^ב/i,/^ג/i,/^ד/i,/^ה/i,/^ו/i,/^ש/i]},ace={any:/^(אחר ה|ב)?(חצות|צהריים|בוקר|ערב|לילה|אחה״צ|לפנה״צ)/i},ice={any:{am:/^לפ/i,pm:/^אחה/i,midnight:/^ח/i,noon:/^צ/i,morning:/בוקר/i,afternoon:/בצ|אחר/i,evening:/ערב/i,night:/לילה/i}},oce=["רא","שנ","של","רב","ח","שי","שב","שמ","ת","ע"],lce={ordinalNumber:HI({matchPattern:Yle,parsePattern:Xle,valueCallback:e=>{const t=parseInt(e,10);return isNaN(t)?oce.indexOf(e)+1:t}}),era:ci({matchPatterns:Qle,defaultMatchWidth:"wide",parsePatterns:Jle,defaultParseWidth:"any"}),quarter:ci({matchPatterns:Zle,defaultMatchWidth:"wide",parsePatterns:ece,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ci({matchPatterns:tce,defaultMatchWidth:"wide",parsePatterns:rce,defaultParseWidth:"any"}),day:ci({matchPatterns:nce,defaultMatchWidth:"wide",parsePatterns:sce,defaultParseWidth:"any"}),dayPeriod:ci({matchPatterns:ace,defaultMatchWidth:"any",parsePatterns:ice,defaultParseWidth:"any"})},Tn={code:"he",formatDistance:Dle,formatLong:Lle,formatRelative:$le,localize:Kle,match:lce,options:{weekStartsOn:0,firstWeekContainsDate:1}};var dt=function(){return dt=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},dt.apply(this,arguments)};function cce(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function e5(e,t,r){for(var n=0,s=t.length,a;n<s;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}function w0(e){return e.mode==="multiple"}function b0(e){return e.mode==="range"}function _g(e){return e.mode==="single"}var uce={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rd
702p-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function dce(e,t){return $t(e,"LLLL y",t)}function fce(e,t){return $t(e,"d",t)}function hce(e,t){return $t(e,"LLLL",t)}function mce(e){return"".concat(e)}function pce(e,t){return $t(e,"cccccc",t)}function xce(e,t){return $t(e,"yyyy",t)}var gce=Object.freeze({__proto__:null,formatCaption:dce,formatDay:fce,formatMonthCaption:hce,formatWeekNumber:mce,formatWeekdayName:pce,formatYearCaption:xce}),vce=function(e,t,r){return $t(e,"do MMMM (EEEE)",r)},yce=function(){return"Month: "},wce=function(){return"Go to next month"},bce=function(){return"Go to previous month"},_ce=function(e,t){return $t(e,"cccc",t)},Nce=function(e){return"Week n. ".concat(e)},Sce=function(){return"Year: "},kce=Object.freeze({__proto__:null,labelDay:vce,labelMonthDropdown:yce,labelNext:wce,labelPrevious:bce,labelWeekNumber:Nce,labelWeekday:_ce,labelYearDropdown:Sce});function jce(){var e="buttons",t=uce,r=d2,n={},s={},a=1,o={},l=new Date;return{captionLayout:e,classNames:t,formatters:gce,labels:kce,locale:r,modifiersClassNames:n,modifiers:s,numberOfMonths:a,styles:o,today:l,mode:"default"}}function Ece(e){var t=e.fromYear,r=e.toYear,n=e.fromMonth,s=e.toMonth,a=e.fromDate,o=e.toDate;return n?a=en(n):t&&(a=new Date(t,0,1)),s?o=y0(s):r&&(o=new Date(r,11,31)),{fromDate:a?hd(a):void 0,toDate:o?hd(o):void 0}}var t5=v.createContext(void 0);function Cce(e){var t,r=e.initialProps,n=jce(),s=Ece(r),a=s.fromDate,o=s.toDate,l=(t=r.captionLayout)!==null&&t!==void 0?t:n.captionLayout;l!=="buttons"&&(!a||!o)&&(l="buttons");var c;(_g(r)||w0(r)||b0(r))&&(c=r.onSelect);var u=dt(dt(dt({},n),r),{captionLayout:l,classNames:dt(dt({},n.classNames),r.classNames),components:dt({},r.components),formatters:dt(dt({},n.formatters),r.formatters),fromDate:a,labels:dt(dt({},n.labels),r.labels),mode:r.mode||n.mode,modifiers:dt(dt({},n.modifiers),r.modifiers),modifiersClassNames:dt(dt({},n.modifiersClassNames),r.modifiersClassNames),onSelect:c,styles:dt(dt({},n.styles),r.styles),toDate:o});return i.jsx(t5.Provider,{value:u,children:e.children})}function ur(){var e=v.useContext(t5);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function r5(e){var t=ur(),r=t.locale,n=t.classNames,s=t.styles,a=t.formatters.formatCaption;return i.jsx("div",{className:n.caption_label,style:s.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:a(e.displayMonth,{locale:r})})}function Tce(e){return i.jsx("svg",dt({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:i.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function n5(e){var t,r,n=e.onChange,s=e.value,a=e.children,o=e.caption,l=e.className,c=e.style,u=ur(),d=(r=(t=u.components)===null||t===void 0?void 0:t.IconDropdown)!==null&&r!==void 0?r:Tce;return i.jsxs("div",{className:l,style:c,children:[i.jsx("span",{className:u.classNames.vhidden,children:e["aria-label"]}),i.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:u.classNames.dropdown,style:u.styles.dropdown,value:s,onChange:n,children:a}),i.jsxs("div",{className:u.classNames.caption_label,style:u.styles.caption_label,"aria-hidden":"true",children:[o,i.jsx(d,{className:u.classNames.dropdown_icon,style:u.styles.dropdown_icon})]})]})}function Ace(e){var t,r=ur(),n=r.fromDate,s=r.toDate,a=r.styles,o=r.locale,l=r.formatters.formatMonthCaption,c=r.classNames,u=r.components,d=r.labels.labelMonthDropdown;if(!n)return i.jsx(i.Fragment,{});if(!s)return i.jsx(i.Fragment,{});var f=[];if(Ple(n,s))for(var h=en(n),m=n.getMonth();m<=s.getMonth();m++)f.push(Qv(h,m));else for(var h=en(new Date),m=0;m<=11;m++)f.push(Qv(h,m));var g=function(x){var b=Number(x.target.value),w=Qv(en(e.displayMonth),b);e.onChange(w)},p=(t=u==null?void 0:u.Dropdown)!==null&&t!==void 0?t:n5;return i.jsx(p,{name:"months","aria-label":d(),className:c.dropdown_month,style:a.dropdown_month,onChange:g,value:e.displayMonth.getMonth(),c
702aption:l(e.displayMonth,{locale:o}),children:f.map(function(x){return i.jsx("option",{value:x.getMonth(),children:l(x,{locale:o})},x.getMonth())})})}function Pce(e){var t,r=e.displayMonth,n=ur(),s=n.fromDate,a=n.toDate,o=n.locale,l=n.styles,c=n.classNames,u=n.components,d=n.formatters.formatYearCaption,f=n.labels.labelYearDropdown,h=[];if(!s)return i.jsx(i.Fragment,{});if(!a)return i.jsx(i.Fragment,{});for(var m=s.getFullYear(),g=a.getFullYear(),p=m;p<=g;p++)h.push(Zj(WI(new Date),p));var x=function(w){var y=Zj(en(r),Number(w.target.value));e.onChange(y)},b=(t=u==null?void 0:u.Dropdown)!==null&&t!==void 0?t:n5;return i.jsx(b,{name:"years","aria-label":f(),className:c.dropdown_year,style:l.dropdown_year,onChange:x,value:r.getFullYear(),caption:d(r,{locale:o}),children:h.map(function(w){return i.jsx("option",{value:w.getFullYear(),children:d(w,{locale:o})},w.getFullYear())})})}function Rce(e,t){var r=v.useState(e),n=r[0],s=r[1],a=t===void 0?n:t;return[a,s]}function Oce(e){var t=e.month,r=e.defaultMonth,n=e.today,s=t||r||n||new Date,a=e.toDate,o=e.fromDate,l=e.numberOfMonths,c=l===void 0?1:l;if(a&&Dh(a,s)<0){var u=-1*(c-1);s=ts(a,u)}return o&&Dh(s,o)<0&&(s=o),en(s)}function Dce(){var e=ur(),t=Oce(e),r=Rce(t,e.month),n=r[0],s=r[1],a=function(o){var l;if(!e.disableNavigation){var c=en(o);s(c),(l=e.onMonthChange)===null||l===void 0||l.call(e,c)}};return[n,a]}function Ice(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,s=en(e),a=en(ts(s,n)),o=Dh(a,s),l=[],c=0;c<o;c++){var u=ts(s,c);l.push(u)}return r&&(l=l.reverse()),l}function Fce(e,t){if(!t.disableNavigation){var r=t.toDate,n=t.pagedNavigation,s=t.numberOfMonths,a=s===void 0?1:s,o=n?a:1,l=en(e);if(!r)return ts(l,o);var c=Dh(r,e);if(!(c<a))return ts(l,o)}}function Mce(e,t){if(!t.disableNavigation){var r=t.fromDate,n=t.pagedNavigation,s=t.numberOfMonths,a=s===void 0?1:s,o=n?a:1,l=en(e);if(!r)return ts(l,-o);var c=Dh(l,r);if(!(c<=0))return ts(l,-o)}}var s5=v.createContext(void 0);function Lce(e){var t=ur(),r=Dce(),n=r[0],s=r[1],a=Ice(n,t),o=Fce(n,t),l=Mce(n,t),c=function(f){return a.some(function(h){return Fh(f,h)})},u=function(f,h){c(f)||(h&&YI(f,h)?s(ts(f,1+t.numberOfMonths*-1)):s(f))},d={currentMonth:n,displayMonths:a,goToMonth:s,goToDate:u,previousMonth:l,nextMonth:o,isDateDisplayed:c};return i.jsx(s5.Provider,{value:d,children:e.children})}function _0(){var e=v.useContext(s5);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function eE(e){var t,r=ur(),n=r.classNames,s=r.styles,a=r.components,o=_0().goToMonth,l=function(d){o(ts(d,e.displayIndex?-e.dis
702playIndex:0))},c=(t=a==null?void 0:a.CaptionLabel)!==null&&t!==void 0?t:r5,u=i.jsx(c,{id:e.id,displayMonth:e.displayMonth});return i.jsxs("div",{className:n.caption_dropdowns,style:s.caption_dropdowns,children:[i.jsx("div",{className:n.vhidden,children:u}),i.jsx(Ace,{onChange:l,displayMonth:e.displayMonth}),i.jsx(Pce,{onChange:l,displayMonth:e.displayMonth})]})}function Bce(e){return i.jsx("svg",dt({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:i.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function $ce(e){return i.jsx("svg",dt({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:i.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Zp=v.forwardRef(function(e,t){var r=ur(),n=r.classNames,s=r.styles,a=[n.button_reset,n.button];e.className&&a.push(e.className);var o=a.join(" "),l=dt(dt({},s.button_reset),s.button);return e.style&&Object.assign(l,e.style),i.jsx("button",dt({},e,{ref:t,type:"button",className:o,style:l}))});function Uce(e){var t,r,n=ur(),s=n.dir,a=n.locale,o=n.classNames,l=n.styles,c=n.labels,u=c.labelPrevious,d=c.labelNext,f=n.components;if(!e.nextMonth&&!e.previousMonth)return i.jsx(i.Fragment,{});var h=u(e.previousMonth,{locale:a}),m=[o.nav_button,o.nav_button_previous].join(" "),g=d(e.nextMonth,{locale:a}),p=[o.nav_button,o.nav_button_next].join(" "),x=(t=f==null?void 0:f.IconRight)!==null&&t!==void 0?t:$ce,b=(r=f==null?void 0:f.IconLeft)!==null&&r!==void 0?r:Bce;return i.jsxs("div",{className:o.nav,style:l.nav,children:[!e.hidePrevious&&i.jsx(Zp,{name:"previous-month","aria-label":h,className:m,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:s==="rtl"?i.jsx(x,{className:o.nav_icon,style:l.nav_icon}):i.jsx(b,{className:o.nav_icon,style:l.nav_icon})}),!e.hideNext&&i.jsx(Zp,{name:"next-month","aria-label":g,className:p,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:s==="rtl"?i.jsx(b,{className:o.nav_icon,style:l.nav_icon}):i.jsx(x,{className:o.nav_icon,style:l.nav_icon})})]})}function tE(e){var t=ur().numberOfMonths,r=_0(),n=r.previousMonth,s=r.nextMonth,a=r.goToMonth,o=r.displayMonths,l=o.findIndex(function(g){return Fh(e.displayMonth,g)}),c=l===0,u=l===o.length-1,d=t>1&&(c||!u),f=t>1&&(u||!c),h=function(){n&&a(n)},m=function(){s&&a(s)};return i.jsx(Uce,{displayMonth:e.displayMonth,hideNext:d,hidePrevious:f,nextMonth:s,previousMonth:n,onPreviousClick:h,onNextClick:m})}function Wce(e){var t,r=ur(),n=r.classNames,s=r.disableNavigation,a=r.styles,o=r.captionLayout,l=r.components,c=(t=l==null?void 0:l.CaptionLabel)!==null&&t!==void 0?t:r5,u;return s?u=i.jsx(c,{id:e.id,displayMonth:e.displayMonth}):o==="dropdown"?u=i.jsx(eE,{displayMonth:e.displayMonth,id:e.id}):o==="dropdown-buttons"?u=i.jsxs(i.Fragment,{children:[i.jsx(eE,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),i.jsx(tE,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):u=i.jsxs(i.Fragment,{children:[i.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),i.jsx(tE,{displayMonth:e.displayMonth,id:e.id})]}),i.jsx("div",{className:n.caption,style:a.caption,children:u})}
702function zce(e){var t=ur(),r=t.footer,n=t.styles,s=t.classNames.tfoot;return r?i.jsx("tfoot",{className:s,style:n.tfoot,children:i.jsx("tr",{children:i.jsx("td",{colSpan:8,children:r})})}):i.jsx(i.Fragment,{})}function Hce(e,t,r){for(var n=r?to(new Date):vs(new Date,{locale:e,weekStartsOn:t}),s=[],a=0;a<7;a++){var o=kn(n,a);s.push(o)}return s}function Vce(){var e=ur(),t=e.classNames,r=e.styles,n=e.showWeekNumber,s=e.locale,a=e.weekStartsOn,o=e.ISOWeek,l=e.formatters.formatWeekdayName,c=e.labels.labelWeekday,u=Hce(s,a,o);return i.jsxs("tr",{style:r.head_row,className:t.head_row,children:[n&&i.jsx("td",{style:r.head_cell,className:t.head_cell}),u.map(function(d,f){return i.jsx("th",{scope:"col",className:t.head_cell,style:r.head_cell,"aria-label":c(d,{locale:s}),children:l(d,{locale:s})},f)})]})}function Gce(){var e,t=ur(),r=t.classNames,n=t.styles,s=t.components,a=(e=s==null?void 0:s.HeadRow)!==null&&e!==void 0?e:Vce;return i.jsx("thead",{style:n.head,className:r.head,children:i.jsx(a,{})})}function qce(e){var t=ur(),r=t.locale,n=t.formatters.formatDay;return i.jsx(i.Fragment,{children:n(e.date,{locale:r})})}var y2=v.createContext(void 0);function Kce(e){if(!w0(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return i.jsx(y2.Provider,{value:t,children:e.children})}return i.jsx(Yce,{initialProps:e.initialProps,children:e.children})}function Yce(e){var t=e.initialProps,r=e.children,n=t.selected,s=t.min,a=t.max,o=function(u,d,f){var h,m;(h=t.onDayClick)===null||h===void 0||h.call(t,u,d,f);var g=!!(d.selected&&s&&(n==null?void 0:n.length)===s);if(!g){var p=!!(!d.selected&&a&&(n==null?void 0:n.length)===a);if(!p){var x=n?e5([],n):[];if(d.selected){var b=x.findIndex(function(w){return Wr(u,w)});x.splice(b,1)}else x.push(u);(m=t.onSelect)===null||m===void 0||m.call(t,x,u,d,f)}}},l={disabled:[]};n&&l.disabled.push(function(u){var d=a&&n.length>a-1,f=n.some(function(h){return Wr(h,u)});return!!(d&&!f)});var c={selected:n,onDayClick:o,modifiers:l};return i.jsx(y2.Provider,{value:c,children:r})}function w2(){var e=v.useContext(y2);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function Xce(e,t){var r=t||{},n=r.from,s=r.to;return n&&s?Wr(s,e)&&Wr(n,e)?void 0:Wr(s,e)?{from:s,to:void 0}:Wr(n,e)?void 0:fw(n,e)?{from:e,to:s}:{from:n,to:e}:s?fw(e,s)?{from:s,to:e}:{from:e,to:s}:n?YI(e,n)?{from:e,to:n}:{from:n,to:e}:{from:e,to:void 0}}var b2=v.createContext(void 0);function Qce(e){if(!b0(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return i.jsx(b2.Provider,{value:t,children:e.children})}return i.jsx(Jce,{initialProps:e.initialProps,children:e.children})}function Jce(e){var t=e.initialProps,r=e.children,n=t.selected,s=n||{},a=s.from,o=s.to,l=t.min,c=t.max,u=function(m,g,p){var x,b;(x=t.onDayClick)===null||x===void 0||x.call(t,m,g,p);var w=Xce(m,n);(b=t.onSelect)===null||b===void 0||b.call(t,w,m,g,p)},d={range_start:[],range_end:[],range_middle:[],disabled:[]};if(a?(d.range_start=[a],o?(d.range_end=[o],Wr(a,o)||(d.range_middle=[{after:a,before:o}])):d.range_end=[a]):o&&(d.range_start=[o],d.range_end=[o]),l&&(a&&!o&&d.disabled.push({after:Xv(a,l-1),before:kn(a,l-1)}),a&&o&&d.disabled.push({after:a,before:kn(a,l-1)}),!a&&o&&d.disabled.push({after:Xv(o,l-1),before:kn(o,l-1)})),c){if(a&&!o&&(d.disabled.push({before:kn(a,-c+1)}),d.disabled.push({after:kn(a,c-1)})),a&&o){var f=mi(o,a)+1,h=c-f;d.disabled.push({before:Xv(a,h)}),d.disabled.push({after:kn(o,h)})}!a&&o&&(d.disabled.push({before:kn(o,-c+1)}),d.disabled.push({after:kn(o,c-1)}))}return i.jsx(b2.Provider,{value:{selected:n,onDayClick:u,modifiers:d},children:r})}function _2(){var e=v.useContext(b2);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Wm(e){return Array.isArray(e)?e5([],e):e!==void 0?[e]:[]}function Zce(e){var t={};return Object.entries(e).forEach(function(r){var n=r[0],s=r[1];t[n]=Wm(s)}),t}var qa;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(qa||(qa={}));var eue=qa.Selected,Ti=qa.Disabled,tue=qa.Hidden,rue=qa.Today,Jv=qa.RangeEnd,Zv=qa.RangeMiddle,e1=qa.RangeStart,nue=qa.Outside;function sue(e,t,r){var n,s=(n={},n[eue]=Wm(e.selected),n[Ti]=Wm(e.disabled),n[tue]=Wm(e.hidden),n[rue]=[e.today],n[Jv]=[],n[Zv]=[],n[e1]=[],n[nue]=[],n);return e.fromDate&&s[Ti].push({before:e.fromDate}),e.toDate&&s[Ti].push({after:e.toDate}),w0(e)?s[Ti]=s[Ti].concat(t.modifiers[Ti]):b0(e)&&(s[Ti]=s[Ti].concat(r.modifiers[Ti]),s[e1]=r.modifiers[e1],s[Zv]=r.modifiers[Zv],s[Jv]=r.modifiers[Jv]),s}
702var a5=v.createContext(void 0);function aue(e){var t=ur(),r=w2(),n=_2(),s=sue(t,r,n),a=Zce(t.modifiers),o=dt(dt({},s),a);return i.jsx(a5.Provider,{value:o,children:e.children})}function i5(){var e=v.useContext(a5);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function iue(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function oue(e){return!!(e&&typeof e=="object"&&"from"in e)}function lue(e){return!!(e&&typeof e=="object"&&"after"in e)}function cue(e){return!!(e&&typeof e=="object"&&"before"in e)}function uue(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function due(e,t){var r,n=t.from,s=t.to;if(n&&s){var a=mi(s,n)<0;a&&(r=[s,n],n=r[0],s=r[1]);var o=mi(e,n)>=0&&mi(s,e)>=0;return o}return s?Wr(s,e):n?Wr(n,e):!1}function fue(e){return c2(e)}function hue(e){return Array.isArray(e)&&e.every(c2)}function mue(e,t){return t.some(function(r){if(typeof r=="boolean")return r;if(fue(r))return Wr(e,r);if(hue(r))return r.includes(e);if(oue(r))return due(e,r);if(uue(r))return r.dayOfWeek.includes(e.getDay());if(iue(r)){var n=mi(r.before,e),s=mi(r.after,e),a=n>0,o=s<0,l=fw(r.before,r.after);return l?o&&a:a||o}return lue(r)?mi(e,r.after)>0:cue(r)?mi(r.before,e)>0:typeof r=="function"?r(e):!1})}function N2(e,t,r){var n=Object.keys(t).reduce(function(a,o){var l=t[o];return mue(e,l)&&a.push(o),a},[]),s={};return n.forEach(function(a){return s[a]=!0}),r&&!Fh(e,r)&&(s.outside=!0),s}function pue(e,t){for(var r=en(e[0]),n=y0(e[e.length-1]),s,a,o=r;o<=n;){var l=N2(o,t),c=!l.disabled&&!l.hidden;if(!c){o=kn(o,1);continue}if(l.selected)return o;l.today&&!a&&(a=o),s||(s=o),o=kn(o,1)}return a||s}var xue=365;function o5(e,t){var r=t.moveBy,n=t.direction,s=t.context,a=t.modifiers,o=t.retry,l=o===void 0?{count:0,lastFocused:e}:o,c=s.weekStartsOn,u=s.fromDate,d=s.toDate,f=s.locale,h={day:kn,week:Oh,month:ts,year:Mie,startOfWeek:function(x){return s.ISOWeek?to(x):vs(x,{locale:f,weekStartsOn:c})},endOfWeek:function(x){return s.ISOWeek?zI(x):Ih(x,{locale:f,weekStartsOn:c})}},m=h[r](e,n==="after"?1:-1);n==="before"&&u?m=Lie([u,m]):n==="after"&&d&&(m=Bie([d,m]));var g=!0;if(a){var p=N2(m,a);g=!p.disabled&&!p.hidden}return g?m:l.count>xue?l.lastFocused:o5(m,{moveBy:r,direction:n,context:s,modifiers:a,retry:dt(dt({},l),{count:l.count+1})})}var l5=v.createContext(void 0);function gue(e){var t=_0(),r=i5(),n=v.useState(),s=n[0],a=n[1],o=v.useState(),l=o[0],c=o[1],u=pue(t.displayMonths,r),d=s??(l&&t.isDateDisplayed(l))?l:u,f=function(){c(s),a(void 0)},h=function(x){a(x)},m=ur(),g=function(x,b){if(s){var w=o5(s,{moveBy:x,direction:b,context:m,modifiers:r});Wr(s,w)||(t.goToDate(w,s),h(w))}},p={focusedDay:s,focusTarget:d,blur:f,focus:h,focusDayAfter:function(){return g("day","after")},focusDayBefore:function(){return g("day","before")},focusWeekAfter:function(){return g("week","after")},focusWeekBefore:function(){return g("week","before")},focusMonthBefore:function(){return g("month","before")},focusMonthAfter:function(){return g("month","after")},focusYearBefore:function(){return g("year","before")},focusYearAfter:function(){return g("year","after")},focusStartOfWeek:function(){return g("startOfWeek","before")},focusEndOfWeek:function(){return g("endOfWeek","after")}};return i.jsx(l5.Provider,{value:p,children:e.children})}function S2(){var e=v.useContext(l5);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function vue(e,t){var r=i5(),n=N2(e,r,t);return n}var k2=v.createContext(void 0);function yue(e){if(!_g(e.initialProps)){var t={selected:void 0};return i.jsx(k2.Provider,{value:t,children:e.children})}return i.jsx(wue,{initialProps:e.initialProps,children:e.children})}function wue(e){var t=e.initialProps,r=e.children,n=function(a,o,l){var c,u,d;if((c=t.onDayClick)===null||c===void 0||c.call(t,a,o,l),o.selected&&!t.required){(u=t.onSelect)===null||u===void 0||u.call(t,void 0,a,o,l);return}(d=t.onSelect)===null||d===void 0||d.call(t,a,a,o,l)},s={selected:t.selected,onDayClick:n};return i.jsx(k2.Provider,{value:s,children:r})}function c5(){var e=v.useContext(k2);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function bue(e,t){var r=ur(),n=c5(),s=w2(),a=_2(),o=S2(),l=o.focusDayAfter,c=o.focusDayBefore,u=o.focusWeekAfter,d=o.focusWeekBefore,f=o.blur,h=o.focus,m=o.focusMonthBefore,g=o.focusMonthAfter,p=o.focusYearBefore,x=o.focusYearAfter,b=o.focusStartOfWeek,w=o.focusEndOfWeek,y=function(V){var F,C,X,se;
702_g(r)?(F=n.onDayClick)===null||F===void 0||F.call(n,e,t,V):w0(r)?(C=s.onDayClick)===null||C===void 0||C.call(s,e,t,V):b0(r)?(X=a.onDayClick)===null||X===void 0||X.call(a,e,t,V):(se=r.onDayClick)===null||se===void 0||se.call(r,e,t,V)},_=function(V){var F;h(e),(F=r.onDayFocus)===null||F===void 0||F.call(r,e,t,V)},N=function(V){var F;f(),(F=r.onDayBlur)===null||F===void 0||F.call(r,e,t,V)},k=function(V){var F;(F=r.onDayMouseEnter)===null||F===void 0||F.call(r,e,t,V)},S=function(V){var F;(F=r.onDayMouseLeave)===null||F===void 0||F.call(r,e,t,V)},E=function(V){var F;(F=r.onDayPointerEnter)===null||F===void 0||F.call(r,e,t,V)},j=function(V){var F;(F=r.onDayPointerLeave)===null||F===void 0||F.call(r,e,t,V)},T=function(V){var F;(F=r.onDayTouchCancel)===null||F===void 0||F.call(r,e,t,V)},R=function(V){var F;(F=r.onDayTouchEnd)===null||F===void 0||F.call(r,e,t,V)},P=function(V){var F;(F=r.onDayTouchMove)===null||F===void 0||F.call(r,e,t,V)},D=function(V){var F;(F=r.onDayTouchStart)===null||F===void 0||F.call(r,e,t,V)},U=function(V){var F;(F=r.onDayKeyUp)===null||F===void 0||F.call(r,e,t,V)},Q=function(V){var F;switch(V.key){case"ArrowLeft":V.preventDefault(),V.stopPropagation(),r.dir==="rtl"?l():c();break;case"ArrowRight":V.preventDefault(),V.stopPropagation(),r.dir==="rtl"?c():l();break;case"ArrowDown":V.preventDefault(),V.stopPropagation(),u();break;case"ArrowUp":V.preventDefault(),V.stopPropagation(),d();break;case"PageUp":V.preventDefault(),V.stopPropagation(),V.shiftKey?p():m();break;case"PageDown":V.preventDefault(),V.stopPropagation(),V.shiftKey?x():g();break;case"Home":V.preventDefault(),V.stopPropagation(),b();break;case"End":V.preventDefault(),V.stopPropagation(),w();break}(F=r.onDayKeyDown)===null||F===void 0||F.call(r,e,t,V)},Y={onClick:y,onFocus:_,onBlur:N,onKeyDown:Q,onKeyUp:U,onMouseEnter:k,onMouseLeave:S,onPointerEnter:E,onPointerLeave:j,onTouchCancel:T,onTouchEnd:R,onTouchMove:P,onTouchStart:D};return Y}function _ue(){var e=ur(),t=c5(),r=w2(),n=_2(),s=_g(e)?t.selected:w0(e)?r.selected:b0(e)?n.selected:void 0;return s}function Nue(e){return Object.values(qa).includes(e)}function Sue(e,t){var r=[e.classNames.day];return Object.keys(t).forEach(function(n){var s=e.modifiersClassNames[n];if(s)r.push(s);else if(Nue(n)){var a=e.classNames["day_".concat(n)];a&&r.push(a)}}),r}function kue(e,t){var r=dt({},e.styles.day);return Object.keys(t).forEach(function(n){var s;r=dt(dt({},r),(s=e.modifiersStyles)===null||s===void 0?void 0:s[n])}),r}function jue(e,t,r){var n,s,a,o=ur(),l=S2(),c=vue(e,t),u=bue(e,c),d=_ue(),f=!!(o.onDayCl
702ick||o.mode!=="default");v.useEffect(function(){var k;c.outside||l.focusedDay&&f&&Wr(l.focusedDay,e)&&((k=r.current)===null||k===void 0||k.focus())},[l.focusedDay,e,r,f,c.outside]);var h=Sue(o,c).join(" "),m=kue(o,c),g=!!(c.outside&&!o.showOutsideDays||c.hidden),p=(a=(s=o.components)===null||s===void 0?void 0:s.DayContent)!==null&&a!==void 0?a:qce,x=i.jsx(p,{date:e,displayMonth:t,activeModifiers:c}),b={style:m,className:h,children:x,role:"gridcell"},w=l.focusTarget&&Wr(l.focusTarget,e)&&!c.outside,y=l.focusedDay&&Wr(l.focusedDay,e),_=dt(dt(dt({},b),(n={disabled:c.disabled,role:"gridcell"},n["aria-selected"]=c.selected,n.tabIndex=y||w?0:-1,n)),u),N={isButton:f,isHidden:g,activeModifiers:c,selectedDays:d,buttonProps:_,divProps:b};return N}function Eue(e){var t=v.useRef(null),r=jue(e.date,e.displayMonth,t);return r.isHidden?i.jsx("div",{role:"gridcell"}):r.isButton?i.jsx(Zp,dt({name:"day",ref:t},r.buttonProps)):i.jsx("div",dt({},r.divProps))}function Cue(e){var t=e.number,r=e.dates,n=ur(),s=n.onWeekNumberClick,a=n.styles,o=n.classNames,l=n.locale,c=n.labels.labelWeekNumber,u=n.formatters.formatWeekNumber,d=u(Number(t),{locale:l});if(!s)return i.jsx("span",{className:o.weeknumber,style:a.weeknumber,children:d});var f=c(Number(t),{locale:l}),h=function(m){s(t,r,m)};return i.jsx(Zp,{name:"week-number","aria-label":f,className:o.weeknumber,style:a.weeknumber,onClick:h,children:d})}function Tue(e){var t,r,n=ur(),s=n.styles,a=n.classNames,o=n.showWeekNumber,l=n.components,c=(t=l==null?void 0:l.Day)!==null&&t!==void 0?t:Eue,u=(r=l==null?void 0:l.WeekNumber)!==null&&r!==void 0?r:Cue,d;return o&&(d=i.jsx("td",{className:a.cell,style:s.cell,children:i.jsx(u,{number:e.weekNumber,dates:e.dates})})),i.jsxs("tr",{className:a.row,style:s.row,children:[d,e.dates.map(function(f){return i.jsx("td",{className:a.cell,style:s.cell,role:"presentation",children:i.jsx(c,{displayMonth:e.displayMonth,date:f})},Doe(f))})]})}function rE(e,t,r){for(var n=r!=null&&r.ISOWeek?zI(t):Ih(t,r),s=r!=null&&r.ISOWeek?to(e):vs(e,r),a=mi(n,s),o=[],l=0;l<=a;l++)o.push(kn(s,l));var c=o.reduce(function(u,d){var f=r!=null&&r.ISOWeek?f2(d):m2(d,r),h=u.find(function(m){return m.weekNumber===f});return h?(h.dates.push(d),u):(u.push({weekNumber:f,dates:[d]}),u)},[]);return c}function Aue(e,t){var r=rE(en(e),y0(e),t);if(t!=null&&t.useFixedWeeks){var n=Foe(e,t);if(n<6){var s=r[r.length-1],a=s.dates[s.dates.length-1],o=Oh(a,6-n),l=rE(Oh(a,1),o,t);r.push.apply(r,l)}}return r}function Pue(e){var t,r,n,s=ur(),a=s.locale,o=s.classNames,l=s.styles,c=s.hideHead,u=s.fixedWeeks,d=s.components,f=s.weekStartsOn,h=s.firstWeekContainsDate,m=s.ISOWeek,g=Aue(e.displayMonth,{useFixedWeeks:!!u,ISOWeek:m,locale:a,weekStartsOn:f,firstWeekContainsDate:h}),p=(t=d==null?void 0:d.Head)!==null&&t!==void 0?t:Gce,x=(r=d==null?void 0:d.Row)!==null&&r!==void 0?r:Tue,b=(n=d==null?void 0:d.Footer)!==null&&n!==void 0?n:zce;return i.jsxs("table",{id:e.id,className:o.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!c&&i.jsx(p,{}),i.jsx("tbody",{className:o.tbody,style:l.tbody,children:g.map(function(w){return i.jsx(x,{displayMonth:e.displayMonth,dates:w.dates,weekNumber:w.weekNumber},w.weekNumber)})}),i.jsx(b,{displayMonth:e.displayMonth})]})}function Rue(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Oue=Rue()?v.useLayoutEffect:v.useEffect,t1=!1,Due=0;function nE(){return"react-day-picker-".concat(++Due)}function Iue(e){var t,r=e??(t1?nE():null),n=v.useState(r),s=n[0],a=n[1];return Oue(function(){s===null&&a(nE())},[]),v.useEffect(function(){t1===!1&&(t1=!0)},[]),(t=e??s)!==null&&t!==void 0?t:void 0}function Fue(e){var t,r,n=ur(),s=n.dir,a=n.classNames,o=n.styles,l=n.components,c=_0().displayMonths,u=Iue(n.id?"".concat(n.id,"-").concat(e.displayIndex):void 0),d=n.id?"".concat(n.id,"-grid-").concat(e.displayIndex):void 0,f=[a.month],h=o.month,m=e.displayIndex===0,g=e.displayIndex===c.length-1,p=!m&&!g;s==="rtl"&&(t=[m,g],g=t[0],m=t[1]),m&&(f.push(a.caption_start),h=dt(dt({},h),o.caption_start)),g&&(f.push(a.caption_end),h=dt(dt({}
702,h),o.caption_end)),p&&(f.push(a.caption_between),h=dt(dt({},h),o.caption_between));var x=(r=l==null?void 0:l.Caption)!==null&&r!==void 0?r:Wce;return i.jsxs("div",{className:f.join(" "),style:h,children:[i.jsx(x,{id:u,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),i.jsx(Pue,{id:d,"aria-labelledby":u,displayMonth:e.displayMonth})]},e.displayIndex)}function Mue(e){var t=ur(),r=t.classNames,n=t.styles;return i.jsx("div",{className:r.months,style:n.months,children:e.children})}function Lue(e){var t,r,n=e.initialProps,s=ur(),a=S2(),o=_0(),l=v.useState(!1),c=l[0],u=l[1];v.useEffect(function(){s.initialFocus&&a.focusTarget&&(c||(a.focus(a.focusTarget),u(!0)))},[s.initialFocus,c,a.focus,a.focusTarget,a]);var d=[s.classNames.root,s.className];s.numberOfMonths>1&&d.push(s.classNames.multiple_months),s.showWeekNumber&&d.push(s.classNames.with_weeknumber);var f=dt(dt({},s.styles.root),s.style),h=Object.keys(n).filter(function(g){return g.startsWith("data-")}).reduce(function(g,p){var x;return dt(dt({},g),(x={},x[p]=n[p],x))},{}),m=(r=(t=n.components)===null||t===void 0?void 0:t.Months)!==null&&r!==void 0?r:Mue;return i.jsx("div",dt({className:d.join(" "),style:f,dir:s.dir,id:s.id,nonce:n.nonce,title:n.title,lang:n.lang},h,{children:i.jsx(m,{children:o.displayMonths.map(function(g,p){return i.jsx(Fue,{displayIndex:p,displayMonth:g},p)})})}))}function Bue(e){var t=e.children,r=cce(e,["children"]);return i.jsx(Cce,{initialProps:r,children:i.jsx(Lce,{children:i.jsx(yue,{initialProps:r,children:i.jsx(Kce,{initialProps:r,children:i.jsx(Qce,{initialProps:r,children:i.jsx(aue,{children:i.jsx(gue,{children:t})})})})})})})}function $ue(e){return i.jsx(Bue,dt({},e,{children:i.jsx(Lue,{initialProps:e})}))}function Ng({className:e,classNames:t,showOutsideDays:r=!0,...n}){return i.jsx($ue,{showOutsideDays:r,className:xe("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:xe(mh({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:xe(mh({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 opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",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:({...s})=>i.jsx(Xi,{className:"h-4 w-4"}),IconRight:({...s})=>i.jsx(yi,{className:"h-4 w-4"})},...n})}Ng.displayName="Calendar";function Uue({onAddCredit:e}){const{findStudentByIdNumber:t}=Hx(),{entitlementTypes:r}=u3(),[n,s]=v.useState(!1),[a,o]=v.useState(""),[l,c]=v.useState(null),[u,d]=v.useState(""),[f,h]=v.useState(""),[m,g]=v.useState(void 0),[p,x]=v.useState(""),[b,w]=v.useState("none"),[y,_]=v.useState(!1),N=b!=="none"?r.find(P=>P.id===b):null,k=(N==null?void 0:N.category)==="online_view",S=l?r.filter(P=>P.courseId?l.courses.includes(P.courseId)||l.courses.includes(P.courseName||""):!0):[],E=()=>{if(!a.trim()){K.error("נא להזין תעודת זהות");return}const P=t(a.trim());P?(c({id:P.id,name:P.name,courses:P.courses||[]}),w("none"),K.success(`נמצא תלמיד: ${P.name}`)):(c(null),K.error("לא נמצא תלמיד עם תעודת זהות זו"))},j=P=>{if(w(P),P!=="none"){const D=r.find(U=>U.id===P);(D==null?void 0:D.category)==="online_view"&&(D!=null&&D.lessonCount)?(h(D.lessonCount.toString()),d("")):(d(""),h(""))}else d(""),h("")},T=async P=>{if(P.preventDefault(),!l){K.error("נא לבחור תלמיד");return}if(!N){K.error("נא לבחור זכאות");return}if(!m){K.error("נא לבחור תאריך תוקף");return}if(k){const D=parseInt(f);if(!f||isNaN(D)||D<=0){K.error("נא להזין מספר שיעורים תקי×
702Ÿ");return}}else{const D=parseFloat(u);if(!u||isNaN(D)||D<=0){K.error("נא להזין סכום תקין");return}}_(!0);try{k?(e({studentId:l.id,studentName:l.name,amount:0,lessonCount:parseInt(f),category:"online_view",expirationDate:m,entitlementTypeId:N.id,entitlementTypeName:N.name}),K.success(`הוסף ${f} שיעורי צפייה ל${l.name}`)):(e({studentId:l.id,studentName:l.name,amount:parseFloat(u),category:"credit",expirationDate:m,entitlementTypeId:N.id,entitlementTypeName:N.name}),K.success(`הוסף קרדיט של ₪${u} ל${l.name}`)),o(""),c(null),d(""),h(""),g(void 0),x(""),w("none"),s(!1)}catch{K.error("שגיאה בהוספת קרדיט")}finally{_(!1)}},R=P=>{s(P),P||(o(""),c(null),d(""),h(""),g(void 0),x(""),w("none"))};return i.jsxs(Ht,{open:n,onOpenChange:R,children:[i.jsx(va,{asChild:!0,children:i.jsxs(ee,{variant:"rose",className:"gap-2",children:[i.jsx(Zu,{className:"h-4 w-4"}),"הוסף קרדיט ידני"]})}),i.jsxs(Ut,{className:"sm:max-w-md",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"הוספת קרדיט ידני"})}),i.jsxs("form",{onSubmit:T,className:"space-y-4 mt-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:'חיפוש תלמיד לפי ת"ז'}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Oe,{placeholder:"הזן תעודת זהות...",value:a,onChange:P=>o(P.target.value),dir:"ltr",className:"flex-1"}),i.jsx(ee,{type:"button",variant:"outline",size:"icon",onClick:E,children:i.jsx(no,{className:"h-4 w-4"})})]}),l&&i.jsxs("div",{className:"flex items-center gap-2 p-3 bg-green-50 rounded-lg border border-green-200",children:[i.jsx(Nb,{className:"h-4 w-4 text-green-600"}),i.jsx("span",{className:"font-medium text-green-700",children:l.name})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"entitlement",children:"בחר זכאות"}),i.jsxs(At,{value:b,onValueChange:j,children:[i.jsx(Ct,{className:"text-right",children:i.jsx(Pt,{placeholder:"בחר זכאות"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"none",children:"בחר זכאות..."}),S.length===0&&l&&i.jsx("div",{className:"px-2 py-1.5 text-sm text-muted-foreground",children:"אין זכאויות זמינות לתלמיד זה"}),S.map(P=>i.jsx($e,{value:P.id,children:i.jsxs("div",{className:"flex items-center gap-2",children:[P.category==="credit"?i.jsx(j4,{className:"h-3 w-3"}):i.jsx(wb,{className:"h-3 w-3"}),P.name,P.courseName&&i.jsxs("span",{className:"text-muted-foreground text-xs",children:["(",P.courseName,")"]}),P.category==="online_view"&&P.lessonCount&&i.jsxs("span",{className:"text-muted-foreground text-xs",children:[P.lessonCount," שיעורים"]})]})},P.id))]})]})]}),N&&i.jsxs(i.Fragment,{children:[k?i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"lessonCount",children:"מספר שיעורים"}),i.jsx(Oe,{id:"lessonCount",type:"number",placeholder:"0",value:f,onChange:P=>h(P.target.value),dir:"ltr",min:"1"})]}):i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"amount",children:"סכום (₪)"}),i.jsx(Oe,{id:"amount",type:"number",placeholder:"0",value:u,onChange:P=>d(P.target.value),dir:"ltr",min:"1"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"תוקף הקרדיט *"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Oe,{placeholder:"dd/mm/yyyy",value:p,onChange:P=>{const D=P.target.value;x(D);const U=g2(D,"dd/MM/yyyy",new Date);bg(U)&&U>new Date?g(U):g(void 0)},dir:"ltr",className:"flex-1"}),i.jsxs(i2,{children:[i.jsx(o2,{asChild:!0,children:i.jsx(ee,{type:"button",variant:"outline",size:"icon",className:xe(m&&"text-primary"),children:i.jsx(rr,{className:"h-4 w-4"})})}),i.jsx(wg,{className:"w-auto p-0",align:"end",children:i.jsx(Ng,{mode:"single",selected:m,onSelect:P=>{g(P),P&&x($t(P,"dd/MM/yyyy"))},disabled:P=>P<new Date,initialFocus:!0,className:"p-3 pointer-events-auto"})})]})]}),p&&!m&&i.jsx("p",{className:"text-xs text-destructive",children:"תאריך לא תקין (פורמט: dd/mm/yyyy)"})]})]}),i.jsxs("div",{className:"flex gap-3 pt-4",children:[i.jsx(ee,{type:"submit",variant:"rose",className:"flex-1",disabled:y||!l||!N,children:y?"מוסיף...":k?"הוסף שיעורים":"הוסף קרדיט"}),i.jsx(ee,{type:"button",variant:"outline",onClick:()=>s(!1),children:"ביטול"})]})]})]})]})}function Wue({onImportComplete:e}){const[t,r]=v.useState(!1),[n,s]=v.useState(!1),[a,o]=v.useState(null),l=v.useRef(null),c=()=>{const h=[{"תעודת זהות":"123456789",סוג:"כספי",סכום:500,שיעורים:"","תאריך תפוגה":"31/12/2026",זכאות:"מנוי חודשי"},{"תעודת זהות":"987654321",סוג:"צפייה",סכום:"",שיעורים:10,"תאריך תפוגה":"30/06/2026",זכאות:"חבילת שיעורים"},{"תעודת זהות":"111222333",סוג:"כספי",סכום:200,שיעורים:"","תאריך תפוגה":"",זכאות:""}],m=Uo.json_to_sheet(h),g=Uo.book_new();Uo.book_append_sheet(g,m,"קרדיטים"),m["!cols"]=[{wch:15},{wch:10},{wch:10},{wch:10},{wch:15},{wch:20}],cO(g,"תבנית_ייבוא_קרדיטים.xlsx"),K.success("התבנית הורדה בהצלחה")},u=h=>{if(!h)return null;const m=h.split(/[\/\-\.]/);if(m.length===3){const p=parseInt(m[0],10),x=parseInt(m[1],10)-1,b=parseInt(m[2],10),w=new Date(b,x,p);if(!isNaN(w.getTime()))return w}const g=new Date(h);return isNaN(g.getTime())?null:g},d=async h=>{var p;const m=(p=h.target.files)==null?void 0:p[0];if(!m)return;if(!["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel","text/csv"].includes(m.type)&&!m.name.endsWith(".xlsx")&&!m.name.endsWith(".xls")&&!m.name.endsWith(".csv")){K.error("יש להעלות קובץ אקסל (xlsx, xls) או CSV");return}s(!0),o(null);try{const x=await m.arrayBuffer(),b=Vp(x),w=b.SheetNames[0],y=b.Sheets[w],_=Uo.sheet_to_json(y);if(_.length===0){K.error("הקובץ ריק"),s(!1);return}let N=0,k=0;const S=[],{data:E}=await de.from("entitlement_types").select("id, name");for(const j of _){const T=String(j["תעודת זהות"]||j.id_number||j["ת.ז"]||j["ת״ז"]||"").replace(/\D/g,""),R=j.סוג||j.type||"כספי",P=Number(j.סכום||j.amount||0),D=Number(j.שיעורים||j.lessons||j.lesson_count||0),U=String(j["תאריך תפוגה"]||j.expiration_date||j.תוקף||""),Q=j.זכאות||j.entitlement||"";if(!T||T.length!==9){k++,S.push(`שורה עם ת״ז לא תקינה: ${T||"ריק"}`);continue}const{data:Y,error:V}=await de.from("students").select("id, name").eq("id_number",T).maybeSingle();if(V||!Y){k++,S.push(`תלמיד לא נמצא: ${T}`);continue}const F=R.includes("צפייה")||R.toLowerCase().includes("online")?"online_view":"credit";if(F==="credit"&&P<=0){k++,S.push(`${Y.name}
702: סכום לא תקין`);continue}if(F==="online_view"&&D<=0){k++,S.push(`${Y.name}: כמות שיעורים לא תקינה`);continue}const C=u(U);let X=null;if(Q&&E){const M=E.find(I=>I.name.toLowerCase()===Q.toLowerCase());if(M)X=M.id;else{k++,S.push(`${Y.name}: זכאות "${Q}" לא קיימת במערכת`);continue}}const se={student_id:Y.id,type:"credit",category:F,amount:F==="credit"?P:0,lesson_count:F==="online_view"?D:null,balance:F==="credit"?P:D,entitlement_type_id:X,entitlement_type_name:Q||null};C&&(se.expiration_date=C.toISOString());const{error:A}=await de.from("wallet_transactions").insert(se);A?(k++,S.push(`${Y.name}: ${A.message}`)):N++}o({success:N,failed:k,errors:S.slice(0,10)}),N>0&&(K.success(`יובאו ${N} תנועות קרדיט בהצלחה`),e()),k>0&&N===0?K.error(`${k} תנועות לא יובאו`):k>0&&K.warning(`${k} תנועות לא יובאו`)}catch(x){console.error("Error importing credits:",x),K.error("שגיאה בייבוא הקובץ")}finally{s(!1),l.current&&(l.current.value="")}},f=h=>{r(h),h||o(null)};return i.jsxs(Ht,{open:t,onOpenChange:f,children:[i.jsx(va,{asChild:!0,children:i.jsxs(ee,{variant:"outline",className:"gap-2",children:[i.jsx(ed,{className:"h-4 w-4"}),"ייבוא מאקסל"]})}),i.jsxs(Ut,{className:"sm:max-w-md",dir:"rtl",children:[i.jsxs(Wt,{children:[i.jsx(zt,{children:"ייבוא קרדיטים מאקסל"}),i.jsx(a0,{children:"העלה קובץ אקסל עם תנועות קרדיט לייבוא מהיר"})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"bg-muted/50 rounded-lg p-4 space-y-3",children:[i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(P4,{className:"h-5 w-5 text-green-600 mt-0.5"}),i.jsxs("div",{className:"flex-1",children:[i.jsx("p",{className:"text-sm font-medium",children:"תבנית לדוגמה"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"הורד את התבנית ומלא אותה עם נתוני הקרדיטים"})]})]}),i.jsxs(ee,{variant:"outline",size:"sm",onClick:c,className:"w-full gap-2",children:[i.jsx(A4,{className:"h-4 w-4"}),"הורד תבנית לדוגמה"]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("input",{ref:l,type:"file",accept:".xlsx,.xls,.csv",onChange:d,className:"hidden",id:"credits-excel-upload"}),i.jsx(ee,{variant:"default",className:"w-full gap-2",onClick:()=>{var h;return(h=l.current)==null?void 0:h.click()},disabled:n,children:n?i.jsxs(i.Fragment,{children:[i.jsx(yr,{className:"h-4 w-4 animate-spin"}),"מייבא..."]}):i.jsxs(i.Fragment,{children:[i.jsx(ed,{className:"h-4 w-4"}),"בחר קובץ להעלאה"]})}),i.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"קבצים נתמכים: xlsx, xls, csv"})]}),a&&i.jsxs("div",{className:"space-y-3 pt-2",children:[i.jsxs("div",{className:"flex gap-4 justify-center",children:[a.success>0&&i.jsxs("div",{className:"flex items-center gap-2 text-green-600",children:[i.jsx(Ha,{className:"h-5 w-5"}),i.jsxs("span",{className:"font-medium",children:[a.success," הצליחו"]})]}),a.failed>0&&i.jsxs("div",{className:"flex items-center gap-2 text-red-600",children:[i.jsx(yb,{className:"h-5 w-5"}),i.jsxs("span",{className:"font-medium",children:[a.failed," נכשלו"]})]})]}),a.errors.length>0&&i.jsxs("div",{className:"bg-red-50 dark:bg-red-950/20 rounded-lg p-3 max-h-32 overflow-y-auto",children:[i.jsx("p",{className:"text-xs font-medium text-red-700 dark:text-red-400 mb-1",children:"שגיאות:"}),i.jsx("ul",{className:"text-xs text-red-600 dark:text-red-400 space-y-1",children:a.errors.map((h,m)=>i.jsxs("li",{children:["• ",h]},m))})]})]}),i.jsxs("div",{className:"text-xs text-muted-foreground space-y-1 pt-2 border-t",children:[i.jsx("p",{className:"font-medium",children:"שדות נתמכים בקובץ:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-0.5",children:[i.jsxs("li",{children:[i.jsx("strong",{children:"תעודת זהות"})," - שדה חובה (5-9 ספרות)"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"סוג"}),' - "כספי" או "צפייה"']}),i.jsxs("li",{children:[i.jsx("strong",{children:"סכום"})," - לקרדיט כספי בלבד"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"שיעורים"})," - לקרדיט צפייה בלבד"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"תאריך תפוגה"})," - בפורמט DD/MM/YYYY"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"זכאות"})," - שם הזכאות (אופציונלי)"]})]})]})]})]})]})}function zue({transaction:e,open:t,onOpenChange:r,onSuccess:n}){const[s,a]=v.useState(void 0),[o,l]=v.useState(""),[c,u]=v.useState(!1),d=h=>{r(h),h||(a(void 0),l(""))},f=async h=>{if(h.preventDefault(),!!e){if(!s){K.error("נא לבחור תאריך תוקף חדש");return}u(!0);try{const{error:m}=await de.from("wallet_transactions").update({expiration_date:s.toISOString()}).eq("id",e.id);if(m)throw m;K.success("תוקף הקרדיט עודכן בהצלחה"),n(),d(!1)}catch(m){console.error(m),K.error("שגיאה בעדכון התוקף")}finally{u(!1)}}};return i.jsx(Ht,{open:t,onOpenChange:d,children:i.jsxs(Ut,{className:"sm:max-w-sm",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"הארכת תוקף קרדיט"})}),e&&i.jsxs("div",{className:"text-sm text-muted-foreground space-y-1 mb-2",children:[i.jsx("p",{children:i.jsx("span",{className:"font-medium text-foreground",children:e.studentName})}),i.jsxs("p",{children:[e.category==="credit"?`₪${e.amount}`:`${e.lessonCount} שיעורים`,e.entitlementTypeName&&` • ${e.entitlementTypeName}`]}),i.jsxs("p",{children:["תוקף נוכחי: ",i.jsx("span",{className:"font-medium",children:e.expirationDate||"ללא תוקף"})]})]}),i.jsxs("form",{onSubmit:f,className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"תאריך תוקף חדש *"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Oe,{placeholder:"dd/mm/yyyy",value:o,onChange:h=>{const m=h.target.value;l(m);const g=g2(m,"dd/MM/yyyy",new Date);bg(g)&&g>new Date?a(g):a(void 0)},dir:"ltr",className:"flex-1"}),i.jsxs(i2,{children:[i.jsx(o2,{asChild:!0,children:i.jsx(ee,{type:"button",variant:"outline",size:"icon",className:xe(s&&"text-primary"),children:i.jsx(rr,{className:"h-4 w-4"})})}),i.jsx(wg,{className:"w-auto p-0",align:"end",children:i.jsx(Ng,{mode:"single",selected:s,onSelect:h=>{a(h),h&&l($t(h,"dd/MM/yyyy"))},disabled:h=>h<=new Date,initialFocus:!0,className:"p-3 pointer-events-auto"})})]})]}),o&&!s&&i.jsx("p",{className:"text-xs text-destructive",children:"תאריך לא תקי×
702Ÿ (פורמט: dd/mm/yyyy)"})]}),i.jsxs("div",{className:"flex gap-3 pt-2",children:[i.jsx(ee,{type:"submit",variant:"rose",className:"flex-1",disabled:c||!s,children:c?i.jsx(yr,{className:"h-4 w-4 animate-spin"}):"עדכן תוקף"}),i.jsx(ee,{type:"button",variant:"outline",onClick:()=>d(!1),children:"ביטול"})]})]})]})})}var u5="AlertDialog",[Hue,tme]=tn(u5,[A3]),co=A3(),d5=e=>{const{__scopeAlertDialog:t,...r}=e,n=co(t);return i.jsx(G3,{...n,...r,modal:!0})};d5.displayName=u5;var Vue="AlertDialogTrigger",f5=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=co(r);return i.jsx(q3,{...s,...n,ref:t})});f5.displayName=Vue;var Gue="AlertDialogPortal",h5=e=>{const{__scopeAlertDialog:t,...r}=e,n=co(t);return i.jsx(K3,{...n,...r})};h5.displayName=Gue;var que="AlertDialogOverlay",m5=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=co(r);return i.jsx(Xb,{...s,...n,ref:t})});m5.displayName=que;var Fu="AlertDialogContent",[Kue,Yue]=Hue(Fu),Xue=ZT("AlertDialogContent"),p5=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...s}=e,a=co(r),o=v.useRef(null),l=ot(t,o),c=v.useRef(null);return i.jsx(NV,{contentName:Fu,titleName:x5,docsSlug:"alert-dialog",children:i.jsx(Kue,{scope:r,cancelRef:c,children:i.jsxs(Qb,{role:"alertdialog",...a,...s,ref:l,onOpenAutoFocus:ke(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[i.jsx(Xue,{children:n}),i.jsx(Jue,{contentRef:o})]})})})});p5.displayName=Fu;var x5="AlertDialogTitle",g5=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=co(r);return i.jsx(Jb,{...s,...n,ref:t})});g5.displayName=x5;var v5="AlertDialogDescription",y5=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=co(r);return i.jsx(Zb,{...s,...n,ref:t})});y5.displayName=v5;var Que="AlertDialogAction",w5=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=co(r);return i.jsx(e_,{...s,...n,ref:t})});w5.displayName=Que;var b5="AlertDialogCancel",_5=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:s}
702=Yue(b5,r),a=co(r),o=ot(t,s);return i.jsx(e_,{...a,...n,ref:o})});_5.displayName=b5;var Jue=({contentRef:e})=>{const t=`\`${Fu}\` requires a description for the component to be accessible for screen reader users.
703
704You can add a description to the \`${Fu}\` by passing a \`${v5}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
705
706Alternatively, 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 \`${Fu}\`. 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.
707
708For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Zue=d5,ede=f5,tde=h5,N5=m5,S5=p5,k5=w5,j5=_5,E5=g5,C5=y5;const qs=Zue,rde=ede,nde=tde,T5=v.forwardRef(({className:e,...t},r)=>
708i.jsx(N5,{className:xe("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}));T5.displayName=N5.displayName;const ys=v.forwardRef(({className:e,...t},r)=>i.jsxs(nde,{children:[i.jsx(T5,{}),i.jsx(S5,{ref:r,className:xe("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})]}));ys.displayName=S5.displayName;const ws=({className:e,...t})=>i.jsx("div",{className:xe("flex flex-col space-y-2 text-center sm:text-left",e),...t});ws.displayName="AlertDialogHeader";const bs=({className:e,...t})=>i.jsx("div",{className:xe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});bs.displayName="AlertDialogFooter";const _s=v.forwardRef(({className:e,...t},r)=>i.jsx(E5,{ref:r,className:xe("text-lg font-semibold",e),...t}));_s.displayName=E5.displayName;const Ns=v.forwardRef(({className:e,...t},r)=>i.jsx(C5,{ref:r,className:xe("text-sm text-muted-foreground",e),...t}));Ns.displayName=C5.displayName;const Ss=v.forwardRef(({className:e,...t},r)=>i.jsx(k5,{ref:r,className:xe(mh(),e),...t}));Ss.displayName=k5.displayName;const ks=v.forwardRef(({className:e,...t},r)=>i.jsx(j5,{ref:r,className:xe(mh({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));ks.displayName=j5.displayName;const r1=50;function sde(){const{transactions:e,addTransaction:t,deleteTransaction:r,refreshTransactions:n}=m3(),[s,a]=v.useState(""),[o,l]=v.useState(null),[c,u]=v.useState(!1),[d,f]=v.useState(1),[h,m]=v.useState(null),g=_=>{t({studentId:_.studentId,studentName:_.studentName,amount:_.amount,lessonCount:_.lessonCount,type:"credit",category:_.category,entitlementTypeId:_.entitlementTypeId,entitlementTypeName:_.entitlementTypeName,date:new Date().toLocaleDateString("he-IL"),expirationDate:_.expirationDate,balance:_.amount})},p=async()=>{if(o){u(!0);try{await r(o.id),K.success("התנועה נמחקה בהצלחה")}catch{K.error("שגיאה במחיקת התנועה")}finally{u(!1),l(null)}}},x=v.useMemo(()=>e.filter(_=>_.studentName.includes(s)),[e,s]),b=_=>{a(_),f(1)},w=Math.ceil(x.length/r1),y=v.useMemo(()=>{const _=(d-1)*r1;return x.slice(_,_+r1)},[x,d]);return i.jsxs(Hn,{children:[i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-foreground",children:"ארנק וקרדיט"}),i.jsx("p",{className:"text-muted-foreground mt-1",children:"ניהול יתרות ותנועות קרדיט"})]}),i.jsxs("div",{className:"flex gap-2 flex-wrap",children:[i.jsx(Wue,{onImportComplete:n}),i.jsx(Uue,{onAddCredit:g})]})]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[i.jsxs("div",{className:"relative flex-1 max-w-md",children:[i.jsx(no,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(Oe,{placeholder:"חיפוש לפי שם תלמיד...",className:"pr-10",value:s,onChange:_=>b(_.target.value)})]}),i.jsxs(We,{variant:"secondary",className:"text-sm whitespace-nowrap self-center",children:[x.length," תוצאות"]})]}),w>1&&i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("span",{className:"text-sm text-muted-foreground",children:["עמוד ",d," מתוך ",w]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs(ee,{variant:"outline",size:"sm",onClick:()=>f(_=>Math.max(1,_-1)),disabled:d===1,children:[i.jsx(yi,{className:"h-4 w-4"}),"הקודם"]}),i.jsxs(ee,{variant:"outline",size:"sm",onClick:()=>f(_=>Math.min(w,_+1)),disabled:d===w,children:["הבא",i.jsx(Xi,{className:"h-4 w-4"})]})]})]}),i.jsxs("div",{className:"bg-card rounded-2xl shadow-card border border-border overflow-hidden",children:[i.jsx("div",{className:"px-6 py-4 border-b border-border",children:i.jsxs("h3",{className:"font-semibold text-foreground",children:["תנועות אחרונות (",y.length," מתוך ",x.length,")"]})}),i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[i.jsx("th",{className:"text-right px-6 py-4 text-sm font-semibold text-foreground",children:"תלמיד"}),i.jsx("th",{className:"text-right px-6 py-4 text-sm font-semibold text-foreground",children:"סוג"}),i.jsx("th",{className:"text-right px-6 py-4 text-sm font-semibold text-foreground",children:"ערך"}),i.jsx("th",{className:"text-right px-6 py-4 text-sm font-semibold text-foreground",children:"זכאות"}),i.jsx("th",{className:"text-right px-6 py-4 text-sm font-semibold text-foreground",children:"תאריך"}),i.jsx("th",{className:"text-right px-6 py-4 text-sm font-semibold text-foreground",children:"תוקף"}),i.jsx("th",{className:"text-right px-6 py-4 text-sm font-semibold text-foreground",children:"פעולות"})]})}),i.jsx("tbody",{className:"divide-y divide-border",children:y.map(_=>i.jsx(ade,{transaction:_,onDelete:()=>l(_),onExtend:()=>m(_)},_.id))})]})}),x.length===0&&i.jsx("div",{className:"text-center py-8",children:i.jsx("p",{className:"text-muted-foreground",children:"לא נמצאו תנועות"})})]}),w>1&&i.jsxs("div",{className:"flex items-center justify-center gap-2",children:[i.jsx(ee,{variant:"outline",size:"sm",onClick:()=>f(_=>Math.max(1,_-1)),disabled:d===1,children:i.jsx(yi,{className:"h-4 w-4"})}),i.jsx("div",{className:"flex gap-1",children:Array.from({length:Math.min(5,w)},(_,N)=>{let k;return w<=5||d<=3?k=N+1:d>=w-2?k=w-4+N:k=d-2+N,i.jsx(ee,{variant:d===k?"default":"outline",size:"sm",className:"w-8 h-8 p-0",onClick:()=>f(k),children:k},k)})}),i.jsx(ee,{variant:"outline",size:"sm",onClick:()=>f(_=>Math.min(w,_+1)),disabled:d===w,children:i.jsx(Xi,{className:"h-4 w-4"})})]})]}),i.jsx(qs,{open:!!o,onOpenChange:()=>l(null),children:i.jsxs(ys,{children:[i.jsxs(ws,{children:[i.jsx(_s,{children:"מחיקת תנועה"}),i.jsxs(Ns,{className:"text-right",children:[i.jsxs("p",{className:"mb-2",children:["האם למחוק את התנועה של ",i.jsx("strong",{children:o==null?void 0:o.studentName}),"?"]}),i.jsxs("p",{className:"text-sm",children:[(o==null?void 0:o.category)==="credit"?i.jsxs(i.Fragment,{children:["סכום: ₪",o==null?void 0:o.amount]}):i.jsxs(i.Fragment,{children:[o==null?void 0:o.lessonCount," שיעורים"]})," • ",(o==null?void 0:o.type)==="credit"?"זיכוי":"חיוב"]}),i.jsx("p",{className:"mt-3 text-amber-600 font-medium",children:"⚠ התנועה תימחק לחלוטין מהמערכת וגם מיתרת התלמיד"})]})]}),i.jsxs(bs,{className:"flex-row-reverse gap-2",children:[i.jsx(Ss,{onClick:p,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",disabled:c,
708children:c?i.jsx(yr,{className:"h-4 w-4 animate-spin"}):"מחק תנועה"}),i.jsx(ks,{disabled:c,children:"ביטול"})]})]})}),i.jsx(zue,{transaction:h,open:!!h,onOpenChange:_=>{_||m(null)},onSuccess:n})]})}function ade({transaction:e,onDelete:t,onExtend:r}){return i.jsxs("tr",{className:"hover:bg-muted/30 transition-colors",children:[i.jsx("td",{className:"px-6 py-4",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-9 h-9 rounded-full gradient-rose flex items-center justify-center",children:i.jsx("span",{className:"text-sm font-semibold text-foreground",children:e.studentName.charAt(0)})}),i.jsx("span",{className:"font-medium text-foreground",children:e.studentName})]})}),i.jsx("td",{className:"px-6 py-4",children:i.jsx("span",{className:xe("inline-flex items-center rounded-md px-2 py-1 text-xs font-medium",e.category==="credit"?"bg-emerald-100 text-emerald-700":"bg-blue-100 text-blue-700"),children:e.category==="credit"?"כספי":"צפייה"})}),i.jsx("td",{className:"px-6 py-4",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:xe("w-6 h-6 rounded-full flex items-center justify-center",e.type==="credit"?"bg-green-100":"bg-red-100"),children:e.type==="credit"?i.jsx(hs,{className:"h-3 w-3 text-green-600"}):i.jsx(M4,{className:"h-3 w-3 text-red-600"})}),i.jsx("span",{className:xe("font-semibold",e.type==="credit"?"text-green-600":"text-red-600"),children:e.category==="credit"?i.jsxs(i.Fragment,{children:[e.type==="credit"?"+":"-","₪",e.amount]}):i.jsxs(i.Fragment,{children:[e.type==="credit"?"+":"-",e.lessonCount," שיעורים"]})})]})}),i.jsx("td",{className:"px-6 py-4",children:i.jsx("div",{className:"flex flex-col gap-1",children:e.entitlementTypeName?i.jsx("span",{className:"inline-flex items-center rounded-md bg-secondary px-2 py-1 text-xs font-medium text-secondary-foreground",children:e.entitlementTypeName}):e.courseName?i.jsx("span",{className:"inline-flex items-center rounded-md bg-secondary px-2 py-1 text-xs font-medium text-secondary-foreground",children:e.courseName}):i.jsx("span",{className:"text-muted-foreground",children:"-"})})}),i.jsx("td",{className:"px-6 py-4 text-muted-foreground",children:e.date}),i.jsx("td",{className:"px-6 py-4",children:e.type==="credit"?i.jsx("button",{onClick:r,className:"text-sm text-muted-foreground hover:text-primary hover:underline transition-colors cursor-pointer",title:"לחץ להארכת תוקף",children:e.expirationDate||"-"}):i.jsx("span",{className:"text-muted-foreground text-sm",children:e.expirationDate||"-"})}),i.jsx("td",{className:"px-6 py-4",children:i.jsx(ee,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",onClick:t,children:i.jsx(Ia,{className:"h-4 w-4"})})})]})}function ide({courses:e,onAddLesson:t}){const[r,n]=v.useState(!1),[s,a]=v.useState(""),[o,l]=v.useState(""),[c,u]=v.useState(""),[d,f]=v.useState(!1),h=e.find(x=>x.id===o),m=x=>{if(/^\d+$/.test(x.trim()))return x.trim();const b=[/vimeo\.com\/(\d+)/,/player\.vimeo\.com\/video\/(\d+)/];for(const w of b){const y=x.match(w);if(y)return y[1]}return null},g=async x=>{if(x.preventDefault(),!s.trim()){K.error("נא להזין כותרת שיעור");return}if(!o){K.error("נא לבחור קורס");return}if(!c.trim()){K.error("נא להזין מזהה סרטון Vimeo");return}if(!m(c.trim())){K.error("נא להזין מזהה Vimeo תקין (מספר או קישור)");return}f(!0);try{const w=m(c.trim());t({title:s.trim(),courseId:o,courseName:(h==null?void 0:h.name)||"",type:"online_recorded",videoUrl:w||""}),K.success(`השיעור "${s}" נוסף בהצלחה!`),p(),n(!1)}catch(w){console.error("Error adding lesson:",w),K.error("שגיאה בהוספת שיעור")}finally{f(!1)}},p=()=>{a(""),l(""),u("")};return i.jsxs(Ht,{open:r,onOpenChange:n,children:[i.jsx(va,{asChild:!0,children:i.jsxs(ee,{variant:"rose",className:"gap-2",children:[i.jsx(hs,{className:"h-4 w-4"}),"הוסף שיעור"]})}),i.jsxs(Ut,{className:"sm:max-w-md",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"הוספת שיעור חדש"})}
708),i.jsxs("form",{onSubmit:g,className:"space-y-4 mt-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"title",children:"כותרת השיעור"}),i.jsx(Oe,{id:"title",placeholder:"לדוגמה: מבוא לאיפור כלות",value:s,onChange:x=>a(x.target.value),className:"text-right"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"courseId",children:"קורס"}),i.jsxs(At,{value:o,onValueChange:l,children:[i.jsx(Ct,{className:"text-right",children:i.jsx(Pt,{placeholder:"בחרי קורס"})}),i.jsx(Tt,{className:"z-[200]",children:e.length===0?i.jsx("div",{className:"py-2 px-3 text-sm text-muted-foreground",children:"אין קורסים זמינים"}):e.map(x=>i.jsx($e,{value:x.id,children:x.name},x.id))})]})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsxs(ve,{className:"flex items-center gap-2",children:[i.jsx(O4,{className:"h-4 w-4"}),"מזהה סרטון Vimeo"]}),i.jsx(Oe,{placeholder:"לדוגמה: 123456789 או https://vimeo.com/123456789",value:c,onChange:x=>u(x.target.value),className:"text-right",dir:"ltr"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"💡 הזיני את מזהה הסרטון או הקישור המלא מ-Vimeo"})]}),i.jsxs("div",{className:"flex gap-3 pt-4",children:[i.jsx(ee,{type:"submit",variant:"rose",className:"flex-1",disabled:d,children:d?"מעלה...":"הוסף שיעור"}),i.jsx(ee,{type:"button",variant:"outline",onClick:()=>n(!1),disabled:d,children:"ביטול"})]})]})]})]})}function ode(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return v.useMemo(()=>n=>{t.forEach(s=>s(n))},t)}const Sg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Od(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function j2(e){return"nodeType"in e}function js(e){var t,r;return e?Od(e)?e:j2(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function E2(e){const{Document:t}=js(e);return e instanceof t}function N0(e){return Od(e)?!1:e instanceof js(e).HTMLElement}function A5(e){return e instanceof js(e).SVGElement}function Dd(e){return e?Od(e)?e.document:j2(e)?E2(e)?e:N0(e)||A5(e)?e.ownerDocument:document:document:document}const _i=Sg?v.useLayoutEffect:v.useEffect;function C2(e){const t=v.useRef(e);return _i(()=>{t.current=e}),v.useCallback(function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];return t.current==null?void 0:t.current(...n)},[])}function lde(){const e=v.useRef(null),t=v.useCallback((n,s)=>{e.current=setInterval(n,s)},[]),r=v.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function Mh(e,t){t===void 0&&(t=[e]);const r=v.useRef(e);return _i(()=>{r.current!==e&&(r.current=e)},t),r}function S0(e,t){const r=v.useRef();return v.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function ex(e){const t=C2(e),r=v.useRef(null),n=v.useCallback(s=>{s!==r.current&&(t==null||t(s,r.current)),r.current=s},[]);return[r,n]}function hw(e){const t=v.useRef();return v.useEffect(()=>{t.current=e},[e]),t.current}let n1={};function k0(e,t){return v.useMemo(()=>{if(t)return t;const r=n1[e]==null?0:n1[e]+1;return n1[e]=r,e+"-"+r},[e,t])}function P5(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];return n.reduce((a,o)=>{const l=Object.entries(o);for(const[c,u]of l){const d=a[c];d!=null&&(a[c]=d+e*u)}return a},{...t})}}const Mu=P5(1),Lh=P5(-1);function cde(e){return"clientX"in e&&"clientY"in e}function T2(e){if(!e)return!1;const{KeyboardEvent:t}=js(e.target);return t&&e instanceof t}function ude(e){if(!e)return!1;const{TouchEvent:t}=js(e.target);return t&&e instanceof t}function mw(e){if(ude(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return cde(e)?{x:e.clientX,y:e.clientY}:null}const Bh=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[Bh.Translate.toString(e),Bh.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),sE="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function dde(e){return e.matches(sE)?e:e.querySelector(sE)}const fde={display:"none"};function hde(e){let{id:t,value:r}=e;return ye.createElement("div",{id:t,style:fde},r)}function mde(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ye.createElement("div",{id:t,style:s,role:"status","aria-live":n,"aria-atomic":!0},r)}function pde(){const[e,t]=v.useState("");return{announce:v.useCallback(n=>{n!=null&&t(n)},[]),announcement:e}}const R5=v.createContext(null);function xde(e){const t=v.useContext(R5);v.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function gde(){const[e]=v.useState(()=>new Set),t=v.useCallback(n=>(e.add(n),()=>e.delete(n)),[e]);return[v.useCallback(n=>{let{type:s,event:a}=n;e.forEach(o=>{var l;return(l=o[s])==null?void 0:l.call(o,a)})},[e]),t]}const vde={draggable:`
709    To pick up a draggable item, press the space bar.
710    While dragging, use the arrow keys to move the item.
711    Press space again to drop the item in its new position, or press escape to cancel.
712  `},yde={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function wde(e){let{announcements:t=yde,container:r,hiddenTextDescribedById:n,screenReaderInstructions:s=vde}=e;const{announce:a,announcement:o}=pde(),l=k0("DndLiveRegion"),[c,u]=v.useState(!1);if(v.useEffect(()=>{u(!0)},[]),xde(v.useMemo(()=>({onDragStart(f){let{active:h}=f;a(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:m}=f;t.onDragMove&&a(t.onDragMove({active:h,over:m}))},onDragOver(f){let{active:h,over:m}=f;a(t.onDragOver({active:h,over:m}))},onDragEnd(f){let{active:h,over:m}=f;a(t.onDragEnd({active:h,over:m}))},onDragCancel(f){let{active:h,over:m}=f;
712a(t.onDragCancel({active:h,over:m}))}}),[a,t])),!c)return null;const d=ye.createElement(ye.Fragment,null,ye.createElement(hde,{id:n,value:s.draggable}),ye.createElement(mde,{id:l,announcement:o}));return r?ca.createPortal(d,r):d}var on;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(on||(on={}));function tx(){}function aE(e,t){return v.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function bde(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return v.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Ka=Object.freeze({x:0,y:0});function O5(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function D5(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function _de(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function iE(e){let{left:t,top:r,height:n,width:s}=e;return[{x:t,y:r},{x:t+s,y:r},{x:t,y:r+n},{x:t+s,y:r+n}]}function I5(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function oE(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const Nde=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const s=oE(t,t.left,t.top),a=[];for(const o of n){const{id:l}=o,c=r.get(l);if(c){const u=O5(oE(c),s);a.push({id:l,data:{droppableContainer:o,value:u}})}}return a.sort(D5)},Sde=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const s=iE(t),a=[];for(const o of n){const{id:l}=o,c=r.get(l);if(c){const u=iE(c),d=s.reduce((h,m,g)=>h+O5(u[g],m),0),f=Number((d/4).toFixed(4));a.push({id:l,data:{droppableContainer:o,value:f}})}}return a.sort(D5)};function kde(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),s=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=s-n,l=a-r;if(n<s&&r<a){const c=t.width*t.height,u=e.width*e.height,d=o*l,f=d/(c+u-d);return Number(f.toFixed(4))}return 0}const jde=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const s=[];for(const a of n){const{id:o}=a,l=r.get(o);if(l){const c=kde(l,t);c>0&&s.push({id:o,data:{droppableContainer:a,value:c}})}}return s.sort(_de)};function Ede(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function F5(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ka}function Cde(e){return function(r){for(var n=arguments.length,s=new Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];return s.reduce((o,l)=>({...o,top:o.top+e*l.y,bottom:o.bottom+e*l.y,left:o.left+e*l.x,right:o.right+e*l.x}),{...r})}}const Tde=Cde(1);function Ade(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Pde(e,t,r){const n=Ade(t);if(!n)return e;const{scaleX:s,scaleY:a,x:o,y:l}=n,c=e.left-o-(1-s)*parseFloat(r),u=e.top-l-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),d=s?e.width/s:e.width,f=a?e.height/a:e.height;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c}}const Rde={ignoreTransform:!1};function Id(e,t){t===void 0&&(t=Rde);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=js(e).getComputedStyle(e);u&&(r=Pde(r,u,d))}const{top:n,left:s,width:a,height:o,bottom:l,right:c}=r;return{top:n,left:s,width:a,height:o,bottom:l,right:c}}function lE(e){return Id(e,{ignoreTransform:!0})}function Ode(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function Dde(e,t){return t===void 0&&(t=js(e).getComputedStyle(e)),t.position==="fixed"}function Ide(e,t){t===void 0&&(t=js(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const a=t[s];return typeof a=="string"?r.test(a):!1})}function kg(e,t){const r=[];function n(s){if(t!=null&&r.length>=t||!s)return r;if(E2(s)&&s.scrollingElement!=null&&!r.includes(s.scrollingElement))return r.push(s.scrollingElement),r;if(!N0(s)||A5(s)||r.includes(s))return r;const a=js(e).getComputedStyle(s);return s!==e&&Ide(s,a)&&r.push(s),Dde(s,a)?r:n(s.parentNode)}return e?n(e):r}function M5(e){const[t]=kg(e,1);return t??null}function s1(e){return!Sg||!e?null:Od(e)?e:j2(e)?E2(e)||e===Dd(e).scrollingElement?window:N0(e)?e:null:null}function L5(e){return Od(e)?e.scrollX:e.scrollLeft}function B5(e){return Od(e)?e.scrollY:e.scrollTop}function pw(e){return{x:L5(e),y:B5(e)}}var xn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(xn||(xn={}));function $5(e){return!Sg||!e?!1:e===document.scrollingElement}function U5(e){const t={x:0,y:0},r=$5(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},s=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,o=e.scrollTop>=n.y,l=e.scrollLeft>=n.x;return{isTop:s,isLeft:a,isBottom:o,isRight:l,maxScroll:n,minScroll:t}}const Fde={x:.2,y:.2};function Mde(e,t,r,n,s){let{top:a,left:o,right:l,bottom:c}=r;n===void 0&&(n=10),s===void 0&&(s=Fde);
712const{isTop:u,isBottom:d,isLeft:f,isRight:h}=U5(e),m={x:0,y:0},g={x:0,y:0},p={height:t.height*s.y,width:t.width*s.x};return!u&&a<=t.top+p.height?(m.y=xn.Backward,g.y=n*Math.abs((t.top+p.height-a)/p.height)):!d&&c>=t.bottom-p.height&&(m.y=xn.Forward,g.y=n*Math.abs((t.bottom-p.height-c)/p.height)),!h&&l>=t.right-p.width?(m.x=xn.Forward,g.x=n*Math.abs((t.right-p.width-l)/p.width)):!f&&o<=t.left+p.width&&(m.x=xn.Backward,g.x=n*Math.abs((t.left+p.width-o)/p.width)),{direction:m,speed:g}}function Lde(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:o}=window;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}const{top:t,left:r,right:n,bottom:s}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:s,width:e.clientWidth,height:e.clientHeight}}function W5(e){return e.reduce((t,r)=>Mu(t,pw(r)),Ka)}function Bde(e){return e.reduce((t,r)=>t+L5(r),0)}function $de(e){return e.reduce((t,r)=>t+B5(r),0)}function Ude(e,t){if(t===void 0&&(t=Id),!e)return;const{top:r,left:n,bottom:s,right:a}=t(e);M5(e)&&(s<=0||a<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Wde=[["x",["left","right"],Bde],["y",["top","bottom"],$de]];class A2{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=kg(r),s=W5(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,o,l]of Wde)for(const c of o)Object.defineProperty(this,c,{get:()=>{const u=l(n),d=s[a]-u;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Df{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var s;(s=this.target)==null||s.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function zde(e){const{EventTarget:t}=js(e);return e instanceof t?e:Dd(e)}function a1(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var aa;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(aa||(aa={}));function cE(e){e.preventDefault()}function Hde(e){e.stopPropagation()}var Et;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Et||(Et={}));const z5={start:[Et.Space,Et.Enter],cancel:[Et.Esc],end:[Et.Space,Et.Enter,Et.Tab]},Vde=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case Et.Right:return{...r,x:r.x+25};case Et.Left:return{...r,x:r.x-25};case Et.Down:return{...r,y:r.y+25};case Et.Up:return{...r,y:r.y-25}}};class P2{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new Df(Dd(r)),this.windowListeners=new Df(js(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(aa.Resize,this.handleCancel),this.windowListeners.add(aa.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(aa.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&Ude(n),r(Ka)}handleKeyDown(t){if(T2(t)){const{active:r,context:n,options:s}=this.props,{keyboardCodes:a=z5,coordinateGetter:o=Vde,scrollBehavior:l="smooth"}=s,{code:c}=t;if(a.end.includes(c)){this.handleEnd(t);return}if(a.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=n.current,d=u?{x:u.left,y:u.top}:Ka;this.referenceCoordinates||(this.referenceCoordinates=d);const f=o(t,{active:r,context:n.current,currentCoordinates:d});if(f){const h=Lh(f,d),m={x:0,y:0},{scrollableAncestors:g}=n.current;for(const p of g){const x=t.code,{isTop:b,isRight:w,isLeft:y,isBottom:_,maxScroll:N,minScroll:k}=U5(p),S=Lde(p),E={x:Math.min(x===Et.Right?S.right-S.width/2:S.right,Math.max(x===Et.Right?S.left:S.left+S.width/2,f.x)),y:Math.min(x===Et.Down?S.bottom-S.height/2:S.bottom,Math.max(x===Et.Down?S.top:S.top+S.height/2,f.y))},j=x===Et.Right&&!w||x===Et.Left&&!y,T=x===Et.Down&&!_||x===Et.Up&&!b;if(j&&E.x!==f.x){const R=p.scrollLeft+h.x,P=x===Et.Right&&R<=N.x||x===Et.Left&&R>=k.x;if(P&&!h.y){p.scrollTo({left:R,behavior:l});return}P?m.x=p.scrollLeft-R:m.x=x===Et.Right?p.scrollLeft-N.x:p.scrollLeft-k.x,m.x&&p.scrollBy({left:-m.x,behavior:l});break}else if(T&&E.y!==f.y){const R=p.scrollTop+h.y,P=x===Et.Down&&R<=N.y||x===Et.Up&&R>=k.y;if(P&&!h.x){p.scrollTo({top:R,behavior:l});return}P?m.y=p.scrollTop-R:m.y=x===Et.Down?p.scrollTop-N.y:p.scrollTop-k.y,m.y&&p.scrollBy({top:-m.y,behavior:l});break}}this.handleMove(t,Mu(Lh(f,this.referenceCoordinates),m))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}P2.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=z5,onActivation:s}=t,{active:a}=r;const{code:o}=e.nativeEvent;if(n.start.includes(o)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),s==null||s({event:e.nativeEvent}),!0)}return!1}}];function uE(e){return!!(e&&"distance"in e)}function dE(e){return!!(e&&"delay"in e)}class R2{constructor(t,r,n){var s;n===void 0&&(n=zde(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:a}=t,{target:o}=a;this.props=t,this.events=r,this.document=Dd(o),this.documentListeners=new Df(this.document),this.listeners=new Df(n),this.windowListeners=new Df(js(o)),this.initialCoordinates=(s=mw(a))!=null?s:Ka,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(aa.Resize,this.handleCancel),this.windowListeners.add(aa.DragStart,cE),this.windowListeners.add(aa.VisibilityChange,this.handleCancel),this.windowListeners.add(aa.ContextMenu,cE),this.documentListeners.add(aa.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(dE(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(uE(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:s}=this.props;s(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(aa.Click,Hde,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(aa.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:s,props:a}=this,{onMove:o,options:{activationConstraint:l}}=a;if(!s)return;const c=(r=mw(t))!=null?r:Ka,u=Lh(s,c);if(!n&&l){if(uE(l)){if(l.tolerance!=null&&a1(u,l.tolerance))return this.handleCancel();if(a1(u,l.distance))return this.handleStart()}if(dE(l)&&a1(u,l.tolerance))return this.handleCancel();this.handlePending(l,u);return}t.cancelable&&t.preventDefault(),o(c)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===Et.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Gde={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class O2 extends R2{constructor(t){const{event:r}=t,n=Dd(r.target);super(t,Gde,n)}}O2.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const qde={move:{name:"mousemove"},end:{name:"mouseup"}};var xw;(function(e){e[e.RightClick=2]="RightClick"})(xw||(xw={}));class Kde extends R2{constructor(t){super(t,qde,Dd(t.event.target))}}Kde.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===xw.RightClick?!1:(n==null||n({event:r}),!0)}}];const i1={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Yde extends R2{constructor(t){super(t,i1)}static setup(){return window.addEventListener(i1.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(i1.move.name,t)};function t(){}}}Yde.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:s}=r;return s.length>1?!1:(n==null||n({event:r}),!0)}}];var If;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(If||(If={}));var rx;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="Rever
712sedTreeOrder"})(rx||(rx={}));function Xde(e){let{acceleration:t,activator:r=If.Pointer,canScroll:n,draggingRect:s,enabled:a,interval:o=5,order:l=rx.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:h}=e;const m=Jde({delta:f,disabled:!a}),[g,p]=lde(),x=v.useRef({x:0,y:0}),b=v.useRef({x:0,y:0}),w=v.useMemo(()=>{switch(r){case If.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case If.DraggableRect:return s}},[r,s,c]),y=v.useRef(null),_=v.useCallback(()=>{const k=y.current;if(!k)return;const S=x.current.x*b.current.x,E=x.current.y*b.current.y;k.scrollBy(S,E)},[]),N=v.useMemo(()=>l===rx.TreeOrder?[...u].reverse():u,[l,u]);v.useEffect(()=>{if(!a||!u.length||!w){p();return}for(const k of N){if((n==null?void 0:n(k))===!1)continue;const S=u.indexOf(k),E=d[S];if(!E)continue;const{direction:j,speed:T}=Mde(k,E,w,t,h);for(const R of["x","y"])m[R][j[R]]||(T[R]=0,j[R]=0);if(T.x>0||T.y>0){p(),y.current=k,g(_,o),x.current=T,b.current=j;return}}x.current={x:0,y:0},b.current={x:0,y:0},p()},[t,_,n,p,a,o,JSON.stringify(w),JSON.stringify(m),g,u,N,d,JSON.stringify(h)])}const Qde={x:{[xn.Backward]:!1,[xn.Forward]:!1},y:{[xn.Backward]:!1,[xn.Forward]:!1}};function Jde(e){let{delta:t,disabled:r}=e;const n=hw(t);return S0(s=>{if(r||!n||!s)return Qde;const a={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[xn.Backward]:s.x[xn.Backward]||a.x===-1,[xn.Forward]:s.x[xn.Forward]||a.x===1},y:{[xn.Backward]:s.y[xn.Backward]||a.y===-1,[xn.Forward]:s.y[xn.Forward]||a.y===1}}},[r,t,n])}function Zde(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return S0(s=>{var a;return t==null?null:(a=n??s)!=null?a:null},[n,t])}function efe(e,t){return v.useMemo(()=>e.reduce((r,n)=>{const{sensor:s}=n,a=s.activators.map(o=>({eventName:o.eventName,handler:t(o.handler,n)}));return[...r,...a]},[]),[e,t])}var $h;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})($h||($h={}));var gw;(function(e){e.Optimized="optimized"})(gw||(gw={}));const fE=new Map;function tfe(e,t){let{dragging:r,dependencies:n,config:s}=t;const[a,o]=v.useState(null),{frequency:l,measure:c,strategy:u}=s,d=v.useRef(e),f=x(),h=Mh(f),m=v.useCallback(function(b){b===void 0&&(b=[]),!h.current&&o(w=>w===null?b:w.concat(b.filter(y=>!w.includes(y))))},[h]),g=v.useRef(null),p=S0(b=>{if(f&&!r)return fE;if(!b||b===fE||d.current!==e||a!=null){const w=new Map;for(let y of e){if(!y)continue;if(a&&a.length>0&&!a.includes(y.id)&&y.rect.current){w.set(y.id,y.rect.current);continue}const _=y.node.current,N=_?new A2(c(_),_):null;y.rect.current=N,N&&w.set(y.id,N)}return w}return b},[e,a,r,f,c]);return v.useEffect(()=>{d.current=e},[e]),v.useEffect(()=>{f||m()},[r,f]),v.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),v.useEffect(()=>{f||typeof l!="number"||g.current!==null||(g.current=setTimeout(()=>{m(),g.current=null},l))},[l,f,m,...n]),{droppableRects:p,measureDroppableContainers:m,measuringScheduled:a!=null};function x(){switch(u){case $h.Always:return!1;case $h.BeforeDragging:return r;default:return!r}}}function H5(e,t){return S0(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function rfe(e,t){return H5(e,t)}function nfe(e){let{callback:t,disabled:r}=e;const n=C2(t),s=v.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(n)},[n,r]);return v.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function jg(e){let{callback:t,disabled:r}=e;const n=C2(t),s=v.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(n)},[r]);return v.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function sfe(e){return new A2(Id(e),e)}function hE(e,t,r){t===void 0&&(t=sfe);const[n,s]=v.useState(null);function a(){s(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??r)!=null?u:null}const d=t(e);return JSON.stringify(c)===JSON.stringify(d)?c:d})}const o=nfe({callback(c){if(e)for(const u of c){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){a();break}}}}),l=jg({callback:a});return _i(()=>{a(),e?(l==null||l.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),o==null||o.disconnect())},[e]),n}function afe(e){const t=H5(e);return F5(e,t)}const mE=[];function ife(e){const t=v.useRef(e),r=S0(n=>e?n&&n!==mE&&e&&t.current&&e.parentNode===t.current.parentNode?n:kg(e):mE,[e]);return v.useEffect(()=>{t.current=e},[e]),r}function ofe(e){const[t,r]=v.useState(null),n=v.useRef(e),s=v.useCallback(a=>{const o=s1(a.target);o&&r(l=>l?(l.set(o,pw(o)),new Map(l)):null)},[]);return v.useEffect(()=>{const a=n.current;if(e!==a){o(a);const l=e.map(c=>{const u=s1(c);return u?(u.addEventListener("scroll",s,{passive:!0}),[u,pw(u)]):null}).filter(c=>c!=null);r(l.length?new Map(l):null),n.current=e}return()=>{o(e),o(a)};function o(l){l.forEach(c=>{const u=s1(c);u==null||u.removeEventListener("scroll",s)})}},[s,e]),v.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,o)=>Mu(a,o),Ka):W5(e):Ka,[e,t])}function pE(e,t){t===void 0&&(t=[]);const r=v.useRef(null);return v.useEffect(()=>{r.current=null},t),v.useEffect(()=>{const n=e!==Ka;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?Lh(e,r.current):Ka}function lfe(e){v.useEffect(()=>{if(!Sg)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function cfe(e,t){return v.useMemo(()=>e.reduce((r,n)=>{let{eventName:s,handler:a}=n;return r[s]=o=>{a(o,t)},r},{}),[e,t])}function V5(e){return v.useMemo(()=>e?Ode(e):null,[e])}const xE=[];function ufe(e,t){t===void 0&&(t=Id);const[r]=e,n=V5(r?js(r):null),[s,a]=v.useState(xE);function o(){a(()=>e.length?e.map(c=>$5(c)?n:new A2(t(c),c)):xE)}const l=jg({callback:o});return _i(()=>{l==null||l.disconnect(),o(),e.forEach(c=>l==null?void 0:l.observe(c))},[e]),s}function dfe(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return N0(t)?t:e}function ffe(e){let{measure:t}=e;const[r,n]=v.useState(null),s=v.useCallback(u=>{for(const{target:d}of u)if(N0(d)){n(f=>{const h=t(d);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),a=jg({callback:s}),o=v.useCallback(u=>{const d=dfe(u);a==null||a.disconnect(),d&&(a==null||a.observe(d)),n(d?t(d):null)},[t,a]),[l,c]=ex(o);return v.useMemo(()=>({nodeRef:l,rect:r,setRef:c}),[r,l,c])}const hfe=[{sensor:O2,options:{}},{sensor:P2,options:{}}],mfe={current:{}},zm={draggable:{measure:lE},droppable:{measure:lE,strategy:$h.WhileDragging,frequency:gw.Optimized},dragOverlay:{measure:Id}};class Ff extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const pfe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ff,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:tx},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:zm,measureDroppableContainers:tx,windowRect:null,measuringScheduled:!1},xfe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:tx,draggableNodes:new Map,over:null,measureDroppableContainers:tx},Eg=v.createContext(xfe),G5=v.createContext(pfe);function gfe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ff}}}function vfe(e,t){switch(t.type){case on.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case on.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case on.DragEnd:case on.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case on.RegisterDroppable:{const{element:r}=t,{id:n}
712=r,s=new Ff(e.droppable.containers);return s.set(n,r),{...e,droppable:{...e.droppable,containers:s}}}case on.SetDroppableDisabled:{const{id:r,key:n,disabled:s}=t,a=e.droppable.containers.get(r);if(!a||n!==a.key)return e;const o=new Ff(e.droppable.containers);return o.set(r,{...a,disabled:s}),{...e,droppable:{...e.droppable,containers:o}}}case on.UnregisterDroppable:{const{id:r,key:n}=t,s=e.droppable.containers.get(r);if(!s||n!==s.key)return e;const a=new Ff(e.droppable.containers);return a.delete(r),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function yfe(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:s}=v.useContext(Eg),a=hw(n),o=hw(r==null?void 0:r.id);return v.useEffect(()=>{if(!t&&!n&&a&&o!=null){if(!T2(a)||document.activeElement===a.target)return;const l=s.get(o);if(!l)return;const{activatorNode:c,node:u}=l;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[c.current,u.current]){if(!d)continue;const f=dde(d);if(f){f.focus();break}}})}},[n,t,s,o,a]),null}function wfe(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((s,a)=>a({transform:s,...n}),r):r}function bfe(e){return v.useMemo(()=>({draggable:{...zm.draggable,...e==null?void 0:e.draggable},droppable:{...zm.droppable,...e==null?void 0:e.droppable},dragOverlay:{...zm.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function _fe(e){let{activeNode:t,measure:r,initialRect:n,config:s=!0}=e;const a=v.useRef(!1),{x:o,y:l}=typeof s=="boolean"?{x:s,y:s}:s;_i(()=>{if(!o&&!l||!t){a.current=!1;return}if(a.current||!n)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=r(u),f=F5(d,n);if(o||(f.x=0),l||(f.y=0),a.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=M5(u);h&&h.scrollBy({top:f.y,left:f.x})}},[t,o,l,n,r])}const q5=v.createContext({...Ka,scaleX:1,scaleY:1});var So;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(So||(So={}));const Nfe=v.memo(function(t){var r,n,s,a;let{id:o,accessibility:l,autoScroll:c=!0,children:u,sensors:d=hfe,collisionDetection:f=jde,measuring:h,modifiers:m,...g}=t;const p=v.useReducer(vfe,void 0,gfe),[x,b]=p,[w,y]=gde(),[_,N]=v.useState(So.Uninitialized),k=_===So.Initialized,{draggable:{active:S,nodes:E,translate:j},droppable:{containers:T}}=x,R=S!=null?E.get(S):null,P=v.useRef({initial:null,translated:null}),D=v.useMemo(()=>{var Ar;return S!=null?{id:S,data:(Ar=R==null?void 0:R.data)!=null?Ar:mfe,rect:P}:null},[S,R]),U=v.useRef(null),[Q,Y]=v.useState(null),[V,F]=v.useState(null),C=Mh(g,Object.values(g)),X=k0("DndDescribedBy",o),se=v.useMemo(()=>T.getEnabled(),[T]),A=bfe(h),{droppableRects:M,measureDroppableContainers:I,measuringScheduled:z}=tfe(se,{dragging:k,dependencies:[j.x,j.y],config:A.droppable}),J=Zde(E,S),Z=v.useMemo(()=>V?mw(V):null,[V]),re=Ld(),ae=rfe(J,A.draggable.measure);_fe({activeNode:S!=null?E.get(S):null,config:re.layoutShiftCompensation,initialRect:ae,measure:A.draggable.measure});const ne=hE(J,A.draggable.measure,ae),Se=hE(J?J.parentElement:null),B=v.useRef({activatorEvent:null,active:null,activeNode:J,collisionRect:null,collisions:null,droppableRects:M,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),qe=T.getNodeFor((r=B.current.over)==null?void 0:r.id),ue=ffe({measure:A.dragOverlay.measure}),Re=(n=ue.nodeRef.current)!=null?n:J,Ce=k?(s=ue.rect)!=null?s:ne:null,pe=!!(ue.nodeRef.current&&ue.rect),fe=afe(pe?null:ne),te=V5(Re?js(Re):null),Ne=ife(k?qe??J:null),be=ufe(Ne),Qe=wfe(m,{transform:{x:j.x-fe.x,y:j.y-fe.y,scaleX:1,scaleY:1},activatorEvent:V,active:D,activeNodeRect:ne,containerNodeRect:Se,draggingNodeRect:Ce,over:B.current.over,overlayNodeRect:ue.rect,scrollableAncestors:Ne,scrollableAncestorRects:be,windowRect:te}),nt=Z?Mu(Z,j):null,Je=ofe(Ne),Le=pE(Je),lt=pE(Je,[ne]),_e=Mu(Qe,Le),Te=Ce?Tde(Ce,Qe):null,et=D&&Te?f({active:D,collisionRect:Te,droppableRects:M,droppableContainers:se,pointerCoordinates:nt}):null,Be=I5(et,"id"),[ct,Gt]=v.useState(null),qt=pe?Qe:Mu(Qe,lt),nn=Ede(qt,(a=ct==null?void 0:ct.rect)!=null?a:null,ne),Es=v.useRef(null),ba=v.useCallback((Ar,nr)=>{let{sensor:wn,options:rt}=nr;if(U.current==null)return;const xt=E.get(U.current);if(!xt)return;
712const _t=Ar.nativeEvent,gr=new wn({active:U.current,activeNode:xt,event:_t,options:rt,context:B,onAbort(er){if(!E.get(er))return;const{onDragAbort:ir}=C.current,Kr={id:er};ir==null||ir(Kr),w({type:"onDragAbort",event:Kr})},onPending(er,fn,ir,Kr){if(!E.get(er))return;const{onDragPending:Cl}=C.current,O={id:er,constraint:fn,initialCoordinates:ir,offset:Kr};Cl==null||Cl(O),w({type:"onDragPending",event:O})},onStart(er){const fn=U.current;if(fn==null)return;const ir=E.get(fn);if(!ir)return;const{onDragStart:Kr}=C.current,El={activatorEvent:_t,active:{id:fn,data:ir.data,rect:P}};ca.unstable_batchedUpdates(()=>{Kr==null||Kr(El),N(So.Initializing),b({type:on.DragStart,initialCoordinates:er,active:fn}),w({type:"onDragStart",event:El}),Y(Es.current),F(_t)})},onMove(er){b({type:on.DragMove,coordinates:er})},onEnd:qr(on.DragEnd),onCancel:qr(on.DragCancel)});Es.current=gr;function qr(er){return async function(){const{active:ir,collisions:Kr,over:El,scrollAdjustedTranslate:Cl}=B.current;let O=null;if(ir&&Cl){const{cancelDrop:H}=C.current;O={activatorEvent:_t,active:ir,collisions:Kr,delta:Cl,over:El},er===on.DragEnd&&typeof H=="function"&&await Promise.resolve(H(O))&&(er=on.DragCancel)}U.current=null,ca.unstable_batchedUpdates(()=>{b({type:er}),N(So.Uninitialized),Gt(null),Y(null),F(null),Es.current=null;const H=er===on.DragEnd?"onDragEnd":"onDragCancel";if(O){const L=C.current[H];L==null||L(O),w({type:H,event:O})}})}}},[E]),Md=v.useCallback((Ar,nr)=>(wn,rt)=>{const xt=wn.nativeEvent,_t=E.get(rt);
712if(U.current!==null||!_t||xt.dndKit||xt.defaultPrevented)return;const gr={active:_t};Ar(wn,nr.options,gr)===!0&&(xt.dndKit={capturedBy:nr.sensor},U.current=rt,ba(wn,nr))},[E,ba]),Sl=efe(d,Md);lfe(d),_i(()=>{ne&&_===So.Initializing&&N(So.Initialized)},[ne,_]),v.useEffect(()=>{const{onDragMove:Ar}=C.current,{active:nr,activatorEvent:wn,collisions:rt,over:xt}=B.current;if(!nr||!wn)return;const _t={active:nr,activatorEvent:wn,collisions:rt,delta:{x:_e.x,y:_e.y},over:xt};ca.unstable_batchedUpdates(()=>{Ar==null||Ar(_t),w({type:"onDragMove",event:_t})})},[_e.x,_e.y]),v.useEffect(()=>{const{active:Ar,activatorEvent:nr,collisions:wn,droppableContainers:rt,scrollAdjustedTranslate:xt}=B.current;if(!Ar||U.current==null||!nr||!xt)return;const{onDragOver:_t}=C.current,gr=rt.get(Be),qr=gr&&gr.rect.current?{id:gr.id,rect:gr.rect.current,data:gr.data,disabled:gr.disabled}:null,er={active:Ar,activatorEvent:nr,collisions:wn,delta:{x:xt.x,y:xt.y},over:qr};ca.unstable_batchedUpdates(()=>{Gt(qr),_t==null||_t(er),w({type:"onDragOver",event:er})})},[Be]),_i(()=>{B.current={activatorEvent:V,active:D,activeNode:J,collisionRect:Te,collisions:et,droppableRects:M,draggableNodes:E,draggingNode:Re,draggingNodeRect:Ce,droppableContainers:T,over:ct,scrollableAncestors:Ne,scrollAdjustedTranslate:_e},P.current={initial:Ce,translated:Te}},[D,J,et,Te,E,Re,Ce,M,T,ct,Ne,_e]),Xde({...re,delta:j,draggingRect:Te,pointerCoordinates:nt,scrollableAncestors:Ne,scrollableAncestorRects:be});const kl=v.useMemo(()=>({active:D,activeNode:J,activeNodeRect:ne,activatorEvent:V,collisions:et,containerNodeRect:Se,dragOverlay:ue,draggableNodes:E,droppableContainers:T,droppableRects:M,over:ct,measureDroppableContainers:I,scrollableAncestors:Ne,scrollableAncestorRects:be,measuringConfiguration:A,measuringScheduled:z,windowRect:te}),[D,J,ne,V,et,Se,ue,E,T,M,ct,I,Ne,be,A,z,te]),jl=v.useMemo(()=>({activatorEvent:V,activators:Sl,active:D,activeNodeRect:ne,ariaDescribedById:{draggable:X},dispatch:b,draggableNodes:E,over:ct,measureDroppableContainers:I}),[V,Sl,D,ne,b,X,E,ct,I]);return ye.createElement(R5.Provider,{value:y},ye.createElement(Eg.Provider,{value:jl},ye.createElement(G5.Provider,{value:kl},ye.createElement(q5.Provider,{value:nn},u)),ye.createElement(yfe,{disabled:(l==null?void 0:l.restoreFocus)===!1})),ye.createElement(wde,{...l,hiddenTextDescribedById:X}));function Ld(){const Ar=(Q==null?void 0:Q.autoScrollEnabled)===!1,nr=typeof c=="object"?c.enabled===!1:c===!1,wn=k&&!Ar&&!nr;return typeof c=="object"?{...c,enabled:wn}:{enabled:wn}}}),Sfe=v.createContext(null),gE="button",kfe="Draggable";function jfe(e){let{id:t,data:r,disabled:n=!1,attributes:s}=e;const a=k0(kfe),{activators:o,activatorEvent:l,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:h}=v.useContext(Eg),{role:m=gE,roleDescription:g="draggable",tabIndex:p=0}=s??{},x=(c==null?void 0:c.id)===t,b=v.useContext(x?q5:Sfe),[w,y]=ex(),[_,N]=ex(),k=cfe(o,t),S=Mh(r);_i(()=>(f.set(t,{id:t,key:a,node:w,activatorNode:_,data:S}),()=>{const j=f.get(t);j&&j.key===a&&f.delete(t)}),[f,t]);const E=v.useMemo(()=>({role:m,tabIndex:p,"aria-disabled":n,"aria-pressed":x&&m===gE?!0:void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[n,m,p,x,g,d.draggable]);return{active:c,activatorEvent:l,activeNodeRect:u,attributes:E,isDragging:x,listeners:n?void 0:k,node:w,over:h,setNodeRef:y,setActivatorNodeRef:N,transform:b}}function Efe(){return v.useContext(G5)}const Cfe="Droppable",Tfe={timeout:25};function Afe(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:s}=e;const a=k0(Cfe),{active:o,dispatch:l,over:c,measureDroppableContainers:u}=v.useContext(Eg),d=v.useRef({disabled:r}),f=v.useRef(!1),h=v.useRef(null),m=v.useRef(null),{disabled:g,updateMeasurementsFor:p,timeout:x}={...Tfe,...s},b=Mh(p??n),w=v.useCallback(()=>{if(!f.current){f.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{u(Array.isArray(b.current)?b.current:[b.current]),m.current=null},x)},[x]),y=jg({callback:w,disabled:g||!o}),_=v.useCallback((E,j)=>{y&&(j&&(y.unobserve(j),f.current=!1),E&&y.observe(E))},[y]),[N,k]=ex(_),S=Mh(t);return v.useEffect(()=>{!y||!N.current||(y.disconnect(),f.current=!1,y.observe(N.current))},[N,y]),v.useEffect(()=>(l({type:on.RegisterDroppable,element:{id:n,key:a,disabled:r,node:N,rect:h,data:S}}),()=>l({type:on.UnregisterDroppable,key:a,id:n})),[n]),v.useEffect(()=>{r!==d.current.disabled&&(l({type:on.SetDroppableDisabled,id:n,key:a,disabled:r}),d.current.disabled=r)},[n,a,r,l]),{active:o,rect:h,isOver:(c==null?void 0:c.id)===n,node:N,over:c,setNodeRef:k}}function nx(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function Pfe(e,t){return e.reduce((r,n,s)=>{const a=t.get(n);return a&&(r[s]=a),r},Array(e.length))}function gm(e){return e!==null&&e>=0}function Rfe(e,t){if(e===t)return!0;
712if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function Ofe(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const K5=e=>{let{rects:t,activeIndex:r,overIndex:n,index:s}=e;const a=nx(t,n,r),o=t[s],l=a[s];return!l||!o?null:{x:l.left-o.left,y:l.top-o.top,scaleX:l.width/o.width,scaleY:l.height/o.height}},vm={scaleX:1,scaleY:1},Dfe=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:s,rects:a,overIndex:o}=e;const l=(t=a[r])!=null?t:n;if(!l)return null;if(s===r){const u=a[o];return u?{x:0,y:r<o?u.top+u.height-(l.top+l.height):u.top-l.top,...vm}:null}const c=Ife(a,s,r);return s>r&&s<=o?{x:0,y:-l.height-c,...vm}:s<r&&s>=o?{x:0,y:l.height+c,...vm}:{x:0,y:0,...vm}};function Ife(e,t,r){const n=e[t],s=e[t-1],a=e[t+1];return n?r<t?s?n.top-(s.top+s.height):a?a.top-(n.top+n.height):0:a?a.top-(n.top+n.height):s?n.top-(s.top+s.height):0:0}const Y5="Sortable",X5=ye.createContext({activeIndex:-1,containerId:Y5,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:K5,disabled:{draggable:!1,droppable:!1}});function Ffe(e){let{children:t,id:r,items:n,strategy:s=K5,disabled:a=!1}=e;const{active:o,dragOverlay:l,droppableRects:c,over:u,measureDroppableContainers:d}=Efe(),f=k0(Y5,r),h=l.rect!==null,m=v.useMemo(()=>n.map(k=>typeof k=="object"&&"id"in k?k.id:k),[n]),g=o!=null,p=o?m.indexOf(o.id):-1,x=u?m.indexOf(u.id):-1,b=v.useRef(m),w=!Rfe(m,b.current),y=x!==-1&&p===-1||w,_=Ofe(a);_i(()=>{w&&g&&d(m)},[w,m,g,d]),v.useEffect(()=>{b.current=m},[m]);const N=v.useMemo(()=>({activeIndex:p,containerId:f,disabled:_,disableTransforms:y,items:m,overIndex:x,useDragOverlay:h,sortedRects:Pfe(m,c),strategy:s}),[p,f,_.draggable,_.droppable,y,m,x,c,h,s]);return ye.createElement(X5.Provider,{value:N},t)}const Mfe=e=>{let{id:t,items:r,activeIndex:n,overIndex:s}=e;return nx(r,n,s).indexOf(t)},Lfe=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:s,items:a,newIndex:o,previousItems:l,previousContainerId:c,transition:u}=e;return!u||!n||l!==a&&s===o?!1:r?!0:o!==s&&t===c},Bfe={duration:200,easing:"ease"},Q5="transform",$fe=Bh.Transition.toString({property:Q5,duration:0,easing:"linear"}),Ufe={roleDescription:"sortable"};function Wfe(e){let{disabled:t,index:r,node:n,rect:s}=e;const[a,o]=v.useState(null),l=v.useRef(r);return _i(()=>{if(!t&&r!==l.current&&n.current){const c=s.current;if(c){const u=Id(n.current,{ignoreTransform:!0}),d={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(d.x||d.y)&&o(d)}}r!==l.current&&(l.current=r)},[t,r,n,s]),v.useEffect(()=>{a&&o(null)},[a]),a}function zfe(e){let{animateLayoutChanges:t=Lfe,attributes:r,disabled:n,data:s,getNewIndex:a=Mfe,id:o,strategy:l,resizeObserverConfig:c,transition:u=Bfe}=e;const{items:d,containerId:f,activeIndex:h,disabled:m,disableTransforms:g,sortedRects:p,overIndex:x,useDragOverlay:b,strategy:w}=v.useContext(X5),y=Hfe(n,m),_=d.indexOf(o),N=v.useMemo(()=>({sortable:{containerId:f,index:_,items:d},...s}),[f,s,_,d]),k=v.useMemo(()=>d.slice(d.indexOf(o)),[d,o]),{rect:S,node:E,isOver:j,setNodeRef:T}=Afe({id:o,data:N,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:k,...c}}),{active:R,activatorEvent:P,activeNodeRect:D,attributes:U,setNodeRef:Q,listeners:Y,isDragging:V,over:F,setActivatorNodeRef:C,transform:X}=jfe({id:o,data:N,attributes:{...Ufe,...r},disabled:y.draggable}),se=ode(T,Q),A=!!R,M=A&&!g&&gm(h)&&gm(x),I=!b&&V,z=I&&M?X:null,Z=M?z??(l??w)({rects:p,activeNodeRect:D,activeIndex:h,overIndex:x,index:_}):null,re=gm(h)&&gm(x)?a({id:o,items:d,activeIndex:h,overIndex:x}):_,ae=R==null?void 0:R.id,ne=v.useRef({activeId:ae,items:d,newIndex:re,containerId:f}),Se=d!==ne.current.items,B=t({active:R,containerId:f,isDragging:V,isSorting:A,id:o,index:_,items:d,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:u,wasDragging:ne.current.activeId!=null}),qe=Wfe({disabled:!B,index:_,node:E,rect:S});return v.useEffect(()=>{A&&ne.current.newIndex!==re&&(ne.current.newIndex=re),f!==ne.current.containerId&&(ne.current.containerId=f),d!==ne.current.items&&(ne.current.items=d)},[A,re,f,d]),v.useEffect(()=>{if(ae===ne.current.activeId)return;if(ae!=null&&ne.current.activeId==null){ne.current.activeId=ae;return}const Re=setTimeout(()=>{ne.current.activeId=ae},50);return()=>clearTimeout(Re)},[ae]),{active:R,activeIndex:h,attributes:U,data:N,rect:S,index:_,newIndex:re,items:d,isOver:j,isSorting:A,isDragging:V,listeners:Y,node:E,overIndex:x,over:F,setNodeRef:se,setActivatorNodeRef:C,setDroppableNodeRef:T,setDraggableNodeRef:Q,transform:qe??Z,transition:ue()};function ue(){if(qe||Se&&ne.current.newIndex===_)return $fe;if(!(I&&!T2(P)||!u)&&(A||B))return Bh.Transition.toString({...u,property:Q5})}}function Hfe(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(n=e==null?void 0:e.droppable)!=null?n:t.droppable}}function sx(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Vfe=[Et.Down,Et.Right,Et.Up,Et.Left],Gfe=(e,t)=>
712{let{context:{active:r,collisionRect:n,droppableRects:s,droppableContainers:a,over:o,scrollableAncestors:l}}=t;if(Vfe.includes(e.code)){if(e.preventDefault(),!r||!n)return;const c=[];a.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=s.get(f.id);if(h)switch(e.code){case Et.Down:n.top<h.top&&c.push(f);break;case Et.Up:n.top>h.top&&c.push(f);break;case Et.Left:n.left>h.left&&c.push(f);break;case Et.Right:n.left<h.left&&c.push(f);break}});const u=Sde({active:r,collisionRect:n,droppableRects:s,droppableContainers:c,pointerCoordinates:null});let d=I5(u,"id");if(d===(o==null?void 0:o.id)&&u.length>1&&(d=u[1].id),d!=null){const f=a.get(r.id),h=a.get(d),m=h?s.get(h.id):null,g=h==null?void 0:h.node.current;if(g&&m&&f&&h){const x=kg(g).some((k,S)=>l[S]!==k),b=J5(f,h),w=qfe(f,h),y=x||!b?{x:0,y:0}:{x:w?n.width-m.width:0,y:w?n.height-m.height:0},_={x:m.left,y:m.top};return y.x&&y.y?_:Lh(_,y)}}}};function J5(e,t){return!sx(e)||!sx(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function qfe(e,t){return!sx(e)||!sx(t)||!J5(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function Kfe({lesson:e,onToggleStatus:t,onWatchVideo:r,onEdit:n,onDelete:s,isEditing:a,editingTitle:o,onEditingTitleChange:l,onSaveEdit:c,onCancelEdit:u}){const{attributes:d,listeners:f,setNodeRef:h,transform:m,transition:g,isDragging:p}=zfe({id:e.id}),x={transform:Bh.Transform.toString(m),transition:g,opacity:p?.5:1},b=e.status==="inactive";return i.jsx("div",{ref:h,style:x,className:xe("bg-card rounded-2xl shadow-card border border-border p-5 hover:shadow-elevated transition-all duration-300",b&&"opacity-60"),children:i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("button",{className:"cursor-grab active:cursor-grabbing touch-none p-1 -m-1 text-muted-foreground hover:text-foreground transition-colors",...d,...f,children:i.jsx(yL,{className:"h-5 w-5"})}),i.jsx("div",{className:"w-12 h-12 rounded-xl gradient-rose flex items-center justify-center shrink-0",children:i.jsx($a,{className:"h-6 w-6 text-foreground"})}),i.jsx("div",{className:"flex-1",children:a?i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Oe,{value:o,onChange:w=>l(w.target.value),className:"h-8 text-sm",autoFocus:!0,onKeyDown:w=>{w.key==="Enter"&&c(),w.key==="Escape"&&u()}}),i.jsx(ee,{variant:"ghost",size:"icon",className:"h-8 w-8 text-green-600 hover:text-green-700",onClick:c,children:i.jsx(hn,{className:"h-4 w-4"})}),i.jsx(ee,{variant:"ghost",size:"icon",className:"h-8 w-8 text-red-600 hover:text-red-700",onClick:u,children:i.jsx(es,{className:"h-4 w-4"})})]}):i.jsxs(i.Fragment,{children:[i.jsx("h3",{className:"font-semibold text-foreground mb-1",children:e.title}),i.jsx("p",{className:"text-sm text-muted-foreground",children:e.courseName})]})})]}),i.jsxs("div",{className:"flex items-center gap-2 sm:flex-col sm:items-end",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(We,{className:xe(b?"bg-gray-100 text-gray-600":"bg-green-100 text-green-700"),children:b?"לא פעיל":"פעיל"}),i.jsx(ee,{variant:"ghost",size:"icon",onClick:()=>n(e.id,e.title),className:"h-8 w-8 text-muted-foreground hover:text-foreground",title:"ערוך שם",children:i.jsx(wd,{className:"h-4 w-4"})}),i.jsx(ee,{variant:"ghost",size:"icon",onClick:()=>t(e.id,e.status,e.title),className:xe("h-8 w-8",b?"text-gray-400":"text-green-600"),title:b?"הפעל שיעור":"השבת שיעור",children:i.jsx(B4,{className:"h-4 w-4"})}),i.jsx(ee,{variant:"ghost",size:"icon",onClick:()=>s(e.id,e.title),className:"h-8 w-8 text-red-500 hover:text-red-600 hover:bg-red-50",title:"מחק שיעור",children:i.jsx(Ia,{className:"h-4 w-4"})})]}),e.videoUrl&&i.jsxs(ee,{variant:"outline",size:"sm",className:"gap-1",onClick:()=>r(e),children:[i.jsx(L4,{className:"h-3 w-3"}),"צפה בהקלטה"]})]})]})})}function Yfe(){const{activeCourses:e,courses:t}=xl(),{lessons:r,addLesson:n,updateLessonStatus:s,updateLessonTitle:a,deleteLesson:o,reorderLessons:l}=f3(),[c,u]=v.useState(null),[d,f]=v.useState(!1),[h,m]=v.useState(null),[g,p]=v.useState(null),[x,b]=v.useState(""),[w,y]=v.useState(!1),[_,N]=v.useState(null),k=bde(aE(O2,{activationConstraint:{distance:8}}),aE(P2,{coordinateGetter:Gfe})),S=C=>{C.videoUrl&&(m({title:C.title,videoUrl:C.videoUrl}),f(!0))},E=C=>{n({title:C.title,courseId:C.courseId,courseName:C.courseName,type:C.type,videoUrl:C.videoUrl})},j=(C,X,se)=>{const A=X==="active"?"inactive":"active";s(C,A),K.success(A==="active"?`השיעור "${se}" הופעל`:`השיעור "${se}" הופסק`)},T=(C,X)=>{p(C),b(X)},R=async()=>
712{if(!(!g||!x.trim()))try{await a(g,x.trim()),K.success("שם השיעור עודכן"),p(null),b("")}catch{K.error("שגיאה בעדכון השיעור")}},P=()=>{p(null),b("")},D=(C,X)=>{N({id:C,title:X}),y(!0)},U=async()=>{if(_)try{await o(_.id),K.success(`השיעור "${_.title}" נמחק`)}catch{K.error("שגיאה במחיקת השיעור")}finally{y(!1),N(null)}},Q=async C=>{const{active:X,over:se}=C;if(se&&X.id!==se.id){const A=V.findIndex(I=>I.id===X.id),M=V.findIndex(I=>I.id===se.id);if(c){const I=nx(V,A,M),z=r.map(J=>{const Z=I.findIndex(re=>re.id===J.id);return Z!==-1?I[Z].id:J.id});await l(z)}else{const I=nx(r,A,M);await l(I.map(z=>z.id))}K.success("סדר השיעורים עודכן")}},Y=t.filter(C=>r.some(X=>X.courseId===C.id)),V=c?r.filter(C=>C.courseId===c):r,F=C=>r.filter(X=>X.courseId===C).length;return i.jsxs(Hn,{children:[i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 animate-fade-in",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-foreground",children:"שיעורים"}),i.jsxs("p",{className:"text-muted-foreground mt-1",children:["ניהול שיעורים (",V.length," שיעורים) • גרור לשינוי סדר"]})]}),i.jsx(ide,{courses:e,onAddLesson:E})]}),Y.length>0&&i.jsxs("div",{className:"flex flex-wrap gap-2 animate-slide-up",children:[i.jsxs(ee,{variant:c===null?"default":"outline",size:"sm",onClick:()=>u(null),className:"gap-2",children:["הכל",i.jsx(We,{variant:"secondary",className:"mr-1",children:r.length})]}),Y.map(C=>i.jsxs(ee,{variant:c===C.id?"default":"outline",size:"sm",onClick:()=>u(C.id),className:"gap-2",children:[C.name,i.jsx(We,{variant:"secondary",className:"mr-1",children:F(C.id)})]},C.id))]}),i.jsx(Nfe,{sensors:k,collisionDetection:Nde,onDragEnd:Q,children:i.jsx(Ffe,{items:V.map(C=>C.id),strategy:Dfe,children:i.jsx("div",{className:"space-y-4",children:V.map(C=>i.jsx(Kfe,{lesson:C,onToggleStatus:j,onWatchVideo:S,onEdit:T,onDelete:D,isEditing:g===C.id,editingTitle:x,onEditingTitleChange:b,onSaveEdit:R,onCancelEdit:P},C.id))})})}),V.length===0&&i.jsx("div",{className:"text-center py-12",children:i.jsx("p",{className:"text-muted-foreground",children:c?"לא נמצאו שיעורים בקורס זה":"לא נמצאו שיעורים"})})]}),i.jsx(Ht,{open:d,onOpenChange:f,children:i.jsxs(Ut,{className:"sm:max-w-4xl p-0",dir:"rtl",children:[i.jsx(Wt,{className:"p-4 pb-0",children:i.jsx(zt,{className:"text-right",children:h==null?void 0:h.title})}),i.jsx("div",{className:"p-4 pt-2",children:(h==null?void 0:h.videoUrl)&&i.jsx("div",{className:"relative w-full",style:{paddingBottom:"56.25%"},children:i.jsx("iframe",{src:`https://player.vimeo.com/video/${h.videoUrl}?autoplay=1`,className:"absolute top-0 left-0 w-full h-full rounded-lg",frameBorder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0,title:h.title})})})]})}),i.jsx(qs,{open:w,onOpenChange:y,children:i.jsxs(ys,{dir:"rtl",children:[i.jsxs(ws,{children:[i.jsx(_s,{className:"text-right",children:"מחיקת שיעור"}),i.jsxs(Ns,{className:"text-right",children:['האם אתה בטוח שברצונך למחוק את השיעור "',_==null?void 0:_.title,'"?',i.jsx("br",{}),"פעולה זו לא ניתנת לביטול."]})]}),i.jsxs(bs,{className:"flex-row-reverse gap-2",children:[i.jsx(ks,{children:"ביטול"}),i.jsx(Ss,{onClick:U,className:"bg-red-600 hover:bg-red-700",children:"מחק"})]})]})})]})}var D2="Progress",I2=100,[Xfe,rme]=tn(D2),[Qfe,Jfe]=Xfe(D2),Z5=v.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:s,getValueLabel:a=Zfe,...o}=e;(s||s===0)&&!vE(s)&&console.error(ehe(`${s}`,"Progress"));const l=vE(s)?s:I2;n!==null&&!yE(n,l)&&console.error(the(`${n}`,"Progress"));const c=yE(n,l)?n:null,u=ax(c)?a(c,l):void 0;return i.jsx(Qfe,{scope:r,value:c,max:l,children:i.jsx(He.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":ax(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":rF(c,l),"data-value":c??void 0,"data-max":l,...o,ref:t})})});Z5.displayName=D2;var eF="ProgressIndicator",tF=v.forwardRef((e,t)=>
712{const{__scopeProgress:r,...n}=e,s=Jfe(eF,r);return i.jsx(He.div,{"data-state":rF(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...n,ref:t})});tF.displayName=eF;function Zfe(e,t){return`${Math.round(e/t*100)}%`}function rF(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function ax(e){return typeof e=="number"}function vE(e){return ax(e)&&!isNaN(e)&&e>0}function yE(e,t){return ax(e)&&!isNaN(e)&&e<=t&&e>=0}function ehe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${I2}\`.`}function the(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
713  - a positive number
714  - less than the value passed to \`max\` (or ${I2} if no \`max\` prop is set)
715  - \`null\` or \`undefined\` if the progress is indeterminate.
716
717Defaulting to \`null\`.`}var nF=Z5,rhe=tF;const j0=v.forwardRef(({className:e,value:t,...r},n)=>i.jsx(nF,{ref:n,className:xe("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:i.jsx(rhe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));j0.displayName=nF.displayName;function Fd({value:e,onChange:t,placeholder:r="בחר תאריך",disabled:n=!1,id:s}){const[a,o]=v.useState(!1),l=v.useMemo(()=>{if(!e)return;const d=g2(e,"yyyy-MM-dd",new Date);return bg(d)?d:void 0},[e]),c=d=>{d&&t($t(d,"yyyy-MM-dd")),o(!1)},u=l?$t(l,"dd/MM/yyyy"):null;return i.jsxs(i2,{open:a,onOpenChange:o,children:[i.jsx(o2,{asChild:!0,children:i.jsxs(ee,{id:s,variant:"outline",disabled:n,className:xe("w-full justify-start text-right font-normal",!l&&"text-muted-foreground"),children:[i.jsx(rr,{className:"ml-2 h-4 w-4"}),u||i.jsx("span",{children:r})]})}),i.jsx(wg,{className:"w-auto p-0",align:"start",children:i.jsx(Ng,{mode:"single",selected:l,onSelect:c,initialFocus:!0,locale:Tn,className:xe("p-3 pointer-events-auto"),dir:"rtl"})})]})}function nhe({onAddPhotoDay:e}){const[t,r]=v.useState(!1),[n,s]=v.useState(""),[a,o]=v.useState(""),[l,c]=v.useState("תל אביב"),[u,d]=v.useState(""),[f,h]=v.useState(""),[m,g]=v.useState(""),[p,x]=v.useState(!1),b=async w=>{if(w.preventDefault(),!n.trim()){K.error("נא להזין תאריך");return}if(!a.trim()){K.error("נא להזין שעה");return}if(!u||parseFloat(u)<=0){K.error("נא להזין מחיר מחירון תקין");return}if(!f||parseFloat(f)<=0){K.error("נא להזין מחיר ירין שחף תקין");return}if(!m||parseInt(m)<=0){K.error("נא להזין כמות מותרת לרישום");return}x(!0);try{e({date:n.trim(),time:a.trim(),branch:l,listPrice:parseFloat(u),yarinShachafPrice:parseFloat(f),maxParticipants:parseInt(m)}),K.success("יום צילום נוסף בהצלחה"),s(""),o(""),c("תל אביב"),d(""),h(""),g(""),r(!1)}catch{K.error("שגיאה בהוספת יום צילום")}finally{x(!1)}};return i.jsxs(Ht,{open:t,onOpenChange:r,children:[i.jsx(va,{asChild:!0,children:i.jsxs(ee,{variant:"rose",className:"gap-2",children:[i.jsx(hs,{className:"h-4 w-4"}),"הוסף יום צילום"]})}),i.jsxs(Ut,{className:"sm:max-w-md",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"הוספת יום צילום חדש"})}),i.jsxs("form",{onSubmit:b,className:"space-y-4 mt-4",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"date",children:"תאריך"}),i.jsx(Fd,{id:"date",value:n,onChange:s,placeholder:"בחר תאריך"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"time",children:"שעה"}),i.jsxs(At,{value:a,onValueChange:o,children:[i.jsx(Ct,{children:i.jsx(Pt,{placeholder:"בחר שעה"})}),i.jsx(Tt,{children:Array.from({length:19},(w,y)=>{const _=Math.floor(y/2)+9,N=y%2===0?"00":"30",k=`${_.toString().padStart(2,"0")}:${N}`;return i.jsx($e,{value:k,children:k},k)})})]})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"branch",children:"סניף"}),i.jsxs(At,{value:l,onValueChange:w=>c(w),children:[i.jsx(Ct,{className:"text-right",children:i.jsx(Pt,{placeholder:"בחר סניף"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"תל אביב",children:"תל אביב"}),i.jsx($e,{value:"חיפה",children:"חיפה"})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"maxParticipants",children:"כמות מותרת לרישום"}),i.jsx(Oe,{id:"maxParticipants",type:"number",value:m,onChange:w=>g(w.target.value),dir:"ltr",min:"1"})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"listPrice",children:"מחיר מחירון (₪)"}),i.jsx(Oe,{id:"listPrice",type:"number",value:u,onChange:w=>d(w.target.value),dir:"ltr",min:"0"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"yarinShachafPrice",children:"מחיר ירין שחף (₪)"}),i.jsx(Oe,{id:"yarinShachafPrice",type:"number",value:f,onChange:w=>h(w.target.value),dir:"ltr",min:"0"})]})]}),i.jsxs("div",{className:"flex gap-3 pt-4",children:[i.jsx(ee,{type:"submit",variant:"rose",className:"flex-1",disabled:p,children:p?"מוסיף...":"הוסף יום צילום"}),i.jsx(ee,{type:"button",variant:"outline",onClick:()=>r(!1),children:"ביטול"})]})]})]})]})}function she({photoDay:e,open:t,onOpenChange:r,onSave:n}){const[s,a]=v.useState(""),[o,l]=v.useState(""),[c,u]=v.useState("תל אביב"),[d,f]=v.useState(""),[h,m]=v.useState(""),[g,p]=v.useState(""),[x,b]=v.useState(!1);v.useEffect(()=>{e&&(a(e.date),l(e.time),u(e.branch),f(e.listPrice.toString()),m(e.yarinShachafPrice.toString()),p(e.maxParticipants.toString()))},[e]);const w=async y=>{if(y.preventDefault(),!!e){if(!s.trim()){K.error("נא להזין תאריך");return}if(!o.trim()){K.error("נא להזין שעה");return}if(!d||parseFloat(d)<=0){K.error("נא להזין מחיר מחירון תקי×
717Ÿ");return}if(!h||parseFloat(h)<=0){K.error("נא להזין מחיר ירין שחף תקין");return}if(!g||parseInt(g)<=0){K.error("נא להזין כמות מותרת לרישום");return}b(!0);try{const{error:_}=await de.from("photo_days").update({date:s.trim(),time:o.trim(),branch:c,list_price:parseFloat(d),yarin_shachaf_price:parseFloat(h),max_participants:parseInt(g),name:`יום צילום ${new Date(s).toLocaleDateString("he-IL")}`}).eq("id",e.id);if(_)throw _;n({...e,date:s.trim(),time:o.trim(),branch:c,listPrice:parseFloat(d),yarinShachafPrice:parseFloat(h),maxParticipants:parseInt(g)}),K.success("יום הצילום עודכן בהצלחה"),r(!1)}catch(_){console.error("Error updating photo day:",_),K.error("שגיאה בעדכון יום הצילום")}finally{b(!1)}}};return i.jsx(Ht,{open:t,onOpenChange:r,children:i.jsxs(Ut,{className:"sm:max-w-md",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"עריכת יום צילום"})}),i.jsxs("form",{onSubmit:w,className:"space-y-4 mt-4",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-date",children:"תאריך"}),i.jsx(Fd,{id:"edit-date",value:s,onChange:a,placeholder:"בחר תאריך"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-time",children:"שעה"}),i.jsxs(At,{value:o,onValueChange:l,children:[i.jsx(Ct,{children:i.jsx(Pt,{placeholder:"בחר שעה"})}),i.jsx(Tt,{children:Array.from({length:19},(y,_)=>{const N=Math.floor(_/2)+9,k=_%2===0?"00":"30",S=`${N.toString().padStart(2,"0")}:${k}`;return i.jsx($e,{value:S,children:S},S)})})]})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-branch",children:"סניף"}),i.jsxs(At,{value:c,onValueChange:y=>u(y),children:[i.jsx(Ct,{className:"text-right",children:i.jsx(Pt,{placeholder:"בחר סניף"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"תל אביב",children:"תל אביב"}),i.jsx($e,{value:"חיפה",children:"חיפה"})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-maxParticipants",children:"כמות מותרת לרישום"}),i.jsx(Oe,{id:"edit-maxParticipants",type:"number",value:g,onChange:y=>p(y.target.value),dir:"ltr",min:"1"})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-listPrice",children:"מחיר מחירון (₪)"}),i.jsx(Oe,{id:"edit-listPrice",type:"number",value:d,onChange:y=>f(y.target.value),dir:"ltr",min:"0"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-yarinShachafPrice",children:"מחיר ירין שחף (₪)"}),i.jsx(Oe,{id:"edit-yarinShachafPrice",type:"number",value:h,onChange:y=>m(y.target.value),dir:"ltr",min:"0"})]})]}),i.jsxs("div",{className:"flex gap-3 pt-4",children:[i.jsx(ee,{type:"submit",variant:"rose",className:"flex-1",disabled:x,children:x?"שומר...":"שמור שינויים"}),i.jsx(ee,{type:"button",variant:"outline",onClick:()=>r(!1),children:"ביטול"})]})]})]})})}function ahe({open:e,onOpenChange:t,photoDayDate:r,photoDayId:n,eventDate:s,students:a,onAttendanceUpdate:o}){const[l,c]=v.useState({}),[u,d]=v.useState({}),[f,h]=v.useState(null),[m,g]=v.useState(null),x=(()=>{if(!s)return!0;const N=new Date;N.setHours(0,0,0,0);const k=new Date(s);return k.setHours(0,0,0,0),k<=N})();v.useEffect(()=>{const N={},k={};a.forEach(S=>{S.registrationId&&(N[S.registrationId]=S.attended??null,k[S.registrationId]=S.imageUrl||"")}),c(N),d(k)},[a]);const b=async(N,k)=>{const S=k==="attended"?!0:k==="not_attended"?!1:null;h(N);try{const{error:E}=await de.from("photo_day_registrations").update({attended:S}).eq("id",N);if(E)throw E;c(j=>({...j,[N]:S})),o==null||o()}catch(E){console.error("Error updating attendance:",E),K.error("שגיאה בעדכון נוכחות")}finally{h(null)}},w=async N=>{var S;const k=((S=u[N])==null?void 0:S.trim())||null;g(N);try{const{error:E}=await de.from("photo_day_registrations").update({image_url:k}).eq("id",N);if(E)throw E;K.success("URL התמונות נשמר בהצלחה"),o==null||o()}catch(E){console.error("Error saving image URL:",E),K.error("שגיאה בשמירת URL התמונות")}finally{g(null)}},y=N=>N===!0?"attended":N===!1?"not_attended":"not_marked",_=()=>{const N=`
718      <html dir="rtl">
719        <head>
720          <title>רשימת משתתפים - יום צילום ${r}</title>
721          <style>
722            body { font-family: Arial, sans-serif; padding: 20px; }
723            h1 { font-size: 18px; margin-bottom: 20px; }
724            table { width: 100%; border-collapse: collapse; }
725            th, td { border: 1px solid #ddd; padding: 10px; text-align: right; }
726            th { background-color: #f5f5f5; }
727            .footer { margin-top: 20px; font-size: 12px; color: #666; }
728            .attended { color: green; }
729            .not-attended { color: red; }
730          </style>
731        </head>
732        <body>
733          <h1>רשימת משתתפים - יום צילום ${r}</h1>
734          <table>
735            <thead>
736              <tr>
737                <th>#</th>
738                <th>שם</th>
739                <th>טלפון</th>
740                <th>נוכחות</th>
741              </tr>
742            </thead>
743            <tbody>
744              ${a.map((S,E)=>{const j=S.registrationId?l[S.registrationId]:null,T=j===!0?'<span class="attended">
744הגיעה</span>':j===!1?'<span class="not-attended">לא הגיעה</span>':"לא סומנה";return`
745                  <tr>
746                    <td>${E+1}</td>
747                    <td>${S.name}</td>
748                    <td dir="ltr">${S.phone}</td>
749                    <td>${T}</td>
750                  </tr>
751                `}).join("")}
752            </tbody>
753          </table>
754          <p class="footer">סה״כ ${a.length} תלמידות רשומות</p>
755        </body>
756      </html>
757    `,k=window.open("","_blank");k&&(k.document.write(N),k.document.close(),k.print())};return i.jsx(Ht,{open:e,onOpenChange:t,children:i.jsxs(Ut,{className:"sm:max-w-lg",dir:"rtl",children:[i.jsx(Wt,{children:i.jsxs(zt,{className:"text-right",children:["תלמידות רשומות - ",r]})}),i.jsxs("div",{className:"mt-4",children:[!x&&i.jsx("div",{className:"mb-3 p-2 bg-amber-50 border border-amber-200 rounded-lg text-sm text-amber-700",children:"לא ניתן לסמן נוכחות לפני מועד האירוע"}),a.length===0?i.jsx("p",{className:"text-center text-muted-foreground py-8",children:"אין תלמידות רשומות ליום צילום זה"}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex justify-end mb-3",children:i.jsxs(ee,{variant:"outline",size:"sm",onClick:_,children:[i.jsx(bb,{className:"h-4 w-4 ml-2"}),"הדפסה"]})}),i.jsx("div",{className:"space-y-3 max-h-80 overflow-y-auto",children:a.map((N,k)=>{const S=N.registrationId?l[N.registrationId]:null,E=f===N.registrationId;return i.jsxs("div",{className:"p-3 bg-muted/50 rounded-xl hover:bg-muted transition-colors space-y-2",children:[i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[i.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl gradient-rose flex items-center justify-center flex-shrink-0",children:i.jsx("span",{className:"text-sm font-semibold text-foreground",children:N.name.charAt(0)})}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("p",{className:"font-medium text-foreground truncate",children:N.name}),i.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[i.jsx(Jh,{className:"h-3 w-3"}),i.jsx("span",{dir:"ltr",children:N.phone})]})]})]}),i.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[N.registrationId&&i.jsxs(At,{value:y(S),onValueChange:j=>b(N.registrationId,j),disabled:E||!x,children:[i.jsx(Ct,{className:"w-[140px] h-8 text-xs",children:i.jsx(Pt,{})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"not_marked",children:"לא סומנה נוכחות"}),i.jsx($e,{value:"attended",children:"הגיעה"}),i.jsx($e,{value:"not_attended",children:"לא הגיעה"})]})]}),i.jsxs("span",{className:"text-xs text-muted-foreground w-6 text-center",children:["#",k+1]})]})]}),N.registrationId&&x&&i.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-border/50",children:[i.jsx(Wi,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),i.jsx(Oe,{type:"url",placeholder:"URL תמונות",value:u[N.registrationId]||"",onChange:j=>d(T=>({...T,[N.registrationId]:j.target.value})),className:"h-8 text-xs flex-1",dir:"ltr"}),i.jsx(ee,{type:"button",variant:"outline",size:"sm",className:"h-8 px-2",onClick:()=>w(N.registrationId),disabled:m===N.registrationId,children:m===N.registrationId?i.jsx(yr,{className:"h-4 w-4 animate-spin"}):i.jsx(hn,{className:"h-4 w-4"})})]})]},N.id)})})]}),i.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:i.jsxs("p",{className:"text-sm text-muted-foreground text-center",children:["סה״כ ",a.length," תלמידות רשומות"]})})]})]})})}var F2="Radio",[ihe,sF]=tn(F2),[ohe,lhe]=ihe(F2),aF=v.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:a,disabled:o,value:l="on",onCheck:c,form:u,...d}=e,[f,h]=v.useState(null),m=ot(t,x=>h(x)),g=v.useRef(!1),p=f?u||!!f.closest("form"):!0;return i.jsxs(ohe,{scope:r,checked:s,disabled:o,children:[i.jsx(He.button,{type:"button",role:"radio","aria-checked":s,"data-state":cF(s),"data-disabled":o?"":void 0,disabled:o,value:l,...d,ref:m,onClick:ke(e.onClick,x=>{s||c==null||c(),p&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),p&&i.jsx(lF,{control:f,bubbles:!g.current,name:n,value:l,checked:s,required:a,disabled:o,form:u,style:{transform:"translateX(-100%)"}})]})});aF.displayName=F2;var iF="RadioIndicator",oF=v.forwardRef((e,t)=>
757{const{__scopeRadio:r,forceMount:n,...s}=e,a=lhe(iF,r);return i.jsx(rn,{present:n||a.checked,children:i.jsx(He.span,{"data-state":cF(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:t})})});oF.displayName=iF;var che="RadioBubbleInput",lF=v.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...s},a)=>{const o=v.useRef(null),l=ot(o,a),c=Xx(r),u=Rx(t);return v.useEffect(()=>{const d=o.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(c!==r&&m){const g=new Event("click",{bubbles:n});m.call(d,r),d.dispatchEvent(g)}},[c,r,n]),i.jsx(He.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:l,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});lF.displayName=che;function cF(e){return e?"checked":"unchecked"}var uhe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Cg="RadioGroup",[dhe,nme]=tn(Cg,[Pd,sF]),uF=Pd(),dF=sF(),[fhe,hhe]=dhe(Cg),fF=v.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:a,required:o=!1,disabled:l=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...h}=e,m=uF(r),g=Oc(u),[p,x]=ps({prop:a,defaultProp:s??null,onChange:f,caller:Cg});return i.jsx(fhe,{scope:r,name:n,required:o,disabled:l,value:p,onValueChange:x,children:i.jsx(K_,{asChild:!0,...m,orientation:c,dir:g,loop:d,children:i.jsx(He.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":l?"":void 0,dir:g,...h,ref:t})})})});fF.displayName=Cg;var hF="RadioGroupItem",mF=v.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...s}=e,a=hhe(hF,r),o=a.disabled||n,l=uF(r),c=dF(r),u=v.useRef(null),d=ot(t,u),f=a.value===s.value,h=v.useRef(!1);return v.useEffect(()=>{const m=p=>{uhe.includes(p.key)&&(h.current=!0)},g=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",g)}},[]),i.jsx(Y_,{asChild:!0,...l,focusable:!o,active:f,children:i.jsx(aF,{disabled:o,required:a.required,checked:f,...c,...s,name:a.name,ref:d,onCheck:()=>a.onValueChange(s.value),onKeyDown:ke(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:ke(s.onFocus,()=>{var m;h.current&&((m=u.current)==null||m.click())})})})});mF.displayName=hF;var mhe="RadioGroupIndicator",pF=v.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,s=dF(r);return i.jsx(oF,{...s,...n,ref:t})});pF.displayName=mhe;var xF=fF,gF=mF,phe=pF;const E0=v.forwardRef(({className:e,...t},r)=>i.jsx(xF,{className:xe("grid gap-2",e),...t,ref:r}));E0.displayName=xF.displayName;const pd=v.forwardRef(({className:e,...t},r)=>i.jsx(gF,{ref:r,className:xe("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:i.jsx(phe,{className:"flex items-center justify-center",children:i.jsx(T4,{className:"h-2.5 w-2.5 fill-current text-current"})})}));pd.displayName=gF.displayName;function M2({eventId:e,eventName:t,eventType:r,eventPrice:n,onRegistrationComplete:s}){const[a,o]=v.useState(!1),[l,c]=v.useState(""),[u,d]=v.useState("no"),[f,h]=v.useState(!1),[m,g]=v.useState(!1),[p,x]=v.useState(null),[b,w]=v.useState(null),y=()=>{c(""),d("no"),x(null),w(null)},_=async()=>{if(!l.trim()){w("יש להזין תעודת זהות או טלפון");return}h(!0),w(null),x(null);try{const{data:k,error:S}=await de.from("students").select("id, name, phone, id_number").or(`id_number.eq.${l},phone.eq.${l}`).single();if(S||!k){w("לא נמצא תלמיד עם הפרטים שהוזנו");return}const{data:E}=await de.from("wallet_transactions").select("amount, type, category").eq("student_id",k.id).in("category",["credit","monetary_credit"]);let j=0;(E||[]).forEach(T=>{T.type==="credit"?j+=T.amount:T.type==="debit"&&(j-=T.amount)}),x({id:k.id,name:k.name,phone:k.phone,moneyCredit:j})}catch(k){console.error("Error searching student:",k),w("שגיאה בחיפוש התלמיד")}finally{h(!1)}},N=async()=>
757{if(p){if(u==="yes"&&p.moneyCredit<n){K.error(`אין מספיק קרדיט. יתרה: ₪${p.moneyCredit}, עלות: ₪${n}`);return}g(!0);try{const k=r==="photo_day"?"photo_day_registrations":r==="workshop"?"workshop_registrations":"practical_workshop_registrations",S=r==="photo_day"?"photo_day_id":r==="workshop"?"workshop_id":"practical_workshop_id";if(r==="photo_day"){const{data:E}=await de.from("photo_day_registrations").select("id").eq("student_id",p.id).eq("photo_day_id",e).maybeSingle();if(E){K.error("התלמיד כבר רשום לאירוע זה"),g(!1);return}const{error:j}=await de.from("photo_day_registrations").insert({student_id:p.id,photo_day_id:e});if(j)throw j}else if(r==="workshop"){const{data:E}=await de.from("workshop_registrations").select("id").eq("student_id",p.id).eq("workshop_id",e).maybeSingle();if(E){K.error("התלמיד כבר רשום לאירוע זה"),g(!1);return}const{error:j}=await de.from("workshop_registrations").insert({student_id:p.id,workshop_id:e});if(j)throw j}else{const{data:E}=await de.from("practical_workshop_registrations").select("id").eq("student_id",p.id).eq("practical_workshop_id",e).maybeSingle();if(E){K.error("התלמיד כבר רשום לאירוע זה"),g(!1);return}const{error:j}=await de.from("practical_workshop_registrations").insert({student_id:p.id,practical_workshop_id:e});if(j)throw j}if(u==="yes"&&n>0){const{error:E}=await de.from("wallet_transactions").insert({student_id:p.id,amount:n,type:"debit",category:"credit",entitlement_type_name:t,balance:p.moneyCredit-n});E&&console.error("Error creating wallet transaction:",E)}K.success(`${p.name} נרשם/ה בהצלחה${u==="yes"?` (חויב ₪${n})`:""}`),o(!1),y(),s()}catch(k){console.error("Error registering student:",k),K.error("שגיאה ברישום התלמיד")}finally{g(!1)}}};return i.jsxs(Ht,{open:a,onOpenChange:k=>{o(k),k||y()},children:[i.jsx(va,{asChild:!0,children:i.jsxs(ee,{variant:"outline",size:"sm",className:"gap-2",children:[i.jsx(_b,{className:"h-4 w-4"}),"הוסף תלמיד ידנית"]})}),i.jsxs(Ut,{dir:"rtl",className:"sm:max-w-md",children:[i.jsxs(Wt,{children:[i.jsx(zt,{className:"text-right",children:"הוספת תלמיד ידנית"}),i.jsx(a0,{className:"text-right",children:t})]}),i.jsxs("div",{className:"space-y-4 py-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"תעודת זהות או טלפון"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Oe,{value:l,onChange:k=>c(k.target.value),placeholder:"הזן ת.ז או מספר טלפון",onKeyDown:k=>k.key==="Enter"&&_()}),i.jsx(ee,{onClick:_,disabled:f,size:"icon",variant:"secondary",children:f?i.jsx(yr,{className:"h-4 w-4 animate-spin"}):i.jsx(no,{className:"h-4 w-4"})})]}),b&&i.jsx("p",{className:"text-sm text-destructive",children:b})]}),p&&i.jsxs("div",{className:"bg-muted/50 rounded-lg p-4 space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"font-medium",children:p.name}),i.jsx("span",{className:"text-sm text-muted-foreground",children:p.phone})]}),i.jsxs("div",{className:"flex items-center justify-between text-sm",children:[i.jsx("span",{children:"יתרת קרדיט:"}),i.jsxs("span",{className:p.moneyCredit>=n?"text-green-600 font-semibold":"text-destructive font-semibold",children:["₪",p.moneyCredit]})]}),i.jsxs("div",{className:"pt-3 border-t",children:[i.jsxs(ve,{className:"mb-3 block",children:["האם לחייב קרדיט? (₪",n,")"]}),i.jsxs(E0,{value:u,onValueChange:k=>d(k),className:"flex gap-6",children:[i.jsxs("div",{className:"flex items-center space-x-2 space-x-reverse",children:[i.jsx(pd,{value:"no",id:"no"}),i.jsx(ve,{htmlFor:"no",className:"cursor-pointer",children:"ללא חיוב"})]}),i.jsxs("div",{className:"flex items-center space-x-2 space-x-reverse",children:[i.jsx(pd,{value:"yes",id:"yes"}),i.jsx(ve,{htmlFor:"yes",className:"cursor-pointer",children:"עם חיוב"})]})]}),u==="yes"&&p.moneyCredit<n&&i.jsxs("p",{className:"text-sm text-destructive mt-2",children:["⚠️ אין מספיק קרדיט (חסרים ₪",n-p.moneyCredit,")"]})]})]})]}),i.jsxs(Yx,{className:"flex-row-reverse gap-2",children:[i.jsx(ee,{onClick:N,disabled:!p||m||u==="yes"&&p.moneyCredit<n,children:m?i.jsxs(i.Fragment,{children:[i.jsx(yr,{className:"h-4 w-4 animate-spin ml-2"}),"מבצע רישום..."]}):"רשום תלמיד"}),i.jsx(ee,{variant:"outline",onClick:()=>o(!1),children:"ביטול"})]})]})]})}function L2({open:e,onOpenChange:t,eventId:r,eventName:n,eventType:s,registeredCount:a,onCancelled:o}){const[l,c]=v.useState(""),[u,d]=v.useState(!1),f=async()=>{d(!0);try{const{data:h,error:m}=await de.functions.invoke("cancel-event-session",{body:{eventType:s,eventId:r,cancellationMessage:l.trim()||null}});if(m)throw m;if(h!=null&&h.success){const g=[];h.refundedCount>0&&g.push(`הוחזר קרדיט ל-${h.refundedCount} תלמידות`),h.smsSentCount>0&&g.push(`נשלחו ${h.smsSentCount} הודעות SMS`),K.success(`המפגש בוטל בהצלחה${g.length>0?". "+g.join(", "):""}`),o(),t(!1),c("")}else throw new Error((h==null?void 0:h.error)||"Unknown error")}catch(h){console.error("Error cancelling event:",h),K.error("שגיאה בביטול המפגש")}finally{d(!1)}};return i.jsx(Ht,{open:e,onOpenChange:t,children:i.jsxs(Ut,{className:"sm:max-w-md",dir:"rtl",children:[i.jsx(Wt,{children:i.jsxs(zt,{className:"text-right flex items-center gap-2",children:[i.jsx(Ex,{className:"h-5 w-5 text-destructive"}),"ביטול מפגש"]})}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"p-3 bg-amber-50 border border-amber-200 rounded-lg text-sm text-amber-800",children:[i.jsxs("p",{className:"font-medium mb-1",children:["אתה עומד לבטל את: ",n]}),a>0?i.jsxs("p",{children:["יש ",a," תלמידות רשומות. הקרדיט יוחזר לכולן אוטומטית."]}):i.jsx("p",{children:"אין תלמידות רשומות למפגש זה."})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"cancel-message",children:"הודעת ביטול (תישלח ב-SMS לתלמידות הרשומות)"}),i.jsx(Xs,{id:"cancel-message",placeholder:"לדוגמה: המפגש בוטל עקב נסיבות בלתי צפויות. הקרדיט הוחזר אליכן.",value:l,onCh
757ange:h=>c(h.target.value),rows:4})]})]}),i.jsxs(Yx,{className:"flex-row-reverse gap-2 sm:gap-2",children:[i.jsx(ee,{variant:"outline",onClick:()=>t(!1),disabled:u,children:"חזרה"}),i.jsx(ee,{variant:"destructive",onClick:f,disabled:u,children:u?"מבטל...":"בטל מפגש"})]})]})})}const Rl=e=>new Date(e).toLocaleDateString("he-IL"),o1=e=>{const t=new Date;t.setHours(0,0,0,0);const r=new Date(e.date);r.setHours(0,0,0,0);const n=r<t,s=e.registeredStudents.length>=e.maxParticipants;return n||s?{label:"סגור לרישום",isOpen:!1}:{label:"פתוח לרישום",isOpen:!0}};function xhe(){const{isAdmin:e,isCoordinator:t,isPhotographer:r,role:n}=gl(),s=n!==null&&!r,[a,o]=v.useState([]),[l,c]=v.useState(!0),[u,d]=v.useState(""),[f,h]=v.useState("open"),[m,g]=v.useState("all"),[p,x]=v.useState("all"),[b,w]=v.useState("all"),[y,_]=v.useState(null),[N,k]=v.useState(!1),[S,E]=v.useState(!1),[j,T]=v.useState(null),[R,P]=v.useState(!1),[D,U]=v.useState(!1),[Q,Y]=v.useState(null),[V,F]=v.useState(!1),[C,X]=v.useState(null);v.useEffect(()=>{se()},[]);const se=async()=>{try{const{data:ue,error:Re}=await de.from("photo_days").select("*").order("date",{ascending:!0});if(Re)throw Re;const Ce=await Promise.all((ue||[]).map(async pe=>{const{data:fe}=await de.from("photo_day_registrations").select("id, student_id, attended, image_url, students (id, name, phone)").eq("photo_day_id",pe.id);return{id:pe.id,date:pe.date,time:pe.time,branch:pe.branch,listPrice:pe.list_price,yarinShachafPrice:pe.yarin_shachaf_price,maxParticipants:pe.max_participants,registeredStudents:(fe||[]).filter(te=>te.students).map(te=>({id:te.students.id,name:te.students.name,phone:te.students.phone,registrationId:te.id,attended:te.attended,imageUrl:te.image_url}))}}));o(Ce)}catch(ue){console.error("Error fetching photo days:",ue)}finally{c(!1)}},A=async ue=>{try{const{data:Re,error:Ce}=await de.from("photo_days").insert({name:`יום צילום ${Rl(ue.date)}`,date:ue.date,time:ue.time,branch:ue.branch,list_price:ue.listPrice,yarin_shachaf_price:ue.yarinShachafPrice,max_participants:ue.maxParticipants}).select().single();if(Ce)throw Ce;o(pe=>[...pe,{id:Re.id,date:Re.date,time:Re.time,branch:Re.branch,listPrice:Re.list_price,yarinShachafPrice:Re.yarin_shachaf_price,maxParticipants:Re.max_participants,registeredStudents:[]}].sort((fe,te)=>new Date(fe.date).getTime()-new Date(te.date).getTime())),K.success("יום הצילום נוסף בהצלחה")}catch(Re){console.error("Error adding photo day:",Re),K.error("שגיאה בהוספת יום צילום")}},M=ue=>{_(ue),k(!0)},I=ue=>{T(ue),E(!0)},z=ue=>{Y(ue),U(!0)},J=ue=>{o(Re=>Re.map(Ce=>Ce.id===ue.id?{...Ce,...ue}:Ce))},Z=async()=>{if(j){P(!0);try{const{data:ue,error:Re}=await de.functions.invoke("delete-event",{body:{eventType:"photo_day",eventId:j.id}});if(Re)throw Re;o(Ce=>Ce.filter(pe=>pe.id!==j.id)),ue.refundedCount>0?K.success(`יום הצילום נמחק והוחזרו ₪${ue.refundAmount} ל-${ue.refundedCount} תלמידות`):K.success("יום הצילום נמחק בהצלחה")}catch(ue){console.error("Error deleting photo day:",ue),K.error("שגיאה במחיקת יום הצילום")}finally{P(!1),E(!1),T(null)}}},re=v.useMemo(()=>{const ue=new Date,Re=ue.getMonth(),Ce=ue.getFullYear(),pe=Re===11?0:Re+1,fe=Re===11?Ce+1:Ce,te=a.filter(nt=>o1(nt).isOpen),Ne=te.filter(nt=>{const Je=new Date(nt.date);return Je.getMonth()===Re&&Je.getFullYear()===Ce}),be=te.filter(nt=>{const Je=new Date(nt.date);return Je.getMonth()===pe&&Je.getFullYear()===fe}),Qe=nt=>({telAviv:nt.filter(Je=>Je.branch==="תל אביב").length,haifa:nt.filter(Je=>Je.branch==="חיפה").length});return{thisMonth:{total:Ne.length,...Qe(Ne)},nextMonth:{total:be.length,...Qe(be)}}},[a]),ae=v.useMemo(()=>{const ue=new Set;return a.forEach(Re=>{const Ce=new Date(Re.date),pe=`${Ce.getFullYear()}-${String(Ce.getMonth()+1).padStart(2,"0")}`;ue.add(pe)}),Array.from(ue).sort()},[a]),ne=["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],Se=v.useMemo(()=>{const ue=new Set;return a.forEach(Re=>{const Ce=new Date(Re.date);ue.add(Ce.getDay())}),Array.from(ue).sort((Re,Ce)=>Re-Ce)}
757,[a]),B=ue=>{const[Re,Ce]=ue.split("-");return new Date(parseInt(Re),parseInt(Ce)-1,1).toLocaleDateString("he-IL",{month:"long",year:"numeric"})},qe=a.filter(ue=>{const Re=ue.branch.includes(u)||ue.date.includes(u),Ce=o1(ue),pe=f==="all"||f==="open"&&Ce.isOpen||f==="closed"&&!Ce.isOpen,fe=m==="all"||ue.branch===m,te=new Date(ue.date),Ne=`${te.getFullYear()}-${String(te.getMonth()+1).padStart(2,"0")}`,be=p==="all"||Ne===p,Qe=b==="all"||te.getDay()===parseInt(b);return Re&&pe&&fe&&be&&Qe});return l?i.jsx(Hn,{children:i.jsx("div",{className:"flex items-center justify-center h-64",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})})}):i.jsxs(Hn,{children:[i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 animate-fade-in",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-foreground",children:"ניהול ימי צילום"}),i.jsx("p",{className:"text-muted-foreground mt-1",children:"ניהול וארגון ימי צילום לתלמידות"})]}),s&&i.jsx(nhe,{onAddPhotoDay:A})]}),s&&i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 animate-slide-up",children:[i.jsxs("div",{className:"bg-card rounded-2xl shadow-card border border-border p-5",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-100 flex items-center justify-center",children:i.jsx(rr,{className:"h-5 w-5 text-blue-600"})}),i.jsx("span",{className:"text-sm font-medium text-foreground",children:"ימי צילום החודש"})]}),i.jsx("p",{className:"text-3xl font-bold text-foreground mb-2",children:re.thisMonth.total}),i.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[i.jsxs("span",{children:["תל אביב: ",re.thisMonth.telAviv]}),i.jsxs("span",{children:["חיפה: ",re.thisMonth.haifa]})]})]}),i.jsxs("div",{className:"bg-card rounded-2xl shadow-card border border-border p-5 gradient-rose",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl bg-foreground
757/10 flex items-center justify-center",children:i.jsx(rr,{className:"h-5 w-5 text-foreground"})}),i.jsx("span",{className:"text-sm font-medium text-foreground",children:"ימי צילום חודש הבא"})]}),i.jsx("p",{className:"text-3xl font-bold text-foreground mb-2",children:re.nextMonth.total}),i.jsxs("div",{className:"flex items-center gap-4 text-xs text-foreground/70",children:[i.jsxs("span",{children:["תל אביב: ",re.nextMonth.telAviv]}),i.jsxs("span",{children:["חיפה: ",re.nextMonth.haifa]})]})]})]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 items-start sm:items-center",children:[i.jsxs("div",{className:"relative flex-1 max-w-md",children:[i.jsx(no,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(Oe,{placeholder:"חיפוש...",className:"pr-10",value:u,onChange:ue=>d(ue.target.value)})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs(At,{value:f,onValueChange:ue=>h(ue),children:[i.jsx(Ct,{className:"w-[140px]",children:i.jsx(Pt,{placeholder:"סטטוס"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"all",children:"כל הסטטוסים"}),i.jsx($e,{value:"open",children:"פתוח לרישום"}),i.jsx($e,{value:"closed",children:"סגור לרישום"})]})]}),i.jsxs(At,{value:m,onValueChange:ue=>g(ue),children:[i.jsx(Ct,{className:"w-[130px]",children:i.jsx(Pt,{placeholder:"סניף"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"all",children:"כל הסניפים"}),i.jsx($e,{value:"תל אביב",children:"תל אביב"}),i.jsx($e,{value:"חיפה",children:"חיפה"})]})]}),i.jsxs(At,{value:p,onValueChange:x,children:[i.jsx(Ct,{className:"w-[140px]",children:i.jsx(Pt,{placeholder:"חודש"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"all",children:"כל החודשים"}),ae.map(ue=>i.jsx($e,{value:ue,children:B(ue)},ue))]})]}),i.jsxs(At,{value:b,onValueChange:w,children:[i.jsx(Ct,{className:"w-[110px]",children:i.jsx(Pt,{placeholder:"יום"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"all",children:"כל הימים"}),Se.map(ue=>i.jsxs($e,{value:ue.toString(),children:["יום ",ne[ue]]},ue))]})]})]}),i.jsxs(We,{variant:"secondary",className:"text-sm",children:[qe.length," תוצאות"]})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 animate-scale-in",children:qe.map(ue=>{const Re=ue.registeredStudents.length,Ce=Re/ue.maxParticipants*100,pe=o1(ue);return i.jsxs("div",{className:xe("bg-card rounded-2xl shadow-card border border-border p-5 hover:shadow-lg transition-shadow",!pe.isOpen&&"opacity-70"),children:[i.jsxs("div",{className:"flex items-start justify-between mb-4",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl gradient-rose flex items-center justify-center",children:i.jsx(Bs,{className:"h-6 w-6 text-foreground"})}),i.jsx(We,{className:xe(pe.isOpen?"bg-green-100 text-green-700":"bg-gray-100 text-gray-600"),children:pe.label})]}),i.jsxs("div",{className:"space-y-2 text-sm",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(rr,{className:"h-4 w-4 text-muted-foreground"}),i.jsx("span",{className:"font-medium",children:Rl(ue.date)})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Hs,{className:"h-4 w-4 text-muted-foreground"}),i.jsx("span",{children:ue.time})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(ls,{className:"h-4 w-4 text-muted-foreground"}),i.jsxs("span",{children:["סניף ",ue.branch]})]})]}),i.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:i.jsxs("button",{type:"button",className:"w-full text-right cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>M(ue),children:[i.jsxs("div",{className:"flex items-center justify-between mb-2",children:[i.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[i.jsx(xs,{className:"h-4 w-4 text-muted-foreground"}),i.jsx("span",{className:"text-muted-foreground",children:"נרשמו:"})]}),i.jsxs("span",{className:xe("font-semibold",pe.isOpen?"text-foreground":"text-gray-500"),children:[Re,"/",ue.maxParticipants]})]}),i.jsx(j0,{value:Ce,className:xe("h-2",!pe.isOpen&&"[&>div]:bg-gray-400")})]})}),s&&i.jsxs("div",{className:"mt-4 pt-4 border-t border-border space-y-2",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-sm text-muted-foreground",children:"מחיר מחירון:"}),i.jsxs("span",{className:"font-semibold",children:["₪",ue.listPrice]})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-sm text-muted-foreground",children:"מחיר ירין שחף:"}),i.jsxs("span",{className:"font-semibold text-green-600",children:["₪",ue.yarinShachafPrice]})]})]}),i.jsxs("div",{className:"flex flex-wrap gap-2 mt-3",children:[s&&i.jsx(M2,{eventId:ue.id,eventName:`יום צילום ${Rl(ue.date)} - ${ue.branch}
757`,eventType:"photo_day",eventPrice:ue.yarinShachafPrice,onRegistrationComplete:se}),(e||t)&&i.jsxs(ee,{variant:"ghost",size:"sm",className:"flex-1 text-amber-600 hover:text-amber-600 hover:bg-amber-50",onClick:()=>{X(ue),F(!0)},children:[i.jsx(Ex,{className:"h-4 w-4 mr-2"}),"ביטול מפגש"]}),e&&i.jsxs(i.Fragment,{children:[i.jsxs(ee,{variant:"ghost",size:"sm",className:"flex-1 text-primary hover:text-primary hover:bg-primary/10",onClick:()=>z(ue),children:[i.jsx(wd,{className:"h-4 w-4 mr-2"}),"ערוך"]}),i.jsxs(ee,{variant:"ghost",size:"sm",className:"flex-1 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>I(ue),children:[i.jsx(Ia,{className:"h-4 w-4 mr-2"}),"מחק"]})]})]})]},ue.id)})}),qe.length===0&&i.jsxs("div",{className:"text-center py-12",children:[i.jsx(Bs,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),i.jsx("p",{className:"text-muted-foreground",children:"לא נמצאו ימי צילום"})]})]}),i.jsx(ahe,{open:N,onOpenChange:k,photoDayDate:y?Rl(y.date):"",photoDayId:y==null?void 0:y.id,eventDate:y==null?void 0:y.date,students:(y==null?void 0:y.registeredStudents)||[],onAttendanceUpdate:se}),i.jsx(qs,{open:S,onOpenChange:E,children:i.jsxs(ys,{dir:"rtl",children:[i.jsxs(ws,{children:[i.jsx(_s,{className:"text-right",children:"מחיקת יום צילום"}),i.jsx(Ns,{className:"text-right",children:j&&j.registeredStudents.length>0?i.jsxs(i.Fragment,{children:["האם אתה בטוח שברצונך למחוק את יום הצילום מתאריך ",Rl(j.date),"?",i.jsx("br",{}),i.jsx("br",{}),i.jsx("strong",{children:"שימו לב:"})," יש ",j.registeredStudents.length," תלמידות רשומות לאירוע זה. הקרדיט יוחזר אוטומטית לכל התלמידות (₪",j.yarinShachafPrice," לכל אחת)."]}):i.jsxs(i.Fragment,{children:["האם אתה בטוח שברצונך למחוק את יום הצילום מתאריך ",j?Rl(j.date):"","?"]})})]}),i.jsxs(bs,{className:"flex-row-reverse gap-2",children:[i.jsx(ks,{disabled:R,children:"ביטול"}),i.jsx(Ss,{onClick:Z,disabled:R,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:R?"מוחק...":"מחק"})]})]})}),i.jsx(she,{photoDay:Q,open:D,onOpenChange:U,onSave:J}),i.jsx(L2,{open:V,onOpenChange:F,eventId:(C==null?void 0:C.id)||"",eventName:`יום צילום ${C?Rl(C.date):""} - ${(C==null?void 0:C.branch)||""}`,eventType:"photo_day",registeredCount:(C==null?void 0:C.registeredStudents.length)||0,onCancelled:se})]})}const vF=v.forwardRef(({className:e,...t},r)=>i.jsx("div",{className:"relative w-full overflow-auto",children:i.jsx("table",{ref:r,className:xe("w-full caption-bottom text-sm",e),...t})}));vF.displayName="Table";const yF=v.forwardRef(({className:e,...t},r)=>i.jsx("thead",{ref:r,className:xe("[&_tr]:border-b",e),...t}));yF.displayName="TableHeader";const wF=v.forwardRef(({className:e,...t},r)=>i.jsx("tbody",{ref:r,className:xe("[&_tr:last-child]:border-0",e),...t}));wF.displayName="TableBody";const ghe=v.forwardRef(({className:e,...t},r)=>i.jsx("tfoot",{ref:r,className:xe("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));ghe.displayName="TableFooter";const vw=v.forwardRef(({className:e,...t},r)=>i.jsx("tr",{ref:r,className:xe("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));vw.displayName="TableRow";const su=v.forwardRef(({className:e,...t},r)=>i.jsx("th",{ref:r,className:xe("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));su.displayName="TableHead";const au=v.forwardRef(({className:e,...t},r)=>i.jsx("td",{ref:r,className:xe("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));au.displayName="TableCell";const vhe=v.forwardRef(({className:e,...t},r)=>i.jsx("caption",{ref:r,className:xe("mt-4 text-sm text-muted-foreground",e),...t}));vhe.displayName="TableCaption";const yhe=e=>{const[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n).toLocaleDateString("he-IL",{day:"numeric",month:"long",year:"numeric"})};function whe(){const{session:e}=gl(),[t,r]=v.useState([]),[n,s]=v.useState(!0),[a,o]=v.useState("");v.useEffect(()=>{e&&l()},[e]);const l=async()=>{s(!0);try{const{data:u,error:d}=await de.from("photo_day_images").select(`
758          id,
759          student_id,
760          photo_day_date,
761          download_url,
762          created_at,
763          students (
764            name,
765            id_number,
766            phone
767          )
768        `).order("photo_day_date",{ascending:!1});if(d){console.error("Error fetching photo day images:",d);return}const f=(u||[]).map(h=>({id:h.id,student_id:h.student_id,photo_day_date:h.photo_day_date,download_url:h.download_url,created_at:h.created_at,
768student:h.students||{name:"לא ידוע",id_number:"",phone:""}}));r(f)}catch(u){console.error("Error:",u)}finally{s(!1)}},c=t.filter(u=>{const d=a.toLowerCase();return u.student.name.toLowerCase().includes(d)||u.student.id_number.includes(d)||u.student.phone.includes(d)});return n?i.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:i.jsx(yr,{className:"h-8 w-8 animate-spin text-primary"})}):i.jsx(Hn,{children:i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"ניהול תמונות ימי צילום"}),i.jsx("p",{className:"text-muted-foreground mt-1",children:"צפייה בקישורי תמונות שהועלו דרך וובהוק"})]}),i.jsxs(We,{variant:"secondary",className:"w-fit",children:[t.length," רשומות"]})]}),i.jsx(ar,{className:"border-blue-200 bg-blue-50/50",children:i.jsx(cr,{className:"p-4",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-100 flex items-center justify-center shrink-0",children:i.jsx(Wi,{className:"h-5 w-5 text-blue-600"})}),i.jsxs("div",{className:"text-sm text-blue-800",children:[i.jsx("p",{className:"font-medium",children:"הזנת נתונים אוטומטית"}),i.jsx("p",{className:"mt-1",children:"התמונות מתעדכנות באמצעות Webhook חיצוני. לפרטי ההתממשקות ראו בדף ההגדרות."})]})]})})}),i.jsxs("div",{className:"relative max-w-md",children:[i.jsx(no,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(Oe,{placeholder:"חיפוש לפי שם, ת.ז או טלפון...",value:a,onChange:u=>o(u.target.value),className:"pr-10"})]}),i.jsx(ar,{children:i.jsx(cr,{className:"p-0",children:c.length===0?i.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[i.jsx("div",{className:"w-14 h-14 rounded-full bg-muted flex items-center justify-center mb-4",children:i.jsx(Wi,{className:"h-7 w-7 text-muted-foreground"})}),i.jsx("p",{className:"text-muted-foreground",children:a?"לא נמצאו תוצאות":"אין תמונות במערכת"})]}):i.jsx("div",{className:"overflow-x-auto",children:i.jsxs(vF,{children:[i.jsx(yF,{children:i.jsxs(vw,{children:[i.jsx(su,{className:"text-right",children:"שם התלמיד"}),i.jsx(su,{className:"text-right",children:"תעודת זהות"}),i.jsx(su,{className:"text-right",children:"טלפון"}),i.jsx(su,{className:"text-right",children:"תאריך יום צילום"}),i.jsx(su,{className:"text-right",children:"קישור להורדה"})]})}),i.jsx(wF,{children:c.map(u=>i.jsxs(vw,{children:[i.jsx(au,{className:"font-medium",children:u.student.name}),i.jsx(au,{children:u.student.id_number}),i.jsx(au,{dir:"ltr",className:"text-right",children:u.student.phone}),i.jsx(au,{children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(rr,{className:"h-4 w-4 text-muted-foreground"}),yhe(u.photo_day_date)]})}),i.jsx(au,{children:i.jsx(ee,{variant:"outline",size:"sm",asChild:!0,className:"gap-1",children:i.jsxs("a",{href:u.download_url,target:"_blank",rel:"noopener noreferrer",referrerPolicy:"no-referrer",onClick:d=>{d.preventDefault(),window.open(u.download_url,"_blank","noopener,noreferrer")},children:[i.jsx(Hl,{className:"h-4 w-4"}),"פתח קישור"]})})})]},u.id))})]})})})})]})})}function bhe({onAddWorkshop:e}){const[t,r]=v.useState(!1),[n,s]=v.useState(""),[a,o]=v.useState(""),[l,c]=v.useState(""),[u,d]=v.useState(""),[f,h]=v.useState("תל אביב"),[m,g]=v.useState(""),[p,x]=v.useState(""),[b,w]=v.useState(""),[y,_]=v.useState(!1),[N,k]=v.useState(null),[S,E]=v.useState(null),[j,T]=v.useState(!1),[R,P]=v.useState([]),[D,U]=v.useState([]),Q=v.useRef(null);v.useEffect(()=>{Y()},[]);const Y=async()=>{const{data:A,error:M}=await de.from("courses").select("id, name").eq("status","active").order("name");!M&&A&&P(A)},V=A=>{var I;const M=(I=A.target.files)==null?void 0:I[0];if(M){if(!M.type.startsWith("image/")){K.error("נא לבחור קובץ תמונה");return}k(M);const z=new FileReader;z.onloadend=()=>{E(z.result)}
768,z.readAsDataURL(M)}},F=()=>{k(null),E(null),Q.current&&(Q.current.value="")},C=async()=>{if(!N)return null;T(!0);try{const A=N.name.split(".").pop(),I=`workshop-images/${`${crypto.randomUUID()}.${A}`}`,{error:z}=await de.storage.from("workshop-images").upload(I,N);if(z)throw z;const{data:J}=de.storage.from("workshop-images").getPublicUrl(I);return J.publicUrl}catch(A){return console.error("Error uploading image:",A),K.error("שגיאה בהעלאת התמונה"),null}finally{T(!1)}},X=A=>{U(M=>M.includes(A)?M.filter(I=>I!==A):[...M,A])},se=async A=>{if(A.preventDefault(),!n.trim()){K.error("נא להזין שם השתלמות");return}if(!a.trim()){K.error("נא להזין תיאור");return}if(!l.trim()){K.error("נא להזין תאריך");return}if(!u.trim()){K.error("נא להזין שעה");return}if(!b||parseInt(b)<=0){K.error("נא להזין כמות מותרת לרישום תקינה");return}if(!m||parseFloat(m)<=0){K.error("נא להזין מחיר מחירון תקין");return}if(!p||parseFloat(p)<=0){K.error("נא להזין מחיר ירין שחף תקין");return}if(D.length===0){K.error("נא לבחור לפחות קורס אחד");return}_(!0);try{const M=await C();e({name:n.trim(),description:a.trim(),date:l.trim(),time:u.trim(),branch:f,listPrice:parseFloat(m),yarinShachafPrice:parseFloat(p),maxParticipants:parseInt(b),imageUrl:M||void 0,eligibleCourses:D}),K.success(`השתלמות "${n}" נוספה בהצלחה`),s(""),o(""),c(""),d(""),h("תל אביב"),g(""),x(""),w(""),k(null),E(null),U([]),r(!1)}catch{K.error("שגיאה בהוספת השתלמות")}finally{_(!1)}};return i.jsxs(Ht,{open:t,onOpenChange:r,children:[i.jsx(va,{asChild:!0,children:i.jsxs(ee,{variant:"rose",className:"gap-2",children:[i.jsx(hs,{className:"h-4 w-4"}),"הוסף השתלמות"]})}),i.jsxs(Ut,{className:"sm:max-w-md",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"הוספת השתלמות חדשה"})}),i.jsxs("form",{onSubmit:se,className:"space-y-4 mt-4 max-h-[70vh] overflow-y-auto px-1",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"תמונה (ריבועית)"}),i.jsx("input",{type:"file",ref:Q,accept:"image/*",onChange:V,className:"hidden"}),S?i.jsxs("div",{className:"relative w-32 h-32 mx-auto",children:[i.jsx("img",{src:S,alt:"תצוגה מקדימה",className:"w-full h-full object-cover rounded-lg border"}),i.jsx("button",{type:"button",onClick:F,className:"absolute -top-2 -right-2 bg-destructive text-destructive-foreground rounded-full p-1 hover:bg-destructive/90",children:i.jsx(es,{className:"h-4 w-4"})})]}):i.jsxs("button",{type:"button",onClick:()=>{var A;return(A=Q.current)==null?void 0:A.click()},className:"w-32 h-32 mx-auto border-2 border-dashed border-muted-foreground/30 rounded-lg flex flex-col items-center justify-center gap-2 hover:border-primary/50 transition-colors",children:[i.jsx(ed,{className:"h-6 w-6 text-muted-foreground"}),i.jsx("span",{className:"text-xs text-muted-foreground",children:"העלאת תמונה"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"name",children:"שם ההשתלמות"}),i.jsx(Oe,{id:"name",placeholder:"לדוגמה: השתלמות טכניקות איפור מתקדמות",value:n,onChange:A=>s(A.target.value),className:"text-right"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"description",children:"תיאור"}),i.jsx(Xs,{id:"description",placeholder:"תיאור קצר של ההשתלמות...",value:a,onChange:A=>o(A.target.value),className:"text-right resize-none",rows:3})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"date",children:"תאריך"}),i.jsx(Fd,{id:"date",value:l,onChange:c,placeholder:"בחר תאריך"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"time",children:"שעה"}),i.jsxs(At,{value:u,onValueChange:d,children:[i.jsx(Ct,{children:i.jsx(Pt,{placeholder:"בחר שעה"})}),i.jsx(Tt,{children:Array.from({length:19},(A,M)=>{const I=Math.floor(M/2)+9,z=M%2===0?"00":"30",J=`${I.toString().padStart(2,"0")}:${z}`;return i.jsx($e,{value:J,children:J},J)})})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"branch",children:"סניף"}),i.jsxs(At,{value:f,onValueChange:A=>h(A),children:[i.jsx(Ct,{className:"text-right",children:i.jsx(Pt,{placeholder:"בחר סניף"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"תל אביב",children:"תל אביב"}),i.jsx($e,{value:"חיפה",children:"חיפה"})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"סוג ההשתלמות (קורסים מתאימים)"}),i.jsx("div",{className:"border border-border rounded-lg p-3 space-y-2 max-h-40 overflow-y-auto bg-background",children:R.length===0?i.jsx("p",{className:"text-sm text-muted-foreground text-center py-2",children:"אין קורסים זמינים"}):R.map(A=>i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(jc,{id:`course-${A.
768id}`,checked:D.includes(A.id),onCheckedChange:()=>X(A.id)}),i.jsx("label",{htmlFor:`course-${A.id}`,className:"text-sm cursor-pointer flex-1",children:A.name})]},A.id))}),D.length>0&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:["נבחרו ",D.length," קורסים"]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"maxParticipants",children:"כמות מותרת לרישום"}),i.jsx(Oe,{id:"maxParticipants",type:"number",value:b,onChange:A=>w(A.target.value),dir:"ltr",min:"1"})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"listPrice",children:"מחיר מחירון (₪)"}),i.jsx(Oe,{id:"listPrice",type:"number",value:m,onChange:A=>g(A.target.value),dir:"ltr",min:"0"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"yarinShachafPrice",children:"מחיר ירין שחף (₪)"}),i.jsx(Oe,{id:"yarinShachafPrice",type:"number",value:p,onChange:A=>x(A.target.value),dir:"ltr",min:"0"})]})]}),i.jsxs("div",{className:"flex gap-3 pt-4",children:[i.jsx(ee,{type:"submit",variant:"rose",className:"flex-1",disabled:y||j,children:y||j?"מוסיף...":"הוסף השתלמות"}),i.jsx(ee,{type:"button",variant:"outline",onClick:()=>r(!1),children:"ביטול"})]})]})]})]})}function _he({workshop:e,open:t,onOpenChange:r,onSave:n}){const[s,a]=v.useState(""),[o,l]=v.useState(""),[c,u]=v.useState(""),[d,f]=v.useState(""),[h,m]=v.useState("תל אביב"),[g,p]=v.useState(""),[x,b]=v.useState(""),[w,y]=v.useState(""),[_,N]=v.useState(!1),[k,S]=v.useState(null),[E,j]=v.useState(null),[T,R]=v.useState(!1),[P,D]=v.useState([]),[U,Q]=v.useState([]),Y=v.useRef(null);v.useEffect(()=>{V()},[]);const V=async()=>{const{data:M,error:I}=await de.from("courses").select("id, name").eq("status","active").order("name");!I&&M&&D(M)};v.useEffect(()=>{e&&(a(e.name),l(e.description),u(e.date),f(e.time),m(e.branch),p(e.listPrice.toString()),b(e.yarinShachafPrice.toString()),y(e.maxParticipants.toString()),j(e.imageUrl||null),Q(e.eligibleCourses||[]))},[e]);const F=M=>{var z;const I=(z=M.target.files)==null?void 0:z[0];if(I){if(!I.type.startsWith("image/")){K.error("נא לבחור קובץ תמונה");return}S(I);const J=new FileReader;J.onloadend=()=>{j(J.result)},J.readAsDataURL(I)}},C=()=>{S(null),j(null),Y.current&&(Y.current.value="")},X=async()=>{if(!k)return E;R(!0);try{const M=k.name.split(".").pop(),z=`workshop-images/${`${crypto.randomUUID()}.${M}`}`,{error:J}=await de.storage.from("workshop-images").upload(z,k);if(J)throw J;const{data:Z}=de.storage.from("workshop-images").getPublicUrl(z);return Z.publicUrl}catch(M){return console.error("Error uploading image:",M),K.error("שגיאה בהעלאת התמונה"),E}finally{R(!1)}},se=async M=>{if(M.preventDefault(),!!e){if(!s.trim()){K.error("נא להזין שם השתלמות");return}if(!c.trim()){K.error("נא להזין תאריך");return}if(!d.trim()){K.error("נא להזין שעה");return}if(!w||parseInt(w)<=0){K.error("נא להזין כמות מותרת לרישום תקינה");return}if(!g||parseFloat(g)<=0){K.error("נא להזין מחיר מחירון תקין");return}if(!x||parseFloat(x)<=0){K.error("נא להזין מחיר ירין שחף תקין");return}if(U.length===0){K.error("נא לבחור לפחות קורס אחד");return}N(!0);try{const I=await X(),{error:z}=await de.from("workshops").update({name:s.trim(),description:o.trim(),date:c.trim(),time:d.trim(),branch:h,list_price:parseFloat(g),yarin_shachaf_price:parseFloat(x),max_participants:parseInt(w),image_url:I||null,eligible_courses:U}).eq("id",e.id);if(z)throw z;n({...e,name:s.trim(),description:o.trim(),date:c.trim(),time:d.trim(),branch:h,listPrice:parseFloat(g),yarinShachafPrice:parseFloat(x),maxParticipants:parseInt(w),imageUrl:I||void 0,eligibleCourses:U}),K.success("ההשתלמות עודכנה בהצלחה"),r(!1)}catch(I){console.error("Error updating workshop:",I),K.error("שגיאה בעדכון ההשתלמות")}finally{N(!1)}}},A=M=>{Q(I=>I.includes(M)?I.filter(z=>z!==M):[...I,M])};return i.jsx(Ht,{open:t,onOpenChange:r,children:i.jsxs(Ut,{className:"sm:max-w-md",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"עריכת השתלמות"})}
768),i.jsxs("form",{onSubmit:se,className:"space-y-4 mt-4 max-h-[70vh] overflow-y-auto px-1",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"תמונה (ריבועית)"}),i.jsx("input",{type:"file",ref:Y,accept:"image/*",onChange:F,className:"hidden"}),E?i.jsxs("div",{className:"relative w-32 h-32 mx-auto",children:[i.jsx("img",{src:E,alt:"תצוגה מקדימה",className:"w-full h-full object-cover rounded-lg border"}),i.jsx("button",{type:"button",onClick:C,className:"absolute -top-2 -right-2 bg-destructive text-destructive-foreground rounded-full p-1 hover:bg-destructive/90",children:i.jsx(es,{className:"h-4 w-4"})})]}):i.jsxs("button",{type:"button",onClick:()=>{var M;return(M=Y.current)==null?void 0:M.click()},className:"w-32 h-32 mx-auto border-2 border-dashed border-muted-foreground/30 rounded-lg flex flex-col items-center justify-center gap-2 hover:border-primary/50 transition-colors",children:[i.jsx(ed,{className:"h-6 w-6 text-muted-foreground"}),i.jsx("span",{className:"text-xs text-muted-foreground",children:"העלאת תמונה"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-name",children:"שם ההשתלמות"}),i.jsx(Oe,{id:"edit-name",value:s,onChange:M=>a(M.target.value),className:"text-right"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-description",children:"תיאור"}),i.jsx(Xs,{id:"edit-description",value:o,onChange:M=>l(M.target.value),className:"text-right resize-none",rows:3})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-date",children:"תאריך"}),i.jsx(Fd,{id:"edit-date",value:c,onChange:u,placeholder:"בחר תאריך"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-time",children:"שעה"}),i.jsxs(At,{value:d,onValueChange:f,children:[i.jsx(Ct,{children:i.jsx(Pt,{placeholder:"בחר שעה"})}),i.jsx(Tt,{children:Array.from({length:19},(M,I)=>{const z=Math.floor(I/2)+9,J=I%2===0?"00":"30",Z=`${z.toString().padStart(2,"0")}:${J}`;return i.jsx($e,{value:Z,children:Z},Z)})})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-branch",children:"סניף"}),i.jsxs(At,{value:h,onValueChange:M=>m(M),children:[i.jsx(Ct,{className:"text-right",children:i.jsx(Pt,{placeholder:"בחר סניף"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"תל אביב",children:"תל אביב"}),i.jsx($e,{value:"חיפה",children:"חיפה"})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"סוג ההשתלמות (קורסים מתאימים)"}),i.jsx("div",{className:"border border-border rounded-lg p-3 space-y-2 max-h-40 overflow-y-auto bg-background",children:P.length===0?i.jsx("p",{className:"text-sm text-muted-foreground text-center py-2",children:"אין קורסים זמינים"}):P.map(M=>i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(jc,{id:`edit-course-${M.id}`,checked:U.includes(M.id),onCheckedChange:()=>A(M.id)}),i.jsx("label",{htmlFor:`edit-course-${M.id}`,className:"text-sm cursor-pointer flex-1",children:M.name})]},M.id))}),U.length>0&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:["נבחרו ",U.length," קורסים"]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-maxParticipants",children:"כמות מותרת לרישום"}),i.jsx(Oe,{id:"edit-maxParticipants",type:"number",value:w,onChange:M=>y(M.target.value),dir:"ltr",min:"1"})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-listPrice",children:"מחיר מחירון (₪)"}),i.jsx(Oe,{id:"edit-listPrice",type:"number",value:g,onChange:M=>p(M.target.value),dir:"ltr",min:"0"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-yarinShachafPrice",children:"מחיר ירין שחף (₪)"}),i.jsx(Oe,{id:"edit-yarinShachafPrice",type:"number",value:x,onChange:M=>b(M.target.value),dir:"ltr",min:"0"})]})]}),i.jsxs("div",{className:"flex gap-3 pt-4",children:[i.jsx(ee,{type:"submit",variant:"rose",className:"flex-1",disabled:_||T,children:_||T?"שומר...":"שמור שינויים"}),i.jsx(ee,{type:"button",variant:"outline",onClick:()=>r(!1),children:"ביטול"})]})]})]})})}function Nhe({open:e,onOpenChange:t,workshopName:r,workshopId:n,eventDate:s,students:a,onAttendanceUpdate:o}){const[l,c]=v.useState({}),[u,d]=v.useState(null),h=(()=>
768{if(!s)return!0;const x=new Date;x.setHours(0,0,0,0);const b=new Date(s);return b.setHours(0,0,0,0),b<=x})();v.useEffect(()=>{const x={};a.forEach(b=>{b.registrationId&&(x[b.registrationId]=b.attended??null)}),c(x)},[a]);const m=async(x,b)=>{const w=b==="attended"?!0:b==="not_attended"?!1:null;d(x);try{const{error:y}=await de.from("workshop_registrations").update({attended:w}).eq("id",x);if(y)throw y;c(_=>({..._,[x]:w})),o==null||o()}catch(y){console.error("Error updating attendance:",y),K.error("שגיאה בעדכון נוכחות")}finally{d(null)}},g=x=>x===!0?"attended":x===!1?"not_attended":"not_marked",p=()=>{const x=`
769      <html dir="rtl">
770        <head>
771          <title>רשימת משתתפים - ${r}</title>
772          <style>
773            body { font-family: Arial, sans-serif; padding: 20px; }
774            h1 { font-size: 18px; margin-bottom: 20px; }
775            table { width: 100%; border-collapse: collapse; }
776            th, td { border: 1px solid #ddd; padding: 10px; text-align: right; }
777            th { background-color: #f5f5f5; }
778            .footer { margin-top: 20px; font-size: 12px; color: #666; }
779            .attended { color: green; }
780            .not-attended { color: red; }
781          </style>
782        </head>
783        <body>
784          <h1>רשימת משתתפים - ${r}</h1>
785          <table>
786            <thead>
787              <tr>
788                <th>#</th>
789                <th>שם</th>
790                <th>טלפון</th>
791                <th>נוכחות</th>
792              </tr>
793            </thead>
794            <tbody>
795              ${a.map((w,y)=>{const _=w.registrationId?l[w.registrationId]:null,N=_===!0?'<span class="attended">הגיעה</span>':_===!1?'<span class="not-attended">לא הגיעה</span>':"לא סומנה";return`
796                  <tr>
797                    <td>${y+1}</td>
798                    <td>${w.name}</td>
799                    <td dir="ltr">${w.phone}</td>
800                    <td>${N}</td>
801                  </tr>
802                `}).join("")}
803            </tbody>
804          </table>
805          <p class="footer">סה״כ ${a.length} תלמידות רשומות</p>
806        </body>
807      </html>
808    `,b=window.open("","_blank");b&&(b.document.write(x),b.document.close(),b.print())};return i.jsx(Ht,{open:e,onOpenChange:t,children:i.jsxs(Ut,{className:"sm:max-w-lg",dir:"rtl",children:[i.jsx(Wt,{children:i.jsxs(zt,{className:"text-right flex items-center gap-2",children:[i.jsx(xs,{className:"h-5 w-5 text-muted-foreground"}),"תלמידות רשומות - ",r]})}),!h&&i.jsx("div",{className:"p-2 bg-amber-50 border border-amber-200 rounded-lg text-sm text-amber-700",children:"לא ניתן לסמן נוכחות לפני מועד האירוע"}),a.length===0?i.jsxs("div",{className:"text-center py-8",children:[i.jsx(xs,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),i.jsx("p",{className:"text-muted-foreground",children:"אין תלמידות רשומות להשתלמות זו"})]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex justify-end mt-2",children:i.jsxs(ee,{variant:"outline",size:"sm",onClick:p,children:[i.jsx(bb,{className:"h-4 w-4 ml-2"}),"הדפסה"]})}),i.jsx(Dc,{className:"max-h-[400px] mt-2",children:i.jsx("div",{className:"space-y-3",children:a.map((x,b)=>{const w=x.registrationId?l[x.registrationId]:null,y=u===x.registrationId;return i.jsxs("div",{className:"flex items-center justify-between p-3 bg-muted/50 rounded-lg gap-3",children:[i.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[i.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:i.jsx(Nb,{className:"h-4 w-4 text-primary"})}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("p",{className:"font-medium text-foreground truncate",children:x.name}),i.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[i.jsx(Jh,{className:"h-3 w-3"}),i.jsx("span",{dir:"ltr",children:x.phone})]})]})]}),i.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[x.registrationId&&i.jsxs(At,{value:g(w),onValueChange:_=>m(x.registrationId,_),disabled:y||!h,children:[i.jsx(Ct,{className:"w-[140px] h-8 text-xs",children:i.jsx(Pt,{})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"not_marked",children:"לא סומנה נוכחות"}),i.jsx($e,{value:"attended",children:"הגיעה"}),i.jsx($e,{value:"not_attended",children:"לא הגיעה"})]})]}),i.jsxs("span",{className:"text-sm text-muted-foreground w-6 text-center",children:["#",b+1]})]})]},x.id)})})})]}),i.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:i.jsxs("p",{className:"text-sm text-muted-foreground text-center",children:['סה"כ ',a.length," תלמידות רשומות"]})})]})})}function She({open:e,onOpenChange:t,eventType:r,eventId:n,eventName:s,registeredCount:a}){const[o,l]=v.useState(""),[c,u]=v.useState(!1),d=async()=>{const f=o.trim();if(!f){K.error("יש להזין הודעה");return}if(a===0){K.error("אין תלמידות רשומות לאירוע");return}u(!0);try{const{data:h,error:m}=await de.functions.invoke("send-event-reminder",{body:{eventType:r,eventId:n,message:f}});if(m)throw m;if(!(h!=null&&h.success))throw new Error((h==null?void 0:h.error)||"שליחה נכשלה");K.success(`נשלחו ${h.sent} מתוך ${h.total} הודעות`),l(""),t(!1)}catch(h){console.error(h),K.error("שליחת ההודעה נכשלה")}finally{u(!1)}};return i.jsx(Ht,{open:e,onOpenChange:t,children:i.jsxs(Ut,{dir:"rtl",className:"max-h-[90vh] overflow-y-auto",children:[i.jsxs(Wt,{children:[i.jsxs(zt,{className:"text-right flex items-center gap-2",children:[i.jsx(E4,{className:"h-5 w-5"}),"שליחת תזכורת לנרשמים"]}),i.jsxs(a0,{className:"text-right",children:["ההודעה תישלח ב-SMS לכל ",a,' התלמידות הרשומות ל"',s,'".']})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Xs,{dir:"rtl",value:o,onChange:f=>l(f.target.value),placeholder:"כתבי כאן את הודעת התזכורת...",rows:6,maxLength:1e3,className:"text-right"}),i.jsxs("div",{className:"text-xs text-muted-foreground text-left",children:[o.length,"/1000"]})]}),i.jsxs(Yx,{className:"flex-row-reverse gap-2",children:[i.jsx(ee,{onClick:d,disabled:c||!o.trim(),children:c?"שולח...":`שלח ל-${a} נרשמות`}),i.jsx(ee,{variant:"outline",onClick:()=>
808t(!1),disabled:c,children:"ביטול"})]})]})})}const khe=e=>new Date(e).toLocaleDateString("he-IL"),l1=e=>{const t=new Date;t.setHours(0,0,0,0);const r=new Date(e.date);r.setHours(0,0,0,0);const n=r<t,s=e.registeredStudents.length>=e.maxParticipants;return n||s?{label:"סגור לרישום",isOpen:!1}:{label:"פתוח לרישום",isOpen:!0}};function jhe(){const{isAdmin:e,isCoordinator:t,isLoading:r}=gl(),n=!r&&(e||t),[s,a]=v.useState([]),[o,l]=v.useState(!0),[c,u]=v.useState(""),[d,f]=v.useState("open"),[h,m]=v.useState("all"),[g,p]=v.useState("all"),[x,b]=v.useState("all"),[w,y]=v.useState(null),[_,N]=v.useState(!1),[k,S]=v.useState(!1),[E,j]=v.useState(null),[T,R]=v.useState(!1),[P,D]=v.useState(!1),[U,Q]=v.useState(null),[Y,V]=v.useState(!1),[F,C]=v.useState(null),[X,se]=v.useState(!1),[A,M]=v.useState(null);v.useEffect(()=>{I()},[]);const I=async()=>{try{const{data:fe,error:te}=await de.from("workshops").select("*").order("date",{ascending:!1});if(te)throw te;const Ne=await Promise.all((fe||[]).map(async be=>{const{data:Qe,error:nt}=await de.from("workshop_registrations").select("id, student_id, attended, students (id, name, phone)").eq("workshop_id",be.id);if(nt)return console.error("Error fetching registrations:",nt),{id:be.id,name:be.name,description:be.description||"",date:be.date,time:be.time,branch:be.branch,listPrice:be.list_price,yarinShachafPrice:be.yarin_shachaf_price,maxParticipants:be.max_participants,registeredStudents:[],eligibleCourses:be.eligible_courses||[],isActive:be.is_active??!1};const Je=(Qe||[]).filter(Le=>Le.students).map(Le=>({id:Le.students.id,name:Le.students.name,phone:Le.students.phone,registrationId:Le.id,attended:Le.attended}));return{id:be.id,name:be.name,description:be.description||"",date:be.date,time:be.time,branch:be.branch,listPrice:be.list_price,yarinShachafPrice:be.yarin_shachaf_price,maxParticipants:be.max_participants,registeredStudents:Je,eligibleCourses:be.eligible_courses||[],isActive:be.is_active??!1}}));a(Ne)}catch(fe){console.error("Error fetching workshops:",fe),K.error("שגיאה בטעינת ההשתלמויות")}finally{l(!1)}},z=async fe=>{try{const{data:te,error:Ne}=await de.from("workshops").insert({name:fe.name,description:fe.description,date:fe.date,time:fe.time,branch:fe.branch,list_price:fe.listPrice,yarin_shachaf_price:fe.yarinShachafPrice,max_participants:fe.maxParticipants,image_url:fe.imageUrl||null,eligible_courses:fe.eligibleCourses,is_active:!1}).select().single();if(Ne)throw Ne;const be={id:te.id,name:te.name,description:te.description||"",date:te.date,time:te.time,branch:te.branch,listPrice:te.list_price,yarinShachafPrice:te.yarin_shachaf_price,maxParticipants:te.max_participants,registeredStudents:[],eligibleCourses:te.eligible_courses||[],isActive:te.is_active??!1};a(Qe=>[be,...Qe].sort((nt,Je)=>new Date(Je.date).getTime()-new Date(nt.date).getTime())),K.success("ההשתלמות נוספה בהצלחה")}catch(te){console.error("Error adding workshop:",te),K.error("שגיאה בהוספת ההשתלמות")}},J=fe=>{y(fe),N(!0)},Z=fe=>{j(fe),S(!0)},re=fe=>{Q(fe),D(!0)},ae=fe=>{a(te=>te.map(Ne=>Ne.id===fe.id?{...Ne,...fe}:Ne))},ne=async()=>{if(E){R(!0);try{const{data:fe,error:te}=await de.functions.invoke("delete-event",{body:{eventType:"workshop",eventId:E.id}});if(te)throw te;a(Ne=>Ne.filter(be=>be.id!==E.id)),fe.refundedCount>0?K.success(`ההשתלמות נמחקה והוחזרו ₪${fe.refundAmount} ל-${fe.refundedCount} תלמידות`):K.success("ההשתלמות נמחקה בהצלחה")}catch(fe){console.error("Error deleting workshop:",fe),K.error("שגיאה במחיקת ההשתלמות")}finally{R(!1),S(!1),j(null)}}},Se=async fe=>{try{const te=!fe.isActive,{error:Ne}=await de.from("workshops").update({is_active:te}).eq("id",fe.id);if(Ne)throw Ne;a(be=>be.map(Qe=>Qe.id===fe.id?{...Qe,isActive:te}:Qe)),K.success(te?"ההשתלמות הופעלה":"ההשתלמות הושבתה")}catch(te){console.error("Error toggling workshop active state:",te),K.error("שגיאה בעדכון סטטוס ההשתלמות")}},B=v.useMemo(()=>{const fe=new Date,te=fe.getMonth(),Ne=fe.getFullYear(),be=te===11?0:te+1,Qe=te===11?Ne+1:Ne,nt=s.filter(_e=>l1(_e).isOpen),Je=nt.filter(_e=>{const Te=new Date(_e.date);return Te.getMonth()===te&&Te.getFullYear()===Ne}),Le=nt.filter(_e=>{const Te=new Date(_e.date);return Te.getMonth()===be&&Te.getFullYear()===Qe}),lt=_e=>({telAviv:_e.filter(Te=>Te.branch==="תל אביב").length,haifa:_e.filter(Te=>Te.branch==="חיפה").length});return{thisMonth:{total:Je.length,...lt(Je)},nextMonth:{total:Le.length,...lt(Le)}}},[s]),qe=v.useMemo(()=>{const fe=new Set;
808return s.forEach(te=>{const Ne=new Date(te.date),be=`${Ne.getFullYear()}-${String(Ne.getMonth()+1).padStart(2,"0")}`;fe.add(be)}),Array.from(fe).sort()},[s]),ue=["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],Re=v.useMemo(()=>{const fe=new Set;return s.forEach(te=>{const Ne=new Date(te.date);fe.add(Ne.getDay())}),Array.from(fe).sort((te,Ne)=>te-Ne)},[s]),Ce=fe=>{const[te,Ne]=fe.split("-");return new Date(parseInt(te),parseInt(Ne)-1,1).toLocaleDateString("he-IL",{month:"long",year:"numeric"})},pe=s.filter(fe=>{const te=fe.name.includes(c)||fe.branch.includes(c),Ne=l1(fe),be=d==="all"||d==="open"&&Ne.isOpen||d==="closed"&&!Ne.isOpen,Qe=h==="all"||fe.branch===h,nt=new Date(fe.date),Je=`${nt.getFullYear()}-${String(nt.getMonth()+1).padStart(2,"0")}`,Le=g==="all"||Je===g,lt=x==="all"||nt.getDay()===parseInt(x);return te&&be&&Qe&&Le&&lt});return o?i.jsx(Hn,{children:i.jsx("div",{className:"flex items-center justify-center h-64",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})})}):i.jsxs(Hn,{children:[i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 animate-fade-in",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-foreground",children:"ניהול השתלמויות"}),i.jsx("p",{className:"text-muted-foreground mt-1",children:"ניהול וארגון השתלמויות מקצועיות"})]}),i.jsx(bhe,{onAddWorkshop:z})]}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 animate-slide-up",children:[i.jsxs("div",{className:"bg-card rounded-2xl shadow-card border border-border p-5",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl bg-purple-100 flex items-center justify-center",children:i.jsx(rr,{className:"h-5 w-5 text-purple-600"})}),i.jsx("span",{className:"text-sm font-medium text-foreground",children:"השתלמויות החודש"})]}),i.jsx("p",{className:"text-3xl font-bold text-foreground mb-2",children:B.thisMonth.total}),i.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(ls,{className:"h-3 w-3"}),i.jsxs("span",{children:["תל אביב: ",B.thisMonth.telAviv]})]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(ls,{className:"h-3 w-3"}),i.jsxs("span",{children:["חיפה: ",B.thisMonth.haifa]})]})]})]}),i.jsxs("div",{className:"bg-card rounded-2xl shadow-card border border-border p-5 gradient-rose",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl bg-foreground
808/10 flex items-center justify-center",children:i.jsx(rr,{className:"h-5 w-5 text-foreground"})}),i.jsx("span",{className:"text-sm font-medium text-foreground",children:"השתלמויות חודש הבא"})]}),i.jsx("p",{className:"text-3xl font-bold text-foreground mb-2",children:B.nextMonth.total}),i.jsxs("div",{className:"flex items-center gap-4 text-xs text-foreground/70",children:[i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(ls,{className:"h-3 w-3"}),i.jsxs("span",{children:["תל אביב: ",B.nextMonth.telAviv]})]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(ls,{className:"h-3 w-3"}),i.jsxs("span",{children:["חיפה: ",B.nextMonth.haifa]})]})]})]})]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 items-start sm:items-center",children:[i.jsxs("div",{className:"relative flex-1 max-w-md",children:[i.jsx(no,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(Oe,{placeholder:"חיפוש לפי שם או סניף...",className:"pr-10",value:c,onChange:fe=>u(fe.target.value)})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs(At,{value:d,onValueChange:fe=>f(fe),children:[i.jsx(Ct,{className:"w-[140px]",children:i.jsx(Pt,{placeholder:"סטטוס"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"all",children:"כל הסטטוסים"}),i.jsx($e,{value:"open",children:"פתוח לרישום"}),i.jsx($e,{value:"closed",children:"סגור לרישום"})]})]}),i.jsxs(At,{value:h,onValueChange:fe=>m(fe),children:[i.jsx(Ct,{className:"w-[130px]",children:i.jsx(Pt,{placeholder:"סניף"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"all",children:"כל הסניפים"}),i.jsx($e,{value:"תל אביב",children:"תל אביב"}),i.jsx($e,{value:"חיפה",children:"חיפה"})]})]}),i.jsxs(At,{value:g,onValueChange:p,children:[i.jsx(Ct,{className:"w-[140px]",children:i.jsx(Pt,{placeholder:"חודש"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"all",children:"כל החודשים"}),qe.map(fe=>i.jsx($e,{value:fe,children:Ce(fe)},fe))]})]}),i.jsxs(At,{value:x,onValueChange:b,children:[i.jsx(Ct,{className:"w-[110px]",children:i.jsx(Pt,{placeholder:"יום"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"all",children:"כל הימים"}),Re.map(fe=>i.jsxs($e,{value:fe.toString(),children:["יום ",ue[fe]]},fe))]})]})]}),i.jsxs(We,{variant:"secondary",className:"text-sm",children:[pe.length," תוצאות"]})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 animate-scale-in",children:pe.map(fe=>{const te=fe.registeredStudents.length,Ne=te/fe.maxParticipants*100,be=l1(fe);return i.jsxs("div",{className:xe("bg-card rounded-2xl shadow-card border border-border p-5 hover:shadow-lg transition-shadow relative",!be.isOpen&&"opacity-70",!fe.isActive&&"border-dashed border-muted-foreground/30"),children:[i.jsxs("div",{className:"flex items-start justify-between mb-4",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl gradient-rose flex items-center justify-center",children:i.jsx(pa,{className:"h-6 w-6 text-foreground"})}),i.jsx(We,{className:xe(be.isOpen?"bg-green-100 text-green-700":"bg-gray-100 text-gray-600"),children:be.label})]}),e&&i.jsxs("div",{className:"flex items-center justify-between mb-3 py-2 px-3 rounded-lg bg-muted/50",children:[i.jsx("span",{className:"text-sm text-muted-foreground",children:"סטטוס הצגה:"}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:xe("text-sm font-medium",fe.isActive?"text-green-600":"text-muted-foreground"),children:fe.isActive?"פעיל":"לא פעיל"}),i.jsx(m0,{checked:fe.isActive,onCheckedChange:()=>Se(fe)})]})]}),i.jsx("h3",{className:"font-semibold text-foreground text-lg mb-2",children:fe.name}),i.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mb-3",children:fe.description}),i.jsxs("div",{className:"space-y-2 text-sm",children:[i.jsxs("div",{className:"flex items-center gap-2 text-foreground",children:[i.jsx(rr,{className:"h-4 w-4 text-muted-foreground"}),i.jsx("span",{className:"font-medium",children:khe(fe.date)})]}),i.jsxs("div",{className:"flex items-center gap-2 text-foreground",children:[i.jsx(Hs,{className:"h-4 w-4 text-muted-foreground"}),i.jsx("span",{children:fe.time})]}),i.jsxs("div",{className:"flex items-center gap-2 text-foreground",children:[i.jsx(ls,{className:"h-4 w-4 text-muted-foreground"}),i.jsxs("span",{children:["סניף ",fe.branch]})]})]}),i.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:i.jsxs("button",{type:"button",className:"w-full text-right cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>J(fe),children:[i.jsxs("div",{className:"flex items-center justify-between mb-2",children:[i.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[i.jsx(xs,{className:"h-4 w-4 text-muted-foreground"}),i.jsx("span",{className:"text-muted-foreground",children:"נרשמו:"})]}),i.jsxs("span",{className:xe("font-semibold",be.isOpen?"text-foreground":"text-gray-500"),children:[te,"/",fe.maxParticipants]})]}),i.jsx(j0,{value:Ne,className:xe("h-2",!be.isOpen&&"[&>div]:bg-gray-400")})]})}),i.jsxs("div",{className:"mt-4 pt-4 border-t border-border space-y-2",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-sm text-muted-foreground",children:"מחיר מחירון:"}),i.jsxs("span",{className:"font-semibold text-foreground",children:["₪",fe.listPrice]})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-sm text-muted-foreground",children:"מחיר ירין שחף:"}),i.jsxs("span",{className:"font-semibold text-green-600",children:["₪",fe.yarinShachafPrice]})]}),i.jsxs("div",{className:"flex flex-wrap gap-2 mt-1",children:[i.jsx(M2,{eventId:fe.id,eventName:fe.name,eventType:"workshop",eventPrice:fe.yarinShachafPrice,onReg
808istrationComplete:I}),n&&i.jsxs(i.Fragment,{children:[i.jsxs(ee,{variant:"ghost",size:"sm",className:"flex-1 text-blue-600 hover:text-blue-600 hover:bg-blue-50",onClick:()=>{M(fe),se(!0)},children:[i.jsx(E4,{className:"h-4 w-4 mr-2"}),"שליחת תזכורת"]}),i.jsxs(ee,{variant:"ghost",size:"sm",className:"flex-1 text-amber-600 hover:text-amber-600 hover:bg-amber-50",onClick:()=>{C(fe),V(!0)},children:[i.jsx(Ex,{className:"h-4 w-4 mr-2"}),"ביטול מפגש"]})]}),e&&i.jsxs(i.Fragment,{children:[i.jsxs(ee,{variant:"ghost",size:"sm",className:"flex-1 text-primary hover:text-primary hover:bg-primary/10",onClick:()=>re(fe),children:[i.jsx(wd,{className:"h-4 w-4 mr-2"}),"ערוך"]}),i.jsxs(ee,{variant:"ghost",size:"sm",className:"flex-1 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>Z(fe),children:[i.jsx(Ia,{className:"h-4 w-4 mr-2"}),"מחק"]})]})]})]})]},fe.id)})}),pe.length===0&&i.jsxs("div",{className:"text-center py-12",children:[i.jsx(pa,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),i.jsx("p",{className:"text-muted-foreground",children:"לא נמצאו השתלמויות"})]})]}),i.jsx(Nhe,{open:_,onOpenChange:N,workshopName:(w==null?void 0:w.name)||"",workshopId:w==null?void 0:w.id,eventDate:w==null?void 0:w.date,students:(w==null?void 0:w.registeredStudents)||[],onAttendanceUpdate:I}),i.jsx(qs,{open:k,onOpenChange:S,children:i.jsxs(ys,{dir:"rtl",children:[i.jsxs(ws,{children:[i.jsx(_s,{className:"text-right",children:"מחיקת השתלמות"}),i.jsx(Ns,{className:"text-right",children:E&&E.registeredStudents.length>0?i.jsxs(i.Fragment,{children:['האם אתה בטוח שברצונך למחוק את ההשתלמות "',E.name,'"?',i.jsx("br",{}),i.jsx("br",{}),i.jsx("strong",{children:"שימו לב:"})," יש ",E.registeredStudents.length," תלמידות רשומות לאירוע זה. הקרדיט יוחזר אוטומטית לכל התלמידות (₪",E.yarinShachafPrice," לכל אחת)."]}):i.jsxs(i.Fragment,{children:['האם אתה בטוח שברצונך למחוק את ההשתלמות "',E==null?void 0:E.name,'"?']})})]}),i.jsxs(bs,{className:"flex-row-reverse gap-2",children:[i.jsx(ks,{disabled:T,children:"ביטול"}),i.jsx(Ss,{onClick:ne,disabled:T,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:T?"מוחק...":"מחק"})]})]})}),i.jsx(_he,{workshop:U,open:P,onOpenChange:D,onSave:ae}),i.jsx(L2,{open:Y,onOpenChange:V,eventId:(F==null?void 0:F.id)||"",eventName:(F==null?void 0:F.name)||"",eventType:"workshop",registeredCount:(F==null?void 0:F.registeredStudents.length)||0,onCancelled:I}),i.jsx(She,{open:X,onOpenChange:se,eventType:"workshop",eventId:(A==null?void 0:A.id)||"",eventName:(A==null?void 0:A.name)||"",registeredCount:(A==null?void 0:A.registeredStudents.length)||0})]})}function wE({onAddWorkshop:e,initialData:t,open:r,onOpenChange:n}){const[s,a]=v.useState(!1),o=r!==void 0,l=o?r:s,c=o?n||(()=>{}):a,[u,d]=v.useState(""),[f,h]=v.useState(""),[m,g]=v.useState(""),[p,x]=v.useState(""),[b,w]=v.useState("תל אביב"),[y,_]=v.useState(""),[N,k]=v.useState(""),[S,E]=v.useState(""),[j,T]=v.useState([]),[R,P]=v.useState([]),[D,U]=v.useState(!1);v.useEffect(()=>{(async()=>{const{data:C,error:X}=await de.from("courses").select("id, name").eq("status","active").order("name");!X&&C&&P(C)})()},[]),v.useEffect(()=>{t&&l&&(d(t.name),h(t.description),g(""),x(t.time),w(t.branch),_(t.listPrice.toString()),k(t.yarinShachafPrice.toString()),E(t.maxParticipants.toString()),T(t.eligibleCourses))},[t,l]);const Q=async F=>{if(F.preventDefault(),!u.trim()){K.error("נא להזין שם סדנא");return}if(!f.trim()){K.error("נא להזין תיאור");return}if(!m.trim()){K.error("נא להזין תאריך");return}if(!p.trim()){K.error("נא להזין שעה");return}if(!S||parseInt(S)<=0){K.error("נא להזין כמות מותרת לרישום תקינה");return}if(!y||parseFloat(y)<0){K.error("נא להזין מחיר מחירון תקין");return}if(!N||parseFloat(N)<0){K.error("נא להזין מחיר ירין שחף תקין");return}if(j.length===0){K.error("נא לבחור לפחות קורס אחד שיהיה רשאי להירשם");return}U(!0);try{e({name:u.trim(),description:f.trim(),date:m.trim(),time:p.trim(),branch:b,listPrice:parseFloat(y),yarinShachafPrice:parseFloat(N),maxParticipants:parseInt(S),eligibleCourses:j}),K.success(`סדנא "${u}" נוספה בהצלחה`),d(""),h(""),g(""),x(""),w("תל אביב"),_(""),k(""),E(""),T([]),c(!1)}catch{K.error("שגיאה בהוספת סדנא")}finally{U(!1)}},Y=(F,C)=>{T(C?X=>[...X,F]:X=>X.filter(se=>se!==F))},V=!!t;
808return i.jsxs(Ht,{open:l,onOpenChange:c,children:[!o&&i.jsx(va,{asChild:!0,children:i.jsxs(ee,{variant:"rose",className:"gap-2",children:[i.jsx(hs,{className:"h-4 w-4"}),"הוסף סדנא מעשית"]})}),i.jsxs(Ut,{className:"sm:max-w-md max-h-[90vh] overflow-y-auto",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:V?"שכפול סדנא מעשית":"הוספת סדנא מעשית חדשה"})}),i.jsxs("form",{onSubmit:Q,className:"space-y-4 mt-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"name",children:"שם הסדנא"}),i.jsx(Oe,{id:"name",placeholder:"לדוגמה: סדנת איפור כלות - תרגול מעשי",value:u,onChange:F=>d(F.target.value),className:"text-right"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"description",children:"תיאור"}),i.jsx(Xs,{id:"description",placeholder:"תיאור קצר של הסדנא...",value:f,onChange:F=>h(F.target.value),className:"text-right resize-none",rows:3})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"date",children:"תאריך"}),i.jsx(Fd,{id:"date",value:m,onChange:g,placeholder:"בחר תאריך"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"time",children:"שעה"}),i.jsxs(At,{value:p,onValueChange:x,children:[i.jsx(Ct,{children:i.jsx(Pt,{placeholder:"בחר שעה"})}),i.jsx(Tt,{children:Array.from({length:19},(F,C)=>{const X=Math.floor(C/2)+9,se=C%2===0?"00":"30",A=`${X.toString().padStart(2,"0")}:${se}`;return i.jsx($e,{value:A,children:A},A)})})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"branch",children:"סניף"}),i.jsxs(At,{value:b,onValueChange:F=>w(F),children:[i.jsx(Ct,{className:"text-right",children:i.jsx(Pt,{placeholder:"בחר סניף"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"תל אביב",children:"תל אביב"}),i.jsx($e,{value:"חיפה",children:"חיפה"})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"maxParticipants",children:"כמות מותרת לרישום"}),i.jsx(Oe,{id:"maxParticipants",type:"number",value:S,onChange:F=>E(F.target.value),dir:"ltr",min:"1"})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"listPrice",children:"מחיר מחירון (₪)"}),i.jsx(Oe,{id:"listPrice",type:"number",value:y,onChange:F=>_(F.target.value),dir:"ltr",min:"0"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"yarinShachafPrice",children:"מחיר ירין שחף (₪)"}),i.jsx(Oe,{id:"yarinShachafPrice",type:"number",value:N,onChange:F=>k(F.target.value),dir:"ltr",min:"0"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"מי רשאי להירשם לסדנא"}),i.jsx("div",{className:"border border-border rounded-md p-3 space-y-2 max-h-40 overflow-y-auto",children:R.length===0?i.jsx("p",{className:"text-sm text-muted-foreground",children:"אין קורסים פעילים"}):R.map(F=>i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(jc,{id:`course-${F.id}`,checked:j.includes(F.name),onCheckedChange:C=>Y(F.name,!!C)}),i.jsx(ve,{htmlFor:`course-${F.id}`,className:"text-sm font-normal cursor-pointer",children:F.name})]},F.id))}),j.length>0&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:["נבחרו ",j.length," קורסים"]})]}),i.jsxs("div",{className:"flex gap-3 pt-4",children:[i.jsx(ee,{type:"submit",variant:"rose",className:"flex-1",disabled:D,children:D?"מוסיף...":V?"שמור סדנא":"הוסף סדנא"}),i.jsx(ee,{type:"button",variant:"outline",onClick:()=>c(!1),children:"ביטול"})]})]})]})]})}function Ehe({workshop:e,open:t,onOpenChange:r,onSave:n}){const[s,a]=v.useState(""),[o,l]=v.useState(""),[c,u]=v.useState(""),[d,f]=v.useState(""),[h,m]=v.useState("תל אביב"),[g,p]=v.useState(""),[x,b]=v.useState(""),[w,y]=v.useState(""),[_,N]=v.useState([]),[k,S]=v.useState([]),[E,j]=v.useState(!1);v.useEffect(()=>{(async()=>{const{data:D,error:U}=await de.from("courses").select("id, name").eq("status","active").order("name");!U&&D&&S(D)})()},[]),v.useEffect(()=>{e&&(a(e.name),l(e.description),u(e.date),f(e.time),m(e.branch),p(e.listPrice.toString()),b(e.yarinShachafPrice.toString()),y(e.maxParticipants.toString()),N(e.eligibleCourses||[]))},[e]);const T=async P=>{if(P.preventDefault(),!!e){if(!s.trim()){K.error("נא להזין שם סדנא");return}if(!c.trim()){K.error("נא להזין תאריך");return}if(!d.trim()){K.error("נא להזין שעה");return}if(!w||parseInt(w)<=0){K.error("נא להזין כמות מותרת לרישום תקינה");return}if(!g||parseFloat(g)<0){K.error("נא להזין מחיר מחירון תקי×
808Ÿ");return}if(!x||parseFloat(x)<0){K.error("נא להזין מחיר ירין שחף תקין");return}if(_.length===0){K.error("נא לבחור לפחות קורס אחד שיהיה רשאי להירשם");return}j(!0);try{const{error:D}=await de.from("practical_workshops").update({name:s.trim(),description:o.trim(),date:c.trim(),time:d.trim(),branch:h,list_price:parseFloat(g),yarin_shachaf_price:parseFloat(x),max_participants:parseInt(w),eligible_courses:_}).eq("id",e.id);if(D)throw D;n({...e,name:s.trim(),description:o.trim(),date:c.trim(),time:d.trim(),branch:h,listPrice:parseFloat(g),yarinShachafPrice:parseFloat(x),maxParticipants:parseInt(w),eligibleCourses:_}),K.success("הסדנה עודכנה בהצלחה"),r(!1)}catch(D){console.error("Error updating practical workshop:",D),K.error("שגיאה בעדכון הסדנה")}finally{j(!1)}}},R=(P,D)=>{N(D?U=>[...U,P]:U=>U.filter(Q=>Q!==P))};return i.jsx(Ht,{open:t,onOpenChange:r,children:i.jsxs(Ut,{className:"sm:max-w-md max-h-[90vh] overflow-y-auto",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"עריכת סדנא מעשית"})}),i.jsxs("form",{onSubmit:T,className:"space-y-4 mt-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-name",children:"שם הסדנא"}),i.jsx(Oe,{id:"edit-name",value:s,onChange:P=>a(P.target.value),className:"text-right"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-description",children:"תיאור"}),i.jsx(Xs,{id:"edit-description",value:o,onChange:P=>l(P.target.value),className:"text-right resize-none",rows:3})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-date",children:"תאריך"}),i.jsx(Fd,{id:"edit-date",value:c,onChange:u,placeholder:"בחר תאריך"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-time",children:"שעה"}),i.jsxs(At,{value:d,onValueChange:f,children:[i.jsx(Ct,{children:i.jsx(Pt,{placeholder:"בחר שעה"})}),i.jsx(Tt,{children:Array.from({length:19},(P,D)=>{const U=Math.floor(D/2)+9,Q=D%2===0?"00":"30",Y=`${U.toString().padStart(2,"0")}:${Q}`;return i.jsx($e,{value:Y,children:Y},Y)})})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-branch",children:"סניף"}),i.jsxs(At,{value:h,onValueChange:P=>m(P),children:[i.jsx(Ct,{className:"text-right",children:i.jsx(Pt,{placeholder:"בחר סניף"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"תל אביב",children:"תל אביב"}),i.jsx($e,{value:"חיפה",children:"חיפה"})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-maxParticipants",children:"כמות מותרת לרישום"}),i.jsx(Oe,{id:"edit-maxParticipants",type:"number",value:w,onChange:P=>y(P.target.value),dir:"ltr",min:"1"})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-listPrice",children:"מחיר מחירון (₪)"}),i.jsx(Oe,{id:"edit-listPrice",type:"number",value:g,onChange:P=>p(P.target.value),dir:"ltr",min:"0"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"edit-yarinShachafPrice",children:"מחיר ירין שחף (₪)"}),i.jsx(Oe,{id:"edit-yarinShachafPrice",type:"number",value:x,onChange:P=>b(P.target.value),dir:"ltr",min:"0"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"מי רשאי להירשם לסדנא"}),i.jsx("div",{className:"border border-border rounded-md p-3 space-y-2 max-h-40 overflow-y-auto",children:k.length===0?i.jsx("p",{className:"text-sm text-muted-foreground",children:"אין קורסים פעילים"}):k.map(P=>i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(jc,{id:`edit-course-${P.id}`,checked:_.includes(P.name),onCheckedChange:D=>R(P.name,!!D)}),i.jsx(ve,{htmlFor:`edit-course-${P.id}`,className:"text-sm font-normal cursor-pointer",children:P.name})]},P.id))}),_.length>0&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:["נבחרו ",_.length," קורסים"]})]}),i.jsxs("div",{className:"flex gap-3 pt-4",children:[i.jsx(ee,{type:"submit",variant:"rose",className:"flex-1",disabled:E,children:E?"שומר...":"שמור שינויים"}),i.jsx(ee,{type:"button",variant:"outline",onClick:()=>r(!1),children:"ביטול"})]})]})]})})}function Che({open:e,onOpenChange:t,workshopName:r,workshopId:n,eventDate:s,students:a,onAttendanceUpdate:o}){const[l,c]=v.useState({}),[u,d]=v.useState(null),h=(()=>
808{if(!s)return!0;const x=new Date;x.setHours(0,0,0,0);const b=new Date(s);return b.setHours(0,0,0,0),b<=x})();v.useEffect(()=>{const x={};a.forEach(b=>{b.registrationId&&(x[b.registrationId]=b.attended??null)}),c(x)},[a]);const m=async(x,b)=>{const w=b==="attended"?!0:b==="not_attended"?!1:null;d(x);try{const{error:y}=await de.from("practical_workshop_registrations").update({attended:w}).eq("id",x);if(y)throw y;c(_=>({..._,[x]:w})),o==null||o()}catch(y){console.error("Error updating attendance:",y),K.error("שגיאה בעדכון נוכחות")}finally{d(null)}},g=x=>x===!0?"attended":x===!1?"not_attended":"not_marked",p=()=>{const x=`
809      <html dir="rtl">
810        <head>
811          <title>רשימת משתתפים - ${r}</title>
812          <style>
813            body { font-family: Arial, sans-serif; padding: 20px; }
814            h1 { font-size: 18px; margin-bottom: 20px; }
815            table { width: 100%; border-collapse: collapse; }
816            th, td { border: 1px solid #ddd; padding: 10px; text-align: right; }
817            th { background-color: #f5f5f5; }
818            .footer { margin-top: 20px; font-size: 12px; color: #666; }
819            .attended { color: green; }
820            .not-attended { color: red; }
821          </style>
822        </head>
823        <body>
824          <h1>רשימת משתתפים - ${r}</h1>
825          <table>
826            <thead>
827              <tr>
828                <th>#</th>
829                <th>שם</th>
830                <th>טלפון</th>
831                <th>נוכחות</th>
832              </tr>
833            </thead>
834            <tbody>
835              ${a.map((w,y)=>{const _=w.registrationId?l[w.registrationId]:null,N=_===!0?'<span class="attended">הגיעה</span>':_===!1?'<span class="not-attended">לא הגיעה</span>':"לא סומנה";return`
836                  <tr>
837                    <td>${y+1}</td>
838                    <td>${w.name}</td>
839                    <td dir="ltr">${w.phone}</td>
840                    <td>${N}</td>
841                  </tr>
842                `}).join("")}
843            </tbody>
844          </table>
845          <p class="footer">סה״כ ${a.length} תלמידות רשומות</p>
846        </body>
847      </html>
848    `,b=window.open("","_blank");b&&(b.document.write(x),b.document.close(),b.print())};return i.jsx(Ht,{open:e,onOpenChange:t,children:i.jsxs(Ut,{className:"sm:max-w-lg",dir:"rtl",children:[i.jsx(Wt,{children:i.jsxs(zt,{className:"text-right flex items-center gap-2",children:[i.jsx(xs,{className:"h-5 w-5 text-muted-foreground"}),"תלמידות רשומות - ",r]})}),!h&&i.jsx("div",{className:"p-2 bg-amber-50 border border-amber-200 rounded-lg text-sm text-amber-700",children:"לא ניתן לסמן נוכחות לפני מועד האירוע"}),a.length===0?i.jsxs("div",{className:"text-center py-8",children:[i.jsx(xs,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),i.jsx("p",{className:"text-muted-foreground",children:"אין תלמידות רשומות לסדנא זו"})]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex justify-end mt-2",children:i.jsxs(ee,{variant:"outline",size:"sm",onClick:p,children:[i.jsx(bb,{className:"h-4 w-4 ml-2"}),"הדפסה"]})}),i.jsx(Dc,{className:"max-h-[400px] mt-2",children:i.jsx("div",{className:"space-y-3",children:a.map((x,b)=>{const w=x.registrationId?l[x.registrationId]:null,y=u===x.registrationId;return i.jsxs("div",{className:"flex items-center justify-between p-3 bg-muted/50 rounded-lg gap-3",children:[i.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[i.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:i.jsx(Nb,{className:"h-4 w-4 text-primary"})}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("p",{className:"font-medium text-foreground truncate",children:x.name}),i.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[i.jsx(Jh,{className:"h-3 w-3"}),i.jsx("span",{dir:"ltr",children:x.phone})]})]})]}),i.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[x.registrationId&&i.jsxs(At,{value:g(w),onValueChange:_=>m(x.registrationId,_),disabled:y||!h,children:[i.jsx(Ct,{className:"w-[140px] h-8 text-xs",children:i.jsx(Pt,{})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"not_marked",children:"לא סומנה נוכחות"}),i.jsx($e,{value:"attended",children:"הגיעה"}),i.jsx($e,{value:"not_attended",children:"לא הגיעה"})]})]}),i.jsxs("span",{className:"text-sm text-muted-foreground w-6 text-center",children:["#",b+1]})]})]},x.id)})})})]}),i.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:i.jsxs("p",{className:"text-sm text-muted-foreground text-center",children:['סה"כ ',a.length," תלמידות רשומות"]})})]})})}const The=e=>new Date(e).toLocaleDateString("he-IL"),c1=e=>{const t=new Date;t.setHours(0,0,0,0);const r=new Date(e.date);return r.setHours(0,0,0,0),r<t||e.registeredStudents.length>=e.maxParticipants?{label:"סגור לרישום",isOpen:!1}:{label:"פתוח לרישום",isOpen:!0}};function Ahe(){const{role:e,isLoading:t,isAdmin:r,isCoordinator:n}=gl(),[s,a]=v.useState([]),[o,l]=v.useState(!0),[c,u]=v.useState(""),[d,f]=v.useState("open"),[h,m]=v.useState("all"),[g,p]=v.useState("all"),[x,b]=v.useState("all"),[w,y]=v.useState(null),[_,N]=v.useState(!1),[k,S]=v.useState(!1),[E,j]=v.useState(null),[T,R]=v.useState(!1),[P,D]=v.useState(!1),[U,Q]=v.useState(null),[Y,V]=v.useState(!1),[F,C]=v.useState(null),[X,se]=v.useState(!1),[A,M]=v.useState(null),I=!t&&(e==="admin"||e==="coordinator"||r||n);v.useEffect(()=>{z()},[]);const z=async()=>{try{const{data:te,error:Ne}=await de.from("practical_workshops").select("*").order("date",{ascending:!0});if(Ne)throw Ne;const be=await Promise.all((te||[]).map(async Qe=>{const{data:nt}=await de.from("practical_workshop_registrations").select("id, student_id, attended, students (id, name, phone)").eq("practical_workshop_id",Qe.id);return{id:Qe.id,name:Qe.name,description:Qe.description||"",date:Qe.date,time:Qe.time,branch:Qe.branch,listPrice:Qe.list_price,yarinShachafPrice:Qe.yarin_shachaf_price,maxParticipants:Qe.max_participants,eligibleCourses:Qe.eligible_courses||[],registeredStudents:(nt||[]).filter(Je=>Je.students).map(Je=>({id:Je.students.id,name:Je.students.name,phone:Je.students.phone,registrationId:Je.id,attended:Je.attended}))}}));a(be)}catch(te){console.error("Error:",te)}finally{l(!1)}},J=async te=>{try{const{data:Ne,error:be}=await de.from("practical_workshops").insert({name:te.name,description:te.description,date:te.date,time:te.time,branch:te.branch,list_price:te.listPrice,yarin_shachaf_price:te.yarinShachafPrice,max_participants:te.maxParticipants,eligible_courses:te.eligibleCourses}).select().single();if(be)throw be;a(Qe=>[...Qe,{...Ne,listPrice:Ne.list_price,yarinShachafPrice:Ne.yarin_shachaf_price,maxParticipants:Ne.max_participants,eligibleCourses:Ne.eligible_courses||[],registeredStudents:[],branch:Ne.branch}].sort((nt,Je)=>new Date(nt.date).getTime()-new Date(Je.date).getTime())),K.success("הסדנה נוספה בהצלחה")}catch(Ne){console.error("Error:",Ne),K.error("שגיאה בהוספת הסדנה")}},Z=te=>{j(te),S(!0)},re=te=>{Q(te),D(!0)},ae=te=>{a(Ne=>Ne.map(be=>be.id===te.id?{...be,...te}:be))},ne=te=>{C(te),V(!0)},Se=()=>{V(!1),C(null)},B=async()=>
848{if(E){R(!0);try{const{data:te,error:Ne}=await de.functions.invoke("delete-event",{body:{eventType:"practical_workshop",eventId:E.id}});if(Ne)throw Ne;a(be=>be.filter(Qe=>Qe.id!==E.id)),te.refundedCount>0?K.success(`הסדנה נמחקה והוחזרו ₪${te.refundAmount} ל-${te.refundedCount} תלמידות`):K.success("הסדנה נמחקה בהצלחה")}catch(te){console.error("Error deleting practical workshop:",te),K.error("שגיאה במחיקת הסדנה")}finally{R(!1),S(!1),j(null)}}},qe=v.useMemo(()=>{const te=new Date,Ne=te.getMonth(),be=te.getFullYear(),Qe=Ne===11?0:Ne+1,nt=Ne===11?be+1:be,Je=s.filter(Te=>c1(Te).isOpen),Le=Je.filter(Te=>{const et=new Date(Te.date);return et.getMonth()===Ne&&et.getFullYear()===be}),lt=Je.filter(Te=>{const et=new Date(Te.date);return et.getMonth()===Qe&&et.getFullYear()===nt}),_e=Te=>({telAviv:Te.filter(et=>et.branch==="תל אביב").length,haifa:Te.filter(et=>et.branch==="חיפה").length});return{thisMonth:{total:Le.length,..._e(Le)},nextMonth:{total:lt.length,..._e(lt)}}},[s]),ue=v.useMemo(()=>{const te=new Set;return s.forEach(Ne=>{const be=new Date(Ne.date),Qe=`${be.getFullYear()}-${String(be.getMonth()+1).padStart(2,"0")}`;te.add(Qe)}),Array.from(te).sort()},[s]),Re=["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],Ce=v.useMemo(()=>{const te=new Set;return s.forEach(Ne=>{const be=new Date(Ne.date);te.add(be.getDay())}),Array.from(te).sort((Ne,be)=>Ne-be)},[s]),pe=te=>{const[Ne,be]=te.split("-");return new Date(parseInt(Ne),parseInt(be)-1,1).toLocaleDateString("he-IL",{month:"long",year:"numeric"})},fe=s.filter(te=>{const Ne=te.name.includes(c)||te.branch.includes(c),be=c1(te),Qe=d==="all"||d==="open"&&be.isOpen||d==="closed"&&!be.isOpen,nt=h==="all"||te.branch===h,Je=new Date(te.date),Le=`${Je.getFullYear()}-${String(Je.getMonth()+1).padStart(2,"0")}`,lt=g==="all"||Le===g,_e=x==="all"||Je.getDay()===parseInt(x);return Ne&&Qe&&nt&&lt&&_e});return o||t?i.jsx(Hn,{children:i.jsx("div",{className:"flex items-center justify-center h-64",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})})}):i.jsxs(Hn,{children:[i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 animate-fade-in",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-foreground",children:"ניהול סדנאות מעשיות"}),i.jsx("p",{className:"text-muted-foreground mt-1",children:"ניהול וארגון סדנאות תרגול מעשיות"})]}),i.jsx(wE,{onAddWorkshop:J})]}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 animate-slide-up",children:[i.jsxs("div",{className:"bg-card rounded-2xl shadow-card border border-border p-5",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl bg-orange-100 flex items-center justify-center",children:i.jsx(rr,{className:"h-5 w-5 text-orange-600"})}),i.jsx("span",{className:"text-sm font-medium text-foreground",children:"סדנאות החודש"})]}),i.jsx("p",{className:"text-3xl font-bold text-foreground mb-2",children:qe.thisMonth.total}),i.jsxs("div",{className:"flex gap-4 text-xs text-muted-foreground",children:[i.jsxs("span",{children:["תל אביב: ",qe.thisMonth.telAviv]}),i.jsxs("span",{children:["חיפה: ",qe.thisMonth.haifa]})]})]}),i.jsxs("div",{className:"bg-card rounded-2xl shadow-card border border-border p-5 gradient-rose",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl bg-foreground
848/10 flex items-center justify-center",children:i.jsx(rr,{className:"h-5 w-5 text-foreground"})}),i.jsx("span",{className:"text-sm font-medium text-foreground",children:"סדנאות חודש הבא"})]}),i.jsx("p",{className:"text-3xl font-bold text-foreground mb-2",children:qe.nextMonth.total}),i.jsxs("div",{className:"flex gap-4 text-xs text-foreground/70",children:[i.jsxs("span",{children:["תל אביב: ",qe.nextMonth.telAviv]}),i.jsxs("span",{children:["חיפה: ",qe.nextMonth.haifa]})]})]})]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 items-start sm:items-center",children:[i.jsxs("div",{className:"relative flex-1 max-w-md",children:[i.jsx(no,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(Oe,{placeholder:"חיפוש...",className:"pr-10",value:c,onChange:te=>u(te.target.value)})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs(At,{value:d,onValueChange:te=>f(te),children:[i.jsx(Ct,{className:"w-[140px]",children:i.jsx(Pt,{placeholder:"סטטוס"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"all",children:"כל הסטטוסים"}),i.jsx($e,{value:"open",children:"פתוח לרישום"}),i.jsx($e,{value:"closed",children:"סגור לרישום"})]})]}),i.jsxs(At,{value:h,onValueChange:te=>m(te),children:[i.jsx(Ct,{className:"w-[130px]",children:i.jsx(Pt,{placeholder:"סניף"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"all",children:"כל הסניפים"}),i.jsx($e,{value:"תל אביב",children:"תל אביב"}),i.jsx($e,{value:"חיפה",children:"חיפה"})]})]}),i.jsxs(At,{value:g,onValueChange:p,children:[i.jsx(Ct,{className:"w-[140px]",children:i.jsx(Pt,{placeholder:"חודש"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"all",children:"כל החודשים"}),ue.map(te=>i.jsx($e,{value:te,children:pe(te)},te))]})]}),i.jsxs(At,{value:x,onValueChange:b,children:[i.jsx(Ct,{className:"w-[110px]",children:i.jsx(Pt,{placeholder:"יום"})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"all",children:"כל הימים"}),Ce.map(te=>i.jsxs($e,{value:te.toString(),children:["יום ",Re[te]]},te))]})]})]}),i.jsxs(We,{variant:"secondary",className:"text-sm",children:[fe.length," תוצאות"]})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 animate-scale-in",children:fe.map(te=>{const Ne=te.registeredStudents.length,be=c1(te);return i.jsxs("div",{className:xe("bg-card rounded-2xl shadow-card border border-border p-5 hover:shadow-lg transition-shadow",!be.isOpen&&"opacity-70"),children:[i.jsxs("div",{className:"flex items-start justify-between mb-4",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl gradient-rose flex items-center justify-center",children:i.jsx(mp,{className:"h-6 w-6 text-foreground"})}),i.jsx(We,{className:xe(be.isOpen?"bg-green-100 text-green-700":"bg-gray-100 text-gray-600"),children:be.label})]}),i.jsx("h3",{className:"font-semibold text-foreground text-lg mb-2",children:te.name}),i.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mb-3",children:te.description}),i.jsxs("div",{className:"space-y-2 text-sm",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(rr,{className:"h-4 w-4 text-muted-foreground"}),i.jsx("span",{className:"font-medium",children:The(te.date)})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Hs,{className:"h-4 w-4 text-muted-foreground"}),i.jsx("span",{children:te.time})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(ls,{className:"h-4 w-4 text-muted-foreground"}),i.jsxs("span",{children:["סניף ",te.branch]})]})]}),i.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:i.jsxs("button",{type:"button",className:"w-full text-right cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>{y(te),N(!0)},children:[i.jsxs("div",{className:"flex items-center justify-between mb-2",children:[i.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[i.jsx(xs,{className:"h-4 w-4 text-muted-foreground"}),i.jsx("span",{className:"text-muted-foreground",children:"נרשמו:"})]}),i.jsxs("span",{className:xe("font-semibold",be.isOpen?"text-foreground":"text-gray-500"),children:[Ne,"/",te.maxParticipants]})]}),i.jsx(j0,{value:Ne/te.maxParticipants*100,className:xe("h-2",!be.isOpen&&"[&>div]:bg-gray-400")})]})}),i.jsxs("div",{className:"mt-4 pt-4 border-t border-border space-y-2",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-sm text-muted-foreground",children:"מחיר מחירון:"}),i.jsxs("span",{className:"font-semibold",children:["₪",te.listPrice]})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-sm text-muted-foreground",children:"מחיר ירין שחף:"}),i.jsxs("span",{className:"font-semibold text-green-600",children:["₪",te.yarinShachafPrice]})]})]}),i.jsxs("div",{className:"flex flex-wrap gap-2 mt-3",children:[i.jsx(M2,{eventId:te.id,eventName:te.name,eventType:"practical_workshop",eventPrice:te.yarinShachafPrice,onReg
848istrationComplete:z}),I&&i.jsxs(ee,{variant:"ghost",size:"sm",className:"flex-1 text-amber-600 hover:text-amber-600 hover:bg-amber-50",onClick:()=>{M(te),se(!0)},children:[i.jsx(Ex,{className:"h-4 w-4 mr-1"}),"ביטול מפגש"]}),r&&i.jsxs(i.Fragment,{children:[i.jsxs(ee,{variant:"ghost",size:"sm",className:"flex-1 text-primary hover:text-primary hover:bg-primary/10",onClick:()=>re(te),children:[i.jsx(wd,{className:"h-4 w-4 mr-1"}),"ערוך"]}),i.jsxs(ee,{variant:"ghost",size:"sm",className:"flex-1 text-blue-600 hover:text-blue-600 hover:bg-blue-50",onClick:()=>ne(te),children:[i.jsx(Cs,{className:"h-4 w-4 mr-1"}),"שכפל"]}),i.jsxs(ee,{variant:"ghost",size:"sm",className:"flex-1 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>Z(te),children:[i.jsx(Ia,{className:"h-4 w-4 mr-1"}),"מחק"]})]})]})]},te.id)})}),fe.length===0&&i.jsxs("div",{className:"text-center py-12",children:[i.jsx(mp,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),i.jsx("p",{className:"text-muted-foreground",children:"לא נמצאו סדנאות מעשיות"})]})]}),i.jsx(Che,{open:_,onOpenChange:N,workshopName:(w==null?void 0:w.name)||"",workshopId:w==null?void 0:w.id,eventDate:w==null?void 0:w.date,students:(w==null?void 0:w.registeredStudents)||[],onAttendanceUpdate:z}),i.jsx(qs,{open:k,onOpenChange:S,children:i.jsxs(ys,{dir:"rtl",children:[i.jsxs(ws,{children:[i.jsx(_s,{className:"text-right",children:"מחיקת סדנה מעשית"}),i.jsx(Ns,{className:"text-right",children:E&&E.registeredStudents.length>0?i.jsxs(i.Fragment,{children:['האם אתה בטוח שברצונך למחוק את הסדנה "',E.name,'"?',i.jsx("br",{}),i.jsx("br",{}),i.jsx("strong",{children:"שימו לב:"})," יש ",E.registeredStudents.length," תלמידות רשומות לאירוע זה. הקרדיט יוחזר אוטומטית לכל התלמידות (₪",E.yarinShachafPrice," לכל אחת)."]}):i.jsxs(i.Fragment,{children:['האם אתה בטוח שברצונך למחוק את הסדנה "',E==null?void 0:E.name,'"?']})})]}),i.jsxs(bs,{className:"flex-row-reverse gap-2",children:[i.jsx(ks,{disabled:T,children:"ביטול"}),i.jsx(Ss,{onClick:B,disabled:T,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:T?"מוחק...":"מחק"})]})]})}),i.jsx(Ehe,{workshop:U,open:P,onOpenChange:D,onSave:ae}),i.jsx(wE,{onAddWorkshop:te=>{J(te),Se()},initialData:F?{name:F.name,description:F.description,date:F.date,time:F.time,branch:F.branch,listPrice:F.listPrice,yarinShachafPrice:F.yarinShachafPrice,maxParticipants:F.maxParticipants,eligibleCourses:F.eligibleCourses}:null,open:Y,onOpenChange:te=>{te||Se()}}),i.jsx(L2,{open:X,onOpenChange:se,eventId:(A==null?void 0:A.id)||"",eventName:(A==null?void 0:A.name)||"",eventType:"practical_workshop",registeredCount:(A==null?void 0:A.registeredStudents.length)||0,onCancelled:z})]})}function Phe({task:e,courseName:t,videos:r,quiz:n,questions:s,isExpanded:a,onToggleExpand:o,onEdit:l,onDelete:c,onAddVideo:u,onDeleteVideo:d,onAddQuiz:f,onDeleteQuiz:h,onAddQuestion:m,onEditQuestion:g,onDeleteQuestion:p,onToggleActive:x,onEditQuizName:b}){const[w,y]=v.useState(!1),[_,N]=v.useState("");return i.jsxs(ar,{dir:"rtl",className:`glass-card transition-all duration-300 hover:shadow-elevated ${e.is_active?"":"opacity-60"} ${a?"ring-2 ring-primary/20":""}`,children:[i.jsx(gg,{className:"pb-3",children:i.jsxs("div",{className:"flex items-center justify-between gap-4",children:[i.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[i.jsx(m0,{checked:e.is_active,onCheckedChange:k=>x(e.id,k),className:"data-[state=checked]:bg-green-500"}),i.jsx("span",{className:`text-sm font-medium ${e.is_active?"text-green-600":"text-muted-foreground"}`,children:e.is_active?"פעיל":"לא פעיל"})]}),i.jsxs("div",{className:"flex-1 min-w-0 text-right",children:[i.jsx(vg,{className:"text-base font-semibold truncate",children:e.name}),e.description&&i.jsx("p",{className:"text-sm text-muted-foreground mt-0.5 line-clamp-1 text-right",children:e.description})]})]}),i.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[i.jsxs("div",{className:"hidden sm:flex items-center gap-2",children:[i.jsxs(We,{variant:"outline",className:"gap-1.5 bg-primary/5 border-primary/20",children:[i.jsx($a,{className:"h-3 w-3"}),i.jsx("span",{children:r.length})]}),i.jsxs(We,{variant:"outline",className:`gap-1.5 ${n?"bg-accent/10 border-accent/30":"bg-muted/50"}`,children:[i.jsx(cS,{className:"h-3 w-3"}),i.jsx("span",{className:"hidden md:inline",children:n?"שאלון":"אין"})]})]}),i.jsxs("div",{className:"flex items-center border-r border-border pr-2 mr-2",children:[i.jsx(ee,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:o,children:a?i.jsx(C4,{className:"h-4 w-4"}):i.jsx(Cx,{className:"h-4 w-4"})}),i.jsx(ee,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-primary/10",onClick:l,children:i.jsx(dv,{className:"h-4 w-4"})}),i.jsx(ee,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-destructive/10 hover:text-destructive",onClick:c,children:i.jsx(Ia,{className:"h-4 w-4"})})]})]})]})}),a&&i.jsxs(cr,{className:"pt-0 space-y-6 animate-fade-in",children:[i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"flex flex-row-reverse items-center justify-between",children:[i.jsxs("h4",{className:"font-medium flex flex-row-reverse items-center gap-2 text-sm",children:["סרטוני Vimeo",i.jsx("div",{className:"p-1.5 rounded-md gradient-rose",children:i.jsx($a,{className:"h-3.5 w-3.5"})})]}),i.jsxs(ee,{size:"sm",variant:"outline",className:"h-8 text-xs gap-1.5 flex-row-reverse hover:bg-primary/5 hover:border-primary/30",onClick:u,children:["הוסף סרטון",i.jsx(hs,{className:"h-3 w-3"})]})]}),r.length===0?i.jsx("div",{className:"p-4 rounded-xl bg-muted/30 border border-dashed border-border text-center",children:i.jsx("p",{className:"text-sm text-muted-foreground",children:"אין סרטונים במשימה זו"})}):i.jsx("div",{className:"space-y-2",children:r.map((k,S)=>i.jsxs("div",{className:"flex flex-row-reverse items-center justify-between p-3 bg-muted/30 rounded-xl border border-border/50 hover:bg-muted/50 transition-colors group",children:[i.jsxs("div",{className:"flex flex-row-reverse items-center gap-3 min-w-0 flex-1",children:[i.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-lg bg-primary/10 border border-primary/20 shrink-0",children:i.jsx($a,{className:"h-4 w-4 text-primary"})}),i.jsxs("div",{className:"min-w-0 text-right flex-1",children:[i.jsx("p",{className:"font-medium text-sm truncate",children:k.title}),k.duration&&i.jsx("p",{className:"text-xs text-muted-foreground",children:k.duration})]})]}),i.jsx(ee,{variant:"ghost",size:"icon",className:"h-7 w-7 opacity-0 group-hover:opacity-100 hover:bg-destructive/10 hover:text-destructive transition-opacity shrink-0",onClick:()=>d(k.id),children:i.jsx(Ia,{className:"h-3.5 w-3.5"})})]},k.id))})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"flex flex-row-reverse items-center justify-between",children:[i.jsxs("h4",{className:"font-medium flex flex-row-reverse items-center gap-2 text-sm",children:["שאלון",i.jsx("div",{className:"p-1.5 rounded-md gradient-gold",children:i.jsx(cS,{className:"h-3.5 w-3.5"})})]}),!n&&i.jsxs(ee,{size:"sm",variant:"outline",className:"h-8 text-xs gap-1.5 flex-row-reverse hover:bg-primary/5 hover:border-primary/30",onClick:f,children:["הוסף שאלון",i.jsx(hs,{className:"h-3 w-3"})]})]}),n?i.jsxs("div",{className:"rounded-xl border border-border/50 bg-card/50 overflow-hidden",children:[i.jsxs("div",{className:"flex flex-row-reverse items-center justify-between p-4 bg-muted/30 border-b border-border/50",children:[i.jsx("div",{className:"text-right flex-1 min-w-0",children:w?i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Oe,{value:_,onCh
848ange:k=>N(k.target.value),className:"h-8 text-sm text-right",autoFocus:!0,onKeyDown:k=>{k.key==="Enter"&&_.trim()?(b==null||b(n.id,_.trim()),y(!1)):k.key==="Escape"&&y(!1)}}),i.jsx(ee,{variant:"ghost",size:"icon",className:"h-7 w-7 hover:bg-green-100 text-green-600",onClick:()=>{_.trim()&&(b==null||b(n.id,_.trim()),y(!1))},children:i.jsx(hn,{className:"h-3.5 w-3.5"})}),i.jsx(ee,{variant:"ghost",size:"icon",className:"h-7 w-7 hover:bg-destructive/10 text-destructive",onClick:()=>y(!1),children:i.jsx(es,{className:"h-3.5 w-3.5"})})]}):i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"font-medium text-sm",children:n.name}),i.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["ציון עובר: ",i.jsx("span",{className:"font-medium text-primary",children:n.passing_score})]})]})}),i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[!w&&i.jsx(ee,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-primary/10",onClick:()=>{N(n.name),y(!0)},children:i.jsx(dv,{className:"h-4 w-4"})}),i.jsx(ee,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-destructive/10 hover:text-destructive",onClick:()=>h(n.id),children:i.jsx(Ia,{className:"h-4 w-4"})})]})]}),i.jsxs("div",{className:"p-4 space-y-3",children:[i.jsxs("div",{className:"flex flex-row-reverse items-center justify-between",children:[i.jsxs("span",{className:"text-sm font-medium",children:["שאלות (",s.length,")"]}),i.jsxs(ee,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1.5 flex-row-reverse",onClick:m,children:["הוסף שאלה",i.jsx(hs,{className:"h-3 w-3"})]})]}),s.length===0?i.jsx("div",{className:"p-3 rounded-lg bg-muted/30 border border-dashed border-border text-center",children:i.jsx("p",{className:"text-xs text-muted-foreground",children:"אין שאלות בשאלון זה"})}):i.jsx("div",{className:"space-y-2",children:s.map((k,S)=>i.jsx("div",{className:"p-3 bg-muted/20 rounded-lg border border-border/30 group",children:i.jsxs("div",{className:"flex flex-row-reverse items-start justify-between gap-2",children:[i.jsxs("div",{className:"flex-1 min-w-0 text-right",children:[i.jsxs("p",{className:"font-medium text-sm",children:[i.jsxs("span",{className:"text-muted-foreground",children:[S+1,"."]})," ",k.question_text]}),i.jsx("div",{className:"mt-2 space-y-1",children:k.options.map((E,j)=>i.jsxs("p",{className:`text-xs flex flex-row-reverse items-center gap-1.5 justify-end ${j===k.correct_option_index?"text-green-600 dark:text-green-400 font-medium":"text-muted-foreground"}`,children:[E,i.jsx("span",{className:`w-4 h-4 rounded-full flex items-center justify-center text-[10px] ${j===k.correct_option_index?"bg-green-100 dark:bg-green-900/30":"bg-muted"}`,children:j===k.correct_option_index?"✓":String.fromCharCode(1488+j)})]},j))})]}),i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[i.jsx(ee,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 hover:bg-primary/10 transition-opacity",onClick:()=>g(k),children:i.jsx(dv,{className:"h-3 w-3"})}),i.jsx(ee,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 hover:bg-destructive/10 hover:text-destructive transition-opacity",onClick:()=>p(k.id),children:i.jsx(Ia,{className:"h-3 w-3"})})]})]})},k.id))})]})]}):i.jsx("div",{className:"p-4 rounded-xl bg-muted/30 border border-dashed border-border text-center",children:i.jsx("p",{className:"text-sm text-muted-foreground",children:"אין שאלון למשימה זו"})})]})]})]})}function Rhe({open:e,onOpenChange:t,newTask:r,setNewTask:n,onAdd:s,courses:a}){return i.jsx(Ht,{open:e,onOpenChange:t,children:i.jsxs(Ut,{className:"max-w-md",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"הוספת משימה חדשה"})}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"קורס"}),i.jsxs(At,{value:r.course_id,onValueChange:o=>n({...r,course_id:o}),children:[i.jsx(Ct,{className:"text-right",children:i.jsx(Pt,{placeholder:"בחר קורס"})}),i.jsx(Tt,{children:a.map(o=>i.jsx($e,{value:o.id,children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(eh,{className:"h-4 w-4 text-primary"}),o.name]})},o.id))})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"שם המשימה"}),i.jsx(Oe,{value:r.name,onChange:o=>n({...r,name:o.target.value}),placeholder:"לדוגמה: משימת מד״א",className:"text-right"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"תיאור"}),i.jsx(Xs,{value:r.description,onChange:o=>n({...r,description:o.target.value}),placeholder:"תיאור המשימה...",className:"text-right min-h-[80px]"})]}),i.jsx(ee,{onClick:s,className:"w-full gradient-rose text-foreground",disabled:!r.course_id||!r.name.trim(),children:"הוסף משימה"})]})]})})}function Ohe({open:e,onOpenChange:t,editingTask:r,setEditingTask:n,onUpdate:s}){return r?i.jsx(Ht,{open:e,onOpenChange:t,children:i.jsxs(Ut,{className:"max-w-md",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"עריכת משימה"})}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"שם המשימה"}),i.jsx(Oe,{value:r.name,onChange:a=>n({...r,name:a.target.value}),className:"text-right"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"תיאור"}),i.jsx(Xs,{value:r.description||"",onChange:a=>n({...r,description:a.target.value}),className:"text-right min-h-[80px]"})]}),i.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-muted/50",children:[i.jsx(ve,{className:"cursor-pointer",children:"משימה פעילה"}),i.jsx(m0,{checked:r.is_active,onCheckedChange:a=>n({...r,is_active:a})})]}),i.jsx(ee,{onClick:s,className:"w-full gradient-rose text-foreground",children:"שמור שינויים"})]})]})}):null}function Dhe({open:e,onOpenChange:t,newVideo:r,setNewVideo:n,onAdd:s}){return i.jsx(Ht,{open:e,onOpenChange:t,children:i.jsxs(Ut,{className:"max-w-md",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"הוספת סרטון Vimeo"})}),i.jsx(Dc,{className:"max-h-[70vh]",children:i.jsxs("div",{className:"space-y-4 p-1",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"כותרת הסרטון"}),i.jsx(Oe,{value:r.title,onChange:a=>n({...r,title:a.target.value}),placeholder:"שם הסרטון",className:"text-right"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"קוד הטמעה או מזהה Vimeo"}),i.jsx(Xs,{value:r.video_url,onChange:a=>n({...r,video_url:a.target.value}),placeholder:"הדבק כאן את קוד ה-iframe מ-Vimeo או מזהה הסרטון",rows:3,className:"text-right font-mono text-xs"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"ניתן להדביק קוד iframe מלא או רק את מזהה הסרטון (למשל: 123456789)"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"משך (אופציונלי)"}),i.jsx(Oe,{value:r.duration,onChange:a=>n({...r,duration:a.target.value}),placeholder:"לדוגמה: 15:00",className:"text-right"})]}),r.video_url&&i.jsxs("div",{className:"rounded-xl border border-border overflow-hidden",children:[i.jsx("p",{className:"text-xs text-muted-foreground p-2 bg-muted/50 border-b",children:"תצוגה מקדימה של הסרטון:"}),i.jsx("div",{className:"aspect-video bg-black/5",children:r.video_url.includes("<iframe")?i.jsx("div",{dangerouslySetInnerHTML:{__html:r.video_url.replace(/width="[^"]*"/,'width="100%"').replace(/height="[^"]*"/,'height="100%"')},className:"w-full h-full [&>iframe]:w-full [&>iframe]:h-full"}):i.jsx("iframe",{src:`https://player.vimeo.com/video/${r.video_url.replace(/\D/g,"")}`,className:"w-full h-full",allowFullScreen:!0,allow:"autoplay; fullscreen; picture-in-picture"})})]}),i.jsx(ee,{onClick:s,className:"w-full gradient-rose text-foreground",disabled:!r.title.trim()||!r.video_url.trim(),children:"הוסף סרטון"})]})})]})})}function Ihe({open:e,onOpenChange:t,newQuiz:r,setNewQuiz:n,onAdd:s}){return i.jsx(Ht,{open:e,onOpenChange:t,children:i.jsxs(Ut,{className:"max-w-md",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"הוספת שאלון"})}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"שם השאלון"}),i.jsx(Oe,{value:r.name,onChange:a=>n({...r,name:a.target.value}),placeholder:"שם השאלון",className:"text-right"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"ציון עובר"}),i.jsx(Oe,{type:"number",min:0,max:100,value:r.passing_score,onChange:a=>n({...r,passing_score:parseInt(a.target.value)||0}),className:"text-right"})]}),i.jsx(ee,{onClick:s,className:"w-full gradient-rose text-foreground",children:"הוסף שאלון"})]})]})})}function Fhe({open:e,onOpenChange:t,newQuestion:r,setNewQuestion:n,onAdd:s}){const a=(o,l)=>{const c=[...r.options];c[o]=l,n({...r,options:c})};return i.jsx(Ht,{open:e,onOpenChange:t,children:i.jsxs(Ut,{className:"max-w-lg",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"הוספת שאלה"})}),i.jsx(Dc,{className:"max-h-[70vh]",children:i.jsxs("div",{className:"space-y-4 p-1",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"טקסט השאלה"}),i.jsx(Xs,{value:r.question_text,onChange:o=>n({...r,question_text:o.target.value}),placeholder:"הזן את השאלה...",className:"text-right min-h-[80px]"})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx(ve,{children:"אפשרויות תשובה"}),i.jsx(E0,{value:r.correct_option_index.toString(),onValueChange:o=>
848n({...r,correct_option_index:parseInt(o)}),className:"space-y-2",children:r.options.map((o,l)=>i.jsxs("div",{className:`flex items-center gap-3 p-3 rounded-xl border transition-colors ${r.correct_option_index===l?"border-green-500/50 bg-green-50 dark:bg-green-900/20":"border-border hover:border-primary/30"}`,children:[i.jsx(pd,{value:l.toString(),id:`opt-${l}`}),i.jsx(Oe,{value:o,onChange:c=>a(l,c.target.value),placeholder:`אפשרות ${l+1}`,className:"flex-1 border-0 bg-transparent focus-visible:ring-0 text-right"})]},l))}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"לחץ על העיגול כדי לבחור את התשובה הנכונה"})]}),i.jsx(ee,{onClick:s,className:"w-full gradient-rose text-foreground",children:"הוסף שאלה"})]})})]})})}function Mhe({open:e,onOpenChange:t,editingQuestion:r,setEditingQuestion:n,onUpdate:s}){if(!r)return null;const a=(o,l)=>{const c=[...r.options];c[o]=l,n({...r,options:c})};return i.jsx(Ht,{open:e,onOpenChange:t,children:i.jsxs(Ut,{className:"max-w-lg",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"עריכת שאלה"})}),i.jsx(Dc,{className:"max-h-[70vh]",children:i.jsxs("div",{className:"space-y-4 p-1",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{children:"טקסט השאלה"}),i.jsx(Xs,{value:r.question_text,onChange:o=>n({...r,question_text:o.target.value}),placeholder:"הזן את השאלה...",className:"text-right min-h-[80px]"})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx(ve,{children:"אפשרויות תשובה"}),i.jsx(E0,{value:r.correct_option_index.toString(),onValueChange:o=>n({...r,correct_option_index:parseInt(o)}),className:"space-y-2",children:r.options.map((o,l)=>i.jsxs("div",{className:`flex items-center gap-3 p-3 rounded-xl border transition-colors ${r.correct_option_index===l?"border-green-500/50 bg-green-50 dark:bg-green-900/20":"border-border hover:border-primary/30"}`,children:[i.jsx(pd,{value:l.toString(),id:`edit-opt-${l}`}),i.jsx(Oe,{value:o,onChange:c=>a(l,c.target.value),placeholder:`אפשרות ${l+1}`,className:"flex-1 border-0 bg-transparent focus-visible:ring-0 text-right"})]},l))}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"לחץ על העיגול כדי לבחור את התשובה הנכונה"})]}),i.jsx(ee,{onClick:s,className:"w-full gradient-rose text-foreground",children:"שמור שינויים"})]})})]})})}function Lhe(){const[e,t]=v.useState([]),[r,n]=v.useState([]),[s,a]=v.useState([]),[o,l]=v.useState([]),[c,u]=v.useState([]),[d,f]=v.useState(!0),[h,m]=v.useState(null),[g,p]=v.useState(!1),[x,b]=v.useState(!1),[w,y]=v.useState(!1),[_,N]=v.useState(!1),[k,S]=v.useState(!1),[E,j]=v.useState(!1),[T,R]=v.useState(null),[P,D]=v.useState(null),[U,Q]=v.useState(null),[Y,V]=v.useState(null),[F,C]=v.useState(null),[X,se]=v.useState({name:"",description:"",course_id:""}),[A,M]=v.useState({title:"",video_url:"",duration:"",thumbnail_url:""}),[I,z]=v.useState({name:"",passing_score:70}),[J,Z]=v.useState({question_text:"",options:["","","",""],correct_option_index:0});v.useEffect(()=>{re()},[]);const re=async()=>{f(!0);const{data:_e,error:Te}=await de.from("courses").select("*").eq("status","active").order("name");if(Te){Rt({title:"שגיאה בטעינת קורסים",variant:"destructive"}),f(!1);return}t(_e||[]);const{data:et,error:Be}=await de.from("course_tasks").select("*").order("order_index");if(Be){Rt({title:"שגיאה בטעינת משימות",variant:"destructive"}),f(!1);return}n(et||[]);const ct=(et||[]).map(Gt=>Gt.id);if(ct.length>0){const{data:Gt}=await de.from("task_videos").select("*").in("task_id",ct).order("order_index");a(Gt||[]);const{data:qt}=await de.from("task_quizzes").select("*").in("task_id",ct);l(qt||[]);const nn=(qt||[]).map(Es=>Es.id);if(nn.length>0){const{data:Es}=await de.from("task_questions").select("*").in("quiz_id",nn).order("order_index");u(Es||[])}else u([])}else a([]),l([]),u([]);f(!1)},ae=async()=>{if(!X.course_id||!X.name.trim())return;const _e=r.filter(et=>et.course_id===X.course_id),{error:Te}=await de.from("course_tasks").insert({course_id:X.course_id,name:X.name,description:X.description||null,order_index:_e.length});if(Te){Rt({title:"שגיאה בהוספת משימה",variant:"destructive"});return}Rt({title:"המשימה נוספה בהצלחה"}),se({name:"",description:"",course_id:""}),p(!1),re()},ne=async()=>
848{if(!T)return;const{error:_e}=await de.from("course_tasks").update({name:T.name,description:T.description,is_active:T.is_active}).eq("id",T.id);if(_e){Rt({title:"שגיאה בעדכון משימה",variant:"destructive"});return}Rt({title:"המשימה עודכנה בהצלחה"}),b(!1),R(null),re()},Se=async _e=>{if(!confirm("האם למחוק את המשימה?"))return;const{error:Te}=await de.from("course_tasks").delete().eq("id",_e);if(Te){Rt({title:"שגיאה במחיקת משימה",variant:"destructive"});return}Rt({title:"המשימה נמחקה"}),re()},B=async(_e,Te)=>{const{error:et}=await de.from("course_tasks").update({is_active:Te}).eq("id",_e);if(et){Rt({title:"שגיאה בעדכון סטטוס",variant:"destructive"});return}n(Be=>Be.map(ct=>ct.id===_e?{...ct,is_active:Te}:ct)),Rt({title:Te?"המשימה הופעלה":"המשימה הושבתה"})},qe=async()=>{if(!U||!A.title.trim()||!A.video_url.trim())return;const _e=s.filter(et=>et.task_id===U),{error:Te}=await de.from("task_videos").insert({task_id:U,title:A.title,video_url:A.video_url,duration:A.duration||null,thumbnail_url:A.thumbnail_url||null,order_index:_e.length});if(Te){Rt({title:"שגיאה בהוספת סרטון",variant:"destructive"});return}Rt({title:"הסרטון נוסף בהצלחה"}),M({title:"",video_url:"",duration:"",thumbnail_url:""}),y(!1),re()},ue=async _e=>{if(!confirm("האם למחוק את הסרטון?"))return;const{error:Te}=await de.from("task_videos").delete().eq("id",_e);if(Te){Rt({title:"שגיאה במחיקת סרטון",variant:"destructive"});return}Rt({title:"הסרטון נמחק"}),re()},Re=async()=>{if(!Y||!I.name.trim())return;const{error:_e}=await de.from("task_quizzes").insert({task_id:Y,name:I.name,passing_score:I.passing_score});if(_e){Rt({title:"שגיאה בהוספת שאלון",variant:"destructive"});return}Rt({title:"השאלון נוסף בהצלחה"}),z({name:"",passing_score:70}),N(!1),re()},Ce=async _e=>{if(!confirm("האם למחוק את השאלון?"))return;const{error:Te}=await de.from("task_quizzes").delete().eq("id",_e);if(Te){Rt({title:"שגיאה במחיקת שאלון",variant:"destructive"});return}Rt({title:"השאלון נמחק"}),re()},pe=async(_e,Te)=>{const{error:et}=await de.from("task_quizzes").update({name:Te}).eq("id",_e);if(et){Rt({title:"שגיאה בעדכון שם השאלון",variant:"destructive"});return}Rt({title:"שם השאלון עודכן בהצלחה"}),re()},fe=async()=>{if(!F||!J.question_text.trim())return;const _e=J.options.filter(Be=>Be.trim()!=="");if(_e.length<2){Rt({title:"יש להזין לפחות 2 אפשרויות",variant:"destructive"});return}const Te=c.filter(Be=>Be.quiz_id===F),{error:et}=await de.from("task_questions").insert({quiz_id:F,question_text:J.question_text,options:_e,correct_option_index:J.correct_option_index,order_index:Te.length});if(et){Rt({title:"שגיאה בהוספת שאלה",variant:"destructive"});return}Rt({title:"השאלה נוספה בהצלחה"}),Z({question_text:"",options:["","","",""],correct_option_index:0}),S(!1),re()},te=_e=>{D({id:_e.id,question_text:_e.question_text,options:_e.options,correct_option_index:_e.correct_option_index}),j(!0)},Ne=async()=>{if(!P)return;const _e=P.options.filter(et=>et.trim()!=="");if(_e.length<2){Rt({title:"יש להזין לפחות 2 אפשרויות",variant:"destructive"});return}const{error:Te}=await de.from("task_questions").update({question_text:P.question_text,options:_e,correct_option_index:P.correct_option_index}).eq("id",P.id);if(Te){Rt({title:"שגיאה בעדכון שאלה",variant:"destructive"});return}Rt({title:"השאלה עודכנה בהצלחה"}),j(!1),D(null),re()},be=async _e=>{if(!confirm("האם למחוק את השאלה?"))return;const{error:Te}=await de.from("task_questions").delete().eq("id",_e);if(Te){Rt({title:"שגיאה במחיקת שאלה",variant:"destructive"});return}Rt({title:"השאלה נמחקה"}),re()},Qe=_e=>s.filter(Te=>Te.task_id===_e),nt=_e=>o.find(Te=>Te.task_id===_e),Je=_e=>c.filter(Te=>Te.quiz_id===_e),Le=_e=>{var Te;return((Te=e.find(et=>et.id===_e))==null?void 0:Te.name)||""},lt=r.reduce((_e,Te)=>{const et=Te.course_id;return _e[et]||(_e[et]=[]),_e[et].push(Te),_e},{});return d?i.jsx(Hn,{children:i.jsx("div",{className:"flex items-center justify-center h-64",children:i.jsx(yr,{className:"h-8 w-8 animate-spin text-primary"})})}):i.jsx(Hn,{children:i.jsxs("div",{className:"space-y-6",dir:"rtl",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[i.jsxs("div",{className:"flex items-center gap-3 order-2 sm:order-1",children:[i.jsx("div",{className:"p-2.5 rounded-xl gradient-rose shadow-soft",children:i.jsx(Fo,{className:"h-6 w-6 text-foreground"})}),i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"ניהול משימות קורס"}),i.jsx("p",{className:"text-muted-foreground text-sm",children:"ניהול משימות, סרטונים ושאלונים לכל קורס"})]})]}),i.jsxs(ee,{className:"gap-2 flex-row-reverse gradient-rose text-foreground shadow-soft hover:shadow-elevated transition-shadow order-1 
848sm:order-2",onClick:()=>p(!0),children:["הוסף משימה",i.jsx(hs,{className:"h-4 w-4"})]})]}),e.length===0?i.jsx(ar,{className:"glass-card",children:i.jsxs(cr,{className:"py-16 text-center",children:[i.jsx("div",{className:"w-16 h-16 rounded-full gradient-rose mx-auto mb-4 flex items-center justify-center",children:i.jsx(eh,{className:"h-8 w-8 text-foreground"})}),i.jsx("p",{className:"text-muted-foreground",children:"אין קורסים פעילים. יש להוסיף קורסים קודם."})]})}):r.length===0?i.jsx(ar,{className:"glass-card",children:i.jsxs(cr,{className:"py-16 text-center",children:[i.jsx("div",{className:"w-14 h-14 rounded-full bg-muted mx-auto mb-4 flex items-center justify-center",children:i.jsx(Fo,{className:"h-7 w-7 text-muted-foreground"})}),i.jsx("p",{className:"text-muted-foreground mb-4",children:'אין משימות. לחץ על "הוסף משימה" כדי להתחיל.'}),i.jsxs(ee,{variant:"outline",className:"gap-2 flex-row-reverse",onClick:()=>p(!0),children:["הוסף משימה ראשונה",i.jsx(hs,{className:"h-4 w-4"})]})]})}):i.jsx("div",{className:"space-y-6",children:Object.entries(lt).map(([_e,Te])=>{const et=Le(_e);return et?i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"flex items-center gap-2 pb-1 border-b border-border/50",children:[i.jsx(eh,{className:"h-5 w-5 text-primary"}),i.jsx("h2",{className:"text-lg font-semibold text-foreground",children:et}),i.jsxs("span",{className:"text-sm text-muted-foreground",children:["(",Te.length," משימות)"]})]}),i.jsx("div",{className:"space-y-3",children:Te.map(Be=>{const ct=Qe(Be.id),Gt=nt(Be.id),qt=Gt?Je(Gt.id):[];return i.jsx(Phe,{task:Be,courseName:et,videos:ct,quiz:Gt||null,questions:qt,isExpanded:h===Be.id,onToggleExpand:()=>m(h===Be.id?null:Be.id),onEdit:()=>{R(Be),b(!0)},onDelete:()=>Se(Be.id),onAddVideo:()=>{Q(Be.id),y(!0)},onDeleteVideo:ue,onAddQuiz:()=>{V(Be.id),N(!0)},onDeleteQuiz:Ce,onAddQuestion:()=>{Gt&&(C(Gt.id),S(!0))},onEditQuestion:te,onDeleteQuestion:be,onToggleActive:B,onEditQuizName:pe},Be.id)})})]},_e):null})}),i.jsx(Rhe,{open:g,onOpenChange:p,newTask:X,setNewTask:se,onAdd:ae,courses:e}),i.jsx(Ohe,{open:x,onOpenChange:b,editingTask:T,setEditingTask:R,onUpdate:ne}),i.jsx(Dhe,{open:w,onOpenChange:y,newVideo:A,setNewVideo:M,onAdd:qe}),i.jsx(Ihe,{open:_,onOpenChange:N,newQuiz:I,setNewQuiz:z,onAdd:Re}),i.jsx(Fhe,{open:k,onOpenChange:S,newQuestion:J,setNewQuestion:Z,onAdd:fe}),i.jsx(Mhe,{open:E,onOpenChange:j,editingQuestion:P,setEditingQuestion:D,onUpdate:Ne})]})})}var Tg="Collapsible",[Bhe,bF]=tn(Tg),[$he,B2]=Bhe(Tg),_F=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:s,disabled:a,onOpenChange:o,...l}=e,[c,u]=ps({prop:n,defaultProp:s??!1,onChange:o,caller:Tg});return i.jsx($he,{scope:r,disabled:a,contentId:Us(),open:c,onOpenToggle:v.useCallback(()=>u(d=>!d),[u]),children:i.jsx(He.div,{"data-state":U2(c),"data-disabled":a?"":void 0,...l,ref:t})})});_F.displayName=Tg;var NF="CollapsibleTrigger",SF=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,s=B2(NF,r);return i.jsx(He.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":U2(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:t,onClick:ke(e.onClick,s.onOpenToggle)})});SF.displayName=NF;var $2="CollapsibleContent",kF=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=B2($2,e.__scopeCollapsible);return i.jsx(rn,{present:r||s.open,children:({present:a})=>i.jsx(Uhe,{...n,ref:t,present:a})})});kF.displayName=$2;var Uhe=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:s,...a}=e,o=B2($2,r),[l,c]=v.useState(n),u=v.useRef(null),d=ot(t,u),f=v.useRef(0),h=f.current,m=v.useRef(0),g=m.current,p=o.open||l,x=v.useRef(p),b=v.useRef(void 0);return v.useEffect(()=>{const w=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(w)},[]),un(()=>{const w=u.current;if(w){b.current=b.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const y=w.getBoundingClientRect();f.current=y.height,m.current=y.width,x.current||(w.style.transitionDuration=b.current.transitionDuration,w.style.animationName=b.current.animationName),c(n)}},[o.open,n]),i.jsx(He.div,{"data-state":U2(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!p,...a,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:p&&s})});function U2(e){return e?"open":"closed"}var Whe=_F,zhe=SF,Hhe=kF,Qa="Accordion",Vhe=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[W2,Ghe,qhe]=Yh(Qa),[Ag,sme]=tn(Qa,[qhe,bF]),z2=bF(),jF=ye.forwardRef((e,t)=>
848{const{type:r,...n}=e,s=n,a=n;return i.jsx(W2.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?i.jsx(Qhe,{...a,ref:t}):i.jsx(Xhe,{...s,ref:t})})});jF.displayName=Qa;var[EF,Khe]=Ag(Qa),[CF,Yhe]=Ag(Qa,{collapsible:!1}),Xhe=ye.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},collapsible:a=!1,...o}=e,[l,c]=ps({prop:r,defaultProp:n??"",onChange:s,caller:Qa});return i.jsx(EF,{scope:e.__scopeAccordion,value:ye.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:ye.useCallback(()=>a&&c(""),[a,c]),children:i.jsx(CF,{scope:e.__scopeAccordion,collapsible:a,children:i.jsx(TF,{...o,ref:t})})})}),Qhe=ye.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},...a}=e,[o,l]=ps({prop:r,defaultProp:n??[],onChange:s,caller:Qa}),c=ye.useCallback(d=>l((f=[])=>[...f,d]),[l]),u=ye.useCallback(d=>l((f=[])=>f.filter(h=>h!==d)),[l]);return i.jsx(EF,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:u,children:i.jsx(CF,{scope:e.__scopeAccordion,collapsible:!0,children:i.jsx(TF,{...a,ref:t})})})}),[Jhe,Pg]=Ag(Qa),TF=ye.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:s,orientation:a="vertical",...o}=e,l=ye.useRef(null),c=ot(l,t),u=Ghe(r),f=Oc(s)==="ltr",h=ke(e.onKeyDown,m=>{var E;if(!Vhe.includes(m.key))return;const g=m.target,p=u().filter(j=>{var T;return!((T=j.ref.current)!=null&&T.disabled)}),x=p.findIndex(j=>j.ref.current===g),b=p.length;if(x===-1)return;m.preventDefault();let w=x;const y=0,_=b-1,N=()=>{w=x+1,w>_&&(w=y)},k=()=>{w=x-1,w<y&&(w=_)};switch(m.key){case"Home":w=y;break;case"End":w=_;break;case"ArrowRight":a==="horizontal"&&(f?N():k());break;case"ArrowDown":a==="vertical"&&N();break;case"ArrowLeft":a==="horizontal"&&(f?k():N());break;case"ArrowUp":a==="vertical"&&k();break}const S=w%b;(E=p[S].ref.current)==null||E.focus()});return i.jsx(Jhe,{scope:r,disabled:n,direction:s,orientation:a,children:i.jsx(W2.Slot,{scope:r,children:i.jsx(He.div,{...o,"data-orientation":a,ref:c,onKeyDown:n?void 0:h})})})}),ix="AccordionItem",[Zhe,H2]=Ag(ix),AF=ye.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...s}=e,a=Pg(ix,r),o=Khe(ix,r),l=z2(r),c=Us(),u=n&&o.value.includes(n)||!1,d=a.disabled||e.disabled;return i.jsx(Zhe,{scope:r,open:u,disabled:d,triggerId:c,children:i.jsx(Whe,{"data-orientation":a.orientation,"data-state":FF(u),...l,...s,ref:t,disabled:d,open:u,onOpenChange:f=>{f?o.onItemOpen(n):o.onItemClose(n)}})})});AF.displayName=ix;var PF="AccordionHeader",RF=ye.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=Pg(Qa,r),a=H2(PF,r);return i.jsx(He.h3,{"data-orientation":s.orientation,"data-state":FF(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});RF.displayName=PF;var yw="AccordionTrigger",OF=ye.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=Pg(Qa,r),a=H2(yw,r),o=Yhe(yw,r),l=z2(r);return i.jsx(W2.ItemSlot,{scope:r,children:i.jsx(zhe,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":s.orientation,id:a.triggerId,...l,...n,ref:t})})});OF.displayName=yw;var DF="AccordionContent",IF=ye.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=Pg(Qa,r),a=H2(DF,r),o=z2(r);return i.jsx(Hhe,{role:"region","aria-labelledby":a.triggerId,"data-orientation":s.orientation,...o,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});IF.displayName=DF;function FF(e){return e?"open":"closed"}var e0e=jF,t0e=AF,r0e=RF,MF=OF,LF=IF;const n0e=e0e,Pi=v.forwardRef(({className:e,...t},r)=>i.jsx(t0e,{ref:r,className:xe("border-b",e),...t}));Pi.displayName="AccordionItem";const Ri=v.forwardRef(({className:e,children:t,...r},n)=>i.jsx(r0e,{className:"flex",children:i.jsxs(MF,{ref:n,className:xe("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,i.jsx(Cx,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Ri.displayName=MF.displayName;const Oi=v.forwardRef(({className:e,children:t,...r},n)=>i.jsx(LF,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:i.jsx("div",{className:xe("pb-4 pt-0",e),children:t})}));Oi.displayName=LF.displayName;const s0e=Gb({email:tc().email("נא להזין כתובת אימייל תקינה"),password:tc().min(6,"סיסמה חייבת להכיל לפחות 6 תווים"),fullName:tc().min(2,"נא להזין שם מלא")}),bE="https://bjohfezlhpohauqjxmzu.supabase.co/functions/v1/webhook-students",_E="https://bjohfezlhpohauqjxmzu.supabase.co/functions/v1/webhook-makeupland-approve",u1="https://bjohfezlhpohauqjxmzu.supabase.co/functions/v1/webhook-wallet-credits",NE="https://bjohfezlhpohauqjxmzu.supabase.co/functions/v1/webhook-photo-days",SE="https://bjohfezlhpohauqjxmzu.supabase.co/functions/v1/webhook-practical-workshops",kE="https://bjohfezlhpohauqjxmzu.supabase.co/functions/v1/webhook-photo-day-images",jE="https://bjohfezlhpohauqjxmzu.supabase.co/functions/v1/webhook-shop-vouchers",d1="https://glam-academy-flow.lovable.app/student/login",Jc="https://glam-academy-flow.lovable.app",f1="/embed/photo-days",h1="/embed/workshops",m1="/embed/practical-workshops";function a0e(){const[e,t]=v.useState([]),[r,n]=v.useState(!0),[s,a]=v.useState(!1),[o,l]=v.useState(""),[c,u]=v.useState(""),[d,f]=v.useState(""),[h,m]=v.useState("coordinator"),[g,p]=v.useState(!1),[x,b]=v.useState(!1),[w,y]=v.useState(!1),[_,N]=v.useState(!1),[k,S]=v.useState(!1),[E,j]=v.useState(!1),[T,R]=v.useState(!1),[P,D]=v.useState(!1),[U,Q]=v.useState(!1),[Y,V]=v.useState(!1),[F,C]=v.useState(!1),[X,se]=v.useState(!1);v.useState(""),v.useState(""),v.useState(!1);const[A,M]=v.useState(null),[I,z]=v.useState(""),[J,Z]=v.useState(""),[re,ae]=v.useState(!1),ne=async()=>
848{if(A){if(I.length<6){K.error("סיסמה חייבת להכיל לפחות 6 תווים");return}if(I!==J){K.error("הסיסמאות אינן תואמות");return}ae(!0);try{const{data:Le,error:lt}=await de.functions.invoke("update-user-password",{body:{userId:A.user_id,newPassword:I}});if(lt)throw lt;if(Le!=null&&Le.error){K.error(Le.error);return}K.success(`הסיסמה של ${A.full_name} עודכנה בהצלחה`),M(null),z(""),Z("")}catch(Le){console.error("update password error",Le),K.error("שגיאה בעדכון הסיסמה")}finally{ae(!1)}}},Se=async()=>{n(!0);try{const{data:Le,error:lt}=await de.from("profiles").select("*");if(lt)throw lt;const{data:_e,error:Te}=await de.from("user_roles").select("*");if(Te)throw Te;const et=(Le||[]).filter(Be=>{var ct;return!((ct=Be.email)!=null&&ct.endsWith("@students.yarinshachaf.local"))}).map(Be=>{const ct=_e==null?void 0:_e.find(Gt=>Gt.user_id===Be.user_id);return{id:Be.id,user_id:Be.user_id,email:Be.email,full_name:Be.full_name,role:ct==null?void 0:ct.role}});t(et)}catch(Le){console.error("Error fetching users:",Le),K.error("שגיאה בטעינת משתמשים")}finally{n(!1)}};v.useEffect(()=>{Se()},[]);const B=async Le=>{Le.preventDefault();const lt=s0e.safeParse({email:o,password:c,fullName:d});if(!lt.success){K.error(lt.error.errors[0].message);return}p(!0);try{const{data:_e,error:Te}=await de.functions.invoke("create-admin-user",{body:{email:o,password:c,fullName:d,role:h}});if(Te){console.error("Error creating user:",Te),K.error("שגיאה ביצירת משתמש");return}if(_e!=null&&_e.error){_e.error.includes("already")||_e.error.includes("duplicate")?K.error("משתמש עם אימייל זה כבר קיים במערכת"):K.error(_e.error);return}K.success(`משתמש ${d} נוסף בהצלחה`),l(""),u(""),f(""),m("coordinator"),a(!1),Se()}catch(_e){console.error("Error:",_e),K.error("שגיאה ביצירת משתמש")}finally{p(!1)}},qe=async(Le,lt)=>{try{await de.from("user_roles").delete().eq("user_id",Le),await de.from("profiles").delete().eq("user_id",Le),K.success(`משתמש ${lt} נמחק בהצלחה`),Se()}catch{K.error("שגיאה במחיקת משתמש")}},ue=async()=>{try{await navigator.clipboard.writeText(bE),b(!0),K.success("הקישור הועתק!"),setTimeout(()=>b(!1),2e3)}catch{K.error("שגיאה בהעתקה")}},Re=async()=>{try{await navigator.clipboard.writeText(_E),y(!0),K.success("הקישור הועתק!"),setTimeout(()=>y(!1),2e3)}catch{K.error("שגיאה בהעתקה")}},Ce=async()=>{try{await navigator.clipboard.writeText(u1),N(!0),K.success("הקישור הועתק!"),setTimeout(()=>N(!1),2e3)}catch{K.error("שגיאה בהעתקה")}},pe=async()=>{try{await navigator.clipboard.writeText(NE),S(!0),K.success("הקישור הועתק!"),setTimeout(()=>S(!1),2e3)}catch{K.error("שגיאה בהעתקה")}},fe=async()=>{try{await navigator.clipboard.writeText(SE),j(!0),K.success("הקישור הועתק!"),setTimeout(()=>j(!1),2e3)}catch{K.error("שגיאה בהעתקה")}},te=async()=>{try{await navigator.clipboard.writeText(kE),R(!0),K.success("הקישור הועתק!"),setTimeout(()=>R(!1),2e3)}catch{K.error("שגיאה בהעתקה")}},Ne=async()=>{try{await navigator.clipboard.writeText(jE),se(!0),K.success("הקישור הועתק!"),setTimeout(()=>se(!1),2e3)}catch{K.error("שגיאה בהעתקה")}},be=async()=>{try{await navigator.clipboard.writeText(d1),D(!0),K.success("הקישור הועתק!"),setTimeout(()=>D(!1),2e3)}catch{K.error("שגיאה בהעתקה")}},Qe=async(Le,lt)=>{const _e=`<iframe src="${Le}" width="100%" height="800" frameborder="0" style="border: none;"></iframe>`;try{await navigator.clipboard.writeText(_e),lt(!0),K.success("קוד ההטמעה הועתק!"),setTimeout(()=>lt(!1),2e3)}catch{K.error("שגיאה בהעתקה")}},nt={admin:"אדמין",coordinator:"רכז קורסים",photographer:"צלם"},Je={admin:"bg-purple-100 text-purple-700",coordinator:"bg-blue-100 text-blue-700",photographer:"bg-green-100 text-green-700"};return i.jsx(Hn,{children:i.jsxs("div",{className:"space-y-6 max-w-4xl",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 animate-fade-in",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-foreground",children:"הגדרות"}),i.jsx("p",{className:"text-muted-foreground mt-1",children:"ניהול משתמשי מערכת וממשקים"})]}),i.jsxs(Ht,{open:s,onOpenChange:a,children:[i.jsx(va,{asChild:!0,children:i.jsxs(ee,{variant:"rose",className:"gap-2",children:[i.jsx(hs,{className:"h-4 w-4"}),"הוסף משתמש"]})}),i.jsxs(Ut,{className:"sm:max-w-md",dir:"rtl",children:[i.jsx(Wt,{children:i.jsx(zt,{className:"text-right",children:"הוספת משתמש חדש"})}
848),i.jsxs("form",{onSubmit:B,className:"space-y-4 mt-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"fullName",children:"שם מלא"}),i.jsx(Oe,{id:"fullName",placeholder:"הזן שם מלא",value:d,onChange:Le=>f(Le.target.value),className:"text-right"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"email",children:"אימייל"}),i.jsx(Oe,{id:"email",type:"email",placeholder:"[email protected]",value:o,onChange:Le=>l(Le.target.value),dir:"ltr"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"password",children:"סיסמה"}),i.jsx(Oe,{id:"password",type:"password",placeholder:"לפחות 6 תווים",value:c,onChange:Le=>u(Le.target.value),dir:"ltr"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"role",children:"תפקיד"}),i.jsxs(At,{value:h,onValueChange:Le=>m(Le),children:[i.jsx(Ct,{className:"text-right",children:i.jsx(Pt,{})}),i.jsxs(Tt,{children:[i.jsx($e,{value:"admin",children:"אדמין"}),i.jsx($e,{value:"coordinator",children:"רכז קורסים"}),i.jsx($e,{value:"photographer",children:"צלם"})]})]})]}),i.jsxs("div",{className:"flex gap-3 pt-4",children:[i.jsx(ee,{type:"submit",variant:"rose",className:"flex-1",disabled:g,children:g?"מוסיף...":"הוסף משתמש"}),i.jsx(ee,{type:"button",variant:"outline",onClick:()=>a(!1),children:"ביטול"})]})]})]})]})]}),i.jsxs("div",{className:"bg-card rounded-2xl shadow-card border border-border p-6 animate-slide-up",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl gradient-rose flex items-center justify-center",children:i.jsx(xs,{className:"h-5 w-5 text-foreground"})}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-semibold text-foreground",children:"משתמשי מערכת"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"רשימת כל המשתמשים עם גישה למערכת"})]})]}),r?i.jsx("div",{className:"text-center py-8",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto"})}):e.length===0?i.jsxs("div",{className:"text-center py-8",children:[i.jsx(dS,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),i.jsx("p",{className:"text-muted-foreground",children:"אין משתמשים במערכת"})]}):i.jsx("div",{className:"space-y-3",children:e.map(Le=>i.jsxs("div",{className:"flex items-center justify-between p-4 bg-muted/50 rounded-xl",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("div",{className:"w-10 h-10 rounded-full gradient-rose flex items-center justify-center",children:Le.role==="admin"?i.jsx(uS,{className:"h-5 w-5 text-foreground"}):i.jsx(dS,{className:"h-5 w-5 text-foreground"})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium text-foreground",children:Le.full_name}),i.jsx("p",{className:"text-sm text-muted-foreground",dir:"ltr",children:Le.email})]})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(We,{className:Je[Le.role],children:nt[Le.role]}),i.jsx(ee,{variant:"ghost",size:"icon",title:"שינוי סיסמה",onClick:()=>{M(Le),z(""),Z("")},children:i.jsx(R4,{className:"h-4 w-4"})}),Le.email!=="[email protected]"?i.jsxs(qs,{children:[i.jsx(rde,{asChild:!0,children:i.jsx(ee,{variant:"ghost",size:"icon",className:"text-red-500 hover:text-red-700 hover:bg-red-50",children:i.jsx(Ia,{className:"h-4 w-4"})})}),i.jsxs(ys,{dir:"rtl",children:[i.jsxs(ws,{children:[i.jsx(_s,{className:"text-right",children:"מחיקת משתמש"}),i.jsxs(Ns,{className:"text-right",children:["האם את/ה בטוח/ה שברצונך למחוק את המשתמש ",Le.full_name,"? פעולה זו לא ניתנת לביטול."]})]}),i.jsxs(bs,{className:"flex-row-reverse gap-2",children:[i.jsx(ks,{children:"ביטול"}),i.jsx(Ss,{onClick:()=>qe(Le.user_id,Le.full_name),className:"bg-red-500 hover:bg-red-600",children:"מחק"})]})]})]}):i.jsx(We,{variant:"outline",className:"text-muted-foreground",children:"לא ניתן למחיקה"})]})]},Le.id))})]}),i.jsx(Ht,{open:!!A,onOpenChange:Le=>{Le||M(null)},children:i.jsxs(Ut,{className:"sm:max-w-md max-h-[85vh] overflow-y-auto",dir:"rtl",children:[i.jsx(Wt,{children:i.jsxs(zt,{className:"text-right",children:["שינוי סיסמה — ",A==null?void 0:A.full_name]})}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"new-password",children:"סיסמה חדשה"}),i.jsx(Oe,{id:"new-password",type:"password",value:I,onChange:Le=>z(Le.target.value),className:"text-right",autoComplete:"new-password",placeholder:"לפחות 6 תווים"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"confirm-password",children:"אימות סיסמה"}),i.jsx(Oe,{id:"confirm-password",type:"password",value:J,onChange:Le=>Z(Le.target.value),className:"text-right",autoComplete:"new-password",placeholder:"הזן שוב את הסיסמה"})]}),i.jsxs("div",{className:"flex gap-2 pt-2",children:[i.jsx(ee,{variant:"rose",className:"flex-1",onClick:ne,disabled:re,children:re?"מעדכן...":"עדכן סיסמה"}),i.jsx(ee,{variant:"outline",className:"flex-1",onClick:()=>M(null),children:"ביטול"})]})]})]})}),i.jsxs("div",{className:"bg-gradient-to-br from-primary/10 via-primary/5 to-transparent roun
848ded-2xl shadow-card border border-primary/20 p-6 animate-slide-up",style:{animationDelay:"100ms"},children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl gradient-rose flex items-center justify-center",children:i.jsx(pa,{className:"h-6 w-6 text-foreground"})}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-semibold text-foreground",children:"לינק התחברות תלמידות"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"קישור לאזור האישי של התלמידות"})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Oe,{value:d1,readOnly:!0,dir:"ltr",className:"font-mono text-xs bg-background"}),i.jsx(ee,{variant:"outline",size:"icon",onClick:be,className:"shrink-0",children:P?i.jsx(hn,{className:"h-4 w-4 text-green-600"}):i.jsx(Cs,{className:"h-4 w-4"})}),i.jsx(ee,{variant:"outline",size:"icon",onClick:()=>window.open(d1,"_blank"),className:"shrink-0",children:i.jsx(Hl,{className:"h-4 w-4"})})]})]}),i.jsxs("div",{className:"bg-card rounded-2xl shadow-card border border-border p-6 animate-slide-up",style:{animationDelay:"200ms"},children:[i.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-100 flex items-center justify-center",children:i.jsx(O4,{className:"h-5 w-5 text-blue-600"})}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-semibold text-foreground",children:"ממשקי התחברות"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Webhooks לחיבור מערכות חיצוניות"})]})]}),i.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-4 text-amber-900 text-sm flex items-start gap-3 mb-4",children:[i.jsx(uS,{className:"h-5 w-5 text-amber-600 shrink-0 mt-0.5"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium mb-1",children:"כל הממשקים דורשים אימות"}),i.jsx("p",{className:"text-amber-700",children:"יש להעביר בכל קריאה את ההדר (Header) הבא:"}),i.jsx("code",{className:"bg-amber-100 px-2 py-1 rounded text-xs font-mono block mt-2 text-amber-800",dir:"ltr",children:"x-webhook-secret: [הסיסמה שהוגדרה]"})]})]}),i.jsxs(n0e,{type:"single",collapsible:!0,className:"space-y-3",children:[i.jsxs(Pi,{value:"students",className:"border rounded-xl overflow-hidden bg-muted/30",children:[i.jsx(Ri,{className:"px-4 py-3 hover:no-underline hover:bg-muted/50",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center",children:i.jsx(_b,{className:"h-4 w-4 text-primary"})}),i.jsxs("div",{className:"text-right",children:[i.jsx("h3",{className:"font-medium text-foreground",children:"הכנסת תלמידים"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"הוספה או עדכון תלמידים במערכת"})]})]})}),i.jsx(Oi,{className:"px-4 pb-4",children:i.jsxs("div",{className:"space-y-4 pt-2",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"ממשק להוספה או עדכון תלמידים. אם התלמיד קיים (לפי תעודת זהות) - יתעדכן, אחרת יווצר חדש."}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Oe,{value:bE,readOnly:!0,dir:"ltr",className:"font-mono text-xs"}),i.jsx(ee,{variant:"outline",size:"icon",onClick:ue,className:"shrink-0",children:x?i.jsx(hn,{className:"h-4 w-4 text-green-600"}):i.jsx(Cs,{className:"h-4 w-4"})})]}),i.jsxs("div",{className:"bg-background rounded-lg p-4 border border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-3",children:"שדות הבקשה (JSON):"}),i.jsxs("div",{className:"space-y-2 text-sm",children:[i.jsxs("div",{className:"flex items-start gap-2 flex-wrap",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"name"}),i.jsx("span",{className:"text-muted-foreground mx-1",children:"או"}),i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"fullname"}),i.jsx("span",{className:"text-muted-foreground",children:"- שם מלא של התלמידה"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2 flex-wrap",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"id_number"}),i.jsx("span",{className:"text-muted-foreground mx-1",children:"או"}),i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"governmentid"}),i.jsx("span",{className:"text-muted-foreground",children:"- תעודת זהות (5-9 ספרות)"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2 flex-wrap",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"phone"}),i.jsx("span",{className:"text-muted-foreground mx-1",children:"או"}),i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"mobilephone"}),i.jsx("span",{className:"text-muted-foreground",children:"- מספר טלפון"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2 flex-wrap",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"email"}),i.jsx("span",{className:"text-muted-foreground mx-1",children:"או"}),i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"emailaddress1"}),i.jsx("span",{className:"text-muted-foreground",children:"- כתובת אימייל"}),i.jsx(We,{variant:"secondary",className:"text-xs",children:"אופציונלי"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"status"}),i.jsx("span",{className:"text-muted-foreground",children:'- סטטוס: "active" או "inactive"'}),i.jsx(We,{variant:"secondary",className:"text-xs",children:"אופציונלי"})]}),i.jsxs("div",{className:"flex items-start gap-2 flex-wrap",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"courses"}),i.jsx("span",{className:"text-muted-foreground mx-1",children:"או"}),i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"yarin_courseeventtypeid"}),i.jsx("span",{className:"text-muted-foreground",children:"- קורסים (מערך או טקסט)"}),i.jsx(We,{variant:"secondary",className:"text-xs",children:"אופציונלי"})]})]}),i.jsxs("div",{className:"mt-4 pt-4 border-t border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-2",children:"דוגמה (פורמט CRM):"}),i.jsx("pre",{className:"bg-muted p-3 rounded text-xs overflow-x-auto",dir:"ltr",children:`{
849  "fullname": "שרה כהן",
850  "governmentid": "123456789",
851  "mobilephone": "050-1234567",
852  "emailaddress1": "[email protected]",
853  "yarin_courseeventtypeid": "איפור כלות"
854}`})]})]})]})})]}),i.jsxs(Pi,{value:"makeupland",className:"border rounded-xl overflow-hidden bg-muted/30",children:[i.jsx(Ri,{className:"px-4 py-3 hover:no-underline hover:bg-muted/50",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-amber-100 flex items-center justify-center",children:i.jsx(wi,{className:"h-4 w-4 text-amber-600"})}),i.jsxs("div",{className:"text-right",children:[i.jsx("h3",{className:"font-medium text-foreground",children:"אישור תלמיד כלקוח במייקאפלנד"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"עדכון סטטוס תלמיד לאחר אישור במייקאפלנד"})]})]})}),i.jsx(Oi,{className:"px-4 pb-4",children:i.jsxs("div",{className:"space-y-4 pt-2",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:'ממשק לעדכון סטטוס תלמיד לאחר שהצבירה אושרה במייקאפלנד. מעביר את מספר הטלפון ומעדכן את הסטטוס ל"מאושר".'}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Oe,{value:_E,readOnly:!0,dir:"ltr",className:"font-mono text-xs"}),i.jsx(ee,{variant:"outline",size:"icon",onClick:Re,className:"shrink-0",children:w?i.jsx(hn,{className:"h-4 w-4 text-green-600"}):i.jsx(Cs,{className:"h-4 w-4"})})]}),i.jsxs("div",{className:"bg-background rounded-lg p-4 border border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-3",children:"שדות הבקשה (JSON):"}),i.jsx("div",{className:"space-y-2 text-sm",children:i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"phone"}),i.jsx("span",{className:"text-muted-foreground",children:"- מספר טלפון של התלמיד (בפורמט 972 או מקומי)"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]})}),i.jsxs("div",{className:"mt-4 pt-4 border-t border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-2",children:"דוגמה:"}),i.jsx("pre",{className:"bg-muted p-3 rounded text-xs overflow-x-auto",dir:"ltr",children:`{
855  "phone": "972501234567"
856}`})]})]})]})})]}),i.jsxs(Pi,{value:"wallet-credits",className:"border rounded-xl overflow-hidden bg-muted/30",children:[i.jsx(Ri,{className:"px-4 py-3 hover:no-underline hover:bg-muted/50",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-green-100 flex items-center justify-center",children:i.jsx(hl,{className:"h-4 w-4 text-green-600"})}),i.jsxs("div",{className:"text-right",children:[i.jsx("h3",{className:"font-medium text-foreground",children:"הכנסת קרדיטים לתלמיד"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"הוספה או הורדה של קרדיטים מארנק התלמיד"})]})]})}),i.jsx(Oi,{className:"px-4 pb-4",children:i.jsxs("div",{className:"space-y-4 pt-2",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"ממשק להוספה או הורדה של קרדיטים מארנק התלמיד. זיהוי התלמיד מתבצע לפי תעודת זהות."}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Oe,{value:u1,readOnly:!0,dir:"ltr",className:"font-mono text-xs"}),i.jsx(ee,{variant:"outline",size:"icon",onClick:Ce,className:"shrink-0",children:_?i.jsx(hn,{className:"h-4 w-4 text-green-600"}):i.jsx(Cs,{className:"h-4 w-4"})})]}),i.jsxs("div",{className:"bg-background rounded-lg p-4 border border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-3",children:"שדות הבקשה (JSON):"}),i.jsxs("div",{className:"space-y-2 text-sm",children:[i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"governmentid"}),i.jsx("span",{className:"text-muted-foreground",children:"- תעודת זהות (5-9 ספרות)"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"new_photo_zakaut"}),i.jsx("span",{className:"text-muted-foreground",children:'- סכום (מספר או טקסט כמו "1,500 ש"ח ארנק דיגיטלי")'}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"yarin_registration_benefit_valid"}),i.jsx("span",{className:"text-muted-foreground",children:"- תאריך תפוגה"}),i.jsx(We,{variant:"secondary",className:"text-xs",children:"אופציונלי"})]})]}),i.jsx("p",{className:"text-xs text-muted-foreground mt-3",children:'סוג הפעולה 
856(type) נקבע אוטומטית כ-"credit" (הוספה) והקטגוריה כ-"credit" (כספי). המערכת מחלצת את הסכום מתוך הטקסט אוטומטית.'}),i.jsxs("div",{className:"mt-4 pt-4 border-t border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-2",children:"דוגמה:"}),i.jsx("pre",{className:"bg-muted p-3 rounded text-xs overflow-x-auto",dir:"ltr",children:`{
857  "governmentid": "123456789",
858  "new_photo_zakaut": "1,500 ש"ח ארנק דיגיטלי",
859  "yarin_registration_benefit_valid": "2025-12-31"
860}`})]}),i.jsxs("div",{className:"mt-4 pt-4 border-t border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-2",children:"ערכים נתמכים ב-new_photo_zakaut:"}),i.jsxs("div",{className:"space-y-1 text-xs text-muted-foreground",children:[i.jsx("p",{children:'• "1,500 ש"ח ארנק דיגיטלי" → 1,500 ₪'}),i.jsx("p",{children:'• "4,500 ש"ח ארנק דיגיטלי" → 4,500 ₪'}),i.jsx("p",{children:'• "3,900 ש"ח לטובת השתלמויות וימי צילום" → 3,900 ₪'}),i.jsx("p",{children:"• או כל מספר (למשל 500)"})]})]})]})]})})]}),i.jsxs(Pi,{value:"manual-credit",className:"border rounded-xl overflow-hidden bg-muted/30",children:[i.jsx(Ri,{className:"px-4 py-3 hover:no-underline hover:bg-muted/50",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-amber-100 flex items-center justify-center",children:i.jsx(Zu,{className:"h-4 w-4 text-amber-600"})}),i.jsxs("div",{className:"text-right",children:[i.jsx("h3",{className:"font-medium text-foreground",children:"הוספת קרדיט לאחר תשלום"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"טעינת קרדיט פשוטה לפי ת.ז. + סכום"})]})]})}),i.jsx(Oi,{className:"px-4 pb-4",children:i.jsxs("div",{className:"space-y-4 pt-2",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"ממשק פשוט לטעינת קרדיט כספי לתלמיד לאחר תשלום. זיהוי התלמיד מתבצע לפי תעודת זהות."}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Oe,{value:u1,readOnly:!0,dir:"ltr",className:"font-mono text-xs"}),i.jsx(ee,{variant:"outline",size:"icon",onClick:Ce,className:"shrink-0",children:_?i.jsx(hn,{className:"h-4 w-4 text-green-600"}):i.jsx(Cs,{className:"h-4 w-4"})})]}),i.jsxs("div",{className:"bg-background rounded-lg p-4 border border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-3",children:"שדות הבקשה (JSON):"}),i.jsxs("div",{className:"space-y-2 text-sm",children:[i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"governmentid"}),i.jsx("span",{className:"text-muted-foreground",children:"- תעודת זהות (5-9 ספרות)"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"new_photo_zakaut"}),i.jsx("span",{className:"text-muted-foreground",children:"- סכום או טקסט עם סכום"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"yarin_registration_benefit_valid"}),i.jsx("span",{className:"text-muted-foreground",children:"- תאריך תפוגה"}),i.jsx(We,{variant:"secondary",className:"text-xs",children:"אופציונלי"})]})]}),i.jsxs("div",{className:"mt-4 pt-4 border-t border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-2",children:"דוגמה:"}),i.jsx("pre",{className:"bg-muted p-3 rounded text-xs overflow-x-auto",dir:"ltr",children:`{
861  "governmentid": "123456789",
862  "new_photo_zakaut": "1,500 ש"ח ארנק דיגיטלי",
863  "yarin_registration_benefit_valid": "2025-12-31"
864}`})]})]})]})})]}),i.jsxs(Pi,{value:"photo-days",className:"border rounded-xl overflow-hidden bg-muted/30",children:[i.jsx(Ri,{className:"px-4 py-3 hover:no-underline hover:bg-muted/50",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-pink-100 flex items-center justify-center",children:i.jsx(Bs,{className:"h-4 w-4 text-pink-600"})}),i.jsxs("div",{className:"text-right",children:[i.jsx("h3",{className:"font-medium text-foreground",children:"הכנסת ימי צילום"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"יצירת יום צילום חדש במערכת"})]})]})}),i.jsx(Oi,{className:"px-4 pb-4",children:i.jsxs("div",{className:"space-y-4 pt-2",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"ממשק ליצירת יום צילום חדש במערכת עם כל הפרטים הנדרשים."}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Oe,{value:NE,readOnly:!0,dir:"ltr",className:"font-mono text-xs"}),i.jsx(ee,{variant:"outline",size:"icon",onClick:pe,className:"shrink-0",children:k?i.jsx(hn,{className:"h-4 w-4 text-green-600"}):i.jsx(Cs,{className:"h-4 w-4"})})]}),i.jsxs("div",{className:"bg-background rounded-lg p-4 border border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-3",children:"שדות הבקשה (JSON):"}),i.jsxs("div",{className:"space-y-2 text-sm",children:[i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"name"}),i.jsx("span",{className:"text-muted-foreground",children:"- שם יום הצילום"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"date"}),i.jsx("span",{className:"text-muted-foreground",children:"- תאריך (פורמט: YYYY-MM-DD)"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"time"}),i.jsx("span",{className:"text-muted-foreground",children:"- שעה (פורמט: HH:00 או HH:30, בין 09:00 ל-18:00)"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"branch"}),i.jsx("span",{className:"text-muted-foreground",children:"- סניף"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"max_participants"}),i.jsx("span",{className:"text-muted-foreground",children:"- מספר משתתפים מקסימלי"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"list_price"}),i.jsx("span",{className:"text-muted-foreground",children:"- מחיר מחירון"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"yarin_shachaf_price"}),i.jsx("span",{className:"text-muted-foreground",children:"- מחיר ירין שחף"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"description"}),i.jsx("span",{className:"text-muted-foreground",children:"- תיאור"}),i.jsx(We,{variant:"secondary",className:"text-xs",children:"אופציונלי"})]})]}),i.jsxs("div",{className:"mt-4 pt-4 border-t border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-2",children:"דוגמה:"}),i.jsx("pre",{className:"bg-muted p-3 rounded text-xs overflow-x-auto",dir:"ltr",children:`{
865  "name": "יום צילום כלות",
866  "date": "2026-02-15",
867  "time": "10:00",
868  "branch": "תל אביב",
869  "max_participants": 20,
870  "list_price": 350,
871  "yarin_shachaf_price": 250,
872  "description": "יום צילום מיוחד לתלמידות קורס כלות"
873}`})]})]})]})})]}),i.jsxs(Pi,{value:"practical-workshops",className:"border rounded-xl overflow-hidden bg-muted/30",children:[i.jsx(Ri,{className:"px-4 py-3 hover:no-underline hover:bg-muted/50",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-purple-100 flex items-center justify-center",children:i.jsx(fS,{className:"h-4 w-4 text-purple-600"})}),i.jsxs("div",{className:"text-right",children:[i.jsx("h3",{className:"font-medium text-foreground",children:"הכנסת סדנאות מעשיות"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"יצירת סדנה מעשית חדשה במערכת"})]})]})}),i.jsx(Oi,{className:"px-4 pb-4",children:i.jsxs("div",{className:"space-y-4 pt-2",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"ממשק ליצירת סדנה מעשית חדשה במערכת עם כל הפרטים הנדרשים."}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Oe,{value:SE,readOnly:!0,dir:"ltr",className:"font-mono text-xs"}),i.jsx(ee,{variant:"outline",size:"icon",onClick:fe,className:"shrink-0",children:E?i.jsx(hn,{className:"h-4 w-4 text-green-600"}):i.jsx(Cs,{className:"h-4 w-4"})})]}),i.jsxs("div",{className:"bg-background rounded-lg p-4 border border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-3",children:"שדות הבקשה (JSON):"}),i.jsxs("div",{className:"space-y-2 text-sm",children:[i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"name"}),i.jsx("span",{className:"text-muted-foreground",children:"- שם הסדנה"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"date"}),i.jsx("span",{className:"text-muted-foreground",children:"- תאריך (פורמט: YYYY-MM-DD)"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"time"}),i.jsx("span",{className:"text-muted-foreground",children:"- שעה (פורמט: HH:00 או HH:30, בין 09:00 ל-18:00)"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"branch"}),i.jsx("span",{className:"text-muted-foreground",children:"- סניף"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"max_participants"}),i.jsx("span",{className:"text-muted-foreground",children:"- מספר משתתפים מקסימלי"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"list_price"}),i.jsx("span",{className:"text-muted-foreground",children:"- מחיר מחירון"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"yarin_shachaf_price"}),i.jsx("span",{className:"text-muted-foreground",children:"- מחיר ירין שחף"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"description"}),i.jsx("span",{className:"text-muted-foreground",children:"- תיאור"}),i.jsx(We,{variant:"secondary",className:"text-xs",children:"אופציונלי"})]})]}),i.jsxs("div",{className:"mt-4 pt-4 border-t border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-2",children:"דוגמה:"}),i.jsx("pre",{className:"bg-muted p-3 rounded text-xs overflow-x-auto",dir:"ltr",children:`{
874  "name": "סדנת איפור ערב",
875  "date": "2026-02-20",
876  "time": "14:00",
877  "branch": "ירושלים",
878  "max_participants": 15,
879  "list_price": 400,
880  "yarin_shachaf_price": 300,
881  "description": "סדנה מעשית לאיפור ערב מתקדם"
882}`})]})]})]})})]}),i.jsxs(Pi,{value:"photo-day-images",className:"border rounded-xl overflow-hidden bg-muted/30",children:[i.jsx(Ri,{className:"px-4 py-3 hover:no-underline hover:bg-muted/50",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-cyan-100 flex items-center justify-center",children:i.jsx(Wi,{className:"h-4 w-4 text-cyan-600"})}),i.jsxs("div",{className:"text-right",children:[i.jsx("h3",{className:"font-medium text-foreground",children:"הכנסת צילומים של תלמידים"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"הכנסת קישורי תמונות מימי צילום לתלמידים"})]})]})}),i.jsx(Oi,{className:"px-4 pb-4",children:i.jsxs("div",{className:"space-y-4 pt-2",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"ממשק להכנסת קישורי תמונות מימי צילום לתלמידים. זיהוי התלמיד מתבצע לפי תעודת זהות."}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Oe,{value:kE,readOnly:!0,dir:"ltr",className:"font-mono text-xs"}),i.jsx(ee,{variant:"outline",size:"icon",onClick:te,className:"shrink-0",children:T?i.jsx(hn,{className:"h-4 w-4 text-green-600"}):i.jsx(Cs,{className:"h-4 w-4"})})]}),i.jsxs("div",{className:"bg-background rounded-lg p-4 border border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-3",children:"שדות הבקשה (JSON):"}),i.jsxs("div",{className:"space-y-2 text-sm",children:[i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"photo_day_date"}),i.jsx("span",{className:"text-muted-foreground",children:"- תאריך יום הצילום (פורמט: YYYY-MM-DD)"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"id_number"}),i.jsx("span",{className:"text-muted-foreground",children:"- תעודת זהות (5-9 ספרות)"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"download_url"}),i.jsx("span",{className:"text-muted-foreground",children:"- קישור לתיקיית הדרייב עם התמונות"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]})]}),i.jsxs("div",{className:"mt-4 pt-4 border-t border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-2",children:"דוגמה:"}),i.jsx("pre",{className:"bg-muted p-3 rounded text-xs overflow-x-auto",dir:"ltr",children:`{
883  "photo_day_date": "2026-02-15",
884  "id_number": "123456789",
885  "download_url": "https://drive.google.com/drive/folders/..."
886}`})]})]})]})})]}),i.jsxs(Pi,{value:"shop-vouchers",className:"border rounded-xl overflow-hidden bg-muted/30",children:[i.jsx(Ri,{classNa
886me:"px-4 py-3 hover:no-underline hover:bg-muted/50",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-orange-100 flex items-center justify-center",children:i.jsx(hy,{className:"h-4 w-4 text-orange-600"})}),i.jsxs("div",{className:"text-right",children:[i.jsx("h3",{className:"font-medium text-foreground",children:"הכנסת שוברים ממייקאפלנד"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"הכנסת שוברים לתלמידים לפי טלפון נייד"})]})]})}),i.jsx(Oi,{className:"px-4 pb-4",children:i.jsxs("div",{className:"space-y-4 pt-2",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"ממשק להכנסת שוברים מחנות מייקאפלנד לתלמידים. זיהוי התלמיד מתבצע לפי מספר טלפון נייד."}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Oe,{value:jE,readOnly:!0,dir:"ltr",className:"font-mono text-xs"}),i.jsx(ee,{variant:"outline",size:"icon",onClick:Ne,className:"shrink-0",children:X?i.jsx(hn,{className:"h-4 w-4 text-green-600"}):i.jsx(Cs,{className:"h-4 w-4"})})]}),i.jsxs("div",{className:"bg-background rounded-lg p-4 border border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-3",children:"שדות הבקשה (JSON):"}),i.jsxs("div",{className:"space-y-2 text-sm",children:[i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"phone"}),i.jsx("span",{className:"text-muted-foreground",children:"- טלפון נייד (לזיהוי התלמיד)"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"voucher_number"}),i.jsx("span",{className:"text-muted-foreground",children:"- מספר השובר"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"created_date"}),i.jsx("span",{className:"text-muted-foreground",children:"- תאריך הנפקה (פורמט: YYYY-MM-DD)"}),i.jsx(We,{variant:"secondary",className:"text-xs",children:"אופציונלי"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"expiration_date"}),i.jsx("span",{className:"text-muted-foreground",children:"- תוקף השובר (פורמט: YYYY-MM-DD)"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs font-mono",children:"amount"}),i.jsx("span",{className:"text-muted-foreground",children:"- סכום השובר (מספר)"}),i.jsx(We,{variant:"outline",className:"text-xs",children:"חובה"})]})]}),i.jsxs("div",{className:"mt-4 pt-4 border-t border-border",children:[i.jsx("h4",{className:"text-sm font-medium text-foreground mb-2",children:"דוגמה:"}),i.jsx("pre",{className:"bg-muted p-3 rounded text-xs overflow-x-auto",dir:"ltr",children:`{
887  "phone": "0501234567",
888  "voucher_number": "ML-12345",
889  "created_date": "2026-02-01",
890  "expiration_date": "2026-08-01",
891  "amount": 150
892}`})]})]})]})})]})]})]}),i.jsxs("div",{className:"bg-card rounded-2xl shadow-card border border-border p-6 animate-slide-up",style:{animationDelay:"400ms"},children:[i.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl bg-indigo-100 flex items-center justify-center",children:i.jsx(xL,{className:"h-5 w-5 text-indigo-600"})}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-semibold text-foreground",children:"אייפריימים להטמעה"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"קודי הטמעה לאתר חיצוני"})]})]}),i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"bg-muted/50 rounded-xl p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[i.jsx(Bs,{className:"h-5 w-5 text-pink-500"}),i.jsx("h3",{className:"font-medium text-foreground",children:"ימי צילום (תצוגת יומן)"})]}),i.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"יומן אינטראקטיבי המציג את ימי הצילום הקרובים עם דגש על הסניף"}),i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(Oe,{value:`<iframe src="${Jc}${f1}" width="100%" height="800" frameborder="0"></iframe>`,readOnly:!0,dir:"ltr",className:"font-mono text-xs bg-background"}),i.jsx(ee,{variant:"outline",size:"icon",onClick:()=>Qe(`${Jc}${f1}`,Q),className:"shrink-0",children:U?i.jsx(hn,{className:"h-4 w-4 text-green-600"}):i.jsx(Cs,{className:"h-4 w-4"})}),i.jsx("a",{href:f1,target:"_blank",rel:"noopener noreferrer",children:i.jsx(ee,{variant:"outline",size:"icon",className:"shrink-0",children:i.jsx(Hl,{className:"h-4 w-4"})})})]})]}),i.jsxs("div",{className:"bg-muted/50 rounded-xl p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[i.jsx(pa,{className:"h-5 w-5 text-rose-500"}),i.jsx("h3",{className:"font-medium text-foreground",children:"השתלמויות (עיצוב יוקרתי)"})]}),i.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"כרטיסי השתלמויות עם טאבים לפי חודש, תמונות וכפתורי פעולה"}),i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(Oe,{value:`<iframe src="${Jc}${h1}" width="100%" height="800" frameborder="0"></iframe>`,readOnly:!0,dir:"ltr",className:"font-mono text-xs bg-background"}),i.jsx(ee,{variant:"outline",size:"icon",onClick:()=>Qe(`${Jc}${h1}`,V),className:"shrink-0",children:Y?i.jsx(hn,{className:"h-4 w-4 text-green-600"}):i.jsx(Cs,{className:"h-4 w-4"})}),i.jsx("a",{href:h1,target:"_blank",rel:"noopener noreferrer",children:i.jsx(ee,{variant:"outline",size:"icon",className:"shrink-0",children:i.jsx(Hl,{className:"h-4 w-4"})})})]})]}),i.jsxs("div",{className:"bg-muted/50 rounded-xl p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[i.jsx(fS,{className:"h-5 w-5 text-purple-500"}),i.jsx("h3",{className:"font-medium text-foreground",children:"סדנאות מעשיות (תצוגת יומן)"})]}),i.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"יומן אינטראקטיבי המציג את הסדנאות המעשיות הקרובות עם דגש על הסניף"}),i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(Oe,{value:`<iframe src="${Jc}${m1}" width="100%" height="800" frameborder="0"></iframe>`,readOnly:!0,dir:"ltr",className:"font-mono text-xs bg-background"}),i.jsx(ee,{variant:"outline",size:"icon",onClick:()=>Qe(`${Jc}${m1}`,C),className:"shrink-0",children:F?i.jsx(hn,{className:"h-4 w-4 text-green-600"}):i.jsx(Cs,{className:"h-4 w-4"})}),i.jsx("a",{href:m1,target:"_blank",rel:"noopener noreferrer",children:i.jsx(ee,{variant:"outline",size:"icon",className:"shrink-0",children:i.jsx(Hl,{className:"h-4 w-4"})})})]})]})]})]})]})})}function i0e(){const[e,t]=v.useState([]),[r,n]=v.useState(!0),[s,a]=v.useState("");v.useEffect(()=>{o()},[]);const o=async()=>{try{const{data:d,error:f}=await de.from("makeupland_requests").select(`
893          id,
894          student_id,
895          status,
896          created_at,
897          students (name, phone)
898        `).order("created_at",{ascending:!1});if(f)throw f;const h=(d||[]).map(m=>{var g,p;return{id:m.id,studentId:m.student_id,studentName:((g=m.students)==null?void 0:g.name)||"",studentPhone:((p=m.students)==null?void 0:p.phone)||"",status:m.status,createdAt:new Date(m.created_at).toLocaleDateString("he-IL")}});t(h)}catch(d){console.error("Error fetching requests:",d),K.error("שגיאה בטעינת הבקשות")}finally{n(!1)}},l=e.filter(d=>d.studentName.includes(s)||d.studentPhone.includes(s)),c=e.filter(d=>d.status==="pending").length,u=e.filter(d=>d.status==="approved").length;return i.jsx(Hn,{children:i.jsxs("div",{className:"space-y-6",children:[i.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 animate-fade-in",children:i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-foreground",children:"בקשות מייקאפלנד"}),i.jsx("p",{className:"text-muted-foreground mt-1",children:"ניהול בקשות צבירה מתלמידים"})]})}),i.jsxs("div",{className:"grid grid-cols-2 gap-4 animate-slide-up",children:[i.jsxs("div",{className:"bg-amber-50 rounded-xl p-4 border border-amber-200",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx(Hs,{className:"h-4 w-4 text-amber-600"}),i.jsx("span",{className:"text-sm text-amber-700",children:"ממתינים לטיפול"})]}),i.jsx("p",{className:"text-2xl font-bold text-amber-700",children:c})]}),i.jsxs("div",{className:"bg-green-50 rounded-xl p-4 border border-green-200",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx(Ha,{className:"h-4 w-4 text-green-600"}),i.jsx("span",{className:"text-sm text-green-700",children:"טופלו"})]}),i.jsx("p",{className:"text-2xl font-bold text-green-700",children:u})]})]}),i.jsxs("div",{className:"relative max-w-md",children:[i.jsx(no,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(Oe,{placeholder:"חיפוש לפי שם או טלפון...",className:"pr-10",value:s,onChange:d=>
898a(d.target.value)})]}),i.jsxs("div",{className:"bg-card rounded-2xl shadow-card border border-border overflow-hidden animate-scale-in",children:[i.jsx("div",{className:"px-6 py-4 border-b border-border",children:i.jsxs("h3",{className:"font-semibold text-foreground",children:["בקשות (",l.length,")"]})}),r?i.jsx("div",{className:"flex items-center justify-center py-12",children:i.jsx(yr,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[i.jsx("th",{className:"text-right px-6 py-4 text-sm font-semibold text-foreground",children:"תלמיד"}),i.jsx("th",{className:"text-right px-6 py-4 text-sm font-semibold text-foreground",children:"טלפון"}),i.jsx("th",{className:"text-right px-6 py-4 text-sm font-semibold text-foreground",children:"תאריך בקשה"}),i.jsx("th",{className:"text-right px-6 py-4 text-sm font-semibold text-foreground",children:"סטטוס"})]})}),i.jsx("tbody",{className:"divide-y divide-border",children:l.map(d=>i.jsxs("tr",{className:"hover:bg-muted/30 transition-colors",children:[i.jsx("td",{className:"px-6 py-4",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-9 h-9 rounded-full gradient-rose flex items-center justify-center",children:i.jsx("span",{className:"text-sm font-semibold text-foreground",children:d.studentName.charAt(0)})}),i.jsx("span",{className:"font-medium text-foreground",children:d.studentName})]})}),i.jsx("td",{className:"px-6 py-4 text-muted-foreground",children:d.studentPhone}),i.jsx("td",{className:"px-6 py-4 text-muted-foreground",children:d.createdAt}),i.jsx("td",{className:"px-6 py-4",children:d.status==="pending"?i.jsxs(We,{className:"bg-amber-100 text-amber-700 gap-1",children:[i.jsx(Hs,{className:"h-3 w-3"}),"ממתין לטיפול"]}):i.jsxs(We,{className:"bg-green-100 text-green-700 gap-1",children:[i.jsx(Ha,{className:"h-3 w-3"}),"צבירה מעודכנת"]})})]},d.id))})]})}),!r&&l.length===0&&i.jsxs("div",{className:"text-center py-12",children:[i.jsx(wi,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),i.jsx("p",{className:"text-muted-foreground",children:"אין בקשות להצגה"})]})]})]})})}const o0e=()=>{const e=Ya();return v.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),i.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),i.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),i.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},V2="studentPendingRedirect";function Rg(e){try{localStorage.setItem(V2,JSON.stringify(e))}catch{}}function p1(){try{const e=localStorage.getItem(V2);if(!e)return null;const t=JSON.parse(e);return!t||typeof t!="object"?null:t}catch{return null}}function BF(){try{localStorage.removeItem(V2)}catch{}}function ym(e){const t=e.redirect,r=e.eventId;return t&&r?`/student/${t}?eventId=${r}`:t?`/student/${t}`:"/student/wallet"}const l0e=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),c0e=e=>e.replace(/[\u200B-\u200F\u202A-\u202E\u2066-\u2069\uFEFF]/g,"").trim(),u0e=async e=>{let t="Unknown invoke error";try{const r=await de.functions.invoke("send-otp",{body:e});if(!r.error)return{data:r.data??null,error:null};t=r.error.message||t,console.warn("[StudentLogin] Primary invoke failed, trying fallback fetch:",r.error)}catch(r){t=r instanceof Error?r.message:"Invoke threw an unknown error",console.error("[StudentLogin] Invoke threw, trying fallback fetch:",r)}try{const r="email"in e?`email=${encodeURIComponent(e.email)}`:`phone=${encodeURIComponent(e.phone)}`,n=await fetch(`https://bjohfezlhpohauqjxmzu.supabase.co/functions/v1/send-otp?${r}`,{method:"GET",mode:"cors"}),s=await n.json().catch(()=>null);if(n.ok)return{data:s,error:null};const a=await fetch("https://bjohfezlhpohauqjxmzu.supabase.co/functions/v1/send-otp",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJqb2hmZXpsaHBvaGF1cWp4bXp1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njg4MjA1NTgsImV4cCI6MjA4NDM5NjU1OH0.DV7gdWZ3Q5HIMMvhxfI4slXbUnO2UKU4vRS278fSe5U"},body:JSON.stringify(e)}),o=await a.json().catch(()=>null);return a.ok?{data:o,error:null}:{data:o,error:(o==null?void 0:o.error)||(s==null?void 0:s.error)||`Fallback failed with statuses GET ${n.status} / POST ${a.status}`}}catch(r){const n=r instanceof Error?r.message:"Unknown fallback error";return{data:null,error:`${t} | fallback: ${n}`}}};function d0e(){const e=kc(),[t]=t0(),[r,n]=v.useState("contact"),[s,a]=v.useState(""),[o,l]=v.useState(""),[c,u]=v.useState(!1),[d,f]=v.useState(""),[h,m]=v.useState("phone"),g=t.get("redirect")||void 0,p=t.get("eventId")||void 0,x=g==="workshops"?"השתלמויות":g==="p
898hoto-days"?"ימי צילום":g==="practical-workshops"?"סדנאות מעשיות":null;v.useEffect(()=>{const y=g,_=p;console.debug("StudentLogin: mounted",{hasRedirect:!!y,hasEventId:!!_,redirect:y,eventId:_,hasPending:!!p1()}),y&&Rg({redirect:y,eventId:_});const N=!!localStorage.getItem("studentSession"),k=p1(),S=ym(y?{redirect:y,eventId:_}:k||{});N&&S!=="/student/wallet"&&(console.debug("StudentLogin: already has studentSession, skipping login",{finalUrl:S}),e(S,{replace:!0}))},[g,p,e,t]);const b=async y=>{y.preventDefault();const _=c0e(s),N=l0e(_),k=N?_.toLowerCase():_.replace(/[-\s]/g,"");if(N){if(!k||k.length<5){K.error("נא להזין כתובת אימייל תקינה");return}}else if(!k||k.length<9){K.error("נא להזין מספר טלפון תקין");return}u(!0),m(N?"email":"phone");try{const S=N?{email:k}:{phone:k};console.log("[StudentLogin] Sending OTP request:",{type:N?"email":"phone",input:k});const{data:E,error:j}=await u0e(S);if(console.log("[StudentLogin] OTP response:",{data:E,error:j}),j){console.error("[StudentLogin] OTP request failed after fallback:",j),K.error("שגיאה בשליחת קוד האימות. נסי שוב או התחברי עם טלפון"),u(!1);return}if(!E){console.error("[StudentLogin] No data returned from send-otp"),K.error("שגיאה בשליחת קוד האימות - לא התקבלה תשובה"),u(!1);return}if(!E.success){console.warn("[StudentLogin] OTP not successful:",E.error),E.error==="Phone number not found"||E.error==="Email not found"?K.error(N?"האימייל לא נמצא במערכת":"מספר הטלפון לא נמצא במערכת"):E.error==="student_inactive"?K.error("התלמיד לא פעיל, יש לפנות לרכזות הקורסים"):K.error(E.error||"שגיאה בשליחת קוד האימות"),u(!1);return}f(E.studentName||""),a(k),n("otp"),K.success(N?"קוד אימות נשלח לאימייל שלך":"קוד אימות נשלח לטלפון שלך")}catch(S){console.error("[StudentLogin] Unexpected error in handleSendOtp:",S),console.error("[StudentLogin] Error details:",JSON.stringify(S,Object.getOwnPropertyNames(S),2)),K.error("שגיאה בשליחת קוד האימות")}finally{u(!1)}},w=async y=>{var _;if(y.preventDefault(),!o||o.length<4){K.error("נא להזין קוד אימות תקין");return}u(!0);try{const{data:N,error:k}=await de.functions.invoke("verify-otp",{body:h==="email"?{email:s,otp:o}:{phone:s,otp:o}});if(k){console.error("Error verifying OTP:",k);const R=k.message||"";R.includes("No OTP found")||R.includes("404")?(K.error("קוד האימות פג תוקף. נא לבקש קוד חדש"),n("contact"),l("")):R.includes("Invalid OTP")||R.includes("400")?K.error("קוד האימות שגוי"):R.includes("expired")?(K.error("קוד האימות פג תוקף. נא לבקש קוד חדש"),n("contact"),l("")):K.error("שגיאה באימות הקוד, נסה שוב"),u(!1);return}if(N&&!N.success){N.error==="Invalid OTP"?K.error("קוד האימות שגוי"):N.error==="OTP has expired. Please request a new code."||N.error==="No OTP found. Please request a new code."?(K.error("קוד האימות פג תוקף. נא לבקש קוד חדש"),n("contact"),l("")):N.error==="student_inactive"?K.error("התלמיד לא פעיל, יש לפנות לרכזות הקורסים"):K.error(N.error||"שגיאה באימות הקוד"),u(!1);return}const S=N.session;if(S!=null&&S.access_token&&(S!=null&&S.refresh_token)){const{error:R}=await de.auth.setSession({access_token:S.access_token,refresh_token:S.refresh_token});if(R){console.error("Failed to persist auth session:",R),K.error("שגיאה ביצירת החיבור המאובטח, נסי שוב"),u(!1);return}}else if(S!=null&&S.token_hash){const{data:R,error:P}=await de.auth.verifyOtp({token_hash:S.token_hash,type:"magiclink"});if(P||!((_=R.session)!=null&&_.access_token)){console.error("Failed to establish auth session:",P),K.error("שגיאה ביצירת החיבור המאובטח, נסי שוב"),u(!1);return}}else{console.error("Login response missing session credentials"),K.error("שגיאה בהתחברות, נסי שוב"),u(!1);return}const E=(await de.auth.getSession()).data.session;if(!(E!=null&&E.access_token)){console.error("Student auth session was not available after OTP verification"),K.error("שגיאה ביצירת החיבור המאובטח, נסי שוב"),u(!1);return}localStorage.setItem("studentSession",JSON.stringify(N.student)),K.success(`שלום ${N.student.name}! התחברת בהצלחה`);const j=p1(),T=ym(g?{redirect:g,eventId:p}:j||{});console.debug("StudentLogin: redirecting after OTP",{directRedirect:g,directEventId:p,pending:j,finalUrl:T}),BF(),e(T)}catch(N){console.error("Error in handleVerifyOtp:",N),K.error("שגיאה באימות הקוד")}finally{u(!1)}};return i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",dir:"rtl",children:i.jsxs("div",{className:"w-full max-w-md",children:[i.jsxs("div",{className:"flex flex-col items-center mb-8",children:[i.jsx("div",{className:"w-16 h-16 rounded-2xl gradient-rose flex items-center justify-center shadow-soft mb-4",children:i.jsx(wi,{className:"h-8 w-8 text-foreground"})}),i.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"YARIN SHAHAF"}),i.jsx("p",{className:"text-muted-foreground mt-1",children:x?`התחברות כדי להמשיך ל${x}`:"כניסה לאזור התלמידים"})]}),i.jsx("div",{className:"bg-card rounded-2xl shadow-card border border-border p-6",children:r==="contact"?i.jsxs("form",{onSubmit:b,className:"space-y-4",children:[i.jsxs("div",{className:"text-center mb-6",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-muted flex items-center justify-center mx-auto mb-3",children:i.jsxs("div",{className:"flex gap-1",children:[i.jsx(Jh,{className:"h-5 w-5 text-muted-foreground"}),i.jsx(I4,{className:"h-5 w-5 text-muted-foreground"})]})}),i.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"הזן את מספר הטלפון או האימייל שלך"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"נשלח לך קוד אימות"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"contact",children:"מספר טלפון או אימייל"}),i.jsx(Oe,{id:"contact",type:"text",placeholder:"",value:s,onChange:y=>a(y.target.value),dir:"ltr",className:"text-center text-lg"})]}),i.jsx(ee,{type:"submit",variant:"rose",className:"w-full",disabled:c,
898children:c?"שולח...":"שלח קוד אימות"})]}):i.jsxs("form",{onSubmit:w,className:"space-y-4",children:[i.jsxs("div",{className:"text-center mb-6",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-muted flex items-center justify-center mx-auto mb-3",children:i.jsx(R4,{className:"h-6 w-6 text-muted-foreground"})}),i.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"הזן את קוד האימות"}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:[d&&i.jsxs("span",{className:"block font-medium text-foreground",children:["שלום ",d,"!"]}),"שלחנו קוד ל-",s]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(ve,{htmlFor:"otp",children:"קוד אימות"}),i.jsx(Oe,{id:"otp",type:"text",placeholder:"0000",value:o,onChange:y=>l(y.target.value.replace(/\D/g,"")),dir:"ltr",className:"text-center text-2xl tracking-widest",maxLength:4})]}),i.jsx(ee,{type:"submit",variant:"rose",className:"w-full",disabled:c,children:c?"מאמת...":"התחבר"}),i.jsx(ee,{type:"button",variant:"ghost",className:"w-full",onClick:()=>{n("contact"),l(""),f("")},children:"שנה פרטי התחברות"})]})}),i.jsx("div",{className:"mt-6",children:i.jsxs("a",{href:"https://wa.me/972527480033",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2 w-full bg-green-500 hover:bg-green-600 text-white font-medium py-3 px-4 rounded-xl transition-colors shadow-md",children:[i.jsx(Qh,{className:"h-5 w-5"}),"לא מצליח להתחבר? דבר איתנו בווטסאפ"]})})]})})}const $F=v.createContext(void 0);function f0e({children:e}){const[t,r]=v.useState(null),[n,s]=v.useState(!0),a=v.useCallback(async()=>{var g,p;const f=localStorage.getItem("studentSession");if(!f){s(!1);return}const{phone:h,name:m}=JSON.parse(f);console.log("StudentDataContext: Loading all data for",m);try{const{data:x,error:b}=await de.auth.getSession(),w=(g=x.session)==null?void 0:g.access_token;if(b||!w){console.error("StudentDataContext: Missing authenticated student session",b),localStorage.removeItem("studentSession"),r(null),s(!1);return}const{data:y,error:_}=await de.functions.invoke("get-student-data",{body:{},headers:{Authorization:`Bearer ${w}`}});if(_||!(y!=null&&y.success)){console.error("Error fetching student data:",_||(y==null?void 0:y.error));const k=(p=_==null?void 0:_.context)==null?void 0:p.status,S=String((_==null?void 0:_.message)||(y==null?void 0:y.error)||"");(S.includes("401")||/unauthor/i.test(S))&&(localStorage.removeItem("studentSession"),await de.auth.signOut()),k===401&&(localStorage.removeItem("studentSession"),await de.auth.signOut()),r(null),s(!1);return}const N=y.data;r({studentName:m||N.studentName||"",phone:h,idNumber:N.idNumber||"",moneyCredit:N.moneyCredit||0,lessonCredit:N.lessonCredit||0,moneyCreditExpiration:N.moneyCreditExpiration||null,lessonCreditExpiration:N.lessonCreditExpiration||null,watchedLessonsCount:N.watchedLessonsCount||0,lessons:N.lessons||[],vouchers:N.vouchers||[],workshops:N.workshops||[],photoDays:N.photoDays||[],practicalWorkshops:N.practicalWorkshops||[],photoDayImages:N.photoDayImages||[],photoDayRegistrationImages:N.photoDayRegistrationImages||[],walletTransactions:N.walletTransactions||[],workshopRegistrations:new Set(N.workshopRegistrations||[]),photoDayRegistrations:new Set(N.photoDayRegistrations||[]),practicalWorkshopRegistrations:new Set(N.practicalWorkshopRegistrations||[]),makeuplandStatus:N.makeuplandStatus||"none",hasCourseTasks:N.hasCourseTasks||!1,courseNames:N.courseNames||[],isExternalClientOnly:N.isExternalClientOnly||!1}),console.log("StudentDataContext: All data loaded successfully in single call")}catch(x){console.error("StudentDataContext: Error loading data:",x)}finally{s(!1)}},[]);v.useEffect(()=>{a()},[a]);const o=v.useCallback((f,h)=>{r(m=>{if(!m)return m;const g={...m};return f==="workshop"?(g.workshopRegistrations=new Set(m.workshopRegistrations),g.workshopRegistrations.add(h),g.workshops=m.workshops.map(p=>p.id===h?{...p,registeredCount:p.registeredCount+1,spotsLeft:p.spotsLeft-1}:p)):f==="photo_day"?(g.photoDayRegistrations=new Set(m.photoDayRegistrations),g.photoDayRegistrations.add(h),g.photoDays=m.photoDays.map(p=>p.id===h?{...p,registeredCount:p.registeredCount+1,spotsLeft:p.spotsLeft-1}:p)):f==="practical_workshop"&&(g.practicalWorkshopRegistrations=new Set(m.practicalWorkshopRegistrations),g.practicalWorkshopRegistrations.add(h),g.practicalWorkshops=m.practicalWorkshops.map(p=>p.id===h?{...p,registeredCount:p.registeredCount+1,spotsLeft:p.spotsLeft-1}:p)),g})},[]),l=v.useCallback((f,h)=>{r(m=>{if(!m)return m;const g={...m};return f==="workshop"?(g.workshopRegistrations=new Set(m.workshopRegistrations),g.workshopRegistrations.delete(h),g.w
898orkshops=m.workshops.map(p=>p.id===h?{...p,registeredCount:p.registeredCount-1,spotsLeft:p.spotsLeft+1}:p)):f==="photo_day"?(g.photoDayRegistrations=new Set(m.photoDayRegistrations),g.photoDayRegistrations.delete(h),g.photoDays=m.photoDays.map(p=>p.id===h?{...p,registeredCount:p.registeredCount-1,spotsLeft:p.spotsLeft+1}:p)):f==="practical_workshop"&&(g.practicalWorkshopRegistrations=new Set(m.practicalWorkshopRegistrations),g.practicalWorkshopRegistrations.delete(h),g.practicalWorkshops=m.practicalWorkshops.map(p=>p.id===h?{...p,registeredCount:p.registeredCount-1,spotsLeft:p.spotsLeft+1}:p)),g})},[]),c=v.useCallback(f=>{r(h=>h&&{...h,moneyCredit:h.moneyCredit+f})},[]),u=v.useCallback(f=>{r(h=>h&&{...h,lessonCredit:h.lessonCredit+f})},[]),d=v.useCallback(f=>{r(h=>h&&{...h,makeuplandStatus:f})},[]);return i.jsx($F.Provider,{value:{data:t,isLoading:n,refreshData:a,registerToEvent:o,cancelEventRegistration:l,updateMoneyCredit:c,updateLessonCredit:u,setMakeuplandStatus:d},children:e})}function uo(){const e=v.useContext($F);if(e===void 0)throw new Error("useStudentData must be used within a StudentDataProvider");return e}function h0e(){const{data:e,refreshData:t,isLoading:r}=uo(),[n,s]=v.useState(!1),[a,o]=t0(),l=v.useRef(!1);v.useEffect(()=>{(async()=>{const S={};a.forEach((T,R)=>{S[R]=T}),console.log("=== Sumit Payment Debug ==="),console.log("Full URL:",window.location.href),console.log("All URL parameters:",S),console.log("Number of parameters:",Object.keys(S).length);const E=a.get("companynumber")||a.get("CompanyNumber"),j=a.get("Properties Billing Amount")||a.get("PropertiesBillingAmount")||a.get("amount")||a.get("Amount")||a.get("sum")||a.get("Sum")||a.get("total")||a.get("Total");if(console.log("Parsed values - companynumber:",E,"amount:",j),E&&j&&!l.current){l.current=!0,s(!0),console.log("Detected Sumit payment callback:",{companynumber:E,amount:j});try{const{data:T,error:R}=await de.functions.invoke("webhook-sumit-payment",{body:{companynumber:E,amount:Number(j)}});R?(console.error("Payment processing error:",R),K.error("שגיאה בעיבוד התשלום",{description:R.message})):T!=null&&T.success?(K.success("הקרדיט נטען בהצלחה!",{description:`₪${T.amount} נוספו לחשבון`}),await t()):T!=null&&T.error&&K.error("שגיאה בטעינת הקרדיט",{description:T.error})}catch(T){console.error("Failed to process payment:",T),K.error("שגיאה בעיבוד התשלום")}finally{s(!1),o({})}}})()},[a,o,t]),v.useEffect(()=>{t()},[t]);const c=(e==null?void 0:e.moneyCredit)||0,u=(e==null?void 0:e.lessonCredit)||0,d=e==null?void 0:e.moneyCreditExpiration,f=e==null?void 0:e.lessonCreditExpiration,h=(e==null?void 0:e.idNumber)||"",m=(e==null?void 0:e.walletTransactions)||[],g=(e==null?void 0:e.courseNames)||[],p=h?`https://pay.sumit.co.il/2u2t31/og38me/og38mf/payment/?companynumber=${encodeURIComponent(h)}`:"https://pay.sumit.co.il/2u2t31/og38me/og38mf/payment/",x=k=>{const S=new Date(k);if(!Number.isNaN(S.getTime()))return S;const E=k.replace(" ","T"),j=new Date(E);return Number.isNaN(j.getTime())?null:j},b=k=>{if(!k)return null;const S=x(k);return S?$t(S,"dd/MM/yyyy",{locale:Tn}):null},w=b(d),y=b(f),_=w??(d||"ללא תוקף"),N=y??(f||"ללא תוקף");return i.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[n&&i.jsx("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-50 flex items-center justify-center",children:i.jsxs("div",{className:"bg-card rounded-2xl p-8 shadow-xl border border-border flex flex-col items-center gap-4",children:[i.jsx(yr,{className:"h-12 w-12 animate-spin text-primary"}),i.jsx("p",{className:"text-lg font-medium text-foreground",children:"מעבד את התשלום..."}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"אנא המתיני"})]})}),i.jsx("div",{className:"animate-fade-in",children:i.jsxs("div",{className:"flex items-start justify-between gap-3",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-xl sm:text-2xl lg:text-3xl font-bold text-foreground",children:"הארנק שלי"}),i.jsx("p",{className:"text-sm sm:text-base text-muted-foreground mt-1",children:"צפייה ביתרות ובהיסטוריית השימוש"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs(ee,{type:"button",variant:"gold",size:"sm",onClick:()=>window.open(p,"_blank"),className:"shrink-0 gap-2",children:[i.jsx(hs,{className:"h-4 w-4"}),"רוצה עוד קרדיטים"]}),i.jsxs(ee,{type:"button",variant:"outline",size:"sm",onClick:t,disabled:r,className:"shrink-0 gap-2",children:[i.jsx(NL,{className:"h-4 w-4"+(r?" animate-spin":"")}),i.jsx("span",{className:"hidden sm:inline",children:"רענן"})]})]})]})}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4 animate-slide-up",children:[i.jsx("div",{className:"bg-card rounded-xl sm:rounded-2xl shadow-card border border-border p-4 sm:p-6 gradient-rose",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 sm:w-12 sm:h-12 rounded-lg sm:rounded-xl bg-foreground
898/10 flex items-center justify-center shrink-0",children:i.jsx(Zu,{className:"h-5 w-5 sm:h-6 sm:w-6 text-foreground"})}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("p",{className:"text-xs sm:text-sm text-foreground/80",children:"יתרת הקרדיט הכספי שלי"}),i.jsxs("p",{className:"text-2xl sm:text-3xl font-bold text-foreground",children:["₪",c.toLocaleString()]}),i.jsx("div",{className:"mt-3 pt-3 border-t border-border/40",children:i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[i.jsxs("div",{className:"inline-flex items-center gap-2 text-sm text-foreground",children:[i.jsx(rr,{className:"h-4 w-4"}),i.jsx("span",{className:"font-medium",children:"תוקף ההטבה"})]}),i.jsx("span",{className:"text-sm font-semibold text-foreground",children:c>0?_:"-"})]})})]})]})}),i.jsx("div",{className:"bg-card rounded-xl sm:rounded-2xl shadow-card border border-border p-4 sm:p-6",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 sm:w-12 sm:h-12 rounded-lg sm:rounded-xl bg-blue-100 flex items-center justify-center shrink-0",children:i.jsx(Nf,{className:"h-5 w-5 sm:h-6 sm:w-6 text-blue-600"})}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"קרדיט שיעורי אונליין"}),i.jsxs("p",{className:"text-2xl sm:text-3xl font-bold text-foreground",children:[u," שיעורים"]}),i.jsx("div",{className:"mt-3 pt-3 border-t border-border",children:i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[i.jsxs("div",{className:"inline-flex items-center gap-2 text-sm text-foreground",children:[i.jsx(rr,{className:"h-4 w-4 text-muted-foreground"}),i.jsx("span",{className:"font-medium",children:"תוקף ההטבה"})]}),i.jsx("span",{className:"text-sm font-semibold text-foreground",children:u>0?N:"-"})]})})]})]})})]}),g.length>0&&i.jsxs("div",{className:"bg-card rounded-xl sm:rounded-2xl shadow-card border border-border p-4 sm:p-6 animate-scale-in",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[i.jsx(pa,{className:"h-5 w-5 text-primary"}),i.jsx("h3",{className:"font-semibold text-foreground text-sm sm:text-base",children:"הקורסים שלי"})]}),i.jsx("div",{className:"flex flex-wrap gap-2",children:g.map((k,S)=>i.jsx("span",{className:"inline-flex items-center px-3 py-1.5 rounded-full text-xs sm:text-sm font-medium bg-primary/10 text-primary border border-primary/20",children:k},S))})]}),i.jsxs("div",{className:"bg-muted/50 rounded-xl sm:rounded-2xl p-4 sm:p-6 animate-scale-in",children:[i.jsx("h3",{className:"font-semibold text-foreground mb-2 text-sm sm:text-base",children:"איך זה עובד?"}),i.jsxs("ul",{className:"space-y-1.5 sm:space-y-2 text-xs sm:text-sm text-muted-foreground",children:[i.jsx("li",{children:"• קרדיט כספי ניתן לנצל עבור השתלמויות, ימי צילום וסדנאות"}),i.jsx("li",{children:"• קרדיט שיעורי אונליין מאפשר צפייה בשיעורים מוקלטים"}),i.jsx("li",{children:"• שימו לב לתאריכי התוקף של הקרדיטים - מוצג התוקף הקרוב ביותר"})]})]}),!e&&i.jsxs("div",{className:"text-center py-8 sm:py-12 bg-card rounded-xl sm:rounded-2xl border border-border",children:[i.jsx(hl,{className:"h-10 w-10 sm:h-12 sm:w-12 text-muted-foreground mx-auto mb-3 sm:mb-4"}),i.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"אין נתונים זמינים"})]}),m.length>0&&i.jsxs("div",{className:"bg-card rounded-xl sm:rounded-2xl shadow-card border border-border p-4 sm:p-6 animate-fade-in",children:[i.jsx("h3",{className:"font-semibold text-foreground mb-4 text-base sm:text-lg",children:"היסטוריית תנועות"}),i.jsx("div",{className:"space-y-3",children:m.map(k=>{const S=k.type==="credit",E=k.category==="credit",j=x(k.createdAt),T=j?$t(j,"dd/MM/yyyy HH:mm",{locale:Tn}):k.createdAt;return i.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-muted/30 hover:bg-muted/50 transition-colors",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center ${S?"bg-green-100 text-green-600":"bg-red-100 text-red-600"}`,children:S?i.jsx(pL,{className:"h-4 w-4"}):i.jsx(mL,{className:"h-4 w-4"})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-foreground",children:k.entitlementTypeName||(E?"קרדיט כספי":"צפייה אונליין")}),i.jsx("p",{className:"text-xs text-muted-foreground",children:T})]})]}),i.jsxs("div",{className:`text-sm font-semibold ${S?"text-green-600":"text-red-600"}
898`,children:[S?"+":"-",E?`₪${k.amount.toLocaleString()}`:`${k.lessonCount||0} שיעורים`]})]},k.id)})})]})]})}function m0e(){var T;const{data:e,updateLessonCredit:t}=uo(),{toast:r}=Kh(),[n,s]=v.useState(null),[a,o]=v.useState(new Set),[l,c]=v.useState(null),[u,d]=v.useState(!1),[f,h]=v.useState(null),[m,g]=v.useState(!1),[p,x]=v.useState(null),b=(e==null?void 0:e.lessons)||[],w=(e==null?void 0:e.lessonCredit)||0,y=(e==null?void 0:e.watchedLessonsCount)||0,_=v.useMemo(()=>{const R=new Map;return b.forEach(P=>{if(P.courseId&&P.courseName){const D=R.get(P.courseId);D?D.count++:R.set(P.courseId,{id:P.courseId,name:P.courseName,count:1})}}),Array.from(R.values())},[b]),N=v.useMemo(()=>n?b.filter(R=>R.courseId===n):b,[b,n]),k=a.size,S=R=>{if(a.has(R.id)){R.videoUrl&&(h({url:R.videoUrl,title:R.title}),d(!0));return}x(R),g(!0)},E=async()=>{p&&(g(!1),await j(p),x(null))},j=async R=>{if(w<=0){r({title:"אין מספיק קרדיט",description:"אין לך קרדיט שיעורים זמין לצפייה",variant:"destructive"});return}const P=localStorage.getItem("studentSession");if(!P){r({title:"שגיאה",description:"יש להתחבר מחדש",variant:"destructive"});return}const{phone:D}=JSON.parse(P);c(R.id);try{const{data:U,error:Q}=await de.functions.invoke("watch-lesson",{body:{phone:D,lessonId:R.id}});if(Q||!(U!=null&&U.success)){r({title:"שגיאה",description:(U==null?void 0:U.error)||"שגיאה בטעינת השיעור",variant:"destructive"});return}t(-1),o(Y=>new Set(Y).add(R.id)),h({url:U.data.videoUrl,title:U.data.lessonTitle}),d(!0),r({title:"קרדיט שיעור נוצל",description:`נותרו ${U.data.newLessonCredit} שיעורים`})}
898catch(U){console.error("Error watching lesson:",U),r({title:"שגיאה",description:"שגיאה בטעינת השיעור",variant:"destructive"})}finally{c(null)}};return i.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-xl sm:text-2xl lg:text-3xl font-bold text-foreground",children:"שיעורי השלמה מוקלטים"}),i.jsx("p",{className:"text-sm sm:text-base text-muted-foreground mt-1",children:"צפי בשיעורים שפספסת והשלימי את החומר"})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[i.jsx(ar,{className:"border-border bg-card",children:i.jsx(cr,{className:"p-4 sm:p-6",children:i.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[i.jsx("div",{className:"w-10 h-10 sm:w-12 sm:h-12 rounded-lg sm:rounded-xl bg-amber-100 flex items-center justify-center shrink-0",children:i.jsx(Hs,{className:"h-5 w-5 sm:h-6 sm:w-6 text-amber-600"})}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("p",{className:"text-xl sm:text-2xl font-bold text-foreground",children:w}),i.jsx("p",{className:"text-[10px] sm:text-sm text-muted-foreground truncate",children:"קרדיט שיעורים"})]})]})})}),i.jsx(ar,{className:"border-border bg-card",children:i.jsx(cr,{className:"p-4 sm:p-6",children:i.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[i.jsx("div",{className:"w-10 h-10 sm:w-12 sm:h-12 rounded-lg sm:rounded-xl bg-green-100 flex items-center justify-center shrink-0",children:i.jsx(Ha,{className:"h-5 w-5 sm:h-6 sm:w-6 text-green-600"})}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("p",{className:"text-xl sm:text-2xl font-bold text-foreground",children:y+k}),i.jsx("p",{className:"text-[10px] sm:text-sm text-muted-foreground truncate",children:"נצפו"})]})]})})})]}),w<=0&&i.jsx(ar,{className:"border-amber-200 bg-amber-50 dark:bg-amber-950/20",children:i.jsx(cr,{className:"p-3 sm:p-4",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(yb,{className:"h-5 w-5 text-amber-600 shrink-0"}),i.jsx("p",{className:"text-sm text-amber-800 dark:text-amber-200",children:"אין לך קרדיט שיעורים."})]})})}),_.length>0&&i.jsxs("div",{className:"flex flex-wrap gap-2 animate-slide-up overflow-x-auto pb-1 -mx-1 px-1",children:[i.jsxs(ee,{variant:n===null?"default":"outline",size:"sm",onClick:()=>s(null),className:"gap-1.5 text-xs sm:text-sm shrink-0",children:["הכל",i.jsx(We,{variant:"secondary",className:"mr-0.5 text-[10px] sm:text-xs",children:b.length})]}),_.map(R=>i.jsxs(ee,{variant:n===R.id?"default":"outline",size:"sm",onClick:()=>s(R.id),className:"gap-1.5 text-xs sm:text-sm shrink-0",children:[i.jsx("span",{className:"truncate max-w-[100px] sm:max-w-none",children:R.name}),i.jsx(We,{variant:"secondary",className:"mr-0.5 text-[10px] sm:text-xs",children:R.count})]},R.id))]}),N.length>0?i.jsx(ar,{className:"border-border bg-card",children:i.jsx("div",{className:"divide-y divide-border",children:N.map(R=>{const P=a.has(R.id),D=l===R.id,U=w>0||P;return i.jsxs("div",{className:`p-3 sm:p-4 flex items-center justify-between gap-3 ${P?"bg-green-50/50 dark:bg-green-950/10":""}`,children:[i.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[i.jsx("div",{className:`w-10 h-10 sm:w-12 sm:h-12 rounded-lg sm:rounded-xl flex items-center justify-center shrink-0 ${P?"bg-green-100":"gradient-rose"}`,children:P?i.jsx(Ha,{className:"h-5 w-5 sm:h-6 sm:w-6 text-green-600"}):i.jsx($a,{className:"h-5 w-5 sm:h-6 sm:w-6 text-foreground"})}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("h4",{className:"font-medium text-foreground text-sm sm:text-base truncate",children:R.title}),i.jsxs("p",{className:"text-xs sm:text-sm text-muted-foreground truncate",children:[R.courseName,R.duration&&` • ${R.duration}`]})]})]}),P?i.jsxs(ee,{size:"sm",variant:"outline",className:"gap-1.5 text-xs sm:text-sm shrink-0 text-green-600 border-green-200",onClick:()=>S(R),children:[i.jsx(Nf,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4"}),"צפה שוב"]}):i.jsxs(ee,{size:"sm",className:"gap-1.5 text-xs sm:text-sm shrink-0",onClick:()=>S(R),disabled:D||!U,children:[D?i.jsx(yr,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4 animate-spin"}):i.jsx(Nf,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4"}),U?"צפייה":"אין קרדיט"]})]},R.id)})})}):i.jsx(ar,{className:"border-border bg-card",children:i.jsxs(cr,{className:"p-8 sm:p-12 text-center",children:[i.jsx(Nf,{className:"h-10 w-10 sm:h-12 sm:w-12 text-muted-foreground mx-auto mb-3 sm:mb-4"}),i.jsx("h3",{className:"text-base sm:text-lg font-medium text-foreground mb-2",children:n?"אין שיעורים בקורס זה":"אין שיעורי השלמה"}),i.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"כל השיעורים שלך מעודכנים! המשיכי כך 💪"})]})}),i.jsx(Ht,{open:u,onOpenChange:d,children:i.jsxs(Ut,{className:"sm:max-w-4xl p-0 max-h-[90vh] overflow-hidden",dir:"rtl",children:[i.jsx(Wt,{className:"p-4 pb-2",children:i.jsx(zt,{className:"text-right pr-2",children:f==null?void 0:f.title})}),i.jsx("div",{className:"p-4 pt-0",children:(f==null?void 0:f.url)&&i.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-black",children:f.url.includes("<iframe")?i.jsx("div",{dangerouslySetInnerHTML:{__html:f.url.replace(/width="[^"]*"/,'width="100%"').replace(/height="[^"]*"/,'height="100%"')},className:"w-full h-full [&>iframe]:w-full [&>iframe]:h-full"}
898):f.url.match(/^\d+$/)||f.url.includes("vimeo")?i.jsx("iframe",{src:`https://player.vimeo.com/video/${f.url.replace(/\D/g,"")}`,className:"w-full h-full",allowFullScreen:!0,allow:"autoplay; fullscreen; picture-in-picture"}):i.jsx("video",{src:f.url,controls:!0,autoPlay:!0,className:"w-full h-full",controlsList:"nodownload"})})})]})}),i.jsx(qs,{open:m,onOpenChange:g,children:i.jsxs(ys,{dir:"rtl",children:[i.jsxs(ws,{children:[i.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-amber-100 flex items-center justify-center shrink-0",children:i.jsx(jL,{className:"h-5 w-5 text-amber-600"})}),i.jsx(_s,{className:"text-right",children:"אישור צפייה בשיעור"})]}),i.jsxs(Ns,{className:"text-right space-y-3",children:[i.jsx("p",{className:"font-medium text-foreground",children:p==null?void 0:p.title}),i.jsxs("p",{children:[i.jsx("strong",{children:"חשוב!"})," מספר הקרדיטים שלך לצפייה בשיעורים מוקלטים מוגבל."]}),i.jsx("p",{children:"יש לאשר רק אם הינך בטוחה שברצונך לצפות בשיעור זה."}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:["קרדיט נותר: ",i.jsx("strong",{className:"text-foreground",children:(e==null?void 0:e.lessonCredit)||0})," שיעורים"]}),!((T=p==null?void 0:p.courseName)!=null&&T.includes("פרימיום"))&&i.jsxs("p",{className:"text-xs text-amber-700 bg-amber-50 p-3 rounded-lg border border-amber-200 mt-3",children:[i.jsx("strong",{children:"שימי לב:"})," מבחינת משרד העבודה צפיה בשיעור מוקלט לא נחשבת השלמה של השיעור ולכן חשוב לשמור על נוכחות 85% בקורס לטובת קבלת תעודה של משרד העבודה."]})]})]}),i.jsxs(bs,{className:"flex-row-reverse gap-2 sm:gap-0",children:[i.jsx(Ss,{onClick:E,className:"bg-primary hover:bg-primary/90",children:"כן, אני רוצה לצפות"}),i.jsx(ks,{onClick:()=>x(null),children:"ביטול"})]})]})})]})}const p0e=e=>new Date(e).toLocaleDateString("he-IL",{day:"numeric",month:"long",year:"numeric"}),x0e=e=>{const t=new Date(e),r=t.getDate(),n=t.toLocaleDateString("he-IL",{month:"short"});return{day:r,month:n}},g0e="972527480033",v0e=`https://wa.me/${g0e}?text=${encodeURIComponent("היי, יש לי שאלה לגבי ההשתלמויות")}`;function y0e(){const{data:e,registerToEvent:t,cancelEventRegistration:r,updateMoneyCredit:n}=uo(),[s,a]=t0(),[o,l]=v.useState(null),[c,u]=v.useState(null),[d,f]=v.useState(null),[h,m]=v.useState(null),{toast:g}=Kh(),p=(e==null?void 0:e.workshops)||[],x=(e==null?void 0:e.moneyCredit)||0,b=(e==null?void 0:e.workshopRegistrations)||new Set;v.useEffect(()=>{const _=s.get("eventId");if(_&&p.length>0){const N=p.find(k=>k.id===_);if(console.debug("StudentWorkshops: eventId from URL",{eventId:_,found:!!N,alreadyRegistered:b.has(_),availableCount:p.length}),!N){g({title:"האירוע לא זמין",description:"לא מצאנו את ההשתלמות שבחרת (ייתכן שהיא נסגרה לרישום או שאינה זמינה עבורך).",variant:"destructive"}),a({},{replace:!0});return}if(b.has(_)){g({title:"כבר רשום/ה",description:"נראה שכבר נרשמת להשתלמות הזאת."}),a({},{replace:!0});return}f(N),a({},{replace:!0})}},[s,p,b,a,g]);const w=async _=>{const N=localStorage.getItem("studentSession");if(!N){g({title:"שגיאה",description:"יש להתחבר מחדש",variant:"destructive"});return}const{phone:k}=JSON.parse(N);l(_.id);try{const{data:S,error:E}=await de.functions.invoke("register-to-event",{body:{phone:k,eventType:"workshop",eventId:_.id,eventName:_.name,price:_.yarinShachafPrice}});if(E||!(S!=null&&S.success)){console.error("StudentWorkshops: register-to-event failed",{error:E,result:S});let j=null;if(E&&typeof E=="object"&&"context"in E)try{j=await E.context.json()}catch{}const T=j||S;let R=(T==null?void 0:T.error)||(E==null?void 0:E.message)||"שגיאה בהרשמה";(T==null?void 0:T.currentBalance)!==void 0&&(T==null?void 0:T.requiredAmount)!==void 0&&(R=`אין מספיק קרדיט בארנק. יתרה: ₪${T.currentBalance}, עלות: ₪${T.requiredAmount}`),g({title:"לא ניתן להירשם",description:R,variant:"destructive"});return}t("workshop",_.id),n(-_.yarinShachafPrice),g({title:"נרשמת בהצלחה",description:"ניתן לבטל השתתפות בהשתלמות עד 5 ימים לפני תחילת ההשתלמות."})}catch(S){console.error("Error registering:",S),g({title:"שגיאה",description:"שגיאה בהרשמה",variant:"destructive"})}finally{l(null),f(null)}},y=async _=>{const N=localStorage.getItem("studentSession");if(!N){g({title:"שגיאה",description:"יש להתחבר מחדש",variant:"destructive"});return}const{phone:k}=JSON.parse(N);
898u(_.id);try{const{data:S,error:E}=await de.functions.invoke("cancel-event-registration",{body:{phone:k,eventType:"workshop",eventId:_.id}});if(E||!(S!=null&&S.success)){console.error("StudentWorkshops: cancel-event-registration failed",{error:E,result:S}),g({title:"שגיאה",description:(S==null?void 0:S.error)||(E==null?void 0:E.message)||"שגיאה בביטול",variant:"destructive"});return}r("workshop",_.id),n(_.yarinShachafPrice),g({title:"ההרשמה בוטלה",description:`בוטלה ההרשמה ל"${_.name}"`})}catch(S){console.error("Error cancelling:",S),g({title:"שגיאה",description:"שגיאה בביטול",variant:"destructive"})}finally{u(null),m(null)}};return i.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[i.jsxs("div",{className:"animate-fade-in",children:[i.jsx("h1",{className:"text-xl sm:text-2xl lg:text-3xl font-bold text-foreground",children:"השתלמויות"}),i.jsx("p",{className:"text-sm sm:text-base text-muted-foreground mt-1",children:"הרשמה להשתלמויות מקצועיות"})]}),i.jsx(ar,{className:"border-border bg-card animate-slide-up",children:i.jsx(cr,{className:"p-3 sm:p-4",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-9 h-9 sm:w-10 sm:h-10 rounded-lg sm:rounded-xl gradient-rose flex items-center justify-center shrink-0",children:i.jsx(hl,{className:"h-4 w-4 sm:h-5 sm:w-5 text-foreground"})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"יתרת הקרדיט הכספי שלי"}),i.jsxs("p",{className:"text-lg sm:text-xl font-bold text-foreground",children:["₪",x.toLocaleString()]})]})]}),i.jsxs("a",{href:v0e,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-3 py-2 bg-success text-success-foreground hover:bg-success/90 rounded-lg transition-colors text-xs sm:text-sm font-medium",children:[i.jsx(Qh,{className:"h-4 w-4"}),i.jsx("span",{className:"hidden sm:inline",children:"יש לך שאלות?"}),i.jsx("span",{className:"sm:hidden",children:"שאלות?"})]})]})})}),i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:p.length===0?i.jsx(ar,{className:"border-border bg-card col-span-full",children:i.jsxs(cr,{className:"p-8 sm:p-12 text-center",children:[i.jsx(pa,{className:"h-10 w-10 sm:h-12 sm:w-12 text-muted-foreground mx-auto mb-3 sm:mb-4"}),i.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"אין השתלמויות זמינות כרגע"})]})}):p.map(_=>{const N=b.has(_.id),k=x>=_.yarinShachafPrice,S=_.spotsLeft<=0,E=x0e(_.date),j=typeof _.imageUrl=="string"?_.imageUrl.trim():"";return i.jsx(ar,{className:`border-border bg-card animate-scale-in overflow-hidden transition-all hover:shadow-lg ${N?"ring-2 ring-success/30":""}`,children:i.jsxs(cr,{className:"p-0",children:[i.jsxs("div",{className:"relative",children:[i.jsxs("div",{className:"relative aspect-[16/9] w-full overflow-hidden bg-muted",children:[i.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:i.jsx(pa,{className:"h-12 w-12 sm:h-16 sm:w-16 text-muted-foreground/50"})}),j&&i.jsx("img",{src:j,alt:_.name,loading:"lazy",className:"absolute inset-0 h-full w-full object-cover",onError:T=>{T.currentTarget.style.display="none"}})]}),i.jsxs("div",{className:"absolute top-3 right-3 bg-white/95 backdrop-blur-sm rounded-lg shadow-lg p-2 text-center min-w-[52px]",children:[i.jsx("div",{className:"text-xl sm:text-2xl font-bold text-primary leading-none",children:E.day}),i.jsx("div",{className:"text-[10px] sm:text-xs text-muted-foreground mt-0.5",children:E.month})]}),N&&i.jsx("div",{className:"absolute top-3 left-3",children:i.jsxs(We,{className:"bg-success text-success-foreground gap-1 text-xs shadow-lg",children:[i.jsx(Ha,{className:"h-3 w-3"}),"רשום/ה"]})}),i.jsx("div",{className:"absolute bottom-3 right-3",children:i.jsx(We,{variant:"secondary",className:`text-xs shadow-lg backdrop-blur-sm ${_.spotsLeft<=3?"bg-accent text-accent-foreground":_.spotsLeft<=0?"bg-destructive text-destructive-foreground":"bg-card/90 text-foreground"}`,children:_.spotsLeft<=0?"אזל":`נותרו ${_.spotsLeft} מקומות`})})]}),i.jsxs("div",{className:"p-4 sm:p-5 space-y-3",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-semibold text-foreground text-base sm:text-lg leading-tight",children:_.name}),_.description&&i.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground mt-1.5 line-clamp-2",children:_.description})]}),i.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs sm:text-sm text-muted-foreground",children:[i.jsxs("span",{className:"flex items-center gap-1.5",children:[i.jsx(rr,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4 text-primary/70"}),p0e(_.date)]}),i.jsxs("span",{className:"flex items-center gap-1.5",children:[i.jsx(Hs,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4 text-primary/70"}
898),_.time]}),i.jsxs("span",{className:"inline-flex items-center gap-1.5 bg-gradient-to-r from-pink-500 to-rose-500 text-white font-bold px-3 py-1 rounded-full text-sm shadow-md",children:[i.jsx(ls,{className:"h-4 w-4"}),_.branch]})]}),i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-3 pt-3 border-t border-border",children:[i.jsxs("div",{className:"flex flex-wrap items-stretch gap-2",children:[i.jsxs("div",{className:"bg-gradient-to-br from-pink-50 to-rose-50 border border-pink-200 rounded-xl px-3 py-2 flex flex-col items-center min-w-[100px]",children:[i.jsx("span",{className:"text-[9px] sm:text-[10px] text-pink-600 font-medium mb-0.5 text-center",children:"לתלמידי ובוגרי ירין שחף"}),i.jsxs("div",{className:"text-xl sm:text-2xl font-bold text-pink-600",children:["₪",_.yarinShachafPrice.toLocaleString()]}),_.yarinShachafPrice===0&&i.jsx(We,{variant:"secondary",className:"bg-success/20 text-success text-[10px] mt-1",children:"חינם!"})]}),_.listPrice>_.yarinShachafPrice&&i.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-xl px-3 py-2 flex flex-col items-center min-w-[80px]",children:[i.jsx("span",{className:"text-[9px] sm:text-[10px] text-gray-500 font-medium mb-0.5",children:"מחיר מחירון"}),i.jsxs("div",{className:"text-lg sm:text-xl font-semibold text-gray-400",children:["₪",_.listPrice.toLocaleString()]})]})]}),i.jsx("div",{className:"flex items-center gap-2",children:N?i.jsx(ee,{variant:"outline",size:"sm",onClick:()=>m(_),disabled:c===_.id,className:"border-destructive text-destructive hover:bg-destructive/10",children:c===_.id?i.jsx(yr,{className:"h-4 w-4 animate-spin"}):i.jsxs(i.Fragment,{children:[i.jsx(th,{className:"h-4 w-4 ml-1"}),"ביטול הרשמה"]})}):i.jsx(ee,{onClick:()=>f(_),disabled:o===_.id||S||!k,className:"gap-2",size:"sm",children:o===_.id?i.jsx(yr,{className:"h-4 w-4 animate-spin"}):S?"אין מקומות":k?"הרשמה להשתלמות":"אין מספיק קרדיט"})})]})]})]})},_.id)})}),i.jsx(qs,{open:!!d,onOpenChange:()=>f(null),children:i.jsxs(ys,{dir:"rtl",children:[i.jsxs(ws,{children:[i.jsx(_s,{children:"אישור הרשמה"}),i.jsxs(Ns,{className:"text-right",children:[i.jsxs("p",{children:["האם להירשם להשתלמות ",i.jsxs("strong",{children:['"',d==null?void 0:d.name,'"']}),"?"]}),i.jsxs("p",{className:"mt-2",children:["עלות: ",i.jsxs("strong",{children:["₪",d==null?void 0:d.yarinShachafPrice]})]}),i.jsx("p",{className:"text-sm mt-2",children:"הסכום יקוזז מיתרת הקרדיט שלך."})]})]}),i.jsxs(bs,{className:"flex-row-reverse gap-2",children:[i.jsx(Ss,{onClick:()=>d&&w(d),disabled:o!==null,children:o?i.jsx(yr,{className:"h-4 w-4 animate-spin"}):"אישור הרשמה"}),i.jsx(ks,{children:"ביטול"})]})]})}),i.jsx(qs,{open:!!h,onOpenChange:()=>m(null),children:i.jsxs(ys,{dir:"rtl",children:[i.jsxs(ws,{children:[i.jsx(_s,{children:"ביטול הרשמה"}),i.jsxs(Ns,{className:"text-right",children:[i.jsxs("p",{children:["האם לבטל את ההרשמה להשתלמות ",i.jsxs("strong",{children:['"',h==null?void 0:h.name,'"']}),"?"]}),i.jsx("p",{className:"mt-2 text-sm",children:"הסכום יוחזר ליתרת הקרדיט שלך."})]})]}),i.jsxs(bs,{className:"flex-row-reverse gap-2",children:[i.jsx(Ss,{onClick:()=>h&&y(h),disabled:c!==null,className:"bg-red-600 hover:bg-red-700",children:c?i.jsx(yr,{className:"h-4 w-4 animate-spin"}):"בטל הרשמה"}),i.jsx(ks,{children:"חזור"})]})]})})]})}const w0e=e=>new Date(e).toLocaleDateString("he-IL",{day:"numeric",month:"long",year:"numeric"}),b0e="972527480033",_0e=`https://wa.me/${b0e}?text=${encodeURIComponent("היי, יש לי שאלה לגבי ימי הצילום")}`;function N0e(){const{data:e,updateMoneyCredit:t,registerToEvent:r,cancelEventRegistration:n}=uo(),[s,a]=t0(),[o,l]=v.useState(null),[c,u]=v.useState(null),[d,f]=v.useState(null),[h,m]=v.useState(null),[g,p]=v.useState(en(new Date)),{toast:x}=Kh(),b=(e==null?void 0:e.photoDays)||[],w=(e==null?void 0:e.moneyCredit)||0,y=(e==null?void 0:e.photoDayRegistrations)||new Set,_=v.useMemo(()=>{const D=new Set;return b.forEach(U=>{const Q=new Date(U.date);D.add($t(en(Q),"yyyy-MM"))}),Array.from(D).sort().map(U=>new Date(U+"-01"))},[b]),N=v.useMemo(()=>b.filter(D=>Fh(new Date(D.date),g)),[b,g]),k=()=>p(D=>v2(D,1)),S=()=>p(D=>ts(D,1)),E=_.some(D=>D<g),j=_.some(D=>D>g);v.useEffect(()=>{const D=s.get("eventId");if(D&&b.length>0){const U=b.find(Q=>Q.id===D);if(console.debug("StudentPhotoDays: eventId from URL",{eventId:D,found:!!U,alreadyRegistered:y.has(D),availableCount:b.length}),!U){x({title:"האירוע לא זמין",description:"לא מצאנו את יום הצילום שבחרת (ייתכן שהוא נסגר לרישום או שאינו זמין עבורך).",variant:"destructive"}),a({},{replace:!0});return}if(y.has(D)){x({title:"כבר רשום/ה",description:"נראה שכבר נרשמת ליום הצילום הזה."}),a({},{replace:!0});return}f(U),a({},{replace:!0})}},[s,b,y,a,x]);const T=async D=>{const U=localStorage.getItem("studentSession");if(!U){x({title:"שגיאה",description:"יש להתחבר מחדש",variant:"destructive"});return}const{phone:Q}=JSON.parse(U);l(D.id),f(null);try{const{data:Y,error:V}=await de.functions.invoke("register-to-event",{body:{phone:Q,eventId:D.id,eventType:"photo_day",eventName:D.name,price:D.yarinShachafPrice}});if(V||!(Y!=null&&Y.success)){console.error("StudentPhotoDays: register-to-event failed",{error:V,responseData:Y});let F=null;if(V&&typeof V=="object"&&"context"in V)try{F=await V.context.json()}catch{}const C=F||Y;let X=(C==null?void 0:C.error)||(V==null?void 0:V.message)||"אירעה שגיאה בהרשמה";(C==null?void 0:C.currentBalance)!==void 0&&(C==null?void 0:C.requiredAmount)!==void 0&&(X=`אין מספיק קרדיט בארנק. יתרה: ₪${C.currentBalance}, עלות: ₪${C.requiredAmount}`),x({title:"לא ניתן להירשם",description:X,variant:"destructive"});return}t(Y.data.newBalance-w),r("photo_day",D.id),x({title:"נרשמת בהצלחה! ✓",description:`חויבת ב-₪${Y.data.amountCharged}. יתרה חדשה: ₪${Y.data.newBalance}`})}catch(Y){console.error("Registration error:",Y),x({title:"שגיאה",description:"אירעה שגיאה בהרשמה",variant:"destructive"})}finally{l(null)}},R=async D=>{const U=localStorage.getItem("studentSession");if(!U){x({title:"שגיאה",description:"יש להתחבר מחדש",variant:"destructive"});return}const{phone:Q}=JSON.parse(U);u(D.id),m(null);try{const{data:Y,error:V}=await de.functions.invoke("cancel-event-registration",{body:{phone:Q,eventId:D.id,eventType:"photo_day"}});if(V||!(Y!=null&&Y.success)){console.error("StudentPhotoDays: cancel-event-registration failed",{error:V,responseData:Y}
898),x({title:"שגיאה בביטול",description:(Y==null?void 0:Y.error)||(V==null?void 0:V.message)||"אירעה שגיאה בביטול ההרשמה",variant:"destructive"});return}n("photo_day",D.id),Y.refunded?(t(Y.newBalance-w),x({title:"ההרשמה בוטלה ✓",description:`הוחזרו ₪${Y.amount} לקרדיט שלך. יתרה חדשה: ₪${Y.newBalance}`})):x({title:"ההרשמה בוטלה",description:"לא בוצע החזר כספי מכיוון שהביטול פחות מ-5 ימים לפני המועד",variant:"destructive"})}catch(Y){console.error("Cancellation error:",Y),x({title:"שגיאה",description:"אירעה שגיאה בביטול ההרשמה",variant:"destructive"})}finally{u(null)}},P=D=>{const U=new Date;U.setHours(0,0,0,0);const Q=new Date(D);Q.setHours(0,0,0,0);const Y=Q.getTime()-U.getTime();return Math.ceil(Y/(1e3*60*60*24))};return i.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[i.jsxs("div",{className:"animate-fade-in",children:[i.jsx("h1",{className:"text-xl sm:text-2xl lg:text-3xl font-bold text-foreground",children:"ימי צילום"}),i.jsx("p",{className:"text-sm sm:text-base text-muted-foreground mt-1",children:"הרשמי לימי צילום מקצועיים"})]}),i.jsx(ar,{className:"border-primary/20 bg-gradient-to-br from-primary/5 to-secondary/10 animate-slide-up",children:i.jsx(cr,{className:"p-4 sm:p-5",children:i.jsxs("div",{className:"flex items-start gap-3 sm:gap-4",children:[i.jsx("div",{className:"w-10 h-10 sm:w-12 sm:h-12 rounded-xl bg-primary/10 flex items-center justify-center shrink-0",children:i.jsx(Bs,{className:"h-5 w-5 sm:h-6 sm:w-6 text-primary"})}),i.jsxs("p",{className:"text-sm sm:text-base text-foreground leading-relaxed",children:["לינק לתמונות מיום הצילום יעלה לאזור ",i.jsx("strong",{children:"תמונות מיום צילום"})," עד 48 שעות לאחר הצילומים"]})]})})}),i.jsx(ar,{className:"border-border bg-card animate-slide-up",children:i.jsx(cr,{className:"p-3 sm:p-4",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-9 h-9 sm:w-10 sm:h-10 rounded-lg sm:rounded-xl gradient-rose flex items-center justify-center shrink-0",children:i.jsx(hl,{className:"h-4 w-4 sm:h-5 sm:w-5 text-foreground"})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"יתרת הקרדיט הכספי שלי"}),i.jsxs("p",{className:"text-lg sm:text-xl font-bold text-foreground",children:["₪",w.toLocaleString()]})]})]}),i.jsxs("a",{href:_0e,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-3 py-2 bg-success text-success-foreground hover:bg-success/90 rounded-lg transition-colors text-xs sm:text-sm font-medium",children:[i.jsx(Qh,{className:"h-4 w-4"}),i.jsx("span",{className:"hidden sm:inline",children:"יש לך שאלות?"}),i.jsx("span",{className:"sm:hidden",children:"שאלות?"})]})]})})}),i.jsx("div",{className:"animate-fade-in",children:i.jsx("div",{className:"bg-gradient-to-r from-pink-500 via-rose-500 to-pink-600 rounded-2xl p-1 shadow-lg",children:i.jsxs("div",{className:"bg-card/95 backdrop-blur-sm rounded-xl p-3 sm:p-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(ee,{variant:"outline",size:"icon",onClick:k,disabled:!E,className:"h-12 w-12 lg:h-14 lg:w-14 rounded-full border-2 border-pink-300 bg-pink-50 hover:bg-pink-100 hover:border-pink-400 disabled:opacity-30 shadow-md transition-all",children:i.jsx(yi,{className:"h-6 w-6 lg:h-8 lg:w-8 text-pink-600"})}),i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"חודש נבחר"}),i.jsx("h2",{className:"text-lg sm:text-xl font-bold bg-gradient-to-r from-pink-600 to-rose-600 bg-clip-text text-transparent",children:$t(g,"MMMM yyyy",{locale:Tn})}),i.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[N.length," ימי צילום"]})]}),i.jsx(ee,{variant:"outline",size:"icon",onClick:S,disabled:!j,className:"h-12 w-12 lg:h-14 lg:w-14 roun
898ded-full border-2 border-pink-300 bg-pink-50 hover:bg-pink-100 hover:border-pink-400 disabled:opacity-30 shadow-md transition-all",children:i.jsx(Xi,{className:"h-6 w-6 lg:h-8 lg:w-8 text-pink-600"})})]}),_.length>1&&i.jsx("div",{className:"flex gap-2 mt-4 overflow-x-auto pb-1 scrollbar-hide justify-center flex-wrap",children:_.map(D=>{const U=Fh(D,g);return i.jsx("button",{onClick:()=>p(D),className:`
899                        px-4 py-2 rounded-full text-sm font-medium transition-all whitespace-nowrap
900                        ${U?"bg-gradient-to-r from-pink-500 to-rose-500 text-white shadow-md":"bg-pink-50 text-pink-700 hover:bg-pink-100"}
901                      `,children:$t(D,"MMM",{locale:Tn})},D.toISOString())})})]})})}),i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4 animate-scale-in",children:N.map(D=>{const U=y.has(D.id),Q=o===D.id,Y=c===D.id,V=w>=D.yarinShachafPrice,F=D.spotsLeft<=0;return i.jsx(ar,{className:`border-border bg-card animate-scale-in overflow-hidden transition-all hover:shadow-lg ${U?"ring-2 ring-success/30":""}`,children:i.jsxs(cr,{className:"p-0",children:[i.jsxs("div",{className:"relative aspect-[16/9] w-full overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/20 via-accent/30 to-secondary/20 flex items-center justify-center",children:i.jsx(Bs,{className:"h-12 w-12 sm:h-16 sm:w-16 text-primary/40"})}),i.jsxs("div",{className:"absolute top-3 right-3 bg-card/95 backdrop-blur-sm rounded-lg shadow-lg p-2 text-center min-w-[52px]",children:[i.jsx("div",{className:"text-xl sm:text-2xl font-bold text-primary leading-none",children:new Date(D.date).getDate()}),i.jsx("div",{className:"text-[10px] sm:text-xs text-muted-foreground mt-0.5",children:new Date(D.date).toLocaleDateString("he-IL",{month:"short"})})]}),U&&i.jsx("div",{className:"absolute top-3 left-3",children:i.jsxs(We,{className:"bg-success text-success-foreground gap-1 text-xs shadow-lg",children:[i.jsx(Ha,{className:"h-3 w-3"}),"רשום/ה"]})}),i.jsx("div",{className:"absolute bottom-3 right-3",children:i.jsx(We,{variant:"secondary",className:`text-xs shadow-lg backdrop-blur-sm ${D.spotsLeft<=3?"bg-accent text-accent-foreground":F?"bg-destructive text-destructive-foreground":"bg-card/90 text-foreground"}`,children:F?"אזל":`נותרו ${D.spotsLeft} מקומות`})})]}),i.jsxs("div",{className:"p-4 sm:p-5 space-y-3",children:[i.jsx("h3",{className:"font-semibold text-foreground text-base sm:text-lg leading-tight",children:D.name}),i.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs sm:text-sm text-muted-foreground",children:[i.jsxs("span",{className:"flex items-center gap-1.5",children:[i.jsx(rr,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4 text-primary/70"}),w0e(D.date)]}),i.jsxs("span",{className:"flex items-center gap-1.5",children:[i.jsx(Hs,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4 text-primary/70"}),D.time]}),i.jsxs("span",{className:"inline-flex items-center gap-1.5 bg-gradient-to-r from-pink-500 to-rose-500 text-white font-bold px-3 py-1 rounded-full text-sm shadow-md",children:[i.jsx(ls,{className:"h-4 w-4"}),D.branch]})]}),i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-3 pt-3 border-t border-border",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[i.jsx("span",{className:"text-xs",children:"מחיר מחירון:"}),i.jsxs("span",{className:"text-sm line-through",children:["₪",D.listPrice.toLocaleString()]})]}),i.jsxs("div",{className:"flex items-baseline gap-2",children:[i.jsxs("span",{className:"text-2xl sm:text-3xl font-bold text-primary",children:["₪",D.yarinShachafPrice.toLocaleString()]}),D.yarinShachafPrice===0&&i.jsx(We,{variant:"secondary",className:"bg-success/15 text-success text-xs",children:"חינם!"})]}),i.jsx("p",{className:"text-[10px] sm:text-xs text-primary/80 font-medium",children:"לתלמידי ובוגרי ירין שחף"})]}),i.jsx("div",{className:"flex items-center gap-2",children:U?i.jsx(ee,{variant:"outline",size:"sm",onClick:()=>m(D),disabled:Y,className:"border-destructive text-destructive hover:bg-destructive/10",children:Y?i.jsx(yr,{className:"h-4 w-4 animate-spin"}):i.jsxs(i.Fragment,{children:[i.jsx(th,{className:"h-4 w-4 ml-1"}),"ביטול הרשמה"]})}):i.jsx(ee,{onClick:()=>f(D),disabled:Q||F||!V,className:"gap-2",size:"sm",children:Q?i.jsx(yr,{className:"h-4 w-4 animate-spin"}):F?"אין מקומות":V?"הרשמה ליום צילום":"אין מספיק קרדיט"})})]})]})]})},D.id)})}),b.length===0?i.jsxs("div",{className:"text-center py-8 sm:py-12",children:[i.jsx(Bs,{className:"h-10 w-10 sm:h-12 sm:w-12 text-muted-foreground mx-auto mb-3 sm:mb-4"}),i.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"אין ימי צילום זמינים כרגע"})]}):N.length===0?i.jsxs("div",{className:"text-center py-8 sm:py-12 bg-card rounded-2xl border border-border",children:[i.jsx(Bs,{className:"h-10 w-10 sm:h-12 sm:w-12 text-muted-foreground mx-auto mb-3 sm:mb-4"}),i.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"אין ימי צילום בחודש זה"}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"בחרי חודש אחר לצפייה באירועים נוספים"})]}):null,i.jsx(qs,{open:!!d,onOpenChange:()=>f(null),children:i.jsxs(ys,{children:[i.jsxs(ws,{children:[i.jsx(_s,{children:"אישור הרשמה ליום צילום"}),i.jsxs(Ns,{className:"space-y-3 text-right",children:[i.jsxs("p",{children:["את/ה עומד/ת להירשם ל",i.jsx("strong",{children:d==null?void 0:d.name})," בעלות של ",i.jsxs("strong",{children:["₪",d==null?void 0:d.yarinShachafPrice]}),"."]}),i.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-3 text-amber-800 text-sm",children:[i.jsx("p",{className:"font-semibold mb-1",children:"מדיניות ביטולים:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[i.jsx("li",{children:"ביטול עד 5 ימים לפני המועד - הכסף יושב לקרדיט"}),i.jsx("li",{children:"ביטול פחות מ-5 ימים לפני המועד - הכסף לא יושב"})]})]}),i.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-4 text-blue-900 text-sm space-y-3",children:[i.jsx("p",{className:"font-bold text-base text-blue-800",children:"תלמידים יקרים"}),i.jsx("p",{children:"הנה הסבר על התנהלות ביום צילום נוסף."}),i.jsx("p",{children:"זהו יום צילום בו אתם יכולים להעשיר את תיק העבודות שלכם וליצור חומרים שיהיו לכם טובים למדיה."}),i.jsx("p",{children:"מומלץ להגיע עם מודליסטית, אבל אפשר גם לעבוד על עצמכם."}),i.jsxs("ul",{className:"space-y-2 pr-1",children:[i.jsxs("li",{className:"flex items-start gap-2",children:[i.jsx("span",{className:"text-blue-500 mt-0.5",children:"•"}),i.jsxs("span",{children:[i.jsx("strong",{children:"זמן העבודה:"}),i.jsx("br",{}),"תלמידים שעושים רק איפור\\ שיער זמן העבודה הוא שעה וחצי.",i.jsx("br",{}),"תלמידים שעושים איפור + שיער זמן העבודה הוא שעתיים וחצי.",i.jsx("br",{}),"כדי לשמור על הלו״ז לכולם, לא נוכל להוסיף זמן במקרה של איחור."]})]}),i.jsxs("li",{className:"flex items-start gap-2",children:[i.jsx("span",{className:"text-blue-500 mt-0.5",children:"•"}),i.jsx("span",{children:"הדוגמנית צריכה להיות מוכנה לגמרי (איפור, שיער וסטיילינג) בזמן."})]}),i.jsxs("li",{className:"flex items-start gap-2",children:[i.jsx("span",{className:"text-blue-500 mt-0.5",children:"•"}),i.jsx("span",{children:"מי שמגיע/ה רק לצילומים ( הכוונה שהדוגמנית מגיעה כבר מוכנה מבחינת איפור/שיער ) יש  להגיע שעה וחצי אחרי תחילת יום צילום עם הדוגמנית  ולהירשם אצל המדריך/ה."})]}),i.jsxs("li",{className:"flex items-start gap-2",children:[i.jsx("span",{className:"text-blue-500 mt-0.5",children:"•"}),i.jsx("span",{children:"הצילומים מתחילים שעה וחצי אחרי תחילת יום צילום לפי סדר שנקבע מראש, יום הצילום מסתיים אחרי שלוש וחצי שעות."})]}),i.jsxs("li",{className:"flex items-start gap-2",children:[i.jsx("span",{className:"text-blue-500 mt-0.5",children:"•"}),i.jsx("span",{children:"לא ניתן להגיע עם מלווים (חברים, משפחה או ילדים), כדי לשמור על סביבת עבודה מקצועית ונעימה לכולם."})]}),i.jsxs("li",{className:"flex items-start gap-2",children:[i.jsx("span",{className:"text-blue-500 mt-0.5",children:"•"}),i.jsx("span",{children:"שיתופי פעולה אפשריים רק אם גם המאפר/ת וגם המסרק/ת רשומים ליום הצילום."})]})]}),i.jsx("p",{children:"בסיום, חשוב להשאיר עמדה נקייה ומסודרת"}),i.jsx("p",{className:"font-bold text-center text-blue-700 text-base",children:"בהצלחה!!"})]})]})]}),i.jsxs(bs,{className:"flex-row-reverse gap-2",children:[i.jsx(Ss,{onClick:()=>d&&T(d),children:"אישור והרשמה"}),i.jsx(ks,{children:"ביטול"})]})]})}),i.jsx(qs,{open:!!h,onOpenChange:()=>m(null),children:i.jsxs(ys,{children:[i.jsxs(ws,{children:[i.jsx(_s,{children:"ביטול הרשמה ליום צילום"}),i.jsxs(Ns,{className:"space-y-3 text-right",children:[i.jsxs("p",{children:["את/ה עומד/ת לבטל את ההרשמה ל",i.jsx("strong",{children:h==null?void 0:h.name}),"."]}),h&&P(h.date)>5?i.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3 text-green-800 text-sm",children:[i.jsx("p",{className:"font-semibold",children:"✓ החזר כספי מלא"}),i.jsxs("p",{children:["מכיוון שהביטול יותר מ-5 ימים לפני המועד, יוחזרו לך ₪",h==null?void 0:h.yarinShachafPrice," לקרדיט."]})]}):i.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3 text-red-800 text-sm",children:[i.jsx("p",{className:"font-semibold",children:"⚠ ללא החזר כספי"}),i.jsx("p",{children:"מכיוון שהביטול פחות מ-5 ימים לפני המועד, לא יתבצע החזר כספי."})]})]})]}),i.jsxs(bs,{className:"flex-row-reverse gap-2",children:[i.jsx(Ss,{onClick:()=>h&&R(h),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"אישור ביטול"}),i.jsx(ks,{children:"חזרה"})]})]})})]})}const S0e="972527480033",k0e=`https://wa.me/${S0e}?text=${encodeURIComponent("היי, יש לי שאלה לגבי הסדנאות המעשיות")}`,wm=e=>{let t=e.replace(/סדנא/g,"סדנה");if(t.includes(" - ")){const r=t.split(" - ");if(r.length===2)return`${r[1]} - ${r[0]}`}return t};function j0e(){const{data:e,updateMoneyCredit:t,registerToEvent:r,cancelEventRegistration:n}=uo(),[s,a]=t0(),[o,l]=v.useState(()=>vs(new Date,{weekStartsOn:0})),[c,u]=v.useState(null),[d,f]=v.useState(null),[h,m]=v.useState(null),[g,p]=v.useState(null),[x,b]=v.useState(null),{toast:w}=Kh(),y=(e==null?void 0:e.practicalWorkshops)||[],_=(e==null?void 0:e.moneyCredit)||0,N=(e==null?void 0:e.practicalWorkshopRegistrations)||new Set;v.useEffect(()=>{const U=s.get("eventId");if(U&&y.length>0){const Q=y.find(Y=>Y.id===U);if(!Q){w({title:"האירוע לא זמין",description:"לא מצאנו את הסדנה שבחרת (ייתכן שהיא נסגרה לרישום או שאינה זמינה עבורך).",variant:"destructive"}),a({},{replace:!0});return}if(N.has(U)){w({title:"כבר רשומ/ה",description:"נראה שכבר נרשמת לסדנה הזאת."}),a({},{replace:!0});return}u(Q),a({},{replace:!0})}},[s,y,N,a,w]);const S=u2({start:o,end:Ih(o,{weekStartsOn:0})}).slice(0,6),E=["ראשון","שני","שלישי","רביעי","חמישי","שישי"],j=U=>y.filter(Q=>Wr(new Date(Q.date),U)),T=U=>{u(U)},R=async U=>{const Q=localStorage.getItem("studentSession");if(!Q){w({title:"שגיאה",description:"יש להתחבר מחדש",variant:"destructive"});return}const{phone:Y}=JSON.parse(Q);f(U.id),p(null);try{const{data:V,error:F}=await de.functions.invoke("register-to-event",{body:{phone:Y,eventId:U.id,eventType:"practical_workshop",eventName:U.name,price:U.yarinShachafPrice}});if(F||!(V!=null&&V.success)){console.error("StudentPracticalWorkshops: register-to-event failed",{error:F,responseData:V});let C=null;if(F&&typeof F=="object"&&"context"in F)try{C=await F.context.json()}catch{}const X=C||V;let se=(X==null?void 0:X.error)||(F==null?void 0:F.message)||"אירעה שגיאה בהרשמה";(X==null?void 0:X.currentBalance)!==void 0&&(X==null?void 0:X.requiredAmount)!==void 0&&(se=`אין מספיק קרדיט בארנק. יתרה: ₪${X.currentBalance}, עלות: ₪${X.requiredAmount}`),w({title:"לא ניתן להירשם",description:se,variant:"destructive"});return}t(V.data.newBalance-_),r("practical_workshop",U.id),u(null),w({title:"נרשמת בהצלחה! ✓",description:`חויבת ב-₪${V.data.amountCharged}. יתרה חדשה: ₪${V.data.newBalance}`})}catch(V){console.error("Registration error:",V),w({title:"שגיאה",description:"אירעה שגיאה בהרשמה",variant:"destructive"})}finally{f(null)}},P=async U=>{const Q=localStorage.getItem("studentSession");if(!Q){w({title:"שגיאה",description:"יש להתחבר מחדש",variant:"destructive"});return}const{phone:Y}=JSON.parse(Q);m(U.id),b(null);try{const{data:V,error:F}=await de.functions.invoke("cancel-event-registration",{body:{phone:Y,eventId:U.id,eventType:"practical_workshop"}});if(F||!(V!=null&&V.success)){w({title:"שגיאה בביטול",de
901scription:(V==null?void 0:V.error)||(F==null?void 0:F.message)||"אירעה שגיאה בביטול ההרשמה",variant:"destructive"});return}n("practical_workshop",U.id),u(null),V.refunded?(t(V.newBalance-_),w({title:"ההרשמה בוטלה ✓",description:`הוחזרו ₪${V.amount} לקרדיט שלך. יתרה חדשה: ₪${V.newBalance}`})):w({title:"ההרשמה בוטלה",description:"לא בוצע החזר כספי מכיוון שהביטול פחות מ-5 ימים לפני המועד",variant:"destructive"})}catch(V){console.error("Cancellation error:",V),w({title:"שגיאה",description:"אירעה שגיאה בביטול ההרשמה",variant:"destructive"})}finally{m(null)}},D=U=>{const Q=new Date;Q.setHours(0,0,0,0);const Y=new Date(U);Y.setHours(0,0,0,0);const V=Y.getTime()-Q.getTime();return Math.ceil(V/(1e3*60*60*24))};return i.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[i.jsxs("div",{className:"animate-fade-in",children:[i.jsx("h1",{className:"text-xl sm:text-2xl lg:text-3xl font-bold text-foreground",children:"סדנאות מעשיות"}),i.jsx("p",{className:"text-sm sm:text-base text-muted-foreground mt-1",children:"בחרי סדנה מהיומן והירשמי"})]}),i.jsx(ar,{className:"border-border bg-card animate-slide-up",children:i.jsx(cr,{className:"p-3 sm:p-4",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-9 h-9 sm:w-10 sm:h-10 rounded-lg sm:rounded-xl gradient-rose flex items-center justify-center shrink-0",children:i.jsx(hl,{className:"h-4 w-4 sm:h-5 sm:w-5 text-foreground"})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"יתרת הקרדיט הכספי שלי"}),i.jsxs("p",{className:"text-lg sm:text-xl font-bold text-foreground",children:["₪",_.toLocaleString()]})]})]}),i.jsxs("a",{href:k0e,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-3 py-2 bg-success text-success-foreground hover:bg-success/90 rounded-lg transition-colors text-xs sm:text-sm font-medium",children:[i.jsx(Qh,{className:"h-4 w-4"}),i.jsx("span",{className:"hidden sm:inline",children:"יש לך שאלות?"}),i.jsx("span",{className:"sm:hidden",children:"שאלות?"})]})]})})}),i.jsxs(ar,{className:"border-border bg-card animate-fade-in overflow-hidden",children:[i.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border bg-gradient-to-r from-pink-50 to-rose-50",children:[i.jsx("button",{onClick:()=>l(Rle(o,1)),className:"p-2 hover:bg-white/80 rounded-full transition-colors",children:i.jsx(yi,{className:"h-5 w-5 text-pink-600"})}),i.jsxs("h2",{className:"text-base sm:text-lg font-semibold text-foreground",children:[$t(o,"d MMM",{locale:Tn})," - ",$t(Ih(o,{weekStartsOn:0}),"d MMM yyyy",{locale:Tn})]}),i.jsx("button",{onClick:()=>l(Oh(o,1)),className:"p-2 hover:bg-white/80 rounded-full transition-colors",children:i.jsx(Xi,{className:"h-5 w-5 text-pink-600"})})]}),i.jsxs(cr,{className:"p-0",children:[i.jsx("div",{className:"grid grid-cols-6 border-b border-border",children:S.map((U,Q)=>{const Y=Wr(U,new Date);return i.jsxs("div",{className:`text-center py-3 border-l border-border first:border-l-0 ${Y?"bg-primary/10":"bg-muted/30"}`,children:[i.jsx("div",{className:"text-xs text-muted-foreground",children:E[Q]}),i.jsx("div",{className:`text-lg font-bold ${Y?"text-primary":"text-foreground"}`,children:$t(U,"d")})]},U.toISOString())})}),i.jsx("div",{className:"grid grid-cols-6 min-h-[220px]",children:S.map((U,Q)=>{const Y=j(U),V=Wr(U,new Date);return i.jsxs("div",{className:`border-l border-border first:border-l-0 p-1.5 sm:p-2 space-y-1.5 ${V?"bg-primary/5":""}`,children:[Y.map(F=>{const C=N.has(F.id);return i.jsxs("div",{onClick:()=>T(F),className:`p-2 rounded-lg cursor-pointer transition-all hover:scale-[1.02] active:scale-[0.98] ${C?"bg-blue-500 text-white":"bg-gradient-to-br from-pink-500 to-rose-500 text-white"}`,children:[i.jsx("div",{className:"text-[10px] sm:text-xs font-bold truncate leading-tight",children:wm(F.name)}),i.jsxs("div",{className:"flex items-center gap-1 mt-1 bg-white/40 backdrop-blur-sm rounded-full px-1.5 py-0.5 shadow-sm",children:[i.jsx(ls,{className:"h-3 w-3"}),i.jsx("span",{className:"text-[10px] sm:text-xs font-bold",children:F.branch})]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(Hs,{className:"h-2.5 w-2.5 sm:h-3 sm:w-3 op
901acity-80"}),i.jsx("span",{className:"text-[9px] sm:text-[10px] opacity-90",children:F.time})]}),C&&i.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[i.jsx(Ha,{className:"h-2.5 w-2.5 sm:h-3 sm:w-3"}),i.jsx("span",{className:"text-[9px] sm:text-[10px]",children:"רשומה"})]})]},F.id)}),Y.length===0&&i.jsx("div",{className:"h-full flex items-center justify-center",children:i.jsx("span",{className:"text-[10px] text-muted-foreground/50",children:"-"})})]},U.toISOString())})}),i.jsxs("div",{className:"flex items-center justify-center gap-4 p-3 border-t border-border bg-muted/20",children:[i.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[i.jsx("div",{className:"w-3 h-3 rounded bg-gradient-to-br from-pink-500 to-rose-500"}),i.jsx("span",{children:"סדנה זמינה"})]}),i.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[i.jsx("div",{className:"w-3 h-3 rounded bg-blue-500"}),i.jsx("span",{children:"רשומה"})]})]})]})]}),y.length===0&&i.jsxs("div",{className:"text-center py-8 sm:py-12",children:[i.jsx(rr,{className:"h-10 w-10 sm:h-12 sm:w-12 text-muted-foreground mx-auto mb-3 sm:mb-4"}),i.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"אין סדנאות מעשיות זמינות כרגע"})]}),c&&i.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",onClick:()=>u(null),children:i.jsxs("div",{className:"bg-card rounded-2xl max-w-lg w-full max-h-[90vh] overflow-y-auto shadow-2xl",onClick:U=>U.stopPropagation(),children:[i.jsxs("div",{className:"bg-gradient-to-r from-pink-500 to-rose-500 text-white p-6 rounded-t-2xl relative",children:[i.jsx("button",{onClick:()=>u(null),className:"absolute top-4 left-4 p-1 hover:bg-white/20 rounded-full transition-colors",children:i.jsx(es,{className:"h-5 w-5"})}),i.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[i.jsx("span",{className:"inline-block bg-white/20 text-white text-sm font-semibold px-3 py-1 rounded-full",children:c.branch}),N.has(c.id)&&i.jsxs("span",{className:"inline-flex items-center gap-1 bg-blue-500 text-white text-sm font-semibold px-3 py-1 rounded-full",children:[i.jsx(Ha,{className:"h-4 w-4"}),"רשומ/ה"]})]}),i.jsx("h2",{className:"text-2xl font-bold",children:wm(c.name)})]}),i.jsxs("div",{className:"p-6 space-y-4",children:[i.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-pink-100 flex items-center justify-center",children:i.jsx(rr,{className:"h-5 w-5 text-pink-600"})}),i.jsxs("div",{children:[i.jsx("div",{className:"font-medium",children:"תאריך ושעה"}),i.jsxs("div",{className:"text-muted-foreground",children:[$t(new Date(c.date),"EEEE, d בMMMM yyyy",{locale:Tn})," בשעה ",c.time]})]})]}),i.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-pink-100 flex items-center justify-center",children:i.jsx(ls,{className:"h-5 w-5 text-pink-600"})}),i.jsxs("div",{children:[i.jsx("div",{className:"font-medium",children:"סניף"}),i.jsx("div",{className:"text-muted-foreground",children:c.branch})]})]}),i.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-pink-100 flex items-center justify-center",children:i.jsx(xs,{className:"h-5 w-5 text-pink-600"})}),i.jsxs("div",{children:[i.jsx("div",{className:"font-medium",children:"מקומות פנויים"}),i.jsxs("div",{className:"text-muted-foreground",children:[c.spotsLeft," מקומות"]})]})]}),c.description&&i.jsxs("div",{className:"bg-muted rounded-xl p-4",children:[i.jsx("div",{className:"font-medium text-foreground mb-1",children:"פרטים נוספים"}),i.jsx("p",{className:"text-muted-foreground",children:c.description})]}),i.jsxs("div",{className:"bg-gradient-to-r from-pink-50 to-rose-50 rounded-xl p-4 text-center",children:[i.jsx("div",{className:"text-sm text-muted-foreground mb-1",children:"מחיר לתלמידות ירין שחף"}),i.jsxs("div",{className:"text-3xl font-bold text-pink-600",children:["₪",c.yarinShachafPrice]}),c.listPrice>c.yarinShachafPrice&&i.jsxs("div",{className:"text-sm text-muted-foreground line-through",children:["מחיר מחירון: ₪",c.listPrice]})]}),N.has(c.id)?i.jsx(ee,{variant:"destructive",className:"w-full py-6 text-lg font-semibold",onClick:()=>b(c),disabled:h===c.id,children:h===c.id?i.jsx(yr,{className:"h-5 w-5 animate-spin"}):"ביטול הרשמה"}):i.jsx(ee,{className:"w-full py-6 text-lg font-semibold bg-gradient-to-r from-pink-500 to-rose-500 hover:from-pink-600 hover:to-rose-600",onClick:()=>p(c),disabled:d===c.id||_<c.yarinShachafPrice,children:d===c.id?i.jsx(yr,{className:"h-5 w-5 animate-spin"}):_<c.yarinShachafPrice?"אין מספיק קרדיט":"להרשמה"})]})]})}),i.jsx(qs,{open:!!g,onOpenChange:()=>p(null),children:i.jsxs(ys,{children:[i.jsxs(ws,{children:[i.jsx(_s,{children:"אישור הרשמה לסדנה מעשית"}),i.jsxs(Ns,{className:"space-y-3 text-right",children:[i.jsxs("p",{children:["את/ה עומד/ת להירשם ל",i.jsx("strong",{children:g?wm(g.name):""})," בעלות של ",i.jsxs("strong",{children:["₪",g==null?void 0:g.yarinShachafPrice]}),"."]}),i.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-3 text-amber-800 text-sm",children:[i.jsx("p",{className:"font-semibold mb-1",children:"מדיניות ביטולים:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[i.jsx("li",{children:"ביטול עד 5 ימים לפני המועד - הכסף יושב לקרדיט"}),i.jsx("li",{children:"ביטול פחות מ-5 ימים לפני המועד - הכסף לא יושב"})]})]})]})]}),i.jsxs(bs,{className:"flex-row-reverse gap-2",children:[i.jsx(Ss,{onClick:()=>g&&R(g),children:"אישור והרשמה"}),i.jsx(ks,{children:"ביטול"})]})]})}),i.jsx(qs,{open:!!x,onOpenChange:()=>b(null),children:i.jsxs(ys,{children:[i.jsxs(ws,{children:[i.jsx(_s,{children:"ביטול הרשמה לסדנה מעשית"}),i.jsxs(Ns,{className:"space-y-3 text-right",children:[i.jsxs("p",{children:["את/ה עומד/ת לבטל את ההרשמה ל",i.jsx("strong",{children:x?wm(x.name):""}),"."]}),x&&D(x.date)>5?i.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3 text-green-800 text-sm",children:[i.jsx("p",{className:"font-semibold",children:"✓ החזר כספי מלא"}),i.jsxs("p",{children:["מכיוון שהביטול יותר מ-5 ימים לפני המועד, יוחזרו לך ₪",x==null?void 0:x.yarinShachafPrice," לקרדיט."]})]}):i.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3 text-red-800 text-sm",children:[i.jsx("p",{className:"font-semibold",children:"⚠ ללא החזר כספי"}),i.jsx("p",{children:"מכיוון שהביטול פחות מ-5 ימים לפני המועד, לא יתבצע החזר כספי."})]})]})]}),i.jsxs(bs,{className:"flex-row-reverse gap-2",children:[i.jsx(Ss,{onClick:()=>x&&P(x),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"אישור ביטול"}),i.jsx(ks,{children:"חזרה"})]})]})})]})}function E0e(){const{data:e,setMakeuplandStatus:t}=uo(),[r,n]=v.useState(!1),s=(e==null?void 0:e.makeuplandStatus)||"none",a=(e==null?void 0:e.vouchers)||[],o=async()=>{const c=localStorage.getItem("studentSession");if(!c){K.error("יש להתחבר מחדש");return}n(!0);try{const{phone:u}=JSON.parse(c),{data:d,error:f}=await de.functions.invoke("submit-makeupland-request",{body:{phone:u}});if(f||!(d!=null&&d.success)){K.error("שגיאה בשליחת הבקשה");return}t("pending"),K.success("הבקשה נשלחה בהצלחה! פרטיך יועברו למייקאפלנד")}catch(u){console.error("Error submitting request:",u),K.error("שגיאה בשליחת הבקשה")}finally{n(!1)}},l=()=>
901{switch(s){case"pending":return i.jsxs(We,{className:"bg-amber-100 text-amber-700 gap-1.5 py-1.5 px-3",children:[i.jsx(Hs,{className:"h-3.5 w-3.5"}),"ממתין לטיפול מייקאפלנד"]});case"approved":return i.jsxs(We,{className:"bg-green-100 text-green-700 gap-1.5 py-1.5 px-3",children:[i.jsx(vu,{className:"h-3.5 w-3.5"}),"צבירה מיוחדת מעודכנת"]});default:return null}};return i.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[i.jsxs("div",{className:"animate-fade-in",children:[i.jsx("h1",{className:"text-xl sm:text-2xl lg:text-3xl font-bold text-foreground",children:"חנות אונליין"}),i.jsx("p",{className:"text-sm sm:text-base text-muted-foreground mt-1",children:"הטבות ייחודיות לתלמידי ירין שחף"})]}),i.jsx(ar,{className:"border-border bg-gradient-to-br from-rose-50 to-pink-50 dark:from-rose-950/20 dark:to-pink-950/20 overflow-hidden animate-scale-in",children:i.jsx(cr,{className:"p-4 sm:p-6",children:i.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-3 sm:gap-4",children:[i.jsx("div",{className:"w-12 h-12 sm:w-14 sm:h-14 rounded-xl sm:rounded-2xl bg-gradient-to-br from-rose-400 to-pink-500 flex items-center justify-center shrink-0 shadow-lg",children:i.jsx(wi,{className:"h-6 w-6 sm:h-7 sm:w-7 text-white"})}),i.jsxs("div",{className:"flex-1 w-full",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3 mb-3",children:[i.jsx("h2",{className:"text-lg sm:text-xl font-bold text-foreground",children:"שיתוף פעולה עם מייקאפלנד"}),l()]}),i.jsxs("div",{className:"space-y-2 sm:space-y-3 text-sm sm:text-base text-foreground/80 leading-relaxed",children:[i.jsxs("p",{children:["לבית הספר ",i.jsx("strong",{className:"text-foreground",children:"ירין שחף"})," יש שיתוף פעולה עם חנות האיפור ",i.jsx("strong",{className:"text-foreground",children:"מייקאפלנד"}),"."]}),i.jsxs("p",{children:["במסגרת שיתוף הפעולה, ",i.jsx("strong",{className:"text-foreground",children:"תלמידי ובוגרי ירין שחף זכאים לצבירה ייחודית"})," על כל רכישה בחנות."]}),i.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"למימוש הצבירה, יש ללחוץ על הכפתור. לאחר הלחיצה, פרטיך יועברו למייקאפלנד לצורך המשך טיפול."})]}),i.jsx("div",{className:"mt-4 sm:mt-5",children:s==="none"?i.jsxs(ee,{onClick:o,disabled:r,className:"gap-2 bg-gradient-to-r from-rose-500 to-pink-500 hover:from-rose-600 hover:to-pink-600 text-white shadow-md w-full sm:w-auto",size:"default",children:[r?i.jsx(yr,{className:"h-4 w-4 animate-spin"}):i.jsx(uv,{className:"h-4 w-4"}),i.jsx("span",{className:"text-sm sm:text-base",children:"שלחו את פרטיי למייקאפלנד"})]}):s==="pending"?i.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-3 text-amber-800 text-xs sm:text-sm",children:[i.jsx("p",{className:"font-medium",children:"הבקשה שלך נשלחה בהצלחה!"}),i.jsx("p",{children:"צוות מייקאפלנד יטפל בבקשתך בהקדם."})]}):i.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3 text-green-800 text-xs sm:text-sm",children:[i.jsx("p",{className:"font-medium",children:"✓ הצבירה המיוחדת שלך מעודכנת!"}),i.jsx("p",{children:"כעת תוכל/י ליהנות מהטבות הצבירה בכל רכישה במייקאפלנד."})]})})]})]})})}),i.jsxs(ar,{className:"border-border bg-card animate-fade-in overflow-hidden",children:[i.jsx(gg,{className:"pb-3 sm:pb-4 px-4 sm:px-6 bg-gradient-to-l from-primary/5 to-transparent",children:i.jsxs(vg,{className:"flex items-center gap-2 text-base sm:text-lg",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center",children:i.jsx(hy,{className:"h-4 w-4 text-primary"})}),"השוברים שלי"]})}),i.jsxs(cr,{className:"px-4 sm:px-6 pb-4 sm:pb-6",children:[a.length===0&&i.jsxs("div",{className:"text-center py-8 sm:py-12",children:[i.jsx("div",{className:"w-16 h-16 sm:w-20 sm:h-20 mx-auto mb-4 rounded-full bg-muted/50 flex items-center justify-center",children:i.jsx(hy,{className:"h-8 w-8 sm:h-10 sm:w-10 text-muted-foreground
901/40"})}),i.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"אין שוברים פעילים כרגע"})]}),a.length>0&&i.jsx("div",{className:"grid gap-3 sm:gap-4",children:a.map(c=>i.jsxs("div",{className:"group relative overflow-hidden rounded-xl border border-border bg-gradient-to-l from-rose-50/50 via-white to-pink-50/50 dark:from-rose-950/20 dark:via-card dark:to-pink-950/20 p-4 sm:p-5 transition-all hover:shadow-md hover:border-primary/30",children:[i.jsx("div",{className:"absolute top-0 left-0 w-1.5 h-full bg-gradient-to-b from-rose-400 to-pink-500 rounded-r-full"}),i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-4 mr-3",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-12 h-12 sm:w-14 sm:h-14 rounded-xl bg-gradient-to-br from-rose-100 to-pink-100 dark:from-rose-900/30 dark:to-pink-900/30 flex items-center justify-center shrink-0 shadow-sm",children:i.jsx(uv,{className:"h-6 w-6 sm:h-7 sm:w-7 text-rose-500"})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs text-muted-foreground",children:"מספר שובר"}),i.jsx("p",{className:"font-semibold text-foreground text-sm sm:text-base",children:c.name})]})]}),i.jsx("div",{className:"hidden sm:block w-px h-10 bg-border/60"}),i.jsxs("div",{className:"flex flex-wrap items-center gap-4 sm:gap-6 flex-1",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(rr,{className:"h-4 w-4 text-muted-foreground"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs text-muted-foreground",children:"תאריך הנפקה"}),i.jsx("p",{className:"font-medium text-foreground text-sm",children:$t(new Date(c.created_at),"dd/MM/yyyy",{locale:Tn})})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Hs,{className:"h-4 w-4 text-muted-foreground"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs text-muted-foreground",children:"תוקף"}),i.jsx("p",{className:"font-medium text-foreground text-sm",children:$t(new Date(c.expiration_date),"dd/MM/yyyy",{locale:Tn})})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:i.jsx("span",{className:"text-green-600 dark:text-green-400 font-bold text-xs",children:"₪"})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs text-muted-foreground",children:"סכום"}),i.jsx("p",{className:"font-bold text-green-600 dark:text-green-400 text-base sm:text-lg",children:c.amount.toLocaleString()})]})]})]}),i.jsxs(ee,{className:"w-full sm:w-auto gap-2 bg-gradient-to-r from-rose-500 to-pink-500 hover:from-rose-600 hover:to-pink-600 text-white shadow-md transition-all hover:shadow-lg",onClick:()=>window.open("https://shop.makeup.land/","_blank"),children:[i.jsx(uv,{className:"h-4 w-4"}),"מעבר לחנות למימוש"]})]})]},c.id))})]})]})]})}function C0e(){const{data:e,isLoading:t}=uo(),r=(e==null?void 0:e.photoDayImages)||[],n=(e==null?void 0:e.photoDayRegistrationImages)||[];return t?i.jsx("div",{className:"flex items-center justify-center py-12",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):(r.length>0||n.length>0,i.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[i.jsxs("div",{className:"animate-fade-in",children:[i.jsx("h1",{className:"text-xl sm:text-2xl lg:text-3xl font-bold text-foreground",children:"תמונות מימי צילום"}),i.jsx("p",{className:"text-sm sm:text-base text-muted-foreground mt-1",children:"צפייה והורדה של תמונות מימי הצילום"})]}),i.jsx(ar,{className:"border-amber-200 bg-gradient-to-br from-amber-50 to-orange-50 animate-slide-up",children:i.jsx(cr,{className:"p-4 sm:p-5",children:i.jsxs("div",{className:"flex items-start gap-3 sm:gap-4",children:[i.jsx("div",{className:"w-10 h-10 sm:w-12 sm:h-12 rounded-xl bg-amber-100 flex items-center justify-center shrink-0",children:i.jsx(Hs,{className:"h-5 w-5 sm:h-6 sm:w-6 text-amber-600"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-semibold text-amber-800 text-sm sm:text-base",children:"שימי לב!"}),i.jsxs("p",{className:"text-amber-700 text-xs sm:text-sm mt-1",children:["התמונות נשמרות במערכת למשך ",i.jsx("strong",{children:"90 יום"})," מיום הצילום.",i.jsx("br",{className:"hidden sm:block"}),"מומלץ להוריד ולשמור את התמונות שלך בהקדם."]})]})]})})}),i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"space-y-3 animate-slide-up",style:{animationDelay:"100ms"},children:[i.jsxs("h2",{className:"text-lg sm:text-xl font-semibold text-foreground flex items-center gap-2",children:[i.jsx(Bs,{className:"h-5 w-5 text-pink-600"}),"תמונות מימי צילום בקורס"]}),r.length>0?r.map(s=>i.jsx(ar,{className:"overflow-hidden hover:shadow-md transition-shadow",children:i.jsx(cr,{className:"p-4 sm:p-5",children:i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-pink-100 to-rose-100 flex items-center justify-center shrink-0",children:i.jsx(Bs,{className:"h-6 w-6 text-pink-600"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-semibold text-foreground",children:"יום צילום בקורס"}),i.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-sm mt-1",children:[i.jsx(rr,{className:"h-4 w-4"}),i.jsx("span",{children:(()=>{const[a,o,l]=s.photoDayDate.split("-").map(Number);return $t(new Date(a,o-1,l),"EEEE, d בMMMM yyyy",{locale:Tn})})()})]})]})]}),i.jsx("div",{className:"flex gap-2 sm:gap-3",children:i.jsxs(ee,{variant:"outline",size:"sm",className:"gap-2",onClick:()=>window.open(s.downloadUrl,"_blank"),children:[i.jsx(Hl,{className:"h-4 w-4"}),i.jsx("span",{children:"פתח"})]})})]})})},s.id)):i.jsx(ar,{className:"border-dashed",children:i.jsxs(cr,{className:"p-6 text-center",children:[i.jsx(Bs,{className:"h-8 w-8 text-muted-foreground mx-auto mb-2"}),i.jsx("p",{className:"text-muted-foreground text-sm",children:"אין תמונות מימי צילום בקורס כרגע"})]})})]}),i.jsxs("div",{className:"space-y-3 animate-slide-up",style:{animationDelay:"200ms"},children:[i.jsxs("h2",{className:"text-lg sm:text-xl font-semibold text-foreground flex items-center gap-2",children:[i.jsx(Wi,{className:"h-5 w-5 text-purple-600"}),"תמונות מימי צילום נוספים"]}),n.length>0?n.map(s=>i.jsx(ar,{className:"overflow-hidden hover:shadow-md transition-shadow",children:i.jsx(cr,{className:"p-4 sm:p-5",children:i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-purple-100 to-violet-100 flex items-center justify-center shrink-0",children:i.jsx(Wi,{className:"h-6 w-6 text-purple-600"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-semibold text-foreground",children:s.photoDayName}),i.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-sm mt-1",children:[i.jsx(rr,{className:"h-4 w-4"}),i.jsx("span",{children:s.photoDayDate?(()=>{const[a,o,l]=s.photoDayDate.split("-").map(Number);return $t(new Date(a,o-1,l),"EEEE, d בMMMM yyyy",{locale:Tn})})():"תאריך לא ידוע"})]})]})]}),i.jsx("div",{children:i.jsxs(ee,{variant:"outline",size:"sm",className:"gap-2",onClick:()=>window.open(s.imageUrl,"_blank"),children:[i.jsx(Hl,{className:"h-4 w-4"}),i.jsx("span",{children:"פתח"})]})})]})})},s.id)):i.jsx(ar,{className:"border-dashed",children:i.jsxs(cr,{className:"p-6 text-center",children:[i.jsx(Wi,{className:"h-8 w-8 text-muted-foreground mx-auto mb-2"}),i.jsx("p",{className:"text-muted-foreground text-sm",children:"אין תמונות מימי צילום נוספים כרגע"})]})})]})]})]}))}function T0e(){const[e,t]=v.useState([]),[r,n]=v.useState([]),[s,a]=v.useState(!0),[o,l]=v.useState(null),[c,u]=v.useState(null),[d,f]=v.useState({}),[h,m]=v.useState(null),[g,p]=v.useState(!1),[x,b]=v.useState(0);v.useEffect(()=>{w()},[]);const w=async()=>{const j=localStorage.getItem("studentSession");if(!j)return;const{phone:T}=JSON.parse(j);try{const{data:R,error:P}=await de.functions.invoke("get-student-course-tasks",{body:{phone:T}});if(P||!(R!=null&&R.success)){console.error("Error fetching tasks:",P||(R==null?void 0:R.error));return}t(R.data.tasks||[]),n(R.data.progress||[]);const D=(R.data.tasks||[]).length>0;localStorage.setItem("studentHasTasks",D.toString())}catch(R){console.error("Error:",R)}finally{a(!1)}},y=j=>r.find(T=>T.task_id===j),_=async(j,T)=>{l(T);const R=localStorage.getItem("studentSession");if(!R)return;const{phone:P}=JSON.parse(R);try{await de.functions.invoke("mark-task-video-watched",{body:{phone:P,taskId:j.id,videoId:T.id}}),n(D=>{const U=D.find(Q=>Q.task_id===j.id);if(U){const Q=U.videos_watched||[];if(!Q.includes(T.id))return D.map(Y=>Y.task_id===j.id?{...Y,videos_watched:[...Q,T.id]}:Y)}else return[...D,{task_id:j.id,videos_watched:[T.id],quiz_score:null,quiz_attempts:0,quiz_passed:!1,completed_at:null}];return D})}catch(D){console.error("Error marking video watched:",D)}},N=j=>{u(j),f({}),m(null),b(0)},k=()=>{u(null),f({}),m(null),b(0)},S=async()=>
901{if(!(c!=null&&c.quiz))return;const j=localStorage.getItem("studentSession");if(!j)return;const{phone:T}=JSON.parse(j);p(!0);try{const{data:R,error:P}=await de.functions.invoke("submit-task-quiz",{body:{phone:T,taskId:c.id,answers:d}});if(P||!(R!=null&&R.success)){Rt({title:"שגיאה בשליחת השאלון",variant:"destructive"});return}m({score:R.data.score,passed:R.data.passed,passingScore:R.data.passingScore}),n(D=>D.find(Q=>Q.task_id===c.id)?D.map(Q=>Q.task_id===c.id?{...Q,quiz_score:R.data.score,quiz_attempts:Q.quiz_attempts+1,quiz_passed:R.data.passed||Q.quiz_passed,completed_at:R.data.passed?new Date().toISOString():Q.completed_at}:Q):[...D,{task_id:c.id,videos_watched:[],quiz_score:R.data.score,quiz_attempts:1,quiz_passed:R.data.passed,completed_at:R.data.passed?new Date().toISOString():null}]),R.data.passed&&(R.data.webhookError?Rt({title:"עברת את המבחן בהצלחה! 🎉",description:"שימי לב: המבחן לא נקלט באתר הממשלתי. אנא צרי קשר עם רכזות הקורס.",variant:"destructive",duration:1e4}):Rt({title:"מזל טוב! עברת את המבחן בהצלחה! 🎉"}))}catch(R){console.error("Error submitting quiz:",R),Rt({title:"שגיאה בשליחת השאלון",variant:"destructive"})}finally{p(!1)}},E=j=>{const T=y(j.id);if(!T)return 0;const R=j.videos.length,P=(T.videos_watched||[]).length,D=j.quiz!==null,U=T.quiz_passed;if(D){const Q=R>0?P/R*50:50;return Math.round(Q+(U?50:0))}else return R>0?Math.round(P/R*100):0};return s?i.jsx("div",{className:"flex items-center justify-center h-64",children:i.jsxs("div",{className:"text-center space-y-4",children:[i.jsx(yr,{className:"h-10 w-10 animate-spin text-primary mx-auto"}),i.jsx("p",{className:"text-muted-foreground",children:"טוען משימות..."})]})}):e.length===0?i.jsxs("div",{className:"space-y-6 px-4",dir:"rtl",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"p-3 rounded-2xl gradient-rose shadow-soft",children:i.jsx(Fo,{className:"h-6 w-6 text-foreground"})}),i.jsx("h1",{className:"text-xl sm:text-2xl font-bold text-foreground",children:"משימות קורס"})]}),i.jsxs("div",{className:"rounded-2xl bg-muted/30 p-8 sm:p-12 text-center",children:[i.jsx("div",{className:"w-16 h-16 rounded-full bg-muted mx-auto mb-4 flex items-center justify-center",children:i.jsx(Fo,{className:"h-8 w-8 text-muted-foreground"})}),i.jsx("p",{className:"text-muted-foreground text-lg",children:"אין משימות זמינות עבורך כרגע"})]})]}):i.jsxs("div",{className:"space-y-6 px-4",dir:"rtl",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"p-3 rounded-2xl gradient-rose shadow-soft",children:i.jsx(Fo,{className:"h-6 w-6 text-foreground"})}),i.jsx("h1",{className:"text-xl sm:text-2xl font-bold text-foreground",children:"משימות קורס"})]}),o&&i.jsx("div",{className:"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-2 sm:p-4",onClick:()=>l(null),children:i.jsxs("div",{className:"bg-card rounded-2xl sm:rounded-3xl w-full max-w-4xl max-h-[95vh] overflow-hidden shadow-2xl",onClick:j=>j.stopPropagation(),children:[i.jsxs("div",{className:"p-3 sm:p-4 border-b border-border/50 flex items-center justify-between",children:[i.jsx(ee,{variant:"ghost",size:"icon",className:"rounded-full h-8 w-8 sm:h-10 sm:w-10",onClick:()=>l(null),children:i.jsx(es,{className:"h-5 w-5"})}),i.jsx("h3",{className:"font-semibold text-sm sm:text-base text-right flex-1 mr-3 truncate",children:o.title})]}),i.jsx("div",{className:"aspect-video bg-black",children:o.video_url.includes("<iframe")?i.jsx("div",{dangerouslySetInnerHTML:{__html:o.video_url.replace(/width="[^"]*"/,'width="100%"').replace(/height="[^"]*"/,'height="100%"')},className:"w-full h-full [&>iframe]:w-full [&>iframe]:h-full"}):i.jsx("iframe",{src:`https://player.vimeo.com/video/${o.video_url.replace(/\D/g,"")}`,className:"w-full h-full",allowFullScreen:!0,allow:"autoplay; fullscreen; picture-in-picture"})})]})}),c&&c.quiz&&i.jsx("div",{className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center p-2 sm:p-4",onClick:k,children:i.jsxs("div",{className:"bg-card rounded-2xl sm:rounded-3xl w-full max-w-lg max-h-[95vh] overflow-hidden shadow-2xl flex flex-col",onClick:j=>j.stopPropagation(),dir:"rtl",children:[i.jsx("div",{className:"p-4 sm:p-6 border-b border-border/50 bg-gradient-to-l from-primary/5 to-transparent",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(ee,{variant:"ghost",size:"icon",className:"rounded-full h-8 w-8",onClick:k,children:i.jsx(es,{className:"h-5 w-5"})}),i.jsxs("div",{className:"text-right flex-1 mr-3",children:[i.jsx("h3",{className:"font-bold text-lg sm:text-xl",children:c.quiz.name}),i.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["ציון עובר: ",i.jsx("span",{className:"font-semibold text-primary",children:c.quiz.passing_score})]})]}),i.jsx("div",{className:"p-2 rounded-xl gradient-rose",children:i.jsx(wi,{className:"h-5 w-5 text-foreground"})})]})}),i.jsx("div",{className:"flex-1 overflow-y-auto p-4 sm:p-6",children:h?i.jsxs("div",{className:"text-center py-6 space-y-6",children:[i.jsx("div",{className:`w-24 h-24 mx-auto rounded-full flex items-center justify-center ${h.passed?"bg-green-100 dark:bg-green-900/30":"bg-red-100 dark:bg-red-900/30"}
901`,children:h.passed?i.jsx(my,{className:"h-12 w-12 text-green-500"}):i.jsx(th,{className:"h-12 w-12 text-red-500"})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-4xl font-bold mb-2",children:h.score}),i.jsx("p",{className:`text-lg font-medium ${h.passed?"text-green-600":"text-red-600"}`,children:h.passed?"כל הכבוד! עברת בהצלחה 🎉":"לא עברת הפעם"}),i.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:["ציון עובר: ",h.passingScore]})]}),h.passed?i.jsxs(ee,{className:"w-full bg-green-500 hover:bg-green-600 text-white py-6 text-lg",onClick:k,children:[i.jsx(vu,{className:"h-5 w-5 ml-2"}),"סיום"]}):i.jsxs("div",{className:"space-y-3",children:[i.jsxs(ee,{className:"w-full gradient-rose text-foreground py-6 text-lg",onClick:()=>{m(null),f({}),b(0)},children:[i.jsx(_L,{className:"h-5 w-5 ml-2"}),"נסה שוב"]}),i.jsx(ee,{variant:"outline",className:"w-full",onClick:k,children:"סגור"})]})]}):i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex items-center gap-2 justify-between text-sm text-muted-foreground",children:[i.jsxs("span",{children:["שאלה ",x+1," מתוך ",c.quiz.questions.length]}),i.jsx(j0,{value:(x+1)/c.quiz.questions.length*100,className:"w-24 h-2"})]}),c.quiz.questions.map((j,T)=>{var R;return i.jsxs("div",{className:`space-y-4 ${T!==x?"hidden":""}`,children:[i.jsx("div",{className:"bg-muted/30 rounded-xl p-4",children:i.jsx("p",{className:"font-medium text-base sm:text-lg leading-relaxed",children:j.question_text})}),i.jsx(E0,{value:((R=d[j.id])==null?void 0:R.toString())||"",onValueChange:P=>f({...d,[j.id]:parseInt(P)}),className:"space-y-2",children:j.options.map((P,D)=>i.jsxs("div",{className:`flex items-center gap-3 p-3 sm:p-4 rounded-xl border-2 transition-all cursor-pointer ${d[j.id]===D?"border-primary bg-primary/5":"border-border hover:border-primary/50 hover:bg-muted/30"}`,onClick:()=>f({...d,[j.id]:D}),children:[i.jsx(pd,{value:D.toString(),id:`${j.id}-${D}`,className:"shrink-0"}),i.jsx(ve,{htmlFor:`${j.id}-${D}`,className:"flex-1 cursor-pointer text-sm sm:text-base",children:P})]},D))})]},j.id)}),i.jsx("div",{className:"flex gap-2 pt-4",children:x<c.quiz.questions.length-1?i.jsxs(i.Fragment,{children:[x>0&&i.jsx(ee,{variant:"outline",className:"flex-1",onClick:()=>b(j=>j-1),children:"הקודם"}),i.jsx(ee,{className:"flex-1 gradient-rose text-foreground",disabled:d[c.quiz.questions[x].id]===void 0,onClick:()=>b(j=>j+1),children:"הבא"})]}):i.jsxs(i.Fragment,{children:[x>0&&i.jsx(ee,{variant:"outline",className:"flex-1",onClick:()=>b(j=>j-1),children:"הקודם"}),i.jsx(ee,{className:"flex-1 bg-green-500 hover:bg-green-600 text-white",disabled:g||Object.keys(d).length!==c.quiz.questions.length,onClick:S,children:g?i.jsx(yr,{className:"h-5 w-5 animate-spin"}):"שלח תשובות"})]})})]})})]})}),i.jsx("div",{className:"space-y-6",children:e.map(j=>{const T=y(j.id),R=(T==null?void 0:T.completed_at)!==null&&(T==null?void 0:T.completed_at)!==void 0,P=((T==null?void 0:T.videos_watched)||[]).length,D=j.videos.length;return E(j),i.jsxs("div",{className:`rounded-2xl sm:rounded-3xl overflow-hidden shadow-soft transition-all ${R?"bg-gradient-to-l from-green-50 to-green-100/50 dark:from-green-950/20 dark:to-green-900/10 ring-2 ring-green-500/30":"bg-card"}`,children:[i.jsx("div",{className:`p-4 sm:p-6 ${R?"":"bg-gradient-to-l from-primary/5 to-transparent"}`,children:i.jsxs("div",{className:"flex items-start justify-between gap-3",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:`p-2 sm:p-3 rounded-xl sm:rounded-2xl shrink-0 ${R?"bg-green-500":"gradient-rose"}`,children:R?i.jsx(vu,{className:"h-5 w-5 sm:h-6 sm:w-6 text-white"}):i.jsx(Fo,{className:"h-5 w-5 sm:h-6 sm:w-6 text-foreground"})}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-bold text-base sm:text-lg",children:j.name}),i.jsx("p",{className:"text-sm text-muted-foreground",children:j.courseName})]})]}),i.jsx("div",{className:`p-2 sm:p-3 rounded-xl sm:rounded-2xl shrink-0 ${R?"bg-green-100 dark:bg-green-900/40":"bg-muted/50"}`,children:R?i.jsx(vu,{className:"h-6 w-6 sm:h-7 sm:w-7 text-green-600 dark:text-green-400"}):i.jsx(th,{className:"h-6 w-6 sm:h-7 sm:w-7 text-muted-foreground"})})]})}),j.videos.length>0&&i.jsxs("div",{className:"px-4 sm:px-6 pb-2",children:[i.jsxs("div",{className:"flex items-center justify-between mb-3 text-sm text-muted-foreground",children:[i.jsxs("span",{children:[P," / ",D," נצפו"]}),i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx($a,{className:"h-4 w-4"}),"סרטונים"]})]}),i.jsx("div",{className:"space-y-2",children:j.videos.map(U=>{const Q=((T==null?void 0:T.videos_watched)||[]).includes(U.id);return i.jsxs("div",{dir:"rtl",className:`flex items-center justify-between gap-3 p-3 sm:p-4 roun
901ded-xl transition-all ${Q?"bg-green-50 dark:bg-green-950/20":"bg-muted/30 hover:bg-muted/50"}`,children:[i.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[i.jsx("div",{className:`w-10 h-10 sm:w-12 sm:h-12 rounded-xl flex items-center justify-center shrink-0 ${Q?"bg-green-100 dark:bg-green-900/40":"gradient-rose"}`,children:Q?i.jsx(vu,{className:"h-5 w-5 text-green-600 dark:text-green-400"}):i.jsx($a,{className:"h-5 w-5 text-foreground"})}),i.jsxs("div",{className:"text-right min-w-0",children:[i.jsx("p",{className:"font-medium text-sm sm:text-base truncate",children:U.title}),U.duration&&i.jsx("p",{className:"text-xs text-muted-foreground",children:U.duration})]})]}),i.jsxs(ee,{size:"sm",className:`gap-2 shrink-0 rounded-full px-4 ${Q?"bg-green-500 hover:bg-green-600 text-white":"gradient-rose text-foreground"}`,onClick:()=>_(j,U),children:[i.jsx("span",{className:"hidden sm:inline",children:"צפייה"}),i.jsx(L4,{className:"h-4 w-4"})]})]},U.id)})})]}),j.quiz&&i.jsx("div",{className:"p-4 sm:p-6 pt-2",children:T!=null&&T.quiz_passed?i.jsxs("div",{className:"flex items-center justify-center gap-2 py-3 px-4 rounded-xl bg-green-100 dark:bg-green-900/30",children:[i.jsx("span",{className:"font-medium text-green-700 dark:text-green-400",children:"עברת את המבחן בהצלחה!"}
901),i.jsx(my,{className:"h-5 w-5 text-green-600"})]}):i.jsx(ee,{className:"w-full py-6 text-base sm:text-lg rounded-xl bg-foreground hover:bg-foreground/90 text-background",onClick:()=>N(j),children:"התחלת מבחן"})})]},j.id)})})]})}const x1=768;function A0e(){const[e,t]=v.useState(void 0);return v.useEffect(()=>{const r=window.matchMedia(`(max-width: ${x1-1}px)`),n=()=>{t(window.innerWidth<x1)};return r.addEventListener("change",n),t(window.innerWidth<x1),()=>r.removeEventListener("change",n)},[]),!!e}const P0e=[{name:"הארנק שלי",href:"/student/wallet",icon:hl,showAlways:!0},{name:"סדנאות מעשיות",href:"/student/practical-workshops",icon:mp,showAlways:!0},{name:"השתלמויות",href:"/student/workshops",icon:pa,showAlways:!0},{name:"ימי צילום נוספים",href:"/student/photo-days",icon:Bs,showAlways:!0},{name:"תמונות מימי צילום",href:"/student/my-photos",icon:Wi,showAlways:!0}];function R0e(){const[e,t]=v.useState(!1),r=Ya(),n=A0e(),{data:s}=uo();v.useEffect(()=>{n&&t(!1)},[r.pathname,n]);const a=()=>{localStorage.removeItem("studentSession"),window.location.href="/student/login"},l=(s==null?void 0:s.isExternalClientOnly)??!1?[{name:"הארנק שלי",href:"/student/wallet",icon:hl,showAlways:!0},{name:"השתלמויות",href:"/student/workshops",icon:pa,showAlways:!0}]:[...P0e,...s!=null&&s.hasCourseTasks?[{name:"משימות קורס",href:"/student/course-tasks",icon:Fo,showAlways:!1}]:[],{name:"שיעורים מוקלטים",href:"/student/makeup-lessons",icon:Nf,showAlways:!0},{name:"חנות אונליין",href:"/student/shop",icon:$4,showAlways:!0}];return i.jsxs(i.Fragment,{children:[i.jsx("header",{className:"fixed top-0 right-0 left-0 z-50 lg:hidden bg-card/95 backdrop-blur-md border-b border-border safe-area-inset-top",children:i.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[i.jsx(ee,{variant:"ghost",size:"icon",className:"h-10 w-10",onClick:()=>t(!e),children:e?i.jsx(es,{className:"h-5 w-5"}):i.jsx(F4,{className:"h-5 w-5"})}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg gradient-rose flex items-center justify-center",children:i.jsx(wi,{className:"h-4 w-4 text-foreground"})}),i.jsx("span",{className:"font-bold text-sm text-foreground",children:"YARIN SHAHAF"})]}),i.jsx("div",{className:"w-10"})," "]})}
901),e&&i.jsx("div",{className:"fixed inset-0 bg-foreground/30 backdrop-blur-sm z-40 lg:hidden animate-fade-in",onClick:()=>t(!1)}),i.jsx("aside",{className:xe("fixed top-0 right-0 z-40 h-full w-[280px] max-w-[85vw] bg-card border-l border-border shadow-xl transition-transform duration-300 ease-out lg:translate-x-0 lg:w-72",e?"translate-x-0":"translate-x-full lg:translate-x-0"),children:i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("div",{className:"hidden lg:flex items-center gap-3 px-6 py-6 border-b border-border",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl gradient-rose flex items-center justify-center shadow-soft",children:i.jsx(wi,{className:"h-5 w-5 text-foreground"})}),i.jsxs("div",{children:[i.jsx("h1",{className:"font-bold text-lg text-foreground",children:"YARIN SHAHAF"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"אזור תלמידים"})]})]}),i.jsxs("div",{className:"flex lg:hidden items-center justify-between px-4 py-4 border-b border-border",children:[i.jsx("span",{className:"font-semibold text-foreground",children:"תפריט"}),i.jsx(ee,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>t(!1),children:i.jsx(es,{className:"h-4 w-4"})})]}),(s==null?void 0:s.studentName)&&i.jsxs("div",{className:"mx-3 mt-4 p-4 rounded-xl bg-gradient-to-br from-primary/10 to-secondary/20 border border-primary/20",children:[i.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"שלום,"}),i.jsx("p",{className:"font-bold text-foreground text-lg leading-tight",children:s.studentName}),i.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"ברוכה הבאה לאזור האישי שלך ✨"})]}),i.jsx("nav",{className:"flex-1 px-3 py-4 space-y-1 overflow-y-auto",children:l.map(c=>{const u=r.pathname===c.href;return i.jsxs(zA,{to:c.href,onClick:()=>t(!1),className:xe("flex items-center gap-3 px-4 py-3.5 rounded-xl text-sm font-medium transition-all duration-200 active:scale-[0.98]",u?"gradient-rose text-foreground shadow-soft":"text-muted-foreground hover:bg-muted hover:text-foreground active:bg-muted"),children:[i.jsx(c.icon,{className:"h-5 w-5 shrink-0"}),i.jsx("span",{className:"truncate",children:c.name})]},c.name)})}),i.jsxs("div",{className:"p-4 border-t border-border safe-area-inset-bottom space-y-2",children:[i.jsxs("a",{href:"https://wa.me/972527480033",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 w-full px-4 py-3 rounded-xl bg-green-500 hover:bg-green-600 text-white font-medium transition-colors",children:[i.jsx(Qh,{className:"h-5 w-5"}),"רוצה לדבר איתנו?"]}),i.jsxs(ee,{variant:"ghost",className:"w-full justify-start gap-3 text-muted-foreground hover:text-foreground py-3",onClick:a,children:[i.jsx(D4,{className:"h-5 w-5"}),"התנתקות"]})]})]})})]})}function O0e({children:e}){const{isLoading:t,data:r}=uo();return t?i.jsx("div",{className:"min-h-screen min-h-[100dvh] bg-background flex items-center justify-center px-4",children:i.jsxs("div",{className:"text-center",children:[i.jsx(yr,{className:"h-8 w-8 animate-spin text-muted-foreground mx-auto mb-4"}),i.jsx("p",{className:"text-muted-foreground",children:"טוען נתונים..."})]})}):r?i.jsxs("div",{className:"min-h-screen min-h-[100dvh] bg-background",children:[i.jsx(R0e,{}),i.jsx("main",{className:"lg:mr-72 min-h-screen min-h-[100dvh] pt-[60px] lg:pt-0",children:i.jsx("div",{className:"p-4 sm:p-6 lg:p-8 pb-safe",children:e})})]}):i.jsx("div",{className:"min-h-screen min-h-[100dvh] bg-background flex items-center justify-center px-4",children:i.jsxs("div",{className:"text-center max-w-sm",children:[i.jsx("p",{className:"text-foreground font-medium mb-2",children:"יש להתחבר מחדש לאזור התלמידים"}),i.jsx("p",{className:"text-muted-foreground text-sm mb-6",children:"נראה שהחיבור פג תוקף או שחסרים נתונים."}),i.jsx(ee,{variant:"default",onClick:()=>{localStorage.removeItem("studentSession"),BF(),window.location.href="/student/login"},children:"מעבר להתחברות"})]})})}function go({children:e}){return i.jsx(f0e,{children:i.jsx(O0e,{children:e})})}const D0e=()=>`${window.location.origin}/student/login`;function I0e(){const[e,t]=v.useState([]),[r,n]=v.useState(new Date),[s,a]=v.useState(!0),[o,l]=v.useState(null),c=D0e();v.useEffect(()=>{u()},[]);const u=async()=>{try{const{data:x,error:b}=await de.functions.invoke("get-available-photo-days");if(b||!(x!=null&&x.success))throw b||new Error((x==null?void 0:x.error)||"Failed to load photo days");t(x.data||[])}catch(x){console.error("Error fetching photo days:",x)}finally{a(!1)}},d=u2({start:en(r),end:y0(r)}),f=en(r).getDay(),h=Array(f).fill(null),m=x=>e.filter(b=>Wr(new Date(b.date),x)),g=x=>{const b=m(x);b.length>0&&l(b[0])},p=["א׳","ב׳","ג׳","ד׳","ה׳","ו׳","ש׳"];return s?i.jsx("div",{className:"min-h-screen bg-white flex items-center justify-center",dir:"rtl",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-pink-500"})}):i.jsxs("div",{className:"min-h-screen bg-white p-4 sm:p-6",dir:"rtl",children:[i.jsx("style",{children:`
902        @import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700&display=swap');
903        * { font-family: 'Heebo', sans-serif; }
904      `}),i.jsx("div",{className:"max-w-3xl mx-auto mb-6",children:i.jsx("div",{className:"bg-gradient-to-r from-pink-500 via-rose-500 to-pink-600 rounded-xl py-3 px-4 shadow-lg",children:i.jsxs("p",{className:"text-white text-center font-semibold text-sm sm:text-base flex items-center justify-center gap-2",children:[i.jsx("span",{className:"text-lg",children:"✨"}),"ההרשמה פתוחה לתלמידי ובוגרי ירין שחף בלבד!",i.jsx("span",{className:"text-lg",children:"✨"})]})})}),i.jsxs("div",{className:"text-center mb-6",children:[i.jsx("h1",{className:"text-2xl sm:text-3xl font-bold text-gray-800 mb
904-2",children:"ימי צילום"}),i.jsx("p",{className:"text-gray-500",children:"בחרי יום צילום והירשמי"})]}),i.jsxs("div",{className:"flex items-center justify-between mb-6 max-w-3xl mx-auto",children:[i.jsx("button",{onClick:()=>n(v2(r,1)),className:"p-2 hover:bg-gray-100 rounded-full transition-colors",children:i.jsx(yi,{className:"h-5 w-5 text-gray-600"})}),i.jsx("h2",{className:"text-xl font-semibold text-gray-800",children:$t(r,"MMMM yyyy",{locale:Tn})}),i.jsx("button",{onClick:()=>n(ts(r,1)),className:"p-2 hover:bg-gray-100 rounded-full transition-colors",children:i.jsx(Xi,{className:"h-5 w-5 text-gray-600"})})]}),i.jsxs("div",{className:"max-w-3xl mx-auto",children:[i.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:p.map(x=>i.jsx("div",{className:"text-center text-sm font-medium text-gray-500 py-2",children:x},x))}),i.jsxs("div",{className:"grid grid-cols-7 gap-1",children:[h.map((x,b)=>i.jsx("div",{className:"aspect-square"},`empty-${b}`)),d.map(x=>{const b=m(x),w=Wr(x,new Date),y=b.length>0;return i.jsxs("div",{onClick:()=>g(x),className:`
905                  aspect-square p-1 border rounded-lg transition-all
906                  ${w?"border-pink-400 bg-pink-50":"border-gray-200"}
907                  ${y?"bg-gradient-to-br from-pink-100 to-rose-100 border-pink-300 cursor-pointer hover:shadow-md":""}
908                `,children:[i.jsx("div",{className:`text-xs sm:text-sm font-medium ${w?"text-pink-600":"text-gray-700"}`,children:$t(x,"d")}),y&&i.jsxs("div",{className:"mt-0.5 space-y-0.5",children:[b.slice(0,2).map(_=>i.jsxs("div",{className:"text-[10px] sm:text-xs bg-pink-500 text-white rounded px-1 py-0.5 truncate",title:`${_.name} - ${_.branch} - ${_.time}`,children:[i.jsx("span",{className:"font-medium",children:_.branch}),i.jsxs("span",{className:"opacity-80",children:[" ",_.time]})]},_.id)),b.length>2&&i.jsxs("div",{className:"text-[10px] text-pink-600 font-medium",children:["+",b.length-2]})]})]},x.toISOString())})]})]}),o&&i.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",onClick:()=>l(null),children:i.jsxs("div",{className:"bg-white rounded-2xl max-w-lg w-full max-h-[90vh] overflow-y-auto shadow-2xl",onClick:x=>x.stopPropagation(),children:[i.jsxs("div",{className:"bg-gradient-to-r from-pink-500 to-rose-500 text-white p-6 rounded-t-2xl relative",children:[i.jsx("button",{onClick:()=>l(null),className:"absolute top-4 left-4 p-1 hover:bg-white/20 rounded-full transition-colors",children:i.jsx(es,{className:"h-5 w-5"})}),i.jsx("div",{className:"inline-block bg-white/20 text-white text-sm font-semibold px-3 py-1 rounded-full mb-3",children:o.branch}),i.jsx("h2",{className:"text-2xl font-bold",children:o.name})]}),i.jsxs("div",{className:"p-6 space-y-4",children:[i.jsxs("div",{className:"flex items-center gap-3 text-gray-700",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-pink-100 flex items-center justify-center",children:i.jsx(rr,{className:"h-5 w-5 text-pink-600"})}),i.jsxs("div",{children:[i.jsx("div",{className:"font-medium",children:"תאריך ושעה"}),i.jsxs("div",{className:"text-gray-500",children:[$t(new Date(o.date),"EEEE, d בMMMM yyyy",{locale:Tn})," בשעה ",o.time]})]})]}),i.jsxs("div",{className:"flex items-center gap-3 text-gray-700",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-pink-100 flex items-center justify-center",children:i.jsx(ls,{className:"h-5 w-5 text-pink-600"})}),i.jsxs("div",{children:[i.jsx("div",{className:"font-medium",children:"סניף"}),i.jsx("div",{className:"text-gray-500",children:o.branch})]})]}),i.jsxs("div",{className:"flex items-center gap-3 text-gray-700",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-pink-100 flex items-center justify-center",children:i.jsx(xs,{className:"h-5 w-5 text-pink-600"})}),i.jsxs("div",{children:[i.jsx("div",{className:"font-medium",children:"מקומות פנויים"}),i.jsxs("div",{className:"text-gray-500",children:[o.spotsLeft," מקומות"]})]})]}),i.jsxs("div",{className:"bg-gradient-to-r from-pink-50 to-rose-50 rounded-xl p-4 text-center",children:[i.jsx("div",{className:"text-sm text-gray-500 mb-1",children:"מחיר לתלמידות ירין שחף"}),i.jsxs("div",{className:"text-3xl font-bold text-pink-600",children:["₪",o.yarinShachafPrice]}),o.listPrice>o.yarinShachafPrice&&i.jsxs("div",{className:"text-sm text-gray-400 line-through",children:["מחיר מחירון: ₪",o.listPrice]})]}),i.jsx("a",{href:`${c}?redirect=photo-days&eventId=${o.id}`,target:"_blank",rel:"noopener noreferrer",className:"block w-full bg-gradient-to-r from-pink-500 to-rose-500 hover:from-pink-600 hover:to-rose-600 text-white text-center font-semibold py-4 rounded-xl transition-all shadow-lg hover:shadow-xl",onClick:()=>Rg({redirect:"photo-days",eventId:o.id}),children:"להרשמה"})]})]})})]})}const EE=["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],CE="https://bjohfezlhpohauqjxmzu.supabase.co",bm="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJqb2hmZXpsaHBvaGF1cWp4bXp1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njg4MjA1NTgsImV4cCI6MjA4NDM5NjU1OH0.DV7gdWZ3Q5HIMMvhxfI4slXbUnO2UKU4vRS278fSe5U",F0e=()=>`${window.location.origin}/student/login`,ff=e=>`${KI(e)}-${dw(e)}`,Zd=e=>{const[t,r,n]=e.split("-").map(Number);return new Date(t,(r||1)-1,n||1)}
908,Ol=ff(new Date);function M0e(){const[e,t]=v.useState([]),[r,n]=v.useState(!0),[s,a]=v.useState(!1),[o,l]=v.useState(null),[c,u]=v.useState(!1),d=F0e();v.useEffect(()=>{let m=!1;const g=async()=>{try{const b=await(await fetch(`${CE}/functions/v1/get-available-workshops?scope=current`,{headers:{apikey:bm,Authorization:`Bearer ${bm}`}})).json();if(m)return;const w=(b==null?void 0:b.data)||[];if(t(w),w.length>0){const y=new Set(w.map(_=>ff(Zd(_.date))));l(y.has(Ol)?Ol:ff(Zd(w[0].date)))}else l(Ol)}catch(x){console.error("Error loading current workshops:",x)}finally{m||n(!1)}},p=async()=>{a(!0);try{const b=await(await fetch(`${CE}/functions/v1/get-available-workshops?scope=past`,{headers:{apikey:bm,Authorization:`Bearer ${bm}`}})).json();if(m)return;const w=(b==null?void 0:b.data)||[];t(y=>{const _=new Set(y.map(N=>N.id));return[...y,...w.filter(N=>!_.has(N.id))]})}catch(x){console.error("Error loading past workshops:",x)}finally{m||a(!1)}};return(async()=>(await g(),setTimeout(p,50)))(),()=>{m=!0}},[]);const f=v.useMemo(()=>{const m=new Map;return e.forEach(g=>{const p=Zd(g.date),x=ff(p);m.has(x)||m.set(x,{year:KI(p),month:dw(p),date:p})}),Array.from(m.entries()).map(([g,p])=>({key:g,...p})).sort((g,p)=>p.date.getTime()-g.date.getTime())},[e]);v.useEffect(()=>{if(c||f.length===0)return;f.some(g=>g.key===Ol)?o!==Ol&&l(Ol):(!o||!f.some(g=>g.key===o))&&l(f[0].key)},[f,o,c]);const h=v.useMemo(()=>o?e.filter(m=>ff(Zd(m.date))===o):e,[e,o]);return r?i.jsxs("div",{className:"min-h-screen bg-white flex flex-col items-center justify-center gap-4",dir:"rtl",children:[i.jsx("style",{children:`
909          @import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700&display=swap');
910          * { font-family: 'Heebo', sans-serif; }
911        `}),i.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-b-2 border-pink-500"}),i.jsx("p",{className:"text-gray-600 text-sm sm:text-base font-medium",children:"מייד נציג את ההשתלמויות..."})]}):i.jsxs("div",{className:"min-h-screen bg-white",dir:"rtl",children:[i.jsx("style",{children:`
912        @import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700&display=swap');
913        * { font-family: 'Heebo', sans-serif; }
914      `}),i.jsx("div",{className:"bg-black text-white py-4 sm:py-6 px-3 sm:px-4 text-center",children:i.jsx("h1",{className:"text-xl sm:text-2xl md:text-3xl font-bold",children:"השתלמויות בירין שחף"})}),i.jsx("div",{className:"bg-gray-100 border-b border-gray-200",children:i.jsx("div",{className:"max-w-5xl mx-auto px-2 sm:px-4",children:i.jsxs("div",{className:"flex gap-1 overflow-x-auto py-2 scrollbar-hide",children:[f.map(m=>{m.key;const g=`${EE[m.month]} ${m.year}`;return i.jsx("button",{onClick:()=>{l(m.key),u(!0)},"aria-pressed":o===m.key,className:`
915                    relative px-3 sm:px-4 py-2 text-xs sm:text-sm transition-colors whitespace-nowrap flex-shrink-0
916                    ${o===m.key?"text-pink-600 font-semibold after:content-[''] after:absolute after:bottom-0 after:left-2 after:right-2 after:h-0.5 after:bg-pink-600 after:rounded-full":"text-gray-600 font-medium hover:text-gray-900"}
917                  `,children:g},m.key)}),s&&i.jsxs("div",{className:"flex items-center gap-2 px-3 text-xs text-gray-500",children:[i.jsx("div",{className:"animate-spin rounded-full h-3 w-3 border-b-2 border-pink-500"}),"טוען עבר..."]})]})})}),i.jsx("div",{className:"max-w-5xl mx-auto px-3 sm:px-4 py-4 sm:py-8",children:i.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[h.map(m=>{const g=Zd(m.date),p=$t(g,"d"),x=EE[dw(g)],b=m.isPast,w=!b&&!m.isOpen,y=b||w;return i.jsxs("div",{className:`bg-gray-100 rounded-lg sm:rounded-xl overflow-hidden shadow-sm hover:shadow-lg transition-shadow relative ${y?"opacity-80":""}`,children:[b?i.jsx("div",{className:"absolute top-2 right-2 sm:top-4 sm:right-4 z-10 bg-gray-700 text-white font-bold text-xs sm:text-sm px-3 sm:px-4 py-1.5 sm:py-2 rounded-lg shadow-lg",children:"הסתיים"}):w?i.jsx("div",{className:"absolute top-2 right-2 sm:top-4 sm:right-4 z-10 bg-red-600 text-white font-bold text-xs sm:text-sm px-3 sm:px-4 py-1.5 sm:py-2 rounded-lg shadow-lg",children:"SOLD OUT"}):null,i.jsxs("div",{className:"flex flex-col sm:flex-row",children:[i.jsxs("div",{className:"relative w-full sm:w-48 md:w-72 h-48 sm:h-auto flex-shrink-0",children:[m.imageUrl?i.jsx("img",{src:m.imageUrl,alt:m.name,loading:"lazy",className:`w-full h-full object-cover ${y?"grayscale":""}`}):i.jsx("div",{className:`w-full h-full bg-gradient-to-br from-pink-400 via-rose-400 to-pink-500 ${y?"grayscale":""}`}),i.jsxs("div",{className:"absolute left-0 top-0 bottom-0 w-10 sm:w-12 bg-black/60 flex flex-col items-center justify-center",children:[i.jsx("div",{className:"text-white text-xl sm:text-2xl font-bold",children:p}),i.jsx("div",{className:"text-white text-[10px] sm:text-xs font-medium",children:x})]})]}),i.jsxs("div",{className:"flex-1 p-4 sm:p-6",children:[i.jsxs("div",{className:"text-pink-600 font-semibold text-base sm:text-lg mb-1 sm:mb-2",children:["סניף ",m.branch]}),i.jsx("h2",{className:"text-lg sm:text-xl md:text-2xl font-bold text-gray-900 mb-2 sm:mb-3",children:m.name}),i.jsxs("div",{className:"flex items-center gap-2 text-gray-600 mb-2 sm:mb-3 text-sm sm:text-base",children:[i.jsx(rr,{className:"h-4 w-4 sm:h-5 sm:w-5 flex-shrink-0"}),i.jsxs("span",{children:["מועד ההשתלמות: ",$t(g,"d בMMMM, yyyy",{locale:Tn})," בשעה ",m.time]})]}),m.description&&i.jsx("p",{className:"text-gray-600 text-xs sm:text-sm mb-3 sm:mb-4 line-clamp-2 sm:line-clamp-3",children:m.description}),i.jsxs("div",{className:"flex flex-wrap items-stretch gap-2 sm:gap-4 mb-4 sm:mb-5",children:[i.jsxs("div",{className:"bg-pink-50 border border-pink-200 rounded-lg sm:rounded-xl px-3 sm:px-5 py-2 sm:py-3 flex flex-col items-center min-w-[100px] sm:min-w-[140px]",children:[i.jsx("span",{className:"text-[10px] sm:text-xs text-pink-600 font-medium mb-1 text-center",children:"מחיר לתלמידי ובוגרי ירין שחף"}),i.jsxs("div",{className:"text-xl sm:text-2xl font-bold text-pink-600",children:["₪",m.yarinShachafPrice]})]}),m.listPrice>m.yarinShachafPrice&&i.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-lg sm:rounded-xl px-3 sm:px-5 py-2 sm:py-3 flex flex-col items-center min-w-[80px] sm:min-w-[120px]",children:[i.jsx("span",{className:"text-[10px] sm:text-xs text-gray-500 font-medium mb-1",children:"מחיר מחירון"}),i.jsxs("div",{className:"text-lg sm:text-xl font-semibold text-gray-500",children:["₪",m.listPrice]})]})]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 sm:gap-3",children:[b?i.jsx("div",{className:"bg-gray-400 text-white font-semibold px-4 sm:px-6 py-2.5 sm:py-3 rounded-lg cursor-not-allowed inline-flex items-center justify-center gap-2 text-sm sm:text-base",children:"ההשתלמות הסתיימה"}):w?i.jsx("div",{className:"bg-gray-400 text-white font-semibold px-4 sm:px-6 py-2.5 sm:py-3 rounded-lg cursor-not-allowed inline-flex items-center justify-center gap-2 text-sm sm:text-base",children:"ההשתלמות מלאה"}):i.jsxs("a",{href:`${d}?redirect=workshops&eventId=${m.id}`,target:"_blank",rel:"noopener noreferrer",className:"bg-gray-900 hover:bg-gray-800 text-white font-semibold px-4 sm:px-6 py-2.5 sm:py-3 rounded-lg transition-colors inline-flex items-center justify-center gap-2 text-sm sm:text-base",onClick:()=>Rg({redirect:"workshops",eventId:m.id}),children:["הרשמה לתלמידי ובוגרי ירין שחף",i.jsx(fL,{className:"h-4 w-4"})]}),i.jsxs("a",{href:"https://wa.me/972527480033",target:"_blank",rel:"noopener noreferrer",className:"bg-green-500 hover:bg-green-600 text-white font-semibold px-4 sm:px-6 py-2.5 sm:py-3 rounded-lg transition-colors inline-flex items-center justify-center gap-2 text-sm sm:text-base",children:["יש לך שאלות?",i.jsx("svg",{className:"h-4 w-4 sm:h-5 sm:w-5",fill:"currentColor",viewBox:"0 0 24 24",children:i.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.
917198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})]})]})]})]})]},m.id)}),h.length===0&&i.jsxs("div",{className:"text-center py-12 text-gray-500",children:[i.jsx(rr,{className:"h-12 w-12 mx-auto mb-4 text-gray-300"}),i.jsx("p",{children:"אין השתלמויות בחודש זה"})]})]})})]})}const L0e=()=>`${window.location.origin}/student/login`;function B0e(){const[e,t]=v.useState([]),[r,n]=v.useState(new Date),[s,a]=v.useState(!0),[o,l]=v.useState(null),c=L0e();v.useEffect(()=>{u()},[]);const u=async()=>{try{const{data:x,error:b}=await de.functions.invoke("get-available-practical-workshops");if(b||!(x!=null&&x.success))throw b||new Error((x==null?void 0:x.error)||"Failed to load practical workshops");t(x.data||[])}catch(x){console.error("Error fetching practical workshops:",x)}finally{a(!1)}},d=u2({start:en(r),end:y0(r)}),f=en(r).getDay(),h=Array(f).fill(null),m=x=>e.filter(b=>Wr(new Date(b.date),x)),g=x=>{const b=m(x);b.length>0&&l(b[0])},p=["א׳","ב׳","ג׳","ד׳","ה׳","ו׳","ש׳"];return s?i.jsx("div",{className:"min-h-screen bg-white flex items-center justify-center",dir:"rtl",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-purple-500"})}):i.jsxs("div",{className:"min-h-screen bg-white p-4 sm:p-6",dir:"rtl",children:[i.jsx("style",{children:`
918        @import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700&display=swap');
919        * { font-family: 'Heebo', sans-serif; }
920      `}),i.jsx("div",{className:"max-w-3xl mx-auto mb-6",children:i.jsx("div",{className:"bg-gradient-to-r from-purple-500 via-indigo-500 to-purple-600 rounded-xl py-3 px-4 shadow-lg",children:i.jsxs("p",{className:"text-white text-center font-semibold text-sm sm:text-base flex items-center justify-center gap-2",children:[i.jsx("span",{className:"text-lg",children:"✨"}),"ההרשמה פתוחה לתלמידי ובוגרי ירין שחף בלבד!",i.jsx("span",{className:"text-lg",children:"✨"})]})})}),i.jsxs("div",{className:"text-center mb-6",children:[i.jsx("h1",{className:"text-2xl sm:text-3xl font-bold text-gray-800 mb-2",children:"סדנאות מעשיות"}),i.jsx("p",{className:"text-gray-500",children:"בחרי סדנא והירשמי"})]}),i.jsxs("div",{className:"flex items-center justify-between mb-6 max-w-3xl mx-auto",children:[i.jsx("button",{onClick:()=>n(v2(r,1)),className:"p-2 hover:bg-gray-100 rounded-full transition-colors",children:i.jsx(yi,{className:"h-5 w-5 text-gray-600"})}),i.jsx("h2",{className:"text-xl font-semibold text-gray-800",children:$t(r,"MMMM yyyy",{locale:Tn})}),i.jsx("button",{onClick:()=>n(ts(r,1)),className:"p-2 hover:bg-gray-100 rounded-full transition-colors",children:i.jsx(Xi,{className:"h-5 w-5 text-gray-600"})})]}),i.jsxs("div",{className:"max-w-3xl mx-auto",children:[i.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:p.map(x=>i.jsx("div",{className:"text-center text-sm font-medium text-gray-500 py-2",children:x},x))}),i.jsxs("div",{className:"grid grid-cols-7 gap-1",children:[h.map((x,b)=>i.jsx("div",{className:"aspect-square"},`empty-${b}`)),d.map(x=>{const b=m(x),w=Wr(x,new Date),y=b.length>0;return i.jsxs("div",{onClick:()=>g(x),className:`
921                  aspect-square p-1 border rounded-lg transition-all
922                  ${w?"border-purple-400 bg-purple-50":"border-gray-200"}
923                  ${y?"bg-gradient-to-br from-purple-100 to-indigo-100 border-purple-300 cursor-pointer hover:shadow-md":""}
924                `,children:[i.jsx("div",{className:`text-xs sm:text-sm font-medium ${w?"text-purple-600":"text-gray-700"}`,children:$t(x,"d")}),y&&i.jsxs("div",{className:"mt-0.5 space-y-0.5",children:[b.slice(0,2).map(_=>i.jsxs("div",{className:"text-[10px] sm:text-xs bg-purple-500 text-white rounded px-1 py-0.5 truncate",title:`${_.name} - ${_.branch} - ${_.time}`,children:[i.jsx("span",{className:"font-medium",children:_.branch}),i.jsxs("span",{className:"opacity-80",children:[" ",_.time]})]},_.id)),b.length>2&&i.jsxs("div",{className:"text-[10px] text-purple-600 font-medium",children:["+",b.length-2]})]})]},x.toISOString())})]})]}),o&&i.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",onClick:()=>l(null),children:i.jsxs("div",{className:"bg-white rounded-2xl max-w-lg w-full max-h-[90vh] overflow-y-auto shadow-2xl",onClick:x=>x.stopPropagation(),children:[i.jsxs("div",{className:"bg-gradient-to-r from-purple-500 to-indigo-500 text-white p-6 rounded-t-2xl relative",children:[i.jsx("button",{onClick:()=>l(null),className:"absolute top-4 left-4 p-1 hover:bg-white/20 rounded-full transition-colors",children:i.jsx(es,{className:"h-5 w-5"})}),i.jsx("div",{className:"inline-block bg-white/20 text-white text-sm font-semibold px-3 py-1 rounded-full mb-3",children:o.branch}),i.jsx("h2",{className:"text-2xl font-bold",children:o.name})]}),i.jsxs("div",{className:"p-6 space-y-4",children:[i.jsxs("div",{className:"flex items-center gap-3 text-gray-700",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center",children:i.jsx(rr,{className:"h-5 w-5 text-purple-600"})}),i.jsxs("div",{children:[i.jsx("div",{className:"font-medium",children:"תאריך ושעה"}),i.jsxs("div",{className:"text-gray-500",children:[$t(new Date(o.date),"EEEE, d בMMMM yyyy",{locale:Tn})," בשעה ",o.time]})]})]}),i.jsxs("div",{className:"flex items-center gap-3 text-gray-700",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center",children:i.jsx(ls,{className:"h-5 w-5 text-purple-600"})}),i.jsxs("div",{children:[i.jsx("div",{className:"font-medium",children:"סניף"}),i.jsx("div",{className:"text-gray-500",children:o.branch})]})]}),i.jsxs("div",{className:"flex items-center gap-3 text-gray-700",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center",children:i.jsx(xs,{className:"h-5 w-5 text-purple-600"})}),i.jsxs("div",{children:[i.jsx("div",{className:"font-medium",children:"מקומות פנויים"}),i.jsxs("div",{className:"text-gray-500",children:[o.spotsLeft," מקומות"]})]})]}),o.description&&i.jsxs("div",{className:"bg-gray-50 rounded-xl p-4",children:[i.jsx("div",{className:"font-medium text-gray-700 mb-1",children:"פרטים נוספים"}),i.jsx("p",{className:"text-gray-600",children:o.description})]}),i.jsxs("div",{className:"bg-gradient-to-r from-purple-50 to-indigo-50 rounded-xl p-4 text-center",children:[i.jsx("div",{className:"text-sm text-gray-500 mb-1",children:"מחיר לתלמידות ירין שחף"}),i.jsxs("div",{className:"text-3xl font-bold text-purple-600",children:["₪",o.yarinShachafPrice]}),o.listPrice>o.yarinShachafPrice&&i.jsxs("div",{className:"text-sm text-gray-400 line-through",children:["מחיר מחירון: ₪",o.listPrice]})]}),i.jsx("a",{href:`${c}?redirect=practical-workshops&eventId=${o.id}`,target:"_blank",rel:"noopener noreferrer",className:"block w-full bg-gradient-to-r from-purple-500 to-indigo-500 hover:from-purple-600 hover:to-indigo-600 text-white text-center font-semibold py-4 rounded-xl transition-all shadow-lg hover:shadow-xl",onClick:()=>Rg({redirect:"practical-workshops",eventId:o.id}),children:"להרשמה"})]})]})})]})}const $0e=new XB,U0e=()=>i.jsx(JB,{client:$0e,children:i.jsx(jB,{children:i.jsx(Hz,{children:i.jsx($z,{children:i.jsx(Wz,{children:i.jsx(Bz,{children:i.jsx(Uz,{children:i.jsxs(zz,{children:[i.jsx(u9,{}),i.jsx(W9,{}),i.jsx(X$,{children:i.jsxs(U$,{children:[i.jsx(Kt,{path:"/login",element:i.jsx(wH,{})}),i.jsx(Kt,{path:"/reset-password",element:i.jsx(_H,{})}),i.jsx(Kt,{path:"/",element:i.jsx(B$,{to:"/students",replace:!0})}),i.jsx(Kt,{path:"/students",element:i.jsx(Qs,{requiredRole:"coordinator",children:i.jsx(Eae,{})})}),i.jsx(Kt,{path:"/courses",element:i.jsx(Qs,{adminOnly:!0,children:i.jsx(cie,{})})}),i.jsx(Kt,{path:"/entitlements",element:i.jsx(Qs,{adminOnly:!0,children:i.jsx(gie,{})})}),i.jsx(Kt,{path:"/photo-days",element:i.jsx(Qs,{children:i.jsx(xhe,{})})}),i.jsx(Kt,{path:"/photo-day-images",element:i.jsx(Qs,{children:i.jsx(whe,{})})}),i.jsx(Kt,{path:"/workshops",element:i.jsx(Qs,{children:i.jsx(jhe,{})})}),i.jsx(Kt,{path:"/practical-workshops",element:i.jsx(Qs,{children:i.jsx(Ahe,{})})}),i.jsx(Kt,{path:"/wallet",element:i.jsx(Qs,{children:i.jsx(sde,{})})}),i.jsx(Kt,{path:"/lessons",element:i.jsx(Qs,{adminOnly:!0,children:i.jsx(Yfe,{})})}),i.jsx(Kt,{path:"/course-tasks",element:i.jsx(Qs,{adminOnly:!0,children:i.jsx(Lhe,{})})}),i.jsx(Kt,{path:"/settings",element:i.jsx(Qs,{adminOnly:!0,children:i.jsx(a0e,{})})}),i.jsx(Kt,{path:"/makeupland-requests",element:i.jsx(Qs,{children:i.jsx(i0e,{})})}),i.jsx(Kt,{path:"/student/login",element:i.jsx(d0e,{})}),i.jsx(Kt,{path:"/student/wallet",element:i.jsx(go,{children:i.jsx(h0e,{})})}),i.jsx(Kt,{path:"/student/makeup-lessons",element:i.jsx(go,{children:i.jsx(m0e,{})})}),i.jsx(Kt,{path:"/student/workshops",element:i.jsx(go,{children:i.jsx(y0e,{})})}),i.jsx(Kt,{path:"/student/photo-days",element:i.jsx(go,{children:i.jsx(N0e,{})})}),i.jsx(Kt,{path:"/student/practical-workshops",element:i.jsx(go,{children:i.jsx(j0e,{})})}),i.jsx(Kt,{path:"/student/my-photos",element:i.jsx(go,{children:i.jsx(C0e,{})})}),i.jsx(Kt,{path:"/student/shop",element:i.jsx(go,{children:i.jsx(E0e,{})})}),i.jsx(Kt,{path:"/student/course-tasks",element:i.jsx(go,{children:i.jsx(T0e,{})})}),i.jsx(Kt,{path:"/embed/photo-days",element:i.jsx(I0e,{})}),i.jsx(Kt,{path:"/embed/workshops",element:i.jsx(M0e,{})}),i.jsx(Kt,{path:"/embed/practical-workshops",element:i.jsx(B0e,{})}),i.jsx(Kt,{path:"*",element:i.jsx(o0e,{})})]})})]})})})})})})})});QT(document.getElementById("root")).render(i.jsx(ye.StrictMode,{children:i.jsx(U0e,{})}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.